#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;
  for (i = 0; i <= 5; i++) {
    while (j <= 15) {
      do {
        print_int(k);
        k++;
      } while (k <= 20);
      print_int(j);
      j++;
    }
    print_int(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)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     11a0 <main+0x90>
jmp    114a <main+0x3a>
cmpl   $0xf,-0xc(%rbp)
jg     118a <main+0x7a>
jmp    1159 <main+0x49>
mov    -0x10(%rbp),%edi
call   1030 <print_int@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x14,-0x10(%rbp)
jle    1159 <main+0x49>
mov    -0xc(%rbp),%edi
call   1030 <print_int@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114a <main+0x3a>
mov    -0x8(%rbp),%edi
call   1030 <print_int@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113b <main+0x2b>
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    $0x15,%edi
call   1030 <print_int@plt>
mov    $0xb,%edi
call   1030 <print_int@plt>
mov    $0x16,%edi
call   1030 <print_int@plt>
mov    $0xc,%edi
call   1030 <print_int@plt>
mov    $0x17,%edi
call   1030 <print_int@plt>
mov    $0xd,%edi
call   1030 <print_int@plt>
mov    $0x18,%edi
call   1030 <print_int@plt>
mov    $0xe,%edi
call   1030 <print_int@plt>
mov    $0x19,%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
store i32 0, i32* %2
br label %5
5: ; preds = %29, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 5
br i1 %7, label %8, label %32
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 = %18, %12
%14 = load i32, i32* %4
%15 = call i32 @print_int(i32 %14)
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
br label %18
18: ; preds = %13
%19 = load i32, i32* %4
%20 = icmp sle i32 %19, 20
br i1 %20, label %13, label %21
21: ; preds = %18
%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)
br label %29
29: ; preds = %26
%30 = load i32, i32* %2
%31 = add nsw i32 %30, 1
store i32 %31, i32* %2
br label %5
32: ; 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 21)
%9 = tail call i32 @print_int(i32 11)
%10 = tail call i32 @print_int(i32 22)
%11 = tail call i32 @print_int(i32 12)
%12 = tail call i32 @print_int(i32 23)
%13 = tail call i32 @print_int(i32 13)
%14 = tail call i32 @print_int(i32 24)
%15 = tail call i32 @print_int(i32 14)
%16 = tail call i32 @print_int(i32 25)
%17 = tail call i32 @print_int(i32 15)
%18 = tail call i32 @print_int(i32 0)
%19 = tail call i32 @print_int(i32 1)
%20 = tail call i32 @print_int(i32 2)
%21 = tail call i32 @print_int(i32 3)
%22 = tail call i32 @print_int(i32 4)
%23 = tail call i32 @print_int(i32 5)
ret i32 0
}