xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void write_32_le(unsigned char bytes[4], uint32_t v) {
  for (int i = 0; i < 4; i++) {
    bytes[i] = v & 0xff;
    v >>= 8;
  }
}


x86 assembly (clang, -O0):
<write_32_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jge    1148 <write_32_le+0x48>
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <write_32_le+0x12>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @write_32_le(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %1, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
%10 = lshr i32 %1, 24
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ notImplementedEpson();
void PrtFrameE() { notImplementedEpson(); }


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

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

LLVM IR (-O0):
define void @PrtFrameE() {
%1 = call i32 (...) @notImplementedEpson()
ret void
}

LLVM IR (-O2):
define void @PrtFrameE() {
%1 = tail call i32 (...) @notImplementedEpson()
ret void
}
int __f() { return 3; }


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

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

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

LLVM IR (-O2):
define i32 @__f() {
ret i32 3
}
long double __attribute__((no)) fcmovb(long flags) {
  long double out;
  asm("\n"
      "	push	%1"
      "\n"
      "	popf"
      "\n"
      "	fldpi"
      "\n"
      "	fld1"
      "\n"
      "	"
      "fcmovb"
      " %%st(1), %%st"
      "\n"
      "	ffree	%%st(1)"
      "\n"
      : "=t"(out)
      : "r"(flags));
  return out;
}


x86 assembly (clang, -O0):
<fcmovb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
push   %rax
popf
fldpi
fld1
fcmovb %st(1),%st
ffree  %st(1)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcmovb>:
push   %rdi
popf
fldpi
fld1
fcmovb %st(1),%st
ffree  %st(1)
ret

LLVM IR (-O0):
define x86_fp80 @fcmovb(i64 %0) {
%2 = alloca i64
%3 = alloca x86_fp80
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call x86_fp80 asm "\0A\09push\09$1\0A\09popf\0A\09fldpi\0A\09fld1\0A\09fcmovb %st(1), %st\0A\09ffree\09%st(1)\0A", "={st},r,~{dirflag},~{fpsr},~{flags}"(i64 %4)
store x86_fp80 %5, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @fcmovb(i64 %0) {
%2 = tail call x86_fp80 asm "\0A\09push\09$1\0A\09popf\0A\09fldpi\0A\09fld1\0A\09fcmovb %st(1), %st\0A\09ffree\09%st(1)\0A", "={st},r,~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret x86_fp80 %2
}
int test_imm_27int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x27 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_27int64_highword_mem>:
testb  $0x27,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_27int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 167503724544
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ COND_MI();
int /*<<< orphan*/ EA_AY_DI_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_smi_8_di(void) {
  m68ki_write_8(EA_AY_DI_8(), COND_MI() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_smi_8_di>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_AY_DI_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_MI@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_smi_8_di>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_AY_DI_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_MI@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_smi_8_di() {
%1 = call i32 (...) @EA_AY_DI_8()
%2 = call i64 (...) @COND_MI()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_smi_8_di() {
%1 = tail call i32 (...) @EA_AY_DI_8()
%2 = tail call i64 (...) @COND_MI()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pem_password_cb;
typedef int /*<<< orphan*/ d2i_of_void;
typedef int /*<<< orphan*/ FILE;
typedef int /*<<< orphan*/ EC_KEY;

/* Variables and functions */
int /*<<< orphan*/ *PEM_ASN1_read(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                  int /*<<< orphan*/ *, void **,
                                  int /*<<< orphan*/ *, void *);
int /*<<< orphan*/ PEM_STRING_PUBLIC;
scalar_t__ d2i_EC_PUBKEY;
EC_KEY *PEM_read_EC_PUBKEY(FILE *fp, EC_KEY **x, pem_password_cb *cb, void *u) {
  return PEM_ASN1_read((d2i_of_void *)d2i_EC_PUBKEY, PEM_STRING_PUBLIC, fp,
                       (void **)x, cb, u);
}


x86 assembly (clang, -O0):
<PEM_read_EC_PUBKEY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%rdi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1030 <PEM_ASN1_read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_read_EC_PUBKEY>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ebd(%rip),%rax
mov    (%rax),%rdi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
jmp    1030 <PEM_ASN1_read@plt>

LLVM IR (-O0):
@d2i_EC_PUBKEY = global i64 0
@PEM_STRING_PUBLIC = global i32 0
define i32* @PEM_read_EC_PUBKEY(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32**
%7 = alloca i32*
%8 = alloca i8*
store i32* %0, i32** %5
store i32** %1, i32*** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%9 = load i64, i64* @d2i_EC_PUBKEY
%10 = inttoptr i64 %9 to i32*
%11 = load i32, i32* @PEM_STRING_PUBLIC
%12 = load i32*, i32** %5
%13 = load i32**, i32*** %6
%14 = bitcast i32** %13 to i8**
%15 = load i32*, i32** %7
%16 = load i8*, i8** %8
%17 = call i32* @PEM_ASN1_read(i32* %10, i32 %11, i32* %12, i8** %14, i32* %15, i8* %16)
ret i32* %17
}

LLVM IR (-O2):
@d2i_EC_PUBKEY = global i64 0
@PEM_STRING_PUBLIC = global i32 0
define i32* @PEM_read_EC_PUBKEY(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = load i64, i64* @d2i_EC_PUBKEY
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_PUBLIC
%8 = bitcast i32** %1 to i8**
%9 = tail call i32* @PEM_ASN1_read(i32* %6, i32 %7, i32* %0, i8** %8, i32* %2, i8* %3)
ret i32* %9
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void move_up(void) {
  putchar(0x1b);
  putchar(0x5b);
  putchar(0x41);
}


x86 assembly (clang, -O0):
<move_up>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1b,%edi
call   1030 <putchar@plt>
mov    $0x5b,%edi
call   1030 <putchar@plt>
mov    $0x41,%edi
call   1030 <putchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<move_up>:
push   %rax
mov    $0x1b,%edi
call   1030 <putchar@plt>
mov    $0x5b,%edi
call   1030 <putchar@plt>
mov    $0x41,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @move_up() {
%1 = call i32 @putchar(i32 27)
%2 = call i32 @putchar(i32 91)
%3 = call i32 @putchar(i32 65)
ret void
}

LLVM IR (-O2):
define void @move_up() {
%1 = tail call i32 @putchar(i32 27)
%2 = tail call i32 @putchar(i32 91)
%3 = tail call i32 @putchar(i32 65)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M364_f(char *s) {
  debug("M364_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M364_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M364_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M364_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M364_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M364_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M364_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
void gp2x_setclock(unsigned int mhz) {
  if (mhz < 50)
    mhz = 50;
  else if (mhz > 250)
    mhz = 250;
}


x86 assembly (clang, -O0):
<gp2x_setclock>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x32,-0x4(%rbp)
jae    111d <gp2x_setclock+0x1d>
movl   $0x32,-0x4(%rbp)
jmp    1136 <gp2x_setclock+0x36>
cmpl   $0xfa,-0x4(%rbp)
jbe    1131 <gp2x_setclock+0x31>
movl   $0xfa,-0x4(%rbp)
jmp    1136 <gp2x_setclock+0x36>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @gp2x_setclock(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 50
br i1 %4, label %5, label %6
5: ; preds = %1
store i32 50, i32* %2
br label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp ugt i32 %7, 250
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 250, i32* %2
br label %10
10: ; preds = %9, %6
br label %11
11: ; preds = %10, %5
ret void
}

LLVM IR (-O2):
define void @gp2x_setclock(i32 %0) {
ret void
}
void ReverseGPIOP$0$In$makeOutput(void) { HplMcs51GeneralIOC$P20$makeOutput(); }


x86 assembly (clang, -O0):
<ReverseGPIOP$0$In$makeOutput>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <HplMcs51GeneralIOC$P20$makeOutput@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReverseGPIOP$0$In$makeOutput>:
xor    %eax,%eax
jmp    1030 <HplMcs51GeneralIOC$P20$makeOutput@plt>

LLVM IR (-O0):
define void @"ReverseGPIOP$0$In$makeOutput"() {
%1 = call i32 (...) @"HplMcs51GeneralIOC$P20$makeOutput"()
ret void
}

LLVM IR (-O2):
define void @"ReverseGPIOP$0$In$makeOutput"() {
%1 = tail call i32 (...) @"HplMcs51GeneralIOC$P20$makeOutput"()
ret void
}
int comp_int_greater_f(const void *a_, const void *b_) {
  int a = *(int *)a_;
  int b = *(int *)b_;
  return a > b ? -1 : (a == b ? 0 : 1);
}


x86 assembly (clang, -O0):
<comp_int_greater_f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    1137 <comp_int_greater_f+0x37>
mov    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    114c <comp_int_greater_f+0x4c>
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%esi
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @comp_int_greater_f(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 sgt i32 %4, %6
%8 = icmp ne i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
int max_prev_loc(int level) {
  if (level == 1) {
    return 1;
  } else {
    return (4 * (level - 1));
  }
}


x86 assembly (clang, -O0):
<max_prev_loc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    111d <max_prev_loc+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1129 <max_prev_loc+0x29>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
shl    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_prev_loc>:
cmp    $0x1,%edi
lea    -0x4(,%rdi,4),%eax
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @max_prev_loc(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = mul nsw i32 4, %9
store i32 %10, i32* %2
br label %11
11: ; preds = %7, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @max_prev_loc(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = shl i32 %0, 2
%4 = add i32 %3, -4
%5 = select i1 %2, i32 1, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void clearscreen() { printf("\033[2J\033[1;1H"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"\1B[2J\1B[1;1H\00"
define void @clearscreen() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[2J\1B[1;1H\00"
define void @clearscreen() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
int observe(int *action, int block) { return 0; }


x86 assembly (clang, -O0):
<observe>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @observe(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 @observe(i32* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ __glFogfv_size(int /*<<< orphan*/);
__attribute__((visibility("internal"))) __attribute__((pure)) GLint
__glFogiv_size(GLenum e) {
  return __glFogfv_size(e);
}


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

x86 assembly (clang, -O2):
<__glFogiv_size>:
jmp    1030 <__glFogfv_size@plt>

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

LLVM IR (-O2):
define hidden i32 @__glFogiv_size(i32 %0) {
%2 = tail call i32 @__glFogfv_size(i32 %0)
ret i32 %2
}
/* Variables and functions */
int maxXor(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int res;
  int _l;
  scanf("%d", &_l);
  int _r;
  scanf("%d", &_r);
  res = maxXor(_l, _r);
  printf("%d\n", res);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = bitcast i32* %2 to i8*
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @maxXor(i32 %7, i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
double test_cbrt(double x) { return __builtin_cbrt(x); }


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

x86 assembly (clang, -O2):
<test_cbrt>:
jmp    1030 <cbrt@plt>

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

LLVM IR (-O2):
define double @test_cbrt(double %0) {
%2 = tail call double @cbrt(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int removeDuplicates(int *, int);
int main(void) {
  int x[] = {1, 1, 1, 2, 2, 3};
  printf("%d\n", removeDuplicates(x, 6));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x6,%esi
call   1040 <removeDuplicates@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xee5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x6,%esi
call   1040 <removeDuplicates@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [6 x i32] [i32 1, i32 1, i32 1, i32 2, i32 2, i32 3]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i32]
store i32 0, i32* %1
%3 = bitcast [6 x i32]* %2 to i8*
%4 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%5 = call i32 @removeDuplicates(i32* %4, i32 6)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [6 x i32] [i32 1, i32 1, i32 1, i32 2, i32 2, i32 3]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @removeDuplicates(i32* %3, i32 6)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
void x86_64_cpuid2_primop() {
  asm("movq %%rbx, %%rax\n\t"
      "movq %%r14, %%rcx\n\t"
      "cpuid\n\t"
      "movq %%rbx, %%r14\n\t"
      "movq %%rax, %%rbx\n\t"
      "movq %%rdx, %%rdi\n\t"
      "movq %%rcx, %%rsi\n\t"
      "jmp * (%%rbp)\n\t" ::
          :);
}


x86 assembly (clang, -O0):
<x86_64_cpuid2_primop>:
push   %rbp
mov    %rsp,%rbp
mov    %rbx,%rax
mov    %r14,%rcx
cpuid
mov    %rbx,%r14
mov    %rax,%rbx
mov    %rdx,%rdi
mov    %rcx,%rsi
jmp    *0x0(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<x86_64_cpuid2_primop>:
mov    %rbx,%rax
mov    %r14,%rcx
cpuid
mov    %rbx,%r14
mov    %rax,%rbx
mov    %rdx,%rdi
mov    %rcx,%rsi
jmp    *0x0(%rbp)
ret

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

LLVM IR (-O2):
define void @x86_64_cpuid2_primop() {
tail call void asm sideeffect "movq %rbx, %rax\0A\09movq %r14, %rcx\0A\09cpuid\0A\09movq %rbx, %r14\0A\09movq %rax, %rbx\0A\09movq %rdx, %rdi\0A\09movq %rcx, %rsi\0A\09jmp * (%rbp)\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void INT_Excep_MMCIF_MBFAI(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MMCIF_MBFAI() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
int /*<<< orphan*/ printf(char *, char const *);
void Usage(const char *proc) {
  assert(proc);
  printf("Usage:%s [ip] [prot]\n", proc);
}


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

x86 assembly (clang, -O2):
<Usage>:
push   %rbx
mov    %rdi,%rbx
call   1040 <assert@plt>
lea    0xed0(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [22 x i8] c"Usage:%s [ip] [prot]\0A\00"
define void @Usage(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put_msg(char *);
int /*<<< orphan*/ save_screenshot_file(char *);
char *spif_get_filename();
void save_screenshot(void) {
  char *name;
  put_msg("Enter name of screenshot file to save:");
  name = spif_get_filename();
  if (name == NULL)
    return;
  save_screenshot_file(name);
}


x86 assembly (clang, -O0):
<save_screenshot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1050 <put_msg@plt>
mov    $0x0,%al
call   1040 <spif_get_filename@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115f <save_screenshot+0x2f>
jmp    1168 <save_screenshot+0x38>
mov    -0x8(%rbp),%rdi
call   1030 <save_screenshot_file@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<save_screenshot>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <put_msg@plt>
xor    %eax,%eax
call   1040 <spif_get_filename@plt>
test   %rax,%rax
je     1152 <save_screenshot+0x22>
mov    %rax,%rdi
pop    %rax
jmp    1030 <save_screenshot_file@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Enter name of screenshot file to save:\00"
define void @save_screenshot() {
%1 = alloca i8*
%2 = call i32 @put_msg(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = call i8* (...) @spif_get_filename()
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %0
br label %10
7: ; preds = %0
%8 = load i8*, i8** %1
%9 = call i32 @save_screenshot_file(i8* %8)
br label %10
10: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Enter name of screenshot file to save:\00"
define void @save_screenshot() {
%1 = tail call i32 @put_msg(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* (...) @spif_get_filename()
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @save_screenshot_file(i8* %2)
br label %6
6: ; preds = %0, %4
ret void
}
double compass_difftime(double t1, double t0) { return (t1 - t0) / 1000.0; }


x86 assembly (clang, -O0):
<compass_difftime>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<compass_difftime>:
subsd  %xmm1,%xmm0
divsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @compass_difftime(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
%8 = fdiv double %7, 1.000000e+03
ret double %8
}

LLVM IR (-O2):
define double @compass_difftime(double %0, double %1) {
%3 = fsub double %0, %1
%4 = fdiv double %3, 1.000000e+03
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ heart_out_to_body_systolic_pace();
void pacer_to_heart_systolic_pace() { heart_out_to_body_systolic_pace(); }


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

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

LLVM IR (-O0):
define void @pacer_to_heart_systolic_pace() {
%1 = call i32 (...) @heart_out_to_body_systolic_pace()
ret void
}

LLVM IR (-O2):
define void @pacer_to_heart_systolic_pace() {
%1 = tail call i32 (...) @heart_out_to_body_systolic_pace()
ret void
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int random_time() {
  srand(time(NULL));
  int t = (rand() % (500001 - 100000)) + 100000;
  return t;
}


x86 assembly (clang, -O0):
<random_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x61a81,%ecx
cltd
idiv   %ecx
add    $0x186a0,%edx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_time>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
cltq
imul   $0xffffffffa7c590cb,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x12,%ecx
add    %edx,%ecx
imul   $0x61a81,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0x186a0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @random_time() {
%1 = alloca i32
%2 = call i32 @time(i32* null)
%3 = call i32 @srand(i32 %2)
%4 = call i32 (...) @rand()
%5 = srem i32 %4, 400001
%6 = add nsw i32 %5, 100000
store i32 %6, i32* %1
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @random_time() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 400001
%5 = add nsw i32 %4, 100000
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ SIGPIPE;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void badsig() {
  signal(SIGPIPE, SIG_IGN);
  exit(0);
}


x86 assembly (clang, -O0):
<badsig>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<badsig>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@SIGPIPE = global i32 0
@SIG_IGN = global i32 0
define void @badsig() {
%1 = load i32, i32* @SIGPIPE
%2 = load i32, i32* @SIG_IGN
%3 = call i32 @signal(i32 %1, i32 %2)
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@SIGPIPE = global i32 0
@SIG_IGN = global i32 0
define void @badsig() {
%1 = load i32, i32* @SIGPIPE
%2 = load i32, i32* @SIG_IGN
%3 = tail call i32 @signal(i32 %1, i32 %2)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int forty_two();
int main(void) {
  int i = 0;
  i = forty_two();
  return i;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <forty_two@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @forty_two()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void *realloc(void *, size_t);
void *my_realloc(void *old, size_t size) {
  void *ptr = realloc(old, size);
  if (!ptr) {
    perror("Out of memory!");
    exit(1);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<my_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1172 <my_realloc+0x42>
lea    0xe9d(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_realloc>:
push   %rax
call   1030 <realloc@plt>
test   %rax,%rax
je     113d <my_realloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Out of memory!\00"
define i8* @my_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [15 x i8] c"Out of memory!\00"
define noalias i8* @my_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
void *cnfCptr(unsigned int);
void *cnf_pval_(unsigned int *const FPTR) { return cnfCptr(*FPTR); }


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

x86 assembly (clang, -O2):
<cnf_pval_>:
mov    (%rdi),%edi
jmp    1030 <cnfCptr@plt>

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

LLVM IR (-O2):
define i8* @cnf_pval_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i8* @cnfCptr(i32 %2)
ret i8* %3
}
/* Type definitions */
struct ahocorasick {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ aho_clear_match_text(struct ahocorasick *);
int /*<<< orphan*/ aho_clear_trie(struct ahocorasick *);
void aho_destroy(struct ahocorasick *restrict aho) {
  aho_clear_match_text(aho);
  aho_clear_trie(aho);
}


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

x86 assembly (clang, -O2):
<aho_destroy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <aho_clear_match_text@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <aho_clear_trie@plt>

LLVM IR (-O0):
%struct.ahocorasick = type { i32 }
define void @aho_destroy(%struct.ahocorasick* noalias %0) {
%2 = alloca %struct.ahocorasick*
store %struct.ahocorasick* %0, %struct.ahocorasick** %2
%3 = load %struct.ahocorasick*, %struct.ahocorasick** %2
%4 = call i32 @aho_clear_match_text(%struct.ahocorasick* %3)
%5 = load %struct.ahocorasick*, %struct.ahocorasick** %2
%6 = call i32 @aho_clear_trie(%struct.ahocorasick* %5)
ret void
}

LLVM IR (-O2):
%struct.ahocorasick = type { i32 }
define void @aho_destroy(%struct.ahocorasick* noalias %0) {
%2 = tail call i32 @aho_clear_match_text(%struct.ahocorasick* %0)
%3 = tail call i32 @aho_clear_trie(%struct.ahocorasick* %0)
ret void
}
/* Type definitions */
struct str_string {
  int dummy;
};

/* Variables and functions */
int str_string_set2(struct str_string *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int str_string_set(struct str_string *str, const char *cstr) {
  return str_string_set2(str, cstr, strlen(cstr));
}


x86 assembly (clang, -O0):
<str_string_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <str_string_set2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_string_set>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <str_string_set2@plt>

LLVM IR (-O0):
%struct.str_string = type { i32 }
define i32 @str_string_set(%struct.str_string* %0, i8* %1) {
%3 = alloca %struct.str_string*
%4 = alloca i8*
store %struct.str_string* %0, %struct.str_string** %3
store i8* %1, i8** %4
%5 = load %struct.str_string*, %struct.str_string** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @str_string_set2(%struct.str_string* %5, i8* %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.str_string = type { i32 }
define i32 @str_string_set(%struct.str_string* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @str_string_set2(%struct.str_string* %0, i8* %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "Usage: "
          "fdmf_correlator"
          " [options] < dump\n\n"
          "Options:\n"
          "  -K, --keep    <N> Number of matches to keep (default 1000)\n"
          "  -v, --verbose     Verbose output\n"
          "  -h, --help        See this text\n");
  exit(1);
}


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    $0x1,%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    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [181 x i8] c"Usage: fdmf_correlator [options] < dump\0A\0AOptions:\0A -K, --keep <N> Number of matches to keep (default 1000)\0A -v, --verbose Verbose output\0A -h, --help See this text\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [181 x i8] c"Usage: fdmf_correlator [options] < dump\0A\0AOptions:\0A -K, --keep <N> Number of matches to keep (default 1000)\0A -v, --verbose Verbose output\0A -h, --help See this text\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
int /*<<< orphan*/ gluOrtho2D(double, double, double, double);
void skaliraj(int w, int h) {
  double xmin = -10.0, xmax = 10.0;
  double xrange, yrange;
  glViewport(0, 0, w, h);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluOrtho2D(-10.0, 10.0, -10.0, 10.0);
}


x86 assembly (clang, -O0):
<skaliraj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  0xeaa(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xea5(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %esi,%esi
mov    %esi,%edi
call   1060 <glViewport@plt>
mov    0x2e62(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1040 <glLoadIdentity@plt>
movsd  0xe6c(%rip),%xmm2
movsd  0xe6c(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm3,%xmm1
call   1050 <gluOrtho2D@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skaliraj>:
push   %rax
mov    %esi,%ecx
mov    %edi,%edx
xor    %edi,%edi
xor    %esi,%esi
call   1060 <glViewport@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1040 <glLoadIdentity@plt>
movsd  0xe95(%rip),%xmm0
movsd  0xe95(%rip),%xmm1
movaps %xmm0,%xmm2
movaps %xmm1,%xmm3
pop    %rax
jmp    1050 <gluOrtho2D@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
define void @skaliraj(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
store double -1.000000e+01, double* %5
store double 1.000000e+01, double* %6
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @glViewport(i32 0, i32 0, i32 %9, i32 %10)
%12 = load i32, i32* @GL_PROJECTION
%13 = call i32 @glMatrixMode(i32 %12)
%14 = call i32 (...) @glLoadIdentity()
%15 = call i32 @gluOrtho2D(double -1.000000e+01, double 1.000000e+01, double -1.000000e+01, double 1.000000e+01)
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
define void @skaliraj(i32 %0, i32 %1) {
%3 = tail call i32 @glViewport(i32 0, i32 0, i32 %0, i32 %1)
%4 = load i32, i32* @GL_PROJECTION
%5 = tail call i32 @glMatrixMode(i32 %4)
%6 = tail call i32 (...) @glLoadIdentity()
%7 = tail call i32 @gluOrtho2D(double -1.000000e+01, double 1.000000e+01, double -1.000000e+01, double 1.000000e+01)
ret void
}
double getBW_overlap(double eff) {
  if (eff == 0)
    return 0;
  double intercept = 139.053;
  double W = 55.536;
  return intercept + W * eff;
}


x86 assembly (clang, -O0):
<getBW_overlap>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    112e <getBW_overlap+0x2e>
jp     112e <getBW_overlap+0x2e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1164 <getBW_overlap+0x64>
movsd  0xed2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBW_overlap>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef4(%rip),%xmm1
xorpd  %xmm2,%xmm2
cmpeqsd %xmm2,%xmm0
andnpd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @getBW_overlap(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
%6 = load double, double* %3
%7 = fcmp oeq double %6, 0.000000e+00
br i1 %7, label %8, label %9
8: ; preds = %1
store double 0.000000e+00, double* %2
br label %14
9: ; preds = %1
store double 1.390530e+02, double* %4
store double 5.553600e+01, double* %5
%10 = load double, double* %4
%11 = load double, double* %5
%12 = load double, double* %3
%13 = call double @llvm.fmuladd.f64(double %11, double %12, double %10)
store double %13, double* %2
br label %14
14: ; preds = %9, %8
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @getBW_overlap(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
%3 = tail call double @llvm.fmuladd.f64(double %0, double 5.553600e+01, double 1.390530e+02)
%4 = select i1 %2, double 0.000000e+00, double %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void look_for_overrides_here() { abort(); }


x86 assembly (clang, -O0):
<look_for_overrides_here>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<look_for_overrides_here>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @look_for_overrides_here() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @look_for_overrides_here() {
%1 = tail call i32 (...) @abort()
unreachable
}
__attribute__((weak)) int suiteTearDown(int num_failures) {
  return num_failures;
}


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

x86 assembly (clang, -O2):
<suiteTearDown>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define weak i32 @suiteTearDown(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
ret i32 %3
}

LLVM IR (-O2):
define weak i32 @suiteTearDown(i32 %0) {
ret i32 %0
}
void u_tsd_set(struct u_tsd *tsd, void *ptr) {
  (void)tsd;
  (void)ptr;
}


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

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

LLVM IR (-O0):
%struct.u_tsd = type opaque
define void @u_tsd_set(%struct.u_tsd* %0, i8* %1) {
%3 = alloca %struct.u_tsd*
%4 = alloca i8*
store %struct.u_tsd* %0, %struct.u_tsd** %3
store i8* %1, i8** %4
%5 = load %struct.u_tsd*, %struct.u_tsd** %3
%6 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
%struct.u_tsd = type opaque
define void @u_tsd_set(%struct.u_tsd* nocapture %0, i8* nocapture %1) {
ret void
}