xunge/DecIR huggingface dataset:
void SetBootloaderPinDirections() {}


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

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

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

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

/* Variables and functions */
float damage_RollAttack(struct Hero *);
float ChangWenJun_LongJuanQiangFa_damage(struct Ability *self,
                                         struct Hero *attacker,
                                         struct Hero *target) {
  return damage_RollAttack(attacker) * (float)(1.5);
}


x86 assembly (clang, -O0):
<ChangWenJun_LongJuanQiangFa_damage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <damage_RollAttack@plt>
movss  0xecb(%rip),%xmm1
mulss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ChangWenJun_LongJuanQiangFa_damage>:
push   %rax
mov    %rsi,%rdi
call   1030 <damage_RollAttack@plt>
mulss  0xedf(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.Ability = type { i32 }
%struct.Hero = type { i32 }
define float @ChangWenJun_LongJuanQiangFa_damage(%struct.Ability* %0, %struct.Hero* %1, %struct.Hero* %2) {
%4 = alloca %struct.Ability*
%5 = alloca %struct.Hero*
%6 = alloca %struct.Hero*
store %struct.Ability* %0, %struct.Ability** %4
store %struct.Hero* %1, %struct.Hero** %5
store %struct.Hero* %2, %struct.Hero** %6
%7 = load %struct.Hero*, %struct.Hero** %5
%8 = call float @damage_RollAttack(%struct.Hero* %7)
%9 = fmul float %8, 1.500000e+00
ret float %9
}

LLVM IR (-O2):
%struct.Ability = type { i32 }
%struct.Hero = type { i32 }
define float @ChangWenJun_LongJuanQiangFa_damage(%struct.Ability* nocapture readnone %0, %struct.Hero* %1, %struct.Hero* nocapture readnone %2) {
%4 = tail call float @damage_RollAttack(%struct.Hero* %1)
%5 = fmul float %4, 1.500000e+00
ret float %5
}
/* Variables and functions */
int syscall(int, char *, int);
int creat(char *filename) { return syscall(22, filename, 30); }


x86 assembly (clang, -O0):
<creat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x16,%edi
mov    $0x1e,%edx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<creat>:
mov    %rdi,%rsi
mov    $0x16,%edi
mov    $0x1e,%edx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @creat(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @syscall(i32 22, i8* %3, i32 30)
ret i32 %4
}

LLVM IR (-O2):
define i32 @creat(i8* %0) {
%2 = tail call i32 @syscall(i32 22, i8* %0, i32 30)
ret i32 %2
}
int main() {
  int a = 10;
  void *p = &a;
  int *ptr = p;
  printf("%u\n", *ptr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 10)
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  int xtmp;
  int res;
  int restmp;
  x = __VERIFIER_nondet_int();
  res = 0;
  while (x > 1) {
    xtmp = x - 2;
    restmp = 0;
    while (xtmp > 1) {
      xtmp = xtmp - 2;
      restmp = restmp + 1;
    }
    x = xtmp + 1;
    res = res + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1182 <main+0x72>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x1,-0xc(%rbp)
jle    116b <main+0x5b>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114a <main+0x3a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, int /*<<< orphan*/);
char *next() {
  static int n = 0;
  char *res = malloc(256);
  sprintf(res, "%d", n++);
  return res;
}


x86 assembly (clang, -O0):
<next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x100,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ef4(%rip),%edx
mov    %edx,%eax
add    $0x1,%eax
mov    %eax,0x2ee9(%rip)
lea    0xeae(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next>:
push   %rbx
mov    $0x100,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
mov    0x2f00(%rip),%edx
lea    0x1(%rdx),%eax
mov    %eax,0x2ef7(%rip)
lea    0xebc(%rip),%rsi
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@next.n = internal global i32 0
@.str = [3 x i8] c"%d\00"
define i8* @next() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 256)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = load i32, i32* @next.n
%5 = add nsw i32 %4, 1
store i32 %5, i32* @next.n
%6 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
%7 = load i8*, i8** %1
ret i8* %7
}

LLVM IR (-O2):
@next.n = internal unnamed_addr global i32 0
@.str = [3 x i8] c"%d\00"
define noalias i8* @next() {
%1 = tail call dereferenceable_or_null(256) i8* @malloc(i32 256)
%2 = load i32, i32* @next.n
%3 = add nsw i32 %2, 1
store i32 %3, i32* @next.n
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i8* %1
}
/* Variables and functions */
int any_decrqss(char const *, char *);
int rpt_DECSACE(const char *the_title) { return any_decrqss(the_title, "*x"); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"*x\00"
define i32 @rpt_DECSACE(i8* %0) {
%2 = tail call i32 @any_decrqss(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
int test1(int x) { return x / 10 == 2; }


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
add    $0xffffffec,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @test1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 10
%5 = icmp eq i32 %4, 2
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @test1(i32 %0) {
%2 = add i32 %0, -20
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned arq__max(unsigned x, unsigned y) { return (x > y) ? x : y; }


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

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

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

LLVM IR (-O2):
define i32 @arq__max(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ do_bar();
void do_foo() {
  int i;
  for (i = 0; i < 10 + 2; i++) {
    ;
    do_bar();
  }
}


x86 assembly (clang, -O0):
<do_foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xc,-0x4(%rbp)
jge    113e <do_foo+0x2e>
mov    $0x0,%al
call   1030 <do_bar@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <do_foo+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_foo>:
push   %rax
xor    %eax,%eax
call   1030 <do_bar@plt>
xor    %eax,%eax
call   1030 <do_bar@plt>
xor    %eax,%eax
call   1030 <do_bar@plt>
xor    %eax,%eax
call   1030 <do_bar@plt>
xor    %eax,%eax
call   1030 <do_bar@plt>
xor    %eax,%eax
call   1030 <do_bar@plt>
xor    %eax,%eax
call   1030 <do_bar@plt>
xor    %eax,%eax
call   1030 <do_bar@plt>
xor    %eax,%eax
call   1030 <do_bar@plt>
xor    %eax,%eax
call   1030 <do_bar@plt>
xor    %eax,%eax
call   1030 <do_bar@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <do_bar@plt>

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

LLVM IR (-O2):
define void @do_foo() {
%1 = tail call i32 (...) @do_bar()
%2 = tail call i32 (...) @do_bar()
%3 = tail call i32 (...) @do_bar()
%4 = tail call i32 (...) @do_bar()
%5 = tail call i32 (...) @do_bar()
%6 = tail call i32 (...) @do_bar()
%7 = tail call i32 (...) @do_bar()
%8 = tail call i32 (...) @do_bar()
%9 = tail call i32 (...) @do_bar()
%10 = tail call i32 (...) @do_bar()
%11 = tail call i32 (...) @do_bar()
%12 = tail call i32 (...) @do_bar()
ret void
}
/* Variables and functions */
unsigned long _i2cctrl(int, int, unsigned long, unsigned long);
int /*<<< orphan*/ monLock();
int /*<<< orphan*/ monUnlock();
unsigned long mon_i2cctrl(int interface, int cmd, unsigned long arg1,
                          unsigned long arg2) {
  unsigned long val;
  monLock();
  val = _i2cctrl(interface, cmd, arg1, arg2);
  monUnlock();
  return (val);
}


x86 assembly (clang, -O0):
<mon_i2cctrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    $0x0,%al
call   1040 <monLock@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <_i2cctrl@plt>
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1050 <monUnlock@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mon_i2cctrl>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <monLock@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r15,%rdx
mov    %r14,%rcx
call   1030 <_i2cctrl@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <monUnlock@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i64 @mon_i2cctrl(i32 %0, i32 %1, i64 %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%10 = call i32 (...) @monLock()
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = load i64, i64* %7
%14 = load i64, i64* %8
%15 = call i64 @_i2cctrl(i32 %11, i32 %12, i64 %13, i64 %14)
store i64 %15, i64* %9
%16 = call i32 (...) @monUnlock()
%17 = load i64, i64* %9
ret i64 %17
}

LLVM IR (-O2):
define i64 @mon_i2cctrl(i32 %0, i32 %1, i64 %2, i64 %3) {
%5 = tail call i32 (...) @monLock()
%6 = tail call i64 @_i2cctrl(i32 %0, i32 %1, i64 %2, i64 %3)
%7 = tail call i32 (...) @monUnlock()
ret i64 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ qemu_file_skip(int /*<<< orphan*/ *, int);
int qemu_peek_byte(int /*<<< orphan*/ *, int /*<<< orphan*/);
int qemu_get_byte(FILE *f) {
  int result;
  result = qemu_peek_byte(f, 0);
  qemu_file_skip(f, 1);
  return result;
}


x86 assembly (clang, -O0):
<qemu_get_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <qemu_peek_byte@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <qemu_file_skip@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qemu_get_byte>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %esi,%esi
call   1040 <qemu_peek_byte@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <qemu_file_skip@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @qemu_get_byte(i32* %0) {
%2 = tail call i32 @qemu_peek_byte(i32* %0, i32 0)
%3 = tail call i32 @qemu_file_skip(i32* %0, i32 1)
ret i32 %2
}
void CERTIFICATEPOLICIES_free(void) {}


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

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

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

LLVM IR (-O2):
define void @CERTIFICATEPOLICIES_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Reserved56_DriverIRQHandler();
__attribute__((weak)) void Reserved56_IRQHandler(void) {
  Reserved56_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @Reserved56_IRQHandler() {
%1 = call i32 (...) @Reserved56_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @Reserved56_IRQHandler() {
%1 = tail call i32 (...) @Reserved56_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ disableIRQ();
int /*<<< orphan*/ enableIRQ();
unsigned int atomic_arch_set_return(unsigned int *to_set, unsigned int value) {
  disableIRQ();
  unsigned int old = *to_set;
  *to_set = value;
  enableIRQ();
  return old;
}


x86 assembly (clang, -O0):
<atomic_arch_set_return>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1040 <disableIRQ@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1030 <enableIRQ@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomic_arch_set_return>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <disableIRQ@plt>
mov    (%rbx),%ebp
mov    %r14d,(%rbx)
xor    %eax,%eax
call   1030 <enableIRQ@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @atomic_arch_set_return(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = call i32 (...) @disableIRQ()
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = call i32 (...) @enableIRQ()
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @atomic_arch_set_return(i32* nocapture %0, i32 %1) {
%3 = tail call i32 (...) @disableIRQ()
%4 = load i32, i32* %0
store i32 %1, i32* %0
%5 = tail call i32 (...) @enableIRQ()
ret i32 %4
}
double vx_y(double x, double y, int T) { return (0); }


x86 assembly (clang, -O0):
<vx_y>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vx_y>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @vx_y(double %0, double %1, i32 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i32
store double %0, double* %4
store double %1, double* %5
store i32 %2, i32* %6
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @vx_y(double %0, double %1, i32 %2) {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ z80_ed_44_neg();
void z80_ed_6c_neg(void) { z80_ed_44_neg(); }


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

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

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

LLVM IR (-O2):
define void @z80_ed_6c_neg() {
%1 = tail call i32 (...) @z80_ed_44_neg()
ret void
}
main() {
  int printf(const char *, ...) __attribute((format(printf, 1, 2)));
  long long ll = 0;
  printf("%lld\n", ll);
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 0)
ret i32 0
}
/* Variables and functions */
char EOF;
char getchar();
void purger() {
  char c;
  while ((c = getchar()) != '\n' && c != EOF) {
  }
}


x86 assembly (clang, -O0):
<purger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl %al,%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     1149 <purger+0x39>
movsbl -0x1(%rbp),%eax
mov    0x2eaa(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
test   $0x1,%al
jne    1159 <purger+0x49>
jmp    115e <purger+0x4e>
jmp    1118 <purger+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<purger>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
je     112f <purger+0x1f>
cmp    (%rbx),%al
jne    1120 <purger+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i8 0
define void @purger() {
%1 = alloca i8
br label %2
2: ; preds = %14, %0
%3 = call signext i8 (...) @getchar()
store i8 %3, i8* %1
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 10
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = load i8, i8* %1
%8 = sext i8 %7 to i32
%9 = load i8, i8* @EOF
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %8, %10
br label %12
12: ; preds = %6, %2
%13 = phi i1 [ false, %2 ], [ %11, %6 ]
br i1 %13, label %14, label %15
14: ; preds = %12
br label %2
15: ; preds = %12
ret void
}

LLVM IR (-O2):
@EOF = global i8 0
define void @purger() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp ne i8 %2, 10
%4 = load i8, i8* @EOF
%5 = icmp ne i8 %2, %4
%6 = select i1 %3, i1 %5, i1 false
br i1 %6, label %1, label %7
7: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_year;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int date_get_year(void) {
  time_t t = time(NULL);
  struct tm *lt = localtime(&t);
  return lt->tm_year + 1900;
}


x86 assembly (clang, -O0):
<date_get_year>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0x76c,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<date_get_year>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
mov    $0x76c,%ecx
add    (%rax),%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @date_get_year() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %4, %struct.tm** %2
%5 = load %struct.tm*, %struct.tm** %2
%6 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 1900
ret i32 %8
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @date_get_year() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call %struct.tm* @localtime(i32* %1)
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 0
%6 = load i32, i32* %5
%7 = add nsw i32 %6, 1900
ret i32 %7
}
void *fopen_file_func(void *opaque, const char *filename, int mode) {
  return (void *)1;
}


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

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

LLVM IR (-O0):
define i8* @fopen_file_func(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret i8* inttoptr (i64 1 to i8*)
}

LLVM IR (-O2):
define i8* @fopen_file_func(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i8* inttoptr (i64 1 to i8*)
}
/* Variables and functions */
int /*<<< orphan*/ mem_pool_destroy(void *);
void pool_chain_destroy(void *allocated, void *clsr) { mem_pool_destroy(clsr); }


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

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

LLVM IR (-O0):
define void @pool_chain_destroy(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 = call i32 @mem_pool_destroy(i8* %5)
ret void
}

LLVM IR (-O2):
define void @pool_chain_destroy(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @mem_pool_destroy(i8* %1)
ret void
}
/* Type definitions */
struct netdev {
  int dummy;
};

/* Variables and functions */
int dhcp_recv(struct netdev *);
int dhcp_recv_offer(struct netdev *dev) { return dhcp_recv(dev); }


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

x86 assembly (clang, -O2):
<dhcp_recv_offer>:
jmp    1030 <dhcp_recv@plt>

LLVM IR (-O0):
%struct.netdev = type { i32 }
define i32 @dhcp_recv_offer(%struct.netdev* %0) {
%2 = alloca %struct.netdev*
store %struct.netdev* %0, %struct.netdev** %2
%3 = load %struct.netdev*, %struct.netdev** %2
%4 = call i32 @dhcp_recv(%struct.netdev* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.netdev = type { i32 }
define i32 @dhcp_recv_offer(%struct.netdev* %0) {
%2 = tail call i32 @dhcp_recv(%struct.netdev* %0)
ret i32 %2
}
long long loc2cs3D(long long *loc, long long n1, long long n2, long long n3) {
  return loc[0] + (loc[1] - 1) * n1 + (loc[2] - 1) * n1 * n2;
}


x86 assembly (clang, -O0):
<loc2cs3D>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
sub    $0x1,%rcx
imul   -0x10(%rbp),%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%rcx
sub    $0x1,%rcx
imul   -0x10(%rbp),%rcx
imul   -0x18(%rbp),%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<loc2cs3D>:
mov    0x8(%rdi),%rax
mov    0x10(%rdi),%rcx
add    $0xffffffffffffffff,%rcx
imul   %rdx,%rcx
add    %rcx,%rax
add    $0xffffffffffffffff,%rax
imul   %rsi,%rax
add    (%rdi),%rax
ret

LLVM IR (-O0):
define i64 @loc2cs3D(i64* %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64* %0, i64** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64*, i64** %5
%10 = getelementptr inbounds i64, i64* %9, i64 0
%11 = load i64, i64* %10
%12 = load i64*, i64** %5
%13 = getelementptr inbounds i64, i64* %12, i64 1
%14 = load i64, i64* %13
%15 = sub nsw i64 %14, 1
%16 = load i64, i64* %6
%17 = mul nsw i64 %15, %16
%18 = add nsw i64 %11, %17
%19 = load i64*, i64** %5
%20 = getelementptr inbounds i64, i64* %19, i64 2
%21 = load i64, i64* %20
%22 = sub nsw i64 %21, 1
%23 = load i64, i64* %6
%24 = mul nsw i64 %22, %23
%25 = load i64, i64* %7
%26 = mul nsw i64 %24, %25
%27 = add nsw i64 %18, %26
ret i64 %27
}

LLVM IR (-O2):
define i64 @loc2cs3D(i64* nocapture %0, i64 %1, i64 %2, i64 %3) {
%5 = load i64, i64* %0
%6 = getelementptr inbounds i64, i64* %0, i64 1
%7 = load i64, i64* %6
%8 = add nsw i64 %7, -1
%9 = getelementptr inbounds i64, i64* %0, i64 2
%10 = load i64, i64* %9
%11 = add nsw i64 %10, -1
%12 = mul i64 %11, %2
%13 = add i64 %8, %12
%14 = mul i64 %13, %1
%15 = add i64 %14, %5
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  int n = 10;
  if (n >= 5) {
    printf("n is greater or equal than 5\n");
  } else {
    printf("Conditional statement 1 is false\n");
  }
  if (n <= 5) {
    printf("n is less than or equal 5\n");
  } else {
    printf("Conditional statement 2 is false\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jl     1148 <main+0x38>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
jmp    1154 <main+0x44>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x5,-0x14(%rbp)
jg     116f <main+0x5f>
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
jmp    117b <main+0x6b>
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [30 x i8] c"n is greater or equal than 5\0A\00"
@.str.1 = [34 x i8] c"Conditional statement 1 is false\0A\00"
@.str.2 = [27 x i8] c"n is less than or equal 5\0A\00"
@.str.3 = [34 x i8] c"Conditional statement 2 is false\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 10, i32* %6
%7 = load i32, i32* %6
%8 = icmp sge i32 %7, 5
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %13
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %6
%15 = icmp sle i32 %14, 5
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
br label %20
18: ; preds = %13
%19 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
br label %20
20: ; preds = %18, %16
ret i32 0
}

LLVM IR (-O2):
@str = [29 x i8] c"n is greater or equal than 5\00"
@str.4 = [33 x i8] c"Conditional statement 2 is false\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}
int bar() { return 11; }


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

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

LLVM IR (-O0):
define i32 @bar() {
ret i32 11
}

LLVM IR (-O2):
define i32 @bar() {
ret i32 11
}
/* Variables and functions */
int unix_is_symlink(char *, char *);
int wfile_is_symlink_ex(char *filename, char *src) {
  return (unix_is_symlink(filename, src));
}


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

x86 assembly (clang, -O2):
<wfile_is_symlink_ex>:
jmp    1030 <unix_is_symlink@plt>

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

LLVM IR (-O2):
define i32 @wfile_is_symlink_ex(i8* %0, i8* %1) {
%3 = tail call i32 @unix_is_symlink(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void closeProcessFiles(int fdStatProc, int fdStatm) {
  close(fdStatProc);
  close(fdStatm);
  return;
}


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

x86 assembly (clang, -O2):
<closeProcessFiles>:
push   %rbx
mov    %esi,%ebx
call   1030 <close@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close@plt>

LLVM IR (-O0):
define void @closeProcessFiles(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 = call i32 @close(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @close(i32 %7)
ret void
}

LLVM IR (-O2):
define void @closeProcessFiles(i32 %0, i32 %1) {
%3 = tail call i32 @close(i32 %0)
%4 = tail call i32 @close(i32 %1)
ret void
}
void foo823() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_tooltips_set_tip() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__40__IO__selectIOFunc();
void Msp430Adc12ImplP__Port60__selectIOFunc(void) {
  HplMsp430GeneralIOP__40__IO__selectIOFunc();
}


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

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

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

LLVM IR (-O2):
define void @Msp430Adc12ImplP__Port60__selectIOFunc() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__40__IO__selectIOFunc()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execve(char *, char **, char **);
int main() {
  char *myenv[] = {"hello=me", NULL};
  char *myargv[] = {"env", NULL};
  execve("/usr/bin/env", myargv, myenv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2cda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cd7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cd4(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cd1(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0x30(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    0xeaf(%rip),%rdi
call   1030 <execve@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0x2ce5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2ce9(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xed7(%rip),%rdi
mov    %rsp,%rsi
lea    0x10(%rsp),%rdx
call   1030 <execve@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"hello=me\00"
@__const.main.myenv = [2 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* null]
@.str.1 = [4 x i8] c"env\00"
@__const.main.myargv = [2 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* null]
@.str.2 = [13 x i8] c"/usr/bin/env\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i8*]
%3 = alloca [2 x i8*]
store i32 0, i32* %1
%4 = bitcast [2 x i8*]* %2 to i8*
%5 = bitcast [2 x i8*]* %3 to i8*
%6 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
%7 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
%8 = call i32 @execve(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8** %6, i8** %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"hello=me\00"
@__const.main.myenv = [2 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* null]
@.str.1 = [4 x i8] c"env\00"
@__const.main.myargv = [2 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* null]
@.str.2 = [13 x i8] c"/usr/bin/env\00"
define i32 @main() {
%1 = alloca [2 x i8*]
%2 = alloca [2 x i8*]
%3 = bitcast [2 x i8*]* %1 to i8*
%4 = bitcast [2 x i8*]* %2 to i8*
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
%6 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%7 = call i32 @execve(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8** %5, i8** %6)
ret i32 0
}
/* Variables and functions */
char **malloc(int);
extern char **ReturnAStringArray() {
  char **foo = malloc(2 * sizeof(char *));
  foo[0] = "La Trappe";
  foo[1] = "Leffe";
  return foo;
}


x86 assembly (clang, -O0):
<ReturnAStringArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x10,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
lea    0xecf(%rip),%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
lea    0xecb(%rip),%rcx
mov    %rcx,0x8(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReturnAStringArray>:
push   %rax
mov    $0x10,%edi
call   1030 <malloc@plt>
lea    0xede(%rip),%rcx
mov    %rcx,(%rax)
lea    0xede(%rip),%rcx
mov    %rcx,0x8(%rax)
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"La Trappe\00"
@.str.1 = [6 x i8] c"Leffe\00"
define i8** @ReturnAStringArray() {
%1 = alloca i8**
%2 = call i8** @malloc(i32 16)
store i8** %2, i8*** %1
%3 = load i8**, i8*** %1
%4 = getelementptr inbounds i8*, i8** %3, i64 0
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = load i8**, i8*** %1
%6 = getelementptr inbounds i8*, i8** %5, i64 1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %6
%7 = load i8**, i8*** %1
ret i8** %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"La Trappe\00"
@.str.1 = [6 x i8] c"Leffe\00"
define noalias i8** @ReturnAStringArray() {
%1 = tail call i8** @malloc(i32 16)
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = getelementptr inbounds i8*, i8** %1, i64 1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
ret i8** %1
}
void RTAvlrPVDestroy(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlrPVDestroy() {
ret void
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int getchar();
void clean_stdin(void) {
  int c;
  do {
    c = getchar();
  } while (c != '\n' && c != EOF);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<clean_stdin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1153 <clean_stdin+0x33>
mov    -0x4(%rbp),%eax
mov    0x2e9d(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1128 <clean_stdin+0x8>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<clean_stdin>:
push   %rbx
mov    0x2ec0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%eax
je     1140 <clean_stdin+0x20>
cmp    (%rbx),%eax
jne    1130 <clean_stdin+0x10>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EOF = global i32 0
@EXIT_SUCCESS = global i32 0
define void @clean_stdin() {
%1 = alloca i32
br label %2
2: ; preds = %11, %0
%3 = call i32 (...) @getchar()
store i32 %3, i32* %1
br label %4
4: ; preds = %2
%5 = load i32, i32* %1
%6 = icmp ne i32 %5, 10
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load i32, i32* %1
%9 = load i32, i32* @EOF
%10 = icmp ne i32 %8, %9
br label %11
11: ; preds = %7, %4
%12 = phi i1 [ false, %4 ], [ %10, %7 ]
br i1 %12, label %2, label %13
13: ; preds = %11
%14 = load i32, i32* @EXIT_SUCCESS
%15 = call i32 @exit(i32 %14)
unreachable
}

LLVM IR (-O2):
@EOF = global i32 0
@EXIT_SUCCESS = global i32 0
define void @clean_stdin() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @getchar()
%3 = icmp ne i32 %2, 10
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %2, %4
%6 = select i1 %3, i1 %5, i1 false
br i1 %6, label %1, label %7
7: ; preds = %1
%8 = load i32, i32* @EXIT_SUCCESS
%9 = tail call i32 @exit(i32 %8)
unreachable
}
void adis16300_unconfigure_ring(struct iio_dev *indio_dev) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define void @adis16300_unconfigure_ring(%struct.iio_dev* nocapture %0) {
ret void
}
/* Variables and functions */
int pipe2(int *, int /*<<< orphan*/);
int pipe(int fd[2]) { return pipe2(fd, 0); }


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

x86 assembly (clang, -O2):
<pipe>:
xor    %esi,%esi
jmp    1030 <pipe2@plt>

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

LLVM IR (-O2):
define i32 @pipe(i32* %0) {
%2 = tail call i32 @pipe2(i32* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_sqrtf();
scalar_t__ sqrtf(float);
void test_sqrtf(float f) {
  if (sqrtf(f) != sqrtf(f))
    link_failure_sqrtf();
}


x86 assembly (clang, -O0):
<test_sqrtf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sqrtf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sqrtf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_sqrtf+0x3c>
mov    $0x0,%al
call   1040 <link_failure_sqrtf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sqrtf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1030 <sqrtf@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1030 <sqrtf@plt>
cmp    %rax,%rbx
jne    1149 <test_sqrtf+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <link_failure_sqrtf@plt>

LLVM IR (-O0):
define void @test_sqrtf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @sqrtf(float %3)
%5 = load float, float* %2
%6 = call i64 @sqrtf(float %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_sqrtf()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_sqrtf(float %0) {
%2 = tail call i64 @sqrtf(float %0)
%3 = tail call i64 @sqrtf(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_sqrtf()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_55(int /*<<< orphan*/);
int gen_55(void) {
  handle_55(0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @gen_55() {
%1 = call i32 @handle_55(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_55() {
%1 = tail call i32 @handle_55(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
void gotoxy(int x, int y, char *s) {
  printf("\033[%d;%df", y, 2 * x);
  fflush(stdout);
  printf("%s", s);
}


x86 assembly (clang, -O0):
<gotoxy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
shl    $0x1,%edx
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    -0x10(%rbp),%rsi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gotoxy>:
push   %rbx
mov    %rdx,%rbx
lea    (%rdi,%rdi,1),%edx
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[%d;%df\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @gotoxy(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = mul nsw i32 2, %8
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %9)
%11 = load i32, i32* @stdout
%12 = call i32 @fflush(i32 %11)
%13 = load i8*, i8** %6
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%d;%df\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @gotoxy(i32 %0, i32 %1, i8* %2) {
%4 = shl nsw i32 %0, 1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %4)
%6 = load i32, i32* @stdout
%7 = tail call i32 @fflush(i32 %6)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int f161(int *);
int f162(int *p) { return f161(p); }


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

x86 assembly (clang, -O2):
<f162>:
jmp    1030 <f161@plt>

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

LLVM IR (-O2):
define i32 @f162(i32* %0) {
%2 = tail call i32 @f161(i32* %0)
ret i32 %2
}
__attribute__((always_)) void module_remove_driver(struct device_driver *drv) {}


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

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

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

LLVM IR (-O2):
%struct.device_driver = type opaque
define void @module_remove_driver(%struct.device_driver* nocapture %0) {
ret void
}
void foo520() {}


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

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

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

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