#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(void) {
  int i, j;
  for (i = 1; i <= 10; i++) {
    printf("haha\n");
    for (j = 1; j <= i; j++) {
      printf("\t");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     117c <main+0x6c>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1169 <main+0x59>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1143 <main+0x33>
jmp    116e <main+0x5e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"haha\0A\00"
@.str.1 = [2 x i8] c"\09\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %4
4: ; preds = %19, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 10
br i1 %6, label %7, label %22
7: ; preds = %4
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %9
9: ; preds = %15, %7
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = icmp sle i32 %10, %11
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %9
18: ; preds = %9
br label %19
19: ; preds = %18
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %4
22: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@str = [5 x i8] c"haha\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 9)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 9)
%5 = tail call i32 @putchar(i32 9)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @putchar(i32 9)
%8 = tail call i32 @putchar(i32 9)
%9 = tail call i32 @putchar(i32 9)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%11 = tail call i32 @putchar(i32 9)
%12 = tail call i32 @putchar(i32 9)
%13 = tail call i32 @putchar(i32 9)
%14 = tail call i32 @putchar(i32 9)
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%16 = tail call i32 @putchar(i32 9)
%17 = tail call i32 @putchar(i32 9)
%18 = tail call i32 @putchar(i32 9)
%19 = tail call i32 @putchar(i32 9)
%20 = tail call i32 @putchar(i32 9)
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%22 = tail call i32 @putchar(i32 9)
%23 = tail call i32 @putchar(i32 9)
%24 = tail call i32 @putchar(i32 9)
%25 = tail call i32 @putchar(i32 9)
%26 = tail call i32 @putchar(i32 9)
%27 = tail call i32 @putchar(i32 9)
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%29 = tail call i32 @putchar(i32 9)
%30 = tail call i32 @putchar(i32 9)
%31 = tail call i32 @putchar(i32 9)
%32 = tail call i32 @putchar(i32 9)
%33 = tail call i32 @putchar(i32 9)
%34 = tail call i32 @putchar(i32 9)
%35 = tail call i32 @putchar(i32 9)
%36 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%37 = tail call i32 @putchar(i32 9)
%38 = tail call i32 @putchar(i32 9)
%39 = tail call i32 @putchar(i32 9)
%40 = tail call i32 @putchar(i32 9)
%41 = tail call i32 @putchar(i32 9)
%42 = tail call i32 @putchar(i32 9)
%43 = tail call i32 @putchar(i32 9)
%44 = tail call i32 @putchar(i32 9)
%45 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%46 = tail call i32 @putchar(i32 9)
%47 = tail call i32 @putchar(i32 9)
%48 = tail call i32 @putchar(i32 9)
%49 = tail call i32 @putchar(i32 9)
%50 = tail call i32 @putchar(i32 9)
%51 = tail call i32 @putchar(i32 9)
%52 = tail call i32 @putchar(i32 9)
%53 = tail call i32 @putchar(i32 9)
%54 = tail call i32 @putchar(i32 9)
%55 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%56 = tail call i32 @putchar(i32 9)
%57 = tail call i32 @putchar(i32 9)
%58 = tail call i32 @putchar(i32 9)
%59 = tail call i32 @putchar(i32 9)
%60 = tail call i32 @putchar(i32 9)
%61 = tail call i32 @putchar(i32 9)
%62 = tail call i32 @putchar(i32 9)
%63 = tail call i32 @putchar(i32 9)
%64 = tail call i32 @putchar(i32 9)
%65 = tail call i32 @putchar(i32 9)
ret i32 0
}