xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/
quickSort_parallel_internal_i_d(int *, double *, int /*<<< orphan*/, int, int);
void quickSort_parallel_i_d(int *key, double *value, int lenArray,
                            int numThreads) {
  int cutoff = 10000;
  if (numThreads > 16)
    numThreads = 16;
#pragma omp parallel num_threads(numThreads)
  {
#pragma omp single nowait
    { quickSort_parallel_internal_i_d(key, value, 0, lenArray - 1, cutoff); }
  }
}


x86 assembly (clang, -O0):
<quickSort_parallel_i_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movl   $0x2710,-0x1c(%rbp)
cmpl   $0x10,-0x18(%rbp)
jle    113e <quickSort_parallel_i_d+0x2e>
movl   $0x10,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
mov    -0x1c(%rbp),%r8d
xor    %edx,%edx
call   1030 <quickSort_parallel_internal_i_d@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quickSort_parallel_i_d>:
lea    -0x1(%rdx),%ecx
xor    %edx,%edx
mov    $0x2710,%r8d
jmp    1030 <quickSort_parallel_internal_i_d@plt>

LLVM IR (-O0):
define void @quickSort_parallel_i_d(i32* %0, double* %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32* %0, i32** %5
store double* %1, double** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 10000, i32* %9
%10 = load i32, i32* %8
%11 = icmp sgt i32 %10, 16
br i1 %11, label %12, label %13
12: ; preds = %4
store i32 16, i32* %8
br label %13
13: ; preds = %12, %4
%14 = load i32*, i32** %5
%15 = load double*, double** %6
%16 = load i32, i32* %7
%17 = sub nsw i32 %16, 1
%18 = load i32, i32* %9
%19 = call i32 @quickSort_parallel_internal_i_d(i32* %14, double* %15, i32 0, i32 %17, i32 %18)
ret void
}

LLVM IR (-O2):
define void @quickSort_parallel_i_d(i32* %0, double* %1, i32 %2, i32 %3) {
%5 = add nsw i32 %2, -1
%6 = tail call i32 @quickSort_parallel_internal_i_d(i32* %0, double* %1, i32 0, i32 %5, i32 10000)
ret void
}
void RTAvlrGCPtrGetRight(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlrGCPtrGetRight() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ has_bug(int /*<<< orphan*/);
void test_has_bug() { has_bug(0); }


x86 assembly (clang, -O0):
<test_has_bug>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <has_bug@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_has_bug>:
xor    %edi,%edi
jmp    1030 <has_bug@plt>

LLVM IR (-O0):
define void @test_has_bug() {
%1 = call i32 @has_bug(i32 0)
ret void
}

LLVM IR (-O2):
define void @test_has_bug() {
%1 = tail call i32 @has_bug(i32 0)
ret void
}
int main(void) {
  int i = 41;
  i++;
  return i;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 42
}
int rt2x00lib_load_eeprom_file(struct rt2x00_dev *rt2x00dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.rt2x00_dev = type opaque
define i32 @rt2x00lib_load_eeprom_file(%struct.rt2x00_dev* nocapture readnone %0) {
ret i32 0
}
void avio_get_str16be() {}


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

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

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

LLVM IR (-O2):
define void @avio_get_str16be() {
ret void
}
/* Variables and functions */
float expf(float);
float DbToAmp(float dB) {
  return (dB > -150.0f ? expf(dB * (0.11512925464970228420089957273422))
                       : 0.0f);
}


x86 assembly (clang, -O0):
<DbToAmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xed6(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    115b <DbToAmp+0x4b>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec4(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <expf@plt>
movss  %xmm0,-0x8(%rbp)
jmp    1168 <DbToAmp+0x58>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1168 <DbToAmp+0x58>
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DbToAmp>:
ucomiss 0xee9(%rip),%xmm0
jbe    112e <DbToAmp+0x1e>
cvtss2sd %xmm0,%xmm0
mulsd  0xee3(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
jmp    1030 <expf@plt>
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @DbToAmp(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float %3, -1.500000e+02
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = fmul double %7, 0x3FBD791C5F888822
%9 = fptrunc double %8 to float
%10 = call float @expf(float %9)
br label %12
11: ; preds = %1
br label %12
12: ; preds = %11, %5
%13 = phi float [ %10, %5 ], [ 0.000000e+00, %11 ]
ret float %13
}

LLVM IR (-O2):
define float @DbToAmp(float %0) {
%2 = fcmp ogt float %0, -1.500000e+02
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = fpext float %0 to double
%5 = fmul double %4, 0x3FBD791C5F888822
%6 = fptrunc double %5 to float
%7 = tail call float @expf(float %6)
br label %8
8: ; preds = %1, %3
%9 = phi float [ %7, %3 ], [ 0.000000e+00, %1 ]
ret float %9
}
/* Variables and functions */
unsigned long long __blcic_u64(unsigned long long);
unsigned long long func_blcic64(unsigned long long X) { return __blcic_u64(X); }


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

x86 assembly (clang, -O2):
<func_blcic64>:
jmp    1030 <__blcic_u64@plt>

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

LLVM IR (-O2):
define i64 @func_blcic64(i64 %0) {
%2 = tail call i64 @__blcic_u64(i64 %0)
ret i64 %2
}
int t(unsigned long *ret) {
  *ret = 7856;
  return 3412;
}


x86 assembly (clang, -O0):
<t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x1eb0,(%rax)
mov    $0xd54,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t>:
movq   $0x1eb0,(%rdi)
mov    $0xd54,%eax
ret

LLVM IR (-O0):
define i32 @t(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
store i64 7856, i64* %3
ret i32 3412
}

LLVM IR (-O2):
define i32 @t(i64* nocapture writeonly %0) {
store i64 7856, i64* %0
ret i32 3412
}
int test_imm_3Buint8_mem(unsigned char *val) {
  return ((*val) & (-0x3B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Buint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffffc5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_3Buint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -59
%7 = icmp ne i32 %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_3Buint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -59
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
unsigned power2(unsigned number, unsigned pow) {
  unsigned x = 1;
  int counter;
  unsigned result;
  unsigned power = 1;
  for (counter = 0; counter < pow; counter++) {
    x <<= 1;
    power *= x;
  }
  result = number * x;
  return result;
}


x86 assembly (clang, -O0):
<power2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    114c <power2+0x4c>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111f <power2+0x1f>
mov    -0x4(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power2>:
test   %esi,%esi
je     1118 <power2+0x18>
lea    -0x1(%rsi),%eax
mov    %esi,%ecx
and    $0x7,%ecx
cmp    $0x7,%eax
jae    1121 <power2+0x21>
mov    $0x1,%eax
jmp    1138 <power2+0x38>
mov    $0x1,%eax
imul   %edi,%eax
ret
and    $0xfffffff8,%esi
mov    $0x1,%eax
nopl   0x0(%rax)
shl    $0x8,%eax
add    $0xfffffff8,%esi
jne    1130 <power2+0x30>
test   %ecx,%ecx
je     1147 <power2+0x47>
nopl   0x0(%rax)
add    %eax,%eax
add    $0xffffffff,%ecx
jne    1140 <power2+0x40>
imul   %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @power2(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %26, label %4
4: ; preds = %2
%5 = add i32 %1, -1
%6 = and i32 %1, 7
%7 = icmp ult i32 %5, 7
br i1 %7, label %16, label %8
8: ; preds = %4
%9 = and i32 %1, -8
br label %10
10: ; preds = %10, %8
%11 = phi i32 [ 1, %8 ], [ %13, %10 ]
%12 = phi i32 [ 0, %8 ], [ %14, %10 ]
%13 = shl i32 %11, 8
%14 = add i32 %12, 8
%15 = icmp eq i32 %14, %9
br i1 %15, label %16, label %10
16: ; preds = %10, %4
%17 = phi i32 [ undef, %4 ], [ %13, %10 ]
%18 = phi i32 [ 1, %4 ], [ %13, %10 ]
%19 = icmp eq i32 %6, 0
br i1 %19, label %26, label %20
20: ; preds = %16, %20
%21 = phi i32 [ %23, %20 ], [ %18, %16 ]
%22 = phi i32 [ %24, %20 ], [ 0, %16 ]
%23 = shl i32 %21, 1
%24 = add i32 %22, 1
%25 = icmp eq i32 %24, %6
br i1 %25, label %26, label %20
26: ; preds = %16, %20, %2
%27 = phi i32 [ 1, %2 ], [ %17, %16 ], [ %23, %20 ]
%28 = mul i32 %27, %0
ret i32 %28
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ exit_prepare();
int /*<<< orphan*/ fwrite(char const *, int, int /*<<< orphan*/,
                          int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strlen(char const *);
void exit_str(const char *string, int returnCode) {
  exit_prepare();
  fwrite(string, 1, strlen(string), stderr);
  exit(returnCode);
}


x86 assembly (clang, -O0):
<exit_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1040 <exit_prepare@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
mov    0x2e6c(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
call   1060 <fwrite@plt>
mov    -0xc(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<exit_str>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <exit_prepare@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    0x2e82(%rip),%rcx
mov    (%rcx),%ecx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %eax,%edx
call   1060 <fwrite@plt>
mov    %ebp,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @exit_str(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (...) @exit_prepare()
%6 = load i8*, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = load i32, i32* @stderr
%10 = call i32 @fwrite(i8* %6, i32 1, i32 %8, i32 %9)
%11 = load i32, i32* %4
%12 = call i32 @exit(i32 %11)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
define void @exit_str(i8* %0, i32 %1) {
%3 = tail call i32 (...) @exit_prepare()
%4 = tail call i32 @strlen(i8* %0)
%5 = load i32, i32* @stderr
%6 = tail call i32 @fwrite(i8* %0, i32 1, i32 %4, i32 %5)
%7 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ concurritStartTest();
int main0(int, char **);
int __main__(int argc, char *argv[]) {
  concurritStartTest();
  int ret = main0(argc, argv);
  return ret;
}


x86 assembly (clang, -O0):
<__main__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <concurritStartTest@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <main0@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__main__>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <concurritStartTest@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <main0@plt>

LLVM IR (-O0):
define i32 @__main__(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = call i32 (...) @concurritStartTest()
%7 = load i32, i32* %3
%8 = load i8**, i8*** %4
%9 = call i32 @main0(i32 %7, i8** %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @__main__(i32 %0, i8** %1) {
%3 = tail call i32 (...) @concurritStartTest()
%4 = tail call i32 @main0(i32 %0, i8** %1)
ret i32 %4
}
/* Type definitions */
struct nn_device_recipe {
  int dummy;
};

/* Variables and functions */
int nn_device_entry(struct nn_device_recipe *, int, int, int);
int nn_custom_device(struct nn_device_recipe *device, int s1, int s2,
                     int flags) {
  return nn_device_entry(device, s1, s2, flags);
}


x86 assembly (clang, -O0):
<nn_custom_device>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <nn_device_entry@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nn_custom_device>:
jmp    1030 <nn_device_entry@plt>

LLVM IR (-O0):
%struct.nn_device_recipe = type { i32 }
define i32 @nn_custom_device(%struct.nn_device_recipe* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct.nn_device_recipe*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store %struct.nn_device_recipe* %0, %struct.nn_device_recipe** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load %struct.nn_device_recipe*, %struct.nn_device_recipe** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @nn_device_entry(%struct.nn_device_recipe* %9, i32 %10, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.nn_device_recipe = type { i32 }
define i32 @nn_custom_device(%struct.nn_device_recipe* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @nn_device_entry(%struct.nn_device_recipe* %0, i32 %1, i32 %2, i32 %3)
ret i32 %5
}
void toe_failover(struct ifnet *bond_ifp, struct ifnet *fail_ifp, int event) {}


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

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

LLVM IR (-O0):
%struct.ifnet = type opaque
define void @toe_failover(%struct.ifnet* %0, %struct.ifnet* %1, i32 %2) {
%4 = alloca %struct.ifnet*
%5 = alloca %struct.ifnet*
%6 = alloca i32
store %struct.ifnet* %0, %struct.ifnet** %4
store %struct.ifnet* %1, %struct.ifnet** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.ifnet = type opaque
define void @toe_failover(%struct.ifnet* nocapture %0, %struct.ifnet* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(char);
test9(char *bar) { foo(*bar); }


x86 assembly (clang, -O0):
<test9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <foo@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test9>:
movsbl (%rdi),%edi
jmp    1030 <foo@plt>

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

LLVM IR (-O2):
define i32 @test9(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @foo(i8 signext %2)
ret i32 undef
}
int f2() { ; }


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

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

LLVM IR (-O0):
define i32 @f2() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @f2() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hide_cur(void) { printf("\033[?25l"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"\1B[?25l\00"
define void @hide_cur() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"\1B[?25l\00"
define void @hide_cur() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
int cmp_int_descend(const void *a, const void *b) {
  return (*(int *)b - *(int *)a);
}


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

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

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

LLVM IR (-O2):
define i32 @cmp_int_descend(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
scalar_t__ hex_convert(int const);
uint8_t hex_to_u8(const uint8_t hex[2]) {
  uint8_t v = 0;
  v |= ((uint8_t)hex_convert(hex[1]) << 0);
  v |= ((uint8_t)hex_convert(hex[0]) << 4);
  return (v);
}


x86 assembly (clang, -O0):
<hex_to_u8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
call   1030 <hex_convert@plt>
shl    $0x0,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <hex_convert@plt>
shl    $0x4,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_to_u8>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x4(%rdi),%edi
call   1030 <hex_convert@plt>
mov    %rax,%r14
mov    (%rbx),%edi
call   1030 <hex_convert@plt>
shl    $0x4,%eax
or     %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @hex_to_u8(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 1
%6 = load i32, i32* %5
%7 = call i64 @hex_convert(i32 %6)
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 0
%10 = load i32, i32* %3
%11 = or i32 %10, %9
store i32 %11, i32* %3
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 0
%14 = load i32, i32* %13
%15 = call i64 @hex_convert(i32 %14)
%16 = trunc i64 %15 to i32
%17 = shl i32 %16, 4
%18 = load i32, i32* %3
%19 = or i32 %18, %17
store i32 %19, i32* %3
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @hex_to_u8(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = tail call i64 @hex_convert(i32 %3)
%5 = trunc i64 %4 to i32
%6 = load i32, i32* %0
%7 = tail call i64 @hex_convert(i32 %6)
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 4
%10 = or i32 %9, %5
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int rango(int num) {
  if (num >= 3 && num <= 20)
    printf("1\n");
  else
    printf("0\n");
  return 0;
}


x86 assembly (clang, -O0):
<rango>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jl     1140 <rango+0x30>
cmpl   $0x14,-0x4(%rbp)
jg     1140 <rango+0x30>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
jmp    114c <rango+0x3c>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rango>:
push   %rax
add    $0xfffffffd,%edi
cmp    $0x12,%edi
lea    0xee4(%rip),%rax
lea    0xedb(%rip),%rdi
cmovb  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [2 x i8] c"0\00"
@str.2 = [2 x i8] c"1\00"
define i32 @rango(i32 %0) {
%2 = add i32 %0, -3
%3 = icmp ult i32 %2, 18
%4 = select i1 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0)
%5 = tail call i32 @puts(i8* dereferenceable(1) %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xcc() {
  Assert_real((isascii(204) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              1025, ("isascii should be 0 for 0xcc"));
}


x86 assembly (clang, -O0):
<t_isascii_0xcc>:
push   %rbp
mov    %rsp,%rbp
mov    $0xcc,%edi
call   1030 <isascii@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x401,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0xcc>:
push   %rax
mov    $0xcc,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x401,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xcc\00"
define void @t_isascii_0xcc() {
%1 = call i64 @isascii(i32 204)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1025, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xcc\00"
define void @t_isascii_0xcc() {
%1 = tail call i64 @isascii(i32 204)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1025, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strlen(char *);
int /*<<< orphan*/ ungetch(char);
void ungets(char *s) {
  int len;
  len = strlen(s);
  while (len > 0)
    ungetch(s[--len]);
}


x86 assembly (clang, -O0):
<ungets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1160 <ungets+0x40>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <ungetch@plt>
jmp    1138 <ungets+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ungets>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    1157 <ungets+0x37>
mov    %eax,%ebx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
lea    -0x2(%rbx),%eax
movsbl (%r14,%rax,1),%edi
call   1040 <ungetch@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1140 <ungets+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @ungets(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %14
4: ; preds = %1
%5 = zext i32 %2 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %8, %6 ]
%8 = add nsw i64 %7, -1
%9 = and i64 %8, 4294967295
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = tail call i32 @ungetch(i8 signext %11)
%13 = icmp ugt i64 %7, 1
br i1 %13, label %6, label %14
14: ; preds = %6, %1
ret void
}
/* Variables and functions */
int fac(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int num;
  printf("Enter a number: ");
  scanf("%d", &num);
  printf("Factorial of %d is: %d", num, fac(num));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"Factorial of %d is: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @fac(i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"Factorial of %d is: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @fac(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
/* Variables and functions */
int write_block(int, int, int /*<<< orphan*/, int /*<<< orphan*/,
                int /*<<< orphan*/, int /*<<< orphan*/);
int setAnlogWriteResolution(int bits) {
  return write_block(32, bits, 0, 0, 0, 0);
}


x86 assembly (clang, -O0):
<setAnlogWriteResolution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x20,%edi
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <write_block@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setAnlogWriteResolution>:
mov    %edi,%esi
mov    $0x20,%edi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <write_block@plt>

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

LLVM IR (-O2):
define i32 @setAnlogWriteResolution(i32 %0) {
%2 = tail call i32 @write_block(i32 32, i32 %0, i32 0, i32 0, i32 0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int syscall(int);
int main(void) {
  int syscallnum = 285;
  printf("Process ID: %d\n", syscall(syscallnum));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Process ID: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 285, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @syscall(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Process ID: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @syscall(i32 285)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
float f(int a, int b) { return a - b % b; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    %edx,%eax
cvtsi2ss %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
cvtsi2ss %edi,%xmm0
ret

LLVM IR (-O0):
define float @f(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 = load i32, i32* %4
%8 = srem i32 %6, %7
%9 = sub nsw i32 %5, %8
%10 = sitofp i32 %9 to float
ret float %10
}

LLVM IR (-O2):
define float @f(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to float
ret float %3
}
int atoin(char s[]) {
  int temp = 0;
  for (int i = 0; s[i] != '\0'; i++) {
    temp = (temp * 10) + (s[i] - '0');
  }
  return temp;
}


x86 assembly (clang, -O0):
<atoin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1151 <atoin+0x51>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <atoin+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoin>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <atoin+0x28>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <atoin+0x10>
ret
xor    %eax,%eax
ret

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

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


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

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

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

LLVM IR (-O2):
define void @EVP_PKEY_set1_RSA() {
ret void
}
/* Type definitions */
typedef int fexcept_t;

/* Variables and functions */
int /*<<< orphan*/ fegetenv(int *);
int /*<<< orphan*/ fesetenv(int *);
int feclearexcept(int __excepts) {
  fexcept_t __fpscr;
  fegetenv(&__fpscr);
  __fpscr &= ~__excepts;
  fesetenv(&__fpscr);
  return 0;
}


x86 assembly (clang, -O0):
<feclearexcept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <fegetenv@plt>
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <fesetenv@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<feclearexcept>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <fegetenv@plt>
not    %ebx
and    %ebx,0x4(%rsp)
mov    %r14,%rdi
call   1030 <fesetenv@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @feclearexcept(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @fegetenv(i32* %3)
%5 = load i32, i32* %2
%6 = xor i32 %5, -1
%7 = load i32, i32* %3
%8 = and i32 %7, %6
store i32 %8, i32* %3
%9 = call i32 @fesetenv(i32* %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @feclearexcept(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @fegetenv(i32* %2)
%5 = xor i32 %0, -1
%6 = load i32, i32* %2
%7 = and i32 %6, %5
store i32 %7, i32* %2
%8 = call i32 @fesetenv(i32* %2)
ret i32 0
}
void __sulong_fp80_div(long double *out, long double *x, long double *y) {
  *out = *x / *y;
}


x86 assembly (clang, -O0):
<__sulong_fp80_div>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
fldt   (%rax)
mov    -0x18(%rbp),%rax
fldt   (%rax)
fdivrp %st,%st(1)
mov    -0x8(%rbp),%rax
fstpt  (%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sulong_fp80_div>:
fldt   (%rsi)
fldt   (%rdx)
fdivrp %st,%st(1)
fstpt  (%rdi)
ret

LLVM IR (-O0):
define void @__sulong_fp80_div(x86_fp80* %0, x86_fp80* %1, x86_fp80* %2) {
%4 = alloca x86_fp80*
%5 = alloca x86_fp80*
%6 = alloca x86_fp80*
store x86_fp80* %0, x86_fp80** %4
store x86_fp80* %1, x86_fp80** %5
store x86_fp80* %2, x86_fp80** %6
%7 = load x86_fp80*, x86_fp80** %5
%8 = load x86_fp80, x86_fp80* %7
%9 = load x86_fp80*, x86_fp80** %6
%10 = load x86_fp80, x86_fp80* %9
%11 = fdiv x86_fp80 %8, %10
%12 = load x86_fp80*, x86_fp80** %4
store x86_fp80 %11, x86_fp80* %12
ret void
}

LLVM IR (-O2):
define void @__sulong_fp80_div(x86_fp80* nocapture writeonly %0, x86_fp80* nocapture %1, x86_fp80* nocapture %2) {
%4 = load x86_fp80, x86_fp80* %1
%5 = load x86_fp80, x86_fp80* %2
%6 = fdiv x86_fp80 %4, %5
store x86_fp80 %6, x86_fp80* %0
ret void
}
void enable_sdcc_clock(struct mmc_host *mmc) {}


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

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

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

LLVM IR (-O2):
%struct.mmc_host = type opaque
define void @enable_sdcc_clock(%struct.mmc_host* nocapture %0) {
ret void
}
/* Variables and functions */
unsigned int __blcic_u32(unsigned int);
unsigned int test__blcic_u32(unsigned int a) { return __blcic_u32(a); }


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

x86 assembly (clang, -O2):
<test__blcic_u32>:
jmp    1030 <__blcic_u32@plt>

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

LLVM IR (-O2):
define i32 @test__blcic_u32(i32 %0) {
%2 = tail call i32 @__blcic_u32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Salut Monde!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%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
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [13 x i8] c"Salut Monde!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void warn_no_adios(void) {
  fprintf(stderr,
          "Error: ADIOS enabled without ADIOS Support. "
          "To enable ADIOS support, reconfigure with --with-adios flag.\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [106 x i8] c"Error: ADIOS enabled without ADIOS Support. To enable ADIOS support, reconfigure with --with-adios flag.\0A\00"
define void @warn_no_adios() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [106 x i8] c"Error: ADIOS enabled without ADIOS Support. To enable ADIOS support, reconfigure with --with-adios flag.\0A\00"
define void @warn_no_adios() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct xdg_surface {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
void *wl_proxy_get_user_data(struct wl_proxy *);
void *xdg_surface_get_user_data(struct xdg_surface *xdg_surface) {
  return wl_proxy_get_user_data((struct wl_proxy *)xdg_surface);
}


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

x86 assembly (clang, -O2):
<xdg_surface_get_user_data>:
jmp    1030 <wl_proxy_get_user_data@plt>

LLVM IR (-O0):
%struct.xdg_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define i8* @xdg_surface_get_user_data(%struct.xdg_surface* %0) {
%2 = alloca %struct.xdg_surface*
store %struct.xdg_surface* %0, %struct.xdg_surface** %2
%3 = load %struct.xdg_surface*, %struct.xdg_surface** %2
%4 = bitcast %struct.xdg_surface* %3 to %struct.wl_proxy*
%5 = call i8* @wl_proxy_get_user_data(%struct.wl_proxy* %4)
ret i8* %5
}

LLVM IR (-O2):
%struct.xdg_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define i8* @xdg_surface_get_user_data(%struct.xdg_surface* %0) {
%2 = bitcast %struct.xdg_surface* %0 to %struct.wl_proxy*
%3 = tail call i8* @wl_proxy_get_user_data(%struct.wl_proxy* %2)
ret i8* %3
}
/* Variables and functions */
int d(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", d(5));
  printf("%d\n", d(10));
  printf("%d\n", d(20));
  int p = d(25);
  printf("%d\n", p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1030 <d@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <d@plt>
mov    %eax,%esi
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
mov    $0x14,%edi
call   1030 <d@plt>
mov    %eax,%esi
lea    0xe8e(%rip),%rdi
call   1040 <printf@plt>
mov    $0x19,%edi
call   1030 <d@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe72(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x5,%edi
call   1030 <d@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <d@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x14,%edi
call   1030 <d@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x19,%edi
call   1030 <d@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @d(i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @d(i32 10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @d(i32 20)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 @d(i32 25)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
int f13(int a, int b) {
  a += b;
  return a == 3 || a == 0;
}


x86 assembly (clang, -O0):
<f13>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x3,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     112c <f13+0x2c>
cmpl   $0x0,-0x4(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f13>:
add    %esi,%edi
cmp    $0x3,%edi
sete   %al
test   %edi,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @f13(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = add nsw i32 %6, %5
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 3
br i1 %9, label %13, label %10
10: ; preds = %2
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 0
br label %13
13: ; preds = %10, %2
%14 = phi i1 [ true, %2 ], [ %12, %10 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @f13(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = icmp eq i32 %3, 3
%5 = icmp eq i32 %3, 0
%6 = or i1 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}