xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void print_cp_reg(void) {
  static int i = 0;
  printf("%%c%d", i++);
  if (i >= 32)
    i = 0;
}


x86 assembly (clang, -O0):
<print_cp_reg>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f12(%rip),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,0x2f07(%rip)
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x20,0x2ef4(%rip)
jl     1148 <print_cp_reg+0x38>
movl   $0x0,0x2ee4(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_cp_reg>:
push   %rax
mov    0x2f15(%rip),%esi
lea    0x1(%rsi),%eax
mov    %eax,0x2f0c(%rip)
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x20,0x2ef9(%rip)
jl     113f <print_cp_reg+0x2f>
movl   $0x0,0x2eed(%rip)
pop    %rax
ret

LLVM IR (-O0):
@print_cp_reg.i = internal global i32 0
@.str = [6 x i8] c"%%c%d\00"
define void @print_cp_reg() {
%1 = load i32, i32* @print_cp_reg.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @print_cp_reg.i
%3 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = load i32, i32* @print_cp_reg.i
%5 = icmp sge i32 %4, 32
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 0, i32* @print_cp_reg.i
br label %7
7: ; preds = %6, %0
ret void
}

LLVM IR (-O2):
@print_cp_reg.i = internal unnamed_addr global i32 0
@.str = [6 x i8] c"%%c%d\00"
define void @print_cp_reg() {
%1 = load i32, i32* @print_cp_reg.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @print_cp_reg.i
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = load i32, i32* @print_cp_reg.i
%5 = icmp sgt i32 %4, 31
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 0, i32* @print_cp_reg.i
br label %7
7: ; preds = %6, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void print_version(void) {
  printf("%s %s\n", "HaiGo", "0.1");
  return;
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee5(%rip),%rsi
lea    0xee4(%rip),%rdx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
lea    0xee8(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [6 x i8] c"HaiGo\00"
@.str.2 = [4 x i8] c"0.1\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [6 x i8] c"HaiGo\00"
@.str.2 = [4 x i8] c"0.1\00"
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int NumberOfNodes();
int NumberOfWaves() { return 1000 / (NumberOfNodes() - 1); }


x86 assembly (clang, -O0):
<NumberOfWaves>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <NumberOfNodes@plt>
mov    %eax,%ecx
sub    $0x1,%ecx
mov    $0x3e8,%eax
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<NumberOfWaves>:
push   %rax
xor    %eax,%eax
call   1030 <NumberOfNodes@plt>
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    $0x3e8,%eax
xor    %edx,%edx
idiv   %ecx
pop    %rcx
ret

LLVM IR (-O0):
define i32 @NumberOfWaves() {
%1 = call i32 (...) @NumberOfNodes()
%2 = sub nsw i32 %1, 1
%3 = sdiv i32 1000, %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @NumberOfWaves() {
%1 = tail call i32 (...) @NumberOfNodes()
%2 = add nsw i32 %1, -1
%3 = sdiv i32 1000, %2
ret i32 %3
}
/* Variables and functions */
double exp10(double);
double test1(double x) { return exp10(x); }


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp10@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
jmp    1030 <exp10@plt>

LLVM IR (-O0):
define double @test1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @exp10(double %3)
ret double %4
}

LLVM IR (-O2):
define double @test1(double %0) {
%2 = tail call double @exp10(double %0)
ret double %2
}
void nrf_802154_request_init(void) {}


x86 assembly (clang, -O0):
<nrf_802154_request_init>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_802154_request_init>:
ret

LLVM IR (-O0):
define void @nrf_802154_request_init() {
ret void
}

LLVM IR (-O2):
define void @nrf_802154_request_init() {
ret void
}
void rop3_128_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T & S;
  stk1 = *D & stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_128_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_128_1_1>:
or     %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_128_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = and i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = and i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = xor i32 %25, -1
%27 = and i32 %23, %26
%28 = load i8, i8* %6
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = and i32 %27, %30
%32 = load i8*, i8** %4
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = and i32 %34, %36
%38 = or i32 %31, %37
%39 = load i8*, i8** %4
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = load i8, i8* %6
%43 = zext i8 %42 to i32
%44 = and i32 %41, %43
%45 = or i32 %38, %44
%46 = trunc i32 %45 to i8
%47 = load i8*, i8** %4
store i8 %46, i8* %47
ret void
}

LLVM IR (-O2):
define void @rop3_128_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %4, %5
store i8 %6, i8* %0
ret void
}
void sym_b2(void) {}


x86 assembly (clang, -O0):
<sym_b2>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sym_b2>:
ret

LLVM IR (-O0):
define void @sym_b2() {
ret void
}

LLVM IR (-O2):
define void @sym_b2() {
ret void
}
void vexpress_spc_adb400_pd_enable(int cluster, int enable) {}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
ret

LLVM IR (-O0):
define void @vexpress_spc_adb400_pd_enable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @vexpress_spc_adb400_pd_enable(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
char *ConvertPageFlags(unsigned long, char *, int);
int /*<<< orphan*/ printf(char *, char *);
void PrintPageFlags(unsigned long flags) {
  char tmp_buffer[256];
  printf("%s", ConvertPageFlags(flags, tmp_buffer, 256));
}


x86 assembly (clang, -O0):
<PrintPageFlags>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x110(%rbp),%rsi
mov    $0x100,%edx
call   1040 <ConvertPageFlags@plt>
mov    %rax,%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintPageFlags>:
sub    $0x108,%rsp
mov    %rsp,%rsi
mov    $0x100,%edx
call   1040 <ConvertPageFlags@plt>
lea    0xec5(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
add    $0x108,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @PrintPageFlags(i64 %0) {
%2 = alloca i64
%3 = alloca [256 x i8]
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%6 = call i8* @ConvertPageFlags(i64 %4, i8* %5, i32 256)
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @PrintPageFlags(i64 %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%4 = call i8* @ConvertPageFlags(i64 %0, i8* %3, i32 256)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void die_usage() {
  fprintf(stderr, "Usage: letter_stats [-s] [-m] < file.txt");
  exit(1);
}


x86 assembly (clang, -O0):
<die_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die_usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"Usage: letter_stats [-s] [-m]\C2\A0< file.txt\00"
define void @die_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"Usage: letter_stats [-s] [-m]\C2\A0< file.txt\00"
define void @die_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int triow_to_upper(int source) {
  return ((source >= (int)'a') && (source <= (int)'z')) ? source - 'a' + 'A'
                                                        : source;
}


x86 assembly (clang, -O0):
<triow_to_upper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     112c <triow_to_upper+0x2c>
cmpl   $0x7a,-0x4(%rbp)
jg     112c <triow_to_upper+0x2c>
mov    -0x4(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <triow_to_upper+0x32>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<triow_to_upper>:
lea    -0x61(%rdi),%ecx
lea    -0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @triow_to_upper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 97
%11 = add nsw i32 %10, 65
br label %14
12: ; preds = %5, %1
%13 = load i32, i32* %2
br label %14
14: ; preds = %12, %8
%15 = phi i32 [ %11, %8 ], [ %13, %12 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @triow_to_upper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ eightK_inst1();
int /*<<< orphan*/ eightK_inst2();
int /*<<< orphan*/ printf(char *);
main() {
  printf("running ubenchmark: nextline_prefetch...\n");
  while (1) {
    eightK_inst1();
    eightK_inst2();
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <eightK_inst1@plt>
mov    $0x0,%al
call   1050 <eightK_inst2@plt>
jmp    114b <main+0x1b>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
nopl   (%rax)
xor    %eax,%eax
call   1040 <eightK_inst1@plt>
xor    %eax,%eax
call   1050 <eightK_inst2@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
@.str = [42 x i8] c"running ubenchmark: nextline_prefetch...\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %0, %3
%4 = call i32 (...) @eightK_inst1()
%5 = call i32 (...) @eightK_inst2()
br label %3
}

LLVM IR (-O2):
@str = [41 x i8] c"running ubenchmark: nextline_prefetch...\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = tail call i32 (...) @eightK_inst1()
%4 = tail call i32 (...) @eightK_inst2()
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() {
  printf("Usage:\n");
  printf("./avaldes seed max_clients disk_static_time disk_dynamic_time "
         "cpu_static_time cpu_dynamic_time arrival_time use_case\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee3(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [118 x i8] c"./avaldes seed max_clients disk_static_time disk_dynamic_time cpu_static_time cpu_dynamic_time arrival_time use_case\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [7 x i8] c"Usage:\00"
@str.2 = [117 x i8] c"./avaldes seed max_clients disk_static_time disk_dynamic_time cpu_static_time cpu_dynamic_time arrival_time use_case\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([117 x i8], [117 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cache_Read_Disable();
int /*<<< orphan*/ call_user_start();
void user_start_trampoline(void) {
  Cache_Read_Disable();
  call_user_start();
}


x86 assembly (clang, -O0):
<user_start_trampoline>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <Cache_Read_Disable@plt>
mov    $0x0,%al
call   1030 <call_user_start@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<user_start_trampoline>:
push   %rax
xor    %eax,%eax
call   1040 <Cache_Read_Disable@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <call_user_start@plt>

LLVM IR (-O0):
define void @user_start_trampoline() {
%1 = call i32 (...) @Cache_Read_Disable()
%2 = call i32 (...) @call_user_start()
ret void
}

LLVM IR (-O2):
define void @user_start_trampoline() {
%1 = tail call i32 (...) @Cache_Read_Disable()
%2 = tail call i32 (...) @call_user_start()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int(foo1)(int bar) {
  printf("Hello cruel world.\n");
  return (2 + 3 + ({ 2; }));
}


x86 assembly (clang, -O0):
<foo1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x5,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo1>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x7,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Hello cruel world.\0A\00"
define i32 @foo1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store i32 2, i32* %3
%5 = load i32, i32* %3
%6 = add nsw i32 5, %5
ret i32 %6
}

LLVM IR (-O2):
@str = [19 x i8] c"Hello cruel world.\00"
define i32 @foo1(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 7
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int hash_uint32(int);
uint32_t noise3D(uint32_t x, uint32_t y, uint32_t z, uint32_t seed) {
  return hash_uint32(
      (hash_uint32(x) ^ (hash_uint32(y) << 12) ^ (hash_uint32(z) << 24)) +
      seed);
}


x86 assembly (clang, -O0):
<noise3D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <hash_uint32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <hash_uint32@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
shl    $0xc,%ecx
xor    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <hash_uint32@plt>
mov    -0x14(%rbp),%edi
shl    $0x18,%eax
xor    %eax,%edi
add    -0x10(%rbp),%edi
call   1030 <hash_uint32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<noise3D>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%ebx
call   1030 <hash_uint32@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <hash_uint32@plt>
shl    $0xc,%eax
xor    %eax,%ebp
mov    %r15d,%edi
call   1030 <hash_uint32@plt>
shl    $0x18,%eax
xor    %eax,%ebp
add    %r14d,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <hash_uint32@plt>

LLVM IR (-O0):
define i32 @noise3D(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = call i32 @hash_uint32(i32 %9)
%11 = load i32, i32* %6
%12 = call i32 @hash_uint32(i32 %11)
%13 = shl i32 %12, 12
%14 = xor i32 %10, %13
%15 = load i32, i32* %7
%16 = call i32 @hash_uint32(i32 %15)
%17 = shl i32 %16, 24
%18 = xor i32 %14, %17
%19 = load i32, i32* %8
%20 = add nsw i32 %18, %19
%21 = call i32 @hash_uint32(i32 %20)
ret i32 %21
}

LLVM IR (-O2):
define i32 @noise3D(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @hash_uint32(i32 %0)
%6 = tail call i32 @hash_uint32(i32 %1)
%7 = shl i32 %6, 12
%8 = xor i32 %7, %5
%9 = tail call i32 @hash_uint32(i32 %2)
%10 = shl i32 %9, 24
%11 = xor i32 %8, %10
%12 = add nsw i32 %11, %3
%13 = tail call i32 @hash_uint32(i32 %12)
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ fixpt_from_int(int);
int /*<<< orphan*/ fixpt_mul(int /*<<< orphan*/, int /*<<< orphan*/);
int fixpt_to_int(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  assert(fixpt_to_int(fixpt_mul(fixpt_from_int(1), fixpt_from_int(1))) == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
call   1030 <fixpt_from_int@plt>
mov    %eax,-0x14(%rbp)
mov    $0x1,%edi
call   1030 <fixpt_from_int@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <fixpt_mul@plt>
mov    %eax,%edi
call   1060 <fixpt_to_int@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
call   1030 <fixpt_from_int@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1030 <fixpt_from_int@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <fixpt_mul@plt>
mov    %eax,%edi
call   1060 <fixpt_to_int@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1050 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @fixpt_from_int(i32 1)
%7 = call i32 @fixpt_from_int(i32 1)
%8 = call i32 @fixpt_mul(i32 %6, i32 %7)
%9 = call i32 @fixpt_to_int(i32 %8)
%10 = icmp eq i32 %9, 1
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @fixpt_from_int(i32 1)
%4 = tail call i32 @fixpt_from_int(i32 1)
%5 = tail call i32 @fixpt_mul(i32 %3, i32 %4)
%6 = tail call i32 @fixpt_to_int(i32 %5)
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
ret i32 0
}
void ADC_DelSig_1_ISR4(void) {}


x86 assembly (clang, -O0):
<ADC_DelSig_1_ISR4>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADC_DelSig_1_ISR4>:
ret

LLVM IR (-O0):
define void @ADC_DelSig_1_ISR4() {
ret void
}

LLVM IR (-O2):
define void @ADC_DelSig_1_ISR4() {
ret void
}
int HelpItem75(void) { return 0; }


x86 assembly (clang, -O0):
<HelpItem75>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HelpItem75>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @HelpItem75() {
ret i32 0
}

LLVM IR (-O2):
define i32 @HelpItem75() {
ret i32 0
}
/* Type definitions */
struct timeval {
  double tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
double wtime() {
  struct timeval tv;
  gettimeofday(&tv, 0);
  return tv.tv_sec + 1e-6 * tv.tv_usec;
}


x86 assembly (clang, -O0):
<wtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm1
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xecb(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wtime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0xed2(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i32 }
define double @wtime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i32, i32* %5
%7 = sitofp i32 %6 to double
%8 = call double @llvm.fmuladd.f64(double 0x3EB0C6F7A0B5ED8D, double %7, double %4)
ret double %8
}

LLVM IR (-O2):
%struct.timeval = type { double, i32 }
define double @wtime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = call double @llvm.fmuladd.f64(double %8, double 0x3EB0C6F7A0B5ED8D, double %5)
ret double %9
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int type;
};
struct TYPE_4__ {
  TYPE_1__ xclient;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xclient_type(void *_p, int _v) {
  ((XEvent *)_p)->xclient.type = (int)_v;
}


x86 assembly (clang, -O0):
<set_XEvent_xclient_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XEvent_xclient_type>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xclient_type(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xclient_type(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
bool nrf51_errata_4(void) { return false; }


x86 assembly (clang, -O0):
<nrf51_errata_4>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf51_errata_4>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @nrf51_errata_4() {
ret i32 0
}

LLVM IR (-O2):
define i32 @nrf51_errata_4() {
ret i32 0
}
const char *run_pdf_get_title(void) {
  return "Create / overwrite a large file in the current directory";
}


x86 assembly (clang, -O0):
<run_pdf_get_title>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_pdf_get_title>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [57 x i8] c"Create / overwrite a large file in the current directory\00"
define i8* @run_pdf_get_title() {
ret i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [57 x i8] c"Create / overwrite a large file in the current directory\00"
define i8* @run_pdf_get_title() {
ret i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct afp_volume {
  int dummy;
};

/* Variables and functions */
int EPERM;
int extra_translate(struct afp_volume *, char const *, char **);
int /*<<< orphan*/ free(char *);
int appledouble_rename(struct afp_volume *volume, const char *path_from,
                       const char *path_to) {
  int resource;
  char *newpath;
  resource = extra_translate(volume, path_to, &newpath);
  free(newpath);
  if (resource == 0)
    return 0;
  return -EPERM;
}


x86 assembly (clang, -O0):
<appledouble_rename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1040 <extra_translate@plt>
mov    %eax,-0x24(%rbp)
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
cmpl   $0x0,-0x24(%rbp)
jne    1167 <appledouble_rename+0x47>
movl   $0x0,-0x4(%rbp)
jmp    1175 <appledouble_rename+0x55>
xor    %eax,%eax
mov    0x2e68(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<appledouble_rename>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rax
mov    %rdx,%rsi
mov    %rax,%rdx
call   1040 <extra_translate@plt>
mov    %eax,%ebx
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    0x2e90(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
test   %ebx,%ebx
cmove  %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.afp_volume = type { i32 }
@EPERM = global i32 0
define i32 @appledouble_rename(%struct.afp_volume* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.afp_volume*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
store %struct.afp_volume* %0, %struct.afp_volume** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%10 = load %struct.afp_volume*, %struct.afp_volume** %5
%11 = load i8*, i8** %7
%12 = call i32 @extra_translate(%struct.afp_volume* %10, i8* %11, i8** %9)
store i32 %12, i32* %8
%13 = load i8*, i8** %9
%14 = call i32 @free(i8* %13)
%15 = load i32, i32* %8
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %3
store i32 0, i32* %4
br label %21
18: ; preds = %3
%19 = load i32, i32* @EPERM
%20 = sub nsw i32 0, %19
store i32 %20, i32* %4
br label %21
21: ; preds = %18, %17
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
%struct.afp_volume = type { i32 }
@EPERM = global i32 0
define i32 @appledouble_rename(%struct.afp_volume* %0, i8* nocapture readnone %1, i8* %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
%6 = call i32 @extra_translate(%struct.afp_volume* %0, i8* %2, i8** %4)
%7 = load i8*, i8** %4
%8 = call i32 @free(i8* %7)
%9 = icmp eq i32 %6, 0
%10 = load i32, i32* @EPERM
%11 = sub nsw i32 0, %10
%12 = select i1 %9, i32 0, i32 %11
ret i32 %12
}
/* Type definitions */
typedef unsigned int uint32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t ror32(uint32_t data, unsigned int rotation) {
  return ((data >> rotation) | (data << (32 - rotation)));
}


x86 assembly (clang, -O0):
<ror32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ror32>:
mov    %esi,%ecx
mov    %edi,%eax
ror    %cl,%eax
ret

LLVM IR (-O0):
define i32 @ror32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = lshr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub i32 32, %9
%11 = shl i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @ror32(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = sub i32 32, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ displays_string_refute_failed(char const *, char const *,
                                                 char const *, int);
void Displayer_display_refute_equal_string_failed(const char *exp,
                                                  const char *act,
                                                  const char *file, int line) {
  displays_string_refute_failed(exp, act, file, line);
}


x86 assembly (clang, -O0):
<Displayer_display_refute_equal_string_failed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <displays_string_refute_failed@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Displayer_display_refute_equal_string_failed>:
jmp    1030 <displays_string_refute_failed@plt>

LLVM IR (-O0):
define void @Displayer_display_refute_equal_string_failed(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 @displays_string_refute_failed(i8* %9, i8* %10, i8* %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @Displayer_display_refute_equal_string_failed(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @displays_string_refute_failed(i8* %0, i8* %1, i8* %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add_item(int);
int /*<<< orphan*/ dump_list();
int /*<<< orphan*/ init_list();
int main(int argc, char **argv) {
  int i;
  init_list();
  for (i = 0; i < 10; i++) {
    add_item(i);
  }
  dump_list();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <init_list@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    1174 <main+0x44>
mov    -0x14(%rbp),%edi
call   1030 <add_item@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1154 <main+0x24>
mov    $0x0,%al
call   1040 <dump_list@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <init_list@plt>
xor    %edi,%edi
call   1030 <add_item@plt>
mov    $0x1,%edi
call   1030 <add_item@plt>
mov    $0x2,%edi
call   1030 <add_item@plt>
mov    $0x3,%edi
call   1030 <add_item@plt>
mov    $0x4,%edi
call   1030 <add_item@plt>
mov    $0x5,%edi
call   1030 <add_item@plt>
mov    $0x6,%edi
call   1030 <add_item@plt>
mov    $0x7,%edi
call   1030 <add_item@plt>
mov    $0x8,%edi
call   1030 <add_item@plt>
mov    $0x9,%edi
call   1030 <add_item@plt>
xor    %eax,%eax
call   1040 <dump_list@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @init_list()
store i32 0, i32* %6
br label %8
8: ; preds = %14, %2
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 10
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = load i32, i32* %6
%13 = call i32 @add_item(i32 %12)
br label %14
14: ; preds = %11
%15 = load i32, i32* %6
%16 = add nsw i32 %15, 1
store i32 %16, i32* %6
br label %8
17: ; preds = %8
%18 = call i32 (...) @dump_list()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init_list()
%4 = tail call i32 @add_item(i32 0)
%5 = tail call i32 @add_item(i32 1)
%6 = tail call i32 @add_item(i32 2)
%7 = tail call i32 @add_item(i32 3)
%8 = tail call i32 @add_item(i32 4)
%9 = tail call i32 @add_item(i32 5)
%10 = tail call i32 @add_item(i32 6)
%11 = tail call i32 @add_item(i32 7)
%12 = tail call i32 @add_item(i32 8)
%13 = tail call i32 @add_item(i32 9)
%14 = tail call i32 (...) @dump_list()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int endmntent(FILE *filep) {
  fclose(filep);
  return 1;
}


x86 assembly (clang, -O0):
<endmntent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<endmntent>:
push   %rax
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @endmntent(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fclose(i32* %3)
ret i32 1
}

LLVM IR (-O2):
define i32 @endmntent(i32* nocapture %0) {
%2 = tail call i32 @fclose(i32* %0)
ret i32 1
}
void gtk_spin_button_get_update_policy() {}


x86 assembly (clang, -O0):
<gtk_spin_button_get_update_policy>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_spin_button_get_update_policy>:
ret

LLVM IR (-O0):
define void @gtk_spin_button_get_update_policy() {
ret void
}

LLVM IR (-O2):
define void @gtk_spin_button_get_update_policy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void p_reverse(int val) {
  if (val == 0)
    return;
  printf("%d ", val);
  p_reverse(val - 1);
}


x86 assembly (clang, -O0):
<p_reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    113a <p_reverse+0x1a>
jmp    1154 <p_reverse+0x34>
mov    -0x4(%rbp),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1040 <p_reverse@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p_reverse>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
je     113f <p_reverse+0x2f>
mov    %edi,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1130 <p_reverse+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define void @p_reverse(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 1
br label %11
11: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @p_reverse(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = add nsw i32 %4, -1
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
unsigned current_msec() {
  struct timeval t;
  gettimeofday(&t, 0);
  return t.tv_sec * 1000 + t.tv_usec / 1000;
}


x86 assembly (clang, -O0):
<current_msec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<current_msec>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,(%rsp),%ecx
movslq 0x4(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @current_msec() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i32, i32* %6
%8 = sdiv i32 %7, 1000
%9 = add nsw i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @current_msec() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000
%10 = add nsw i32 %9, %6
ret i32 %10
}
int main() {
  double arr[3];
  arr[0] = 1;
  arr[1] = 2.0;
  arr[2] = arr - arr;
  return (int)(arr[0] + arr[1] + arr[2]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movsd  0xef5(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xee0(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    -0x20(%rbp),%rax
lea    -0x20(%rbp),%rcx
sub    %rcx,%rax
sar    $0x3,%rax
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x20(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x double]
store i32 0, i32* %1
%3 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
store double 1.000000e+00, double* %3
%4 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 1
store double 2.000000e+00, double* %4
%5 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%6 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%7 = ptrtoint double* %5 to i64
%8 = ptrtoint double* %6 to i64
%9 = sub i64 %7, %8
%10 = sdiv exact i64 %9, 8
%11 = sitofp i64 %10 to double
%12 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 2
store double %11, double* %12
%13 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%14 = load double, double* %13
%15 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 1
%16 = load double, double* %15
%17 = fadd double %14, %16
%18 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 2
%19 = load double, double* %18
%20 = fadd double %17, %19
%21 = fptosi double %20 to i32
ret i32 %21
}

LLVM IR (-O2):
define i32 @main() {
ret i32 3
}
void set_page_user_trace(struct page *page, int numpages, int free) {}


x86 assembly (clang, -O0):
<set_page_user_trace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_page_user_trace>:
ret

LLVM IR (-O0):
%struct.page = type opaque
define void @set_page_user_trace(%struct.page* %0, i32 %1, i32 %2) {
%4 = alloca %struct.page*
%5 = alloca i32
%6 = alloca i32
store %struct.page* %0, %struct.page** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.page = type opaque
define void @set_page_user_trace(%struct.page* nocapture %0, i32 %1, i32 %2) {
ret void
}
void instruc_30() {}


x86 assembly (clang, -O0):
<instruc_30>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<instruc_30>:
ret

LLVM IR (-O0):
define void @instruc_30() {
ret void
}

LLVM IR (-O2):
define void @instruc_30() {
ret void
}
void tty_set_size(width, height) int width, height;
{}


x86 assembly (clang, -O0):
<tty_set_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_set_size>:
ret

LLVM IR (-O0):
define void @tty_set_size(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @tty_set_size(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
float powf(float, float);
float exponential_ease_in(float p) {
  float f = p;
  if (p != 0.0f) {
    f = powf(2.0f, 10.0f * (p - 1.0f));
  }
  return f;
}


x86 assembly (clang, -O0):
<exponential_ease_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1143 <exponential_ease_in+0x33>
jp     1143 <exponential_ease_in+0x33>
jmp    1172 <exponential_ease_in+0x62>
movss  -0x4(%rbp),%xmm0
movss  0xeb8(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xea8(%rip),%xmm1
mulss  %xmm0,%xmm1
movss  0xe98(%rip),%xmm0
call   1030 <powf@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exponential_ease_in>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    111a <exponential_ease_in+0xa>
jnp    112f <exponential_ease_in+0x1f>
addss  0xede(%rip),%xmm0
mulss  0xeda(%rip),%xmm0
jmp    1030 <exp2f@plt>
ret

LLVM IR (-O0):
define float @exponential_ease_in(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
store float %4, float* %3
%5 = load float, float* %2
%6 = fcmp une float %5, 0.000000e+00
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load float, float* %2
%9 = fsub float %8, 1.000000e+00
%10 = fmul float 1.000000e+01, %9
%11 = call float @powf(float 2.000000e+00, float %10)
store float %11, float* %3
br label %12
12: ; preds = %7, %1
%13 = load float, float* %3
ret float %13
}

LLVM IR (-O2):
define float @exponential_ease_in(float %0) {
%2 = fcmp une float %0, 0.000000e+00
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = fadd float %0, -1.000000e+00
%5 = fmul float %4, 1.000000e+01
%6 = tail call float @exp2f(float %5)
br label %7
7: ; preds = %3, %1
%8 = phi float [ %6, %3 ], [ %0, %1 ]
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
rderr() { fatal("read error"); }


x86 assembly (clang, -O0):
<rderr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <fatal@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rderr>:
lea    0xee9(%rip),%rdi
jmp    1030 <fatal@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"read error\00"
define i32 @rderr() {
%1 = alloca i32
%2 = call i32 @fatal(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [11 x i8] c"read error\00"
define i32 @rderr() {
%1 = tail call i32 @fatal(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int SIGINT;
int SIGQUIT;
int SIGTERM;
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ tty_reset();
void __attribute__((noreturn)) handle_sigterm(int signum) {
  assert(signum == SIGINT || signum == SIGQUIT || signum == SIGTERM);
  tty_reset();
  exit(0);
}


x86 assembly (clang, -O0):
<handle_sigterm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2ea1(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     117b <handle_sigterm+0x4b>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2e7a(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     117b <handle_sigterm+0x4b>
mov    -0x4(%rbp),%eax
mov    0x2e6d(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x0,%al
call   1050 <tty_reset@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handle_sigterm>:
push   %rax
mov    0x2eb0(%rip),%rax
cmp    %edi,(%rax)
sete   %al
mov    0x2e94(%rip),%rcx
cmp    %edi,(%rcx)
sete   %cl
or     %al,%cl
mov    0x2e8e(%rip),%rax
cmp    %edi,(%rax)
sete   %al
or     %cl,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
call   1050 <tty_reset@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@SIGQUIT = global i32 0
@SIGTERM = global i32 0
define void @handle_sigterm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGINT
%5 = icmp eq i32 %3, %4
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = load i32, i32* @SIGQUIT
%9 = icmp eq i32 %7, %8
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = load i32, i32* @SIGTERM
%13 = icmp eq i32 %11, %12
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = call i32 (...) @tty_reset()
%19 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIGQUIT = global i32 0
@SIGTERM = global i32 0
define void @handle_sigterm(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = icmp eq i32 %2, %0
%4 = load i32, i32* @SIGQUIT
%5 = icmp eq i32 %4, %0
%6 = select i1 %3, i1 true, i1 %5
%7 = load i32, i32* @SIGTERM
%8 = icmp eq i32 %7, %0
%9 = select i1 %6, i1 true, i1 %8
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
%12 = tail call i32 (...) @tty_reset()
%13 = tail call i32 @exit(i32 0)
unreachable
}