xunge/DecIR huggingface dataset:
/* Variables and functions */
char *newDbSerializeDevsDev(int, int, int, char *);
char *newDbSerializePlugs(int MAXBUF, char *buf) {
  return newDbSerializeDevsDev(7, 7, MAXBUF, buf);
}


x86 assembly (clang, -O0):
<newDbSerializePlugs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    $0x7,%esi
mov    %esi,%edi
call   1030 <newDbSerializeDevsDev@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newDbSerializePlugs>:
mov    %rsi,%rcx
mov    %edi,%edx
mov    $0x7,%edi
mov    $0x7,%esi
jmp    1030 <newDbSerializeDevsDev@plt>

LLVM IR (-O0):
define i8* @newDbSerializePlugs(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 i8* @newDbSerializeDevsDev(i32 7, i32 7, i32 %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @newDbSerializePlugs(i32 %0, i8* %1) {
%3 = tail call i8* @newDbSerializeDevsDev(i32 7, i32 7, i32 %0, i8* %1)
ret i8* %3
}
int test_imm_01int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x01 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_01int64_midword_mem>:
testb  $0x1,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_01int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 65536
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ call(char *);
int /*<<< orphan*/ msleep(int);
void my_dump_task(void) {
  call("dmstart");
  msleep(10000);
  call("dispcheck");
  call("dumpf");
  call("dmstop");
}


x86 assembly (clang, -O0):
<my_dump_task>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <call@plt>
mov    $0x2710,%edi
call   1030 <msleep@plt>
lea    0xec7(%rip),%rdi
call   1040 <call@plt>
lea    0xec5(%rip),%rdi
call   1040 <call@plt>
lea    0xebf(%rip),%rdi
call   1040 <call@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_dump_task>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <call@plt>
mov    $0x2710,%edi
call   1030 <msleep@plt>
lea    0xeca(%rip),%rdi
call   1040 <call@plt>
lea    0xec8(%rip),%rdi
call   1040 <call@plt>
lea    0xec2(%rip),%rdi
pop    %rax
jmp    1040 <call@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"dmstart\00"
@.str.1 = [10 x i8] c"dispcheck\00"
@.str.2 = [6 x i8] c"dumpf\00"
@.str.3 = [7 x i8] c"dmstop\00"
define void @my_dump_task() {
%1 = call i32 @call(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @msleep(i32 10000)
%3 = call i32 @call(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @call(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @call(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"dmstart\00"
@.str.1 = [10 x i8] c"dispcheck\00"
@.str.2 = [6 x i8] c"dumpf\00"
@.str.3 = [7 x i8] c"dmstop\00"
define void @my_dump_task() {
%1 = tail call i32 @call(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @msleep(i32 10000)
%3 = tail call i32 @call(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @call(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @call(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ pack_ieee754(double, int, int);
int /*<<< orphan*/ pack_int64_t(unsigned char **, int /*<<< orphan*/, int);
void pack_double(unsigned char **bp, double val, int endian) {
  uint64_t ieee754_encoded_val = (pack_ieee754((val), 64, 11));
  pack_int64_t(bp, ieee754_encoded_val, endian);
}


x86 assembly (clang, -O0):
<pack_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x40,%edi
mov    $0xb,%esi
call   1040 <pack_ieee754@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <pack_int64_t@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pack_double>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x40,%edi
mov    $0xb,%esi
call   1040 <pack_ieee754@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <pack_int64_t@plt>

LLVM IR (-O0):
define void @pack_double(i8** %0, double %1, i32 %2) {
%4 = alloca i8**
%5 = alloca double
%6 = alloca i32
%7 = alloca i32
store i8** %0, i8*** %4
store double %1, double* %5
store i32 %2, i32* %6
%8 = load double, double* %5
%9 = call i32 @pack_ieee754(double %8, i32 64, i32 11)
store i32 %9, i32* %7
%10 = load i8**, i8*** %4
%11 = load i32, i32* %7
%12 = load i32, i32* %6
%13 = call i32 @pack_int64_t(i8** %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @pack_double(i8** %0, double %1, i32 %2) {
%4 = tail call i32 @pack_ieee754(double %1, i32 64, i32 11)
%5 = tail call i32 @pack_int64_t(i8** %0, i32 %4, i32 %2)
ret void
}
/* Variables and functions */
int EINVAL;
int parse_opt_string(char *param, void *arg) {
  if (param == NULL || param[0] == '\0')
    return -EINVAL;
  *(char **)arg = param;
  return 0;
}


x86 assembly (clang, -O0):
<parse_opt_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1127 <parse_opt_string+0x27>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    113a <parse_opt_string+0x3a>
xor    %eax,%eax
mov    0x2eb0(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    114c <parse_opt_string+0x4c>
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_opt_string>:
test   %rdi,%rdi
je     1110 <parse_opt_string+0x10>
cmpb   $0x0,(%rdi)
je     1110 <parse_opt_string+0x10>
mov    %rdi,(%rsi)
xor    %eax,%eax
ret
mov    0x2ec9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @parse_opt_string(i8* %0, i8* nocapture writeonly %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4, %2
%8 = load i32, i32* @EINVAL
%9 = sub nsw i32 0, %8
br label %12
10: ; preds = %4
%11 = bitcast i8* %1 to i8**
store i8* %0, i8** %11
br label %12
12: ; preds = %10, %7
%13 = phi i32 [ %9, %7 ], [ 0, %10 ]
ret i32 %13
}
/* Type definitions */
typedef int __gid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
__gid_t __getegid(void) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__getegid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getegid>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__getegid() {
%1 = load i32, i32* @ENOSYS
%2 = call i32 @__set_errno(i32 %1)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__getegid() {
%1 = load i32, i32* @ENOSYS
%2 = tail call i32 @__set_errno(i32 %1)
ret i32 -1
}
int f_blg_rc2(float a1) { return !(__builtin_islessgreater(a1, 100)); }


x86 assembly (clang, -O0):
<f_blg_rc2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
ucomiss %xmm1,%xmm0
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_blg_rc2>:
xor    %eax,%eax
ucomiss 0xef7(%rip),%xmm0
sete   %al
ret

LLVM IR (-O0):
define i32 @f_blg_rc2(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp one float %3, 1.000000e+02
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f_blg_rc2(float %0) {
%2 = fcmp ueq float %0, 1.000000e+02
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
double sqrt(double);
double Hub(double a, double Om, double OL) {
  return 100.0 * sqrt(Om / a / a / a + (1.0 - Om - OL) / a / a + OL);
}


x86 assembly (clang, -O0):
<Hub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
movsd  0xec5(%rip),%xmm1
subsd  -0x10(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
divsd  -0x8(%rbp),%xmm1
divsd  -0x8(%rbp),%xmm1
addsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xe90(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Hub>:
push   %rax
movsd  0xee7(%rip),%xmm3
subsd  %xmm1,%xmm3
subsd  %xmm2,%xmm3
unpcklpd %xmm3,%xmm1
movapd %xmm0,%xmm3
unpcklpd %xmm0,%xmm3
divpd  %xmm3,%xmm1
divpd  %xmm3,%xmm1
movapd %xmm1,%xmm3
divsd  %xmm0,%xmm3
unpckhpd %xmm1,%xmm1
addsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     115c <Hub+0x4c>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    1165 <Hub+0x55>
movapd %xmm1,%xmm0
call   1030 <sqrt@plt>
mulsd  0xe9b(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Hub(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = load double, double* %4
%9 = fdiv double %7, %8
%10 = load double, double* %4
%11 = fdiv double %9, %10
%12 = load double, double* %4
%13 = fdiv double %11, %12
%14 = load double, double* %5
%15 = fsub double 1.000000e+00, %14
%16 = load double, double* %6
%17 = fsub double %15, %16
%18 = load double, double* %4
%19 = fdiv double %17, %18
%20 = load double, double* %4
%21 = fdiv double %19, %20
%22 = fadd double %13, %21
%23 = load double, double* %6
%24 = fadd double %22, %23
%25 = call double @sqrt(double %24)
%26 = fmul double 1.000000e+02, %25
ret double %26
}

LLVM IR (-O2):
define double @Hub(double %0, double %1, double %2) {
%4 = fsub double 1.000000e+00, %1
%5 = fsub double %4, %2
%6 = insertelement <2 x double> poison, double %1, i64 0
%7 = insertelement <2 x double> %6, double %5, i64 1
%8 = insertelement <2 x double> poison, double %0, i64 0
%9 = shufflevector <2 x double> %8, <2 x double> poison, <2 x i32> zeroinitializer
%10 = fdiv <2 x double> %7, %9
%11 = fdiv <2 x double> %10, %9
%12 = extractelement <2 x double> %11, i64 0
%13 = fdiv double %12, %0
%14 = extractelement <2 x double> %11, i64 1
%15 = fadd double %13, %14
%16 = fadd double %15, %2
%17 = tail call double @sqrt(double %16)
%18 = fmul double %17, 1.000000e+02
ret double %18
}
void of0() {}


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

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

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

LLVM IR (-O2):
define void @of0() {
ret void
}
void flush(void) {
  unsigned long base;
  if ((*(volatile unsigned long *)(0x100a00 + 0x14)) & (1 << 0))
    base = 0x100a00;
  else if ((*(volatile unsigned long *)(0x100a80 + 0x14)) & (1 << 0))
    base = 0x100a80;
  else
    return;
  while ((*(volatile unsigned long *)(base + 0x18)) & (1 << 3))
    ;
}


x86 assembly (clang, -O0):
<flush>:
push   %rbp
mov    %rsp,%rbp
mov    $0x100a14,%eax
mov    (%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1127 <flush+0x27>
movq   $0x100a00,-0x8(%rbp)
jmp    1154 <flush+0x54>
mov    $0x100a94,%eax
mov    (%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     114a <flush+0x4a>
movq   $0x100a80,-0x8(%rbp)
jmp    114f <flush+0x4f>
jmp    1174 <flush+0x74>
jmp    1154 <flush+0x54>
jmp    1159 <flush+0x59>
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
and    $0x8,%rax
cmp    $0x0,%rax
je     1174 <flush+0x74>
jmp    1159 <flush+0x59>
pop    %rbp
ret

x86 assembly (clang, -O2):
<flush>:
mov    0x100a14,%rcx
mov    $0x100a18,%eax
test   $0x1,%cl
jne    1130 <flush+0x30>
mov    $0x100a98,%eax
testq  $0x1,0x100a94
je     1139 <flush+0x39>
cs nopw 0x0(%rax,%rax,1)
nop
testq  $0x8,(%rax)
jne    1130 <flush+0x30>
ret

LLVM IR (-O0):
define void @flush() {
%1 = alloca i64
%2 = load volatile i64, i64* inttoptr (i64 1051156 to i64*)
%3 = and i64 %2, 1
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i64 1051136, i64* %1
br label %13
6: ; preds = %0
%7 = load volatile i64, i64* inttoptr (i64 1051284 to i64*)
%8 = and i64 %7, 1
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
store i64 1051264, i64* %1
br label %12
11: ; preds = %6
br label %22
12: ; preds = %10
br label %13
13: ; preds = %12, %5
br label %14
14: ; preds = %21, %13
%15 = load i64, i64* %1
%16 = add i64 %15, 24
%17 = inttoptr i64 %16 to i64*
%18 = load volatile i64, i64* %17
%19 = and i64 %18, 8
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %14
br label %14
22: ; preds = %11, %14
ret void
}

LLVM IR (-O2):
define void @flush() {
%1 = load volatile i64, i64* inttoptr (i64 1051156 to i64*)
%2 = and i64 %1, 1
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load volatile i64, i64* inttoptr (i64 1051284 to i64*)
%6 = and i64 %5, 1
%7 = icmp eq i64 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %4, %0
%9 = phi i64* [ inttoptr (i64 1051160 to i64*), %0 ], [ inttoptr (i64 1051288 to i64*), %4 ]
br label %10
10: ; preds = %10, %8
%11 = load volatile i64, i64* %9
%12 = and i64 %11, 8
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %10
14: ; preds = %10, %4
ret void
}
void error(s) char *s;
{
  prompt();
  beep();
  printw("%s -- hit any key to continue --", s);
  refresh();
  getch();
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <prompt@plt>
mov    $0x0,%al
call   1040 <beep@plt>
mov    -0x8(%rbp),%rsi
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
mov    $0x0,%al
call   1060 <refresh@plt>
mov    $0x0,%al
call   1070 <getch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <prompt@plt>
xor    %eax,%eax
call   1040 <beep@plt>
lea    0xe97(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printw@plt>
xor    %eax,%eax
call   1060 <refresh@plt>
xor    %eax,%eax
pop    %rbx
jmp    1070 <getch@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"%s -- hit any key to continue --\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @prompt()
%4 = call i32 (...) @beep()
%5 = load i8*, i8** %2
%6 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @printw to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 (...) @refresh()
%8 = call i32 (...) @getch()
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"%s -- hit any key to continue --\00"
define void @error(i8* %0) {
%2 = tail call i32 (...) @prompt()
%3 = tail call i32 (...) @beep()
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @printw to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 (...) @refresh()
%6 = tail call i32 (...) @getch()
ret void
}
int char_is_upper(char c) {
  int ascii = (int)c;
  if (ascii < 91 && ascii > 64) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<char_is_upper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x5b,-0xc(%rbp)
jge    1131 <char_is_upper+0x31>
cmpl   $0x40,-0xc(%rbp)
jle    1131 <char_is_upper+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1138 <char_is_upper+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_is_upper>:
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

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

LLVM IR (-O2):
define i32 @char_is_upper(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ pow(double, float);
float dbm2mw(float in) { return ((float)pow(10.0, in / 10.0)); }


x86 assembly (clang, -O0):
<dbm2mw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed2(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm1
movsd  0xec2(%rip),%xmm0
call   1030 <pow@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbm2mw>:
push   %rax
movaps %xmm0,%xmm1
divss  0xee4(%rip),%xmm1
movsd  0xee4(%rip),%xmm0
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @dbm2mw(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fdiv double %4, 1.000000e+01
%6 = fptrunc double %5 to float
%7 = call i64 @pow(double 1.000000e+01, float %6)
%8 = sitofp i64 %7 to float
ret float %8
}

LLVM IR (-O2):
define float @dbm2mw(float %0) {
%2 = fdiv float %0, 1.000000e+01
%3 = tail call i64 @pow(double 1.000000e+01, float %2)
%4 = sitofp i64 %3 to float
ret float %4
}
/* Variables and functions */
float max(float, float);
float sqrt(float);
float fOpIntersectionChamfer(float a, float b, float r) {
  return max(max(a, b), (a + r + b) * sqrt(0.5f));
}


x86 assembly (clang, -O0):
<fOpIntersectionChamfer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <max@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xe99(%rip),%xmm0
call   1040 <sqrt@plt>
movss  -0x14(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0x10(%rbp),%xmm0
mulss  %xmm2,%xmm1
call   1030 <max@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fOpIntersectionChamfer>:
sub    $0x18,%rsp
movss  %xmm2,0x14(%rsp)
movss  %xmm1,0x10(%rsp)
movss  %xmm0,0xc(%rsp)
call   1030 <max@plt>
movss  0x14(%rsp),%xmm1
addss  0xc(%rsp),%xmm1
addss  0x10(%rsp),%xmm1
mulss  0xebb(%rip),%xmm1
add    $0x18,%rsp
jmp    1030 <max@plt>

LLVM IR (-O0):
define float @fOpIntersectionChamfer(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = call float @max(float %7, float %8)
%10 = load float, float* %4
%11 = load float, float* %6
%12 = fadd float %10, %11
%13 = load float, float* %5
%14 = fadd float %12, %13
%15 = call float @sqrt(float 5.000000e-01)
%16 = fmul float %14, %15
%17 = call float @max(float %9, float %16)
ret float %17
}

LLVM IR (-O2):
define float @fOpIntersectionChamfer(float %0, float %1, float %2) {
%4 = tail call float @max(float %0, float %1)
%5 = fadd float %0, %2
%6 = fadd float %5, %1
%7 = fmul float %6, 0x3FE6A09E60000000
%8 = tail call float @max(float %4, float %7)
ret float %8
}
/* Variables and functions */
void *memcpy(void *, void *, size_t);
void *__aeabi_memcpy(void *dst0, void *src, size_t length) {
  return memcpy(dst0, src, length);
}


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

x86 assembly (clang, -O2):
<__aeabi_memcpy>:
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define i8* @__aeabi_memcpy(i8* returned writeonly %0, i8* nocapture %1, i64 %2) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
ret i8* %0
}
int check_break(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @check_break() {
ret i32 0
}
int main() {
  int a = 4;
  return a;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void specify_bssid(char *target) {
  printf("[!] Specify target bssid for target %s: -b <bssid>\n", target);
  exit(1);
}


x86 assembly (clang, -O0):
<specify_bssid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<specify_bssid>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"[!] Specify target bssid for target %s: -b <bssid>\0A\00"
define void @specify_bssid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [52 x i8] c"[!] Specify target bssid for target %s: -b <bssid>\0A\00"
define void @specify_bssid(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void manos_io_watcher_destroy(void *watcher) { free(watcher); }


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

x86 assembly (clang, -O2):
<manos_io_watcher_destroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @manos_io_watcher_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
double strtod(char *, char **);
void my_strtod2() {
  char *end = NULL;
  double d = strtod("123.456ABC", &end);
  printf("%f\n", d);
  printf("%s\n", end);
}


x86 assembly (clang, -O0):
<my_strtod2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
lea    0xec9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <strtod@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xeba(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strtod2>:
push   %rax
movq   $0x0,(%rsp)
lea    0xec0(%rip),%rdi
mov    %rsp,%rsi
call   1040 <strtod@plt>
lea    0xebc(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    (%rsp),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"123.456ABC\00"
@.str.1 = [4 x i8] c"%f\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define void @my_strtod2() {
%1 = alloca i8*
%2 = alloca double
store i8* null, i8** %1
%3 = call double @strtod(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %1)
store double %3, double* %2
%4 = load double, double* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %4)
%6 = load i8*, i8** %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"123.456ABC\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define void @my_strtod2() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
store i8* null, i8** %1
%3 = call double @strtod(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %3)
%5 = load i8*, i8** %1
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ stdout;
void motion(int x, int y) {
  printf("motion: %d %d\n", x, y);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<motion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<motion>:
push   %rax
mov    %esi,%edx
mov    %edi,%esi
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"motion: %d %d\0A\00"
@stdout = global i32 0
define void @motion(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 i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* @stdout
%9 = call i32 @fflush(i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"motion: %d %d\0A\00"
@stdout = global i32 0
define void @motion(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
ret void
}
void sg_network_destroy_comp(void) {}


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

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

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

LLVM IR (-O2):
define void @sg_network_destroy_comp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ halt();
int /*<<< orphan*/ kprintf(char *, char const *, char const *, int);
void __abort(const char *function, const char *filename, int line) {
  kprintf("Assertion failed in function %s in file %s at line %d!\n", function,
          filename, line);
  halt();
}


x86 assembly (clang, -O0):
<__abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xebb(%rip),%rdi
call   1040 <kprintf@plt>
mov    $0x0,%al
call   1030 <halt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__abort>:
push   %rax
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xed0(%rip),%rdi
call   1040 <kprintf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <halt@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Assertion failed in function %s in file %s at line %d!\0A\00"
define void @__abort(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** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @kprintf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i32 %9)
%11 = call i32 (...) @halt()
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"Assertion failed in function %s in file %s at line %d!\0A\00"
define void @__abort(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @kprintf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %2)
%5 = tail call i32 (...) @halt()
ret void
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_mvwvline_set(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_mvwvline_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_mvwvline_set+0x2a>
jmp    1170 <cmd_mvwvline_set+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_mvwvline_set>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_mvwvline_set+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvwvline_set(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvwvline_set(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, float *, float *);
int main() {
  float r1, r2;
  scanf("%f %f", &r1, &r2);
  printf("%f\n", 1 / (1 / r1 + 1 / r2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
movss  0xeb5(%rip),%xmm1
divss  -0x8(%rbp),%xmm1
movss  0xea8(%rip),%xmm0
divss  -0xc(%rbp),%xmm0
addss  %xmm0,%xmm1
movss  0xe97(%rip),%xmm0
divss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeec(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
movss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
unpcklps %xmm0,%xmm1
movaps 0xeb6(%rip),%xmm0
divps  %xmm1,%xmm0
movaps %xmm0,%xmm1
shufps $0x55,%xmm0,%xmm1
addss  %xmm0,%xmm1
movss  0xeb0(%rip),%xmm0
divss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%f %f\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, float* %2)
%6 = load float, float* %1
%7 = load float, float* %2
%8 = insertelement <2 x float> poison, float %6, i64 0
%9 = insertelement <2 x float> %8, float %7, i64 1
%10 = fdiv <2 x float> <float 1.000000e+00, float 1.000000e+00>, %9
%11 = shufflevector <2 x float> %10, <2 x float> poison, <2 x i32> <i32 1, i32 undef>
%12 = fadd <2 x float> %10, %11
%13 = extractelement <2 x float> %12, i64 0
%14 = fdiv float 1.000000e+00, %13
%15 = fptosi float %14 to i32
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %15)
ret i32 0
}
int WIFI_SET_PA_MODE(int wifiPaMode) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @WIFI_SET_PA_MODE(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ printc(int /*<<< orphan*/ *, int /*<<< orphan*/);
void prints(FILE *fp, char *cp) {
  while (*cp)
    printc(fp, *cp++);
}


x86 assembly (clang, -O0):
<prints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114d <prints+0x3d>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%esi
call   1030 <printc@plt>
jmp    1120 <prints+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prints>:
push   %r14
push   %rbx
push   %rax
mov    (%rsi),%al
test   %al,%al
je     1146 <prints+0x36>
mov    %rsi,%rbx
mov    %rdi,%r14
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <printc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <prints+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @prints(i32* %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %8, %5 ], [ %1, %2 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = sext i8 %6 to i32
%10 = tail call i32 @printc(i32* %0, i32 %9)
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kKBBufferIsEmpty();
char kKBGetKey();
void kRead(char *buffer, int count) {
  char c;
  int i = 0;
  do {
    if (!kKBBufferIsEmpty()) {
      c = kKBGetKey();
      buffer[i++] = c;
    }
  } while (i < count);
}


x86 assembly (clang, -O0):
<kRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <kKBBufferIsEmpty@plt>
cmp    $0x0,%eax
jne    1168 <kRead+0x48>
mov    $0x0,%al
call   1040 <kKBGetKey@plt>
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x14(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
jmp    116d <kRead+0x4d>
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1136 <kRead+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kRead>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
xor    %ebp,%ebp
jmp    1134 <kRead+0x14>
nopl   (%rax)
cmp    %ebx,%ebp
jge    1152 <kRead+0x32>
xor    %eax,%eax
call   1030 <kKBBufferIsEmpty@plt>
test   %eax,%eax
jne    1130 <kRead+0x10>
xor    %eax,%eax
call   1040 <kKBGetKey@plt>
movslq %ebp,%rcx
add    $0x1,%ebp
mov    %al,(%r14,%rcx,1)
jmp    1130 <kRead+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @kRead(i8* nocapture writeonly %0, i32 %1) {
br label %3
3: ; preds = %12, %2
%4 = phi i32 [ 0, %2 ], [ %13, %12 ]
%5 = tail call i32 (...) @kKBBufferIsEmpty()
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = tail call signext i8 (...) @kKBGetKey()
%9 = add nsw i32 %4, 1
%10 = sext i32 %4 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
store i8 %8, i8* %11
br label %12
12: ; preds = %3, %7
%13 = phi i32 [ %4, %3 ], [ %9, %7 ]
%14 = icmp slt i32 %13, %1
br i1 %14, label %3, label %15
15: ; preds = %12
ret void
}
int test_imm_4Duint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x4D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_4Duint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 77
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ assert_false_(char *, int, int);
void test_false_fail() {
  assert_false_("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/"
                "heads/master/test/fail_test.c",
                9, (1));
}


x86 assembly (clang, -O0):
<test_false_fail>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
call   1030 <assert_false_@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_false_fail>:
lea    0xee9(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
jmp    1030 <assert_false_@plt>

LLVM IR (-O0):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/heads/master/test/fail_test.c\00"
define void @test_false_fail() {
%1 = call i32 @assert_false_(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 9, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/heads/master/test/fail_test.c\00"
define void @test_false_fail() {
%1 = tail call i32 @assert_false_(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 9, i32 1)
ret void
}
void lgtd_proto_get_light_state(struct lgtd_client *client,
                                const struct lgtd_proto_target_list *targets) {
  (void)client;
  (void)targets;
}


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

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

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

LLVM IR (-O2):
%struct.lgtd_client = type opaque
%struct.lgtd_proto_target_list = type opaque
define void @lgtd_proto_get_light_state(%struct.lgtd_client* nocapture %0, %struct.lgtd_proto_target_list* nocapture %1) {
ret void
}
oatoi(arg) char *arg;
{
  register c, i;
  i = 0;
  while ((c = *arg++) >= '0' && c <= '7')
    i = (i << 3) + (c - '0');
  if (c != '\0')
    Usage();
  return (i);
}


x86 assembly (clang, -O0):
<oatoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%ecx
mov    %ecx,-0xc(%rbp)
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x11(%rbp)
jl     1150 <oatoi+0x40>
cmpl   $0x37,-0xc(%rbp)
setle  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1160 <oatoi+0x50>
jmp    1176 <oatoi+0x66>
mov    -0x10(%rbp),%eax
shl    $0x3,%eax
mov    -0xc(%rbp),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    1123 <oatoi+0x13>
cmpl   $0x0,-0xc(%rbp)
je     1187 <oatoi+0x77>
mov    $0x0,%al
call   1030 <Usage@plt>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oatoi>:
push   %rbx
mov    (%rdi),%al
mov    %eax,%ecx
and    $0xf8,%cl
xor    %ebx,%ebx
cmp    $0x30,%cl
jne    114a <oatoi+0x3a>
add    $0x1,%rdi
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl %al,%eax
lea    (%rax,%rbx,8),%ebx
add    $0xffffffd0,%ebx
movzbl (%rdi),%eax
mov    %eax,%ecx
and    $0xf8,%cl
add    $0x1,%rdi
cmp    $0x30,%cl
je     1130 <oatoi+0x20>
test   %al,%al
je     1155 <oatoi+0x45>
xor    %eax,%eax
call   1030 <Usage@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @oatoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -8
%4 = icmp eq i8 %3, 48
br i1 %4, label %5, label %17
5: ; preds = %1, %5
%6 = phi i8 [ %14, %5 ], [ %2, %1 ]
%7 = phi i32 [ %13, %5 ], [ 0, %1 ]
%8 = phi i8* [ %10, %5 ], [ %0, %1 ]
%9 = zext i8 %6 to i32
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = shl i32 %7, 3
%12 = add i32 %11, -48
%13 = add i32 %12, %9
%14 = load i8, i8* %10
%15 = and i8 %14, -8
%16 = icmp eq i8 %15, 48
br i1 %16, label %5, label %17
17: ; preds = %5, %1
%18 = phi i32 [ 0, %1 ], [ %13, %5 ]
%19 = phi i8 [ %2, %1 ], [ %14, %5 ]
%20 = icmp eq i8 %19, 0
br i1 %20, label %23, label %21
21: ; preds = %17
%22 = tail call i32 (...) @Usage()
br label %23
23: ; preds = %21, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void processes_prepare_filename(
    char filename[(sizeof("/tmp/") + sizeof("XXXXXX"))]) {
  strcpy(filename, "/tmp/");
  strcat(filename, "XXXXXX");
}


x86 assembly (clang, -O0):
<processes_prepare_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
lea    0xebf(%rip),%rsi
call   1040 <strcat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processes_prepare_filename>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
call   1030 <strcpy@plt>
lea    0xecf(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <strcat@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"/tmp/\00"
@.str.1 = [7 x i8] c"XXXXXX\00"
define void @processes_prepare_filename(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"/tmp/\00"
@.str.1 = [7 x i8] c"XXXXXX\00"
define void @processes_prepare_filename(i8* %0) {
%2 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}