Mercurial > hg > CbC > old > device
changeset 302:bea7ab2fb218 switch-table
switch table jump finished.
author | kono |
---|---|
date | Mon, 07 Jun 2004 17:55:37 +0900 |
parents | 60dba3ef1f69 |
children | 88e20739e64c |
files | Changes mc-code-ia32.c mc-code-mips.c mc-code-powerpc.c mc-code.h mc-switch.c test/switch.c |
diffstat | 7 files changed, 1348 insertions(+), 78 deletions(-) [+] |
line wrap: on
line diff
--- a/Changes Mon Jun 07 03:33:01 2004 +0900 +++ b/Changes Mon Jun 07 17:55:37 2004 +0900 @@ -4794,3 +4794,14 @@ Sun Jun 6 23:07:16 JST 2004 level 1 table がおかしい。そうだよなぁ。 + +今のアルゴリズムだと、10ずつ連続しているテーブルに +少数のanomalyがあるって時に困るね。テーブルが分解されちゃう。 +ま、そんなコードないと思うけど。 + +cmpdimm を直すのを忘れてました。 + +あと、delta!=1 だと、割算したときの余りが0であることを確認しないと +いけない。gcc では、delta!=1 の表は出さないみたいだね。 + +kernel とか gcc とか compile できると良いけどねぇ。
--- a/mc-code-ia32.c Mon Jun 07 03:33:01 2004 +0900 +++ b/mc-code-ia32.c Mon Jun 07 17:55:37 2004 +0900 @@ -1517,7 +1517,7 @@ edx_setup(int rreg) { int edx_save; - /* make real EDX register empty */ + /* make real EDX (or rreg) register empty */ if (free_register_count(0)<1) { for(edx_save = 0;edx_save==dreg||edx_save==creg;edx_save++); printf("\tpushl %s\n",register_name(edx_save,0)); @@ -1652,7 +1652,7 @@ jcond(int l, char cond) { if (chk) return; - printf("\tj%s\t_%d\n",cond?"ne":"e",l); + printf("\tj%s\t_%d\n",cond==LT?code_ge(0):cond?"ne":"e",l); } void @@ -2935,31 +2935,40 @@ int code_table_jump_p() { return 1; } -static int table_next; - void -code_table_jump(int l,int csvalue,int delta,int max,int min) +code_table_jump(int l,int csvalue,int delta,int max,int min,int dlabel) { char *crn; use_register(creg,csvalue,0); crn = register_name(creg,0); - table_next = fwdlabel(); - printf("\tcmpl\t$%d,%s\n",min,crn); - printf("\tjb\t_%d\n",table_next); - printf("\tcmpl\t$%d,%s\n",max,crn); - printf("\tja\t_%d\n",table_next); printf("\tsubl\t$%d,%s\n",min,crn); + printf("\tcmpl\t$%d,%s\n",max-min,crn); + printf("\tja\t_%d\n",dlabel); + if (delta==1) { + printf("\tjmp\t*_%d(,%s,4)\n",l,crn); + return; + } + use_register(creg,REG_EAX,1); + edx_setup(-1); switch(delta) { - case 1: printf("\tjmp\t*_%d(,%s,4)\n",l,crn); break; - case 2: printf("\tjmp\t*_%d(,%s,2)\n",l,crn); break; - case 4: printf("\tjmp\t*_%d(%s)\n",l,crn); break; + case 2: + printf("\tmovl\t$1,%%edx\n"); + printf("\tandl\t%%edx,%%eax\n"); + printf("\tjne\t_%d\n",dlabel); + printf("\tjmp\t*_%d(,%%eax,2)\n",l); break; + case 4: + printf("\tmovl\t$3,%%edx\n"); + printf("\tandl\t%%edx,%%eax\n"); + printf("\tjne\t_%d\n",dlabel); + printf("\tjmp\t*_%d(%%eax)\n",l); break; default: - if (csvalue!=REG_EAX) - printf("\tmovl %s,%%eax\n",crn); - printf("\tmovl $%d,%%ecx\n",delta); - printf("\tcltd\n\tidivl %%ecx\n"); - printf("\tjmp\t*_%d(,%%eax,4)\n",l); + printf("\tmovl $%d,%%ecx\n",delta); + printf("\txor %%edx,%%edx\n\tdivl %%ecx\n"); + printf("\tandl\t%%edx,%%edx\n"); + printf("\tjne\t_%d\n",dlabel); + printf("\tjmp\t*_%d(,%%eax,4)\n",l); break; } + edx_cleanup(); } void @@ -2980,7 +2989,6 @@ code_table_close() { text_mode(); - fwddef(table_next); } #endif
--- a/mc-code-mips.c Mon Jun 07 03:33:01 2004 +0900 +++ b/mc-code-mips.c Mon Jun 07 17:55:37 2004 +0900 @@ -2671,25 +2671,28 @@ return creg; } -#define CMP_IMM (-2) -static char * cmpreg_1; -static char * cmpreg_2; - void code_cmpdimm(int e, int csreg,int label,int cond) { /* used in dosiwtch() */ - int reg; - char *rn; + int reg=-1; + char *rn,*crn; if(chk) return; - use_reg(csreg); - rn = register_name(reg = get_register()); - printf("\tli %s,%d\n",rn,e); - cmpreg_1 = rn; - cmpreg_2 = register_name(csreg); - cmpreg=CMP_IMM; - free_register(reg); - jcond(label,cond); + crn = register_name(csreg); + + switch(cond) { + case 1: + printf("\tbne\t%s,%d,$L_%d\n",crn,e,label); break; + case 0: + printf("\tbeq\t%s,%d,$L_%d\n",crn,e,label); break; + case LT: + use_reg(csreg); + rn = register_name(reg= get_register()); + printf("\tslt\t%s,%s,%d\n",rn,crn,e); + printf("\tbne\t%s,$0,$L_%d\n",rn,label); break; + default: error(-1); + } + if (reg!=-1) free_register(reg); } void @@ -2844,8 +2847,6 @@ if (chk) return; if (cmpreg==CMP_C1T) { printf("\tbc1%s $L_%d\n",cond?"f":"t",l); - } else if (cmpreg==CMP_IMM) { - printf("\tb%s %s,%s,$L_%d\n",cond?"ne":"eq",cmpreg_1,cmpreg_2,l); } else printf("\tb%s %s,$0,$L_%d\n",cond?"ne":"eq",register_name(cmpreg),l); } @@ -5137,32 +5138,40 @@ #if CASE_CODE -static int table_close; - int code_table_jump_p() { return 1; } void -code_table_jump(int l,int csvalue,int delta,int max,int min) +code_table_jump(int l,int csvalue,int delta,int max,int min,int dlabel) { int t,s; - char *crn = register_name(csvalue); + char *crn = register_name(csvalue); // can be t or s char *trn = register_name(t=get_register()); char *srn = register_name(s=get_register()); - table_close = fwdlabel(); printf("\taddu\t%s,%s,%d\n",trn,crn,-min); - printf("\tsltu\t%s,%s,%d\n",srn,trn,max-min); - printf("\tbeq\t%s,$0,$L%d\n",srn,table_close); + printf("\tsltu\t%s,%s,%d\n",srn,trn,max-min+1); + printf("\tbeq\t%s,$0,$L_%d\n",srn,dlabel); switch(delta) { case 1: printf("\tsll %s,%s,2\n",trn,trn); break; - case 2: printf("\tsll %s,%s,1\n",trn,trn); - case 4: break; + case 2: + printf("\tli\t%s,1\n",srn); + printf("\tand\t%s,%s,%s\n",srn,trn,srn); + printf("\tbne\t%s,$0,$L_%d\n",srn,dlabel); + printf("\tsll %s,%s,1\n",trn,trn); + break; + case 4: + printf("\tli\t%s,3\n",srn); + printf("\tand\t%s,%s,%s\n",srn,trn,srn); + printf("\tbne\t%s,$0,$L_%d\n",srn,dlabel); + break; default: - printf("\tdivu %s,%s,%d\n",trn,trn,delta); - printf("\tsll %s,%s,2\n",trn,trn); + printf("\tdivu %s,%s,%d\n",trn,trn,delta); + printf("\tmfhi %s\n",srn); + printf("\tbne\t%s,$0,$L_%d\n",srn,dlabel); + printf("\tsll %s,%s,2\n",trn,trn); } - printf("\tlw\t%s,$L%d(%s)\n",trn,l,trn); + printf("\tlw\t%s,$L_%d(%s)\n",trn,l,trn); printf("\t.cpadd %s\n",trn); printf("\tj %s\n",trn); @@ -5173,6 +5182,7 @@ void code_table_open(int l) { + output_mode = DATA_EMIT_MODE; printf("\t.rdata\n"); printf("\t.align 4\n"); fwddef(l); @@ -5181,14 +5191,13 @@ void code_table_value(int label,int table_top) { - printf("\t.long $L%d\n",label); + printf("\t.gpword $L_%d\n",label); } void code_table_close() { text_mode(4); - fwddef(table_close); } #endif
--- a/mc-code-powerpc.c Mon Jun 07 03:33:01 2004 +0900 +++ b/mc-code-powerpc.c Mon Jun 07 17:55:37 2004 +0900 @@ -4783,39 +4783,53 @@ code_table_jump_p() { return 1; } void -code_table_jump(int l,int csvalue,int delta,int max,int min) +code_table_jump(int l,int csvalue,int delta,int max,int min,int dlabel) { - int t,s,c0; - char *crn = register_name(csvalue); + int t,s,u=-1; + char *crn = register_name(csvalue); // can be t,s,u char *trn = register_name(t=get_register()); char *srn = register_name(s=get_register()); + char *urn; inc_cmpflag(); if (min>32767||min<-32765) { - code_const(min,t); - printf("\tsub\t%s,%s,%s\n",trn,crn,trn); + if (t==csvalue) { + code_const(min,s); + printf("\tsub\t%s,%s,%s\n",trn,crn,srn); + } else { + code_const(min,t); + printf("\tsub\t%s,%s,%s\n",trn,crn,trn); + } } else { printf("\taddi\t%s,%s,lo16(%d)\n",trn,crn,-min); } - printf("\tcmpwi cr%d,%s,0\n",c0=cmpflag,trn); + printf("\tcmplwi cr%d,%s,%d\n",cmpflag,trn,max-min); + printf("\tbgt-\tcr%d,L_%d\n",cmpflag,dlabel); inc_cmpflag(); - printf("\tcmpwi cr%d,%s,%d\n",cmpflag,trn,max-min); - printf("\tblt\tcr%d,1f\n",c0); - printf("\tbgt\tcr%d,1f\n",cmpflag); switch(delta) { case 1: printf("\tslwi %s,%s,2\n",trn,trn); break; - case 2: printf("\tslwi %s,%s,1\n",trn,trn); - case 4: break; + case 2: + printf("\tli %s,1\n",srn); + printf("\tand %s,%s,%s\n",srn,srn,trn); + printf("\tcmplwi cr%d,%s,0\n",cmpflag,srn); + printf("\tbne\tcr%d,L_%d\n",cmpflag,dlabel); + printf("\tslwi %s,%s,1\n",trn,trn); + break; + case 4: + printf("\tli %s,3\n",srn); + printf("\tand %s,%s,%s\n",srn,srn,trn); + printf("\tcmplwi cr%d,%s,0\n",cmpflag,srn); + printf("\tbne\tcr%d,L_%d\n",cmpflag,dlabel); + break; default: - srn = register_name(s=get_register()); - if (delta%4==0) { - printf("\tli %s,%d\n",srn,delta/4); - printf("\tdivwu %s,%s,%s\n",trn,trn,srn); - } else { - printf("\tli %s,%d\n",srn,delta); - printf("\tdivwu %s,%s,%s\n",trn,trn,srn); - printf("\tslwi %s,%s,2\n",trn,trn); - } + urn = register_name(u=get_register()); + printf("\tli %s,%d\n",srn,delta); + printf("\tdivwu %s,%s,%s\n",urn,trn,srn); + printf("\tmullw %s,%s,%s\n",srn,urn,srn); + printf("\tsubf %s,%s,%s\n",srn,trn,srn); + printf("\tcmplwi cr%d,%s,0\n",cmpflag,srn); + printf("\tbne\tcr%d,L_%d\n",cmpflag,dlabel); + printf("\tslwi %s,%s,2\n",trn,urn); } printf("\taddis %s,r31,ha16(L_%d-L_%d)\n", srn,l,code_base); @@ -4829,6 +4843,7 @@ free_register(s); free_register(t); + if (u!=-1) free_register(u); } void @@ -4847,7 +4862,6 @@ void code_table_close() { - printf("1:\n"); } #endif
--- a/mc-code.h Mon Jun 07 03:33:01 2004 +0900 +++ b/mc-code.h Mon Jun 07 17:55:37 2004 +0900 @@ -213,7 +213,7 @@ #if CASE_CODE extern int code_table_jump_p(); -extern void code_table_jump(int table,int csvalue,int delta,int max,int min); +extern void code_table_jump(int table,int csvalue,int delta,int max,int min,int dlabel); extern void code_table_open(int table); extern void code_table_value(int label,int table); extern void code_table_close();
--- a/mc-switch.c Mon Jun 07 03:33:01 2004 +0900 +++ b/mc-switch.c Mon Jun 07 17:55:37 2004 +0900 @@ -28,7 +28,7 @@ #define index_label(index) car(index) #define CASE_TABLE_COUNT 10 -#define CASE_INDEX_COUNT 10 +#define CASE_INDEX_COUNT CASE_TABLE_COUNT // have to be equal /* @@ -156,6 +156,7 @@ // value register label mode } } + // have to be fall thru return cslist; } @@ -177,7 +178,8 @@ count,delta,max,min); l = fwdlabel(); - code_table_jump(l,csvalue1,delta,max,min); + code_table_jump(l,csvalue1,delta,max,min,dlabel); + control=0; code_table_open(l); i = min; for(;count-->0;chunks=cadr(chunks)) { @@ -227,7 +229,7 @@ return 0; } if (count!= -1) error(-1); - if (control&&dlabel) jmp(dlabel); + jmp(dlabel); return index; } @@ -262,7 +264,6 @@ } switch_make_index(reverse0(index),icount,cslabel,gmax,level+1); } - if (control&&dlabel) jmp(dlabel); } /* @@ -276,12 +277,14 @@ for(;count-- !=0 && merge;merge=cadr(merge)) { printf("# merge count %d delta %d c_count %d\n", car(merge),caddr(merge),cadddr(merge)); - if (cadddr(merge)>CASE_TABLE_COUNT) + if (cadddr(merge)>CASE_TABLE_COUNT) { chunks = table_jump(car(merge),caddr(merge),chunks); - else + } else { chunks = cascade_compare(car(merge),chunks); + } } - if (control&&dlabel) jmp(dlabel); + // table_jump has no fall thru, but cascade_compare does. + if (control) jmp(dlabel); return chunks; }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/switch.c Mon Jun 07 17:55:37 2004 +0900 @@ -0,0 +1,1225 @@ +main(int ac,char *av[]) +{ + int i; + for(i=-1000;i<3000;i++) { + main1(i); + main2(i); + main3(i); + main4(i); + } +} + +main1(int i) +{ + switch(i) { +case 19: printf("case 1 19\n"); break; +case 20: printf("case 1 20\n"); break; +case 21: printf("case 1 21\n"); break; +case 22: printf("case 1 22\n"); break; +case 23: printf("case 1 23\n"); break; +case 24: printf("case 1 24\n"); break; +case 25: printf("case 1 25\n"); break; +case 26: printf("case 1 26\n"); break; +case 27: printf("case 1 27\n"); break; +case 28: printf("case 1 28\n"); break; +case 29: printf("case 1 29\n"); break; +case 30: printf("case 1 30\n"); break; +case 31: printf("case 1 31\n"); break; +case 32: printf("case 1 32\n"); break; +case 33: printf("case 1 33\n"); break; +case 34: printf("case 1 34\n"); break; +case 35: printf("case 1 35\n"); break; +case 36: printf("case 1 36\n"); break; +case 37: printf("case 1 37\n"); break; +case 38: printf("case 1 38\n"); break; +case 39: printf("case 1 39\n"); break; +case 40: printf("case 1 40\n"); break; +case 41: printf("case 1 41\n"); break; +case 42: printf("case 1 42\n"); break; +case 43: printf("case 1 43\n"); break; +case 44: printf("case 1 44\n"); break; +case 45: printf("case 1 45\n"); break; +case 46: printf("case 1 46\n"); break; +case 47: printf("case 1 47\n"); break; +case 48: printf("case 1 48\n"); break; +case 49: printf("case 1 49\n"); break; +case 50: printf("case 1 50\n"); break; +case 51: printf("case 1 51\n"); break; +case 52: printf("case 1 52\n"); break; +case 53: printf("case 1 53\n"); break; +case 54: printf("case 1 54\n"); break; +case 55: printf("case 1 55\n"); break; +case 56: printf("case 1 56\n"); break; +case 57: printf("case 1 57\n"); break; +case 58: printf("case 1 58\n"); break; +case 59: printf("case 1 59\n"); break; +case 60: printf("case 1 60\n"); break; +case 61: printf("case 1 61\n"); break; +case 62: printf("case 1 62\n"); break; +case 63: printf("case 1 63\n"); break; +case 64: printf("case 1 64\n"); break; +case 65: printf("case 1 65\n"); break; +case 66: printf("case 1 66\n"); break; +case 67: printf("case 1 67\n"); break; +case 68: printf("case 1 68\n"); break; +case 69: printf("case 1 69\n"); break; +case 70: printf("case 1 70\n"); break; +case 71: printf("case 1 71\n"); break; +case 72: printf("case 1 72\n"); break; +case 73: printf("case 1 73\n"); break; +case 74: printf("case 1 74\n"); break; +case 75: printf("case 1 75\n"); break; +case 76: printf("case 1 76\n"); break; +case 77: printf("case 1 77\n"); break; +case 78: printf("case 1 78\n"); break; +case 79: printf("case 1 79\n"); break; +case 80: printf("case 1 80\n"); break; +case 81: printf("case 1 81\n"); break; +case 82: printf("case 1 82\n"); break; +case 83: printf("case 1 83\n"); break; +case 84: printf("case 1 84\n"); break; +case 85: printf("case 1 85\n"); break; +case 86: printf("case 1 86\n"); break; +case 87: printf("case 1 87\n"); break; +case 88: printf("case 1 88\n"); break; +case 89: printf("case 1 89\n"); break; +case 90: printf("case 1 90\n"); break; +case 91: printf("case 1 91\n"); break; +case 92: printf("case 1 92\n"); break; +case 93: printf("case 1 93\n"); break; +case 94: printf("case 1 94\n"); break; +case 95: printf("case 1 95\n"); break; +case 96: printf("case 1 96\n"); break; +case 97: printf("case 1 97\n"); break; +case 98: printf("case 1 98\n"); break; +case 99: printf("case 1 99\n"); break; +case 100: printf("case 1 100\n"); break; +case 101: printf("case 1 101\n"); break; +case 102: printf("case 1 102\n"); break; +case 103: printf("case 1 103\n"); break; +case 104: printf("case 1 104\n"); break; +case 105: printf("case 1 105\n"); break; +case 106: printf("case 1 106\n"); break; +case 107: printf("case 1 107\n"); break; +case 108: printf("case 1 108\n"); break; +case 109: printf("case 1 109\n"); break; +case 110: printf("case 1 110\n"); break; +case 111: printf("case 1 111\n"); break; +case 112: printf("case 1 112\n"); break; +case 113: printf("case 1 113\n"); break; +case 114: printf("case 1 114\n"); break; +case 115: printf("case 1 115\n"); break; +case 116: printf("case 1 116\n"); break; +case 117: printf("case 1 117\n"); break; +case 118: printf("case 1 118\n"); break; +case 119: printf("case 1 119\n"); break; +case 120: printf("case 1 120\n"); break; +case 121: printf("case 1 121\n"); break; +case 122: printf("case 1 122\n"); break; +case 123: printf("case 1 123\n"); break; +case 124: printf("case 1 124\n"); break; +case 125: printf("case 1 125\n"); break; +case 126: printf("case 1 126\n"); break; +case 127: printf("case 1 127\n"); break; +case 128: printf("case 1 128\n"); break; +case 129: printf("case 1 129\n"); break; +case 130: printf("case 1 130\n"); break; +case 131: printf("case 1 131\n"); break; +case 132: printf("case 1 132\n"); break; +case 133: printf("case 1 133\n"); break; +case 134: printf("case 1 134\n"); break; +case 135: printf("case 1 135\n"); break; +case 136: printf("case 1 136\n"); break; +case 137: printf("case 1 137\n"); break; +case 138: printf("case 1 138\n"); break; +case 139: printf("case 1 139\n"); break; +case 140: printf("case 1 140\n"); break; +case 141: printf("case 1 141\n"); break; +case 142: printf("case 1 142\n"); break; +case 143: printf("case 1 143\n"); break; +case 144: printf("case 1 144\n"); break; +case 145: printf("case 1 145\n"); break; +case 146: printf("case 1 146\n"); break; +case 147: printf("case 1 147\n"); break; +case 148: printf("case 1 148\n"); break; +case 149: printf("case 1 149\n"); break; +case 150: printf("case 1 150\n"); break; +case 151: printf("case 1 151\n"); break; +case 152: printf("case 1 152\n"); break; +case 153: printf("case 1 153\n"); break; +case 154: printf("case 1 154\n"); break; +case 155: printf("case 1 155\n"); break; +case 156: printf("case 1 156\n"); break; +case 157: printf("case 1 157\n"); break; +case 158: printf("case 1 158\n"); break; +case 159: printf("case 1 159\n"); break; +case 160: printf("case 1 160\n"); break; +case 161: printf("case 1 161\n"); break; +case 162: printf("case 1 162\n"); break; +case 163: printf("case 1 163\n"); break; +case 164: printf("case 1 164\n"); break; +case 165: printf("case 1 165\n"); break; +case 166: printf("case 1 166\n"); break; +case 167: printf("case 1 167\n"); break; +case 168: printf("case 1 168\n"); break; +case 169: printf("case 1 169\n"); break; +case 170: printf("case 1 170\n"); break; +case 171: printf("case 1 171\n"); break; +case 172: printf("case 1 172\n"); break; +case 173: printf("case 1 173\n"); break; +case 174: printf("case 1 174\n"); break; +case 175: printf("case 1 175\n"); break; +case 176: printf("case 1 176\n"); break; +case 177: printf("case 1 177\n"); break; +case 178: printf("case 1 178\n"); break; +case 179: printf("case 1 179\n"); break; +case 180: printf("case 1 180\n"); break; +case 181: printf("case 1 181\n"); break; +case 182: printf("case 1 182\n"); break; +case 183: printf("case 1 183\n"); break; +case 184: printf("case 1 184\n"); break; +case 185: printf("case 1 185\n"); break; +case 186: printf("case 1 186\n"); break; +case 187: printf("case 1 187\n"); break; +case 188: printf("case 1 188\n"); break; +case 189: printf("case 1 189\n"); break; +case 190: printf("case 1 190\n"); break; +case 191: printf("case 1 191\n"); break; +case 192: printf("case 1 192\n"); break; +case 193: printf("case 1 193\n"); break; +case 194: printf("case 1 194\n"); break; +case 195: printf("case 1 195\n"); break; +case 196: printf("case 1 196\n"); break; +case 197: printf("case 1 197\n"); break; +case 198: printf("case 1 198\n"); break; +case 199: printf("case 1 199\n"); break; +case 200: printf("case 1 200\n"); break; +case 201: printf("case 1 201\n"); break; +case 202: printf("case 1 202\n"); break; +case 203: printf("case 1 203\n"); break; +case 204: printf("case 1 204\n"); break; +case 205: printf("case 1 205\n"); break; +case 206: printf("case 1 206\n"); break; +case 207: printf("case 1 207\n"); break; +case 208: printf("case 1 208\n"); break; +case 209: printf("case 1 209\n"); break; +case 210: printf("case 1 210\n"); break; +case 211: printf("case 1 211\n"); break; +case 212: printf("case 1 212\n"); break; +case 213: printf("case 1 213\n"); break; +case 214: printf("case 1 214\n"); break; +case 215: printf("case 1 215\n"); break; +case 216: printf("case 1 216\n"); break; +case 217: printf("case 1 217\n"); break; +case 218: printf("case 1 218\n"); break; +case 219: printf("case 1 219\n"); break; +case 220: printf("case 1 220\n"); break; +case 221: printf("case 1 221\n"); break; +case 222: printf("case 1 222\n"); break; +case 223: printf("case 1 223\n"); break; +case 224: printf("case 1 224\n"); break; +case 225: printf("case 1 225\n"); break; +case 226: printf("case 1 226\n"); break; +case 227: printf("case 1 227\n"); break; +case 228: printf("case 1 228\n"); break; +case 229: printf("case 1 229\n"); break; +case 230: printf("case 1 230\n"); break; +case 231: printf("case 1 231\n"); break; +case 232: printf("case 1 232\n"); break; +case 233: printf("case 1 233\n"); break; +case 234: printf("case 1 234\n"); break; +case 235: printf("case 1 235\n"); break; +case 236: printf("case 1 236\n"); break; +case 237: printf("case 1 237\n"); break; +case 238: printf("case 1 238\n"); break; +case 239: printf("case 1 239\n"); break; +case 240: printf("case 1 240\n"); break; +case 241: printf("case 1 241\n"); break; +case 242: printf("case 1 242\n"); break; +case 243: printf("case 1 243\n"); break; +case 244: printf("case 1 244\n"); break; +case 245: printf("case 1 245\n"); break; +case 246: printf("case 1 246\n"); break; +case 247: printf("case 1 247\n"); break; +case 248: printf("case 1 248\n"); break; +case 249: printf("case 1 249\n"); break; +case 250: printf("case 1 250\n"); break; +case 251: printf("case 1 251\n"); break; +case 252: printf("case 1 252\n"); break; +case 253: printf("case 1 253\n"); break; +case 254: printf("case 1 254\n"); break; +case 255: printf("case 1 255\n"); break; +case 256: printf("case 1 256\n"); break; +case 257: printf("case 1 257\n"); break; +case 258: printf("case 1 258\n"); break; +case 259: printf("case 1 259\n"); break; +case 260: printf("case 1 260\n"); break; +case 261: printf("case 1 261\n"); break; +case 262: printf("case 1 262\n"); break; +case 263: printf("case 1 263\n"); break; +case 264: printf("case 1 264\n"); break; +case 265: printf("case 1 265\n"); break; +case 266: printf("case 1 266\n"); break; +case 267: printf("case 1 267\n"); break; +case 268: printf("case 1 268\n"); break; +case 269: printf("case 1 269\n"); break; +case 270: printf("case 1 270\n"); break; +case 271: printf("case 1 271\n"); break; +case 272: printf("case 1 272\n"); break; +case 273: printf("case 1 273\n"); break; +case 274: printf("case 1 274\n"); break; +case 275: printf("case 1 275\n"); break; +case 276: printf("case 1 276\n"); break; +case 277: printf("case 1 277\n"); break; +case 278: printf("case 1 278\n"); break; +case 279: printf("case 1 279\n"); break; +case 280: printf("case 1 280\n"); break; +case 281: printf("case 1 281\n"); break; +case 282: printf("case 1 282\n"); break; +case 283: printf("case 1 283\n"); break; +case 284: printf("case 1 284\n"); break; +case 285: printf("case 1 285\n"); break; +case 286: printf("case 1 286\n"); break; +case 287: printf("case 1 287\n"); break; +case 288: printf("case 1 288\n"); break; +case 289: printf("case 1 289\n"); break; +case 290: printf("case 1 290\n"); break; +case 291: printf("case 1 291\n"); break; +case 292: printf("case 1 292\n"); break; +case 293: printf("case 1 293\n"); break; +case 294: printf("case 1 294\n"); break; +case 295: printf("case 1 295\n"); break; +case 296: printf("case 1 296\n"); break; +case 297: printf("case 1 297\n"); break; +case 298: printf("case 1 298\n"); break; +case 299: printf("case 1 299\n"); break; +case 300: printf("case 1 300\n"); break; +case 301: printf("case 1 301\n"); break; +case 302: printf("case 1 302\n"); break; +case 303: printf("case 1 303\n"); break; +case 304: printf("case 1 304\n"); break; +case 305: printf("case 1 305\n"); break; +case 306: printf("case 1 306\n"); break; +case 307: printf("case 1 307\n"); break; +case 308: printf("case 1 308\n"); break; +case 309: printf("case 1 309\n"); break; +case 310: printf("case 1 310\n"); break; +case 311: printf("case 1 311\n"); break; +case 312: printf("case 1 312\n"); break; +case 313: printf("case 1 313\n"); break; +case 314: printf("case 1 314\n"); break; +case 315: printf("case 1 315\n"); break; +case 316: printf("case 1 316\n"); break; +case 317: printf("case 1 317\n"); break; +case 318: printf("case 1 318\n"); break; +case 319: printf("case 1 319\n"); break; +case 320: printf("case 1 320\n"); break; +case 321: printf("case 1 321\n"); break; +case 322: printf("case 1 322\n"); break; +case 323: printf("case 1 323\n"); break; +case 324: printf("case 1 324\n"); break; +case 325: printf("case 1 325\n"); break; +case 326: printf("case 1 326\n"); break; +case 327: printf("case 1 327\n"); break; +case 328: printf("case 1 328\n"); break; +case 329: printf("case 1 329\n"); break; +case 330: printf("case 1 330\n"); break; +case 331: printf("case 1 331\n"); break; +case 332: printf("case 1 332\n"); break; +case 333: printf("case 1 333\n"); break; +case 334: printf("case 1 334\n"); break; +case 335: printf("case 1 335\n"); break; +case 336: printf("case 1 336\n"); break; +case 337: printf("case 1 337\n"); break; +case 338: printf("case 1 338\n"); break; +case 339: printf("case 1 339\n"); break; +case 340: printf("case 1 340\n"); break; +case 341: printf("case 1 341\n"); break; +case 342: printf("case 1 342\n"); break; +case 343: printf("case 1 343\n"); break; +case 344: printf("case 1 344\n"); break; +case 345: printf("case 1 345\n"); break; +case 346: printf("case 1 346\n"); break; +case 347: printf("case 1 347\n"); break; +case 348: printf("case 1 348\n"); break; +case 349: printf("case 1 349\n"); break; +case 350: printf("case 1 350\n"); break; +case 351: printf("case 1 351\n"); break; +case 352: printf("case 1 352\n"); break; +case 353: printf("case 1 353\n"); break; +case 354: printf("case 1 354\n"); break; +case 355: printf("case 1 355\n"); break; +case 356: printf("case 1 356\n"); break; +case 357: printf("case 1 357\n"); break; +case 358: printf("case 1 358\n"); break; +case 359: printf("case 1 359\n"); break; +case 360: printf("case 1 360\n"); break; +case 361: printf("case 1 361\n"); break; +case 362: printf("case 1 362\n"); break; +case 363: printf("case 1 363\n"); break; +case 364: printf("case 1 364\n"); break; +case 365: printf("case 1 365\n"); break; +case 366: printf("case 1 366\n"); break; +case 367: printf("case 1 367\n"); break; +case 368: printf("case 1 368\n"); break; +case 369: printf("case 1 369\n"); break; +case 370: printf("case 1 370\n"); break; +case 371: printf("case 1 371\n"); break; +case 372: printf("case 1 372\n"); break; +case 373: printf("case 1 373\n"); break; +case 374: printf("case 1 374\n"); break; +case 375: printf("case 1 375\n"); break; +case 376: printf("case 1 376\n"); break; +case 377: printf("case 1 377\n"); break; +case 378: printf("case 1 378\n"); break; +case 379: printf("case 1 379\n"); break; +case 380: printf("case 1 380\n"); break; +case 381: printf("case 1 381\n"); break; +case 382: printf("case 1 382\n"); break; +case 383: printf("case 1 383\n"); break; +case 384: printf("case 1 384\n"); break; +case 385: printf("case 1 385\n"); break; +case 386: printf("case 1 386\n"); break; +case 387: printf("case 1 387\n"); break; +case 388: printf("case 1 388\n"); break; +case 389: printf("case 1 389\n"); break; +case 390: printf("case 1 390\n"); break; +case 391: printf("case 1 391\n"); break; +case 392: printf("case 1 392\n"); break; +case 393: printf("case 1 393\n"); break; +case 394: printf("case 1 394\n"); break; +case 395: printf("case 1 395\n"); break; +case 396: printf("case 1 396\n"); break; +case 397: printf("case 1 397\n"); break; +case 398: printf("case 1 398\n"); break; +case 399: printf("case 1 399\n"); break; + } +} + +main2(int i) +{ + switch(i) { +case -205: printf("case 2 -205\n"); break; +case -195: printf("case 2 -195\n"); break; +case -185: printf("case 2 -185\n"); break; +case -175: printf("case 2 -175\n"); break; +case -165: printf("case 2 -165\n"); break; +case -155: printf("case 2 -155\n"); break; +case -145: printf("case 2 -145\n"); break; +case -135: printf("case 2 -135\n"); break; +case -125: printf("case 2 -125\n"); break; +case -115: printf("case 2 -115\n"); break; +case -105: printf("case 2 -105\n"); break; +case -95: printf("case 2 -95\n"); break; +case -85: printf("case 2 -85\n"); break; +case -75: printf("case 2 -75\n"); break; +case -65: printf("case 2 -65\n"); break; +case -55: printf("case 2 -55\n"); break; +case -45: printf("case 2 -45\n"); break; +case -35: printf("case 2 -35\n"); break; +case -25: printf("case 2 -25\n"); break; +case -15: printf("case 2 -15\n"); break; +case -5: printf("case 2 -5\n"); break; +case 5: printf("case 2 5\n"); break; +case 15: printf("case 2 15\n"); break; +case 25: printf("case 2 25\n"); break; +case 35: printf("case 2 35\n"); break; +case 45: printf("case 2 45\n"); break; +case 55: printf("case 2 55\n"); break; +case 65: printf("case 2 65\n"); break; +case 75: printf("case 2 75\n"); break; +case 85: printf("case 2 85\n"); break; +case 95: printf("case 2 95\n"); break; +case 105: printf("case 2 105\n"); break; +case 115: printf("case 2 115\n"); break; +case 125: printf("case 2 125\n"); break; +case 135: printf("case 2 135\n"); break; +case 145: printf("case 2 145\n"); break; +case 155: printf("case 2 155\n"); break; +case 165: printf("case 2 165\n"); break; +case 175: printf("case 2 175\n"); break; +case 185: printf("case 2 185\n"); break; +case 195: printf("case 2 195\n"); break; +case 205: printf("case 2 205\n"); break; +case 215: printf("case 2 215\n"); break; +case 225: printf("case 2 225\n"); break; +case 235: printf("case 2 235\n"); break; +case 245: printf("case 2 245\n"); break; +case 255: printf("case 2 255\n"); break; +case 265: printf("case 2 265\n"); break; +case 275: printf("case 2 275\n"); break; +case 285: printf("case 2 285\n"); break; +case 295: printf("case 2 295\n"); break; +case 305: printf("case 2 305\n"); break; +case 315: printf("case 2 315\n"); break; +case 325: printf("case 2 325\n"); break; +case 335: printf("case 2 335\n"); break; +case 345: printf("case 2 345\n"); break; +case 355: printf("case 2 355\n"); break; +case 365: printf("case 2 365\n"); break; +case 375: printf("case 2 375\n"); break; +case 385: printf("case 2 385\n"); break; +case 395: printf("case 2 395\n"); break; +case 405: printf("case 2 405\n"); break; +case 415: printf("case 2 415\n"); break; +case 425: printf("case 2 425\n"); break; +case 435: printf("case 2 435\n"); break; +case 445: printf("case 2 445\n"); break; +case 455: printf("case 2 455\n"); break; +case 465: printf("case 2 465\n"); break; +case 475: printf("case 2 475\n"); break; +case 485: printf("case 2 485\n"); break; +case 495: printf("case 2 495\n"); break; +case 505: printf("case 2 505\n"); break; +case 515: printf("case 2 515\n"); break; +case 525: printf("case 2 525\n"); break; +case 535: printf("case 2 535\n"); break; +case 545: printf("case 2 545\n"); break; +case 555: printf("case 2 555\n"); break; +case 565: printf("case 2 565\n"); break; +case 575: printf("case 2 575\n"); break; +case 585: printf("case 2 585\n"); break; +case 595: printf("case 2 595\n"); break; +case 605: printf("case 2 605\n"); break; +case 615: printf("case 2 615\n"); break; +case 625: printf("case 2 625\n"); break; +case 635: printf("case 2 635\n"); break; +case 645: printf("case 2 645\n"); break; +case 655: printf("case 2 655\n"); break; +case 665: printf("case 2 665\n"); break; +case 675: printf("case 2 675\n"); break; +case 685: printf("case 2 685\n"); break; +case 695: printf("case 2 695\n"); break; +case 705: printf("case 2 705\n"); break; +case 715: printf("case 2 715\n"); break; +case 725: printf("case 2 725\n"); break; +case 735: printf("case 2 735\n"); break; +case 745: printf("case 2 745\n"); break; +case 755: printf("case 2 755\n"); break; +case 765: printf("case 2 765\n"); break; +case 775: printf("case 2 775\n"); break; +case 785: printf("case 2 785\n"); break; +case 795: printf("case 2 795\n"); break; +case 805: printf("case 2 805\n"); break; +case 815: printf("case 2 815\n"); break; +case 825: printf("case 2 825\n"); break; +case 835: printf("case 2 835\n"); break; +case 845: printf("case 2 845\n"); break; +case 855: printf("case 2 855\n"); break; +case 865: printf("case 2 865\n"); break; +case 875: printf("case 2 875\n"); break; +case 885: printf("case 2 885\n"); break; +case 895: printf("case 2 895\n"); break; +case 905: printf("case 2 905\n"); break; +case 915: printf("case 2 915\n"); break; +case 925: printf("case 2 925\n"); break; +case 935: printf("case 2 935\n"); break; +case 945: printf("case 2 945\n"); break; +case 955: printf("case 2 955\n"); break; +case 965: printf("case 2 965\n"); break; +case 975: printf("case 2 975\n"); break; +case 985: printf("case 2 985\n"); break; +case 995: printf("case 2 995\n"); break; +case 1005: printf("case 2 1005\n"); break; +case 1015: printf("case 2 1015\n"); break; +case 1025: printf("case 2 1025\n"); break; +case 1035: printf("case 2 1035\n"); break; +case 1045: printf("case 2 1045\n"); break; +case 1055: printf("case 2 1055\n"); break; +case 1065: printf("case 2 1065\n"); break; +case 1075: printf("case 2 1075\n"); break; +case 1085: printf("case 2 1085\n"); break; +case 1095: printf("case 2 1095\n"); break; +case 1105: printf("case 2 1105\n"); break; +case 1115: printf("case 2 1115\n"); break; +case 1125: printf("case 2 1125\n"); break; +case 1135: printf("case 2 1135\n"); break; +case 1145: printf("case 2 1145\n"); break; +case 1155: printf("case 2 1155\n"); break; +case 1165: printf("case 2 1165\n"); break; +case 1175: printf("case 2 1175\n"); break; +case 1185: printf("case 2 1185\n"); break; +case 1195: printf("case 2 1195\n"); break; +case 1205: printf("case 2 1205\n"); break; +case 1215: printf("case 2 1215\n"); break; +case 1225: printf("case 2 1225\n"); break; +case 1235: printf("case 2 1235\n"); break; +case 1245: printf("case 2 1245\n"); break; +case 1255: printf("case 2 1255\n"); break; +case 1265: printf("case 2 1265\n"); break; +case 1275: printf("case 2 1275\n"); break; +case 1285: printf("case 2 1285\n"); break; +case 1295: printf("case 2 1295\n"); break; +case 1305: printf("case 2 1305\n"); break; +case 1315: printf("case 2 1315\n"); break; +case 1325: printf("case 2 1325\n"); break; +case 1335: printf("case 2 1335\n"); break; +case 1345: printf("case 2 1345\n"); break; +case 1355: printf("case 2 1355\n"); break; +case 1365: printf("case 2 1365\n"); break; +case 1375: printf("case 2 1375\n"); break; +case 1385: printf("case 2 1385\n"); break; +case 1395: printf("case 2 1395\n"); break; +case 1405: printf("case 2 1405\n"); break; +case 1415: printf("case 2 1415\n"); break; +case 1425: printf("case 2 1425\n"); break; +case 1435: printf("case 2 1435\n"); break; +case 1445: printf("case 2 1445\n"); break; +case 1455: printf("case 2 1455\n"); break; +case 1465: printf("case 2 1465\n"); break; +case 1475: printf("case 2 1475\n"); break; +case 1485: printf("case 2 1485\n"); break; +case 1495: printf("case 2 1495\n"); break; +case 1505: printf("case 2 1505\n"); break; +case 1515: printf("case 2 1515\n"); break; +case 1525: printf("case 2 1525\n"); break; +case 1535: printf("case 2 1535\n"); break; +case 1545: printf("case 2 1545\n"); break; +case 1555: printf("case 2 1555\n"); break; +case 1565: printf("case 2 1565\n"); break; +case 1575: printf("case 2 1575\n"); break; +case 1585: printf("case 2 1585\n"); break; +case 1595: printf("case 2 1595\n"); break; +case 1605: printf("case 2 1605\n"); break; +case 1615: printf("case 2 1615\n"); break; +case 1625: printf("case 2 1625\n"); break; +case 1635: printf("case 2 1635\n"); break; +case 1645: printf("case 2 1645\n"); break; +case 1655: printf("case 2 1655\n"); break; +case 1665: printf("case 2 1665\n"); break; +case 1675: printf("case 2 1675\n"); break; +case 1685: printf("case 2 1685\n"); break; +case 1695: printf("case 2 1695\n"); break; +case 1705: printf("case 2 1705\n"); break; +case 1715: printf("case 2 1715\n"); break; +case 1725: printf("case 2 1725\n"); break; +case 1735: printf("case 2 1735\n"); break; +case 1745: printf("case 2 1745\n"); break; +case 1755: printf("case 2 1755\n"); break; +case 1765: printf("case 2 1765\n"); break; +case 1775: printf("case 2 1775\n"); break; +case 1785: printf("case 2 1785\n"); break; +case 1795: printf("case 2 1795\n"); break; +case 1805: printf("case 2 1805\n"); break; +case 1815: printf("case 2 1815\n"); break; +case 1825: printf("case 2 1825\n"); break; +case 1835: printf("case 2 1835\n"); break; +case 1845: printf("case 2 1845\n"); break; +case 1855: printf("case 2 1855\n"); break; +case 1865: printf("case 2 1865\n"); break; +case 1875: printf("case 2 1875\n"); break; +case 1885: printf("case 2 1885\n"); break; +case 1895: printf("case 2 1895\n"); break; +case 1905: printf("case 2 1905\n"); break; +case 1915: printf("case 2 1915\n"); break; +case 1925: printf("case 2 1925\n"); break; +case 1935: printf("case 2 1935\n"); break; +case 1945: printf("case 2 1945\n"); break; +case 1955: printf("case 2 1955\n"); break; +case 1965: printf("case 2 1965\n"); break; +case 1975: printf("case 2 1975\n"); break; +case 1985: printf("case 2 1985\n"); break; +case 1995: printf("case 2 1995\n"); break; +case 2005: printf("case 2 2005\n"); break; +case 2015: printf("case 2 2015\n"); break; +case 2025: printf("case 2 2025\n"); break; +case 2035: printf("case 2 2035\n"); break; +case 2045: printf("case 2 2045\n"); break; +case 2055: printf("case 2 2055\n"); break; +case 2065: printf("case 2 2065\n"); break; +case 2075: printf("case 2 2075\n"); break; +case 2085: printf("case 2 2085\n"); break; +case 2095: printf("case 2 2095\n"); break; +case 2105: printf("case 2 2105\n"); break; +case 2115: printf("case 2 2115\n"); break; +case 2125: printf("case 2 2125\n"); break; +case 2135: printf("case 2 2135\n"); break; +case 2145: printf("case 2 2145\n"); break; +case 2155: printf("case 2 2155\n"); break; +case 2165: printf("case 2 2165\n"); break; +case 2175: printf("case 2 2175\n"); break; +case 2185: printf("case 2 2185\n"); break; +case 2195: printf("case 2 2195\n"); break; +case 2205: printf("case 2 2205\n"); break; +case 2215: printf("case 2 2215\n"); break; +case 2225: printf("case 2 2225\n"); break; +case 2235: printf("case 2 2235\n"); break; +case 2245: printf("case 2 2245\n"); break; +case 2255: printf("case 2 2255\n"); break; +case 2265: printf("case 2 2265\n"); break; +case 2275: printf("case 2 2275\n"); break; +case 2285: printf("case 2 2285\n"); break; +case 2295: printf("case 2 2295\n"); break; +case 2305: printf("case 2 2305\n"); break; +case 2315: printf("case 2 2315\n"); break; +case 2325: printf("case 2 2325\n"); break; +case 2335: printf("case 2 2335\n"); break; +case 2345: printf("case 2 2345\n"); break; +case 2355: printf("case 2 2355\n"); break; +case 2365: printf("case 2 2365\n"); break; +case 2375: printf("case 2 2375\n"); break; +case 2385: printf("case 2 2385\n"); break; +case 2395: printf("case 2 2395\n"); break; +case 2405: printf("case 2 2405\n"); break; +case 2415: printf("case 2 2415\n"); break; +case 2425: printf("case 2 2425\n"); break; +case 2435: printf("case 2 2435\n"); break; +case 2445: printf("case 2 2445\n"); break; +case 2455: printf("case 2 2455\n"); break; +case 2465: printf("case 2 2465\n"); break; +case 2475: printf("case 2 2475\n"); break; +case 2485: printf("case 2 2485\n"); break; +case 2495: printf("case 2 2495\n"); break; +case 2505: printf("case 2 2505\n"); break; +case 2515: printf("case 2 2515\n"); break; +case 2525: printf("case 2 2525\n"); break; +case 2535: printf("case 2 2535\n"); break; +case 2545: printf("case 2 2545\n"); break; +case 2555: printf("case 2 2555\n"); break; +case 2565: printf("case 2 2565\n"); break; +case 2575: printf("case 2 2575\n"); break; +case 2585: printf("case 2 2585\n"); break; +case 2595: printf("case 2 2595\n"); break; +case 2605: printf("case 2 2605\n"); break; +case 2615: printf("case 2 2615\n"); break; +case 2625: printf("case 2 2625\n"); break; +case 2635: printf("case 2 2635\n"); break; +case 2645: printf("case 2 2645\n"); break; +case 2655: printf("case 2 2655\n"); break; +case 2665: printf("case 2 2665\n"); break; +case 2675: printf("case 2 2675\n"); break; +case 2685: printf("case 2 2685\n"); break; +case 2695: printf("case 2 2695\n"); break; +case 2705: printf("case 2 2705\n"); break; +case 2715: printf("case 2 2715\n"); break; +case 2725: printf("case 2 2725\n"); break; +case 2735: printf("case 2 2735\n"); break; +case 2745: printf("case 2 2745\n"); break; +case 2755: printf("case 2 2755\n"); break; +case 2765: printf("case 2 2765\n"); break; +case 2775: printf("case 2 2775\n"); break; +case 2785: printf("case 2 2785\n"); break; +case 2795: printf("case 2 2795\n"); break; +case 2805: printf("case 2 2805\n"); break; +case 2815: printf("case 2 2815\n"); break; +case 2825: printf("case 2 2825\n"); break; +case 2835: printf("case 2 2835\n"); break; +case 2845: printf("case 2 2845\n"); break; +case 2855: printf("case 2 2855\n"); break; +case 2865: printf("case 2 2865\n"); break; +case 2875: printf("case 2 2875\n"); break; +case 2885: printf("case 2 2885\n"); break; +case 2895: printf("case 2 2895\n"); break; +case 2905: printf("case 2 2905\n"); break; +case 2915: printf("case 2 2915\n"); break; +case 2925: printf("case 2 2925\n"); break; +case 2935: printf("case 2 2935\n"); break; +case 2945: printf("case 2 2945\n"); break; +case 2955: printf("case 2 2955\n"); break; +case 2965: printf("case 2 2965\n"); break; +case 2975: printf("case 2 2975\n"); break; +case 2985: printf("case 2 2985\n"); break; +case 2995: printf("case 2 2995\n"); break; +default: printf("default 2 %d\n",i); break; + } +} + +main3(int i) +{ + switch(i) { +case -223: printf("case 3 -223\n"); break; +case -224: printf("case 3 -224\n"); break; +case 2000: printf("case 3 2000\n"); break; +case 2001: printf("case 3 2001\n"); break; +case 2002: printf("case 3 2002\n"); break; +case 2003: printf("case 3 2003\n"); break; +case 2004: printf("case 3 2004\n"); break; +case 2005: printf("case 3 2005\n"); break; +case 171: printf("case 3 171\n"); break; +case -20: printf("case 3 -20\n"); break; +case -10: printf("case 3 -10\n"); break; +case 0: printf("case 3 0\n"); break; +case 10: printf("case 3 10\n"); break; +case 20: printf("case 3 20\n"); break; +case 30: printf("case 3 30\n"); break; +case 40: printf("case 3 40\n"); break; +case 50: printf("case 3 50\n"); break; +case 60: printf("case 3 60\n"); break; +case 70: printf("case 3 70\n"); break; +case 80: printf("case 3 80\n"); break; +case 90: printf("case 3 90\n"); break; +case 100: printf("case 3 100\n"); break; +case 110: printf("case 3 110\n"); break; +case 120: printf("case 3 120\n"); break; +case 130: printf("case 3 130\n"); break; +case 140: printf("case 3 140\n"); break; +case 150: printf("case 3 150\n"); break; +case 160: printf("case 3 160\n"); break; +case 170: printf("case 3 170\n"); break; +case 180: printf("case 3 180\n"); break; +case 190: printf("case 3 190\n"); break; +case 200: printf("case 3 200\n"); break; +case 210: printf("case 3 210\n"); break; +case 220: printf("case 3 220\n"); break; +case 230: printf("case 3 230\n"); break; +case 240: printf("case 3 240\n"); break; +case 250: printf("case 3 250\n"); break; +case 260: printf("case 3 260\n"); break; +case 270: printf("case 3 270\n"); break; +case 280: printf("case 3 280\n"); break; +case 290: printf("case 3 290\n"); break; +case 300: printf("case 3 300\n"); break; +case 310: printf("case 3 310\n"); break; +case 320: printf("case 3 320\n"); break; +case 330: printf("case 3 330\n"); break; +case 340: printf("case 3 340\n"); break; +case 350: printf("case 3 350\n"); break; +case 360: printf("case 3 360\n"); break; +case 370: printf("case 3 370\n"); break; +case 380: printf("case 3 380\n"); break; +case 390: printf("case 3 390\n"); break; +case 400: printf("case 3 400\n"); break; +case 410: printf("case 3 410\n"); break; +case 420: printf("case 3 420\n"); break; +case 430: printf("case 3 430\n"); break; +case 440: printf("case 3 440\n"); break; +case 450: printf("case 3 450\n"); break; +case 460: printf("case 3 460\n"); break; +case 470: printf("case 3 470\n"); break; +case 480: printf("case 3 480\n"); break; +case 490: printf("case 3 490\n"); break; +case 500: printf("case 3 500\n"); break; +case 510: printf("case 3 510\n"); break; +case 520: printf("case 3 520\n"); break; +case 530: printf("case 3 530\n"); break; +case 540: printf("case 3 540\n"); break; +case 550: printf("case 3 550\n"); break; +case 560: printf("case 3 560\n"); break; +case 570: printf("case 3 570\n"); break; +case 580: printf("case 3 580\n"); break; +case 590: printf("case 3 590\n"); break; +case 600: printf("case 3 600\n"); break; +case 610: printf("case 3 610\n"); break; +case 620: printf("case 3 620\n"); break; +case 630: printf("case 3 630\n"); break; +case 640: printf("case 3 640\n"); break; +case 650: printf("case 3 650\n"); break; +case 660: printf("case 3 660\n"); break; +case 670: printf("case 3 670\n"); break; +case 680: printf("case 3 680\n"); break; +case 690: printf("case 3 690\n"); break; +case 700: printf("case 3 700\n"); break; +case 710: printf("case 3 710\n"); break; +case 720: printf("case 3 720\n"); break; +case 730: printf("case 3 730\n"); break; +case 740: printf("case 3 740\n"); break; +case 750: printf("case 3 750\n"); break; +case 760: printf("case 3 760\n"); break; +case 770: printf("case 3 770\n"); break; +case 780: printf("case 3 780\n"); break; +case 790: printf("case 3 790\n"); break; +case 800: printf("case 3 800\n"); break; +case 810: printf("case 3 810\n"); break; +case 820: printf("case 3 820\n"); break; +case 830: printf("case 3 830\n"); break; +case 840: printf("case 3 840\n"); break; +case 850: printf("case 3 850\n"); break; +case 860: printf("case 3 860\n"); break; +case 870: printf("case 3 870\n"); break; +case 880: printf("case 3 880\n"); break; +case 890: printf("case 3 890\n"); break; +case 900: printf("case 3 900\n"); break; +case 910: printf("case 3 910\n"); break; +case 920: printf("case 3 920\n"); break; +case 930: printf("case 3 930\n"); break; +case 940: printf("case 3 940\n"); break; +case 950: printf("case 3 950\n"); break; +case 960: printf("case 3 960\n"); break; +case 970: printf("case 3 970\n"); break; +case 980: printf("case 3 980\n"); break; +case 990: printf("case 3 990\n"); break; +case 1000: printf("case 3 1000\n"); break; +case 1010: printf("case 3 1010\n"); break; +case 1020: printf("case 3 1020\n"); break; +case 1030: printf("case 3 1030\n"); break; +case 1040: printf("case 3 1040\n"); break; +case 1050: printf("case 3 1050\n"); break; +case 1060: printf("case 3 1060\n"); break; +case 1070: printf("case 3 1070\n"); break; +case 1080: printf("case 3 1080\n"); break; +case 1090: printf("case 3 1090\n"); break; +case 1100: printf("case 3 1100\n"); break; +case 1110: printf("case 3 1110\n"); break; +case 1120: printf("case 3 1120\n"); break; +case 1130: printf("case 3 1130\n"); break; +case 1140: printf("case 3 1140\n"); break; +case 1150: printf("case 3 1150\n"); break; +case 1160: printf("case 3 1160\n"); break; +case 1170: printf("case 3 1170\n"); break; +case 1180: printf("case 3 1180\n"); break; +case 1190: printf("case 3 1190\n"); break; +case 1200: printf("case 3 1200\n"); break; +case 1210: printf("case 3 1210\n"); break; +case 1220: printf("case 3 1220\n"); break; +case 1230: printf("case 3 1230\n"); break; +case 1240: printf("case 3 1240\n"); break; +case 1250: printf("case 3 1250\n"); break; +case 1260: printf("case 3 1260\n"); break; +case 1270: printf("case 3 1270\n"); break; +case 1280: printf("case 3 1280\n"); break; +case 1290: printf("case 3 1290\n"); break; +case 1300: printf("case 3 1300\n"); break; +case 1310: printf("case 3 1310\n"); break; +case 1320: printf("case 3 1320\n"); break; +case 1330: printf("case 3 1330\n"); break; +case 1340: printf("case 3 1340\n"); break; +case 1350: printf("case 3 1350\n"); break; +case 1360: printf("case 3 1360\n"); break; +case 1370: printf("case 3 1370\n"); break; +case 1380: printf("case 3 1380\n"); break; +case 1390: printf("case 3 1390\n"); break; +case 1400: printf("case 3 1400\n"); break; +case 1410: printf("case 3 1410\n"); break; +case 1420: printf("case 3 1420\n"); break; +case 1430: printf("case 3 1430\n"); break; +case 1440: printf("case 3 1440\n"); break; +case 1450: printf("case 3 1450\n"); break; +case 1460: printf("case 3 1460\n"); break; +case 1470: printf("case 3 1470\n"); break; +case 1480: printf("case 3 1480\n"); break; +case 1490: printf("case 3 1490\n"); break; +case 1500: printf("case 3 1500\n"); break; +case 1510: printf("case 3 1510\n"); break; +case 1520: printf("case 3 1520\n"); break; +case 1530: printf("case 3 1530\n"); break; +case 1540: printf("case 3 1540\n"); break; +case 1550: printf("case 3 1550\n"); break; +case 1560: printf("case 3 1560\n"); break; +case 1570: printf("case 3 1570\n"); break; +case 1580: printf("case 3 1580\n"); break; +case 1590: printf("case 3 1590\n"); break; +case 1600: printf("case 3 1600\n"); break; +case 1610: printf("case 3 1610\n"); break; +case 1620: printf("case 3 1620\n"); break; +case 1630: printf("case 3 1630\n"); break; +case 1640: printf("case 3 1640\n"); break; +case 1650: printf("case 3 1650\n"); break; +case 1660: printf("case 3 1660\n"); break; +case 1670: printf("case 3 1670\n"); break; +case 1680: printf("case 3 1680\n"); break; +case 1690: printf("case 3 1690\n"); break; +case 1700: printf("case 3 1700\n"); break; +case 1710: printf("case 3 1710\n"); break; +case 1720: printf("case 3 1720\n"); break; +case 1730: printf("case 3 1730\n"); break; +case 1740: printf("case 3 1740\n"); break; +case 1750: printf("case 3 1750\n"); break; +case 1760: printf("case 3 1760\n"); break; +case 1770: printf("case 3 1770\n"); break; +case 1780: printf("case 3 1780\n"); break; +case 1790: printf("case 3 1790\n"); break; +case 1800: printf("case 3 1800\n"); break; +case 1810: printf("case 3 1810\n"); break; +case 1820: printf("case 3 1820\n"); break; +case 1830: printf("case 3 1830\n"); break; +case 1840: printf("case 3 1840\n"); break; +case 1850: printf("case 3 1850\n"); break; +case 1860: printf("case 3 1860\n"); break; +case 1870: printf("case 3 1870\n"); break; +case 1880: printf("case 3 1880\n"); break; +case 1890: printf("case 3 1890\n"); break; +case 1900: printf("case 3 1900\n"); break; +case 1910: printf("case 3 1910\n"); break; +case 1920: printf("case 3 1920\n"); break; +case 1930: printf("case 3 1930\n"); break; +case 1940: printf("case 3 1940\n"); break; +case 1950: printf("case 3 1950\n"); break; +case 1960: printf("case 3 1960\n"); break; +case 1970: printf("case 3 1970\n"); break; +case 1980: printf("case 3 1980\n"); break; +case 1990: printf("case 3 1990\n"); break; +case 2010: printf("case 3 2010\n"); break; +case 2020: printf("case 3 2020\n"); break; +case 2030: printf("case 3 2030\n"); break; +case 2040: printf("case 3 2040\n"); break; +case 2050: printf("case 3 2050\n"); break; +case 2060: printf("case 3 2060\n"); break; +case 2070: printf("case 3 2070\n"); break; +case 2080: printf("case 3 2080\n"); break; +case 2090: printf("case 3 2090\n"); break; +case 2100: printf("case 3 2100\n"); break; +case 2110: printf("case 3 2110\n"); break; +case 2120: printf("case 3 2120\n"); break; +case 2130: printf("case 3 2130\n"); break; +case 2140: printf("case 3 2140\n"); break; +case 2150: printf("case 3 2150\n"); break; +case 2160: printf("case 3 2160\n"); break; +case 2170: printf("case 3 2170\n"); break; +case 2180: printf("case 3 2180\n"); break; +case 2190: printf("case 3 2190\n"); break; +case 2200: printf("case 3 2200\n"); break; +case 2210: printf("case 3 2210\n"); break; +case 2220: printf("case 3 2220\n"); break; +case 2230: printf("case 3 2230\n"); break; +case 2240: printf("case 3 2240\n"); break; +case 2250: printf("case 3 2250\n"); break; +case 2260: printf("case 3 2260\n"); break; +case 2270: printf("case 3 2270\n"); break; +case 2280: printf("case 3 2280\n"); break; +case 2290: printf("case 3 2290\n"); break; +case 2300: printf("case 3 2300\n"); break; +case 2310: printf("case 3 2310\n"); break; +case 2320: printf("case 3 2320\n"); break; +case 2330: printf("case 3 2330\n"); break; +case 2340: printf("case 3 2340\n"); break; +case 2350: printf("case 3 2350\n"); break; +case 2360: printf("case 3 2360\n"); break; +case 2370: printf("case 3 2370\n"); break; +case 2380: printf("case 3 2380\n"); break; +case 2390: printf("case 3 2390\n"); break; +case 2400: printf("case 3 2400\n"); break; +case 2410: printf("case 3 2410\n"); break; +case 2420: printf("case 3 2420\n"); break; +case 2430: printf("case 3 2430\n"); break; +case 2440: printf("case 3 2440\n"); break; +case 2450: printf("case 3 2450\n"); break; +case 2460: printf("case 3 2460\n"); break; +case 2470: printf("case 3 2470\n"); break; +case 2480: printf("case 3 2480\n"); break; +case 2490: printf("case 3 2490\n"); break; +case 2500: printf("case 3 2500\n"); break; +case 2510: printf("case 3 2510\n"); break; +case 2520: printf("case 3 2520\n"); break; +case 2530: printf("case 3 2530\n"); break; +case 2540: printf("case 3 2540\n"); break; +case 2550: printf("case 3 2550\n"); break; +case 2560: printf("case 3 2560\n"); break; +case 2570: printf("case 3 2570\n"); break; +case 2580: printf("case 3 2580\n"); break; +case 2590: printf("case 3 2590\n"); break; +case 2600: printf("case 3 2600\n"); break; +case 2610: printf("case 3 2610\n"); break; +case 2620: printf("case 3 2620\n"); break; +case 2630: printf("case 3 2630\n"); break; +case 2640: printf("case 3 2640\n"); break; +case 2650: printf("case 3 2650\n"); break; +case 2660: printf("case 3 2660\n"); break; +case 2670: printf("case 3 2670\n"); break; +case 2680: printf("case 3 2680\n"); break; +case 2690: printf("case 3 2690\n"); break; +case 2700: printf("case 3 2700\n"); break; +case 2710: printf("case 3 2710\n"); break; +case 2720: printf("case 3 2720\n"); break; +case 2730: printf("case 3 2730\n"); break; +case 2740: printf("case 3 2740\n"); break; +case 2750: printf("case 3 2750\n"); break; +case 2760: printf("case 3 2760\n"); break; +case 2770: printf("case 3 2770\n"); break; +case 2780: printf("case 3 2780\n"); break; +case 2790: printf("case 3 2790\n"); break; +case 2800: printf("case 3 2800\n"); break; +case 2810: printf("case 3 2810\n"); break; +case 2820: printf("case 3 2820\n"); break; +case 2830: printf("case 3 2830\n"); break; +case 2840: printf("case 3 2840\n"); break; +case 2850: printf("case 3 2850\n"); break; +case 2860: printf("case 3 2860\n"); break; +case 2870: printf("case 3 2870\n"); break; +case 2880: printf("case 3 2880\n"); break; +case 2890: printf("case 3 2890\n"); break; +case 2900: printf("case 3 2900\n"); break; +case 2910: printf("case 3 2910\n"); break; +case 2920: printf("case 3 2920\n"); break; +case 2930: printf("case 3 2930\n"); break; +case 2940: printf("case 3 2940\n"); break; +case 2950: printf("case 3 2950\n"); break; +case 2960: printf("case 3 2960\n"); break; +case 2970: printf("case 3 2970\n"); break; +case 2980: printf("case 3 2980\n"); break; +case 2990: printf("case 3 2990\n"); break; +default: printf("default 3 %d\n",i); break; +case 10007: printf("case 3 10007\n"); break; +case 10011: printf("case 3 10011\n"); break; +case 10015: printf("case 3 10015\n"); break; +case 10019: printf("case 3 10019\n"); break; +case 10023: printf("case 3 10023\n"); break; +case 10027: printf("case 3 10027\n"); break; +case 10031: printf("case 3 10031\n"); break; +case 10035: printf("case 3 10035\n"); break; +case 10039: printf("case 3 10039\n"); break; +case 10043: printf("case 3 10043\n"); break; +case 10047: printf("case 3 10047\n"); break; +case 10051: printf("case 3 10051\n"); break; +case 10055: printf("case 3 10055\n"); break; +case 10059: printf("case 3 10059\n"); break; +case 10063: printf("case 3 10063\n"); break; +case 10067: printf("case 3 10067\n"); break; +case 10071: printf("case 3 10071\n"); break; +case 10075: printf("case 3 10075\n"); break; +case 10079: printf("case 3 10079\n"); break; +case 10083: printf("case 3 10083\n"); break; +case 10087: printf("case 3 10087\n"); break; +case 10091: printf("case 3 10091\n"); break; +case 10095: printf("case 3 10095\n"); break; +case 10099: printf("case 3 10099\n"); break; +case 10103: printf("case 3 10103\n"); break; +case 10107: printf("case 3 10107\n"); break; +case 10111: printf("case 3 10111\n"); break; +case 10115: printf("case 3 10115\n"); break; +case 10119: printf("case 3 10119\n"); break; +case 10123: printf("case 3 10123\n"); break; +case 10127: printf("case 3 10127\n"); break; +case 10131: printf("case 3 10131\n"); break; +case 10135: printf("case 3 10135\n"); break; +case 10139: printf("case 3 10139\n"); break; +case 10143: printf("case 3 10143\n"); break; +case 10147: printf("case 3 10147\n"); break; +case 10151: printf("case 3 10151\n"); break; +case 10155: printf("case 3 10155\n"); break; +case 10159: printf("case 3 10159\n"); break; +case 10163: printf("case 3 10163\n"); break; +case 10167: printf("case 3 10167\n"); break; +case 10171: printf("case 3 10171\n"); break; +case 10175: printf("case 3 10175\n"); break; +case 10179: printf("case 3 10179\n"); break; +case 10183: printf("case 3 10183\n"); break; +case 10187: printf("case 3 10187\n"); break; +case 10191: printf("case 3 10191\n"); break; +case 10195: printf("case 3 10195\n"); break; +case 10199: printf("case 3 10199\n"); break; +case 10203: printf("case 3 10203\n"); break; +case 10207: printf("case 3 10207\n"); break; +case 10211: printf("case 3 10211\n"); break; +case 10215: printf("case 3 10215\n"); break; +case 10219: printf("case 3 10219\n"); break; +case 10223: printf("case 3 10223\n"); break; +case 10227: printf("case 3 10227\n"); break; +case 10231: printf("case 3 10231\n"); break; +case 10235: printf("case 3 10235\n"); break; +case 10239: printf("case 3 10239\n"); break; +case 10243: printf("case 3 10243\n"); break; +case 10247: printf("case 3 10247\n"); break; +case 10251: printf("case 3 10251\n"); break; +case 10255: printf("case 3 10255\n"); break; +case 10259: printf("case 3 10259\n"); break; +case 10263: printf("case 3 10263\n"); break; +case 10267: printf("case 3 10267\n"); break; +case 10271: printf("case 3 10271\n"); break; +case 10275: printf("case 3 10275\n"); break; +case 10279: printf("case 3 10279\n"); break; +case 10283: printf("case 3 10283\n"); break; +case 10287: printf("case 3 10287\n"); break; +case 10291: printf("case 3 10291\n"); break; +case 10295: printf("case 3 10295\n"); break; +case 10299: printf("case 3 10299\n"); break; + } +} + +main4(int i) +{ + switch(i) { +/* +for($i=-333;$i<-100;$i+=4) { +print "case $i: printf(\"case 4 $i\\n\"); break;\n"; +} + */ +case -333: printf("case 4 -333\n"); break; +case -329: printf("case 4 -329\n"); break; +case -325: printf("case 4 -325\n"); break; +case -321: printf("case 4 -321\n"); break; +case -317: printf("case 4 -317\n"); break; +case -313: printf("case 4 -313\n"); break; +case -309: printf("case 4 -309\n"); break; +case -305: printf("case 4 -305\n"); break; +case -301: printf("case 4 -301\n"); break; +case -297: printf("case 4 -297\n"); break; +case -293: printf("case 4 -293\n"); break; +case -289: printf("case 4 -289\n"); break; +case -285: printf("case 4 -285\n"); break; +case -281: printf("case 4 -281\n"); break; +case -277: printf("case 4 -277\n"); break; +case -273: printf("case 4 -273\n"); break; +case -269: printf("case 4 -269\n"); break; +case -265: printf("case 4 -265\n"); break; +case -261: printf("case 4 -261\n"); break; +case -257: printf("case 4 -257\n"); break; +case -253: printf("case 4 -253\n"); break; +case -249: printf("case 4 -249\n"); break; +case -245: printf("case 4 -245\n"); break; +case -241: printf("case 4 -241\n"); break; +case -237: printf("case 4 -237\n"); break; +case -233: printf("case 4 -233\n"); break; +case -229: printf("case 4 -229\n"); break; +case -225: printf("case 4 -225\n"); break; +case -221: printf("case 4 -221\n"); break; +case -217: printf("case 4 -217\n"); break; +case -213: printf("case 4 -213\n"); break; +case -209: printf("case 4 -209\n"); break; +case -205: printf("case 4 -205\n"); break; +case -201: printf("case 4 -201\n"); break; +case -197: printf("case 4 -197\n"); break; +case -193: printf("case 4 -193\n"); break; +case -189: printf("case 4 -189\n"); break; +case -185: printf("case 4 -185\n"); break; +case -181: printf("case 4 -181\n"); break; +case -177: printf("case 4 -177\n"); break; +case -173: printf("case 4 -173\n"); break; +case -169: printf("case 4 -169\n"); break; +case -165: printf("case 4 -165\n"); break; +case -161: printf("case 4 -161\n"); break; +case -157: printf("case 4 -157\n"); break; +case -153: printf("case 4 -153\n"); break; +case -149: printf("case 4 -149\n"); break; +case -145: printf("case 4 -145\n"); break; +case -141: printf("case 4 -141\n"); break; +case -137: printf("case 4 -137\n"); break; +case -133: printf("case 4 -133\n"); break; +case -129: printf("case 4 -129\n"); break; +case -125: printf("case 4 -125\n"); break; +case -121: printf("case 4 -121\n"); break; +case -117: printf("case 4 -117\n"); break; +case -113: printf("case 4 -113\n"); break; +case -109: printf("case 4 -109\n"); break; +case -105: printf("case 4 -105\n"); break; +case -101: printf("case 4 -101\n"); break; +case 3: printf("case 4 3\n"); break; +case 5: printf("case 4 5\n"); break; +case 7: printf("case 4 7\n"); break; +case 9: printf("case 4 9\n"); break; +case 11: printf("case 4 11\n"); break; +case 13: printf("case 4 13\n"); break; +case 15: printf("case 4 15\n"); break; +case 17: printf("case 4 17\n"); break; +case 19: printf("case 4 19\n"); break; +case 21: printf("case 4 21\n"); break; +case 23: printf("case 4 23\n"); break; +case 25: printf("case 4 25\n"); break; +case 27: printf("case 4 27\n"); break; +case 29: printf("case 4 29\n"); break; +case 31: printf("case 4 31\n"); break; +case 33: printf("case 4 33\n"); break; +case 35: printf("case 4 35\n"); break; +case 37: printf("case 4 37\n"); break; +case 39: printf("case 4 39\n"); break; +case 41: printf("case 4 41\n"); break; +case 43: printf("case 4 43\n"); break; +case 45: printf("case 4 45\n"); break; +case 47: printf("case 4 47\n"); break; +case 49: printf("case 4 49\n"); break; +case 51: printf("case 4 51\n"); break; +case 53: printf("case 4 53\n"); break; +case 55: printf("case 4 55\n"); break; +case 57: printf("case 4 57\n"); break; +case 59: printf("case 4 59\n"); break; +case 61: printf("case 4 61\n"); break; +case 63: printf("case 4 63\n"); break; +case 65: printf("case 4 65\n"); break; +case 67: printf("case 4 67\n"); break; +case 69: printf("case 4 69\n"); break; +case 71: printf("case 4 71\n"); break; +case 73: printf("case 4 73\n"); break; +case 75: printf("case 4 75\n"); break; +case 77: printf("case 4 77\n"); break; +case 79: printf("case 4 79\n"); break; + } +}