#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*/ display(char *);
int /*<<< orphan*/ printf(char *);
int main() {
  int i;
  printf("should not show up if '-X display' is used.\n");
  for (i = 0; i < 12; i++)
    display("Function call within executable.");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0xc,-0x8(%rbp)
jge    1166 <main+0x46>
lea    0xeda(%rip),%rdi
call   1030 <display@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1142 <main+0x22>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rbx
mov    %rbx,%rdi
call   1040 <display@plt>
mov    %rbx,%rdi
call   1040 <display@plt>
mov    %rbx,%rdi
call   1040 <display@plt>
mov    %rbx,%rdi
call   1040 <display@plt>
mov    %rbx,%rdi
call   1040 <display@plt>
mov    %rbx,%rdi
call   1040 <display@plt>
mov    %rbx,%rdi
call   1040 <display@plt>
mov    %rbx,%rdi
call   1040 <display@plt>
mov    %rbx,%rdi
call   1040 <display@plt>
mov    %rbx,%rdi
call   1040 <display@plt>
mov    %rbx,%rdi
call   1040 <display@plt>
mov    %rbx,%rdi
call   1040 <display@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [45 x i8] c"should not show up if '-X display' is used.\0A\00"
@.str.1 = [33 x i8] c"Function call within executable.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %4
4: ; preds = %9, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 12
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = call i32 @display(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %4
12: ; preds = %4
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str.1 = [33 x i8] c"Function call within executable.\00"
@str = [44 x i8] c"should not show up if '-X display' is used.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @display(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @display(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @display(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @display(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @display(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @display(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @display(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @display(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 @display(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%11 = tail call i32 @display(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%12 = tail call i32 @display(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%13 = tail call i32 @display(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}