main() {
  int i, f1, l1, f2, l2;
  char s[80], name[10], c, first1[3], last1[3], first2[3], last2[3];
  int bit_map[8], size, incr;
  static int incr_tab[5] = {0, 9, -7, 9, -7};
  printf("{");
  while (gets(s)) {
    switch (s[0]) {
    case 'H':
    case 'V': {
      sscanf(s, "%s%c%2s%c%2s", name, &c, first1, &c, last1);
      f1 = cvt(first1);
      l1 = cvt(last1);
      f2 = l2 = 0;
      size = 8;
      if (s[0] == 'H')
        incr = 1;
      else
        incr = 8;
      break;
    }
    case 'D': {
      switch (s[1]) {
      case '8':
      case '6':
      case '7': {
        sscanf(s, "%s%c%2s%c%2s", name, &c, first1, &c, last1);
        f1 = cvt(first1);
        l1 = cvt(last1);
        f2 = l2 = 0;
        size = s[1] - '0';
        incr = incr_tab[s[4] - '0'];
        break;
      }
      case '4':
      case '5': {
        sscanf(s, "%s%c%2s%c%2s%c%2s%c%2s", name, &c, first1, &c, last1, &c,
               first2, &c, last2);
        f1 = cvt(first1);
        l1 = cvt(last1);
        f2 = cvt(first2);
        l2 = cvt(last2);
        size = 8;
        incr = incr_tab[s[4] - '0'];
        break;
      }
      }
      break;
    }
    }
    printf("\n {%c%s%c,{ ", '"', name, '"');
    if (!(l2 == f2)) {
      for (i = f2; i != l2; i += incr)
        printf("%3d, ", i);
      printf("%3d, ", i);
    }
    for (i = f1; i != l1; i += incr)
      printf("%3d, ", i);
    printf("%3d, ", i);
    printf("}, %2d },", size);
  }
  printf("\n};\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0xe8,%rsp
movl   $0x0,-0xc(%rbp)
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x70(%rbp),%rdi
mov    $0x0,%al
call   1040 <gets@plt>
cmp    $0x0,%eax
je     147d <main+0x33d>
movsbl -0x70(%rbp),%eax
mov    %eax,-0xbc(%rbp)
sub    $0x44,%eax
je     1243 <main+0x103>
jmp    118d <main+0x4d>
mov    -0xbc(%rbp),%eax
sub    $0x48,%eax
je     11b5 <main+0x75>
jmp    11a1 <main+0x61>
mov    -0xbc(%rbp),%eax
sub    $0x56,%eax
jne    13b5 <main+0x275>
jmp    11b5 <main+0x75>
lea    -0x70(%rbp),%rdi
lea    -0x7a(%rbp),%rdx
lea    -0x7e(%rbp),%r8
lea    -0x81(%rbp),%rax
lea    0xe33(%rip),%rsi
lea    -0x7b(%rbp),%r9
mov    %r9,%rcx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1050 <sscanf@plt>
lea    -0x7e(%rbp),%rdi
mov    $0x0,%al
call   1060 <cvt@plt>
mov    %eax,-0x14(%rbp)
lea    -0x81(%rbp),%rdi
mov    $0x0,%al
call   1060 <cvt@plt>
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x8,-0xb4(%rbp)
movsbl -0x70(%rbp),%eax
cmp    $0x48,%eax
jne    1234 <main+0xf4>
movl   $0x1,-0xb8(%rbp)
jmp    123e <main+0xfe>
movl   $0x8,-0xb8(%rbp)
jmp    13b5 <main+0x275>
movsbl -0x6f(%rbp),%eax
mov    %eax,-0xc0(%rbp)
add    $0xffffffcc,%eax
sub    $0x2,%eax
jb     12fa <main+0x1ba>
jmp    125e <main+0x11e>
mov    -0xc0(%rbp),%eax
add    $0xffffffca,%eax
sub    $0x2,%eax
ja     13b0 <main+0x270>
jmp    1275 <main+0x135>
lea    -0x70(%rbp),%rdi
lea    -0x7a(%rbp),%rdx
lea    -0x7e(%rbp),%r8
lea    -0x81(%rbp),%rax
lea    0xd73(%rip),%rsi
lea    -0x7b(%rbp),%r9
mov    %r9,%rcx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1050 <sscanf@plt>
lea    -0x7e(%rbp),%rdi
mov    $0x0,%al
call   1060 <cvt@plt>
mov    %eax,-0x14(%rbp)
lea    -0x81(%rbp),%rdi
mov    $0x0,%al
call   1060 <cvt@plt>
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
movsbl -0x6f(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0xb4(%rbp)
movsbl -0x6c(%rbp),%eax
sub    $0x30,%eax
movslq %eax,%rcx
lea    0x2d64(%rip),%rax
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xb8(%rbp)
jmp    13b0 <main+0x270>
lea    -0x70(%rbp),%rdi
lea    -0x7a(%rbp),%rdx
lea    -0x7e(%rbp),%r8
lea    -0x81(%rbp),%rbx
lea    -0x84(%rbp),%r11
lea    -0x87(%rbp),%rax
lea    0xced(%rip),%rsi
lea    -0x7b(%rbp),%r10
mov    %r10,%rcx
mov    %r10,%r9
mov    %rbx,(%rsp)
mov    %r10,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
mov    $0x0,%al
call   1050 <sscanf@plt>
lea    -0x7e(%rbp),%rdi
mov    $0x0,%al
call   1060 <cvt@plt>
mov    %eax,-0x14(%rbp)
lea    -0x81(%rbp),%rdi
mov    $0x0,%al
call   1060 <cvt@plt>
mov    %eax,-0x18(%rbp)
lea    -0x84(%rbp),%rdi
mov    $0x0,%al
call   1060 <cvt@plt>
mov    %eax,-0x1c(%rbp)
lea    -0x87(%rbp),%rdi
mov    $0x0,%al
call   1060 <cvt@plt>
mov    %eax,-0x20(%rbp)
movl   $0x8,-0xb4(%rbp)
movsbl -0x6c(%rbp),%eax
sub    $0x30,%eax
movslq %eax,%rcx
lea    0x2ca9(%rip),%rax
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xb8(%rbp)
jmp    13b5 <main+0x275>
lea    -0x7a(%rbp),%rdx
lea    0xc66(%rip),%rdi
mov    $0x22,%ecx
mov    %ecx,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
je     141f <main+0x2df>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x20(%rbp),%eax
je     140e <main+0x2ce>
mov    -0x10(%rbp),%esi
lea    0xc3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xb8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    13e0 <main+0x2a0>
mov    -0x10(%rbp),%esi
lea    0xc1b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
je     1453 <main+0x313>
mov    -0x10(%rbp),%esi
lea    0xbf8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xb8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1425 <main+0x2e5>
mov    -0x10(%rbp),%esi
lea    0xbd6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xb4(%rbp),%esi
lea    0xbc8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1161 <main+0x21>
lea    0xbbf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xe8,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    $0x7b,%edi
call   1030 <putchar@plt>
lea    0x30(%rsp),%rdi
xor    %eax,%eax
call   1060 <gets@plt>
test   %eax,%eax
je     1459 <main+0x2f9>
lea    0x20(%rsp),%rbx
lea    0xeaa(%rip),%r14
jmp    11d6 <main+0x76>
nopl   (%rax)
mov    %r14,%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe97(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x30(%rsp),%rdi
xor    %eax,%eax
call   1060 <gets@plt>
test   %eax,%eax
lea    0x20(%rsp),%rbx
je     1459 <main+0x2f9>
movsbl 0x30(%rsp),%eax
cmp    $0x44,%eax
je     12a0 <main+0x140>
cmp    $0x56,%eax
je     11f2 <main+0x92>
cmp    $0x48,%eax
jne    13c8 <main+0x268>
sub    $0x8,%rsp
lea    0x38(%rsp),%rdi
lea    0xe12(%rip),%rsi
mov    %rbx,%rdx
lea    0x17(%rsp),%rcx
lea    0x21(%rsp),%rbp
mov    %rbp,%r8
mov    %rcx,%r9
xor    %eax,%eax
lea    0x1e(%rsp),%rbx
push   %rbx
call   1070 <sscanf@plt>
add    $0x10,%rsp
mov    %rbp,%rdi
xor    %eax,%eax
call   1080 <cvt@plt>
mov    %eax,0x10(%rsp)
mov    %rbx,%rdi
lea    0x20(%rsp),%rbx
xor    %eax,%eax
call   1080 <cvt@plt>
mov    %eax,%r13d
cmpb   $0x48,0x30(%rsp)
mov    $0x8,%ebp
mov    $0x8,%r15d
mov    $0x1,%eax
cmove  %eax,%r15d
xor    %r12d,%r12d
lea    0xdcf(%rip),%rdi
mov    $0x22,%esi
mov    %rbx,%rdx
mov    $0x22,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
movl   $0x0,0x1c(%rsp)
cmp    %r13d,0x10(%rsp)
je     11a0 <main+0x40>
jmp    1430 <main+0x2d0>
cs nopw 0x0(%rax,%rax,1)
nop
movsbl 0x31(%rsp),%eax
lea    -0x36(%rax),%ecx
cmp    $0x3,%ecx
jae    1323 <main+0x1c3>
sub    $0x8,%rsp
lea    0x38(%rsp),%rdi
lea    0xd57(%rip),%rsi
mov    %rbx,%rdx
lea    0x17(%rsp),%rcx
lea    0x21(%rsp),%rbp
mov    %rbp,%r8
mov    %rcx,%r9
xor    %eax,%eax
lea    0x1e(%rsp),%rbx
push   %rbx
call   1070 <sscanf@plt>
add    $0x10,%rsp
mov    %rbp,%rdi
xor    %eax,%eax
call   1080 <cvt@plt>
mov    %eax,0x10(%rsp)
mov    %rbx,%rdi
lea    0x20(%rsp),%rbx
xor    %eax,%eax
call   1080 <cvt@plt>
mov    %eax,%r13d
movsbl 0x31(%rsp),%ebp
add    $0xffffffd0,%ebp
movsbq 0x34(%rsp),%rax
lea    0xcea(%rip),%rcx
mov    -0xc0(%rcx,%rax,4),%r15d
ff
jmp    125f <main+0xff>
add    $0xffffffcc,%eax
cmp    $0x2,%eax
jae    13c8 <main+0x268>
sub    $0x8,%rsp
lea    0x38(%rsp),%rdi
lea    0xce2(%rip),%rsi
mov    %rbx,%rdx
lea    0x17(%rsp),%rcx
lea    0x21(%rsp),%rbp
mov    %rbp,%r8
mov    %rcx,%r9
xor    %eax,%eax
lea    0x32(%rsp),%r15
push   %r15
push   %rcx
lea    0x45(%rsp),%r12
push   %r12
push   %rcx
lea    0x3e(%rsp),%rbx
push   %rbx
call   1070 <sscanf@plt>
add    $0x30,%rsp
mov    %rbp,%rdi
xor    %eax,%eax
call   1080 <cvt@plt>
mov    %eax,0x10(%rsp)
mov    %rbx,%rdi
lea    0x20(%rsp),%rbx
xor    %eax,%eax
call   1080 <cvt@plt>
mov    %eax,%r13d
mov    %r12,%rdi
xor    %eax,%eax
call   1080 <cvt@plt>
mov    %eax,0x1c(%rsp)
mov    %r15,%rdi
xor    %eax,%eax
call   1080 <cvt@plt>
mov    %eax,%r12d
movsbq 0x34(%rsp),%rax
lea    0xc45(%rip),%rcx
mov    -0xc0(%rcx,%rax,4),%r15d
ff
mov    $0x8,%ebp
lea    0xc69(%rip),%rdi
mov    $0x22,%esi
mov    %rbx,%rdx
mov    $0x22,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x1c(%rsp),%ebx
cmp    %ebx,%r12d
jne    1400 <main+0x2a0>
mov    %ebx,%r12d
cmp    %r13d,0x10(%rsp)
je     11a0 <main+0x40>
jmp    1430 <main+0x2d0>
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    %r15d,%ebx
cmp    %ebx,%r12d
jne    1400 <main+0x2a0>
mov    %r14,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    %r13d,0x10(%rsp)
je     11a0 <main+0x40>
nopl   0x0(%rax)
mov    0x10(%rsp),%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    %r15d,%ebx
cmp    %ebx,%r13d
jne    1440 <main+0x2e0>
jmp    11a0 <main+0x40>
lea    0xbf5(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@main.incr_tab = internal global [5 x i32] [i32 0, i32 9, i32 -7, i32 9, i32 -7]
@.str = [2 x i8] c"{\00"
@.str.1 = [13 x i8] c"%s%c%2s%c%2s\00"
@.str.2 = [23 x i8] c"%s%c%2s%c%2s%c%2s%c%2s\00"
@.str.3 = [13 x i8] c"\0A {%c%s%c,{ \00"
@.str.4 = [6 x i8] c"%3d, \00"
@.str.5 = [10 x i8] c"}, %2d },\00"
@.str.6 = [5 x i8] c"\0A};\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [80 x i8]
%8 = alloca [10 x i8]
%9 = alloca i8
%10 = alloca [3 x i8]
%11 = alloca [3 x i8]
%12 = alloca [3 x i8]
%13 = alloca [3 x i8]
%14 = alloca [8 x i32]
%15 = alloca i32
%16 = alloca i32
store i32 0, i32* %1
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %127, %0
%19 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%20 = call i32 (i8*, ...) bitcast (i32 (...)* @gets to i32 (i8*, ...)*)(i8* %19)
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %132
22: ; preds = %18
%23 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
switch i32 %25, label %92 [
i32 72, label %26
i32 86, label %26
i32 68, label %43
]
26: ; preds = %22, %22
%27 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%28 = getelementptr inbounds [10 x i8], [10 x i8]* %8, i64 0, i64 0
%29 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 0
%30 = getelementptr inbounds [3 x i8], [3 x i8]* %11, i64 0, i64 0
%31 = call i32 (i8*, i8*, ...) @sscanf(i8* %27, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %28, i8* %9, i8* %29, i8* %9, i8* %30)
%32 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 0
%33 = call i32 (i8*, ...) bitcast (i32 (...)* @cvt to i32 (i8*, ...)*)(i8* %32)
store i32 %33, i32* %3
%34 = getelementptr inbounds [3 x i8], [3 x i8]* %11, i64 0, i64 0
%35 = call i32 (i8*, ...) bitcast (i32 (...)* @cvt to i32 (i8*, ...)*)(i8* %34)
store i32 %35, i32* %4
store i32 0, i32* %6
store i32 0, i32* %5
store i32 8, i32* %15
%36 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 72
br i1 %39, label %40, label %41
40: ; preds = %26
store i32 1, i32* %16
br label %42
41: ; preds = %26
store i32 8, i32* %16
br label %42
42: ; preds = %41, %40
br label %92
43: ; preds = %22
%44 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 1
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
switch i32 %46, label %91 [
i32 56, label %47
i32 54, label %47
i32 55, label %47
i32 52, label %68
i32 53, label %68
]
47: ; preds = %43, %43, %43
%48 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%49 = getelementptr inbounds [10 x i8], [10 x i8]* %8, i64 0, i64 0
%50 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 0
%51 = getelementptr inbounds [3 x i8], [3 x i8]* %11, i64 0, i64 0
%52 = call i32 (i8*, i8*, ...) @sscanf(i8* %48, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %49, i8* %9, i8* %50, i8* %9, i8* %51)
%53 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 0
%54 = call i32 (i8*, ...) bitcast (i32 (...)* @cvt to i32 (i8*, ...)*)(i8* %53)
store i32 %54, i32* %3
%55 = getelementptr inbounds [3 x i8], [3 x i8]* %11, i64 0, i64 0
%56 = call i32 (i8*, ...) bitcast (i32 (...)* @cvt to i32 (i8*, ...)*)(i8* %55)
store i32 %56, i32* %4
store i32 0, i32* %6
store i32 0, i32* %5
%57 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 1
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = sub nsw i32 %59, 48
store i32 %60, i32* %15
%61 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 4
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = sub nsw i32 %63, 48
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [5 x i32], [5 x i32]* @main.incr_tab, i64 0, i64 %65
%67 = load i32, i32* %66
store i32 %67, i32* %16
br label %91
68: ; preds = %43, %43
%69 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%70 = getelementptr inbounds [10 x i8], [10 x i8]* %8, i64 0, i64 0
%71 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 0
%72 = getelementptr inbounds [3 x i8], [3 x i8]* %11, i64 0, i64 0
%73 = getelementptr inbounds [3 x i8], [3 x i8]* %12, i64 0, i64 0
%74 = getelementptr inbounds [3 x i8], [3 x i8]* %13, i64 0, i64 0
%75 = call i32 (i8*, i8*, ...) @sscanf(i8* %69, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %70, i8* %9, i8* %71, i8* %9, i8* %72, i8* %9, i8* %73, i8* %9, i8* %74)
%76 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 0
%77 = call i32 (i8*, ...) bitcast (i32 (...)* @cvt to i32 (i8*, ...)*)(i8* %76)
store i32 %77, i32* %3
%78 = getelementptr inbounds [3 x i8], [3 x i8]* %11, i64 0, i64 0
%79 = call i32 (i8*, ...) bitcast (i32 (...)* @cvt to i32 (i8*, ...)*)(i8* %78)
store i32 %79, i32* %4
%80 = getelementptr inbounds [3 x i8], [3 x i8]* %12, i64 0, i64 0
%81 = call i32 (i8*, ...) bitcast (i32 (...)* @cvt to i32 (i8*, ...)*)(i8* %80)
store i32 %81, i32* %5
%82 = getelementptr inbounds [3 x i8], [3 x i8]* %13, i64 0, i64 0
%83 = call i32 (i8*, ...) bitcast (i32 (...)* @cvt to i32 (i8*, ...)*)(i8* %82)
store i32 %83, i32* %6
store i32 8, i32* %15
%84 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 4
%85 = load i8, i8* %84
%86 = sext i8 %85 to i32
%87 = sub nsw i32 %86, 48
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [5 x i32], [5 x i32]* @main.incr_tab, i64 0, i64 %88
%90 = load i32, i32* %89
store i32 %90, i32* %16
br label %91
91: ; preds = %43, %68, %47
br label %92
92: ; preds = %22, %91, %42
%93 = getelementptr inbounds [10 x i8], [10 x i8]* %8, i64 0, i64 0
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 34, i8* %93, i32 34)
%95 = load i32, i32* %6
%96 = load i32, i32* %5
%97 = icmp eq i32 %95, %96
br i1 %97, label %114, label %98
98: ; preds = %92
%99 = load i32, i32* %5
store i32 %99, i32* %2
br label %100
100: ; preds = %107, %98
%101 = load i32, i32* %2
%102 = load i32, i32* %6
%103 = icmp ne i32 %101, %102
br i1 %103, label %104, label %111
104: ; preds = %100
%105 = load i32, i32* %2
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %105)
br label %107
107: ; preds = %104
%108 = load i32, i32* %16
%109 = load i32, i32* %2
%110 = add nsw i32 %109, %108
store i32 %110, i32* %2
br label %100
111: ; preds = %100
%112 = load i32, i32* %2
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %112)
br label %114
114: ; preds = %111, %92
%115 = load i32, i32* %3
store i32 %115, i32* %2
br label %116
116: ; preds = %123, %114
%117 = load i32, i32* %2
%118 = load i32, i32* %4
%119 = icmp ne i32 %117, %118
br i1 %119, label %120, label %127
120: ; preds = %116
%121 = load i32, i32* %2
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %121)
br label %123
123: ; preds = %120
%124 = load i32, i32* %16
%125 = load i32, i32* %2
%126 = add nsw i32 %125, %124
store i32 %126, i32* %2
br label %116
127: ; preds = %116
%128 = load i32, i32* %2
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %128)
%130 = load i32, i32* %15
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %130)
br label %18
132: ; preds = %18
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%134 = load i32, i32* %1
ret i32 %134
}

LLVM IR (-O2):
@main.incr_tab = internal unnamed_addr constant [5 x i32] [i32 0, i32 9, i32 -7, i32 9, i32 -7]
@.str.1 = [13 x i8] c"%s%c%2s%c%2s\00"
@.str.2 = [23 x i8] c"%s%c%2s%c%2s%c%2s%c%2s\00"
@.str.3 = [13 x i8] c"\0A {%c%s%c,{ \00"
@.str.4 = [6 x i8] c"%3d, \00"
@.str.5 = [10 x i8] c"}, %2d },\00"
@str = [4 x i8] c"\0A};\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = alloca [10 x i8]
%3 = alloca i8
%4 = alloca [3 x i8]
%5 = alloca [3 x i8]
%6 = alloca [3 x i8]
%7 = alloca [3 x i8]
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%10 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%13 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%14 = tail call i32 @putchar(i32 123)
%15 = call i32 (i8*, ...) bitcast (i32 (...)* @gets to i32 (i8*, ...)*)(i8* %8)
%16 = icmp eq i32 %15, 0
br i1 %16, label %102, label %17
17: ; preds = %0
%18 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 1
%19 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 4
br label %20
20: ; preds = %17, %97
%21 = phi i32 [ undef, %17 ], [ %85, %97 ]
%22 = phi i32 [ undef, %17 ], [ %86, %97 ]
%23 = phi i32 [ undef, %17 ], [ %87, %97 ]
%24 = phi i32 [ undef, %17 ], [ %88, %97 ]
%25 = phi i32 [ undef, %17 ], [ %89, %97 ]
%26 = phi i32 [ undef, %17 ], [ %90, %97 ]
%27 = load i8, i8* %8
%28 = sext i8 %27 to i32
switch i32 %28, label %68 [
i32 72, label %29
i32 86, label %29
i32 68, label %36
]
29: ; preds = %20, %20
%30 = call i32 (i8*, i8*, ...) @sscanf(i8* %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %9, i8* %3, i8* %10, i8* %3, i8* %11)
%31 = call i32 (i8*, ...) bitcast (i32 (...)* @cvt to i32 (i8*, ...)*)(i8* %10)
%32 = call i32 (i8*, ...) bitcast (i32 (...)* @cvt to i32 (i8*, ...)*)(i8* %11)
%33 = load i8, i8* %8
%34 = icmp eq i8 %33, 72
%35 = select i1 %34, i32 1, i32 8
br label %62
36: ; preds = %20
%37 = load i8, i8* %18
%38 = sext i8 %37 to i32
switch i32 %38, label %68 [
i32 56, label %39
i32 54, label %39
i32 55, label %39
i32 52, label %51
i32 53, label %51
]
39: ; preds = %36, %36, %36
%40 = call i32 (i8*, i8*, ...) @sscanf(i8* %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %9, i8* %3, i8* %10, i8* %3, i8* %11)
%41 = call i32 (i8*, ...) bitcast (i32 (...)* @cvt to i32 (i8*, ...)*)(i8* %10)
%42 = call i32 (i8*, ...) bitcast (i32 (...)* @cvt to i32 (i8*, ...)*)(i8* %11)
%43 = load i8, i8* %18
%44 = sext i8 %43 to i32
%45 = add nsw i32 %44, -48
%46 = load i8, i8* %19
%47 = sext i8 %46 to i64
%48 = add nsw i64 %47, -48
%49 = getelementptr inbounds [5 x i32], [5 x i32]* @main.incr_tab, i64 0, i64 %48
%50 = load i32, i32* %49
br label %62
51: ; preds = %36, %36
%52 = call i32 (i8*, i8*, ...) @sscanf(i8* %8, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %9, i8* %3, i8* %10, i8* %3, i8* %11, i8* %3, i8* %12, i8* %3, i8* %13)
%53 = call i32 (i8*, ...) bitcast (i32 (...)* @cvt to i32 (i8*, ...)*)(i8* %10)
%54 = call i32 (i8*, ...) bitcast (i32 (...)* @cvt to i32 (i8*, ...)*)(i8* %11)
%55 = call i32 (i8*, ...) bitcast (i32 (...)* @cvt to i32 (i8*, ...)*)(i8* %12)
%56 = call i32 (i8*, ...) bitcast (i32 (...)* @cvt to i32 (i8*, ...)*)(i8* %13)
%57 = load i8, i8* %19
%58 = sext i8 %57 to i64
%59 = add nsw i64 %58, -48
%60 = getelementptr inbounds [5 x i32], [5 x i32]* @main.incr_tab, i64 0, i64 %59
%61 = load i32, i32* %60
br label %68
62: ; preds = %39, %29
%63 = phi i32 [ %31, %29 ], [ %41, %39 ]
%64 = phi i32 [ %32, %29 ], [ %42, %39 ]
%65 = phi i32 [ 8, %29 ], [ %45, %39 ]
%66 = phi i32 [ %35, %29 ], [ %50, %39 ]
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 34, i8* %9, i32 34)
br label %84
68: ; preds = %51, %36, %20
%69 = phi i32 [ %26, %20 ], [ %26, %36 ], [ %53, %51 ]
%70 = phi i32 [ %25, %20 ], [ %25, %36 ], [ %54, %51 ]
%71 = phi i32 [ %24, %20 ], [ %24, %36 ], [ %55, %51 ]
%72 = phi i32 [ %23, %20 ], [ %23, %36 ], [ %56, %51 ]
%73 = phi i32 [ %22, %20 ], [ %22, %36 ], [ 8, %51 ]
%74 = phi i32 [ %21, %20 ], [ %21, %36 ], [ %61, %51 ]
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 34, i8* %9, i32 34)
%76 = icmp eq i32 %72, %71
br i1 %76, label %84, label %77
77: ; preds = %68, %77
%78 = phi i32 [ %80, %77 ], [ %71, %68 ]
%79 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %78)
%80 = add nsw i32 %78, %74
%81 = icmp eq i32 %80, %72
br i1 %81, label %82, label %77
82: ; preds = %77
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %72)
br label %84
84: ; preds = %62, %82, %68
%85 = phi i32 [ %66, %62 ], [ %74, %82 ], [ %74, %68 ]
%86 = phi i32 [ %65, %62 ], [ %73, %82 ], [ %73, %68 ]
%87 = phi i32 [ 0, %62 ], [ %72, %82 ], [ %71, %68 ]
%88 = phi i32 [ 0, %62 ], [ %71, %82 ], [ %71, %68 ]
%89 = phi i32 [ %64, %62 ], [ %70, %82 ], [ %70, %68 ]
%90 = phi i32 [ %63, %62 ], [ %69, %82 ], [ %69, %68 ]
%91 = icmp eq i32 %90, %89
br i1 %91, label %97, label %92
92: ; preds = %84, %92
%93 = phi i32 [ %95, %92 ], [ %90, %84 ]
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %93)
%95 = add nsw i32 %93, %85
%96 = icmp eq i32 %95, %89
br i1 %96, label %97, label %92
97: ; preds = %92, %84
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %89)
%99 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %86)
%100 = call i32 (i8*, ...) bitcast (i32 (...)* @gets to i32 (i8*, ...)*)(i8* %8)
%101 = icmp eq i32 %100, 0
br i1 %101, label %102, label %20
102: ; preds = %97, %0
%103 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret i32 0
}