#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 main() {
  int i, j, k;
  if (i == 1) {
    printf("1\n");
    goto next;
  } else {
    printf("2\n");
  }
  while (i < 123) {
    while (j < 456) {
      while (k < 789) {
        if (i == j) {
        next:
          printf("3\n");
        } else {
          if (j == k) {
            printf("4\n");
          } else if (i == k) {
            printf("5\n");
          }
        }
        printf("6\n");
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    113a <main+0x2a>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
jmp    118a <main+0x7a>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
jmp    114b <main+0x3b>
cmpl   $0x7b,-0x8(%rbp)
jge    11f5 <main+0xe5>
jmp    115a <main+0x4a>
cmpl   $0x1c8,-0xc(%rbp)
jge    11f0 <main+0xe0>
jmp    116c <main+0x5c>
cmpl   $0x315,-0x10(%rbp)
jge    11eb <main+0xdb>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    119b <main+0x8b>
jmp    118a <main+0x7a>
lea    0xe75(%rip),%rdi
call   1030 <printf@plt>
jmp    11da <main+0xca>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11b8 <main+0xa8>
lea    0xe5b(%rip),%rdi
call   1030 <printf@plt>
jmp    11d5 <main+0xc5>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11d0 <main+0xc0>
lea    0xe41(%rip),%rdi
call   1030 <printf@plt>
jmp    11d5 <main+0xc5>
jmp    11da <main+0xca>
lea    0xe2e(%rip),%rdi
call   1030 <printf@plt>
jmp    116c <main+0x5c>
jmp    115a <main+0x4a>
jmp    114b <main+0x3b>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [2 x i8] c"2\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}