xunge/DecIR huggingface dataset:
int hodie_isleap(int year) {
  if (year % 400 == 0)
    return 1;
  if (year % 100 == 0)
    return 0;
  if (year % 4 == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<hodie_isleap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1127 <hodie_isleap+0x27>
movl   $0x1,-0x4(%rbp)
jmp    116e <hodie_isleap+0x6e>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1147 <hodie_isleap+0x47>
movl   $0x0,-0x4(%rbp)
jmp    116e <hodie_isleap+0x6e>
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1167 <hodie_isleap+0x67>
movl   $0x1,-0x4(%rbp)
jmp    116e <hodie_isleap+0x6e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hodie_isleap>:
imul   $0xc28f5c29,%edi,%eax
add    $0x51eb850,%eax
mov    %eax,%ecx
ror    $0x4,%ecx
cmp    $0xa3d70b,%ecx
jb     112c <hodie_isleap+0x2c>
ror    $0x2,%eax
cmp    $0x28f5c29,%eax
jb     1132 <hodie_isleap+0x32>
xor    %eax,%eax
test   $0x3,%dil
sete   %al
ret
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hodie_isleap(i32 %0) {
%2 = srem i32 %0, 400
%3 = icmp eq i32 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = srem i32 %0, 100
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = and i32 %0, 3
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 1, %1 ], [ 0, %4 ], [ %10, %7 ]
ret i32 %12
}
void cc3000_interrupt_disable(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @cc3000_interrupt_disable() {
ret void
}
/* Type definitions */
struct test {
  int dummy;
};

/* Variables and functions */
void priv_vm_munlock_cleanup(int asroot, int injail, struct test *test) {}


x86 assembly (clang, -O0):
<priv_vm_munlock_cleanup>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.test = type { i32 }
define void @priv_vm_munlock_cleanup(i32 %0, i32 %1, %struct.test* nocapture %2) {
ret void
}
/* Variables and functions */
scalar_t__ param_geti(char *);
int /*<<< orphan*/ write_port(char *);
void width_src(void) {
  unsigned char msg[10];
  msg[0] = '\x1A';
  msg[1] = (unsigned char)param_geti("width_src");
  write_port((char *)msg);
}


x86 assembly (clang, -O0):
<width_src>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x1a,-0xa(%rbp)
lea    0xecd(%rip),%rdi
call   1040 <param_geti@plt>
mov    %al,-0x9(%rbp)
lea    -0xa(%rbp),%rdi
call   1030 <write_port@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<width_src>:
sub    $0x18,%rsp
movb   $0x1a,0xe(%rsp)
lea    0xed0(%rip),%rdi
call   1040 <param_geti@plt>
mov    %al,0xf(%rsp)
lea    0xe(%rsp),%rdi
call   1030 <write_port@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"width_src\00"
define void @width_src() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
store i8 26, i8* %2
%3 = call i64 @param_geti(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = trunc i64 %3 to i8
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 1
store i8 %4, i8* %5
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%7 = call i32 @write_port(i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"width_src\00"
define void @width_src() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
store i8 26, i8* %2
%3 = tail call i64 @param_geti(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = trunc i64 %3 to i8
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 1
store i8 %4, i8* %5
%6 = call i32 @write_port(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ gen_comment();
int /*<<< orphan*/ newline();
int /*<<< orphan*/ output_string(char *);
void multidef(char *symbol_name) {
  error("already defined");
  gen_comment();
  output_string(symbol_name);
  newline();
}


x86 assembly (clang, -O0):
<multidef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
call   1060 <error@plt>
mov    $0x0,%al
call   1040 <gen_comment@plt>
mov    -0x8(%rbp),%rdi
call   1050 <output_string@plt>
mov    $0x0,%al
call   1030 <newline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multidef>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rdi
call   1060 <error@plt>
xor    %eax,%eax
call   1040 <gen_comment@plt>
mov    %rbx,%rdi
call   1050 <output_string@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <newline@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"already defined\00"
define void @multidef(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @error(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @gen_comment()
%5 = load i8*, i8** %2
%6 = call i32 @output_string(i8* %5)
%7 = call i32 (...) @newline()
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"already defined\00"
define void @multidef(i8* %0) {
%2 = tail call i32 @error(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @gen_comment()
%4 = tail call i32 @output_string(i8* %0)
%5 = tail call i32 (...) @newline()
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ recover_hi();
int recover_lo(int /*<<< orphan*/);
int main() {
  uint8_t keycand = recover_lo(recover_hi());
  printf("The key candidates are %02X and %02X\n", keycand, keycand ^ 0x80);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <recover_hi@plt>
mov    %eax,%edi
call   1040 <recover_lo@plt>
mov    %eax,%edx
xor    $0x80,%edx
lea    0xeb2(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"The key candidates are %02X and %02X\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @recover_hi()
%4 = call i32 @recover_lo(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = xor i32 %6, 128
%8 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"The key candidates are %02X and %02X\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @recover_hi()
%2 = tail call i32 @recover_lo(i32 %1)
%3 = xor i32 %2, 128
%4 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
ret i32 0
}
int hamming_distance(int x, int y) {
  int n = x ^ y;
  int result = 0;
  for (; n != 0; ++result) {
    n &= (n - 1);
  }
  return result;
}


x86 assembly (clang, -O0):
<hamming_distance>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     113e <hamming_distance+0x3e>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
and    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111a <hamming_distance+0x1a>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hamming_distance>:
xor    %eax,%eax
xor    %esi,%edi
je     111c <hamming_distance+0x1c>
cs nopw 0x0(%rax,%rax,1)
lea    -0x1(%rdi),%ecx
add    $0x1,%eax
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <hamming_distance+0x10>
ret

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

LLVM IR (-O2):
define i32 @hamming_distance(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %10, %5 ], [ 0, %2 ]
%7 = phi i32 [ %9, %5 ], [ %3, %2 ]
%8 = add nsw i32 %7, -1
%9 = and i32 %8, %7
%10 = add nuw nsw i32 %6, 1
%11 = icmp eq i32 %9, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
%13 = phi i32 [ 0, %2 ], [ %10, %5 ]
ret i32 %13
}
/* Type definitions */
struct hv_rtas_call {
  int dummy;
};

/* Variables and functions */
unsigned long hv_generic(int, unsigned long);
unsigned long h_rtas(struct hv_rtas_call *rtas_buf) {
  return hv_generic((0xf000 + 0x0), (unsigned long)rtas_buf);
}


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

x86 assembly (clang, -O2):
<h_rtas>:
mov    %rdi,%rsi
mov    $0xf000,%edi
jmp    1030 <hv_generic@plt>

LLVM IR (-O0):
%struct.hv_rtas_call = type { i32 }
define i64 @h_rtas(%struct.hv_rtas_call* %0) {
%2 = alloca %struct.hv_rtas_call*
store %struct.hv_rtas_call* %0, %struct.hv_rtas_call** %2
%3 = load %struct.hv_rtas_call*, %struct.hv_rtas_call** %2
%4 = ptrtoint %struct.hv_rtas_call* %3 to i64
%5 = call i64 @hv_generic(i32 61440, i64 %4)
ret i64 %5
}

LLVM IR (-O2):
%struct.hv_rtas_call = type { i32 }
define i64 @h_rtas(%struct.hv_rtas_call* %0) {
%2 = ptrtoint %struct.hv_rtas_call* %0 to i64
%3 = tail call i64 @hv_generic(i32 61440, i64 %2)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void xexit(int code) { exit(code); }


x86 assembly (clang, -O0):
<xexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<xexit>:
push   %rax
call   1030 <exit@plt>

LLVM IR (-O0):
define void @xexit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
define void @xexit(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ e_asl();
int /*<<< orphan*/ e_writeback();
int /*<<< orphan*/ e_zp();
void e_asl_zp() {
  e_zp();
  e_asl();
  e_writeback();
}


x86 assembly (clang, -O0):
<e_asl_zp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <e_zp@plt>
mov    $0x0,%al
call   1050 <e_asl@plt>
mov    $0x0,%al
call   1030 <e_writeback@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_asl_zp>:
push   %rax
xor    %eax,%eax
call   1040 <e_zp@plt>
xor    %eax,%eax
call   1050 <e_asl@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <e_writeback@plt>

LLVM IR (-O0):
define void @e_asl_zp() {
%1 = call i32 (...) @e_zp()
%2 = call i32 (...) @e_asl()
%3 = call i32 (...) @e_writeback()
ret void
}

LLVM IR (-O2):
define void @e_asl_zp() {
%1 = tail call i32 (...) @e_zp()
%2 = tail call i32 (...) @e_asl()
%3 = tail call i32 (...) @e_writeback()
ret void
}
int isPrime(long long number) {
  int i;
  if (number % 2 == 0) {
    return 0;
  }
  for (i = 3; i <= number - 1; ++i) {
    if (number % i == 0) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<isPrime>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    112c <isPrime+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1185 <isPrime+0x85>
movl   $0x3,-0x14(%rbp)
movslq -0x14(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
cmp    %rcx,%rax
jg     117e <isPrime+0x7e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    116b <isPrime+0x6b>
movl   $0x0,-0x4(%rbp)
jmp    1185 <isPrime+0x85>
jmp    1170 <isPrime+0x70>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1133 <isPrime+0x33>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPrime>:
xor    %ecx,%ecx
test   $0x1,%dil
je     1154 <isPrime+0x54>
mov    $0x1,%ecx
cmp    $0x4,%rdi
jl     1154 <isPrime+0x54>
mov    $0x3,%esi
nopl   0x0(%rax,%rax,1)
mov    %rdi,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     1140 <isPrime+0x40>
mov    %rdi,%rax
cqto
idiv   %rsi
test   %rdx,%rdx
jne    114b <isPrime+0x4b>
jmp    1157 <isPrime+0x57>
nopl   0x0(%rax,%rax,1)
mov    %edi,%eax
xor    %edx,%edx
div    %esi
test   %rdx,%rdx
je     1157 <isPrime+0x57>
add    $0x1,%rsi
cmp    %rsi,%rdi
jne    1120 <isPrime+0x20>
mov    %ecx,%eax
ret
xor    %ecx,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @isPrime(i64 %0) {
%2 = and i64 %0, 1
%3 = icmp eq i64 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1
%5 = icmp sgt i64 %0, 3
br i1 %5, label %8, label %13
6: ; preds = %8
%7 = icmp eq i64 %12, %0
br i1 %7, label %13, label %8
8: ; preds = %4, %6
%9 = phi i64 [ %12, %6 ], [ 3, %4 ]
%10 = srem i64 %0, %9
%11 = icmp eq i64 %10, 0
%12 = add nuw nsw i64 %9, 1
br i1 %11, label %13, label %6
13: ; preds = %8, %6, %4, %1
%14 = phi i32 [ 0, %1 ], [ 1, %4 ], [ 0, %8 ], [ 1, %6 ]
ret i32 %14
}
int az_ioctl(int cmd, void *arg) {
  int x;
  int y;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @az_ioctl(i32 %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ timediff();
int /*<<< orphan*/ timeformats();
int main(void) {
  timeformats();
  timediff();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @timeformats()
%2 = tail call i32 (...) @timediff()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ taint_source(char *, char *);
int testParamTaint(char *buf) { taint_source(buf, buf); }


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

x86 assembly (clang, -O2):
<testParamTaint>:
mov    %rdi,%rsi
jmp    1030 <taint_source@plt>

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

LLVM IR (-O2):
define i32 @testParamTaint(i8* %0) {
%2 = tail call i32 @taint_source(i8* %0, i8* %0)
ret i32 undef
}
/* Variables and functions */
char *strchr(const char *s, int c) {
  while (*s != '\0') {
    if (((unsigned char)*s) == ((unsigned char)c)) {
      return (char *)s;
    }
    s++;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114e <strchr+0x4e>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x14(%rbp),%ecx
movzbl %cl,%ecx
cmp    %ecx,%eax
jne    113d <strchr+0x3d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1156 <strchr+0x56>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110b <strchr+0xb>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
mov    (%rdi),%cl
test   %cl,%cl
je     1121 <strchr+0x21>
mov    %rdi,%rax
nopl   0x0(%rax)
cmp    %sil,%cl
je     1123 <strchr+0x23>
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strchr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %2, %10
%7 = phi i8 [ %12, %10 ], [ %4, %2 ]
%8 = phi i8* [ %11, %10 ], [ %0, %2 ]
%9 = icmp eq i8 %7, %3
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %10, %2
%15 = phi i8* [ null, %2 ], [ null, %10 ], [ %8, %6 ]
ret i8* %15
}
/* Variables and functions */
int /*<<< orphan*/ BNCIO(int);
long int BNCDot() {
  long int stat = 99;
  BNCIO(16);
  return (stat);
}


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

x86 assembly (clang, -O2):
<BNCDot>:
push   %rax
mov    $0x10,%edi
call   1030 <BNCIO@plt>
mov    $0x63,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @BNCDot() {
%1 = alloca i64
store i64 99, i64* %1
%2 = call i32 @BNCIO(i32 16)
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @BNCDot() {
%1 = tail call i32 @BNCIO(i32 16)
ret i64 99
}
void v_scalf(float *A, double *B, double *C) {
  int i;
  for (i = 0; i < 3; i++) {
    C[i] = *A * B[i];
  }
}


x86 assembly (clang, -O0):
<v_scalf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    1155 <v_scalf+0x55>
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <v_scalf+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<v_scalf>:
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  (%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rdx)
movsd  0x8(%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rdx)
mulsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rdx)
ret

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

LLVM IR (-O2):
define void @v_scalf(float* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load float, float* %0
%5 = fpext float %4 to double
%6 = load double, double* %1
%7 = fmul double %6, %5
store double %7, double* %2
%8 = getelementptr inbounds double, double* %1, i64 1
%9 = load double, double* %8
%10 = fmul double %9, %5
%11 = getelementptr inbounds double, double* %2, i64 1
store double %10, double* %11
%12 = getelementptr inbounds double, double* %1, i64 2
%13 = load double, double* %12
%14 = fmul double %13, %5
%15 = getelementptr inbounds double, double* %2, i64 2
store double %14, double* %15
ret void
}
int sysfs_create_group(struct kobject *kobj,
                       const struct attribute_group *grp) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.kobject = type opaque
%struct.attribute_group = type opaque
define i32 @sysfs_create_group(%struct.kobject* %0, %struct.attribute_group* %1) {
%3 = alloca %struct.kobject*
%4 = alloca %struct.attribute_group*
store %struct.kobject* %0, %struct.kobject** %3
store %struct.attribute_group* %1, %struct.attribute_group** %4
ret i32 0
}

LLVM IR (-O2):
%struct.kobject = type opaque
%struct.attribute_group = type opaque
define i32 @sysfs_create_group(%struct.kobject* nocapture readnone %0, %struct.attribute_group* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int bit_snoob(int);
int bit_next_biggest_number_same_num_ones(int n) {
  if (n <= 0)
    return 0;
  else {
    int ret = bit_snoob(n);
    if (ret < 0 || ret < n)
      return 0;
    else
      return ret;
  }
}


x86 assembly (clang, -O0):
<bit_next_biggest_number_same_num_ones>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1131 <bit_next_biggest_number_same_num_ones+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1164 <bit_next_biggest_number_same_num_ones+0x54>
mov    -0x8(%rbp),%edi
call   1030 <bit_snoob@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1152 <bit_next_biggest_number_same_num_ones+0x42>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115e <bit_next_biggest_number_same_num_ones+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    1164 <bit_next_biggest_number_same_num_ones+0x54>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_next_biggest_number_same_num_ones>:
test   %edi,%edi
jle    112c <bit_next_biggest_number_same_num_ones+0x1c>
push   %rbx
mov    %edi,%ebx
call   1030 <bit_snoob@plt>
mov    %eax,%ecx
xor    %edx,%edx
cmp    %ebx,%eax
cmovl  %edx,%eax
test   %ecx,%ecx
cmovs  %edx,%eax
pop    %rbx
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @bit_next_biggest_number_same_num_ones(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i32 @bit_snoob(i32 %0)
%5 = icmp slt i32 %4, 0
%6 = icmp slt i32 %4, %0
%7 = or i1 %5, %6
%8 = select i1 %7, i32 0, i32 %4
br label %9
9: ; preds = %1, %3
%10 = phi i32 [ %8, %3 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ box_double(double);
int /*<<< orphan*/ dpop();
double untag_float_fast(int /*<<< orphan*/);
void primitive_float_multiply(void) {
  double y = untag_float_fast(dpop());
  double x = untag_float_fast(dpop());
  ;
  box_double(x * y);
}


x86 assembly (clang, -O0):
<primitive_float_multiply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <untag_float_fast@plt>
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <untag_float_fast@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1050 <box_double@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_float_multiply>:
push   %rax
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <untag_float_fast@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <untag_float_fast@plt>
mulsd  (%rsp),%xmm0
pop    %rax
jmp    1050 <box_double@plt>

LLVM IR (-O0):
define void @primitive_float_multiply() {
%1 = alloca double
%2 = alloca double
%3 = call i32 (...) @dpop()
%4 = call double @untag_float_fast(i32 %3)
store double %4, double* %1
%5 = call i32 (...) @dpop()
%6 = call double @untag_float_fast(i32 %5)
store double %6, double* %2
%7 = load double, double* %2
%8 = load double, double* %1
%9 = fmul double %7, %8
%10 = call i32 @box_double(double %9)
ret void
}

LLVM IR (-O2):
define void @primitive_float_multiply() {
%1 = tail call i32 (...) @dpop()
%2 = tail call double @untag_float_fast(i32 %1)
%3 = tail call i32 (...) @dpop()
%4 = tail call double @untag_float_fast(i32 %3)
%5 = fmul double %2, %4
%6 = tail call i32 @box_double(double %5)
ret void
}
/* Variables and functions */
char *jsonCmd(char *, int);
char *jsonCmdResetRsp(int ret) { return (jsonCmd("resetrsp", ret)); }


x86 assembly (clang, -O0):
<jsonCmdResetRsp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <jsonCmd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jsonCmdResetRsp>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <jsonCmd@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"resetrsp\00"
define i8* @jsonCmdResetRsp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i8* @jsonCmd(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* %4
}

LLVM IR (-O2):
@.str = [9 x i8] c"resetrsp\00"
define i8* @jsonCmdResetRsp(i32 %0) {
%2 = tail call i8* @jsonCmd(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xf5() {
  Assert_real((isodigit(245) == 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_isodigit.c",
              1230, ("isodigit should be 0 for 0xf5"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xf5>:
push   %rax
mov    $0xf5,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x4ce,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xf5\00"
define void @t_isodigit_0xf5() {
%1 = call i64 @isodigit(i32 245)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1230, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xf5\00"
define void @t_isodigit_0xf5() {
%1 = tail call i64 @isodigit(i32 245)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1230, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int k(int a, int b) {
  if (a < b) {
    return a;
  } else {
    return b;
  }
}


x86 assembly (clang, -O0):
<k>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1121 <k+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <k+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<k>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @k(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void foo032() {}


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

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

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

LLVM IR (-O2):
define void @foo032() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AssertFailure(char *, int);
int /*<<< orphan*/ UARTBaseValid(unsigned long);
void UARTRxErrorClear(unsigned long ulBase) {
  {
    if (!(UARTBaseValid(ulBase))) {
      AssertFailure(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/"
          "Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/"
          "uartlib.c",
          1706);
    }
  };
  (*((volatile unsigned long *)(ulBase + 0x00000004))) = 0;
}


x86 assembly (clang, -O0):
<UARTRxErrorClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <UARTBaseValid@plt>
cmp    $0x0,%eax
jne    114f <UARTRxErrorClear+0x2f>
lea    0xebb(%rip),%rdi
mov    $0x6aa,%esi
call   1030 <AssertFailure@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,0x4(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTRxErrorClear>:
push   %rbx
mov    %rdi,%rbx
call   1040 <UARTBaseValid@plt>
test   %eax,%eax
jne    113e <UARTRxErrorClear+0x1e>
lea    0xecc(%rip),%rdi
mov    $0x6aa,%esi
call   1030 <AssertFailure@plt>
movq   $0x0,0x4(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [201 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define void @UARTRxErrorClear(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @UARTBaseValid(i64 %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 1706)
br label %8
8: ; preds = %6, %1
%9 = load i64, i64* %2
%10 = add i64 %9, 4
%11 = inttoptr i64 %10 to i64*
store volatile i64 0, i64* %11
ret void
}

LLVM IR (-O2):
@.str = [201 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define void @UARTRxErrorClear(i64 %0) {
%2 = tail call i32 @UARTBaseValid(i64 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 1706)
br label %6
6: ; preds = %4, %1
%7 = add i64 %0, 4
%8 = inttoptr i64 %7 to i64*
store volatile i64 0, i64* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OPL_Byte(int, int /*<<< orphan*/);
int SetBase(int);
void OPL_NoteOff(int c) {
  c = SetBase(c);
  if (c < 9) {
    OPL_Byte(0xb0 + c, 0);
  }
}


x86 assembly (clang, -O0):
<OPL_NoteOff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <SetBase@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x9,-0x4(%rbp)
jge    1150 <OPL_NoteOff+0x30>
mov    -0x4(%rbp),%edi
add    $0xb0,%edi
xor    %esi,%esi
call   1030 <OPL_Byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OPL_NoteOff>:
push   %rax
call   1040 <SetBase@plt>
cmp    $0x8,%eax
jg     113a <OPL_NoteOff+0x1a>
add    $0xb0,%eax
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <OPL_Byte@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @OPL_NoteOff(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @SetBase(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 9
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %2
%9 = add nsw i32 176, %8
%10 = call i32 @OPL_Byte(i32 %9, i32 0)
br label %11
11: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @OPL_NoteOff(i32 %0) {
%2 = tail call i32 @SetBase(i32 %0)
%3 = icmp slt i32 %2, 9
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = add nsw i32 %2, 176
%6 = tail call i32 @OPL_Byte(i32 %5, i32 0)
br label %7
7: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
scalar_t__ access(char const *, int /*<<< orphan*/);
int cfilesystem_exists(const char *filepath) {
  return (access(filepath, F_OK) == 0 ? 1 : 0);
}


x86 assembly (clang, -O0):
<cfilesystem_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfilesystem_exists>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@F_OK = global i32 0
define i32 @cfilesystem_exists(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @F_OK
%5 = call i64 @access(i8* %3, i32 %4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 1, i32 0
ret i32 %8
}

LLVM IR (-O2):
@F_OK = global i32 0
define i32 @cfilesystem_exists(i8* nocapture %0) {
%2 = load i32, i32* @F_OK
%3 = tail call i64 @access(i8* %0, i32 %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ todec(char *);
void main() {
  char ch[] = "11111111111111111";
  todec(ch);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%ax
mov    %ax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <todec@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
movw   $0x31,0x10(%rsp)
mov    %rsp,%rdi
call   1030 <todec@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.ch = [18 x i8] c"11111111111111111\00"
define void @main() {
%1 = alloca [18 x i8]
%2 = bitcast [18 x i8]* %1 to i8*
%3 = getelementptr inbounds [18 x i8], [18 x i8]* %1, i64 0, i64 0
%4 = call i32 @todec(i8* %3)
ret void
}

LLVM IR (-O2):
@__const.main.ch = [18 x i8] c"11111111111111111\00"
define void @main() {
%1 = alloca [18 x i8]
%2 = getelementptr inbounds [18 x i8], [18 x i8]* %1, i64 0, i64 0
%3 = call i32 @todec(i8* %2)
ret void
}
void foo595() {}


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

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

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

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

/* Variables and functions */
void SD_NULL_SetTimer0(int16_t int_8_divisor) {}


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

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

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

LLVM IR (-O2):
define void @SD_NULL_SetTimer0(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void hmap_generic_free_data(void *data) {
  if (data)
    free(data);
}


x86 assembly (clang, -O0):
<hmap_generic_free_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <hmap_generic_free_data+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hmap_generic_free_data>:
test   %rdi,%rdi
je     111a <hmap_generic_free_data+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @hmap_generic_free_data(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ diminuto_fd_write_generic(int, void const *, size_t, size_t);
ssize_t diminuto_ipc_stream_write_generic(int fd, const void *buffer,
                                          size_t min, size_t max) {
  return diminuto_fd_write_generic(fd, buffer, min, max);
}


x86 assembly (clang, -O0):
<diminuto_ipc_stream_write_generic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <diminuto_fd_write_generic@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diminuto_ipc_stream_write_generic>:
jmp    1030 <diminuto_fd_write_generic@plt>

LLVM IR (-O0):
define i32 @diminuto_ipc_stream_write_generic(i32 %0, i8* %1, i64 %2, i64 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = load i64, i64* %8
%13 = call i32 @diminuto_fd_write_generic(i32 %9, i8* %10, i64 %11, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @diminuto_ipc_stream_write_generic(i32 %0, i8* %1, i64 %2, i64 %3) {
%5 = tail call i32 @diminuto_fd_write_generic(i32 %0, i8* %1, i64 %2, i64 %3)
ret i32 %5
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void handle_error(const char *desc) {
  int errcode = errno;
  perror(desc);
  exit(errcode);
}


x86 assembly (clang, -O0):
<handle_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handle_error>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
call   1030 <perror@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@errno = global i32 0
define void @handle_error(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i32, i32* @errno
store i32 %4, i32* %3
%5 = load i8*, i8** %2
%6 = call i32 @perror(i8* %5)
%7 = load i32, i32* %3
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@errno = global i32 0
define void @handle_error(i8* nocapture %0) {
%2 = load i32, i32* @errno
%3 = tail call i32 @perror(i8* %0)
%4 = tail call i32 @exit(i32 %2)
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
size_t decode_refalt_rev(int, char *, size_t *, char *, size_t *);
size_t decode_refalt(uint32_t code, char *ref, size_t *sizeref, char *alt,
                     size_t *sizealt) {
  if (code & 0x1) {
    return 0;
  }
  return decode_refalt_rev(code, ref, sizeref, alt, sizealt);
}


x86 assembly (clang, -O0):
<decode_refalt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1147 <decode_refalt+0x37>
movq   $0x0,-0x8(%rbp)
jmp    1163 <decode_refalt+0x53>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   1030 <decode_refalt_rev@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_refalt>:
test   $0x1,%dil
jne    111b <decode_refalt+0xb>
jmp    1030 <decode_refalt_rev@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @decode_refalt(i32 %0, i8* %1, i64* %2, i8* %3, i64* %4) {
%6 = alloca i64
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i64*
%10 = alloca i8*
%11 = alloca i64*
store i32 %0, i32* %7
store i8* %1, i8** %8
store i64* %2, i64** %9
store i8* %3, i8** %10
store i64* %4, i64** %11
%12 = load i32, i32* %7
%13 = and i32 %12, 1
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %5
store i64 0, i64* %6
br label %23
16: ; preds = %5
%17 = load i32, i32* %7
%18 = load i8*, i8** %8
%19 = load i64*, i64** %9
%20 = load i8*, i8** %10
%21 = load i64*, i64** %11
%22 = call i64 @decode_refalt_rev(i32 %17, i8* %18, i64* %19, i8* %20, i64* %21)
store i64 %22, i64* %6
br label %23
23: ; preds = %16, %15
%24 = load i64, i64* %6
ret i64 %24
}

LLVM IR (-O2):
define i64 @decode_refalt(i32 %0, i8* %1, i64* %2, i8* %3, i64* %4) {
%6 = and i32 %0, 1
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i64 @decode_refalt_rev(i32 %0, i8* %1, i64* %2, i8* %3, i64* %4)
br label %10
10: ; preds = %5, %8
%11 = phi i64 [ %9, %8 ], [ 0, %5 ]
ret i64 %11
}
int not_picked6() { return 13; }


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

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

LLVM IR (-O0):
define i32 @not_picked6() {
ret i32 13
}

LLVM IR (-O2):
define i32 @not_picked6() {
ret i32 13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
fun1() { printf("Iam in function 1\n"); }


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

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

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

LLVM IR (-O2):
@str = [18 x i8] c"Iam in function 1\00"
define i32 @fun1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy,
                                  struct ath_hw *ah) {}


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

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

LLVM IR (-O0):
%struct.dentry = type opaque
%struct.ath_hw = type opaque
define void @ath9k_cmn_debug_modal_eeprom(%struct.dentry* %0, %struct.ath_hw* %1) {
%3 = alloca %struct.dentry*
%4 = alloca %struct.ath_hw*
store %struct.dentry* %0, %struct.dentry** %3
store %struct.ath_hw* %1, %struct.ath_hw** %4
ret void
}

LLVM IR (-O2):
%struct.dentry = type opaque
%struct.ath_hw = type opaque
define void @ath9k_cmn_debug_modal_eeprom(%struct.dentry* nocapture %0, %struct.ath_hw* nocapture %1) {
ret void
}
void ff_hevc_put_hevc_bi_pel_pixels64_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_pel_pixels64_10_sse4() {
ret void
}