#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char EGN[11] = {0};
  int temp = 0;
  int temp2 = 0;
  int day = 0;
  int month = 0;
  int year = 0;
  int controlnum = 0;
  scanf("%12s", EGN);
  temp = (temp + EGN[0]) - 48;
  temp = temp * 10;
  temp = (temp + EGN[1]) - 48;
  year = temp;
  temp = 0;
  temp = (temp + EGN[2]) - 48;
  temp = temp * 10;
  temp = (temp + EGN[3]) - 48;
  month = temp;
  temp = 0;
  temp = (temp + EGN[4]) - 48;
  temp = temp * 10;
  temp = (temp + EGN[5]) - 48;
  day = temp;
  temp = 0;
  if (month > 52) {
    printf("\n0");
    return 0;
  }
  if (month < 1) {
    printf("\n0");
    return 0;
  }
  if (month > 12 && month < 33) {
    month = month - 20;
  }
  if (month > 32 && month < 53) {
    month = month - 40;
  }
  switch (month) {
  case 1:
    if (day > 31) {
      printf("\n0");
      return 0;
    }
    break;
  case 2:
    if (year % 4 == 0) {
      if (day > 29) {
        printf("\n0");
        return 0;
      }
    }
    if (year % 4 != 0) {
      if (day > 28) {
        printf("\n0");
        return 0;
      }
    }
    break;
  case 3:
    if (day > 31) {
      printf("\n0");
      return 0;
    }
    break;
  case 4:
    if (day > 30) {
      printf("\n0");
      return 0;
    }
    break;
  case 5:
    if (day > 31) {
      printf("\n0");
      return 0;
    }
    break;
  case 6:
    if (day > 30) {
      printf("\n0");
      return 0;
    }
    break;
  case 7:
    if (day > 31) {
      printf("\n0");
      return 0;
    }
    break;
  case 8:
    if (day > 31) {
      printf("\n0");
      return 0;
    }
    break;
  case 9:
    if (day > 30) {
      printf("\n0");
      return 0;
    }
    break;
  case 10:
    if (day > 31) {
      printf("\n0");
      return 0;
    }
    break;
  case 11:
    if (day > 30) {
      printf("\n0");
      return 0;
    }
    break;
  case 12:
    if (day > 31) {
      printf("\n0");
      return 0;
    }
    break;
  }
  temp = 0;
  while (temp < 9) {
    temp2 = EGN[temp] - 48;
    switch (temp) {
    case 0:
      temp2 = temp2 * 2;
      break;
    case 1:
      temp2 = temp2 * 4;
      break;
    case 2:
      temp2 = temp2 * 8;
      break;
    case 3:
      temp2 = temp2 * 5;
      break;
    case 4:
      temp2 = temp2 * 10;
      break;
    case 5:
      temp2 = temp2 * 9;
      break;
    case 6:
      temp2 = temp2 * 7;
      break;
    case 7:
      temp2 = temp2 * 3;
      break;
    case 8:
      temp2 = temp2 * 6;
      break;
    }
    controlnum = controlnum + temp2;
    temp++;
  }
  temp = controlnum % 11;
  if (temp == 10) {
    controlnum = 0;
  }
  if (temp < 10) {
    controlnum = temp;
  }
  temp = EGN[9] - 48;
  if (controlnum != temp) {
    printf("0");
    return 0;
  }
  if (controlnum == temp) {
    printf("1");
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xf(%rbp),%rdi
xor    %esi,%esi
mov    $0xb,%edx
call   1040 <memset@plt>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
lea    -0xf(%rbp),%rsi
lea    0xed0(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x14(%rbp),%eax
movsbl -0xf(%rbp),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0x14(%rbp)
imul   $0xa,-0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
movsbl -0xe(%rbp),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
movsbl -0xd(%rbp),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0x14(%rbp)
imul   $0xa,-0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
movsbl -0xc(%rbp),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
movsbl -0xb(%rbp),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0x14(%rbp)
imul   $0xa,-0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
movsbl -0xa(%rbp),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x34,-0x20(%rbp)
jle    1241 <main+0x111>
lea    0xe29(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    163f <main+0x50f>
cmpl   $0x1,-0x20(%rbp)
jge    1263 <main+0x133>
lea    0xe07(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    163f <main+0x50f>
cmpl   $0xc,-0x20(%rbp)
jle    1280 <main+0x150>
cmpl   $0x21,-0x20(%rbp)
jge    1280 <main+0x150>
mov    -0x20(%rbp),%eax
sub    $0x14,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x20,-0x20(%rbp)
jle    129d <main+0x16d>
cmpl   $0x35,-0x20(%rbp)
jge    129d <main+0x16d>
mov    -0x20(%rbp),%eax
sub    $0x28,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x30(%rbp)
sub    $0xb,%eax
ja     14ee <main+0x3be>
mov    -0x30(%rbp),%rax
lea    0xd43(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmpl   $0x1f,-0x1c(%rbp)
jle    12e8 <main+0x1b8>
lea    0xd82(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    163f <main+0x50f>
jmp    14ee <main+0x3be>
mov    -0x24(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1328 <main+0x1f8>
cmpl   $0x1d,-0x1c(%rbp)
jle    1323 <main+0x1f3>
lea    0xd47(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    163f <main+0x50f>
jmp    1328 <main+0x1f8>
mov    -0x24(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1363 <main+0x233>
cmpl   $0x1c,-0x1c(%rbp)
jle    135e <main+0x22e>
lea    0xd0c(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    163f <main+0x50f>
jmp    1363 <main+0x233>
jmp    14ee <main+0x3be>
cmpl   $0x1f,-0x1c(%rbp)
jle    138a <main+0x25a>
lea    0xce0(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    163f <main+0x50f>
jmp    14ee <main+0x3be>
cmpl   $0x1e,-0x1c(%rbp)
jle    13b1 <main+0x281>
lea    0xcb9(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    163f <main+0x50f>
jmp    14ee <main+0x3be>
cmpl   $0x1f,-0x1c(%rbp)
jle    13d8 <main+0x2a8>
lea    0xc92(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    163f <main+0x50f>
jmp    14ee <main+0x3be>
cmpl   $0x1e,-0x1c(%rbp)
jle    13ff <main+0x2cf>
lea    0xc6b(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    163f <main+0x50f>
jmp    14ee <main+0x3be>
cmpl   $0x1f,-0x1c(%rbp)
jle    1426 <main+0x2f6>
lea    0xc44(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    163f <main+0x50f>
jmp    14ee <main+0x3be>
cmpl   $0x1f,-0x1c(%rbp)
jle    144d <main+0x31d>
lea    0xc1d(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    163f <main+0x50f>
jmp    14ee <main+0x3be>
cmpl   $0x1e,-0x1c(%rbp)
jle    1474 <main+0x344>
lea    0xbf6(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    163f <main+0x50f>
jmp    14ee <main+0x3be>
cmpl   $0x1f,-0x1c(%rbp)
jle    149b <main+0x36b>
lea    0xbcf(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    163f <main+0x50f>
jmp    14ee <main+0x3be>
cmpl   $0x1e,-0x1c(%rbp)
jle    14c2 <main+0x392>
lea    0xba8(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    163f <main+0x50f>
jmp    14ee <main+0x3be>
cmpl   $0x1f,-0x1c(%rbp)
jle    14e9 <main+0x3b9>
lea    0xb81(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    163f <main+0x50f>
jmp    14ee <main+0x3be>
movl   $0x0,-0x14(%rbp)
cmpl   $0x9,-0x14(%rbp)
jge    15b7 <main+0x487>
movslq -0x14(%rbp),%rax
movsbl -0xf(%rbp,%rax,1),%eax
add    $0xffffffd0,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %rax,-0x38(%rbp)
sub    $0x8,%rax
ja     15a0 <main+0x470>
mov    -0x38(%rbp),%rax
lea    0xb06(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x18(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    15a0 <main+0x470>
mov    -0x18(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x18(%rbp)
jmp    15a0 <main+0x470>
mov    -0x18(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0x18(%rbp)
jmp    15a0 <main+0x470>
imul   $0x5,-0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    15a0 <main+0x470>
imul   $0xa,-0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    15a0 <main+0x470>
imul   $0x9,-0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    15a0 <main+0x470>
imul   $0x7,-0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    15a0 <main+0x470>
imul   $0x3,-0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    15a0 <main+0x470>
imul   $0x6,-0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x28(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    14f5 <main+0x3c5>
mov    -0x28(%rbp),%eax
mov    $0xb,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jne    15d6 <main+0x4a6>
movl   $0x0,-0x28(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    15e6 <main+0x4b6>
mov    -0x14(%rbp),%eax
mov    %eax,-0x28(%rbp)
movsbl -0x6(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x14(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     1614 <main+0x4e4>
lea    0xa57(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    163f <main+0x50f>
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    1638 <main+0x508>
lea    0xa35(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    163f <main+0x50f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0x7(%rsp)
movq   $0x0,(%rsp)
lea    0xee4(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsbl 0x2(%rsp),%eax
lea    (%rax,%rax,4),%edx
movsbl 0x3(%rsp),%ecx
lea    (%rcx,%rdx,2),%ebx
add    $0xfffffe20,%ebx
cmp    $0x65,%ebx
jge    11d4 <main+0xa4>
cmp    $0x30,%ebx
jle    11d4 <main+0xa4>
movsbl (%rsp),%edi
movsbl 0x1(%rsp),%r8d
movsbl 0x4(%rsp),%r11d
movsbl 0x5(%rsp),%r10d
lea    -0x3d(%rbx),%edx
lea    -0x30(%rbx),%esi
add    $0xffffffbc,%ebx
cmp    $0x14,%edx
cmovae %esi,%ebx
lea    -0x28(%rbx),%edx
cmp    $0x21,%ebx
cmovl  %ebx,%edx
add    $0xffffffff,%edx
cmp    $0xb,%edx
ja     1220 <main+0xf0>
lea    (%r11,%r11,4),%esi
lea    (%r10,%rsi,2),%ebx
add    $0xfffffe20,%ebx
lea    0xe41(%rip),%rsi
movslq (%rsi,%rdx,4),%rdx
add    %rsi,%rdx
jmp    *%rdx
cmp    $0x50,%ebx
jge    11d4 <main+0xa4>
jmp    1220 <main+0xf0>
cmp    $0x4f,%ebx
jl     1220 <main+0xf0>
lea    0xe5a(%rip),%rdi
call   1040 <printf@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret
lea    (%rdi,%rdi,4),%edx
lea    (%r8,%rdx,2),%r9d
add    $0xfffffdf0,%r9d
lea    0x3(%r9),%edx
test   %r9w,%r9w
cmovns %r9d,%edx
and    $0xfffc,%edx
sub    %dx,%r9w
jne    1215 <main+0xe5>
cmp    $0x4e,%ebx
jge    11d4 <main+0xa4>
test   %r9w,%r9w
je     1220 <main+0xf0>
cmp    $0x4d,%ebx
jge    11d4 <main+0xa4>
add    %edi,%edi
lea    (%rdi,%r8,4),%edx
lea    (%rdx,%rax,8),%eax
lea    (%rcx,%rcx,4),%ecx
add    %eax,%ecx
lea    (%r11,%r11,4),%eax
lea    (%rcx,%rax,2),%eax
lea    (%r10,%r10,8),%ecx
add    %eax,%ecx
movsbl 0x6(%rsp),%eax
lea    0x0(,%rax,8),%edx
sub    %eax,%edx
add    %ecx,%edx
movsbl 0x7(%rsp),%eax
lea    (%rax,%rax,2),%eax
add    %edx,%eax
movsbl 0x8(%rsp),%ecx
lea    (%rcx,%rcx,2),%ecx
lea    (%rax,%rcx,2),%eax
add    $0xfffff5e0,%eax
cltq
imul   $0x2e8ba2e9,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,2),%ecx
mov    %eax,%edx
sub    %ecx,%edx
xor    %ebx,%ebx
cmp    $0xa,%edx
cmove  %ebx,%eax
cmovl  %edx,%eax
movsbl 0x9(%rsp),%ecx
add    $0xffffffd0,%ecx
cmp    %ecx,%eax
jne    12b0 <main+0x180>
mov    $0x31,%edi
call   1030 <putchar@plt>
mov    $0x1,%ebx
jmp    11e2 <main+0xb2>
mov    $0x30,%edi
call   1030 <putchar@plt>
jmp    11e2 <main+0xb2>

LLVM IR (-O0):
@.str = [5 x i8] c"%12s\00"
@.str.1 = [3 x i8] c"\0A0\00"
@.str.2 = [2 x i8] c"0\00"
@.str.3 = [2 x i8] c"1\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = bitcast [11 x i8]* %2 to i8*
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
%10 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%11 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i32, i32* %3
%13 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = add nsw i32 %12, %15
%17 = sub nsw i32 %16, 48
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = mul nsw i32 %18, 10
store i32 %19, i32* %3
%20 = load i32, i32* %3
%21 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 1
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = add nsw i32 %20, %23
%25 = sub nsw i32 %24, 48
store i32 %25, i32* %3
%26 = load i32, i32* %3
store i32 %26, i32* %7
store i32 0, i32* %3
%27 = load i32, i32* %3
%28 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 2
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = add nsw i32 %27, %30
%32 = sub nsw i32 %31, 48
store i32 %32, i32* %3
%33 = load i32, i32* %3
%34 = mul nsw i32 %33, 10
store i32 %34, i32* %3
%35 = load i32, i32* %3
%36 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 3
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = add nsw i32 %35, %38
%40 = sub nsw i32 %39, 48
store i32 %40, i32* %3
%41 = load i32, i32* %3
store i32 %41, i32* %6
store i32 0, i32* %3
%42 = load i32, i32* %3
%43 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 4
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = add nsw i32 %42, %45
%47 = sub nsw i32 %46, 48
store i32 %47, i32* %3
%48 = load i32, i32* %3
%49 = mul nsw i32 %48, 10
store i32 %49, i32* %3
%50 = load i32, i32* %3
%51 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 5
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = add nsw i32 %50, %53
%55 = sub nsw i32 %54, 48
store i32 %55, i32* %3
%56 = load i32, i32* %3
store i32 %56, i32* %5
store i32 0, i32* %3
%57 = load i32, i32* %6
%58 = icmp sgt i32 %57, 52
br i1 %58, label %59, label %61
59: ; preds = %0
%60 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %246
61: ; preds = %0
%62 = load i32, i32* %6
%63 = icmp slt i32 %62, 1
br i1 %63, label %64, label %66
64: ; preds = %61
%65 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %246
66: ; preds = %61
%67 = load i32, i32* %6
%68 = icmp sgt i32 %67, 12
br i1 %68, label %69, label %75
69: ; preds = %66
%70 = load i32, i32* %6
%71 = icmp slt i32 %70, 33
br i1 %71, label %72, label %75
72: ; preds = %69
%73 = load i32, i32* %6
%74 = sub nsw i32 %73, 20
store i32 %74, i32* %6
br label %75
75: ; preds = %72, %69, %66
%76 = load i32, i32* %6
%77 = icmp sgt i32 %76, 32
br i1 %77, label %78, label %84
78: ; preds = %75
%79 = load i32, i32* %6
%80 = icmp slt i32 %79, 53
br i1 %80, label %81, label %84
81: ; preds = %78
%82 = load i32, i32* %6
%83 = sub nsw i32 %82, 40
store i32 %83, i32* %6
br label %84
84: ; preds = %81, %78, %75
%85 = load i32, i32* %6
switch i32 %85, label %173 [
i32 1, label %86
i32 2, label %92
i32 3, label %113
i32 4, label %119
i32 5, label %125
i32 6, label %131
i32 7, label %137
i32 8, label %143
i32 9, label %149
i32 10, label %155
i32 11, label %161
i32 12, label %167
]
86: ; preds = %84
%87 = load i32, i32* %5
%88 = icmp sgt i32 %87, 31
br i1 %88, label %89, label %91
89: ; preds = %86
%90 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %246
91: ; preds = %86
br label %173
92: ; preds = %84
%93 = load i32, i32* %7
%94 = srem i32 %93, 4
%95 = icmp eq i32 %94, 0
br i1 %95, label %96, label %102
96: ; preds = %92
%97 = load i32, i32* %5
%98 = icmp sgt i32 %97, 29
br i1 %98, label %99, label %101
99: ; preds = %96
%100 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %246
101: ; preds = %96
br label %102
102: ; preds = %101, %92
%103 = load i32, i32* %7
%104 = srem i32 %103, 4
%105 = icmp ne i32 %104, 0
br i1 %105, label %106, label %112
106: ; preds = %102
%107 = load i32, i32* %5
%108 = icmp sgt i32 %107, 28
br i1 %108, label %109, label %111
109: ; preds = %106
%110 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %246
111: ; preds = %106
br label %112
112: ; preds = %111, %102
br label %173
113: ; preds = %84
%114 = load i32, i32* %5
%115 = icmp sgt i32 %114, 31
br i1 %115, label %116, label %118
116: ; preds = %113
%117 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %246
118: ; preds = %113
br label %173
119: ; preds = %84
%120 = load i32, i32* %5
%121 = icmp sgt i32 %120, 30
br i1 %121, label %122, label %124
122: ; preds = %119
%123 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %246
124: ; preds = %119
br label %173
125: ; preds = %84
%126 = load i32, i32* %5
%127 = icmp sgt i32 %126, 31
br i1 %127, label %128, label %130
128: ; preds = %125
%129 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %246
130: ; preds = %125
br label %173
131: ; preds = %84
%132 = load i32, i32* %5
%133 = icmp sgt i32 %132, 30
br i1 %133, label %134, label %136
134: ; preds = %131
%135 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %246
136: ; preds = %131
br label %173
137: ; preds = %84
%138 = load i32, i32* %5
%139 = icmp sgt i32 %138, 31
br i1 %139, label %140, label %142
140: ; preds = %137
%141 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %246
142: ; preds = %137
br label %173
143: ; preds = %84
%144 = load i32, i32* %5
%145 = icmp sgt i32 %144, 31
br i1 %145, label %146, label %148
146: ; preds = %143
%147 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %246
148: ; preds = %143
br label %173
149: ; preds = %84
%150 = load i32, i32* %5
%151 = icmp sgt i32 %150, 30
br i1 %151, label %152, label %154
152: ; preds = %149
%153 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %246
154: ; preds = %149
br label %173
155: ; preds = %84
%156 = load i32, i32* %5
%157 = icmp sgt i32 %156, 31
br i1 %157, label %158, label %160
158: ; preds = %155
%159 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %246
160: ; preds = %155
br label %173
161: ; preds = %84
%162 = load i32, i32* %5
%163 = icmp sgt i32 %162, 30
br i1 %163, label %164, label %166
164: ; preds = %161
%165 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %246
166: ; preds = %161
br label %173
167: ; preds = %84
%168 = load i32, i32* %5
%169 = icmp sgt i32 %168, 31
br i1 %169, label %170, label %172
170: ; preds = %167
%171 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %246
172: ; preds = %167
br label %173
173: ; preds = %84, %172, %166, %160, %154, %148, %142, %136, %130, %124, %118, %112, %91
store i32 0, i32* %3
br label %174
174: ; preds = %212, %173
%175 = load i32, i32* %3
%176 = icmp slt i32 %175, 9
br i1 %176, label %177, label %218
177: ; preds = %174
%178 = load i32, i32* %3
%179 = sext i32 %178 to i64
%180 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 %179
%181 = load i8, i8* %180
%182 = sext i8 %181 to i32
%183 = sub nsw i32 %182, 48
store i32 %183, i32* %4
%184 = load i32, i32* %3
switch i32 %184, label %212 [
i32 0, label %185
i32 1, label %188
i32 2, label %191
i32 3, label %194
i32 4, label %197
i32 5, label %200
i32 6, label %203
i32 7, label %206
i32 8, label %209
]
185: ; preds = %177
%186 = load i32, i32* %4
%187 = mul nsw i32 %186, 2
store i32 %187, i32* %4
br label %212
188: ; preds = %177
%189 = load i32, i32* %4
%190 = mul nsw i32 %189, 4
store i32 %190, i32* %4
br label %212
191: ; preds = %177
%192 = load i32, i32* %4
%193 = mul nsw i32 %192, 8
store i32 %193, i32* %4
br label %212
194: ; preds = %177
%195 = load i32, i32* %4
%196 = mul nsw i32 %195, 5
store i32 %196, i32* %4
br label %212
197: ; preds = %177
%198 = load i32, i32* %4
%199 = mul nsw i32 %198, 10
store i32 %199, i32* %4
br label %212
200: ; preds = %177
%201 = load i32, i32* %4
%202 = mul nsw i32 %201, 9
store i32 %202, i32* %4
br label %212
203: ; preds = %177
%204 = load i32, i32* %4
%205 = mul nsw i32 %204, 7
store i32 %205, i32* %4
br label %212
206: ; preds = %177
%207 = load i32, i32* %4
%208 = mul nsw i32 %207, 3
store i32 %208, i32* %4
br label %212
209: ; preds = %177
%210 = load i32, i32* %4
%211 = mul nsw i32 %210, 6
store i32 %211, i32* %4
br label %212
212: ; preds = %177, %209, %206, %203, %200, %197, %194, %191, %188, %185
%213 = load i32, i32* %8
%214 = load i32, i32* %4
%215 = add nsw i32 %213, %214
store i32 %215, i32* %8
%216 = load i32, i32* %3
%217 = add nsw i32 %216, 1
store i32 %217, i32* %3
br label %174
218: ; preds = %174
%219 = load i32, i32* %8
%220 = srem i32 %219, 11
store i32 %220, i32* %3
%221 = load i32, i32* %3
%222 = icmp eq i32 %221, 10
br i1 %222, label %223, label %224
223: ; preds = %218
store i32 0, i32* %8
br label %224
224: ; preds = %223, %218
%225 = load i32, i32* %3
%226 = icmp slt i32 %225, 10
br i1 %226, label %227, label %229
227: ; preds = %224
%228 = load i32, i32* %3
store i32 %228, i32* %8
br label %229
229: ; preds = %227, %224
%230 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 9
%231 = load i8, i8* %230
%232 = sext i8 %231 to i32
%233 = sub nsw i32 %232, 48
store i32 %233, i32* %3
%234 = load i32, i32* %8
%235 = load i32, i32* %3
%236 = icmp ne i32 %234, %235
br i1 %236, label %237, label %239
237: ; preds = %229
%238 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %246
239: ; preds = %229
%240 = load i32, i32* %8
%241 = load i32, i32* %3
%242 = icmp eq i32 %240, %241
br i1 %242, label %243, label %245
243: ; preds = %239
%244 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %1
br label %246
245: ; preds = %239
store i32 0, i32* %1
br label %246
246: ; preds = %245, %243, %237, %170, %164, %158, %152, %146, %140, %134, %128, %122, %116, %109, %99, %89, %64, %59
%247 = load i32, i32* %1
ret i32 %247
}

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