xunge/DecIR huggingface dataset:
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double gettime() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (double)((int64_t)tv.tv_sec * 1000000 + tv.tv_usec) / 1000000.;
}


x86 assembly (clang, -O0):
<gettime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%rax
imul   $0xf4240,%eax,%eax
cltq
add    -0x10(%rbp),%rax
cvtsi2sd %rax,%xmm0
movsd  0xebe(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movabs $0xf424000000000,%rax
imul   0x10(%rsp),%rax
sar    $0x20,%rax
add    0x8(%rsp),%rax
cvtsi2sd %rax,%xmm0
divsd  0xeba(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @gettime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = trunc i64 %4 to i32
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%9 = load i64, i64* %8
%10 = add nsw i64 %7, %9
%11 = sitofp i64 %10 to double
%12 = fdiv double %11, 1.000000e+06
ret double %12
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @gettime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = mul i64 %5, 4294967296000000
%7 = ashr exact i64 %6, 32
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%9 = load i64, i64* %8
%10 = add nsw i64 %7, %9
%11 = sitofp i64 %10 to double
%12 = fdiv double %11, 1.000000e+06
ret double %12
}
/* Variables and functions */
int i2c_smbus_read_word_data(int, int);
int bananapiI2CReadReg16(int fd, int reg) {
  return i2c_smbus_read_word_data(fd, reg);
}


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

x86 assembly (clang, -O2):
<bananapiI2CReadReg16>:
jmp    1030 <i2c_smbus_read_word_data@plt>

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

LLVM IR (-O2):
define i32 @bananapiI2CReadReg16(i32 %0, i32 %1) {
%3 = tail call i32 @i2c_smbus_read_word_data(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ __shutdown(int);
void shutdown(int sig) { __shutdown(true); }


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

x86 assembly (clang, -O2):
<shutdown>:
mov    $0x1,%edi
jmp    1030 <__shutdown@plt>

LLVM IR (-O0):
define void @shutdown(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @__shutdown(i32 1)
ret void
}

LLVM IR (-O2):
define void @shutdown(i32 %0) {
%2 = tail call i32 @__shutdown(i32 1)
ret void
}
/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ fatal(int /*<<< orphan*/ *, char const *);
void fatalx(const char *emsg) {
  errno = 0;
  fatal(NULL, emsg);
}


x86 assembly (clang, -O0):
<fatalx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
call   1030 <fatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fatalx>:
mov    %rdi,%rsi
mov    0x2ec6(%rip),%rax
movq   $0x0,(%rax)
xor    %edi,%edi
jmp    1030 <fatal@plt>

LLVM IR (-O0):
@errno = global i64 0
define void @fatalx(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
store i64 0, i64* @errno
%3 = load i8*, i8** %2
%4 = call i32 @fatal(i32* null, i8* %3)
ret void
}

LLVM IR (-O2):
@errno = global i64 0
define void @fatalx(i8* %0) {
store i64 0, i64* @errno
%2 = tail call i32 @fatal(i32* null, i8* %0)
ret void
}
int uart0TxEmpty(void) {
  return ((*((volatile unsigned char *)0xE000C014)) & ((1 << 5) | (1 << 6))) ==
         ((1 << 5) | (1 << 6));
}


x86 assembly (clang, -O0):
<uart0TxEmpty>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000c014,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0x60,%eax
cmp    $0x60,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart0TxEmpty>:
mov    $0xe000c014,%eax
mov    (%rax),%cl
not    %cl
xor    %eax,%eax
test   $0x60,%cl
sete   %al
ret

LLVM IR (-O0):
define i32 @uart0TxEmpty() {
%1 = load volatile i8, i8* inttoptr (i64 3758145556 to i8*)
%2 = zext i8 %1 to i32
%3 = and i32 %2, 96
%4 = icmp eq i32 %3, 96
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @uart0TxEmpty() {
%1 = load volatile i8, i8* inttoptr (i64 3758145556 to i8*)
%2 = and i8 %1, 96
%3 = icmp eq i8 %2, 96
%4 = zext i1 %3 to i32
ret i32 %4
}
int fun1377() { return 1377; }


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

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

LLVM IR (-O0):
define i32 @fun1377() {
ret i32 1377
}

LLVM IR (-O2):
define i32 @fun1377() {
ret i32 1377
}
/* Type definitions */
typedef int int64_t;
typedef int int32_t;

/* Variables and functions */
int32_t FixedMul(int32_t a, int32_t b) {
  return ((int64_t)a * (int64_t)b) >> 16;
}


x86 assembly (clang, -O0):
<FixedMul>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
sar    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FixedMul>:
mov    %edi,%eax
imul   %esi,%eax
sar    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @FixedMul(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 = mul nsw i32 %5, %6
%8 = ashr i32 %7, 16
ret i32 %8
}

LLVM IR (-O2):
define i32 @FixedMul(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = ashr i32 %3, 16
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Footer_ism3();
int /*<<< orphan*/ Header_ism3(char *, int /*<<< orphan*/);
int /*<<< orphan*/ PassDirectHtml(char *);
int /*<<< orphan*/ printf(char *);
void MasterZones(void) {
  Header_ism3("MasterZones()()", 0);
  printf("</center><pre><blockquote>");
  PassDirectHtml("/usr/local/idns/named.d/master.zones");
  printf("</blockquote></pre>");
  Footer_ism3();
}


x86 assembly (clang, -O0):
<MasterZones>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
xor    %esi,%esi
call   1030 <Header_ism3@plt>
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
call   1060 <PassDirectHtml@plt>
lea    0xedf(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <Footer_ism3@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MasterZones>:
push   %rax
lea    0xeb8(%rip),%rdi
xor    %esi,%esi
call   1030 <Header_ism3@plt>
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    0xec9(%rip),%rdi
call   1060 <PassDirectHtml@plt>
lea    0xee2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <Footer_ism3@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"MasterZones()()\00"
@.str.1 = [27 x i8] c"</center><pre><blockquote>\00"
@.str.2 = [37 x i8] c"/usr/local/idns/named.d/master.zones\00"
@.str.3 = [20 x i8] c"</blockquote></pre>\00"
define void @MasterZones() {
%1 = call i32 @Header_ism3(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @PassDirectHtml(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (...) @Footer_ism3()
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"MasterZones()()\00"
@.str.1 = [27 x i8] c"</center><pre><blockquote>\00"
@.str.2 = [37 x i8] c"/usr/local/idns/named.d/master.zones\00"
@.str.3 = [20 x i8] c"</blockquote></pre>\00"
define void @MasterZones() {
%1 = tail call i32 @Header_ism3(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @PassDirectHtml(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 (...) @Footer_ism3()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned int);
unsigned int foo(char *c, unsigned int x, unsigned int y) {
  register unsigned int z;
  sprintf(c, "%d", x / y);
  z = x + 1;
  return z / (y + 1);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
xor    %edx,%edx
divl   -0x10(%rbp)
mov    %eax,%edx
lea    0xec9(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
xor    %edx,%edx
div    %ecx
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
mov    %esi,%eax
xor    %edx,%edx
div    %ebx
lea    0xedc(%rip),%rsi
mov    %eax,%edx
call   1030 <sprintf@plt>
add    $0x1,%ebp
add    $0x1,%ebx
mov    %ebp,%eax
xor    %edx,%edx
div    %ebx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @foo(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = udiv i32 %9, %10
%12 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %5
%14 = add i32 %13, 1
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = load i32, i32* %6
%17 = add i32 %16, 1
%18 = udiv i32 %15, %17
ret i32 %18
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @foo(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = udiv i32 %1, %2
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = add i32 %1, 1
%7 = add i32 %2, 1
%8 = udiv i32 %6, %7
ret i32 %8
}
/* Variables and functions */
int f(int *);
int g(int);
int h(int x, int *y) { return g(x) + f(y); }


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <g@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <f@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <g@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <f@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @h(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 @g(i32 %5)
%7 = load i32*, i32** %4
%8 = call i32 @f(i32* %7)
%9 = add nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @h(i32 %0, i32* %1) {
%3 = tail call i32 @g(i32 %0)
%4 = tail call i32 @f(i32* %1)
%5 = add nsw i32 %4, %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
int main() {
  int value;
  value = 1;
  if (value < 0)
    fprintf(stderr, "Fatal Error:Abort\n");
  exit(8);
  ;
  printf("We did not die\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1155 <main+0x35>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x8,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"Fatal Error:Abort\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %5, %0
%9 = call i32 @exit(i32 8)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
define i32 @main() {
%1 = tail call i32 @exit(i32 8)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ z();
gg(unsigned long long i) {
  if ((i & 0xfff0000000000ull) == 0x1230000000000ull)
    z();
}


x86 assembly (clang, -O0):
<gg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
movabs $0xfff0000000000,%rax
and    -0x10(%rbp),%rax
movabs $0x1230000000000,%rcx
cmp    %rcx,%rax
jne    1144 <gg+0x34>
mov    $0x0,%al
call   1030 <z@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gg>:
movabs $0xfff0000000000,%rax
and    %rdi,%rax
movabs $0x1230000000000,%rcx
cmp    %rcx,%rax
jne    1138 <gg+0x28>
push   %rax
xor    %eax,%eax
call   1030 <z@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @gg(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = and i64 %4, 4502500115742720
%6 = icmp eq i64 %5, 319957883682816
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (...) @z()
br label %9
9: ; preds = %7, %1
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @gg(i64 %0) {
%2 = and i64 %0, 4502500115742720
%3 = icmp eq i64 %2, 319957883682816
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @z()
br label %6
6: ; preds = %4, %1
ret i32 undef
}
/* Type definitions */
struct rbtree_node {
  int dummy;
};

/* Variables and functions */
struct rbtree_node *__rbtree_iterate(struct rbtree_node const *, int);
struct rbtree_node *rbtree_next(const struct rbtree_node *node) {
  return __rbtree_iterate(node, 1);
}


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

x86 assembly (clang, -O2):
<rbtree_next>:
mov    $0x1,%esi
jmp    1030 <__rbtree_iterate@plt>

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

LLVM IR (-O2):
%struct.rbtree_node = type { i32 }
define %struct.rbtree_node* @rbtree_next(%struct.rbtree_node* %0) {
%2 = tail call %struct.rbtree_node* @__rbtree_iterate(%struct.rbtree_node* %0, i32 1)
ret %struct.rbtree_node* %2
}
/* Variables and functions */
int /*<<< orphan*/ saveTill(char *, int);
void addToTill(int amount, int *till, const char *file) {
  *till += amount;
  saveTill("till.bin", *till);
}


x86 assembly (clang, -O0):
<addToTill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xec5(%rip),%rdi
call   1030 <saveTill@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addToTill>:
mov    %edi,%eax
add    (%rsi),%eax
mov    %eax,(%rsi)
lea    0xee3(%rip),%rdi
mov    %eax,%esi
jmp    1030 <saveTill@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"till.bin\00"
define void @addToTill(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* %4
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = add nsw i32 %9, %7
store i32 %10, i32* %8
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = call i32 @saveTill(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"till.bin\00"
define void @addToTill(i32 %0, i32* nocapture %1, i8* nocapture readnone %2) {
%4 = load i32, i32* %1
%5 = add nsw i32 %4, %0
store i32 %5, i32* %1
%6 = tail call i32 @saveTill(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __setCHRBank7High(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ m22_SetChrROMBank7();
void m22_setParamsEXX3(uint16_t addr, uint8_t val) {
  __setCHRBank7High(addr, val);
  m22_SetChrROMBank7();
}


x86 assembly (clang, -O0):
<m22_setParamsEXX3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <__setCHRBank7High@plt>
mov    $0x0,%al
call   1030 <m22_SetChrROMBank7@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m22_setParamsEXX3>:
push   %rax
call   1040 <__setCHRBank7High@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <m22_SetChrROMBank7@plt>

LLVM IR (-O0):
define void @m22_setParamsEXX3(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @__setCHRBank7High(i32 %5, i32 %6)
%8 = call i32 (...) @m22_SetChrROMBank7()
ret void
}

LLVM IR (-O2):
define void @m22_setParamsEXX3(i32 %0, i32 %1) {
%3 = tail call i32 @__setCHRBank7High(i32 %0, i32 %1)
%4 = tail call i32 (...) @m22_SetChrROMBank7()
ret void
}
void console_no_prompt(void) {}


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

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

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

LLVM IR (-O2):
define void @console_no_prompt() {
ret void
}
int test2(void) {
  { return (0); }
}


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

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

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

LLVM IR (-O2):
define i32 @test2() {
ret i32 0
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t bswap_16(uint16_t x) { return (x >> 8) | ((x & 0x00ff) << 8); }


x86 assembly (clang, -O0):
<bswap_16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswap_16>:
mov    %edi,%ecx
sar    $0x8,%ecx
shl    $0x8,%edi
movzwl %di,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @bswap_16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = load i32, i32* %2
%6 = and i32 %5, 255
%7 = shl i32 %6, 8
%8 = or i32 %4, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @bswap_16(i32 %0) {
%2 = ashr i32 %0, 8
%3 = shl i32 %0, 8
%4 = and i32 %3, 65280
%5 = or i32 %4, %2
ret i32 %5
}
void *pdf_rc4_new(int len, char *key) {}


x86 assembly (clang, -O0):
<pdf_rc4_new>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8* @pdf_rc4_new(i32 %0, i8* nocapture readnone %1) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ clearscreen(int);
int /*<<< orphan*/ drawtitle();
int /*<<< orphan*/ initscreens();
int /*<<< orphan*/ main_loop();
int /*<<< orphan*/ setup();
int main() {
  clearscreen(1 | 2);
  initscreens();
  drawtitle();
  initscreens();
  setup();
  main_loop();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
call   1030 <clearscreen@plt>
mov    $0x0,%al
call   1040 <initscreens@plt>
mov    $0x0,%al
call   1050 <drawtitle@plt>
mov    $0x0,%al
call   1040 <initscreens@plt>
mov    $0x0,%al
call   1070 <setup@plt>
mov    $0x0,%al
call   1060 <main_loop@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
call   1030 <clearscreen@plt>
xor    %eax,%eax
call   1040 <initscreens@plt>
xor    %eax,%eax
call   1050 <drawtitle@plt>
xor    %eax,%eax
call   1040 <initscreens@plt>
xor    %eax,%eax
call   1070 <setup@plt>
xor    %eax,%eax
call   1060 <main_loop@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @clearscreen(i32 3)
%3 = call i32 (...) @initscreens()
%4 = call i32 (...) @drawtitle()
%5 = call i32 (...) @initscreens()
%6 = call i32 (...) @setup()
%7 = call i32 (...) @main_loop()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @clearscreen(i32 3)
%2 = tail call i32 (...) @initscreens()
%3 = tail call i32 (...) @drawtitle()
%4 = tail call i32 (...) @initscreens()
%5 = tail call i32 (...) @setup()
%6 = tail call i32 (...) @main_loop()
ret i32 0
}
/* Variables and functions */
float f(float, float, float);
float h(float x, float z) {
  for (float y = 1.0f; y >= 0.0f; y -= 0.001f)
    if (f(x, y, z) <= 0.0f)
      return y;
  return 0.0f;
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  0xed6(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1192 <h+0x82>
movss  -0x8(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <f@plt>
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
jb     1172 <h+0x62>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    119a <h+0x8a>
jmp    1177 <h+0x67>
movss  -0x10(%rbp),%xmm0
movss  0xe80(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    112f <h+0x1f>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
sub    $0x18,%rsp
movss  %xmm1,0x14(%rsp)
movss  %xmm0,0x10(%rsp)
movss  0xed8(%rip),%xmm1
nopl   0x0(%rax,%rax,1)
movss  0x10(%rsp),%xmm0
movss  %xmm1,0xc(%rsp)
movss  0x14(%rsp),%xmm2
call   1030 <f@plt>
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jae    116a <h+0x5a>
movss  0xc(%rsp),%xmm1
addss  0xea7(%rip),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jae    1130 <h+0x20>
add    $0x18,%rsp
ret
movss  0xc(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @h(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float 1.000000e+00, float* %6
br label %7
7: ; preds = %19, %2
%8 = load float, float* %6
%9 = fcmp oge float %8, 0.000000e+00
br i1 %9, label %10, label %22
10: ; preds = %7
%11 = load float, float* %4
%12 = load float, float* %6
%13 = load float, float* %5
%14 = call float @f(float %11, float %12, float %13)
%15 = fcmp ole float %14, 0.000000e+00
br i1 %15, label %16, label %18
16: ; preds = %10
%17 = load float, float* %6
store float %17, float* %3
br label %23
18: ; preds = %10
br label %19
19: ; preds = %18
%20 = load float, float* %6
%21 = fsub float %20, 0x3F50624DE0000000
store float %21, float* %6
br label %7
22: ; preds = %7
store float 0.000000e+00, float* %3
br label %23
23: ; preds = %22, %16
%24 = load float, float* %3
ret float %24
}

LLVM IR (-O2):
define float @h(float %0, float %1) {
br label %3
3: ; preds = %2, %7
%4 = phi float [ 1.000000e+00, %2 ], [ %8, %7 ]
%5 = tail call float @f(float %0, float %4, float %1)
%6 = fcmp ugt float %5, 0.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = fadd float %4, 0xBF50624DE0000000
%9 = fcmp ult float %8, 0.000000e+00
br i1 %9, label %10, label %3
10: ; preds = %3, %7
%11 = phi float [ %4, %3 ], [ 0.000000e+00, %7 ]
ret float %11
}
/* Variables and functions */
int ntohl(int);
int /*<<< orphan*/ read(int, void *, int);
int read_cmd(int fd, int *cmd, int *arg) {
  int netcmd, netarg;
  read(fd, (void *)&netcmd, sizeof(int));
  read(fd, (void *)&netarg, sizeof(int));
  *cmd = ntohl(netcmd);
  *arg = ntohl(netarg);
  return 0;
}


x86 assembly (clang, -O0):
<read_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x1c(%rbp),%rsi
mov    $0x4,%edx
call   1030 <read@plt>
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0x4,%edx
call   1030 <read@plt>
mov    -0x1c(%rbp),%edi
call   1040 <ntohl@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%edi
call   1040 <ntohl@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_cmd>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xc(%rsp),%rsi
mov    $0x4,%edx
call   1030 <read@plt>
lea    0x8(%rsp),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1030 <read@plt>
mov    0xc(%rsp),%edi
call   1040 <ntohl@plt>
mov    %eax,(%rbx)
mov    0x8(%rsp),%edi
call   1040 <ntohl@plt>
mov    %eax,(%r14)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @read_cmd(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%9 = load i32, i32* %4
%10 = bitcast i32* %7 to i8*
%11 = call i32 @read(i32 %9, i8* %10, i32 4)
%12 = load i32, i32* %4
%13 = bitcast i32* %8 to i8*
%14 = call i32 @read(i32 %12, i8* %13, i32 4)
%15 = load i32, i32* %7
%16 = call i32 @ntohl(i32 %15)
%17 = load i32*, i32** %5
store i32 %16, i32* %17
%18 = load i32, i32* %8
%19 = call i32 @ntohl(i32 %18)
%20 = load i32*, i32** %6
store i32 %19, i32* %20
ret i32 0
}

LLVM IR (-O2):
define i32 @read_cmd(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %4 to i8*
%7 = bitcast i32* %5 to i8*
%8 = call i32 @read(i32 %0, i8* %6, i32 4)
%9 = call i32 @read(i32 %0, i8* %7, i32 4)
%10 = load i32, i32* %4
%11 = tail call i32 @ntohl(i32 %10)
store i32 %11, i32* %1
%12 = load i32, i32* %5
%13 = tail call i32 @ntohl(i32 %12)
store i32 %13, i32* %2
ret i32 0
}
extern void dummy(void **arr) {}


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

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

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

LLVM IR (-O2):
define void @dummy(i8** nocapture %0) {
ret void
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll28(struct __test_metadata *);
void wrapper_epoll28(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll28(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll28>:
jmp    1030 <epoll28@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll28(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll28(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll28(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll28(%struct.__test_metadata* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _makespace(char **, int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strlen(char *);
void xstrcpy(char **str1, char *str2) {
  _makespace(str1, strlen(str2));
  strcpy(*str1, str2);
}


x86 assembly (clang, -O0):
<xstrcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1050 <_makespace@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <_makespace@plt>
mov    (%rbx),%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define void @xstrcpy(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 @strlen(i8* %6)
%8 = call i32 @_makespace(i8** %5, i32 %7)
%9 = load i8**, i8*** %3
%10 = load i8*, i8** %9
%11 = load i8*, i8** %4
%12 = call i32 @strcpy(i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
define void @xstrcpy(i8** %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @_makespace(i8** %0, i32 %3)
%5 = load i8*, i8** %0
%6 = tail call i32 @strcpy(i8* %5, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PyMem_Free(void *);
void memory_free(void *ptr) { PyMem_Free(ptr); }


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

x86 assembly (clang, -O2):
<memory_free>:
jmp    1030 <PyMem_Free@plt>

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

LLVM IR (-O2):
define void @memory_free(i8* %0) {
%2 = tail call i32 @PyMem_Free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("hi\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [3 x i8] c"hi\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void gtc_rd_deinit(void) {}


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

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

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

LLVM IR (-O2):
define void @gtc_rd_deinit() {
ret void
}
int test_imm_9Bint16_mem(short *val) {
  return ((*val) & (0x9B << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_9Bint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 155
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
unsigned short int f78(unsigned short int x, unsigned long int y) {
  return (x << y) + (x >> (8 * sizeof(unsigned short) - y));
}


x86 assembly (clang, -O0):
<f78>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    $0x10,%ecx
sub    -0x10(%rbp),%rcx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f78>:
mov    %rsi,%rcx
mov    %edi,%eax
shl    %cl,%eax
mov    $0x10,%dl
sub    %cl,%dl
mov    %edx,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f78(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = shl i32 %6, %8
%10 = load i16, i16* %3
%11 = zext i16 %10 to i32
%12 = load i64, i64* %4
%13 = sub i64 16, %12
%14 = trunc i64 %13 to i32
%15 = ashr i32 %11, %14
%16 = add nsw i32 %9, %15
%17 = trunc i32 %16 to i16
ret i16 %17
}

LLVM IR (-O2):
define zeroext i16 @f78(i16 zeroext %0, i64 %1) {
%3 = zext i16 %0 to i32
%4 = trunc i64 %1 to i32
%5 = shl i32 %3, %4
%6 = sub i32 16, %4
%7 = lshr i32 %3, %6
%8 = add nsw i32 %7, %5
%9 = trunc i32 %8 to i16
ret i16 %9
}
/* Variables and functions */
int /*<<< orphan*/ Adc_StartTemperatureSensorConversion();
void AdcHardware_StartConversion(void) {
  Adc_StartTemperatureSensorConversion();
}


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

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

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

LLVM IR (-O2):
define void @AdcHardware_StartConversion() {
%1 = tail call i32 (...) @Adc_StartTemperatureSensorConversion()
ret void
}
/* Variables and functions */
char *req_swa_chars(char *, char const *, char const *, char const *);
char *switch_name(const char *hostname, const char *session_id,
                  const char *ain) {
  return req_swa_chars("getswitchname", hostname, session_id, ain);
}


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

x86 assembly (clang, -O2):
<switch_name>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee0(%rip),%rdi
jmp    1030 <req_swa_chars@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"getswitchname\00"
define i8* @switch_name(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i8* @req_swa_chars(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i8* %9)
ret i8* %10
}

LLVM IR (-O2):
@.str = [14 x i8] c"getswitchname\00"
define i8* @switch_name(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @req_swa_chars(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int uniquePaths(int, int);
int main() {
  printf("%d", uniquePaths(5, 8));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @uniquePaths(i32 5, i32 8)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_slli_pi32(int /*<<< orphan*/, int);
__m64 test68(__m64 a) { return _mm_slli_pi32(a, 3); }


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

x86 assembly (clang, -O2):
<test68>:
mov    $0x3,%esi
jmp    1030 <_mm_slli_pi32@plt>

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

LLVM IR (-O2):
define i32 @test68(i32 %0) {
%2 = tail call i32 @_mm_slli_pi32(i32 %0, i32 3)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ psCryptoClose();
void matrixSslClose(void) { psCryptoClose(); }


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

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

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

LLVM IR (-O2):
define void @matrixSslClose() {
%1 = tail call i32 (...) @psCryptoClose()
ret void
}
/* Variables and functions */
scalar_t__ calloc(int, int);
float *vectorAverageNewVectorArray(unsigned int numelements) {
  return (float *)calloc(2 * numelements, sizeof(float));
}


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

x86 assembly (clang, -O2):
<vectorAverageNewVectorArray>:
add    %edi,%edi
mov    $0x4,%esi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define float* @vectorAverageNewVectorArray(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 2, %3
%5 = call i64 @calloc(i32 %4, i32 4)
%6 = inttoptr i64 %5 to float*
ret float* %6
}

LLVM IR (-O2):
define float* @vectorAverageNewVectorArray(i32 %0) {
%2 = shl i32 %0, 1
%3 = tail call i64 @calloc(i32 %2, i32 4)
%4 = inttoptr i64 %3 to float*
ret float* %4
}
/* Variables and functions */
unsigned int recur_add(unsigned int, unsigned int);
unsigned int recur_mul(unsigned int n, unsigned int a) {
  return (n > 1) ? recur_add(a, recur_mul(--n, a)) : a;
}


x86 assembly (clang, -O0):
<recur_mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jbe    1161 <recur_mul+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
add    $0xffffffff,%edi
mov    %edi,-0x4(%rbp)
mov    -0x8(%rbp),%esi
call   1040 <recur_mul@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1030 <recur_add@plt>
mov    %eax,-0xc(%rbp)
jmp    1167 <recur_mul+0x47>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recur_mul>:
push   %rbx
mov    %esi,%ebx
cmp    $0x1,%edi
jbe    113c <recur_mul+0x1c>
add    $0xffffffff,%edi
mov    %ebx,%esi
call   1040 <recur_mul@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <recur_add@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @recur_mul(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 = icmp ugt i32 %5, 1
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = add i32 %9, -1
store i32 %10, i32* %3
%11 = load i32, i32* %4
%12 = call i32 @recur_mul(i32 %10, i32 %11)
%13 = call i32 @recur_add(i32 %8, i32 %12)
br label %16
14: ; preds = %2
%15 = load i32, i32* %4
br label %16
16: ; preds = %14, %7
%17 = phi i32 [ %13, %7 ], [ %15, %14 ]
ret i32 %17
}

LLVM IR (-O2):
define i32 @recur_mul(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, 1
br i1 %3, label %6, label %4
4: ; preds = %2, %6
%5 = phi i32 [ %9, %6 ], [ %1, %2 ]
ret i32 %5
6: ; preds = %2
%7 = add i32 %0, -1
%8 = tail call i32 @recur_mul(i32 %7, i32 %1)
%9 = tail call i32 @recur_add(i32 %1, i32 %8)
br label %4
}
int test_imm_B4int64_midword_reg(long long val) {
  return ((val >> 16) & (0xB4 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_B4int64_midword_reg>:
test   $0xb40000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_B4int64_midword_reg(i64 %0) {
%2 = and i64 %0, 11796480
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
double dsfmt_gv_genrand_close1_open2();
double dsfmt_gv_genrand_open_close(void) {
  return 2.0 - dsfmt_gv_genrand_close1_open2();
}


x86 assembly (clang, -O0):
<dsfmt_gv_genrand_open_close>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dsfmt_gv_genrand_close1_open2@plt>
movaps %xmm0,%xmm1
movsd  0xeda(%rip),%xmm0
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dsfmt_gv_genrand_open_close>:
push   %rax
xor    %eax,%eax
call   1030 <dsfmt_gv_genrand_close1_open2@plt>
movsd  0xee0(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @dsfmt_gv_genrand_open_close() {
%1 = call double (...) @dsfmt_gv_genrand_close1_open2()
%2 = fsub double 2.000000e+00, %1
ret double %2
}

LLVM IR (-O2):
define double @dsfmt_gv_genrand_open_close() {
%1 = tail call double (...) @dsfmt_gv_genrand_close1_open2()
%2 = fsub double 2.000000e+00, %1
ret double %2
}
void set_field_value(const struct sample *sample, unsigned field, int value) {
  int *is = (int *)sample;
  is[field] = value;
}


x86 assembly (clang, -O0):
<set_field_value>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_field_value>:
mov    %esi,%eax
mov    %edx,(%rdi,%rax,4)
ret

LLVM IR (-O0):
%struct.sample = type opaque
define void @set_field_value(%struct.sample* %0, i32 %1, i32 %2) {
%4 = alloca %struct.sample*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
store %struct.sample* %0, %struct.sample** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load %struct.sample*, %struct.sample** %4
%9 = bitcast %struct.sample* %8 to i32*
store i32* %9, i32** %7
%10 = load i32, i32* %6
%11 = load i32*, i32** %7
%12 = load i32, i32* %5
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
store i32 %10, i32* %14
ret void
}

LLVM IR (-O2):
%struct.sample = type opaque
define void @set_field_value(%struct.sample* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = bitcast %struct.sample* %0 to i32*
%5 = zext i32 %1 to i64
%6 = getelementptr inbounds i32, i32* %4, i64 %5
store i32 %2, i32* %6
ret void
}
int gpa_det(double x) { return (int)100 * x; }


x86 assembly (clang, -O0):
<gpa_det>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpa_det>:
mulsd  0xef8(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @gpa_det(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 1.000000e+02, %3
%5 = fptosi double %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @gpa_det(double %0) {
%2 = fmul double %0, 1.000000e+02
%3 = fptosi double %2 to i32
ret i32 %3
}
/* Variables and functions */
int shim_enosys(int /*<<< orphan*/, int);
int shim_pkey_get(int pkey) { return shim_enosys(0, pkey); }


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

x86 assembly (clang, -O2):
<shim_pkey_get>:
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

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

LLVM IR (-O2):
define i32 @shim_pkey_get(i32 %0) {
%2 = tail call i32 @shim_enosys(i32 0, i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ arch_poparg(int, int);
void emit_poparg(int arg, int reg) { arch_poparg(arg, reg); }


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

x86 assembly (clang, -O2):
<emit_poparg>:
jmp    1030 <arch_poparg@plt>

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

LLVM IR (-O2):
define void @emit_poparg(i32 %0, i32 %1) {
%3 = tail call i32 @arch_poparg(i32 %0, i32 %1)
ret void
}