#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*/ print_int(int);
int main() {
  int i = 0;
  int j = 10;
  int k = 15;
  while (i <= 5) {
    while (j <= 15) {
      while (k <= 20) {
        print_int(k);
        k++;
      }
      print_int(j);
      j++;
    }
    print_int(i);
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
movl   $0xf,-0x10(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     119e <main+0x8e>
jmp    1143 <main+0x33>
cmpl   $0xf,-0xc(%rbp)
jg     1188 <main+0x78>
jmp    1152 <main+0x42>
cmpl   $0x14,-0x10(%rbp)
jg     1172 <main+0x62>
mov    -0x10(%rbp),%edi
call   1030 <print_int@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1152 <main+0x42>
mov    -0xc(%rbp),%edi
call   1030 <print_int@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1143 <main+0x33>
mov    -0x8(%rbp),%edi
call   1030 <print_int@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xf,%edi
call   1030 <print_int@plt>
mov    $0x10,%edi
call   1030 <print_int@plt>
mov    $0x11,%edi
call   1030 <print_int@plt>
mov    $0x12,%edi
call   1030 <print_int@plt>
mov    $0x13,%edi
call   1030 <print_int@plt>
mov    $0x14,%edi
call   1030 <print_int@plt>
mov    $0xa,%edi
call   1030 <print_int@plt>
mov    $0xb,%edi
call   1030 <print_int@plt>
mov    $0xc,%edi
call   1030 <print_int@plt>
mov    $0xd,%edi
call   1030 <print_int@plt>
mov    $0xe,%edi
call   1030 <print_int@plt>
mov    $0xf,%edi
call   1030 <print_int@plt>
xor    %edi,%edi
call   1030 <print_int@plt>
mov    $0x1,%edi
call   1030 <print_int@plt>
mov    $0x2,%edi
call   1030 <print_int@plt>
mov    $0x3,%edi
call   1030 <print_int@plt>
mov    $0x4,%edi
call   1030 <print_int@plt>
mov    $0x5,%edi
call   1030 <print_int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 10, i32* %3
store i32 15, i32* %4
br label %5
5: ; preds = %26, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 5
br i1 %7, label %8, label %31
8: ; preds = %5
br label %9
9: ; preds = %21, %8
%10 = load i32, i32* %3
%11 = icmp sle i32 %10, 15
br i1 %11, label %12, label %26
12: ; preds = %9
br label %13
13: ; preds = %16, %12
%14 = load i32, i32* %4
%15 = icmp sle i32 %14, 20
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = load i32, i32* %4
%18 = call i32 @print_int(i32 %17)
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
br label %13
21: ; preds = %13
%22 = load i32, i32* %3
%23 = call i32 @print_int(i32 %22)
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %9
26: ; preds = %9
%27 = load i32, i32* %2
%28 = call i32 @print_int(i32 %27)
%29 = load i32, i32* %2
%30 = add nsw i32 %29, 1
store i32 %30, i32* %2
br label %5
31: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @print_int(i32 15)
%2 = tail call i32 @print_int(i32 16)
%3 = tail call i32 @print_int(i32 17)
%4 = tail call i32 @print_int(i32 18)
%5 = tail call i32 @print_int(i32 19)
%6 = tail call i32 @print_int(i32 20)
%7 = tail call i32 @print_int(i32 10)
%8 = tail call i32 @print_int(i32 11)
%9 = tail call i32 @print_int(i32 12)
%10 = tail call i32 @print_int(i32 13)
%11 = tail call i32 @print_int(i32 14)
%12 = tail call i32 @print_int(i32 15)
%13 = tail call i32 @print_int(i32 0)
%14 = tail call i32 @print_int(i32 1)
%15 = tail call i32 @print_int(i32 2)
%16 = tail call i32 @print_int(i32 3)
%17 = tail call i32 @print_int(i32 4)
%18 = tail call i32 @print_int(i32 5)
ret i32 0
}