xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ create_cpu_timer();
int /*<<< orphan*/ create_realtime_timer();
int /*<<< orphan*/ get_cur_time();
int /*<<< orphan*/ interval_timer();
int /*<<< orphan*/ sleep_advanced();
int /*<<< orphan*/ sleep_demo();
int /*<<< orphan*/ time_resoulutions();
int main(void) {
  time_resoulutions();
  get_cur_time();
  sleep_demo();
  sleep_advanced();
  interval_timer();
  create_cpu_timer();
  create_realtime_timer();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <time_resoulutions@plt>
mov    $0x0,%al
call   1060 <get_cur_time@plt>
mov    $0x0,%al
call   1030 <sleep_demo@plt>
mov    $0x0,%al
call   1070 <sleep_advanced@plt>
mov    $0x0,%al
call   1090 <interval_timer@plt>
mov    $0x0,%al
call   1040 <create_cpu_timer@plt>
mov    $0x0,%al
call   1080 <create_realtime_timer@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <time_resoulutions@plt>
xor    %eax,%eax
call   1060 <get_cur_time@plt>
xor    %eax,%eax
call   1030 <sleep_demo@plt>
xor    %eax,%eax
call   1070 <sleep_advanced@plt>
xor    %eax,%eax
call   1090 <interval_timer@plt>
xor    %eax,%eax
call   1040 <create_cpu_timer@plt>
xor    %eax,%eax
call   1080 <create_realtime_timer@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @time_resoulutions()
%3 = call i32 (...) @get_cur_time()
%4 = call i32 (...) @sleep_demo()
%5 = call i32 (...) @sleep_advanced()
%6 = call i32 (...) @interval_timer()
%7 = call i32 (...) @create_cpu_timer()
%8 = call i32 (...) @create_realtime_timer()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @time_resoulutions()
%2 = tail call i32 (...) @get_cur_time()
%3 = tail call i32 (...) @sleep_demo()
%4 = tail call i32 (...) @sleep_advanced()
%5 = tail call i32 (...) @interval_timer()
%6 = tail call i32 (...) @create_cpu_timer()
%7 = tail call i32 (...) @create_realtime_timer()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int dbg_cpu1_read(uint32_t adr, uint32_t *data) { return 0; }


x86 assembly (clang, -O0):
<dbg_cpu1_read>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @dbg_cpu1_read(i32 %0, i32* nocapture readnone %1) {
ret i32 0
}
void gtk_icon_factory_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_factory_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func(int);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Start\n");
  func(15);
  printf("End\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xf,%edi
call   1040 <func@plt>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"Start\0A\00"
@.str.1 = [5 x i8] c"End\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @func(i32 15)
%3 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [6 x i8] c"Start\00"
@str.2 = [4 x i8] c"End\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @func(i32 15)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ analyze_method2();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ read_char();
int main(void) {
  char ch;
  printf("enter a sentence: ");
  read_char();
  if (analyze_method2())
    printf("\nentered sentence is a palindrom!\n");
  else
    printf("\nnot a palindrom!\n");
  return 0;
}


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   1050 <read_char@plt>
mov    $0x0,%al
call   1040 <analyze_method2@plt>
cmp    $0x0,%rax
je     1174 <main+0x44>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    1180 <main+0x50>
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <read_char@plt>
xor    %eax,%eax
call   1050 <analyze_method2@plt>
test   %rax,%rax
lea    0xeae(%rip),%rax
lea    0xeb9(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"enter a sentence: \00"
@.str.1 = [35 x i8] c"\0Aentered sentence is a palindrom!\0A\00"
@.str.2 = [19 x i8] c"\0Anot a palindrom!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @read_char()
%5 = call i64 (...) @analyze_method2()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
br label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"enter a sentence: \00"
@str = [18 x i8] c"\0Anot a palindrom!\00"
@str.3 = [34 x i8] c"\0Aentered sentence is a palindrom!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @read_char()
%3 = tail call i64 (...) @analyze_method2()
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @str.3, i64 0, i64 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret i32 0
}
int int_cmp(const void *x1, const void *x2) {
  int y1 = *(const int *)x1;
  int y2 = *(const int *)x2;
  if (y1 < y2) {
    return -1;
  } else if (y1 > y2) {
    return +1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<int_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1136 <int_cmp+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <int_cmp+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    114e <int_cmp+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <int_cmp+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_cmp>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @int_cmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
store i32 %10, i32* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i32*
%13 = load i32, i32* %12
store i32 %13, i32* %7
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %24
18: ; preds = %2
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = icmp sgt i32 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @int_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp sgt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
void purelin(float *x, float N, float *y) {
  int i;
  for (i = 0; i < N; ++i) {
    y[i] = x[i];
  }
}


x86 assembly (clang, -O0):
<purelin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cvtsi2ssl -0x1c(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1153 <purelin+0x53>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1118 <purelin+0x18>
pop    %rbp
ret

x86 assembly (clang, -O2):
<purelin>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    112a <purelin+0x2a>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movss  (%rdi,%rax,4),%xmm1
movss  %xmm1,(%rsi,%rax,4)
add    $0x1,%rax
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
ucomiss %xmm1,%xmm0
ja     1110 <purelin+0x10>
ret

LLVM IR (-O0):
define void @purelin(float* %0, float %1, float* %2) {
%4 = alloca float*
%5 = alloca float
%6 = alloca float*
%7 = alloca i32
store float* %0, float** %4
store float %1, float* %5
store float* %2, float** %6
store i32 0, i32* %7
br label %8
8: ; preds = %23, %3
%9 = load i32, i32* %7
%10 = sitofp i32 %9 to float
%11 = load float, float* %5
%12 = fcmp olt float %10, %11
br i1 %12, label %13, label %26
13: ; preds = %8
%14 = load float*, float** %4
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds float, float* %14, i64 %16
%18 = load float, float* %17
%19 = load float*, float** %6
%20 = load i32, i32* %7
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds float, float* %19, i64 %21
store float %18, float* %22
br label %23
23: ; preds = %13
%24 = load i32, i32* %7
%25 = add nsw i32 %24, 1
store i32 %25, i32* %7
br label %8
26: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @purelin(float* nocapture %0, float %1, float* nocapture writeonly %2) {
%4 = fcmp ogt float %1, 0.000000e+00
br i1 %4, label %5, label %14
5: ; preds = %3, %5
%6 = phi i64 [ %10, %5 ], [ 0, %3 ]
%7 = getelementptr inbounds float, float* %0, i64 %6
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %2, i64 %6
store float %8, float* %9
%10 = add nuw i64 %6, 1
%11 = trunc i64 %10 to i32
%12 = sitofp i32 %11 to float
%13 = fcmp olt float %12, %1
br i1 %13, label %5, label %14
14: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xa3() {
  Assert_real((ispunct(163) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              820, ("ispunct should be 0 for 0xa3"));
}


x86 assembly (clang, -O0):
<t_ispunct_0xa3>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa3,%edi
call   1030 <ispunct@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x334,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0xa3>:
push   %rax
mov    $0xa3,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x334,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xa3\00"
define void @t_ispunct_0xa3() {
%1 = call i64 @ispunct(i32 163)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 820, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xa3\00"
define void @t_ispunct_0xa3() {
%1 = tail call i64 @ispunct(i32 163)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 820, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int f_1_e() { return 3; }


x86 assembly (clang, -O0):
<f_1_e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f_1_e() {
ret i32 3
}

LLVM IR (-O2):
define i32 @f_1_e() {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ SkipBracedSection_Depth(char **, int /*<<< orphan*/);
void SkipBracedSection(char **program) { SkipBracedSection_Depth(program, 0); }


x86 assembly (clang, -O0):
<SkipBracedSection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <SkipBracedSection_Depth@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SkipBracedSection>:
xor    %esi,%esi
jmp    1030 <SkipBracedSection_Depth@plt>

LLVM IR (-O0):
define void @SkipBracedSection(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call i32 @SkipBracedSection_Depth(i8** %3, i32 0)
ret void
}

LLVM IR (-O2):
define void @SkipBracedSection(i8** %0) {
%2 = tail call i32 @SkipBracedSection_Depth(i8** %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char const *);
int isPLAIN(const char *type) { return (type && !strcmp("PLAIN", type)); }


x86 assembly (clang, -O0):
<isPLAIN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1147 <isPLAIN+0x37>
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPLAIN>:
test   %rdi,%rdi
je     1133 <isPLAIN+0x23>
push   %rax
mov    %rdi,%rsi
lea    0xee0(%rip),%rdi
call   1030 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"PLAIN\00"
define i32 @isPLAIN(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
br label %10
10: ; preds = %5, %1
%11 = phi i1 [ false, %1 ], [ %9, %5 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@.str = [6 x i8] c"PLAIN\00"
define i32 @isPLAIN(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @strcmp(i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
double pot(float, int);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, float *, int *);
int main() {
  float a;
  int b;
  scanf("%f %d", &a, &b);
  printf("%.2f", pot(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
movss  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
call   1040 <pot@plt>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
mov    (%rsp),%edi
call   1040 <pot@plt>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%f %d\00"
@.str.1 = [5 x i8] c"%.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %2, i32* %3)
%5 = load float, float* %2
%6 = load i32, i32* %3
%7 = call double @pot(float %5, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%f %d\00"
@.str.1 = [5 x i8] c"%.2f\00"
define i32 @main() {
%1 = alloca float
%2 = alloca i32
%3 = bitcast float* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, i32* %2)
%6 = load float, float* %1
%7 = load i32, i32* %2
%8 = call double @pot(float %6, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ makestr(char **, char const *);
void xmakestr(char **p, const char *s) {
  if (s)
    makestr(p, s);
}


x86 assembly (clang, -O0):
<xmakestr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1138 <xmakestr+0x28>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <makestr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmakestr>:
test   %rsi,%rsi
je     111a <xmakestr+0xa>
jmp    1030 <makestr@plt>
ret

LLVM IR (-O0):
define void @xmakestr(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i8**, i8*** %3
%9 = load i8*, i8** %4
%10 = call i32 @makestr(i8** %8, i8* %9)
br label %11
11: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
define void @xmakestr(i8** %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @makestr(i8** %0, i8* %1)
br label %6
6: ; preds = %4, %2
ret void
}
void XtGetClassExtension() {}


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

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

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

LLVM IR (-O2):
define void @XtGetClassExtension() {
ret void
}
char *strchr0(const char *s, int c) {
  while (*s != c)
    if (!*s++)
      return (void *)0;
  return (char *)s;
}


x86 assembly (clang, -O0):
<strchr0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
je     1145 <strchr0+0x45>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,(%rax)
jne    1140 <strchr0+0x40>
movq   $0x0,-0x8(%rbp)
jmp    114d <strchr0+0x4d>
jmp    110b <strchr0+0xb>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr0>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl (%rax),%ecx
cmp    %esi,%ecx
je     1121 <strchr0+0x21>
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strchr0+0x10>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @strchr0(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = load i32, i32* %5
%11 = icmp ne i32 %9, %10
br i1 %11, label %12, label %19
12: ; preds = %6
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %4
%15 = load i8, i8* %13
%16 = icmp ne i8 %15, 0
br i1 %16, label %18, label %17
17: ; preds = %12
store i8* null, i8** %3
br label %21
18: ; preds = %12
br label %6
19: ; preds = %6
%20 = load i8*, i8** %4
store i8* %20, i8** %3
br label %21
21: ; preds = %19, %17
%22 = load i8*, i8** %3
ret i8* %22
}

LLVM IR (-O2):
define i8* @strchr0(i8* %0, i32 %1) {
br label %3
3: ; preds = %8, %2
%4 = phi i8* [ %0, %2 ], [ %9, %8 ]
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, %1
br i1 %7, label %11, label %8
8: ; preds = %3
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = icmp eq i8 %5, 0
br i1 %10, label %11, label %3
11: ; preds = %3, %8
%12 = phi i8* [ null, %8 ], [ %4, %3 ]
ret i8* %12
}
/* Variables and functions */
double jd2epj(int /*<<< orphan*/);
int /*<<< orphan*/ ut2jd();
double ut2epj() { return (jd2epj(ut2jd())); }


x86 assembly (clang, -O0):
<ut2epj>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ut2jd@plt>
mov    %eax,%edi
call   1040 <jd2epj@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ut2epj>:
push   %rax
xor    %eax,%eax
call   1030 <ut2jd@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <jd2epj@plt>

LLVM IR (-O0):
define double @ut2epj() {
%1 = call i32 (...) @ut2jd()
%2 = call double @jd2epj(i32 %1)
ret double %2
}

LLVM IR (-O2):
define double @ut2epj() {
%1 = tail call i32 (...) @ut2jd()
%2 = tail call double @jd2epj(i32 %1)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage() {
  (void)fprintf(stderr, "usage: %s\n       %s\n",
                "umount [-fv] [-t fstypelist] special | node",
                "umount -a[fv] [-t fstypelist]");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"usage: %s\0A %s\0A\00"
@.str.1 = [44 x i8] c"umount [-fv] [-t fstypelist] special | node\00"
@.str.2 = [30 x i8] c"umount -a[fv] [-t fstypelist]\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"usage: %s\0A %s\0A\00"
@.str.1 = [44 x i8] c"umount [-fv] [-t fstypelist] special | node\00"
@.str.2 = [30 x i8] c"umount -a[fv] [-t fstypelist]\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ htons(int /*<<< orphan*/);
int /*<<< orphan*/ memcpy(void *, int /*<<< orphan*/ *, int);
void writeInt16(int16_t v, void *p) {
  v = htons(v);
  memcpy(p, &v, 2);
}


x86 assembly (clang, -O0):
<writeInt16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <htons@plt>
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x2,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeInt16>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
call   1030 <htons@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @writeInt16(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = call i32 @htons(i32 %5)
store i32 %6, i32* %3
%7 = load i8*, i8** %4
%8 = call i32 @memcpy(i8* %7, i32* %3, i32 2)
ret void
}

LLVM IR (-O2):
define void @writeInt16(i32 %0, i8* %1) {
%3 = alloca i32
%4 = tail call i32 @htons(i32 %0)
store i32 %4, i32* %3
%5 = call i32 @memcpy(i8* %1, i32* %3, i32 2)
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
scalar_t__ bitpack_sets(scalar_t__, unsigned int, unsigned int,
                        int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void test_bitpack_sets(uint64_t vec, unsigned lsb, unsigned width, int64_t val,
                       uint64_t expected) {
  if (bitpack_sets(vec, lsb, width, val) == expected) {
    printf("Successfully packed bits.\n");
  } else {
    printf("Error packing bits.\n");
  }
}


x86 assembly (clang, -O0):
<test_bitpack_sets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1040 <bitpack_sets@plt>
cmp    -0x20(%rbp),%rax
jne    1166 <test_bitpack_sets+0x46>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
jmp    1172 <test_bitpack_sets+0x52>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bitpack_sets>:
push   %rbx
mov    %r8,%rbx
call   1040 <bitpack_sets@plt>
cmp    %rbx,%rax
lea    0xee1(%rip),%rax
lea    0xec6(%rip),%rdi
cmove  %rax,%rdi
pop    %rbx
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [20 x i8] c"Error packing bits.\00"
@str.2 = [26 x i8] c"Successfully packed bits.\00"
define void @test_bitpack_sets(i64 %0, i32 %1, i32 %2, i32 %3, i64 %4) {
%6 = tail call i64 @bitpack_sets(i64 %0, i32 %1, i32 %2, i32 %3)
%7 = icmp eq i64 %6, %4
%8 = select i1 %7, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0)
%9 = tail call i32 @puts(i8* dereferenceable(1) %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_list_zip_iter_add();
int /*<<< orphan*/ test_list_zip_iter_next();
int /*<<< orphan*/ test_list_zip_iter_remove();
int /*<<< orphan*/ test_list_zip_iter_replace();
void test_list_zip_iter() {
  test_list_zip_iter_next();
  test_list_zip_iter_add();
  test_list_zip_iter_remove();
  test_list_zip_iter_replace();
}


x86 assembly (clang, -O0):
<test_list_zip_iter>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <test_list_zip_iter_next@plt>
mov    $0x0,%al
call   1050 <test_list_zip_iter_add@plt>
mov    $0x0,%al
call   1060 <test_list_zip_iter_remove@plt>
mov    $0x0,%al
call   1030 <test_list_zip_iter_replace@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_list_zip_iter>:
push   %rax
xor    %eax,%eax
call   1040 <test_list_zip_iter_next@plt>
xor    %eax,%eax
call   1050 <test_list_zip_iter_add@plt>
xor    %eax,%eax
call   1060 <test_list_zip_iter_remove@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <test_list_zip_iter_replace@plt>

LLVM IR (-O0):
define void @test_list_zip_iter() {
%1 = call i32 (...) @test_list_zip_iter_next()
%2 = call i32 (...) @test_list_zip_iter_add()
%3 = call i32 (...) @test_list_zip_iter_remove()
%4 = call i32 (...) @test_list_zip_iter_replace()
ret void
}

LLVM IR (-O2):
define void @test_list_zip_iter() {
%1 = tail call i32 (...) @test_list_zip_iter_next()
%2 = tail call i32 (...) @test_list_zip_iter_add()
%3 = tail call i32 (...) @test_list_zip_iter_remove()
%4 = tail call i32 (...) @test_list_zip_iter_replace()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *strdup(char *);
char *xstrdup(char *s) {
  char *cp;
  cp = strdup(s);
  if (cp == NULL) {
    fprintf(stderr, "xstrdup: out of virtual memory\n");
    exit(2);
  }
  return (cp);
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <xstrdup+0x43>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rax
call   1050 <strdup@plt>
test   %rax,%rax
je     113d <xstrdup+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"xstrdup: out of virtual memory\0A\00"
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 2)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"xstrdup: out of virtual memory\0A\00"
define noalias i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 2)
unreachable
8: ; preds = %1
ret i8* %2
}
int Operand_ar8_encode(unsigned int *valp) {
  int error;
  error = (*valp & ~0x3f) != 0;
  return error;
}


x86 assembly (clang, -O0):
<Operand_ar8_encode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0xffffffc0,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_ar8_encode>:
xor    %eax,%eax
cmpl   $0x40,(%rdi)
setae  %al
ret

LLVM IR (-O0):
define i32 @Operand_ar8_encode(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = and i32 %5, -64
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i32
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @Operand_ar8_encode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp ugt i32 %2, 63
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ CONF_modules_unload(int);
int /*<<< orphan*/ CRYPTO_cleanup_all_ex_data();
int /*<<< orphan*/ ENGINE_cleanup();
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ ERR_remove_thread_state(int /*<<< orphan*/ *);
int /*<<< orphan*/ EVP_cleanup();
int /*<<< orphan*/ OBJ_cleanup();
int /*<<< orphan*/ RAND_cleanup();
int /*<<< orphan*/ destroy_ui_method();
void openssl_shutdown(void) {
  CONF_modules_unload(1);
  destroy_ui_method();
  OBJ_cleanup();
  EVP_cleanup();
  ENGINE_cleanup();
  CRYPTO_cleanup_all_ex_data();
  ERR_remove_thread_state(NULL);
  RAND_cleanup();
  ERR_free_strings();
}


x86 assembly (clang, -O0):
<openssl_shutdown>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1060 <CONF_modules_unload@plt>
mov    $0x0,%al
call   10b0 <destroy_ui_method@plt>
mov    $0x0,%al
call   1070 <OBJ_cleanup@plt>
mov    $0x0,%al
call   1080 <EVP_cleanup@plt>
mov    $0x0,%al
call   1050 <ENGINE_cleanup@plt>
mov    $0x0,%al
call   1040 <CRYPTO_cleanup_all_ex_data@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <ERR_remove_thread_state@plt>
mov    $0x0,%al
call   10a0 <RAND_cleanup@plt>
mov    $0x0,%al
call   1090 <ERR_free_strings@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<openssl_shutdown>:
push   %rax
mov    $0x1,%edi
call   1060 <CONF_modules_unload@plt>
xor    %eax,%eax
call   10b0 <destroy_ui_method@plt>
xor    %eax,%eax
call   1070 <OBJ_cleanup@plt>
xor    %eax,%eax
call   1080 <EVP_cleanup@plt>
xor    %eax,%eax
call   1050 <ENGINE_cleanup@plt>
xor    %eax,%eax
call   1040 <CRYPTO_cleanup_all_ex_data@plt>
xor    %edi,%edi
call   1030 <ERR_remove_thread_state@plt>
xor    %eax,%eax
call   10a0 <RAND_cleanup@plt>
xor    %eax,%eax
pop    %rcx
jmp    1090 <ERR_free_strings@plt>

LLVM IR (-O0):
define void @openssl_shutdown() {
%1 = call i32 @CONF_modules_unload(i32 1)
%2 = call i32 (...) @destroy_ui_method()
%3 = call i32 (...) @OBJ_cleanup()
%4 = call i32 (...) @EVP_cleanup()
%5 = call i32 (...) @ENGINE_cleanup()
%6 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
%7 = call i32 @ERR_remove_thread_state(i32* null)
%8 = call i32 (...) @RAND_cleanup()
%9 = call i32 (...) @ERR_free_strings()
ret void
}

LLVM IR (-O2):
define void @openssl_shutdown() {
%1 = tail call i32 @CONF_modules_unload(i32 1)
%2 = tail call i32 (...) @destroy_ui_method()
%3 = tail call i32 (...) @OBJ_cleanup()
%4 = tail call i32 (...) @EVP_cleanup()
%5 = tail call i32 (...) @ENGINE_cleanup()
%6 = tail call i32 (...) @CRYPTO_cleanup_all_ex_data()
%7 = tail call i32 @ERR_remove_thread_state(i32* null)
%8 = tail call i32 (...) @RAND_cleanup()
%9 = tail call i32 (...) @ERR_free_strings()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ idtCreate(void *, int, int);
void idtInstall() {
  extern void *isrTable[];
  extern void idtCommit();
  int i = 0;
  while (isrTable[i]) {
    idtCreate(isrTable[i++], 0x08, 0x8E);
  }
  idtCommit();
}


x86 assembly (clang, -O0):
<idtInstall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    0x2ea6(%rip),%rax
cmpq   $0x0,(%rax,%rcx,8)
je     1172 <idtInstall+0x52>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
movslq %eax,%rcx
mov    0x2e86(%rip),%rax
mov    (%rax,%rcx,8),%rdi
mov    $0x8,%esi
mov    $0x8e,%edx
call   1040 <idtCreate@plt>
jmp    112f <idtInstall+0xf>
mov    $0x0,%al
call   1030 <idtCommit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idtInstall>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%rdi
test   %rdi,%rdi
je     115b <idtInstall+0x3b>
add    $0x8,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x8,%esi
mov    $0x8e,%edx
call   1040 <idtCreate@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1140 <idtInstall+0x20>
xor    %eax,%eax
pop    %rbx
jmp    1030 <idtCommit@plt>

LLVM IR (-O0):
@isrTable = external global [0 x i8*]
define void @idtInstall() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [0 x i8*], [0 x i8*]* @isrTable, i64 0, i64 %4
%6 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
%11 = sext i32 %9 to i64
%12 = getelementptr inbounds [0 x i8*], [0 x i8*]* @isrTable, i64 0, i64 %11
%13 = load i8*, i8** %12
%14 = call i32 @idtCreate(i8* %13, i32 8, i32 142)
br label %2
15: ; preds = %2
ret void
}

LLVM IR (-O2):
@isrTable = external global [0 x i8*]
define void @idtInstall() {
%1 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @isrTable, i64 0, i64 0)
%2 = icmp eq i8* %1, null
br i1 %2, label %11, label %3
3: ; preds = %0, %3
%4 = phi i64 [ %6, %3 ], [ 0, %0 ]
%5 = phi i8* [ %9, %3 ], [ %1, %0 ]
%6 = add nuw i64 %4, 1
%7 = tail call i32 @idtCreate(i8* %5, i32 8, i32 142)
%8 = getelementptr inbounds [0 x i8*], [0 x i8*]* @isrTable, i64 0, i64 %6
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %3
11: ; preds = %3, %0
tail call void (...) @idtCommit()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int);
void crash_getc() {
  FILE *f;
  int i;
  f = fopen("this_file_doesnt_exist", "r");
  i = getc(f);
  printf("i =%i\n", i);
  fclose(f);
}


x86 assembly (clang, -O0):
<crash_getc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
lea    0xec1(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <getc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crash_getc>:
push   %rbx
lea    0xeb8(%rip),%rdi
lea    0xec8(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <getc@plt>
lea    0xeb3(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"this_file_doesnt_exist\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [7 x i8] c"i =%i\0A\00"
define void @crash_getc() {
%1 = alloca i32*
%2 = alloca i32
%3 = call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 @getc(i32* %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32*, i32** %1
%9 = call i32 @fclose(i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"this_file_doesnt_exist\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [7 x i8] c"i =%i\0A\00"
define void @crash_getc() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @getc(i32* %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %2)
%4 = tail call i32 @fclose(i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ imaxabs(long);
void inttypes(long int j) { imaxabs(j); }


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

x86 assembly (clang, -O2):
<inttypes>:
jmp    1030 <imaxabs@plt>

LLVM IR (-O0):
define void @inttypes(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @imaxabs(i64 %3)
ret void
}

LLVM IR (-O2):
define void @inttypes(i64 %0) {
%2 = tail call i32 @imaxabs(i64 %0)
ret void
}
int count_slow(int in) {
  int cnt = 0, tmp;
  while (in) {
    if (in % 2 == 1)
      cnt++;
    in /= 2;
  }
  return cnt;
}


x86 assembly (clang, -O0):
<count_slow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1148 <count_slow+0x48>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1135 <count_slow+0x35>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <count_slow+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_slow>:
xor    %eax,%eax
test   %edi,%edi
je     1134 <count_slow+0x34>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    $0x1f,%ecx
add    %edi,%ecx
mov    %ecx,%edx
and    $0xfffffffe,%edx
mov    %edi,%esi
sub    %edx,%esi
xor    %edx,%edx
cmp    $0x1,%esi
sete   %dl
add    %edx,%eax
sar    %ecx
add    $0x1,%edi
cmp    $0x2,%edi
mov    %ecx,%edi
ja     1110 <count_slow+0x10>
ret

LLVM IR (-O0):
define i32 @count_slow(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %15, %1
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = load i32, i32* %2
%10 = srem i32 %9, 2
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %15
15: ; preds = %12, %8
%16 = load i32, i32* %2
%17 = sdiv i32 %16, 2
store i32 %17, i32* %2
br label %5
18: ; preds = %5
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @count_slow(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %10, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = srem i32 %4, 2
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %5, %8
%10 = sdiv i32 %4, 2
%11 = add i32 %4, 1
%12 = icmp ult i32 %11, 3
br i1 %12, label %13, label %3
13: ; preds = %3, %1
%14 = phi i32 [ 0, %1 ], [ %9, %3 ]
ret i32 %14
}
/* Type definitions */
struct fb_cmap {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cmap_validate();
void cmap_validate_change(const struct fb_cmap *old, int error) {
  cmap_validate();
}


x86 assembly (clang, -O0):
<cmap_validate_change>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <cmap_validate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmap_validate_change>:
xor    %eax,%eax
jmp    1030 <cmap_validate@plt>

LLVM IR (-O0):
%struct.fb_cmap = type { i32 }
define void @cmap_validate_change(%struct.fb_cmap* %0, i32 %1) {
%3 = alloca %struct.fb_cmap*
%4 = alloca i32
store %struct.fb_cmap* %0, %struct.fb_cmap** %3
store i32 %1, i32* %4
%5 = call i32 (...) @cmap_validate()
ret void
}

LLVM IR (-O2):
%struct.fb_cmap = type { i32 }
define void @cmap_validate_change(%struct.fb_cmap* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (...) @cmap_validate()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Queue OK\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"Queue OK\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [9 x i8] c"Queue OK\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *cfgfile_subst_path(char *, char *, char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
void subst(char *p, char *f, int n) {
  char *str = cfgfile_subst_path("$(FILE_PATH)", p, f);
  strncpy(f, str, n - 1);
  f[n - 1] = '\0';
  free(str);
}


x86 assembly (clang, -O0):
<subst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeae(%rip),%rdi
call   1050 <cfgfile_subst_path@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <strncpy@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subst>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xeb9(%rip),%rdi
mov    %rbx,%rdx
call   1050 <cfgfile_subst_path@plt>
mov    %rax,%r15
movslq %r14d,%rbp
lea    -0x1(%rbp),%rdx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <strncpy@plt>
movb   $0x0,-0x1(%rbx,%rbp,1)
mov    %r15,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"$(FILE_PATH)\00"
define void @subst(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = call i8* @cfgfile_subst_path(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %5
%12 = load i8*, i8** %7
%13 = load i32, i32* %6
%14 = sub nsw i32 %13, 1
%15 = call i32 @strncpy(i8* %11, i8* %12, i32 %14)
%16 = load i8*, i8** %5
%17 = load i32, i32* %6
%18 = sub nsw i32 %17, 1
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %16, i64 %19
store i8 0, i8* %20
%21 = load i8*, i8** %7
%22 = call i32 @free(i8* %21)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"$(FILE_PATH)\00"
define void @subst(i8* %0, i8* %1, i32 %2) {
%4 = tail call i8* @cfgfile_subst_path(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%5 = add nsw i32 %2, -1
%6 = tail call i32 @strncpy(i8* %1, i8* %4, i32 %5)
%7 = sext i32 %5 to i64
%8 = getelementptr inbounds i8, i8* %1, i64 %7
store i8 0, i8* %8
%9 = tail call i32 @free(i8* %4)
ret void
}