#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ long_func();
int one(int, int);
int /*<<< orphan*/ short_func();
int /*<<< orphan*/ stderr;
int two(int);
int main(int argc, char **argv) {
  int i = 3;
  int j = 4;
  char temp[100000];
  long_func();
  fprintf(stderr, "HAHAAHA\n");
  fprintf(stderr, "AHAAHA\n");
  fprintf(stderr, "HAAHA\n");
  fprintf(stderr, "AAHA\n");
  fprintf(stderr, "AHA\n");
  fprintf(stderr, "HA\n");
  fprintf(stderr, "A\n");
  for (i = 0; i < 100; i++)
    fprintf(stderr, "Yo\n");
  short_func();
  short_func();
  short_func();
  for (i = 0; i < 100000; ++i)
    j++;
  i = one(i, j);
  j = two(i);
  for (i = 0; i < 6; ++i)
    fprintf(stderr, "returned from init\n");
  for (i = 0; i < 100000; ++i)
    temp[i] = (i % 40) + 40;
  i += j;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x186c0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
movl   $0x4,-0x18(%rbp)
mov    $0x0,%al
call   1050 <long_func@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
lea    0xe72(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
lea    0xe5e(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2e31(%rip),%rax
mov    (%rax),%edi
lea    0xe4a(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2e1c(%rip),%rax
mov    (%rax),%edi
lea    0xe36(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2e07(%rip),%rax
mov    (%rax),%edi
lea    0xe22(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2df2(%rip),%rax
mov    (%rax),%edi
lea    0xe0e(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2ddd(%rip),%rax
mov    (%rax),%edi
lea    0xdfa(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    1245 <main+0xf5>
mov    0x2db7(%rip),%rax
mov    (%rax),%edi
lea    0xdd7(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1218 <main+0xc8>
mov    $0x0,%al
call   1040 <short_func@plt>
mov    $0x0,%al
call   1040 <short_func@plt>
mov    $0x0,%al
call   1040 <short_func@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x186a0,-0x14(%rbp)
jge    1285 <main+0x135>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1261 <main+0x111>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1070 <one@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <two@plt>
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x6,-0x14(%rbp)
jge    12d2 <main+0x182>
mov    0x2d2a(%rip),%rax
mov    (%rax),%edi
lea    0xd4e(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12a5 <main+0x155>
movl   $0x0,-0x14(%rbp)
cmpl   $0x186a0,-0x14(%rbp)
jge    130f <main+0x1bf>
mov    -0x14(%rbp),%eax
mov    $0x28,%ecx
cltd
idiv   %ecx
add    $0x28,%edx
mov    %dl,%cl
movslq -0x14(%rbp),%rax
mov    %cl,-0x186c0(%rbp,%rax,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12d9 <main+0x189>
mov    -0x18(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
add    $0x186c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1050 <long_func@plt>
mov    0x2e7e(%rip),%r14
mov    (%r14),%edi
lea    0xe94(%rip),%rsi
call   1060 <fprintf@plt>
mov    (%r14),%edi
lea    0xe86(%rip),%rsi
call   1060 <fprintf@plt>
mov    (%r14),%edi
lea    0xe78(%rip),%rsi
call   1060 <fprintf@plt>
mov    (%r14),%edi
lea    0xe6a(%rip),%rsi
call   1060 <fprintf@plt>
mov    (%r14),%edi
lea    0xe5c(%rip),%rsi
call   1060 <fprintf@plt>
mov    (%r14),%edi
lea    0xe4e(%rip),%rsi
call   1060 <fprintf@plt>
mov    (%r14),%edi
lea    0xe40(%rip),%rsi
call   1060 <fprintf@plt>
mov    $0x64,%ebp
lea    0xe32(%rip),%rbx
nopw   0x0(%rax,%rax,1)
mov    (%r14),%edi
mov    %rbx,%rsi
call   1060 <fprintf@plt>
add    $0xffffffff,%ebp
jne    11e0 <main+0x90>
xor    %eax,%eax
call   1040 <short_func@plt>
xor    %eax,%eax
call   1040 <short_func@plt>
xor    %eax,%eax
call   1040 <short_func@plt>
mov    $0x186a0,%edi
mov    $0x186a4,%esi
call   1070 <one@plt>
mov    %eax,%edi
call   1030 <two@plt>
mov    (%r14),%edi
lea    0xde8(%rip),%rbx
mov    %rbx,%rsi
call   1060 <fprintf@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
call   1060 <fprintf@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
call   1060 <fprintf@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
call   1060 <fprintf@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
call   1060 <fprintf@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
call   1060 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [9 x i8] c"HAHAAHA\0A\00"
@.str.1 = [8 x i8] c"AHAAHA\0A\00"
@.str.2 = [7 x i8] c"HAAHA\0A\00"
@.str.3 = [6 x i8] c"AAHA\0A\00"
@.str.4 = [5 x i8] c"AHA\0A\00"
@.str.5 = [4 x i8] c"HA\0A\00"
@.str.6 = [3 x i8] c"A\0A\00"
@.str.7 = [4 x i8] c"Yo\0A\00"
@.str.8 = [20 x i8] c"returned from init\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca [100000 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 3, i32* %6
store i32 4, i32* %7
%9 = call i32 (...) @long_func()
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%18 = load i32, i32* @stderr
%19 = call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%20 = load i32, i32* @stderr
%21 = call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%22 = load i32, i32* @stderr
%23 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %6
br label %24
24: ; preds = %30, %2
%25 = load i32, i32* %6
%26 = icmp slt i32 %25, 100
br i1 %26, label %27, label %33
27: ; preds = %24
%28 = load i32, i32* @stderr
%29 = call i32 @fprintf(i32 %28, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
br label %30
30: ; preds = %27
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 1
store i32 %32, i32* %6
br label %24
33: ; preds = %24
%34 = call i32 (...) @short_func()
%35 = call i32 (...) @short_func()
%36 = call i32 (...) @short_func()
store i32 0, i32* %6
br label %37
37: ; preds = %43, %33
%38 = load i32, i32* %6
%39 = icmp slt i32 %38, 100000
br i1 %39, label %40, label %46
40: ; preds = %37
%41 = load i32, i32* %7
%42 = add nsw i32 %41, 1
store i32 %42, i32* %7
br label %43
43: ; preds = %40
%44 = load i32, i32* %6
%45 = add nsw i32 %44, 1
store i32 %45, i32* %6
br label %37
46: ; preds = %37
%47 = load i32, i32* %6
%48 = load i32, i32* %7
%49 = call i32 @one(i32 %47, i32 %48)
store i32 %49, i32* %6
%50 = load i32, i32* %6
%51 = call i32 @two(i32 %50)
store i32 %51, i32* %7
store i32 0, i32* %6
br label %52
52: ; preds = %58, %46
%53 = load i32, i32* %6
%54 = icmp slt i32 %53, 6
br i1 %54, label %55, label %61
55: ; preds = %52
%56 = load i32, i32* @stderr
%57 = call i32 @fprintf(i32 %56, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
br label %58
58: ; preds = %55
%59 = load i32, i32* %6
%60 = add nsw i32 %59, 1
store i32 %60, i32* %6
br label %52
61: ; preds = %52
store i32 0, i32* %6
br label %62
62: ; preds = %73, %61
%63 = load i32, i32* %6
%64 = icmp slt i32 %63, 100000
br i1 %64, label %65, label %76
65: ; preds = %62
%66 = load i32, i32* %6
%67 = srem i32 %66, 40
%68 = add nsw i32 %67, 40
%69 = trunc i32 %68 to i8
%70 = load i32, i32* %6
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [100000 x i8], [100000 x i8]* %8, i64 0, i64 %71
store i8 %69, i8* %72
br label %73
73: ; preds = %65
%74 = load i32, i32* %6
%75 = add nsw i32 %74, 1
store i32 %75, i32* %6
br label %62
76: ; preds = %62
%77 = load i32, i32* %7
%78 = load i32, i32* %6
%79 = add nsw i32 %78, %77
store i32 %79, i32* %6
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [9 x i8] c"HAHAAHA\0A\00"
@.str.1 = [8 x i8] c"AHAAHA\0A\00"
@.str.2 = [7 x i8] c"HAAHA\0A\00"
@.str.3 = [6 x i8] c"AAHA\0A\00"
@.str.4 = [5 x i8] c"AHA\0A\00"
@.str.5 = [4 x i8] c"HA\0A\00"
@.str.6 = [3 x i8] c"A\0A\00"
@.str.7 = [4 x i8] c"Yo\0A\00"
@.str.8 = [20 x i8] c"returned from init\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @long_func()
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = tail call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = tail call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%16 = load i32, i32* @stderr
%17 = tail call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
br label %18
18: ; preds = %2, %18
%19 = phi i32 [ 0, %2 ], [ %22, %18 ]
%20 = load i32, i32* @stderr
%21 = tail call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%22 = add nuw nsw i32 %19, 1
%23 = icmp eq i32 %22, 100
br i1 %23, label %24, label %18
24: ; preds = %18
%25 = tail call i32 (...) @short_func()
%26 = tail call i32 (...) @short_func()
%27 = tail call i32 (...) @short_func()
%28 = tail call i32 @one(i32 100000, i32 100004)
%29 = tail call i32 @two(i32 %28)
%30 = load i32, i32* @stderr
%31 = tail call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%32 = load i32, i32* @stderr
%33 = tail call i32 @fprintf(i32 %32, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%34 = load i32, i32* @stderr
%35 = tail call i32 @fprintf(i32 %34, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%36 = load i32, i32* @stderr
%37 = tail call i32 @fprintf(i32 %36, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%38 = load i32, i32* @stderr
%39 = tail call i32 @fprintf(i32 %38, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%40 = load i32, i32* @stderr
%41 = tail call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
ret i32 0
}