xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *, int);
void f1(int *p1) {
  printf("in f1 getted pointer p1 = %p and its value is:%d;\n\n", p1, *p1);
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
mov    %rdi,%rsi
mov    (%rdi),%edx
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"in f1 getted pointer p1 = %p and its value is:%d;\0A\0A\00"
define void @f1(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32* %3, i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"in f1 getted pointer p1 = %p and its value is:%d;\0A\0A\00"
define void @f1(i32* %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32* %0, i32 %2)
ret void
}
int test_imm_38int64_lowword_reg(long long val) {
  return ((val) & (0x38 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_38int64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x38,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_38int64_lowword_reg>:
test   $0x38,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_38int64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 56
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_38int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 56
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t is_cycle_counter_overflow(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @is_cycle_counter_overflow() {
ret i32 0
}
/* Variables and functions */
int pow4(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int n;
  printf("请输入一个整数: ");
  scanf("%d", &n);
  printf("%d的四次幂是: %d\n", n, pow4(n));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1030 <pow4@plt>
lea    0xeb5(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E4\B8\80\E4\B8\AA\E6\95\B4\E6\95\B0: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"%d\E7\9A\84\E5\9B\9B\E6\AC\A1\E5\B9\82\E6\98\AF: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @pow4(i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E4\B8\80\E4\B8\AA\E6\95\B4\E6\95\B0: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"%d\E7\9A\84\E5\9B\9B\E6\AC\A1\E5\B9\82\E6\98\AF: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @pow4(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
float fadd(float x, float y) { return x + y; }


x86 assembly (clang, -O0):
<fadd>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fadd>:
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @fadd(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fadd float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @fadd(float %0, float %1) {
%3 = fadd float %0, %1
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ view_type_chat_init();
int /*<<< orphan*/ view_type_contacts_init();
int /*<<< orphan*/ view_type_edit_contact_init();
int /*<<< orphan*/ view_type_log_init();
int /*<<< orphan*/ view_type_menu_init();
void view_types_init() {
  view_type_menu_init();
  view_type_contacts_init();
  view_type_edit_contact_init();
  view_type_chat_init();
  view_type_log_init();
}


x86 assembly (clang, -O0):
<view_types_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <view_type_menu_init@plt>
mov    $0x0,%al
call   1030 <view_type_contacts_init@plt>
mov    $0x0,%al
call   1070 <view_type_edit_contact_init@plt>
mov    $0x0,%al
call   1050 <view_type_chat_init@plt>
mov    $0x0,%al
call   1060 <view_type_log_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<view_types_init>:
push   %rax
xor    %eax,%eax
call   1040 <view_type_menu_init@plt>
xor    %eax,%eax
call   1030 <view_type_contacts_init@plt>
xor    %eax,%eax
call   1070 <view_type_edit_contact_init@plt>
xor    %eax,%eax
call   1050 <view_type_chat_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <view_type_log_init@plt>

LLVM IR (-O0):
define void @view_types_init() {
%1 = call i32 (...) @view_type_menu_init()
%2 = call i32 (...) @view_type_contacts_init()
%3 = call i32 (...) @view_type_edit_contact_init()
%4 = call i32 (...) @view_type_chat_init()
%5 = call i32 (...) @view_type_log_init()
ret void
}

LLVM IR (-O2):
define void @view_types_init() {
%1 = tail call i32 (...) @view_type_menu_init()
%2 = tail call i32 (...) @view_type_contacts_init()
%3 = tail call i32 (...) @view_type_edit_contact_init()
%4 = tail call i32 (...) @view_type_chat_init()
%5 = tail call i32 (...) @view_type_log_init()
ret void
}
void vpostOSDDisableBlinking(void) {
  *((volatile unsigned int *)((0xB0008000 + 0x50))) =
      (*((volatile unsigned int *)((0xB0008000 + 0x50)))) & ~(1 << 9);
}


x86 assembly (clang, -O0):
<vpostOSDDisableBlinking>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb0008050,%eax
mov    (%rax),%ecx
and    $0xfffffdff,%ecx
mov    $0xb0008050,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vpostOSDDisableBlinking>:
mov    $0xb0008050,%eax
andl   $0xfffffdff,(%rax)
ret

LLVM IR (-O0):
define void @vpostOSDDisableBlinking() {
%1 = load volatile i32, i32* inttoptr (i64 2952822864 to i32*)
%2 = and i32 %1, -513
store volatile i32 %2, i32* inttoptr (i64 2952822864 to i32*)
ret void
}

LLVM IR (-O2):
define void @vpostOSDDisableBlinking() {
%1 = load volatile i32, i32* inttoptr (i64 2952822864 to i32*)
%2 = and i32 %1, -513
store volatile i32 %2, i32* inttoptr (i64 2952822864 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ thr1(int /*<<< orphan*/);
int /*<<< orphan*/ thr10(int /*<<< orphan*/);
int /*<<< orphan*/ thr2(int /*<<< orphan*/);
int /*<<< orphan*/ thr3(int /*<<< orphan*/);
int /*<<< orphan*/ thr4(int /*<<< orphan*/);
int /*<<< orphan*/ thr5(int /*<<< orphan*/);
int /*<<< orphan*/ thr6(int /*<<< orphan*/);
int /*<<< orphan*/ thr7(int /*<<< orphan*/);
int /*<<< orphan*/ thr8(int /*<<< orphan*/);
int /*<<< orphan*/ thr9(int /*<<< orphan*/);
int main() {
__CPROVER_ASYNC_0:
  thr1(0);
__CPROVER_ASYNC_1:
  thr2(0);
__CPROVER_ASYNC_2:
  thr3(0);
__CPROVER_ASYNC_3:
  thr4(0);
__CPROVER_ASYNC_4:
  thr5(0);
__CPROVER_ASYNC_5:
  thr6(0);
__CPROVER_ASYNC_6:
  thr7(0);
__CPROVER_ASYNC_7:
  thr8(0);
__CPROVER_ASYNC_8:
  thr9(0);
__CPROVER_ASYNC_9:
  thr10(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
jmp    11a9 <main+0x9>
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1050 <thr2@plt>
xor    %edi,%edi
call   1090 <thr3@plt>
xor    %edi,%edi
call   1040 <thr4@plt>
xor    %edi,%edi
call   1080 <thr5@plt>
xor    %edi,%edi
call   1060 <thr6@plt>
xor    %edi,%edi
call   10a0 <thr7@plt>
xor    %edi,%edi
call   1070 <thr8@plt>
xor    %edi,%edi
call   10b0 <thr9@plt>
xor    %edi,%edi
call   10c0 <thr10@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1050 <thr2@plt>
xor    %edi,%edi
call   1090 <thr3@plt>
xor    %edi,%edi
call   1040 <thr4@plt>
xor    %edi,%edi
call   1080 <thr5@plt>
xor    %edi,%edi
call   1060 <thr6@plt>
xor    %edi,%edi
call   10a0 <thr7@plt>
xor    %edi,%edi
call   1070 <thr8@plt>
xor    %edi,%edi
call   10b0 <thr9@plt>
xor    %edi,%edi
call   10c0 <thr10@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
br label %1
1: ; preds = %0
%2 = call i32 @thr1(i32 0)
br label %3
3: ; preds = %1
%4 = call i32 @thr2(i32 0)
br label %5
5: ; preds = %3
%6 = call i32 @thr3(i32 0)
br label %7
7: ; preds = %5
%8 = call i32 @thr4(i32 0)
br label %9
9: ; preds = %7
%10 = call i32 @thr5(i32 0)
br label %11
11: ; preds = %9
%12 = call i32 @thr6(i32 0)
br label %13
13: ; preds = %11
%14 = call i32 @thr7(i32 0)
br label %15
15: ; preds = %13
%16 = call i32 @thr8(i32 0)
br label %17
17: ; preds = %15
%18 = call i32 @thr9(i32 0)
br label %19
19: ; preds = %17
%20 = call i32 @thr10(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @thr1(i32 0)
%2 = tail call i32 @thr2(i32 0)
%3 = tail call i32 @thr3(i32 0)
%4 = tail call i32 @thr4(i32 0)
%5 = tail call i32 @thr5(i32 0)
%6 = tail call i32 @thr6(i32 0)
%7 = tail call i32 @thr7(i32 0)
%8 = tail call i32 @thr8(i32 0)
%9 = tail call i32 @thr9(i32 0)
%10 = tail call i32 @thr10(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ power(double, int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  printf("%lf\n", power(3.14, 4));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xec2(%rip),%xmm0
mov    $0x4,%edi
call   1030 <power@plt>
mov    %eax,%esi
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
mov    $0x4,%edi
call   1030 <power@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lf\0A\00"
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 @power(double 3.140000e+00, i32 4)
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lf\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @power(double 3.140000e+00, i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void priv_decl_begin(FILE *outfile) { fprintf(outfile, "_PRIV_DECL("); }


x86 assembly (clang, -O0):
<priv_decl_begin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<priv_decl_begin>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"_PRIV_DECL(\00"
define void @priv_decl_begin(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"_PRIV_DECL(\00"
define void @priv_decl_begin(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 11, i64 1, i32* %0)
ret void
}
int toBinary(int dec) {
  int rem, c = 0, d = 1;
  while (dec != 0) {
    rem = dec % 2;
    c = rem * d + c;
    dec = dec / 2;
    d = d * 10;
  }
  return c;
}


x86 assembly (clang, -O0):
<toBinary>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1154 <toBinary+0x54>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
imul   $0xa,-0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1115 <toBinary+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toBinary>:
xor    %eax,%eax
test   %edi,%edi
je     1137 <toBinary+0x37>
mov    $0x1,%ecx
mov    %edi,%edx
nopl   (%rax)
shr    $0x1f,%edx
add    %edi,%edx
mov    %edx,%r8d
and    $0xfffffffe,%r8d
mov    %edi,%esi
sub    %r8d,%esi
imul   %ecx,%esi
add    %esi,%eax
sar    %edx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
add    $0x1,%edi
cmp    $0x2,%edi
mov    %edx,%edi
ja     1110 <toBinary+0x10>
ret

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

LLVM IR (-O2):
define i32 @toBinary(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %14, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %11, %3 ], [ 1, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = phi i32 [ %10, %3 ], [ %0, %1 ]
%7 = srem i32 %6, 2
%8 = mul nsw i32 %4, %7
%9 = add nsw i32 %8, %5
%10 = sdiv i32 %6, 2
%11 = mul nsw i32 %4, 10
%12 = add i32 %6, 1
%13 = icmp ult i32 %12, 3
br i1 %13, label %14, label %3
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %9, %3 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ chk_curs_draw();
void curs_attroff(long at) {
  if (!chk_curs_draw())
    return;
}


x86 assembly (clang, -O0):
<curs_attroff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <chk_curs_draw@plt>
cmp    $0x0,%eax
jne    1131 <curs_attroff+0x21>
jmp    1131 <curs_attroff+0x21>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @curs_attroff(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 (...) @chk_curs_draw()
%4 = icmp ne i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %1
br label %6
6: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @curs_attroff(i64 %0) {
%2 = tail call i32 (...) @chk_curs_draw()
ret void
}
/* Variables and functions */
int NI_USUAL_PFI_SELECT(unsigned int);
unsigned NI_GPCT_PFI_GATE_SELECT(unsigned n) { return NI_USUAL_PFI_SELECT(n); }


x86 assembly (clang, -O0):
<NI_GPCT_PFI_GATE_SELECT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <NI_USUAL_PFI_SELECT@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NI_GPCT_PFI_GATE_SELECT>:
jmp    1030 <NI_USUAL_PFI_SELECT@plt>

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

LLVM IR (-O2):
define i32 @NI_GPCT_PFI_GATE_SELECT(i32 %0) {
%2 = tail call i32 @NI_USUAL_PFI_SELECT(i32 %0)
ret i32 %2
}
int qsort_cmp_ALIST_ID(const void *x, const void *y) {
  if (*((int *)x) < *((int *)y))
    return (-1);
  else
    return (*((int *)x) > *((int *)y));
}


x86 assembly (clang, -O0):
<qsort_cmp_ALIST_ID>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    112a <qsort_cmp_ALIST_ID+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1141 <qsort_cmp_ALIST_ID+0x41>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @qsort_cmp_ALIST_ID(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
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct cl_rhash {
  int dummy;
};

/* Variables and functions */
struct cl_rhash *cl_rhash_create(int /*<<< orphan*/, int);
struct cl_rhash *cl_rhash_create_map(uint16_t key_bytes) {
  return cl_rhash_create(key_bytes, true);
}


x86 assembly (clang, -O0):
<cl_rhash_create_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <cl_rhash_create@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cl_rhash_create_map>:
mov    $0x1,%esi
jmp    1030 <cl_rhash_create@plt>

LLVM IR (-O0):
%struct.cl_rhash = type { i32 }
define %struct.cl_rhash* @cl_rhash_create_map(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call %struct.cl_rhash* @cl_rhash_create(i32 %3, i32 1)
ret %struct.cl_rhash* %4
}

LLVM IR (-O2):
%struct.cl_rhash = type { i32 }
define %struct.cl_rhash* @cl_rhash_create_map(i32 %0) {
%2 = tail call %struct.cl_rhash* @cl_rhash_create(i32 %0, i32 1)
ret %struct.cl_rhash* %2
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SN_close_env(struct SN_env *);
extern void french_ISO_8859_1_close_env(struct SN_env *z) { SN_close_env(z); }


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

x86 assembly (clang, -O2):
<french_ISO_8859_1_close_env>:
jmp    1030 <SN_close_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define void @french_ISO_8859_1_close_env(%struct.SN_env* %0) {
%2 = alloca %struct.SN_env*
store %struct.SN_env* %0, %struct.SN_env** %2
%3 = load %struct.SN_env*, %struct.SN_env** %2
%4 = call i32 @SN_close_env(%struct.SN_env* %3)
ret void
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @french_ISO_8859_1_close_env(%struct.SN_env* %0) {
%2 = tail call i32 @SN_close_env(%struct.SN_env* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(
      stderr, "usage: cmp [-l | -s | -x] [-hz] file1 file2 [skip1 [skip2]]\n");
  exit(2);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [61 x i8] c"usage: cmp [-l | -s | -x] [-hz] file1 file2 [skip1 [skip2]]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [61 x i8] c"usage: cmp [-l | -s | -x] [-hz] file1 file2 [skip1 [skip2]]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}
int readpng(const char *name, int *xres, int *yres, unsigned char **imgdata) {
  return 2;
}


x86 assembly (clang, -O0):
<readpng>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x2,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @readpng(i8* %0, i32* %1, i32* %2, i8** %3) {
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i8**
store i8* %0, i8** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i8** %3, i8*** %8
ret i32 2
}

LLVM IR (-O2):
define i32 @readpng(i8* nocapture readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2, i8** nocapture readnone %3) {
ret i32 2
}
int calc_blsr_u32(int src1, int src2) { return (src1 - 1) & (src2); }


x86 assembly (clang, -O0):
<calc_blsr_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
and    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_blsr_u32>:
lea    -0x1(%rdi),%eax
and    %esi,%eax
ret

LLVM IR (-O0):
define i32 @calc_blsr_u32(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 = sub nsw i32 %5, 1
%7 = load i32, i32* %4
%8 = and i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @calc_blsr_u32(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -1
%4 = and i32 %3, %1
ret i32 %4
}
int CompareFunction(const void *aa, const void *bb) {
  return (*(int *)aa - *(int *)bb);
}


x86 assembly (clang, -O0):
<CompareFunction>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CompareFunction>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @CompareFunction(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @CompareFunction(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 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_mutex_unlock(int /*<<< orphan*/ *);
void unlockmutex(pthread_mutex_t *mutex) {
  if (mutex)
    (void)pthread_mutex_unlock(mutex);
}


x86 assembly (clang, -O0):
<unlockmutex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <unlockmutex+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <pthread_mutex_unlock@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @unlockmutex(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @pthread_mutex_unlock(i32* %0)
br label %5
5: ; preds = %3, %1
ret void
}
void _clr_ident(unsigned char *u) { u[2] &= ~(1 << 1); }


x86 assembly (clang, -O0):
<_clr_ident>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%ecx
and    $0xfffffffd,%ecx
mov    %cl,0x2(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_clr_ident>:
andb   $0xfd,0x2(%rdi)
ret

LLVM IR (-O0):
define void @_clr_ident(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 2
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = and i32 %6, -3
%8 = trunc i32 %7 to i8
store i8 %8, i8* %4
ret void
}

LLVM IR (-O2):
define void @_clr_ident(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 2
%3 = load i8, i8* %2
%4 = and i8 %3, -3
store i8 %4, i8* %2
ret void
}
/* Variables and functions */
char *calloc(int, int);
int rand();
int /*<<< orphan*/ strcpy(char *, char *);
char *fn107() {
  char *result;
  result = calloc(5 + rand() % 5, 4);
  strcpy((char *)result, "fn107");
  return result;
}


x86 assembly (clang, -O0):
<fn107>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x5,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe9b(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn107>:
push   %rbx
xor    %eax,%eax
call   1050 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x5,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
lea    0xe93(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"fn107\00"
define i8* @fn107() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 5
%4 = add nsw i32 5, %3
%5 = call i8* @calloc(i32 %4, i32 4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = load i8*, i8** %1
ret i8* %8
}

LLVM IR (-O2):
@.str = [6 x i8] c"fn107\00"
define i8* @fn107() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 5
%3 = add nsw i32 %2, 5
%4 = tail call i8* @calloc(i32 %3, i32 4)
%5 = tail call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ serial;
};
typedef TYPE_1__ XPointerMovedEvent;

/* Variables and functions */
unsigned long get_XPointerMovedEvent_serial(void *_p) {
  return (unsigned long)((XPointerMovedEvent *)_p)->serial;
}


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

x86 assembly (clang, -O2):
<get_XPointerMovedEvent_serial>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XPointerMovedEvent_serial(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XPointerMovedEvent_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
int test_imm_0Dint16_reg(short val) {
  return ((val) & (-0x0D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Dint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xfffffff3,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_0Dint16_reg>:
test   $0xfff3,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_0Dint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -13
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_0Dint16_reg(i16 signext %0) {
%2 = and i16 %0, -13
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, float *, size_t);
void CopyFloats(float *srcPtr, float *dstPtr, size_t n) {
  memcpy(dstPtr, srcPtr, n << 2);
}


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

x86 assembly (clang, -O2):
<CopyFloats>:
mov    %rdi,%rax
shl    $0x2,%rdx
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @CopyFloats(float* %0, float* %1, i64 %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca i64
store float* %0, float** %4
store float* %1, float** %5
store i64 %2, i64* %6
%7 = load float*, float** %5
%8 = load float*, float** %4
%9 = load i64, i64* %6
%10 = shl i64 %9, 2
%11 = call i32 @memcpy(float* %7, float* %8, i64 %10)
ret void
}

LLVM IR (-O2):
define void @CopyFloats(float* %0, float* %1, i64 %2) {
%4 = shl i64 %2, 2
%5 = tail call i32 @memcpy(float* %1, float* %0, i64 %4)
ret void
}
/* Variables and functions */
int ramusage_free(char *);
int getfreeram(void) {
  extern char *heap;
  return ramusage_free(heap);
}


x86 assembly (clang, -O0):
<getfreeram>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%rdi
call   1030 <ramusage_free@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getfreeram>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%rdi
jmp    1030 <ramusage_free@plt>

LLVM IR (-O0):
@heap = external global i8*
define i32 @getfreeram() {
%1 = load i8*, i8** @heap
%2 = call i32 @ramusage_free(i8* %1)
ret i32 %2
}

LLVM IR (-O2):
@heap = external global i8*
define i32 @getfreeram() {
%1 = load i8*, i8** @heap
%2 = tail call i32 @ramusage_free(i8* %1)
ret i32 %2
}
/* Variables and functions */
void *memcpy(int /*<<< orphan*/, void const *, size_t);
int /*<<< orphan*/ xmalloc(size_t);
void *xmemdup(void const *p, size_t s) { return memcpy(xmalloc(s), p, s); }


x86 assembly (clang, -O0):
<xmemdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <xmalloc@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmemdup>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <xmalloc@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memcpy@plt>

LLVM IR (-O0):
define i8* @xmemdup(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call i32 @xmalloc(i64 %5)
%7 = load i8*, i8** %3
%8 = load i64, i64* %4
%9 = call i8* @memcpy(i32 %6, i8* %7, i64 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @xmemdup(i8* %0, i64 %1) {
%3 = tail call i32 @xmalloc(i64 %1)
%4 = tail call i8* @memcpy(i32 %3, i8* %0, i64 %1)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ free(struct tm *);
struct tm *getLocalTime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
char *getDayName(time_t when) {
  struct tm *mytime;
  char *dayName;
  mytime = getLocalTime(&when);
  dayName = (char *)calloc(9, 1);
  strftime(dayName, 9, "%d%m%Y", mytime);
  free(mytime);
  return dayName;
}


x86 assembly (clang, -O0):
<getDayName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1050 <getLocalTime@plt>
mov    %rax,-0x10(%rbp)
mov    $0x9,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x9,%esi
lea    0xe81(%rip),%rdx
call   1060 <strftime@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getDayName>:
push   %r14
push   %rbx
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1050 <getLocalTime@plt>
mov    %rax,%r14
mov    $0x9,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
lea    0xe92(%rip),%rdx
mov    %rax,%rdi
mov    $0x9,%esi
mov    %r14,%rcx
call   1060 <strftime@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [7 x i8] c"%d%m%Y\00"
define i8* @getDayName(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.tm*
%4 = alloca i8*
store i32 %0, i32* %2
%5 = call %struct.tm* @getLocalTime(i32* %2)
store %struct.tm* %5, %struct.tm** %3
%6 = call i64 @calloc(i32 9, i32 1)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = load %struct.tm*, %struct.tm** %3
%10 = call i32 @strftime(i8* %8, i32 9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), %struct.tm* %9)
%11 = load %struct.tm*, %struct.tm** %3
%12 = call i32 @free(%struct.tm* %11)
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [7 x i8] c"%d%m%Y\00"
define i8* @getDayName(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call %struct.tm* @getLocalTime(i32* %2)
%4 = call i64 @calloc(i32 9, i32 1)
%5 = inttoptr i64 %4 to i8*
%6 = call i32 @strftime(i8* %5, i32 9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), %struct.tm* %3)
%7 = call i32 @free(%struct.tm* %3)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printd(int);
int /*<<< orphan*/ putchar(char);
main() {
  int a = 1234;
  printd(a);
  putchar('\n');
  a = -9582;
  printd(a);
  putchar('\n');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x4d2,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <printd@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movl   $0xffffda92,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <printd@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4d2,%edi
call   1040 <printd@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xffffda92,%edi
call   1040 <printd@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 1234, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @printd(i32 %2)
%4 = call i32 @putchar(i8 signext 10)
store i32 -9582, i32* %1
%5 = load i32, i32* %1
%6 = call i32 @printd(i32 %5)
%7 = call i32 @putchar(i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @printd(i32 1234)
%2 = tail call i32 @putchar(i8 signext 10)
%3 = tail call i32 @printd(i32 -9582)
%4 = tail call i32 @putchar(i8 signext 10)
ret i32 0
}
int strcmp(const char *s1, const char *s2) {
  int diff = 0;
  while (!diff && *s1) {
    diff = (int)*s1 - (int)*s2;
    s1++;
    s2++;
  }
  return diff;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x14(%rbp)
mov    %al,-0x15(%rbp)
jne    1132 <strcmp+0x32>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1142 <strcmp+0x42>
jmp    1172 <strcmp+0x72>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1113 <strcmp+0x13>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi,%rcx,1),%eax
test   %eax,%eax
je     1125 <strcmp+0x25>
movsbl (%rsi,%rcx,1),%edx
add    $0x1,%rcx
sub    %edx,%eax
je     1110 <strcmp+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %5
br label %6
6: ; preds = %16, %2
%7 = load i32, i32* %5
%8 = icmp ne i32 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %6
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 0
br label %14
14: ; preds = %9, %6
%15 = phi i1 [ false, %6 ], [ %13, %9 ]
br i1 %15, label %16, label %28
16: ; preds = %14
%17 = load i8*, i8** %3
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = load i8*, i8** %4
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = sub nsw i32 %19, %22
store i32 %23, i32* %5
%24 = load i8*, i8** %3
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %3
%26 = load i8*, i8** %4
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %4
br label %6
28: ; preds = %14
%29 = load i32, i32* %5
ret i32 %29
}

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %2, %8
%4 = phi i8* [ %1, %2 ], [ %14, %8 ]
%5 = phi i8* [ %0, %2 ], [ %13, %8 ]
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %3
%9 = sext i8 %6 to i32
%10 = load i8, i8* %4
%11 = sext i8 %10 to i32
%12 = sub nsw i32 %9, %11
%13 = getelementptr inbounds i8, i8* %5, i64 1
%14 = getelementptr inbounds i8, i8* %4, i64 1
%15 = icmp eq i32 %12, 0
br i1 %15, label %3, label %16
16: ; preds = %8, %3
%17 = phi i32 [ %12, %8 ], [ 0, %3 ]
ret i32 %17
}
int picosat_haveados(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @picosat_haveados() {
ret i32 1
}

LLVM IR (-O2):
define i32 @picosat_haveados() {
ret i32 1
}
/* Variables and functions */
int printf(char *, char, unsigned char, short, int, long);
int main(void) {
  float f1 = 5312.4f, f2 = -12312.14f;
  double d1 = 431235311.92340;
  char c = f2;
  unsigned char u = f2;
  short s = d1;
  int i = f1;
  long l = d1;
  return printf("c = %d, u = %u, s = %d, i = %d, l = %ld\n", c, u, s, i, l);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x45a60333,-0x8(%rbp)
movl   $0xc640608f,-0xc(%rbp)
movabs $0x41b9b420efec63f1,%rax
b4 b9 41
mov    %rax,-0x18(%rbp)
cvttss2si -0xc(%rbp),%eax
mov    %al,-0x19(%rbp)
cvttss2si -0xc(%rbp),%eax
mov    %al,-0x1a(%rbp)
movsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %ax,-0x1c(%rbp)
cvttss2si -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
cvttsd2si -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x19(%rbp),%dl
mov    -0x1a(%rbp),%cl
mov    -0x1c(%rbp),%ax
mov    -0x20(%rbp),%r8d
mov    -0x28(%rbp),%r9
lea    0xe7d(%rip),%rdi
movsbl %dl,%esi
movzbl %cl,%edx
movswl %ax,%ecx
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
mov    $0x19b420ef,%r9d
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x14c0,%r8d
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"c = %d, u = %u, s = %d, i = %d, l = %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca double
%5 = alloca i8
%6 = alloca i8
%7 = alloca i16
%8 = alloca i32
%9 = alloca i64
store i32 0, i32* %1
store float 0x40B4C06660000000, float* %2
store float 0xC0C80C11E0000000, float* %3
store double 0x41B9B420EFEC63F1, double* %4
%10 = load float, float* %3
%11 = fptosi float %10 to i8
store i8 %11, i8* %5
%12 = load float, float* %3
%13 = fptoui float %12 to i8
store i8 %13, i8* %6
%14 = load double, double* %4
%15 = fptosi double %14 to i16
store i16 %15, i16* %7
%16 = load float, float* %2
%17 = fptosi float %16 to i32
store i32 %17, i32* %8
%18 = load double, double* %4
%19 = fptosi double %18 to i64
store i64 %19, i64* %9
%20 = load i8, i8* %5
%21 = load i8, i8* %6
%22 = load i16, i16* %7
%23 = load i32, i32* %8
%24 = load i64, i64* %9
%25 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8 signext %20, i8 zeroext %21, i16 signext %22, i32 %23, i64 %24)
ret i32 %25
}

LLVM IR (-O2):
@.str = [41 x i8] c"c = %d, u = %u, s = %d, i = %d, l = %ld\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8 signext poison, i8 zeroext poison, i16 signext poison, i32 5312, i64 431235311)
ret i32 %1
}
void X509_REVOKED_get_ext_by_OBJ(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_REVOKED_get_ext_by_OBJ() {
ret void
}
double secs_to_usecs(double secs) { return secs * 1000000; }


x86 assembly (clang, -O0):
<secs_to_usecs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<secs_to_usecs>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @secs_to_usecs(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.000000e+06
ret double %4
}

LLVM IR (-O2):
define double @secs_to_usecs(double %0) {
%2 = fmul double %0, 1.000000e+06
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ glp_assert_(char *, char *, int);
void _glp_xdlclose(void *h) {
  ((void)((h != h) ||
          (glp_assert_(
               "h != h",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/PeterWolf-tw/NeoPraat/refs/"
               "heads/develop/external/glpk/glpenv08.c",
               150),
           1)));
  return;
}


x86 assembly (clang, -O0):
<_glp_xdlclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%al
cmp    -0x8(%rbp),%rcx
mov    %al,-0x9(%rbp)
jne    114c <_glp_xdlclose+0x3c>
lea    0xeca(%rip),%rdi
lea    0xeca(%rip),%rsi
mov    $0x96,%edx
call   1030 <glp_assert_@plt>
mov    $0x1,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_glp_xdlclose>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
mov    $0x96,%edx
jmp    1030 <glp_assert_@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"h != h\00"
@.str.1 = [156 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/PeterWolf-tw/NeoPraat/refs/heads/develop/external/glpk/glpenv08.c\00"
define void @_glp_xdlclose(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %3, %4
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @glp_assert_(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str.1, i64 0, i64 0), i32 150)
br label %8
8: ; preds = %6, %1
%9 = phi i1 [ true, %1 ], [ true, %6 ]
%10 = zext i1 %9 to i32
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"h != h\00"
@.str.1 = [156 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/PeterWolf-tw/NeoPraat/refs/heads/develop/external/glpk/glpenv08.c\00"
define void @_glp_xdlclose(i8* nocapture readnone %0) {
%2 = tail call i32 @glp_assert_(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str.1, i64 0, i64 0), i32 150)
ret void
}
/* Type definitions */
struct tempfile {
  int dummy;
};

/* Variables and functions */
struct tempfile *mks_tempfile_tsm(char const *, int /*<<< orphan*/, int);
struct tempfile *mks_tempfile_t(const char *filename_template) {
  return mks_tempfile_tsm(filename_template, 0, 0600);
}


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

x86 assembly (clang, -O2):
<mks_tempfile_t>:
xor    %esi,%esi
mov    $0x180,%edx
jmp    1030 <mks_tempfile_tsm@plt>

LLVM IR (-O0):
%struct.tempfile = type { i32 }
define %struct.tempfile* @mks_tempfile_t(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call %struct.tempfile* @mks_tempfile_tsm(i8* %3, i32 0, i32 384)
ret %struct.tempfile* %4
}

LLVM IR (-O2):
%struct.tempfile = type { i32 }
define %struct.tempfile* @mks_tempfile_t(i8* %0) {
%2 = tail call %struct.tempfile* @mks_tempfile_tsm(i8* %0, i32 0, i32 384)
ret %struct.tempfile* %2
}
/* Type definitions */
typedef scalar_t__ __m128d;

/* Variables and functions */
__m128d __attribute__((__always___, __nodebug__))
_mm_add_pd(__m128d a, __m128d b) {
  return a + b;
}


x86 assembly (clang, -O0):
<_mm_add_pd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_add_pd>:
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i64 @_mm_add_pd(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @_mm_add_pd(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
ret i64 %3
}