xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;
typedef int int64_t;

/* Variables and functions */
int vbudecode(int *, int /*<<< orphan*/ const *);
uint64_t vbidecode(int64_t *value, const uint8_t *buffer) {
  uint64_t nv, ret = vbudecode(&nv, buffer);
  *value = ((nv >> 1) ^ -(nv & 1));
  return ret;
}


x86 assembly (clang, -O0):
<vbidecode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdi
call   1030 <vbudecode@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%ecx
sar    $0x1,%ecx
mov    -0x14(%rbp),%edx
and    $0x1,%edx
xor    %eax,%eax
sub    %edx,%eax
xor    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vbidecode>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%rdi
call   1030 <vbudecode@plt>
mov    0xc(%rsp),%ecx
mov    %ecx,%edx
sar    %edx
and    $0x1,%ecx
neg    %ecx
xor    %edx,%ecx
mov    %ecx,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @vbidecode(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = call i32 @vbudecode(i32* %5, i32* %7)
store i32 %8, i32* %6
%9 = load i32, i32* %5
%10 = ashr i32 %9, 1
%11 = load i32, i32* %5
%12 = and i32 %11, 1
%13 = sub nsw i32 0, %12
%14 = xor i32 %10, %13
%15 = load i32*, i32** %3
store i32 %14, i32* %15
%16 = load i32, i32* %6
ret i32 %16
}

LLVM IR (-O2):
define i32 @vbidecode(i32* nocapture writeonly %0, i32* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @vbudecode(i32* %3, i32* %1)
%6 = load i32, i32* %3
%7 = ashr i32 %6, 1
%8 = and i32 %6, 1
%9 = sub nsw i32 0, %8
%10 = xor i32 %7, %9
store i32 %10, i32* %0
ret i32 %5
}
void
    __attribute__((__warning__("curl_easy_getinfo expects a pointer to "
                               "'struct curl_tlssessioninfo *' for this info")))
    __attribute__((__unused__)) __attribute__((__no__))
    _curl_easy_getinfo_err_curl_tlssesssioninfo(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_getinfo_err_curl_tlssesssioninfo() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *argv0) {
  fprintf(stderr, "%s [-points] [-strip] [<dice>]\n", argv0);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"%s [-points] [-strip] [<dice>]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"%s [-points] [-strip] [<dice>]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int compare_func(const void *a, const void *b) { return *(int *)a - *(int *)b; }


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

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

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

LLVM IR (-O2):
define i32 @compare_func(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_119() {
  Assert_real((isqrt(119) == 10),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              600, ("Integer square root of 119 should be 10"));
}


x86 assembly (clang, -O0):
<t_sqrt_119>:
push   %rbp
mov    %rsp,%rbp
mov    $0x77,%edi
call   1030 <isqrt@plt>
cmp    $0xa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x258,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_119>:
push   %rax
mov    $0x77,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xa,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x258,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 119 should be 10\00"
define void @t_sqrt_119() {
%1 = call i32 @isqrt(i32 119)
%2 = icmp eq i32 %1, 10
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 600, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 119 should be 10\00"
define void @t_sqrt_119() {
%1 = tail call i32 @isqrt(i32 119)
%2 = icmp eq i32 %1, 10
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 600, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
float ipow(float x, int n) {
  float res = 1;
  for (; n; n >>= 1) {
    if (n & 1)
      res *= x;
    x *= x;
  }
  return res;
}


x86 assembly (clang, -O0):
<ipow>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movss  0xeec(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     115e <ipow+0x5e>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1141 <ipow+0x41>
movss  -0x4(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <ipow+0x19>
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipow>:
test   %edi,%edi
je     1145 <ipow+0x45>
movss  0xef4(%rip),%xmm2
movaps %xmm2,%xmm1
jmp    1133 <ipow+0x33>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mulss  %xmm3,%xmm1
mulss  %xmm0,%xmm0
mov    %edi,%eax
sar    %eax
cmp    $0x1,%edi
mov    %eax,%edi
jbe    1141 <ipow+0x41>
movaps %xmm2,%xmm3
test   $0x1,%dil
je     1120 <ipow+0x20>
movaps %xmm0,%xmm3
jmp    1120 <ipow+0x20>
movaps %xmm1,%xmm0
ret
movss  0xeb3(%rip),%xmm0
ret

LLVM IR (-O0):
define float @ipow(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca float
store float %0, float* %3
store i32 %1, i32* %4
store float 1.000000e+00, float* %5
br label %6
6: ; preds = %21, %2
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %24
9: ; preds = %6
%10 = load i32, i32* %4
%11 = and i32 %10, 1
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %9
%14 = load float, float* %3
%15 = load float, float* %5
%16 = fmul float %15, %14
store float %16, float* %5
br label %17
17: ; preds = %13, %9
%18 = load float, float* %3
%19 = load float, float* %3
%20 = fmul float %19, %18
store float %20, float* %3
br label %21
21: ; preds = %17
%22 = load i32, i32* %4
%23 = ashr i32 %22, 1
store i32 %23, i32* %4
br label %6
24: ; preds = %6
%25 = load float, float* %5
ret float %25
}

LLVM IR (-O2):
define float @ipow(float %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %15, label %4
4: ; preds = %2, %4
%5 = phi float [ %11, %4 ], [ 1.000000e+00, %2 ]
%6 = phi i32 [ %13, %4 ], [ %1, %2 ]
%7 = phi float [ %12, %4 ], [ %0, %2 ]
%8 = and i32 %6, 1
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, float 1.000000e+00, float %7
%11 = fmul float %5, %10
%12 = fmul float %7, %7
%13 = ashr i32 %6, 1
%14 = icmp ult i32 %6, 2
br i1 %14, label %15, label %4
15: ; preds = %4, %2
%16 = phi float [ 1.000000e+00, %2 ], [ %11, %4 ]
ret float %16
}
int BSEG_CheckUnselected(char *pcFileName) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @BSEG_CheckUnselected(i8* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ fib(int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void main() { printf("%lu\n", fib(38)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x26,%edi
call   1040 <fib@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"%lu\0A\00"
define void @main() {
%1 = call i32 @fib(i32 38)
%2 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lu\0A\00"
define void @main() {
%1 = tail call i32 @fib(i32 38)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ btree_keyval(int, int /*<<< orphan*/, char *);
int /*<<< orphan*/ btree_prevkey(int, int /*<<< orphan*/);
int g_prev_fileobject(int file_id, char *label) {
  if (!btree_prevkey(file_id, 0))
    return -1;
  btree_keyval(file_id, 0, label);
  label[32] = '\0';
  return 0;
}


x86 assembly (clang, -O0):
<g_prev_fileobject>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1030 <btree_prevkey@plt>
cmp    $0x0,%eax
jne    114e <g_prev_fileobject+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <g_prev_fileobject+0x4b>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1040 <btree_keyval@plt>
mov    -0x10(%rbp),%rax
movb   $0x0,0x20(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_prev_fileobject>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %r14d,%r14d
xor    %esi,%esi
call   1030 <btree_prevkey@plt>
test   %eax,%eax
je     1149 <g_prev_fileobject+0x29>
mov    %ebp,%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1040 <btree_keyval@plt>
movb   $0x0,0x20(%rbx)
jmp    114f <g_prev_fileobject+0x2f>
mov    $0xffffffff,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @g_prev_fileobject(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = call i32 @btree_prevkey(i32 %6, i32 0)
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %2
store i32 -1, i32* %3
br label %16
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i8*, i8** %5
%13 = call i32 @btree_keyval(i32 %11, i32 0, i8* %12)
%14 = load i8*, i8** %5
%15 = getelementptr inbounds i8, i8* %14, i64 32
store i8 0, i8* %15
store i32 0, i32* %3
br label %16
16: ; preds = %10, %9
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @g_prev_fileobject(i32 %0, i8* %1) {
%3 = tail call i32 @btree_prevkey(i32 %0, i32 0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @btree_keyval(i32 %0, i32 0, i8* %1)
%7 = getelementptr inbounds i8, i8* %1, i64 32
store i8 0, i8* %7
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ 0, %5 ], [ -1, %2 ]
ret i32 %9
}
int int_max(int x, int y) { return x > y ? x : y; }


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

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

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

LLVM IR (-O2):
define i32 @int_max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, int);
void memmove1() {
  char src[] = {1, 2, 3, 4};
  char dst[10];
  memmove(dst, src, 5);
}


x86 assembly (clang, -O0):
<memmove1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee2(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0xe(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x5,%edx
call   1030 <memmove@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memmove1>:
sub    $0x18,%rsp
movl   $0x4030201,0x8(%rsp)
04
lea    0xe(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    $0x5,%edx
call   1030 <memmove@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.memmove1.src = [4 x i8] c"\01\02\03\04"
define void @memmove1() {
%1 = alloca [4 x i8]
%2 = alloca [10 x i8]
%3 = bitcast [4 x i8]* %1 to i8*
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%6 = call i32 @memmove(i8* %4, i8* %5, i32 5)
ret void
}

LLVM IR (-O2):
define void @memmove1() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = bitcast i32* %1 to i8*
store i32 67305985, i32* %1
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = call i32 @memmove(i8* %4, i8* %3, i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(
      stderr, "%s\n%s\n",
      "usage: renice priority [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...]",
      "       renice -n increment [[-p] pid ...] [[-g] pgrp ...] [[-u] user "
      "...]");
  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    0xf0b(%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    0xf0e(%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 = [70 x i8] c"usage: renice priority [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...]\00"
@.str.2 = [74 x i8] c" renice -n increment [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...]\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 ([70 x i8], [70 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([74 x i8], [74 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 = [70 x i8] c"usage: renice priority [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...]\00"
@.str.2 = [74 x i8] c" renice -n increment [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...]\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 ([70 x i8], [70 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
__attribute__((always_)) void vmk_CPUEnsureClearDF(void) {
  __asm__ __volatile__("cld\n\t");
}


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

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

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

LLVM IR (-O2):
define void @vmk_CPUEnsureClearDF() {
tail call void asm sideeffect "cld\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
void SIG_ERR(int);
void (*signal(int sig, void (*func)(int)))(int) { return SIG_ERR; }


x86 assembly (clang, -O0):
<signal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ece(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal>:
mov    0x2ed9(%rip),%rax
ret

LLVM IR (-O0):
define void (i32)* @signal(i32 %0, void (i32)* %1) {
%3 = alloca i32
%4 = alloca void (i32)*
store i32 %0, i32* %3
store void (i32)* %1, void (i32)** %4
ret void (i32)* @SIG_ERR
}

LLVM IR (-O2):
define void (i32)* @signal(i32 %0, void (i32)* nocapture readnone %1) {
ret void (i32)* @SIG_ERR
}
/* Variables and functions */
int count_substrings(char *, char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", count_substrings("bąnana", "na"));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
lea    0xeda(%rip),%rsi
call   1030 <count_substrings@plt>
lea    0xec5(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [8 x i8] c"b\C4\85nana\00"
@.str.2 = [3 x i8] c"na\00"
define i32 @main() {
%1 = tail call i32 @count_substrings(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ UciMenuProc();
void DoCommonEngine(int n) { UciMenuProc(); }


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

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

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

LLVM IR (-O2):
define void @DoCommonEngine(i32 %0) {
%2 = tail call i32 (...) @UciMenuProc()
ret void
}
void initialize_physics_engine(struct physics_engine *physics_engine,
                               struct error *err) {}


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

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

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

LLVM IR (-O2):
%struct.physics_engine = type opaque
%struct.error = type opaque
define void @initialize_physics_engine(%struct.physics_engine* nocapture %0, %struct.error* nocapture %1) {
ret void
}
void set_char(char *addr, int val) { *addr = val; }


x86 assembly (clang, -O0):
<set_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_char>:
mov    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_char(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
ret void
}
/* Variables and functions */
int isspace(char);
int is_separator(char c, char sep) {
  return (sep == ' ') ? isspace(c) : (c == sep);
}


x86 assembly (clang, -O0):
<is_separator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x20,%eax
jne    1142 <is_separator+0x32>
movsbl -0x1(%rbp),%edi
call   1030 <isspace@plt>
mov    %eax,-0x8(%rbp)
jmp    1157 <is_separator+0x47>
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_separator>:
cmp    $0x20,%sil
jne    111f <is_separator+0xf>
movsbl %dil,%edi
jmp    1030 <isspace@plt>
xor    %eax,%eax
cmp    %sil,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_separator(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 32
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8, i8* %3
%10 = call i32 @isspace(i8 signext %9)
br label %18
11: ; preds = %2
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = load i8, i8* %4
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %13, %15
%17 = zext i1 %16 to i32
br label %18
18: ; preds = %11, %8
%19 = phi i32 [ %10, %8 ], [ %17, %11 ]
ret i32 %19
}

LLVM IR (-O2):
define i32 @is_separator(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %1, 32
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @isspace(i8 signext %0)
br label %9
6: ; preds = %2
%7 = icmp eq i8 %0, %1
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %6, %4
%10 = phi i32 [ %5, %4 ], [ %8, %6 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ bladerf_log_set_verbosity(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int get_loglevel();
void __attribute__((destructor)) __bladerf_fini(void) {
  int log_level = get_loglevel();
  bladerf_log_set_verbosity(log_level);
  do {
    do {
    } while (0);
  } while (0);
  fflush(NULL);
}


x86 assembly (clang, -O0):
<__bladerf_fini>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <get_loglevel@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <bladerf_log_set_verbosity@plt>
jmp    114f <__bladerf_fini+0x1f>
jmp    1154 <__bladerf_fini+0x24>
jmp    1159 <__bladerf_fini+0x29>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__bladerf_fini>:
push   %rax
xor    %eax,%eax
call   1030 <get_loglevel@plt>
mov    %eax,%edi
call   1050 <bladerf_log_set_verbosity@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__bladerf_fini, i8* null }]
define void @__bladerf_fini() {
%1 = alloca i32
%2 = call i32 (...) @get_loglevel()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @bladerf_log_set_verbosity(i32 %3)
br label %5
5: ; preds = %0
br label %6
6: ; preds = %5
br label %7
7: ; preds = %6
br label %8
8: ; preds = %7
%9 = call i32 @fflush(i32* null)
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__bladerf_fini, i8* null }]
define void @__bladerf_fini() {
%1 = tail call i32 (...) @get_loglevel()
%2 = tail call i32 @bladerf_log_set_verbosity(i32 %1)
%3 = tail call i32 @fflush(i32* null)
ret void
}
void c_textattr(int newattr) {}


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

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

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

LLVM IR (-O2):
define void @c_textattr(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void cb(int x) { printf("%d ", x); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @cb(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int strchr(char *s, char c) {
  int i;
  for (i = 0; s[i] != '\0'; i++) {
    if (s[i] == c)
      return i;
  }
  return -1;
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1160 <strchr+0x60>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    114d <strchr+0x4d>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <strchr+0x67>
jmp    1152 <strchr+0x52>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <strchr+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
mov    (%rdi),%dl
mov    $0xffffffff,%eax
test   %dl,%dl
je     1122 <strchr+0x22>
xor    %ecx,%ecx
nopl   (%rax)
cmp    %sil,%dl
je     1123 <strchr+0x23>
movzbl 0x1(%rdi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strchr+0x10>
ret
mov    %ecx,%eax
ret

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

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


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

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

LLVM IR (-O0):
define i32 @from_obj() {
ret i32 1337
}

LLVM IR (-O2):
define i32 @from_obj() {
ret i32 1337
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, size_t);
int gethostname(char *name, size_t len) {
  strncpy(name, "tacos", len);
  return 0;
}


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

x86 assembly (clang, -O2):
<gethostname>:
push   %rax
mov    %rsi,%rdx
lea    0xee5(%rip),%rsi
call   1030 <strncpy@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"tacos\00"
define i32 @gethostname(i8* %0, i64 %1) {
%3 = tail call i32 @strncpy(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %1)
ret i32 0
}
void payment_simulate_destroy(int pid_payment) {}


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

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

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

LLVM IR (-O2):
define void @payment_simulate_destroy(i32 %0) {
ret void
}
/* Variables and functions */
float cosf(float);
float sinf(float);
void sincosf(float x, float *_sin, float *_cos) {
  *_sin = sinf(x);
  *_cos = cosf(x);
}


x86 assembly (clang, -O0):
<sincosf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sinf@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x4(%rbp),%xmm0
call   1040 <cosf@plt>
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sincosf>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movss  %xmm0,0x4(%rsp)
call   1030 <sinf@plt>
movss  %xmm0,(%rbx)
movss  0x4(%rsp),%xmm0
call   1040 <cosf@plt>
movss  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @sincosf(float %0, float* nocapture writeonly %1, float* nocapture writeonly %2) {
%4 = tail call float @sinf(float %0)
store float %4, float* %1
%5 = tail call float @cosf(float %0)
store float %5, float* %2
ret void
}
void g_DUMMY_menu_set_toggle(int menu_id, int item_id, int toggle_on) {
  menu_id = menu_id;
  item_id = item_id;
  toggle_on = toggle_on;
}


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

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

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

LLVM IR (-O2):
define void @g_DUMMY_menu_set_toggle(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t aesGetDriverVersion(void) {
  uint32_t (*p_aesGetDriverVersion)(void);
  p_aesGetDriverVersion = (uint32_t(*)(void))0x030013bdU;
  return p_aesGetDriverVersion();
}


x86 assembly (clang, -O0):
<aesGetDriverVersion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x30013bd,%eax
mov    %rax,-0x8(%rbp)
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aesGetDriverVersion>:
mov    $0x30013bd,%eax
jmp    *%rax

LLVM IR (-O0):
define i32 @aesGetDriverVersion() {
%1 = alloca i32 ()*
store i32 ()* inttoptr (i64 50336701 to i32 ()*), i32 ()** %1
%2 = load i32 ()*, i32 ()** %1
%3 = call i32 %2()
ret i32 %3
}

LLVM IR (-O2):
define i32 @aesGetDriverVersion() {
%1 = tail call i32 inttoptr (i64 50336701 to i32 ()*)()
ret i32 %1
}
void radeonInitX86Codegen(struct dfn_generators *gen) { (void)gen; }


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

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

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

LLVM IR (-O2):
%struct.dfn_generators = type opaque
define void @radeonInitX86Codegen(%struct.dfn_generators* nocapture %0) {
ret void
}
int omap4_dpll_low_power_cascade_exit(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @omap4_dpll_low_power_cascade_exit() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ scm_vector(int, long, long, double *);
void scm_get_sample_center(int f, long i, long j, long n, double *v) {
  scm_vector(f, (i + 0.5) / n, (j + 0.5) / n, v);
}


x86 assembly (clang, -O0):
<scm_get_sample_center>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  0xec4(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdq -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rsi
cvtsi2sdq -0x18(%rbp),%xmm0
movsd  0xea3(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdq -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdx
mov    -0x28(%rbp),%rcx
call   1030 <scm_vector@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scm_get_sample_center>:
cvtsi2sd %rsi,%xmm0
movsd  0xee3(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sd %rcx,%xmm2
divsd  %xmm2,%xmm0
cvttsd2si %xmm0,%rsi
xorps  %xmm0,%xmm0
cvtsi2sd %rdx,%xmm0
addsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
cvttsd2si %xmm0,%rdx
mov    %r8,%rcx
jmp    1030 <scm_vector@plt>

LLVM IR (-O0):
define void @scm_get_sample_center(i32 %0, i64 %1, i64 %2, i64 %3, double* %4) {
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca double*
store i32 %0, i32* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store double* %4, double** %10
%11 = load i32, i32* %6
%12 = load i64, i64* %7
%13 = sitofp i64 %12 to double
%14 = fadd double %13, 5.000000e-01
%15 = load i64, i64* %9
%16 = sitofp i64 %15 to double
%17 = fdiv double %14, %16
%18 = fptosi double %17 to i64
%19 = load i64, i64* %8
%20 = sitofp i64 %19 to double
%21 = fadd double %20, 5.000000e-01
%22 = load i64, i64* %9
%23 = sitofp i64 %22 to double
%24 = fdiv double %21, %23
%25 = fptosi double %24 to i64
%26 = load double*, double** %10
%27 = call i32 @scm_vector(i32 %11, i64 %18, i64 %25, double* %26)
ret void
}

LLVM IR (-O2):
define void @scm_get_sample_center(i32 %0, i64 %1, i64 %2, i64 %3, double* %4) {
%6 = sitofp i64 %1 to double
%7 = fadd double %6, 5.000000e-01
%8 = sitofp i64 %3 to double
%9 = fdiv double %7, %8
%10 = fptosi double %9 to i64
%11 = sitofp i64 %2 to double
%12 = fadd double %11, 5.000000e-01
%13 = fdiv double %12, %8
%14 = fptosi double %13 to i64
%15 = tail call i32 @scm_vector(i32 %0, i64 %10, i64 %14, double* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *strdup(char const *);
char *xstrdup(const char *s) {
  char *t;
  if (s == NULL)
    return NULL;
  t = strdup(s);
  if (t == NULL) {
    fprintf(stderr, "not enough memory");
    exit(1);
  }
  return t;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <xstrdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1193 <xstrdup+0x63>
mov    -0x10(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    118b <xstrdup+0x5b>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
lea    0xe84(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rax
test   %rdi,%rdi
je     1142 <xstrdup+0x12>
call   1050 <strdup@plt>
test   %rax,%rax
je     1146 <xstrdup+0x16>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"not enough memory\00"
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* null, i8** %2
br label %19
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i8* @strdup(i8* %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %17
13: ; preds = %8
%14 = load i32, i32* @stderr
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %8
%18 = load i8*, i8** %4
store i8* %18, i8** %2
br label %19
19: ; preds = %17, %7
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"not enough memory\00"
define noalias i8* @xstrdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i8* @strdup(i8* %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %3, %1
%11 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %11
}
int d() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @d() {
ret i32 0
}
/* Variables and functions */
scalar_t__ floor(double);
float floorf_tml(float f) { return (float)floor((double)f); }


x86 assembly (clang, -O0):
<floorf_tml>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <floor@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floorf_tml>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <floor@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @floorf_tml(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @floor(double %4)
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @floorf_tml(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @floor(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
void vec3_scale2(double *v1, double a) {
  v1[0] *= a;
  v1[1] *= a;
  v1[2] *= a;
}


x86 assembly (clang, -O0):
<vec3_scale2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movsd  %xmm0,0x8(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x10(%rax),%xmm0
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3_scale2>:
movupd (%rdi),%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
mulpd  %xmm1,%xmm2
movupd %xmm2,(%rdi)
mulsd  0x10(%rdi),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @vec3_scale2(double* %0, double %1) {
%3 = alloca double*
%4 = alloca double
store double* %0, double** %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double*, double** %3
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = fmul double %8, %5
store double %9, double* %7
%10 = load double, double* %4
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = fmul double %13, %10
store double %14, double* %12
%15 = load double, double* %4
%16 = load double*, double** %3
%17 = getelementptr inbounds double, double* %16, i64 2
%18 = load double, double* %17
%19 = fmul double %18, %15
store double %19, double* %17
ret void
}

LLVM IR (-O2):
define void @vec3_scale2(double* nocapture %0, double %1) {
%3 = bitcast double* %0 to <2 x double>*
%4 = load <2 x double>, <2 x double>* %3
%5 = insertelement <2 x double> poison, double %1, i64 0
%6 = shufflevector <2 x double> %5, <2 x double> poison, <2 x i32> zeroinitializer
%7 = fmul <2 x double> %4, %6
%8 = bitcast double* %0 to <2 x double>*
store <2 x double> %7, <2 x double>* %8
%9 = getelementptr inbounds double, double* %0, i64 2
%10 = load double, double* %9
%11 = fmul double %10, %1
store double %11, double* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printOptions() {
  printf("\n..... Ready .......................\n\n #Options::.....\n");
  printf("	a : print All the list\n");
  printf("	b : add new Element to the Database\n");
  printf("	d : Delete an Element\n");
  printf("	x : to Exit\n");
}


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

x86 assembly (clang, -O2):
<printOptions>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf13(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf38(%rip),%rdi
call   1030 <puts@plt>
lea    0xf43(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"\0A..... Ready .......................\0A\0A #Options::.....\0A\00"
@.str.1 = [25 x i8] c"\09a : print All the list\0A\00"
@.str.2 = [38 x i8] c"\09b : add new Element to the Database\0A\00"
@.str.3 = [24 x i8] c"\09d : Delete an Element\0A\00"
@.str.4 = [14 x i8] c"\09x : to Exit\0A\00"
define void @printOptions() {
%1 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [55 x i8] c"\0A..... Ready .......................\0A\0A #Options::.....\00"
@str.5 = [24 x i8] c"\09a : print All the list\00"
@str.6 = [37 x i8] c"\09b : add new Element to the Database\00"
@str.7 = [23 x i8] c"\09d : Delete an Element\00"
@str.8 = [13 x i8] c"\09x : to Exit\00"
define void @printOptions() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.8, i64 0, i64 0))
ret void
}