#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 /*<<< orphan*/ putchar(char const);
int output(void) {
  unsigned int i = 0;
  const char *str = "Hello World!";
  const char *a = "Hello "
                  "World!\0foo!\0boo!\0cfjksdafloo!\0fkfsdajkoo!\0fofdasjko!"
                  "\0foofkds!\0foofds!\0foofdjk!\0foo!\0foo!\0foo!\0foo!\0";
  const char *b = "\x61\x62\t\n\r";
  const char *c = "a"
                  "b";
  const char *d = "a"
                  "b";
  const char *e = "a"
                  "b";
  const char *f = "a"
                  "b";
  const char *g = "a"
                  "b";
  const char *h = "a"
                  "b";
  while (i < 12) {
    putchar(str[i]);
    i++;
  }
  putchar(" "[0]);
  putchar("abc"[2]);
  putchar("foo"[1]);
  putchar("fun"[2]);
  putchar("dedfun"[0]);
  printf("%s", a);
  printf("%s", &a[10]);
  printf("%s", &a[20]);
  printf("%s\n", &a[30]);
  printf("%s\n", &a[40]);
  printf("%s\n", &a[50]);
  printf("%s\n", b);
  printf("%s\n", c);
  printf("%s\n", d);
  printf("%s\n", e);
  printf("%s\n", f);
  printf("%s\n", g);
  printf("%s\n", h);
  printf("foo '"
         "used_flags[index] = (num_blocks - i)"
         "' in file "
         "\"libc/malloc.c\""
         "  on line "
         "120"
         ".\n");
  return 0;
}


x86 assembly (clang, -O0):
<output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xf3f(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xec1(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xebc(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xeb1(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xea6(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xe9b(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xe90(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xe85(%rip),%rax
mov    %rax,-0x50(%rbp)
cmpl   $0xc,-0x4(%rbp)
jae    11ba <output+0x9a>
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1192 <output+0x72>
movsbl 0xe55(%rip),%edi
call   1030 <putchar@plt>
movsbl 0xe4d(%rip),%edi
call   1030 <putchar@plt>
movsbl 0xe44(%rip),%edi
call   1030 <putchar@plt>
movsbl 0xe40(%rip),%edi
call   1030 <putchar@plt>
movsbl 0xe2f(%rip),%edi
call   1030 <putchar@plt>
mov    -0x18(%rbp),%rsi
lea    0xe26(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rsi
add    $0xa,%rsi
lea    0xe10(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rsi
add    $0x14,%rsi
lea    0xdfa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rsi
add    $0x1e,%rsi
lea    0xde7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rsi
add    $0x28,%rsi
lea    0xdd1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rsi
add    $0x32,%rsi
lea    0xdbb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xda9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%rsi
lea    0xd97(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rsi
lea    0xd85(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x38(%rbp),%rsi
lea    0xd73(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x40(%rbp),%rsi
lea    0xd61(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x48(%rbp),%rsi
lea    0xd4f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x50(%rbp),%rsi
lea    0xd3d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd33(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output>:
push   %rbx
mov    $0x48,%edi
call   1030 <putchar@plt>
mov    $0x65,%edi
call   1030 <putchar@plt>
mov    $0x6c,%edi
call   1030 <putchar@plt>
mov    $0x6c,%edi
call   1030 <putchar@plt>
mov    $0x6f,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x57,%edi
call   1030 <putchar@plt>
mov    $0x6f,%edi
call   1030 <putchar@plt>
mov    $0x72,%edi
call   1030 <putchar@plt>
mov    $0x6c,%edi
call   1030 <putchar@plt>
mov    $0x64,%edi
call   1030 <putchar@plt>
mov    $0x21,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x63,%edi
call   1030 <putchar@plt>
mov    $0x6f,%edi
call   1030 <putchar@plt>
mov    $0x6e,%edi
call   1030 <putchar@plt>
mov    $0x64,%edi
call   1030 <putchar@plt>
lea    0xe91(%rip),%rbx
lea    0xe17(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe10(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe09(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe02(%rip),%rdi
call   1040 <puts@plt>
lea    0xe00(%rip),%rdi
call   1040 <puts@plt>
lea    0xdfe(%rip),%rdi
call   1040 <puts@plt>
lea    0xe2a(%rip),%rdi
call   1040 <puts@plt>
lea    0xe24(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xdf3(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World!\00"
@.str.1 = [106 x i8] c"Hello World!\00foo!\00boo!\00cfjksdafloo!\00fkfsdajkoo!\00fofdasjko!\00foofkds!\00foofds!\00foofdjk!\00foo!\00foo!\00foo!\00foo!\00\00"
@.str.2 = [6 x i8] c"ab\09\0A\0D\00"
@.str.3 = [3 x i8] c"ab\00"
@.str.4 = [2 x i8] c" \00"
@.str.5 = [4 x i8] c"abc\00"
@.str.6 = [4 x i8] c"foo\00"
@.str.7 = [4 x i8] c"fun\00"
@.str.8 = [7 x i8] c"dedfun\00"
@.str.9 = [3 x i8] c"%s\00"
@.str.10 = [4 x i8] c"%s\0A\00"
@.str.11 = [82 x i8] c"foo 'used_flags[index] = (num_blocks - i)' in file \22libc/malloc.c\22 on line 120.\0A\00"
define i32 @output() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str.1, i64 0, i64 0), i8** %3
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %4
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %5
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %8
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %9
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %10
br label %11
11: ; preds = %14, %0
%12 = load i32, i32* %1
%13 = icmp ult i32 %12, 12
br i1 %13, label %14, label %23
14: ; preds = %11
%15 = load i8*, i8** %2
%16 = load i32, i32* %1
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i8, i8* %18
%20 = call i32 @putchar(i8 signext %19)
%21 = load i32, i32* %1
%22 = add i32 %21, 1
store i32 %22, i32* %1
br label %11
23: ; preds = %11
%24 = load i8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0)
%25 = call i32 @putchar(i8 signext %24)
%26 = load i8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 2)
%27 = call i32 @putchar(i8 signext %26)
%28 = load i8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 1)
%29 = call i32 @putchar(i8 signext %28)
%30 = load i8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 2)
%31 = call i32 @putchar(i8 signext %30)
%32 = load i8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0)
%33 = call i32 @putchar(i8 signext %32)
%34 = load i8*, i8** %3
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %34)
%36 = load i8*, i8** %3
%37 = getelementptr inbounds i8, i8* %36, i64 10
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %37)
%39 = load i8*, i8** %3
%40 = getelementptr inbounds i8, i8* %39, i64 20
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %40)
%42 = load i8*, i8** %3
%43 = getelementptr inbounds i8, i8* %42, i64 30
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %43)
%45 = load i8*, i8** %3
%46 = getelementptr inbounds i8, i8* %45, i64 40
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %46)
%48 = load i8*, i8** %3
%49 = getelementptr inbounds i8, i8* %48, i64 50
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %49)
%51 = load i8*, i8** %4
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %51)
%53 = load i8*, i8** %5
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %53)
%55 = load i8*, i8** %6
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %55)
%57 = load i8*, i8** %7
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %57)
%59 = load i8*, i8** %8
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %59)
%61 = load i8*, i8** %9
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %61)
%63 = load i8*, i8** %10
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %63)
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.11, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [106 x i8] c"Hello World!\00foo!\00boo!\00cfjksdafloo!\00fkfsdajkoo!\00fofdasjko!\00foofkds!\00foofds!\00foofdjk!\00foo!\00foo!\00foo!\00foo!\00\00"
@.str.2 = [6 x i8] c"ab\09\0A\0D\00"
@.str.3 = [3 x i8] c"ab\00"
@.str.9 = [3 x i8] c"%s\00"
@str = [81 x i8] c"foo 'used_flags[index] = (num_blocks - i)' in file \22libc/malloc.c\22 on line 120.\00"
define i32 @output() {
%1 = tail call i32 @putchar(i8 signext 72)
%2 = tail call i32 @putchar(i8 signext 101)
%3 = tail call i32 @putchar(i8 signext 108)
%4 = tail call i32 @putchar(i8 signext 108)
%5 = tail call i32 @putchar(i8 signext 111)
%6 = tail call i32 @putchar(i8 signext 32)
%7 = tail call i32 @putchar(i8 signext 87)
%8 = tail call i32 @putchar(i8 signext 111)
%9 = tail call i32 @putchar(i8 signext 114)
%10 = tail call i32 @putchar(i8 signext 108)
%11 = tail call i32 @putchar(i8 signext 100)
%12 = tail call i32 @putchar(i8 signext 33)
%13 = tail call i32 @putchar(i8 signext 32)
%14 = tail call i32 @putchar(i8 signext 99)
%15 = tail call i32 @putchar(i8 signext 111)
%16 = tail call i32 @putchar(i8 signext 110)
%17 = tail call i32 @putchar(i8 signext 100)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str.1, i64 0, i64 0))
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str.1, i64 0, i64 10))
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str.1, i64 0, i64 20))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str.1, i64 0, i64 30))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str.1, i64 0, i64 40))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str.1, i64 0, i64 50))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str, i64 0, i64 0))
ret i32 0
}