#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");
  }
  for (;;) {
    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    1180 <main+0x70>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
jmp    114b <main+0x3b>
jmp    1150 <main+0x40>
cmpl   $0x1c8,-0xc(%rbp)
jge    11e6 <main+0xd6>
jmp    1162 <main+0x52>
cmpl   $0x315,-0x10(%rbp)
jge    11e1 <main+0xd1>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1191 <main+0x81>
jmp    1180 <main+0x70>
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
jmp    11d0 <main+0xc0>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11ae <main+0x9e>
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
jmp    11cb <main+0xbb>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11c6 <main+0xb6>
lea    0xe4b(%rip),%rdi
call   1030 <printf@plt>
jmp    11cb <main+0xbb>
jmp    11d0 <main+0xc0>
lea    0xe38(%rip),%rdi
call   1030 <printf@plt>
jmp    1162 <main+0x52>
jmp    1150 <main+0x40>
jmp    114b <main+0x3b>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
nopl   (%rax)
jmp    1120 <main+0x10>

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 %25
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 = %44, %11
br label %13
13: ; preds = %43, %12
%14 = load i32, i32* %3
%15 = icmp slt i32 %14, 456
br i1 %15, label %16, label %44
16: ; preds = %13
br label %17
17: ; preds = %41, %16
%18 = load i32, i32* %4
%19 = icmp slt i32 %18, 789
br i1 %19, label %20, label %43
20: ; preds = %17
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = icmp eq i32 %21, %22
br i1 %23, label %24, label %27
24: ; preds = %20
br label %25
25: ; preds = %24, %7
%26 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %41
27: ; preds = %20
%28 = load i32, i32* %3
%29 = load i32, i32* %4
%30 = icmp eq i32 %28, %29
br i1 %30, label %31, label %33
31: ; preds = %27
%32 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %40
33: ; preds = %27
%34 = load i32, i32* %2
%35 = load i32, i32* %4
%36 = icmp eq i32 %34, %35
br i1 %36, label %37, label %39
37: ; preds = %33
%38 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %39
39: ; preds = %37, %33
br label %40
40: ; preds = %39, %31
br label %41
41: ; preds = %40, %25
%42 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %17
43: ; preds = %17
br label %13
44: ; preds = %13
br label %12
}

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))
br label %2
2: ; preds = %2, %0
br label %2
}