#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*/ d();
long long gr(int, scalar_t__);
int /*<<< orphan*/ gw(int, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ td(long long, long long);
int tm(long long, long long);
int main(void) {
  long long t0, t1;
  d();
  gw(0, 0, 118);
  gw(1, 0, 20);
  gw(2, 0, 50);
  gw(3, 0, 1000);
  gw(4, 0, 13);
  gw(5, 0, 0);
  gw(6, 0, 0);
  gw(7, 0, 0);
  gw(8, 0, 0);
  t0 = 0;
_1:
  gw(6, 0, gr(5, 0));
  t0 = gr(tm(gr(6, 0), gr(2, 0)), (td(gr(6, 0), gr(2, 0))) + 9) - 48;
_2:
  t1 = gr(6, 0) + 1;
  gw(6, 0, gr(6, 0) + 1);
  t1 -= gr(5, 0);
  t1 -= gr(4, 0);
  if ((t1) != 0)
    goto _3;
  else
    goto _4;
_3:
  t0 *= gr(tm(gr(6, 0), gr(2, 0)), (td(gr(6, 0), gr(2, 0))) + 9) - 48;
  goto _2;
_4:
  if (t0 > gr(8, 0))
    goto _10;
  else
    goto _5;
_5:
  t0 = gr(5, 0) + 1;
  gw(5, 0, gr(5, 0) + 1);
  t0 -= gr(3, 0);
  if ((t0) != 0)
    goto _1;
  else
    goto _6;
_6:
  gw(7, 0, 9);
_7:
  printf("%c", (char)(gr(gr(7, 0), 0) + 48));
  if ((gr(7, 0) - 8 - gr(4, 0)) != 0)
    goto _9;
  else
    goto _8;
_8:
  printf("=");
  printf("%lld ", gr(8, 0));
  return 0;
_9:
  gw(7, 0, gr(7, 0) + 1);
  goto _7;
_10:
  gw(8, 0, t0);
  gw(6, 0, 0);
_11:
  gw(gr(6, 0) + 9, 0,
     gr(tm(gr(6, 0) + gr(5, 0), gr(2, 0)),
        (td(gr(6, 0) + gr(5, 0), gr(2, 0))) + 9) -
         48);
  t0 = gr(6, 0) + 1;
  gw(6, 0, gr(6, 0) + 1);
  t0 -= gr(4, 0);
  if ((t0) != 0)
    goto _11;
  else
    goto _5;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <d@plt>
xor    %esi,%esi
mov    $0x76,%edx
mov    %esi,%edi
call   1040 <gw@plt>
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x14,%edx
call   1040 <gw@plt>
mov    $0x2,%edi
xor    %esi,%esi
mov    $0x32,%edx
call   1040 <gw@plt>
mov    $0x3,%edi
xor    %esi,%esi
mov    $0x3e8,%edx
call   1040 <gw@plt>
mov    $0x4,%edi
xor    %esi,%esi
mov    $0xd,%edx
call   1040 <gw@plt>
mov    $0x5,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <gw@plt>
mov    $0x6,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <gw@plt>
mov    $0x7,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <gw@plt>
mov    $0x8,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <gw@plt>
movq   $0x0,-0x10(%rbp)
mov    $0x5,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %eax,%edx
mov    $0x6,%edi
xor    %esi,%esi
call   1040 <gw@plt>
mov    $0x6,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %rax,-0x30(%rbp)
mov    $0x2,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    -0x30(%rbp),%rdi
mov    %rax,%rsi
call   1060 <tm@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x6,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %rax,-0x28(%rbp)
mov    $0x2,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    -0x28(%rbp),%rdi
mov    %rax,%rsi
call   1080 <td@plt>
mov    -0x1c(%rbp),%edi
mov    %rax,%rsi
add    $0x9,%rsi
call   1070 <gr@plt>
sub    $0x30,%rax
mov    %rax,-0x10(%rbp)
mov    $0x6,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    $0x6,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
add    $0x1,%rax
mov    %eax,%edx
mov    $0x6,%edi
xor    %esi,%esi
call   1040 <gw@plt>
mov    $0x5,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    $0x4,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1317 <main+0x1b7>
jmp    131c <main+0x1bc>
jmp    1398 <main+0x238>
mov    $0x6,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %rax,-0x48(%rbp)
mov    $0x2,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    -0x48(%rbp),%rdi
mov    %rax,%rsi
call   1060 <tm@plt>
mov    %eax,-0x34(%rbp)
mov    $0x6,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %rax,-0x40(%rbp)
mov    $0x2,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    -0x40(%rbp),%rdi
mov    %rax,%rsi
call   1080 <td@plt>
mov    -0x34(%rbp),%edi
mov    %rax,%rsi
add    $0x9,%rsi
call   1070 <gr@plt>
sub    $0x30,%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1299 <main+0x139>
mov    -0x10(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    $0x8,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %rax,%rcx
mov    -0x50(%rbp),%rax
cmp    %rcx,%rax
jle    13c3 <main+0x263>
jmp    150d <main+0x3ad>
jmp    13c8 <main+0x268>
mov    $0x5,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    $0x5,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
add    $0x1,%rax
mov    %eax,%edx
mov    $0x5,%edi
xor    %esi,%esi
call   1040 <gw@plt>
mov    $0x3,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     142a <main+0x2ca>
jmp    120b <main+0xab>
jmp    142f <main+0x2cf>
mov    $0x7,%edi
xor    %esi,%esi
mov    $0x9,%edx
call   1040 <gw@plt>
mov    $0x7,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %eax,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
add    $0x30,%rax
movsbl %al,%esi
lea    0xb99(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x7,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
sub    $0x8,%rax
mov    %rax,-0x58(%rbp)
mov    $0x4,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %rax,%rcx
mov    -0x58(%rbp),%rax
sub    %rcx,%rax
cmp    $0x0,%rax
je     14ab <main+0x34b>
jmp    14e8 <main+0x388>
jmp    14b0 <main+0x350>
lea    0xb4c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x8,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %rax,%rsi
lea    0xb2f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret
mov    $0x7,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
add    $0x1,%rax
mov    %eax,%edx
mov    $0x7,%edi
xor    %esi,%esi
call   1040 <gw@plt>
jmp    1440 <main+0x2e0>
mov    -0x10(%rbp),%rax
mov    %eax,%edx
mov    $0x8,%edi
xor    %esi,%esi
call   1040 <gw@plt>
mov    $0x6,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <gw@plt>
mov    $0x6,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
add    $0x9,%rax
mov    %eax,-0x5c(%rbp)
mov    $0x6,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %rax,-0x80(%rbp)
mov    $0x5,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %rax,%rcx
mov    -0x80(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x78(%rbp)
mov    $0x2,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    -0x78(%rbp),%rdi
mov    %rax,%rsi
call   1060 <tm@plt>
mov    %eax,-0x60(%rbp)
mov    $0x6,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %rax,-0x70(%rbp)
mov    $0x5,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %rax,%rcx
mov    -0x70(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    $0x2,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    -0x68(%rbp),%rdi
mov    %rax,%rsi
call   1080 <td@plt>
mov    -0x60(%rbp),%edi
mov    %rax,%rsi
add    $0x9,%rsi
call   1070 <gr@plt>
mov    -0x5c(%rbp),%edi
sub    $0x30,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1040 <gw@plt>
mov    $0x6,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    $0x6,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
add    $0x1,%rax
mov    %eax,%edx
mov    $0x6,%edi
xor    %esi,%esi
call   1040 <gw@plt>
mov    $0x4,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gr@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1656 <main+0x4f6>
jmp    152d <main+0x3cd>
jmp    13c8 <main+0x268>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1040 <d@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x76,%edx
call   1050 <gw@plt>
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x14,%edx
call   1050 <gw@plt>
mov    $0x2,%edi
xor    %esi,%esi
mov    $0x32,%edx
call   1050 <gw@plt>
mov    $0x3,%edi
xor    %esi,%esi
mov    $0x3e8,%edx
call   1050 <gw@plt>
mov    $0x4,%edi
xor    %esi,%esi
mov    $0xd,%edx
call   1050 <gw@plt>
mov    $0x5,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <gw@plt>
mov    $0x6,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <gw@plt>
mov    $0x7,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <gw@plt>
mov    $0x8,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <gw@plt>
jmp    1253 <main+0xe3>
nopw   0x0(%rax,%rax,1)
mov    $0x5,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rax,%rbx
add    $0x1,%rbx
mov    $0x5,%edi
xor    %esi,%esi
call   1080 <gr@plt>
lea    0x1(%rax),%edx
mov    $0x5,%edi
xor    %esi,%esi
call   1050 <gw@plt>
mov    $0x3,%edi
xor    %esi,%esi
call   1080 <gr@plt>
cmp    %rax,%rbx
je     14ac <main+0x33c>
mov    $0x5,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    $0x6,%edi
xor    %esi,%esi
mov    %eax,%edx
call   1050 <gw@plt>
mov    $0x6,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rax,%rbx
mov    $0x2,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1070 <tm@plt>
mov    %eax,%ebp
mov    $0x6,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rax,%rbx
mov    $0x2,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1090 <td@plt>
lea    0x9(%rax),%rsi
mov    %ebp,%edi
call   1080 <gr@plt>
mov    %rax,%r14
add    $0xffffffffffffffd0,%r14
nopl   (%rax)
mov    $0x6,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rax,%rbx
add    $0x1,%rbx
mov    $0x6,%edi
xor    %esi,%esi
call   1080 <gr@plt>
lea    0x1(%rax),%edx
mov    $0x6,%edi
xor    %esi,%esi
call   1050 <gw@plt>
mov    $0x5,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rax,%rbp
mov    $0x4,%edi
xor    %esi,%esi
call   1080 <gr@plt>
add    %rbp,%rax
cmp    %rax,%rbx
je     1390 <main+0x220>
mov    $0x6,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rax,%rbx
mov    $0x2,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1070 <tm@plt>
mov    %eax,%ebx
mov    $0x6,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rax,%rbp
mov    $0x2,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rbp,%rdi
mov    %rax,%rsi
call   1090 <td@plt>
lea    0x9(%rax),%rsi
mov    %ebx,%edi
call   1080 <gr@plt>
add    $0xffffffffffffffd0,%rax
imul   %rax,%r14
jmp    12d0 <main+0x160>
nopw   0x0(%rax,%rax,1)
mov    $0x8,%edi
xor    %esi,%esi
call   1080 <gr@plt>
cmp    %rax,%r14
jle    1210 <main+0xa0>
mov    $0x8,%edi
xor    %esi,%esi
mov    %r14d,%edx
call   1050 <gw@plt>
mov    $0x6,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <gw@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x6,%edi
xor    %esi,%esi
call   1080 <gr@plt>
lea    0x9(%rax),%r14d
mov    $0x6,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rax,%rbp
mov    $0x5,%edi
xor    %esi,%esi
call   1080 <gr@plt>
add    %rax,%rbp
mov    $0x2,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rbp,%rdi
mov    %rax,%rsi
call   1070 <tm@plt>
mov    %eax,%ebp
mov    $0x6,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rax,%rbx
mov    $0x5,%edi
xor    %esi,%esi
call   1080 <gr@plt>
add    %rax,%rbx
mov    $0x2,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1090 <td@plt>
lea    0x9(%rax),%rsi
mov    %ebp,%edi
call   1080 <gr@plt>
lea    -0x30(%rax),%edx
mov    %r14d,%edi
xor    %esi,%esi
call   1050 <gw@plt>
mov    $0x6,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rax,%rbx
add    $0x1,%rbx
mov    $0x6,%edi
xor    %esi,%esi
call   1080 <gr@plt>
lea    0x1(%rax),%edx
mov    $0x6,%edi
xor    %esi,%esi
call   1050 <gw@plt>
mov    $0x4,%edi
xor    %esi,%esi
call   1080 <gr@plt>
cmp    %rax,%rbx
jne    13d0 <main+0x260>
jmp    1210 <main+0xa0>
mov    $0x9,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x7,%edi
xor    %esi,%esi
call   1050 <gw@plt>
mov    $0x7,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1080 <gr@plt>
add    $0x30,%al
movsbl %al,%edi
call   1030 <putchar@plt>
mov    $0x7,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rax,%rbx
add    $0xfffffffffffffff8,%rbx
mov    $0x4,%edi
xor    %esi,%esi
call   1080 <gr@plt>
cmp    %rax,%rbx
je     1523 <main+0x3b3>
mov    $0x7,%edi
xor    %esi,%esi
call   1080 <gr@plt>
mov    %rax,%rdx
add    $0x1,%edx
jmp    14c0 <main+0x350>
mov    $0x3d,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
xor    %esi,%esi
call   1080 <gr@plt>
lea    0xac0(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str.2 = [6 x i8] c"%lld \00"
define i32 @main() {
%1 = tail call i32 (...) @d()
%2 = tail call i32 @gw(i32 0, i32 0, i32 118)
%3 = tail call i32 @gw(i32 1, i32 0, i32 20)
%4 = tail call i32 @gw(i32 2, i32 0, i32 50)
%5 = tail call i32 @gw(i32 3, i32 0, i32 1000)
%6 = tail call i32 @gw(i32 4, i32 0, i32 13)
%7 = tail call i32 @gw(i32 5, i32 0, i32 0)
%8 = tail call i32 @gw(i32 6, i32 0, i32 0)
%9 = tail call i32 @gw(i32 7, i32 0, i32 0)
%10 = tail call i32 @gw(i32 8, i32 0, i32 0)
br label %11
11: ; preds = %50, %0
%12 = tail call i64 @gr(i32 5, i64 0)
%13 = trunc i64 %12 to i32
%14 = tail call i32 @gw(i32 6, i32 0, i32 %13)
%15 = tail call i64 @gr(i32 6, i64 0)
%16 = tail call i64 @gr(i32 2, i64 0)
%17 = tail call i32 @tm(i64 %15, i64 %16)
%18 = tail call i64 @gr(i32 6, i64 0)
%19 = tail call i64 @gr(i32 2, i64 0)
%20 = tail call i64 @td(i64 %18, i64 %19)
%21 = add nsw i64 %20, 9
%22 = tail call i64 @gr(i32 %17, i64 %21)
%23 = add nsw i64 %22, -48
br label %24
24: ; preds = %36, %11
%25 = phi i64 [ %23, %11 ], [ %46, %36 ]
%26 = tail call i64 @gr(i32 6, i64 0)
%27 = add nsw i64 %26, 1
%28 = tail call i64 @gr(i32 6, i64 0)
%29 = trunc i64 %28 to i32
%30 = add i32 %29, 1
%31 = tail call i32 @gw(i32 6, i32 0, i32 %30)
%32 = tail call i64 @gr(i32 5, i64 0)
%33 = tail call i64 @gr(i32 4, i64 0)
%34 = add i64 %33, %32
%35 = icmp eq i64 %27, %34
br i1 %35, label %47, label %36
36: ; preds = %24
%37 = tail call i64 @gr(i32 6, i64 0)
%38 = tail call i64 @gr(i32 2, i64 0)
%39 = tail call i32 @tm(i64 %37, i64 %38)
%40 = tail call i64 @gr(i32 6, i64 0)
%41 = tail call i64 @gr(i32 2, i64 0)
%42 = tail call i64 @td(i64 %40, i64 %41)
%43 = add nsw i64 %42, 9
%44 = tail call i64 @gr(i32 %39, i64 %43)
%45 = add nsw i64 %44, -48
%46 = mul nsw i64 %45, %25
br label %24
47: ; preds = %24
%48 = tail call i64 @gr(i32 8, i64 0)
%49 = icmp sgt i64 %25, %48
br i1 %49, label %82, label %50
50: ; preds = %86, %47
%51 = tail call i64 @gr(i32 5, i64 0)
%52 = add nsw i64 %51, 1
%53 = tail call i64 @gr(i32 5, i64 0)
%54 = trunc i64 %53 to i32
%55 = add i32 %54, 1
%56 = tail call i32 @gw(i32 5, i32 0, i32 %55)
%57 = tail call i64 @gr(i32 3, i64 0)
%58 = icmp eq i64 %52, %57
br i1 %58, label %59, label %11
59: ; preds = %50, %78
%60 = phi i32 [ %81, %78 ], [ 9, %50 ]
%61 = tail call i32 @gw(i32 7, i32 0, i32 %60)
%62 = tail call i64 @gr(i32 7, i64 0)
%63 = trunc i64 %62 to i32
%64 = tail call i64 @gr(i32 %63, i64 0)
%65 = trunc i64 %64 to i32
%66 = shl i32 %65, 24
%67 = add i32 %66, 805306368
%68 = ashr exact i32 %67, 24
%69 = tail call i32 @putchar(i32 %68)
%70 = tail call i64 @gr(i32 7, i64 0)
%71 = add nsw i64 %70, -8
%72 = tail call i64 @gr(i32 4, i64 0)
%73 = icmp eq i64 %71, %72
br i1 %73, label %74, label %78
74: ; preds = %59
%75 = tail call i32 @putchar(i32 61)
%76 = tail call i64 @gr(i32 8, i64 0)
%77 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i64 %76)
ret i32 0
78: ; preds = %59
%79 = tail call i64 @gr(i32 7, i64 0)
%80 = trunc i64 %79 to i32
%81 = add i32 %80, 1
br label %59
82: ; preds = %47
%83 = trunc i64 %25 to i32
%84 = tail call i32 @gw(i32 8, i32 0, i32 %83)
%85 = tail call i32 @gw(i32 6, i32 0, i32 0)
br label %86
86: ; preds = %86, %82
%87 = tail call i64 @gr(i32 6, i64 0)
%88 = trunc i64 %87 to i32
%89 = add i32 %88, 9
%90 = tail call i64 @gr(i32 6, i64 0)
%91 = tail call i64 @gr(i32 5, i64 0)
%92 = add nsw i64 %91, %90
%93 = tail call i64 @gr(i32 2, i64 0)
%94 = tail call i32 @tm(i64 %92, i64 %93)
%95 = tail call i64 @gr(i32 6, i64 0)
%96 = tail call i64 @gr(i32 5, i64 0)
%97 = add nsw i64 %96, %95
%98 = tail call i64 @gr(i32 2, i64 0)
%99 = tail call i64 @td(i64 %97, i64 %98)
%100 = add nsw i64 %99, 9
%101 = tail call i64 @gr(i32 %94, i64 %100)
%102 = trunc i64 %101 to i32
%103 = add i32 %102, -48
%104 = tail call i32 @gw(i32 %89, i32 0, i32 %103)
%105 = tail call i64 @gr(i32 6, i64 0)
%106 = add nsw i64 %105, 1
%107 = tail call i64 @gr(i32 6, i64 0)
%108 = trunc i64 %107 to i32
%109 = add i32 %108, 1
%110 = tail call i32 @gw(i32 6, i32 0, i32 %109)
%111 = tail call i64 @gr(i32 4, i64 0)
%112 = icmp eq i64 %106, %111
br i1 %112, label %50, label %86
}