xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fexpect(char *, int, int, int);
void test_bool() {
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/arith.c",
          63, 0, !1);
  ;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/arith.c",
          64, 1, !0);
  ;
}


x86 assembly (clang, -O0):
<test_bool>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x3f,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <fexpect@plt>
lea    0xed0(%rip),%rdi
mov    $0x40,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <fexpect@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bool>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x3f,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x40,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
pop    %rbx
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
@.str = [128 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/arith.c\00"
define void @test_bool() {
%1 = call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 63, i32 0, i32 0)
%2 = call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 64, i32 1, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [128 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/arith.c\00"
define void @test_bool() {
%1 = tail call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 63, i32 0, i32 0)
%2 = tail call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 64, i32 1, i32 1)
ret void
}
/* Type definitions */
struct __locale_t {
  int dummy;
};

/* Variables and functions */
int strcmp(char const *, char const *);
int strcoll_l(const char *a, const char *b, struct __locale_t *locale) {
  return strcmp(a, b);
}


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

x86 assembly (clang, -O2):
<strcoll_l>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
%struct.__locale_t = type { i32 }
define i32 @strcoll_l(i8* %0, i8* %1, %struct.__locale_t* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.__locale_t*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.__locale_t* %2, %struct.__locale_t** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i32 @strcmp(i8* %7, i8* %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.__locale_t = type { i32 }
define i32 @strcoll_l(i8* nocapture %0, i8* nocapture %1, %struct.__locale_t* nocapture readnone %2) {
%4 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %4
}
/* Type definitions */
typedef double uint32_t;

/* Variables and functions */
double ts2dtime(uint32_t ts_sec, uint32_t ts_usec) {
  return ts_sec + ((double)ts_usec) / 1000000.0;
}


x86 assembly (clang, -O0):
<ts2dtime>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xee0(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts2dtime>:
divsd  0xef8(%rip),%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @ts2dtime(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fdiv double %6, 1.000000e+06
%8 = fadd double %5, %7
ret double %8
}

LLVM IR (-O2):
define double @ts2dtime(double %0, double %1) {
%3 = fdiv double %1, 1.000000e+06
%4 = fadd double %3, %0
ret double %4
}
void TCPEnd() {}


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

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

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

LLVM IR (-O2):
define void @TCPEnd() {
ret void
}
/* Variables and functions */
char *alloca(int);
int /*<<< orphan*/ link_error();
int main(int argc, char *argv[]) {
  char *foo;
  if ((foo = alloca(argc)) == 0)
    link_error();
  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)
mov    -0x8(%rbp),%edi
call   1030 <alloca@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1153 <main+0x33>
mov    $0x0,%al
call   1040 <link_error@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <alloca@plt>
test   %rax,%rax
jne    1132 <main+0x12>
xor    %eax,%eax
call   1040 <link_error@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = call i8* @alloca(i32 %7)
store i8* %8, i8** %6
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 (...) @link_error()
br label %12
12: ; preds = %10, %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @alloca(i32 %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @link_error()
br label %7
7: ; preds = %5, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void run_system_test() { system("/bin/echo system"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"/bin/echo system\00"
define void @run_system_test() {
%1 = call i32 @system(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"/bin/echo system\00"
define void @run_system_test() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
void IGUR() {}


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

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

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

LLVM IR (-O2):
define void @IGUR() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char const *, int);
void out(int n) {
  const char *chars = "****++++++----  ";
  write(1, chars + (n / 16), 1);
}


x86 assembly (clang, -O0):
<out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cltq
add    %rax,%rsi
mov    $0x1,%edx
mov    %edx,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out>:
lea    0xf(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0x4,%eax
cltq
lea    0xedc(%rip),%rsi
add    %rax,%rsi
mov    $0x1,%edi
mov    $0x1,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"****++++++---- \00"
define void @out(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %3
%5 = load i32, i32* %2
%6 = sdiv i32 %5, 16
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %4, i64 %7
%9 = call i32 @write(i32 1, i8* %8, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"****++++++---- \00"
define void @out(i32 %0) {
%2 = sdiv i32 %0, 16
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %3
%5 = tail call i32 @write(i32 1, i8* %4, i32 1)
ret void
}
void foo355() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_spin_type_get_type() {
ret void
}
/* Variables and functions */
int abs(int);
int Gcd(int m, int n) {
  int temp = 0;
  m = abs(m);
  n = abs(n);
  while (n > 0) {
    temp = n;
    n = m % n;
    m = temp;
  }
  return m;
}


x86 assembly (clang, -O0):
<Gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1160 <Gcd+0x50>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113b <Gcd+0x2b>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Gcd>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
test   %esi,%esi
je     112e <Gcd+0x2e>
mov    %esi,%edx
neg    %edx
cmovs  %esi,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edx,%ecx
xor    %edx,%edx
div    %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1120 <Gcd+0x20>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @Gcd(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%4 = icmp eq i32 %1, 0
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = tail call i32 @llvm.abs.i32(i32 %1, i1 true)
br label %7
7: ; preds = %5, %7
%8 = phi i32 [ %10, %7 ], [ %6, %5 ]
%9 = phi i32 [ %8, %7 ], [ %3, %5 ]
%10 = urem i32 %9, %8
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %7
12: ; preds = %7, %2
%13 = phi i32 [ %3, %2 ], [ %8, %7 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "%s\n%s\n", "usage: newkey -h hostname",
                "       newkey -u username");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [26 x i8] c"usage: newkey -h hostname\00"
@.str.2 = [26 x i8] c" newkey -u username\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [26 x i8] c"usage: newkey -h hostname\00"
@.str.2 = [26 x i8] c" newkey -u username\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_assume(int);
int /*<<< orphan*/ assert(int);
int main() {
  int x = 0;
  int y = 0;
  int z = 0;
  int w = 0;
  __ESBMC_assume(y - x >= 0 && x - w <= 0 && y - 100 * x <= 0);
  if (x >= 4)
    assert(y > 2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0xc(%rbp),%ecx
sub    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x15(%rbp)
jl     1185 <main+0x65>
mov    -0x8(%rbp),%ecx
sub    -0x14(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x15(%rbp)
jg     1185 <main+0x65>
mov    -0xc(%rbp),%eax
imul   $0x64,-0x8(%rbp),%ecx
sub    %ecx,%eax
cmp    $0x0,%eax
setle  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__ESBMC_assume@plt>
cmpl   $0x4,-0x8(%rbp)
jl     11ad <main+0x8d>
cmpl   $0x2,-0xc(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <__ESBMC_assume@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
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = sub nsw i32 %6, %7
%9 = icmp sge i32 %8, 0
br i1 %9, label %10, label %21
10: ; preds = %0
%11 = load i32, i32* %2
%12 = load i32, i32* %5
%13 = sub nsw i32 %11, %12
%14 = icmp sle i32 %13, 0
br i1 %14, label %15, label %21
15: ; preds = %10
%16 = load i32, i32* %3
%17 = load i32, i32* %2
%18 = mul nsw i32 100, %17
%19 = sub nsw i32 %16, %18
%20 = icmp sle i32 %19, 0
br label %21
21: ; preds = %15, %10, %0
%22 = phi i1 [ false, %10 ], [ false, %0 ], [ %20, %15 ]
%23 = zext i1 %22 to i32
%24 = call i32 @__ESBMC_assume(i32 %23)
%25 = load i32, i32* %2
%26 = icmp sge i32 %25, 4
br i1 %26, label %27, label %32
27: ; preds = %21
%28 = load i32, i32* %3
%29 = icmp sgt i32 %28, 2
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
br label %32
32: ; preds = %27, %21
%33 = load i32, i32* %1
ret i32 %33
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__ESBMC_assume(i32 1)
ret i32 0
}
int func(void) {
  int n = 3;
  int m = 5;
  n ^= m;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
const char *_mesa_lookup_prim_by_nr(unsigned nr) { return ""; }


x86 assembly (clang, -O0):
<_mesa_lookup_prim_by_nr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mesa_lookup_prim_by_nr>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @_mesa_lookup_prim_by_nr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @_mesa_lookup_prim_by_nr(i32 %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
void arm_case(int i, unsigned tar, unsigned arg1, unsigned arg2) {}


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

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

LLVM IR (-O0):
define void @arm_case(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @arm_case(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glOrtho(int, int, double, double, int, int);
void geom(int w, int h) {
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glOrtho(-2, 2, -1.5, 1.5, -30, 30);
  glMatrixMode(GL_MODELVIEW);
}


x86 assembly (clang, -O0):
<geom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1050 <glLoadIdentity@plt>
mov    $0xfffffffe,%edi
mov    $0x2,%esi
movsd  0xe9b(%rip),%xmm0
movsd  0xe9b(%rip),%xmm1
mov    $0xffffffe2,%edx
mov    $0x1e,%ecx
call   1040 <glOrtho@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1050 <glLoadIdentity@plt>
movsd  0xeb2(%rip),%xmm0
movsd  0xeb2(%rip),%xmm1
mov    $0xfffffffe,%edi
mov    $0x2,%esi
mov    $0xffffffe2,%edx
mov    $0x1e,%ecx
call   1040 <glOrtho@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <glMatrixMode@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @geom(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @GL_PROJECTION
%6 = call i32 @glMatrixMode(i32 %5)
%7 = call i32 (...) @glLoadIdentity()
%8 = call i32 @glOrtho(i32 -2, i32 2, double -1.500000e+00, double 1.500000e+00, i32 -30, i32 30)
%9 = load i32, i32* @GL_MODELVIEW
%10 = call i32 @glMatrixMode(i32 %9)
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @geom(i32 %0, i32 %1) {
%3 = load i32, i32* @GL_PROJECTION
%4 = tail call i32 @glMatrixMode(i32 %3)
%5 = tail call i32 (...) @glLoadIdentity()
%6 = tail call i32 @glOrtho(i32 -2, i32 2, double -1.500000e+00, double 1.500000e+00, i32 -30, i32 30)
%7 = load i32, i32* @GL_MODELVIEW
%8 = tail call i32 @glMatrixMode(i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello\n");
  printf("IT KMITL");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str.1 = [9 x i8] c"IT KMITL\00"
@str = [6 x i8] c"Hello\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
unsigned int GPMCWaitPinStatusGet(unsigned int baseAddr, unsigned int pin) {
  unsigned int pinStatus;
  pinStatus = 0;
  if (pin == (0)) {
    pinStatus =
        (((*((volatile unsigned int *)(baseAddr + (0x54)))) & (0x00000100u)) >>
         (0x00000008u));
  } else if (pin == (1)) {
    pinStatus =
        (((*((volatile unsigned int *)(baseAddr + (0x54)))) & (0x00000200u)) >>
         (0x00000009u));
  }
  return (pinStatus);
}


x86 assembly (clang, -O0):
<GPMCWaitPinStatusGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1135 <GPMCWaitPinStatusGet+0x35>
mov    -0x4(%rbp),%eax
add    $0x54,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x100,%eax
shr    $0x8,%eax
mov    %eax,-0xc(%rbp)
jmp    1159 <GPMCWaitPinStatusGet+0x59>
cmpl   $0x1,-0x8(%rbp)
jne    1154 <GPMCWaitPinStatusGet+0x54>
mov    -0x4(%rbp),%eax
add    $0x54,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x200,%eax
shr    $0x9,%eax
mov    %eax,-0xc(%rbp)
jmp    1159 <GPMCWaitPinStatusGet+0x59>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPMCWaitPinStatusGet>:
test   %esi,%esi
je     1112 <GPMCWaitPinStatusGet+0x12>
xor    %eax,%eax
cmp    $0x1,%esi
jne    1121 <GPMCWaitPinStatusGet+0x21>
mov    $0x9,%ecx
jmp    1117 <GPMCWaitPinStatusGet+0x17>
mov    $0x8,%ecx
add    $0x54,%edi
mov    (%rdi),%eax
shr    %cl,%eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @GPMCWaitPinStatusGet(i32 %0, i32 %1) {
switch i32 %1, label %12 [
i32 0, label %4
i32 1, label %3
]
3: ; preds = %2
br label %4
4: ; preds = %2, %3
%5 = phi i32 [ 9, %3 ], [ 8, %2 ]
%6 = add i32 %0, 84
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = lshr i32 %9, %5
%11 = and i32 %10, 1
br label %12
12: ; preds = %4, %2
%13 = phi i32 [ 0, %2 ], [ %11, %4 ]
ret i32 %13
}
int test_imm_9Buint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x9B << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_9Buint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 155
%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_9Buint64_midword_reg(i64 %0) {
%2 = and i64 %0, 10158080
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void usage(char *p) {
  printf("%s : %s arg1 arg2 arg3... \n arg1: is filepath ,if the filepath is "
         "absolutely path must use F/xx/xx \n arg2: is the key-value number \n "
         "other is the key-value list",
         p, p);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
mov    %rdx,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [161 x i8] c"%s : %s arg1 arg2 arg3... \0A arg1: is filepath ,if the filepath is absolutely path must use F/xx/xx \0A arg2: is the key-value number \0A other is the key-value list\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [161 x i8] c"%s : %s arg1 arg2 arg3... \0A arg1: is filepath ,if the filepath is absolutely path must use F/xx/xx \0A arg2: is the key-value number \0A other is the key-value list\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart0SendChar(int /*<<< orphan*/);
void uart0SendString(unsigned char *pString) {
  while (*pString)
    uart0SendChar(*pString++);
}


x86 assembly (clang, -O0):
<uart0SendString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <uart0SendString+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%edi
call   1030 <uart0SendChar@plt>
jmp    111c <uart0SendString+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart0SendString>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <uart0SendString+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movzbl %al,%edi
call   1030 <uart0SendChar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <uart0SendString+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @uart0SendString(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = zext i8 %5 to i32
%9 = tail call i32 @uart0SendChar(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
void *intToPointerCast3() { return (void *)(1 + 3); }


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

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

LLVM IR (-O0):
define i8* @intToPointerCast3() {
ret i8* inttoptr (i64 4 to i8*)
}

LLVM IR (-O2):
define i8* @intToPointerCast3() {
ret i8* inttoptr (i64 4 to i8*)
}
/* Variables and functions */
int duplicate_func();
int func();
int main(int argc, char **argv) { return duplicate_func() + func(); }


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)
mov    $0x0,%al
call   1030 <duplicate_func@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <func@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <duplicate_func@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <func@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
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 (...) @duplicate_func()
%7 = call i32 (...) @func()
%8 = add nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @duplicate_func()
%4 = tail call i32 (...) @func()
%5 = add nsw i32 %4, %3
ret i32 %5
}
int precheck_shutdown(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @precheck_shutdown() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **args) {
  printf("Hello World!! \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 = [16 x i8] c"Hello World!! \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 ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"Hello World!! \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void __raw_writel(unsigned int value, unsigned int ptr) {
  *((volatile unsigned int *)ptr) = value;
}


x86 assembly (clang, -O0):
<__raw_writel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__raw_writel>:
mov    %esi,%eax
mov    %edi,(%rax)
ret

LLVM IR (-O0):
define void @__raw_writel(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 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
store volatile i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @__raw_writel(i32 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = inttoptr i64 %3 to i32*
store volatile i32 %0, i32* %4
ret void
}
/* Variables and functions */
long double asind(long double);
long double asind_neg(long double x) { return -asind(x); }


x86 assembly (clang, -O0):
<asind_neg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <asind@plt>
fchs
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asind_neg>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <asind@plt>
fchs
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @asind_neg(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @asind(x86_fp80 %3)
%5 = fneg x86_fp80 %4
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @asind_neg(x86_fp80 %0) {
%2 = tail call x86_fp80 @asind(x86_fp80 %0)
%3 = fneg x86_fp80 %2
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ overflow(int);
int main(void) { overflow(2); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <overflow@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1030 <overflow@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @overflow(i32 2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @overflow(i32 2)
ret i32 0
}
/* Variables and functions */
int syscall(int, unsigned int);
int uv__eventfd(unsigned int count) { return syscall(284, count); }


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

x86 assembly (clang, -O2):
<uv__eventfd>:
mov    %edi,%esi
mov    $0x11c,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @uv__eventfd(i32 %0) {
%2 = tail call i32 @syscall(i32 284, i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ xgamma(int /*<<< orphan*/ *);
int /*<<< orphan*/ xpi1(int /*<<< orphan*/ *);
int /*<<< orphan*/ xpi2(int /*<<< orphan*/ *);
int /*<<< orphan*/ xtheta(int /*<<< orphan*/ *);
void xrho(uint32_t *p) {
  xtheta(p);
  xpi1(p);
  xgamma(p);
  xpi2(p);
}


x86 assembly (clang, -O0):
<xrho>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <xtheta@plt>
mov    -0x8(%rbp),%rdi
call   1060 <xpi1@plt>
mov    -0x8(%rbp),%rdi
call   1050 <xgamma@plt>
mov    -0x8(%rbp),%rdi
call   1040 <xpi2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrho>:
push   %rbx
mov    %rdi,%rbx
call   1030 <xtheta@plt>
mov    %rbx,%rdi
call   1060 <xpi1@plt>
mov    %rbx,%rdi
call   1050 <xgamma@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <xpi2@plt>

LLVM IR (-O0):
define void @xrho(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @xtheta(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @xpi1(i32* %5)
%7 = load i32*, i32** %2
%8 = call i32 @xgamma(i32* %7)
%9 = load i32*, i32** %2
%10 = call i32 @xpi2(i32* %9)
ret void
}

LLVM IR (-O2):
define void @xrho(i32* %0) {
%2 = tail call i32 @xtheta(i32* %0)
%3 = tail call i32 @xpi1(i32* %0)
%4 = tail call i32 @xgamma(i32* %0)
%5 = tail call i32 @xpi2(i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ *fmemopen(char *, size_t, char *);
size_t strlen(char const *);
FILE *memfile_from_string(const char *value) {
  size_t file_size = strlen(value);
  FILE *result = fmemopen((char *)value, file_size, "r");
  assert(result != NULL);
  return result;
}


x86 assembly (clang, -O0):
<memfile_from_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xea8(%rip),%rdx
call   1030 <fmemopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memfile_from_string>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0xec0(%rip),%rdx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <fmemopen@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1050 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32* @memfile_from_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i32*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
store i64 %6, i64* %3
%7 = load i8*, i8** %2
%8 = load i64, i64* %3
%9 = call i32* @fmemopen(i8* %7, i64 %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %9, i32** %4
%10 = load i32*, i32** %4
%11 = icmp ne i32* %10, null
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i32*, i32** %4
ret i32* %14
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32* @memfile_from_string(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = tail call i32* @fmemopen(i8* %0, i64 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = icmp ne i32* %3, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret i32* %3
}
void console_finish() {}


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

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

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

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

/* Variables and functions */
int should_keep_alive(struct mg_connection *);
const char *suggest_connection_header(struct mg_connection *conn) {
  int rv = should_keep_alive(conn);
  ;
  return rv ? "keep-alive" : "close";
}


x86 assembly (clang, -O0):
<suggest_connection_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <should_keep_alive@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edx
lea    0xed9(%rip),%rax
lea    0xec7(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suggest_connection_header>:
push   %rax
call   1030 <should_keep_alive@plt>
test   %eax,%eax
lea    0xeec(%rip),%rcx
lea    0xeda(%rip),%rax
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.mg_connection = type { i32 }
@.str = [11 x i8] c"keep-alive\00"
@.str.1 = [6 x i8] c"close\00"
define i8* @suggest_connection_header(%struct.mg_connection* %0) {
%2 = alloca %struct.mg_connection*
%3 = alloca i32
store %struct.mg_connection* %0, %struct.mg_connection** %2
%4 = load %struct.mg_connection*, %struct.mg_connection** %2
%5 = call i32 @should_keep_alive(%struct.mg_connection* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
ret i8* %9
}

LLVM IR (-O2):
%struct.mg_connection = type { i32 }
@.str = [11 x i8] c"keep-alive\00"
@.str.1 = [6 x i8] c"close\00"
define i8* @suggest_connection_header(%struct.mg_connection* %0) {
%2 = tail call i32 @should_keep_alive(%struct.mg_connection* %0)
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
ret i8* %4
}
/* Type definitions */
struct iphdr {
  int protocol;
};
struct ethhdr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_tcp_packet(unsigned char *, int);
void process_packet(unsigned char *buffer, int size) {
  struct iphdr *iph = (struct iphdr *)(buffer + sizeof(struct ethhdr));
  switch (iph->protocol) {
  case 6:
    print_tcp_packet(buffer, size);
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<process_packet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
sub    $0x6,%eax
jne    1150 <process_packet+0x40>
jmp    113f <process_packet+0x2f>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <print_tcp_packet@plt>
jmp    1155 <process_packet+0x45>
jmp    1155 <process_packet+0x45>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_packet>:
cmpl   $0x6,0x4(%rdi)
jne    111b <process_packet+0xb>
jmp    1030 <print_tcp_packet@plt>
ret

LLVM IR (-O0):
%struct.iphdr = type { i32 }
define void @process_packet(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca %struct.iphdr*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 4
%8 = bitcast i8* %7 to %struct.iphdr*
store %struct.iphdr* %8, %struct.iphdr** %5
%9 = load %struct.iphdr*, %struct.iphdr** %5
%10 = getelementptr inbounds %struct.iphdr, %struct.iphdr* %9, i32 0, i32 0
%11 = load i32, i32* %10
switch i32 %11, label %16 [
i32 6, label %12
]
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = call i32 @print_tcp_packet(i8* %13, i32 %14)
br label %17
16: ; preds = %2
br label %17
17: ; preds = %16, %12
ret void
}

LLVM IR (-O2):
define void @process_packet(i8* %0, i32 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 4
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 6
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @print_tcp_packet(i8* %0, i32 %1)
br label %9
9: ; preds = %2, %7
ret void
}
int clip(int i, int limit) {
  if (i < 0)
    return 0;
  if (limit <= i)
    return limit;
  return i;
}


x86 assembly (clang, -O0):
<clip>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1120 <clip+0x20>
movl   $0x0,-0x4(%rbp)
jmp    113d <clip+0x3d>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1137 <clip+0x37>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113d <clip+0x3d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clip>:
cmp    %edi,%esi
cmovg  %edi,%esi
xor    %eax,%eax
test   %edi,%edi
cmovns %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @clip(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 0
%4 = icmp sgt i32 %1, %0
%5 = select i1 %4, i32 %0, i32 %1
%6 = select i1 %3, i32 0, i32 %5
ret i32 %6
}
int do_782() { return 782; }


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

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

LLVM IR (-O0):
define i32 @do_782() {
ret i32 782
}

LLVM IR (-O2):
define i32 @do_782() {
ret i32 782
}
float quadratic_ease_out(float p) { return -(p * (p - 2.0f)); }


x86 assembly (clang, -O0):
<quadratic_ease_out>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
movss  0xee5(%rip),%xmm2
subss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<quadratic_ease_out>:
movss  0xef8(%rip),%xmm1
addss  %xmm0,%xmm1
xorps  0xefd(%rip),%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @quadratic_ease_out(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fsub float %4, 2.000000e+00
%6 = fmul float %3, %5
%7 = fneg float %6
ret float %7
}

LLVM IR (-O2):
define float @quadratic_ease_out(float %0) {
%2 = fadd float %0, -2.000000e+00
%3 = fneg float %2
%4 = fmul float %3, %0
ret float %4
}
/* Variables and functions */
const char *kallsyms_lookup(unsigned long addr, unsigned long *symbolsize,
                            unsigned long *offset, char **modname,
                            char *namebuf) {
  return NULL;
}


x86 assembly (clang, -O0):
<kallsyms_lookup>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @kallsyms_lookup(i64 %0, i64* %1, i64* %2, i8** %3, i8* %4) {
%6 = alloca i64
%7 = alloca i64*
%8 = alloca i64*
%9 = alloca i8**
%10 = alloca i8*
store i64 %0, i64* %6
store i64* %1, i64** %7
store i64* %2, i64** %8
store i8** %3, i8*** %9
store i8* %4, i8** %10
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @kallsyms_lookup(i64 %0, i64* nocapture readnone %1, i64* nocapture readnone %2, i8** nocapture readnone %3, i8* nocapture readnone %4) {
ret i8* null
}
int comparator_int(int *a, int *b) { return *a == *b ? 0 : *a < *b ? -1 : 1; }


x86 assembly (clang, -O0):
<comparator_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jne    1128 <comparator_int+0x28>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    1146 <comparator_int+0x46>
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    %esi,%edx
cmovl  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparator_int>:
mov    (%rdi),%eax
xor    %ecx,%ecx
xor    %edx,%edx
cmp    (%rsi),%eax
setge  %dl
lea    -0x1(%rdx,%rdx,1),%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @comparator_int(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = icmp eq i32 %6, %8
br i1 %9, label %10, label %11
10: ; preds = %2
br label %19
11: ; preds = %2
%12 = load i32*, i32** %3
%13 = load i32, i32* %12
%14 = load i32*, i32** %4
%15 = load i32, i32* %14
%16 = icmp slt i32 %13, %15
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 -1, i32 1
br label %19
19: ; preds = %11, %10
%20 = phi i32 [ 0, %10 ], [ %18, %11 ]
ret i32 %20
}

LLVM IR (-O2):
define i32 @comparator_int(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp eq i32 %3, %4
%6 = icmp slt i32 %3, %4
%7 = select i1 %6, i32 -1, i32 1
%8 = select i1 %5, i32 0, i32 %7
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ atomic_postadd_uint32_t(int /*<<< orphan*/ *, int);
uint32_t atomic_postinc_uint32_t(uint32_t *var) {
  return atomic_postadd_uint32_t(var, 1);
}


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

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

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

LLVM IR (-O2):
define i32 @atomic_postinc_uint32_t(i32* %0) {
%2 = tail call i32 @atomic_postadd_uint32_t(i32* %0, i32 1)
ret i32 %2
}
void unlinkdInit(void) { return; }


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

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

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

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