xunge/DecIR huggingface dataset:
void call2d(double d1, int i, float f2, long l, double d2, char c, float f1,
            short s) {
  c = 'a';
  f1 = 0.0;
  s = 5;
  d1 = 0.0;
  i = 6;
  f2 = 0.1;
  l = 7;
  d2 = 0.2;
}


x86 assembly (clang, -O0):
<call2d>:
push   %rbp
mov    %rsp,%rbp
mov    %cx,%ax
mov    %dl,%cl
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    %cl,-0x21(%rbp)
movss  %xmm3,-0x28(%rbp)
mov    %ax,-0x2a(%rbp)
movb   $0x61,-0x21(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
movw   $0x5,-0x2a(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movl   $0x6,-0xc(%rbp)
movss  0xeb4(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movq   $0x7,-0x18(%rbp)
movsd  0xe97(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @call2d(double %0, i32 %1, float %2, i64 %3, double %4, i8 signext %5, float %6, i16 signext %7) {
%9 = alloca double
%10 = alloca i32
%11 = alloca float
%12 = alloca i64
%13 = alloca double
%14 = alloca i8
%15 = alloca float
%16 = alloca i16
store double %0, double* %9
store i32 %1, i32* %10
store float %2, float* %11
store i64 %3, i64* %12
store double %4, double* %13
store i8 %5, i8* %14
store float %6, float* %15
store i16 %7, i16* %16
store i8 97, i8* %14
store float 0.000000e+00, float* %15
store i16 5, i16* %16
store double 0.000000e+00, double* %9
store i32 6, i32* %10
store float 0x3FB99999A0000000, float* %11
store i64 7, i64* %12
store double 2.000000e-01, double* %13
ret void
}

LLVM IR (-O2):
define void @call2d(double %0, i32 %1, float %2, i64 %3, double %4, i8 signext %5, float %6, i16 signext %7) {
ret void
}
int premier(int number) {
  int i;
  for (i = 2; i <= number / 2; i++) {
    if (number % i == 0)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<premier>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jg     115b <premier+0x5b>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1148 <premier+0x48>
movl   $0x0,-0x4(%rbp)
jmp    1162 <premier+0x62>
jmp    114d <premier+0x4d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <premier+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<premier>:
mov    $0x1,%r8d
cmp    $0x4,%edi
jl     1137 <premier+0x37>
mov    %edi,%esi
shr    %esi
neg    %esi
mov    $0x2,%ecx
cs nopw 0x0(%rax,%rax,1)
mov    %edi,%eax
cltd
idiv   %ecx
test   %edx,%edx
je     113b <premier+0x3b>
lea    (%rsi,%rcx,1),%eax
add    $0x1,%eax
add    $0x1,%ecx
cmp    $0x1,%eax
jne    1120 <premier+0x20>
mov    %r8d,%eax
ret
xor    %r8d,%r8d
mov    %r8d,%eax
ret

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

LLVM IR (-O2):
define i32 @premier(i32 %0) {
%2 = icmp slt i32 %0, 4
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = lshr i32 %0, 1
br label %8
5: ; preds = %8
%6 = add nuw nsw i32 %9, 1
%7 = icmp eq i32 %9, %4
br i1 %7, label %12, label %8
8: ; preds = %3, %5
%9 = phi i32 [ %6, %5 ], [ 2, %3 ]
%10 = srem i32 %0, %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %8, %5, %1
%13 = phi i32 [ 1, %1 ], [ 1, %5 ], [ 0, %8 ]
ret i32 %13
}
int test_imm_00int8_reg(signed char val) {
  return ((val) & (-0x00 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0x0,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0xffffffd8,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_00int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 0
%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_00int8_reg(i8 signext %0) {
ret i32 -40
}
void xcb_ffi_return_socket(void *closure) {
  int *has_socket;
  has_socket = (int *)closure;
  if (has_socket) {
    *has_socket = 0;
  }
}


x86 assembly (clang, -O0):
<xcb_ffi_return_socket>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1125 <xcb_ffi_return_socket+0x25>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcb_ffi_return_socket>:
test   %rdi,%rdi
je     110b <xcb_ffi_return_socket+0xb>
movl   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @xcb_ffi_return_socket(i8* writeonly %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = bitcast i8* %0 to i32*
store i32 0, i32* %4
br label %5
5: ; preds = %3, %1
ret void
}
int aa_pro_ctr_a01(int chan, unsigned char *buf, int len) {
  hu_log(6, "hu_aap", __func__, "!!!!!!!!");
  return (-1);
}


x86 assembly (clang, -O0):
<aa_pro_ctr_a01>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x6,%edi
lea    0xed2(%rip),%rsi
lea    0xed2(%rip),%rdx
lea    0xeda(%rip),%rcx
mov    $0x0,%al
call   1030 <hu_log@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_pro_ctr_a01>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xee8(%rip),%rdx
lea    0xef0(%rip),%rcx
mov    $0x6,%edi
xor    %eax,%eax
call   1030 <hu_log@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"hu_aap\00"
@__func__.aa_pro_ctr_a01 = [15 x i8] c"aa_pro_ctr_a01\00"
@.str.1 = [9 x i8] c"!!!!!!!!\00"
define i32 @aa_pro_ctr_a01(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = call i32 (i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @hu_log to i32 (i32, i8*, i8*, i8*, ...)*)(i32 6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.aa_pro_ctr_a01, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [7 x i8] c"hu_aap\00"
@__func__.aa_pro_ctr_a01 = [15 x i8] c"aa_pro_ctr_a01\00"
@.str.1 = [9 x i8] c"!!!!!!!!\00"
define i32 @aa_pro_ctr_a01(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 (i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @hu_log to i32 (i32, i8*, i8*, i8*, ...)*)(i32 6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.aa_pro_ctr_a01, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 -1
}
int hb_idle_msec_default(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @hb_idle_msec_default() {
ret i32 1
}
int benchmark_finibatch(void *tsd) {
  ;
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @benchmark_finibatch(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ zsim_roi_begin();
void zsim_roi_begin_() { zsim_roi_begin(); }


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

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

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

LLVM IR (-O2):
define void @zsim_roi_begin_() {
%1 = tail call i32 (...) @zsim_roi_begin()
ret void
}
/* Variables and functions */
scalar_t__ nrf_drv_usbd_errata_type_52840_proto1();
bool nrf_drv_usbd_errata_sizeepout_rw(void) {
  return 1 && nrf_drv_usbd_errata_type_52840_proto1();
}


x86 assembly (clang, -O0):
<nrf_drv_usbd_errata_sizeepout_rw>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <nrf_drv_usbd_errata_type_52840_proto1@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_drv_usbd_errata_sizeepout_rw>:
push   %rax
xor    %eax,%eax
call   1030 <nrf_drv_usbd_errata_type_52840_proto1@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @nrf_drv_usbd_errata_sizeepout_rw() {
%1 = call i64 (...) @nrf_drv_usbd_errata_type_52840_proto1()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @nrf_drv_usbd_errata_sizeepout_rw() {
%1 = tail call i64 (...) @nrf_drv_usbd_errata_type_52840_proto1()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void lock() { db(0xF0); }


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

x86 assembly (clang, -O2):
<lock>:
mov    $0xf0,%edi
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @lock() {
%1 = call i32 @db(i32 240)
ret void
}

LLVM IR (-O2):
define void @lock() {
%1 = tail call i32 @db(i32 240)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ conn_finish();
void comm_finish() { conn_finish(); }


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

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

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

LLVM IR (-O2):
define void @comm_finish() {
%1 = tail call i32 (...) @conn_finish()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arm_arith_rsb(int /*<<< orphan*/);
int /*<<< orphan*/ arm_data_imm_op();
void arm_rsb_imm() { arm_arith_rsb(arm_data_imm_op()); }


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

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

LLVM IR (-O0):
define void @arm_rsb_imm() {
%1 = call i32 (...) @arm_data_imm_op()
%2 = call i32 @arm_arith_rsb(i32 %1)
ret void
}

LLVM IR (-O2):
define void @arm_rsb_imm() {
%1 = tail call i32 (...) @arm_data_imm_op()
%2 = tail call i32 @arm_arith_rsb(i32 %1)
ret void
}
/* Variables and functions */
char *strdup(char const *);
void testStrdup(const char *s, unsigned validIndex) {
  char *s2 = strdup(s);
  s2[validIndex + 1] = 'b';
}


x86 assembly (clang, -O0):
<testStrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strdup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,%ecx
movb   $0x62,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testStrdup(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = call i8* @strdup(i8* %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = load i32, i32* %4
%10 = add i32 %9, 1
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %8, i64 %11
store i8 98, i8* %12
ret void
}

LLVM IR (-O2):
define void @testStrdup(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char const *);
int main(int argc, char const *argv[]) {
  char buffer[256];
  if (argc > 1) {
    strcpy(buffer, argv[1]);
  }
  printf("%p\n", buffer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1157 <main+0x37>
lea    -0x110(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
lea    -0x110(%rbp),%rsi
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x108,%rsp
cmp    $0x2,%edi
jl     1138 <main+0x18>
mov    0x8(%rsi),%rsi
mov    %rsp,%rdi
call   1030 <strcpy@plt>
lea    0xec1(%rip),%rdi
mov    %rsp,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x108,%rsp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%p\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @strcpy(i8* %4, i8* %8)
br label %10
10: ; preds = %6, %2
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
char getTaint(char **argv) { return **argv; }


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

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

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

LLVM IR (-O2):
define signext i8 @getTaint(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
ret i8 %3
}
int unary_sym(int token) {
  if (token == 9 || token == 55)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<unary_sym>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
je     111b <unary_sym+0x1b>
cmpl   $0x37,-0x8(%rbp)
jne    1127 <unary_sym+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <unary_sym+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unary_sym>:
cmp    $0x37,%edi
sete   %al
cmp    $0x9,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @unary_sym(i32 %0) {
%2 = icmp eq i32 %0, 55
%3 = icmp eq i32 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
void init_ctors() {}


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

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

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

LLVM IR (-O2):
define void @init_ctors() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ iprintf(char *, scalar_t__, scalar_t__);
int /*<<< orphan*/ u_fail();
void u_gt(uint32_t a, uint32_t b) {
  if (!(a > b)) {
    iprintf("ERROR: %u > %u", a, b);
    u_fail();
  }
}


x86 assembly (clang, -O0):
<u_gt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jg     1159 <u_gt+0x39>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeb3(%rip),%rdi
call   1040 <iprintf@plt>
mov    $0x0,%al
call   1030 <u_fail@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u_gt>:
mov    %rsi,%rdx
cmp    %rsi,%rdi
jle    1129 <u_gt+0x9>
ret
push   %rax
mov    %rdi,%rsi
lea    0xecc(%rip),%rdi
call   1040 <iprintf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <u_fail@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"ERROR: %u > %u\00"
define void @u_gt(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
br i1 %7, label %13, label %8
8: ; preds = %2
%9 = load i64, i64* %3
%10 = load i64, i64* %4
%11 = call i32 @iprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %9, i64 %10)
%12 = call i32 (...) @u_fail()
br label %13
13: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"ERROR: %u > %u\00"
define void @u_gt(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @iprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1)
%6 = tail call i32 (...) @u_fail()
br label %7
7: ; preds = %4, %2
ret void
}
/* Variables and functions */
char **printVertically(char *, int *);
int main() {
  char s[] = "HOW ARE YOU";
  int rs;
  char **ret = printVertically(s, &rs);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x2045524120574f48,%rax
52 45 20
mov    %rax,0x8(%rsp)
movl   $0x554f59,0x10(%rsp)
lea    0x8(%rsp),%rdi
lea    0x14(%rsp),%rsi
call   1030 <printVertically@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.s = [12 x i8] c"HOW ARE YOU\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [12 x i8]
%3 = alloca i32
%4 = alloca i8**
store i32 0, i32* %1
%5 = bitcast [12 x i8]* %2 to i8*
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%7 = call i8** @printVertically(i8* %6, i32* %3)
store i8** %7, i8*** %4
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [12 x i8] c"HOW ARE YOU\00"
define i32 @main() {
%1 = alloca [12 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%4 = bitcast i32* %2 to i8*
%5 = call i8** @printVertically(i8* %3, i32* %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int setsockopt(int, int, int, char const *, int /*<<< orphan*/);
int qemu_setsockopt(int sock, int level, int optname, const void *optval,
                    size_t optlen) {
  return setsockopt(sock, level, optname, (const char *)optval,
                    (socklen_t)optlen);
}


x86 assembly (clang, -O0):
<qemu_setsockopt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %eax,%r8d
call   1030 <setsockopt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qemu_setsockopt>:
jmp    1030 <setsockopt@plt>

LLVM IR (-O0):
define i32 @qemu_setsockopt(i32 %0, i32 %1, i32 %2, i8* %3, i64 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i64
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i8*, i8** %9
%15 = load i64, i64* %10
%16 = trunc i64 %15 to i32
%17 = call i32 @setsockopt(i32 %11, i32 %12, i32 %13, i8* %14, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @qemu_setsockopt(i32 %0, i32 %1, i32 %2, i8* %3, i64 %4) {
%6 = trunc i64 %4 to i32
%7 = tail call i32 @setsockopt(i32 %0, i32 %1, i32 %2, i8* %3, i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_packet_new_dynamic() {
  printf("NOT IMPLEMENTED:"
         "pa_packet_new_dynamic"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"NOT IMPLEMENTED:pa_packet_new_dynamic\0A\00"
define i32 @pa_packet_new_dynamic() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [38 x i8] c"NOT IMPLEMENTED:pa_packet_new_dynamic\00"
define i32 @pa_packet_new_dynamic() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void getbits(long data, unsigned char *dst) {
  dst[0] = (data)&0xff;
  dst[1] = (data >> 8) & 0xff;
  dst[2] = (data >> 16) & 0xff;
  dst[3] = (data >> 24) & 0xff;
}


x86 assembly (clang, -O0):
<getbits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
sar    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%rax
sar    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rax
sar    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbits>:
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @getbits(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i64, i64* %3
%6 = and i64 %5, 255
%7 = trunc i64 %6 to i8
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i64, i64* %3
%11 = ashr i64 %10, 8
%12 = and i64 %11, 255
%13 = trunc i64 %12 to i8
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
%16 = load i64, i64* %3
%17 = ashr i64 %16, 16
%18 = and i64 %17, 255
%19 = trunc i64 %18 to i8
%20 = load i8*, i8** %4
%21 = getelementptr inbounds i8, i8* %20, i64 2
store i8 %19, i8* %21
%22 = load i64, i64* %3
%23 = ashr i64 %22, 24
%24 = and i64 %23, 255
%25 = trunc i64 %24 to i8
%26 = load i8*, i8** %4
%27 = getelementptr inbounds i8, i8* %26, i64 3
store i8 %25, i8* %27
ret void
}

LLVM IR (-O2):
define void @getbits(i64 %0, i8* nocapture writeonly %1) {
%3 = trunc i64 %0 to i8
store i8 %3, i8* %1
%4 = lshr i64 %0, 8
%5 = trunc i64 %4 to i8
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
%7 = lshr i64 %0, 16
%8 = trunc i64 %7 to i8
%9 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %8, i8* %9
%10 = lshr i64 %0, 24
%11 = trunc i64 %10 to i8
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
ret void
}
void ft_striteri(char *s, void (*f)(unsigned int, char *)) {
  int i;
  i = 0;
  while (*s != 0)
    f(i++, s++);
}


x86 assembly (clang, -O0):
<ft_striteri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114c <ft_striteri+0x4c>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
mov    %edi,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    %rsi,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
call   *%rax
jmp    1117 <ft_striteri+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striteri>:
push   %r15
push   %r14
push   %rbx
cmpb   $0x0,(%rdi)
je     1135 <ft_striteri+0x35>
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%r15,%rbx,1),%rsi
mov    %ebx,%edi
call   *%r14
cmpb   $0x0,0x1(%r15,%rbx,1)
lea    0x1(%rbx),%rbx
jne    1120 <ft_striteri+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ft_striteri(i8* %0, void (i32, i8*)* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ 0, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = add nuw nsw i32 %6, 1
%9 = getelementptr inbounds i8, i8* %7, i64 1
tail call void %1(i32 %6, i8* %7)
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
int eraVersionMinor() { return 4; }


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

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

LLVM IR (-O0):
define i32 @eraVersionMinor() {
ret i32 4
}

LLVM IR (-O2):
define i32 @eraVersionMinor() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ F_SETFD;
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ fcntl(int, int /*<<< orphan*/, int);
int open(char *, int /*<<< orphan*/);
int open_read_error_aux(char *file) {
  int fd = open(file, O_RDONLY);
  fcntl(fd, F_SETFD, 1);
  return fd;
}


x86 assembly (clang, -O0):
<open_read_error_aux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    0x2e8d(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edx
call   1030 <fcntl@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_read_error_aux>:
push   %rbx
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,%ebx
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
mov    $0x1,%edx
call   1030 <fcntl@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@O_RDONLY = global i32 0
@F_SETFD = global i32 0
define i32 @open_read_error_aux(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @O_RDONLY
%6 = call i32 @open(i8* %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = load i32, i32* @F_SETFD
%9 = call i32 @fcntl(i32 %7, i32 %8, i32 1)
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
@F_SETFD = global i32 0
define i32 @open_read_error_aux(i8* nocapture %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = load i32, i32* @F_SETFD
%5 = tail call i32 @fcntl(i32 %3, i32 %4, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ cquat_norm2_l(double const *);
long double sqrtl(int /*<<< orphan*/);
long double cquat_norm_l(const double *q) { return sqrtl(cquat_norm2_l(q)); }


x86 assembly (clang, -O0):
<cquat_norm_l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <cquat_norm2_l@plt>
mov    %eax,%edi
call   1040 <sqrtl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cquat_norm_l>:
push   %rax
call   1030 <cquat_norm2_l@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <sqrtl@plt>

LLVM IR (-O0):
define x86_fp80 @cquat_norm_l(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = call i32 @cquat_norm2_l(double* %3)
%5 = call x86_fp80 @sqrtl(i32 %4)
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @cquat_norm_l(double* %0) {
%2 = tail call i32 @cquat_norm2_l(double* %0)
%3 = tail call x86_fp80 @sqrtl(i32 %2)
ret x86_fp80 %3
}
int SV_GetRebornSlot(void) { return (7); }


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

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

LLVM IR (-O0):
define i32 @SV_GetRebornSlot() {
ret i32 7
}

LLVM IR (-O2):
define i32 @SV_GetRebornSlot() {
ret i32 7
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
char *strrchr(char *, char);
bool file_ext(char *filename) {
  char *dot = strrchr(filename, '.');
  if (dot == NULL)
    return false;
  if (!strcmp(dot, ".b"))
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<file_ext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1155 <file_ext+0x35>
movl   $0x0,-0x4(%rbp)
jmp    1181 <file_ext+0x61>
mov    -0x18(%rbp),%rdi
lea    0xea0(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    117a <file_ext+0x5a>
movl   $0x1,-0x4(%rbp)
jmp    1181 <file_ext+0x61>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_ext>:
push   %rax
mov    $0x2e,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     114a <file_ext+0x2a>
lea    0xec9(%rip),%rsi
mov    %rax,%rdi
call   1040 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c".b\00"
define i32 @file_ext(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strrchr(i8* %5, i8 signext 46)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %16
10: ; preds = %1
%11 = load i8*, i8** %4
%12 = call i32 @strcmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%13 = icmp ne i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %10
store i32 1, i32* %2
br label %16
15: ; preds = %10
store i32 0, i32* %2
br label %16
16: ; preds = %15, %14, %9
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
@.str = [3 x i8] c".b\00"
define i32 @file_ext(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @strcmp(i8* %2, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
size_t sasn1_tag_size(size_t v) {
  size_t r = 1;
  if (v >= 31) {
    do {
      v >>= 7;
      r += 1;
    } while (v);
  }
  return r;
}


x86 assembly (clang, -O0):
<sasn1_tag_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1,-0x10(%rbp)
cmpq   $0x1f,-0x8(%rbp)
jb     1148 <sasn1_tag_size+0x48>
jmp    1120 <sasn1_tag_size+0x20>
mov    -0x8(%rbp),%rax
shr    $0x7,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1120 <sasn1_tag_size+0x20>
jmp    1148 <sasn1_tag_size+0x48>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sasn1_tag_size>:
mov    $0x1,%eax
cmp    $0x1f,%rdi
jb     1131 <sasn1_tag_size+0x31>
mov    $0x1,%eax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
shr    $0x7,%rcx
add    $0x1,%rax
cmp    $0x7f,%rdi
mov    %rcx,%rdi
ja     1120 <sasn1_tag_size+0x20>
ret

LLVM IR (-O0):
define i64 @sasn1_tag_size(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 1, i64* %3
%4 = load i64, i64* %2
%5 = icmp uge i64 %4, 31
br i1 %5, label %6, label %16
6: ; preds = %1
br label %7
7: ; preds = %12, %6
%8 = load i64, i64* %2
%9 = lshr i64 %8, 7
store i64 %9, i64* %2
%10 = load i64, i64* %3
%11 = add i64 %10, 1
store i64 %11, i64* %3
br label %12
12: ; preds = %7
%13 = load i64, i64* %2
%14 = icmp ne i64 %13, 0
br i1 %14, label %7, label %15
15: ; preds = %12
br label %16
16: ; preds = %15, %1
%17 = load i64, i64* %3
ret i64 %17
}

LLVM IR (-O2):
define i64 @sasn1_tag_size(i64 %0) {
%2 = icmp ugt i64 %0, 30
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i64 [ %6, %3 ], [ %0, %1 ]
%5 = phi i64 [ %7, %3 ], [ 1, %1 ]
%6 = lshr i64 %4, 7
%7 = add nuw nsw i64 %5, 1
%8 = icmp ult i64 %4, 128
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i64 [ 1, %1 ], [ %7, %3 ]
ret i64 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ ENGINE;

/* Variables and functions */
int /*<<< orphan*/ ENGINE_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *ENGINE_new();
int /*<<< orphan*/ bind_helper(int /*<<< orphan*/ *);
ENGINE *engine_deadcafe(void) {
  ENGINE *ret = ENGINE_new();
  if (ret) {
    if (!bind_helper(ret)) {
      ENGINE_free(ret);
      ret = NULL;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<engine_deadcafe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <ENGINE_new@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1176 <engine_deadcafe+0x46>
mov    -0x8(%rbp),%rdi
call   1050 <bind_helper@plt>
cmp    $0x0,%eax
jne    1171 <engine_deadcafe+0x41>
mov    -0x8(%rbp),%rdi
call   1030 <ENGINE_free@plt>
movq   $0x0,-0x8(%rbp)
jmp    1176 <engine_deadcafe+0x46>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<engine_deadcafe>:
push   %rbx
xor    %eax,%eax
call   1040 <ENGINE_new@plt>
test   %rax,%rax
je     1154 <engine_deadcafe+0x24>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <bind_helper@plt>
test   %eax,%eax
jne    1156 <engine_deadcafe+0x26>
mov    %rbx,%rdi
call   1030 <ENGINE_free@plt>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @engine_deadcafe() {
%1 = alloca i32*
%2 = call i32* (...) @ENGINE_new()
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %13
5: ; preds = %0
%6 = load i32*, i32** %1
%7 = call i32 @bind_helper(i32* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %5
%10 = load i32*, i32** %1
%11 = call i32 @ENGINE_free(i32* %10)
store i32* null, i32** %1
br label %12
12: ; preds = %9, %5
br label %13
13: ; preds = %12, %0
%14 = load i32*, i32** %1
ret i32* %14
}

LLVM IR (-O2):
define i32* @engine_deadcafe() {
%1 = tail call i32* (...) @ENGINE_new()
%2 = icmp eq i32* %1, null
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i32 @bind_helper(i32* %1)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @ENGINE_free(i32* %1)
br label %8
8: ; preds = %3, %6, %0
%9 = phi i32* [ %1, %3 ], [ null, %6 ], [ null, %0 ]
ret i32* %9
}
char *commonCssStyles() { return ""; }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @commonCssStyles() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @commonCssStyles() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int cmd_print(void *, char const *);
int cmd_hexdump(void *data, const char *input) {
  return cmd_print(data, input - 1);
}


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

x86 assembly (clang, -O2):
<cmd_hexdump>:
add    $0xffffffffffffffff,%rsi
jmp    1030 <cmd_print@plt>

LLVM IR (-O0):
define i32 @cmd_hexdump(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = getelementptr inbounds i8, i8* %6, i64 -1
%8 = call i32 @cmd_print(i8* %5, i8* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @cmd_hexdump(i8* %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 -1
%4 = tail call i32 @cmd_print(i8* %0, i8* %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ loop(char *);
void *THREAD_A_main(void *arg) {
  loop("A");
  return NULL;
}


x86 assembly (clang, -O0):
<THREAD_A_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <loop@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"A\00"
define i8* @THREAD_A_main(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @loop(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [2 x i8] c"A\00"
define noalias i8* @THREAD_A_main(i8* nocapture readnone %0) {
%2 = tail call i32 @loop(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i8* null
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int uint64();
double float64oo() {
  return ((double)(uint64() >> 12) + 0.5) / ((double)(((uint64_t)1) << 52));
}


x86 assembly (clang, -O0):
<float64oo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <uint64@plt>
sar    $0xc,%eax
cvtsi2sd %eax,%xmm0
movsd  0xed6(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @float64oo() {
%1 = call i32 (...) @uint64()
%2 = ashr i32 %1, 12
%3 = sitofp i32 %2 to double
%4 = fadd double %3, 5.000000e-01
%5 = fdiv double %4, poison
ret double %5
}

LLVM IR (-O2):
define double @float64oo() {
%1 = tail call i32 (...) @uint64()
ret double poison
}
int ij(int i, int j) {
  return (i >= j) ? (i * (i + 1) / 2 + j) : (j * (j + 1) / 2 + i);
}


x86 assembly (clang, -O0):
<ij>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1135 <ij+0x35>
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    114f <ij+0x4f>
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ij>:
cmp    %esi,%edi
mov    %edi,%eax
cmovl  %esi,%eax
cmovl  %edi,%esi
lea    0x1(%rax),%ecx
imul   %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @ij(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 = icmp sge i32 %5, %6
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load i32, i32* %3
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
%12 = mul nsw i32 %9, %11
%13 = sdiv i32 %12, 2
%14 = load i32, i32* %4
%15 = add nsw i32 %13, %14
br label %24
16: ; preds = %2
%17 = load i32, i32* %4
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
%20 = mul nsw i32 %17, %19
%21 = sdiv i32 %20, 2
%22 = load i32, i32* %3
%23 = add nsw i32 %21, %22
br label %24
24: ; preds = %16, %8
%25 = phi i32 [ %15, %8 ], [ %23, %16 ]
ret i32 %25
}

LLVM IR (-O2):
define i32 @ij(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
%5 = select i1 %3, i32 %0, i32 %1
%6 = add nsw i32 %4, 1
%7 = mul nsw i32 %6, %4
%8 = sdiv i32 %7, 2
%9 = add nsw i32 %8, %5
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long long);
int main() {
  long long Var = 123455678902ll;
  printf("%lld\n", Var);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movabs $0x1cbe8829b6,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

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


x86 assembly (clang, -O0):
<ResAttach>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ResAttach(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
ret i32 1
}

LLVM IR (-O2):
define i32 @ResAttach(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ TOSH_SET_HUM_SDA_PIN();
void HUMIDITY_SET_DATA() { TOSH_SET_HUM_SDA_PIN(); }


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

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

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

LLVM IR (-O2):
define void @HUMIDITY_SET_DATA() {
%1 = tail call i32 (...) @TOSH_SET_HUM_SDA_PIN()
ret void
}
void lll_prof_enter_radio(void) {}


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

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

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

LLVM IR (-O2):
define void @lll_prof_enter_radio() {
ret void
}
void fk425(ra, dec) double *ra;
double *dec;
{
  double rapm;
  double decpm;
  rapm = (double)0.0;
  decpm = (double)0.0;
  fk425m(ra, dec, &rapm, &decpm);
  return;
}


x86 assembly (clang, -O0):
<fk425>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1030 <fk425m@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fk425>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
xor    %eax,%eax
call   1030 <fk425m@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @fk425(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca double
store double* %0, double** %3
store double* %1, double** %4
store double 0.000000e+00, double* %5
store double 0.000000e+00, double* %6
%7 = load double*, double** %3
%8 = load double*, double** %4
%9 = call i32 (double*, double*, double*, double*, ...) bitcast (i32 (...)* @fk425m to i32 (double*, double*, double*, double*, ...)*)(double* %7, double* %8, double* %5, double* %6)
ret void
}

LLVM IR (-O2):
define void @fk425(double* %0, double* %1) {
%3 = alloca double
%4 = alloca double
%5 = bitcast double* %3 to i8*
%6 = bitcast double* %4 to i8*
store double 0.000000e+00, double* %3
store double 0.000000e+00, double* %4
%7 = call i32 (double*, double*, double*, double*, ...) bitcast (i32 (...)* @fk425m to i32 (double*, double*, double*, double*, ...)*)(double* %0, double* %1, double* %3, double* %4)
ret void
}
int ft_isupper(int c) {
  if ((unsigned char)c >= 'A' && (unsigned char)c <= 'Z')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzbl %al,%eax
cmp    $0x41,%eax
jl     1131 <ft_isupper+0x31>
mov    -0x8(%rbp),%eax
movzbl %al,%eax
cmp    $0x5a,%eax
jg     1131 <ft_isupper+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1138 <ft_isupper+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isupper>:
movzbl %dil,%ecx
add    $0xffffffbf,%ecx
xor    %eax,%eax
cmp    $0x1a,%ecx
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = trunc i32 %4 to i8
%6 = zext i8 %5 to i32
%7 = icmp sge i32 %6, 65
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i32, i32* %3
%10 = trunc i32 %9 to i8
%11 = zext i8 %10 to i32
%12 = icmp sle i32 %11, 90
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 1, i32* %2
br label %15
14: ; preds = %8, %1
store i32 0, i32* %2
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @ft_isupper(i32 %0) {
%2 = and i32 %0, 255
%3 = add nsw i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
unsigned int MINOR(unsigned int dev) { return dev & ((1 << 20) - 1); }


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

x86 assembly (clang, -O2):
<MINOR>:
mov    %edi,%eax
and    $0xfffff,%eax
ret

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

LLVM IR (-O2):
define i32 @MINOR(i32 %0) {
%2 = and i32 %0, 1048575
ret i32 %2
}
const char *C_Int_Definition(void) {
  return "struct C_Int {\n"
         "  int64_t (*c_int)(var);\n"
         "};\n";
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"struct C_Int {\0A int64_t (*c_int)(var);\0A};\0A\00"
define i8* @C_Int_Definition() {
ret i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [44 x i8] c"struct C_Int {\0A int64_t (*c_int)(var);\0A};\0A\00"
define i8* @C_Int_Definition() {
ret i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0)
}