#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 const *, int);
int main() {
  const char *D2055;
  int i;
  int j;
  int k;
  int res;
  res = 0;
  i = 0;
  goto D2052;
D2051:
  j = 0;
  goto D2049;
D2048:
  k = 0;
  goto D2046;
D2045:
  res = res + 1;
  k = k + 1;
D2046:
  if (k <= 9)
    goto D2045;
  else
    goto D2047;
D2047:
  j = j + 1;
D2049:
  if (j <= 9)
    goto D2048;
  else
    goto D2050;
D2050:
  i = i + 1;
D2052:
  if (i <= 9)
    goto D2051;
  else
    goto D2053;
D2053:
  D2055 = (const char *)&"res = %d\n"[0];
  printf(D2055, res);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
jmp    1196 <main+0x86>
movl   $0x0,-0x18(%rbp)
jmp    1179 <main+0x69>
movl   $0x0,-0x1c(%rbp)
jmp    115c <main+0x4c>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x9,-0x1c(%rbp)
jg     116b <main+0x5b>
jmp    114a <main+0x3a>
jmp    1170 <main+0x60>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x9,-0x18(%rbp)
jg     1188 <main+0x78>
jmp    113e <main+0x2e>
jmp    118d <main+0x7d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x9,-0x14(%rbp)
jg     11a5 <main+0x95>
jmp    1132 <main+0x22>
jmp    11aa <main+0x9a>
lea    0xe4f(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x3e8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"res = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %6
store i32 0, i32* %3
br label %30
7: ; preds = %33
store i32 0, i32* %4
br label %22
8: ; preds = %25
store i32 0, i32* %5
br label %14
9: ; preds = %17
%10 = load i32, i32* %6
%11 = add nsw i32 %10, 1
store i32 %11, i32* %6
%12 = load i32, i32* %5
%13 = add nsw i32 %12, 1
store i32 %13, i32* %5
br label %14
14: ; preds = %9, %8
%15 = load i32, i32* %5
%16 = icmp sle i32 %15, 9
br i1 %16, label %17, label %18
17: ; preds = %14
br label %9
18: ; preds = %14
br label %19
19: ; preds = %18
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %22
22: ; preds = %19, %7
%23 = load i32, i32* %4
%24 = icmp sle i32 %23, 9
br i1 %24, label %25, label %26
25: ; preds = %22
br label %8
26: ; preds = %22
br label %27
27: ; preds = %26
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
br label %30
30: ; preds = %27, %0
%31 = load i32, i32* %3
%32 = icmp sle i32 %31, 9
br i1 %32, label %33, label %34
33: ; preds = %30
br label %7
34: ; preds = %30
br label %35
35: ; preds = %34
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
%36 = load i8*, i8** %2
%37 = load i32, i32* %6
%38 = call i32 @printf(i8* %36, i32 %37)
%39 = load i32, i32* %1
ret i32 %39
}

LLVM IR (-O2):
@.str = [10 x i8] c"res = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1000)
ret i32 0
}