xunge/DecIR huggingface dataset:
/* Variables and functions */
double sin(double);
double sinc(double t) {
  t *= 3.1415926;
  if (t != 0.0)
    return (sin(t) / t);
  return 1.0;
}


x86 assembly (clang, -O0):
<sinc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    114c <sinc+0x3c>
jp     114c <sinc+0x3c>
jmp    1165 <sinc+0x55>
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1172 <sinc+0x62>
movsd  0xe9b(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinc>:
push   %rax
mulsd  0xee7(%rip),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1125 <sinc+0x15>
jnp    1136 <sinc+0x26>
movsd  %xmm0,(%rsp)
call   1030 <sin@plt>
divsd  (%rsp),%xmm0
pop    %rax
ret
movsd  0xeca(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sinc(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fmul double %4, 0x400921FB4D12D84A
store double %5, double* %3
%6 = load double, double* %3
%7 = fcmp une double %6, 0.000000e+00
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load double, double* %3
%10 = call double @sin(double %9)
%11 = load double, double* %3
%12 = fdiv double %10, %11
store double %12, double* %2
br label %14
13: ; preds = %1
store double 1.000000e+00, double* %2
br label %14
14: ; preds = %13, %8
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @sinc(double %0) {
%2 = fmul double %0, 0x400921FB4D12D84A
%3 = fcmp une double %2, 0.000000e+00
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call double @sin(double %2)
%6 = fdiv double %5, %2
br label %7
7: ; preds = %1, %4
%8 = phi double [ %6, %4 ], [ 1.000000e+00, %1 ]
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void recurse(void) {
  static int i;
  if (++i == 3)
    abort();
  else
    recurse();
}


x86 assembly (clang, -O0):
<recurse>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f0a(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f01(%rip)
cmp    $0x3,%eax
jne    1143 <recurse+0x23>
mov    $0x0,%al
call   1040 <abort@plt>
call   1030 <recurse@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@recurse.i = internal global i32 0
define void @recurse() {
%1 = load i32, i32* @recurse.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @recurse.i
%3 = icmp eq i32 %2, 3
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
br label %7
7: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @recurse() {
%1 = tail call i32 (...) @abort()
unreachable
}
int test_imm_D2uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xD2 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_D2uint64_highword_reg>:
movabs $0xd200000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_D2uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 210
%6 = icmp ne i64 %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_D2uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 901943132160
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ one();
int /*<<< orphan*/ two();
int main(int argc, char *argv[]) {
  one();
  two();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <one@plt>
mov    $0x0,%al
call   1030 <two@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <one@plt>
xor    %eax,%eax
call   1030 <two@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @one()
%6 = call i32 (...) @two()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @one()
%4 = tail call i32 (...) @two()
ret i32 0
}
void EC_POINT_dup(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_POINT_dup() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ mem_copy_vect2dword_little(int /*<<< orphan*/ *,
                                              unsigned char const *);
uint32_t arch_mem_copy_vect2dword_little(uint32_t *dword,
                                         const unsigned char *v) {
  return mem_copy_vect2dword_little(dword, v);
}


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

x86 assembly (clang, -O2):
<arch_mem_copy_vect2dword_little>:
jmp    1030 <mem_copy_vect2dword_little@plt>

LLVM IR (-O0):
define i32 @arch_mem_copy_vect2dword_little(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 @mem_copy_vect2dword_little(i32* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @arch_mem_copy_vect2dword_little(i32* %0, i8* %1) {
%3 = tail call i32 @mem_copy_vect2dword_little(i32* %0, i8* %1)
ret i32 %3
}
void gtk_color_button_set_color() {}


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

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

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

LLVM IR (-O2):
define void @gtk_color_button_set_color() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hello(char *);
int main() { hello("world"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"world\00"
define i32 @main() {
%1 = call i32 @hello(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"world\00"
define i32 @main() {
%1 = tail call i32 @hello(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int suma(int a, int b) { return a + b; }


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

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

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

LLVM IR (-O2):
define i32 @suma(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint8_t inv_fifo_protocol_helper_decode_ping(const void *in, uint16_t len) {
  const uint8_t tmp = *((const uint8_t *)in);
  (void)len;
  return tmp;
}


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

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

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

LLVM IR (-O2):
define i32 @inv_fifo_protocol_helper_decode_ping(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ noll_field_init();
int /*<<< orphan*/ noll_pred_init();
int /*<<< orphan*/ noll_record_init();
void noll_init() {
  noll_record_init();
  noll_field_init();
  noll_pred_init();
}


x86 assembly (clang, -O0):
<noll_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <noll_record_init@plt>
mov    $0x0,%al
call   1030 <noll_field_init@plt>
mov    $0x0,%al
call   1050 <noll_pred_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<noll_init>:
push   %rax
xor    %eax,%eax
call   1040 <noll_record_init@plt>
xor    %eax,%eax
call   1030 <noll_field_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <noll_pred_init@plt>

LLVM IR (-O0):
define void @noll_init() {
%1 = call i32 (...) @noll_record_init()
%2 = call i32 (...) @noll_field_init()
%3 = call i32 (...) @noll_pred_init()
ret void
}

LLVM IR (-O2):
define void @noll_init() {
%1 = tail call i32 (...) @noll_record_init()
%2 = tail call i32 (...) @noll_field_init()
%3 = tail call i32 (...) @noll_pred_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIM_HIF_SetReg16(int, unsigned short);
void VIM_IPP_SetDispalyWindowSize(unsigned short wWidth,
                                  unsigned short wHeight) {
  VIM_HIF_SetReg16((0x1c00 + 0x00E), wWidth);
  VIM_HIF_SetReg16((0x1c00 + 0x010), wHeight);
}


x86 assembly (clang, -O0):
<VIM_IPP_SetDispalyWindowSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    $0x1c0e,%edi
movzwl -0x2(%rbp),%esi
call   1030 <VIM_HIF_SetReg16@plt>
mov    $0x1c10,%edi
movzwl -0x4(%rbp),%esi
call   1030 <VIM_HIF_SetReg16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_IPP_SetDispalyWindowSize>:
push   %rbx
mov    %esi,%ebx
mov    %edi,%esi
mov    $0x1c0e,%edi
call   1030 <VIM_HIF_SetReg16@plt>
mov    $0x1c10,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <VIM_HIF_SetReg16@plt>

LLVM IR (-O0):
define void @VIM_IPP_SetDispalyWindowSize(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = call i32 @VIM_HIF_SetReg16(i32 7182, i16 zeroext %5)
%7 = load i16, i16* %4
%8 = call i32 @VIM_HIF_SetReg16(i32 7184, i16 zeroext %7)
ret void
}

LLVM IR (-O2):
define void @VIM_IPP_SetDispalyWindowSize(i16 zeroext %0, i16 zeroext %1) {
%3 = tail call i32 @VIM_HIF_SetReg16(i32 7182, i16 zeroext %0)
%4 = tail call i32 @VIM_HIF_SetReg16(i32 7184, i16 zeroext %1)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
size_t check_FAT32(uint64_t num_cluster) {
  if (num_cluster > 4177920)
    return 0;
  if (num_cluster < 65527)
    return 65527;
  else
    return num_cluster;
}


x86 assembly (clang, -O0):
<check_FAT32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x3fc000,-0xc(%rbp)
jle    1121 <check_FAT32+0x21>
movq   $0x0,-0x8(%rbp)
jmp    1143 <check_FAT32+0x43>
cmpl   $0xfff7,-0xc(%rbp)
jge    113b <check_FAT32+0x3b>
movq   $0xfff7,-0x8(%rbp)
jmp    1143 <check_FAT32+0x43>
movslq -0xc(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_FAT32>:
cmp    $0xfff8,%edi
mov    $0xfff7,%ecx
cmovge %edi,%ecx
xor    %eax,%eax
cmp    $0x3fc001,%edi
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i64 @check_FAT32(i32 %0) {
%2 = alloca i64
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 4177920
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 0, i64* %2
br label %14
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 65527
br i1 %9, label %10, label %11
10: ; preds = %7
store i64 65527, i64* %2
br label %14
11: ; preds = %7
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
store i64 %13, i64* %2
br label %14
14: ; preds = %11, %10, %6
%15 = load i64, i64* %2
ret i64 %15
}

LLVM IR (-O2):
define i64 @check_FAT32(i32 %0) {
%2 = icmp sgt i32 %0, 4177920
%3 = icmp sgt i32 %0, 65527
%4 = select i1 %3, i32 %0, i32 65527
%5 = select i1 %2, i32 0, i32 %4
%6 = zext i32 %5 to i64
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ arm_memio_str(int /*<<< orphan*/);
int /*<<< orphan*/ t16_memio_imm8sp_op();
void t16_str_sp8() { arm_memio_str(t16_memio_imm8sp_op()); }


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

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

LLVM IR (-O0):
define void @t16_str_sp8() {
%1 = call i32 (...) @t16_memio_imm8sp_op()
%2 = call i32 @arm_memio_str(i32 %1)
ret void
}

LLVM IR (-O2):
define void @t16_str_sp8() {
%1 = tail call i32 (...) @t16_memio_imm8sp_op()
%2 = tail call i32 @arm_memio_str(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void read_line_print_usage() {
  char *usage = "\n"
                "  cd           Change directory\n"
                "  setenv       Create environment variable\n"
                "  unsetenv     Delete environment variable\n"
                "  printenv     Print list of environment variables\n"
                "  exit         Exit shell\n";
  write(1, usage, strlen(usage));
}


x86 assembly (clang, -O0):
<read_line_print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_line_print_usage>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [197 x i8] c"\0A cd Change directory\0A setenv Create environment variable\0A unsetenv Delete environment variable\0A printenv Print list of environment variables\0A exit Exit shell\0A\00"
define void @read_line_print_usage() {
%1 = alloca i8*
store i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @strlen(i8* %3)
%5 = call i32 @write(i32 1, i8* %2, i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [197 x i8] c"\0A cd Change directory\0A setenv Create environment variable\0A unsetenv Delete environment variable\0A printenv Print list of environment variables\0A exit Exit shell\0A\00"
define void @read_line_print_usage() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void *dict_find(int /*<<< orphan*/ const *, int /*<<< orphan*/);
void *dict_search(const uint8_t *data, uint32_t leng) {
  return dict_find(data, leng);
}


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

x86 assembly (clang, -O2):
<dict_search>:
jmp    1030 <dict_find@plt>

LLVM IR (-O0):
define i8* @dict_search(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = call i8* @dict_find(i32* %5, i32 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @dict_search(i32* %0, i32 %1) {
%3 = tail call i8* @dict_find(i32* %0, i32 %1)
ret i8* %3
}
int test_imm_67uint16_reg(unsigned short val) {
  return ((val) & (-0x67 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_67uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -103
%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_67uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -103
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void bind_assert(const int b, const char *Msg) {
  if (!b) {
    fprintf(stderr, "Error: %s\n", Msg);
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<bind_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1160 <bind_assert+0x40>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bind_assert>:
test   %edi,%edi
je     1125 <bind_assert+0x5>
ret
push   %rax
mov    %rsi,%rdx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @bind_assert(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %1)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
int main(void) {
  char buffer[1024];
  while (fgets(buffer, 1024, stdin) != NULL) {
    printf("%s", buffer);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rdi
mov    0x2ea8(%rip),%rax
mov    (%rax),%edx
mov    $0x400,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     116e <main+0x4e>
lea    -0x410(%rbp),%rsi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
mov    -0x4(%rbp),%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x400,%rsp
mov    0x2eb5(%rip),%r15
mov    (%r15),%edx
mov    %rsp,%rdi
mov    $0x400,%esi
call   1040 <fgets@plt>
test   %rax,%rax
je     1180 <main+0x60>
lea    0xeb1(%rip),%r14
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    (%r15),%edx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1040 <fgets@plt>
test   %rax,%rax
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32* @fgets(i8* %4, i32 1024, i32 %5)
%7 = icmp ne i32* %6, null
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %3
11: ; preds = %3
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32* @fgets(i8* %2, i32 1024, i32 %3)
%5 = icmp eq i32* %4, null
br i1 %5, label %11, label %6
6: ; preds = %0, %6
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%8 = load i32, i32* @stdin
%9 = call i32* @fgets(i8* %2, i32 1024, i32 %8)
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %6
11: ; preds = %6, %0
ret i32 0
}
void *heap_peek(void **arr) { return arr[0]; }


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

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

LLVM IR (-O0):
define i8* @heap_peek(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
ret i8* %5
}

LLVM IR (-O2):
define i8* @heap_peek(i8** nocapture %0) {
%2 = load i8*, i8** %0
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ h_puts(char const *);
int /*<<< orphan*/ h_th_end();
int /*<<< orphan*/ h_th_start(char const *, int);
void h_th_str(const char *str, const char *class, int colspan) {
  h_th_start(class, colspan);
  h_puts(str);
  h_th_end();
}


x86 assembly (clang, -O0):
<h_th_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <h_th_start@plt>
mov    -0x8(%rbp),%rdi
call   1030 <h_puts@plt>
mov    $0x0,%al
call   1050 <h_th_end@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h_th_str>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %edx,%esi
call   1040 <h_th_start@plt>
mov    %rbx,%rdi
call   1030 <h_puts@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <h_th_end@plt>

LLVM IR (-O0):
define void @h_th_str(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = call i32 @h_th_start(i8* %7, i32 %8)
%10 = load i8*, i8** %4
%11 = call i32 @h_puts(i8* %10)
%12 = call i32 (...) @h_th_end()
ret void
}

LLVM IR (-O2):
define void @h_th_str(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @h_th_start(i8* %1, i32 %2)
%5 = tail call i32 @h_puts(i8* %0)
%6 = tail call i32 (...) @h_th_end()
ret void
}
unsigned blkfnum2freq(unsigned blk, unsigned fnum) {
  return (fnum << blk) >> 1;
}


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

x86 assembly (clang, -O2):
<blkfnum2freq>:
mov    %esi,%eax
mov    %edi,%ecx
shl    %cl,%eax
shr    %eax
ret

LLVM IR (-O0):
define i32 @blkfnum2freq(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = shl i32 %5, %6
%8 = lshr i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @blkfnum2freq(i32 %0, i32 %1) {
%3 = shl i32 %1, %0
%4 = lshr i32 %3, 1
ret i32 %4
}
/* Type definitions */
struct _Locale_time {
  int dummy;
};

/* Variables and functions */
void _Locale_time_destroy(struct _Locale_time *ltime) {}


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

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

LLVM IR (-O0):
%struct._Locale_time = type { i32 }
define void @_Locale_time_destroy(%struct._Locale_time* %0) {
%2 = alloca %struct._Locale_time*
store %struct._Locale_time* %0, %struct._Locale_time** %2
ret void
}

LLVM IR (-O2):
%struct._Locale_time = type { i32 }
define void @_Locale_time_destroy(%struct._Locale_time* nocapture %0) {
ret void
}
void int_free(void *o) { return; }


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

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

LLVM IR (-O0):
define void @int_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @int_free(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f();
int main(int argc, char **argv) { f(); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @f()
ret i32 0
}
int _xor(int op1, int op2) { return op1 ^ op2; }


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

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

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

LLVM IR (-O2):
define i32 @_xor(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
ret i32 %3
}
void glCompressedTexImage3D(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glCompressedTexImage3D() {
ret void
}
int xmlUCSIsPrivateUseArea(int code) {
  return (((code >= 0xE000) && (code <= 0xF8FF)));
}


x86 assembly (clang, -O0):
<xmlUCSIsPrivateUseArea>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xe000,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsPrivateUseArea+0x26>
cmpl   $0xf8ff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsPrivateUseArea>:
add    $0xffff2000,%edi
xor    %eax,%eax
cmp    $0x1900,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsPrivateUseArea(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 57344
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 63743
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsPrivateUseArea(i32 %0) {
%2 = add i32 %0, -57344
%3 = icmp ult i32 %2, 6400
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned xrop3_239_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~T;
  stk2 = D | stk3;
  stk1 = S | stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_239_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_239_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %ecx,%eax
not    %eax
or     %edi,%esi
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_239_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(unsigned int);
unsigned int f(unsigned int);
int main(void) {
  unsigned int x = 0;
  while (x < 0x0fffffff) {
    x = f(x);
  }
  __VERIFIER_assert(x % 2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xfffffff,-0x8(%rbp)
jae    1153 <main+0x33>
mov    -0x8(%rbp),%edi
call   1030 <f@plt>
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    -0x8(%rbp),%edi
and    $0x1,%edi
call   1040 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <f@plt>
cmp    $0xfffffff,%eax
jb     1130 <main+0x10>
and    $0x1,%eax
mov    %eax,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp ult i32 %4, 268435455
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @f(i32 %7)
store i32 %8, i32* %2
br label %3
9: ; preds = %3
%10 = load i32, i32* %2
%11 = urem i32 %10, 2
%12 = call i32 @__VERIFIER_assert(i32 %11)
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %3, %1 ]
%3 = tail call i32 @f(i32 %2)
%4 = icmp ult i32 %3, 268435455
br i1 %4, label %1, label %5
5: ; preds = %1
%6 = and i32 %3, 1
%7 = tail call i32 @__VERIFIER_assert(i32 %6)
ret i32 0
}
int willusmath_is_inf(double x) {
  double y;
  if (x == 0.)
    return (0.);
  y = 1. / x;
  return (y == 0.);
}


x86 assembly (clang, -O0):
<willusmath_is_inf>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    112d <willusmath_is_inf+0x2d>
jp     112d <willusmath_is_inf+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    115b <willusmath_is_inf+0x5b>
movsd  0xecb(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<willusmath_is_inf>:
xor    %eax,%eax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    110f <willusmath_is_inf+0xf>
jp     110f <willusmath_is_inf+0xf>
ret
movsd  0xee9(%rip),%xmm2
divsd  %xmm0,%xmm2
cmpeqsd %xmm1,%xmm2
movq   %xmm2,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @willusmath_is_inf(double %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = fcmp oeq double %5, 0.000000e+00
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %14
8: ; preds = %1
%9 = load double, double* %3
%10 = fdiv double 1.000000e+00, %9
store double %10, double* %4
%11 = load double, double* %4
%12 = fcmp oeq double %11, 0.000000e+00
%13 = zext i1 %12 to i32
store i32 %13, i32* %2
br label %14
14: ; preds = %8, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @willusmath_is_inf(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = fdiv double 1.000000e+00, %0
%5 = fcmp oeq double %4, 0.000000e+00
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 0, %1 ]
ret i32 %8
}
/* Variables and functions */
double *malloc(int);
double *malloc_double(double d) {
  double *double_ptr;
  double_ptr = malloc(sizeof(double));
  *(double *)double_ptr = d;
  return double_ptr;
}


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

x86 assembly (clang, -O2):
<malloc_double>:
push   %rax
movsd  %xmm0,(%rsp)
mov    $0x8,%edi
call   1030 <malloc@plt>
movsd  (%rsp),%xmm0
movsd  %xmm0,(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define double* @malloc_double(double %0) {
%2 = alloca double
%3 = alloca double*
store double %0, double* %2
%4 = call double* @malloc(i32 8)
store double* %4, double** %3
%5 = load double, double* %2
%6 = load double*, double** %3
store double %5, double* %6
%7 = load double*, double** %3
ret double* %7
}

LLVM IR (-O2):
define noalias double* @malloc_double(double %0) {
%2 = tail call double* @malloc(i32 8)
store double %0, double* %2
ret double* %2
}
/* Variables and functions */
scalar_t__ is_perfect(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i;
  for (i = 1; i <= 10000; i++) {
    if (is_perfect(i))
      printf("%d\n", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x2710,-0x8(%rbp)
jg     1177 <main+0x57>
mov    -0x8(%rbp),%edi
call   1030 <is_perfect@plt>
cmp    $0x0,%rax
je     1164 <main+0x44>
mov    -0x8(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
jmp    1169 <main+0x49>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xed0(%rip),%r14
jmp    114b <main+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x2711,%ebx
je     1163 <main+0x43>
mov    %ebx,%edi
call   1030 <is_perfect@plt>
test   %rax,%rax
je     1140 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
jmp    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %14, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 10000
br i1 %5, label %6, label %17
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i64 @is_perfect(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %10, %6
br label %14
14: ; preds = %13
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %3
17: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %7
%2 = phi i32 [ 1, %0 ], [ %8, %7 ]
%3 = tail call i64 @is_perfect(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %7
7: ; preds = %1, %5
%8 = add nuw nsw i32 %2, 1
%9 = icmp eq i32 %8, 10001
br i1 %9, label %10, label %1
10: ; preds = %7
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __poet_fail();
int nondet(int, int);
int main(void) {
  int x = nondet(1, 6);
  if (x != 5)
    __poet_fail();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x6,%esi
call   1040 <nondet@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
je     1152 <main+0x32>
mov    $0x0,%al
call   1030 <__poet_fail@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x6,%esi
call   1040 <nondet@plt>
cmp    $0x5,%eax
je     113c <main+0x1c>
xor    %eax,%eax
call   1030 <__poet_fail@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @nondet(i32 1, i32 6)
%2 = icmp eq i32 %1, 5
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @__poet_fail()
br label %5
5: ; preds = %3, %0
ret i32 0
}
float squred_fitness_function(unsigned char input, unsigned char output) {
  return (float)(input - output) * (input - output);
}


x86 assembly (clang, -O0):
<squred_fitness_function>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
sub    %ecx,%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<squred_fitness_function>:
sub    %esi,%edi
cvtsi2ss %edi,%xmm0
mulss  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @squred_fitness_function(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = sub nsw i32 %6, %8
%10 = sitofp i32 %9 to float
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = load i8, i8* %4
%14 = zext i8 %13 to i32
%15 = sub nsw i32 %12, %14
%16 = sitofp i32 %15 to float
%17 = fmul float %10, %16
ret float %17
}

LLVM IR (-O2):
define float @squred_fitness_function(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = sub nsw i32 %3, %4
%6 = sitofp i32 %5 to float
%7 = fmul float %6, %6
ret float %7
}
void mmc1_reset() {}


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

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

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

LLVM IR (-O2):
define void @mmc1_reset() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ inb(int);
uint32_t fw_cfg_readb(void) { return inb(0x511); }


x86 assembly (clang, -O0):
<fw_cfg_readb>:
push   %rbp
mov    %rsp,%rbp
mov    $0x511,%edi
call   1030 <inb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fw_cfg_readb>:
mov    $0x511,%edi
jmp    1030 <inb@plt>

LLVM IR (-O0):
define i32 @fw_cfg_readb() {
%1 = call i32 @inb(i32 1297)
ret i32 %1
}

LLVM IR (-O2):
define i32 @fw_cfg_readb() {
%1 = tail call i32 @inb(i32 1297)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ launch_chat(int);
void *client_init(void *cindex) { launch_chat(*((int *)cindex)); }


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

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

LLVM IR (-O0):
define i8* @client_init(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
%7 = call i32 @launch_chat(i32 %6)
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
define noalias i8* @client_init(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @launch_chat(i32 %3)
ret i8* undef
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn(
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/"
        "genfiles/bansheeif_stub.c",
        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [155 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/bansheeif_stub.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [155 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/bansheeif_stub.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, double, double,
                           double);
void writeGpxTrkpt(FILE *OUT, double lat, double lon, double ele) {
  fprintf(OUT,
          "    <trkpt lat=\"%f\" lon=\"%f\">\n        <ele>%f</ele>\n    "
          "</trkpt>\n",
          lat, lon, ele);
}


x86 assembly (clang, -O0):
<writeGpxTrkpt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
lea    0xebb(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeGpxTrkpt>:
lea    0xee9(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [66 x i8] c" <trkpt lat=\22%f\22 lon=\22%f\22>\0A <ele>%f</ele>\0A </trkpt>\0A\00"
define void @writeGpxTrkpt(i32* %0, double %1, double %2, double %3) {
%5 = alloca i32*
%6 = alloca double
%7 = alloca double
%8 = alloca double
store i32* %0, i32** %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load i32*, i32** %5
%10 = load double, double* %6
%11 = load double, double* %7
%12 = load double, double* %8
%13 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), double %10, double %11, double %12)
ret void
}

LLVM IR (-O2):
@.str = [66 x i8] c" <trkpt lat=\22%f\22 lon=\22%f\22>\0A <ele>%f</ele>\0A </trkpt>\0A\00"
define void @writeGpxTrkpt(i32* nocapture %0, double %1, double %2, double %3) {
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), double %1, double %2, double %3)
ret void
}