#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;
  while (i < 1) {
    printf("loop\n");
    if (i == 1) {
      printf("1\n");
      goto next;
    } else {
      printf("2\n");
    }
    while (k < 25) {
      for (j = 0; j < 123; j++) {
        printf("for\n");
      next:
        printf("3\n");
      }
    }
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    11b5 <main+0xa5>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    1150 <main+0x40>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
jmp    1188 <main+0x78>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
jmp    1161 <main+0x51>
cmpl   $0x19,-0x10(%rbp)
jge    11a7 <main+0x97>
movl   $0x0,-0xc(%rbp)
cmpl   $0x7b,-0xc(%rbp)
jge    11a2 <main+0x92>
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1172 <main+0x62>
jmp    1161 <main+0x51>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}