xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Com_Printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ Sys_GetCPUSpeed();
void Com_CPUSpeed_f(void) {
  Com_Printf("CPU Speed: %.2f Mhz\n", Sys_GetCPUSpeed());
}


x86 assembly (clang, -O0):
<Com_CPUSpeed_f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <Sys_GetCPUSpeed@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <Com_Printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Com_CPUSpeed_f>:
push   %rax
xor    %eax,%eax
call   1040 <Sys_GetCPUSpeed@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <Com_Printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"CPU Speed: %.2f Mhz\0A\00"
define void @Com_CPUSpeed_f() {
%1 = call i32 (...) @Sys_GetCPUSpeed()
%2 = call i32 @Com_Printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"CPU Speed: %.2f Mhz\0A\00"
define void @Com_CPUSpeed_f() {
%1 = tail call i32 (...) @Sys_GetCPUSpeed()
%2 = tail call i32 @Com_Printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printk(char *);
char *getenv(char *var) {
  printk("Write getenv()\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Write getenv()\0A\00"
define i8* @getenv(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printk(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [16 x i8] c"Write getenv()\0A\00"
define noalias i8* @getenv(i8* nocapture readnone %0) {
%2 = tail call i32 @printk(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i8* null
}
/* Variables and functions */
double dsfmt_gv_genrand_open_close();
double s_genrand_open_close(void) { return dsfmt_gv_genrand_open_close(); }


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

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

LLVM IR (-O0):
define double @s_genrand_open_close() {
%1 = call double (...) @dsfmt_gv_genrand_open_close()
ret double %1
}

LLVM IR (-O2):
define double @s_genrand_open_close() {
%1 = tail call double (...) @dsfmt_gv_genrand_open_close()
ret double %1
}
float Sleef_sqrtf_u35(float x) { return __builtin_sqrtf(x); }


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

x86 assembly (clang, -O2):
<Sleef_sqrtf_u35>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     111d <Sleef_sqrtf_u35+0xd>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrtf@plt>

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

LLVM IR (-O2):
define float @Sleef_sqrtf_u35(float %0) {
%2 = tail call float @sqrtf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
char *strdup(char const *);
char *xstrdup(const char *str) {
  char *nstr;
  if ((nstr = strdup(str)) == NULL) {
    error("out of memory");
  };
  return (nstr);
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    114f <xstrdup+0x2f>
lea    0xeb6(%rip),%rdi
call   1030 <error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <xstrdup+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\00"
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define noalias i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
int f(volatile int *x) { return *x; }


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

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

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

LLVM IR (-O2):
define i32 @f(i32* %0) {
%2 = load volatile i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arc_sr(int, int);
void foo(int a, int *p) {
  __builtin_arc_sr(0xffffffff, 0x21);
  __builtin_arc_sr(0x3, (unsigned int)p);
  __builtin_arc_sr(a, 0x22);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%edi
mov    $0x21,%esi
call   1030 <__builtin_arc_sr@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%esi
mov    $0x3,%edi
call   1030 <__builtin_arc_sr@plt>
mov    -0x4(%rbp),%edi
mov    $0x22,%esi
call   1030 <__builtin_arc_sr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0xffffffff,%edi
mov    $0x21,%esi
call   1030 <__builtin_arc_sr@plt>
mov    $0x3,%edi
mov    %ebx,%esi
call   1030 <__builtin_arc_sr@plt>
mov    %ebp,%edi
mov    $0x22,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <__builtin_arc_sr@plt>

LLVM IR (-O0):
define void @foo(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = call i32 @__builtin_arc_sr(i32 -1, i32 33)
%6 = load i32*, i32** %4
%7 = ptrtoint i32* %6 to i32
%8 = call i32 @__builtin_arc_sr(i32 3, i32 %7)
%9 = load i32, i32* %3
%10 = call i32 @__builtin_arc_sr(i32 %9, i32 34)
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0, i32* %1) {
%3 = tail call i32 @__builtin_arc_sr(i32 -1, i32 33)
%4 = ptrtoint i32* %1 to i64
%5 = trunc i64 %4 to i32
%6 = tail call i32 @__builtin_arc_sr(i32 3, i32 %5)
%7 = tail call i32 @__builtin_arc_sr(i32 %0, i32 34)
ret void
}
void marker1() {}


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

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

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

LLVM IR (-O2):
define void @marker1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void proc() {
  printf("Test test and more test\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Test test and more test\0A\00"
define void @proc() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"Test test and more test\00"
define void @proc() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct key_value {
  int dummy;
};

/* Variables and functions */
struct key_value *key_value(int, void *);
struct key_value *sym_key_value(char *sym_key, void *value) {
  return key_value(((++*(int *)((void *)(((int *)sym_key) - 1))), sym_key),
                   value);
}


x86 assembly (clang, -O0):
<sym_key_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x4(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rax)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1030 <key_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sym_key_value>:
addl   $0x1,-0x4(%rdi)
jmp    1030 <key_value@plt>

LLVM IR (-O0):
%struct.key_value = type { i32 }
define %struct.key_value* @sym_key_value(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 = getelementptr inbounds i32, i32* %6, i64 -1
%8 = bitcast i32* %7 to i8*
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = add nsw i32 %10, 1
store i32 %11, i32* %9
%12 = load i8*, i8** %3
%13 = ptrtoint i8* %12 to i32
%14 = load i8*, i8** %4
%15 = call %struct.key_value* @key_value(i32 %13, i8* %14)
ret %struct.key_value* %15
}

LLVM IR (-O2):
%struct.key_value = type { i32 }
define %struct.key_value* @sym_key_value(i8* %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 -4
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = add nsw i32 %5, 1
store i32 %6, i32* %4
%7 = ptrtoint i8* %0 to i64
%8 = trunc i64 %7 to i32
%9 = tail call %struct.key_value* @key_value(i32 %8, i8* %1)
ret %struct.key_value* %9
}
int __ev_rx_changed() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__ev_rx_changed() {
ret i32 0
}
void fun(int *arr1) {
  *(arr1 - 128) = 10;
  *(arr1 + 128) = 20;
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xa,-0x200(%rax)
mov    -0x8(%rbp),%rax
movl   $0x14,0x200(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
movl   $0xa,-0x200(%rdi)
movl   $0x14,0x200(%rdi)
ret

LLVM IR (-O0):
define void @fun(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 -128
store i32 10, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 128
store i32 20, i32* %6
ret void
}

LLVM IR (-O2):
define void @fun(i32* nocapture writeonly %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 -128
store i32 10, i32* %2
%3 = getelementptr inbounds i32, i32* %0, i64 128
store i32 20, i32* %3
ret void
}
int dstLongAtputmask(int idx, int srcValue, int dstMask) {
  int dstValue;
  dstValue = (*((int *)(idx)));
  dstValue = dstValue & dstMask;
  dstValue = dstValue | srcValue;
  (*((int *)(idx)) = dstValue);
}


x86 assembly (clang, -O0):
<dstLongAtputmask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movslq -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dstLongAtputmask>:
movslq %edi,%rax
and    (%rax),%edx
or     %esi,%edx
mov    %edx,(%rax)
ret

LLVM IR (-O0):
define i32 @dstLongAtputmask(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load i32, i32* %11
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = load i32, i32* %7
%15 = and i32 %13, %14
store i32 %15, i32* %8
%16 = load i32, i32* %8
%17 = load i32, i32* %6
%18 = or i32 %16, %17
store i32 %18, i32* %8
%19 = load i32, i32* %8
%20 = load i32, i32* %5
%21 = sext i32 %20 to i64
%22 = inttoptr i64 %21 to i32*
store i32 %19, i32* %22
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
define i32 @dstLongAtputmask(i32 %0, i32 %1, i32 %2) {
%4 = sext i32 %0 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load i32, i32* %5
%7 = and i32 %6, %2
%8 = or i32 %7, %1
store i32 %8, i32* %5
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ h2o__fatal(char *);
void *malloc(size_t);
void *h2o_mem_alloc(size_t sz) {
  void *p = malloc(sz);
  if (p == NULL)
    h2o__fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/nkmideb/h2o-server/refs/"
               "heads/master/include/h2o/h2o/memory.h"
               ":"
               "310"
               ":"
               "no memory");
  return p;
}


x86 assembly (clang, -O0):
<h2o_mem_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <h2o_mem_alloc+0x30>
lea    0xeb5(%rip),%rdi
call   1030 <h2o__fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2o_mem_alloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <h2o_mem_alloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <h2o__fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [166 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/nkmideb/h2o-server/refs/heads/master/include/h2o/h2o/memory.h:310:no memory\00"
define i8* @h2o_mem_alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @h2o__fatal(i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [166 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/nkmideb/h2o-server/refs/heads/master/include/h2o/h2o/memory.h:310:no memory\00"
define noalias i8* @h2o_mem_alloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @h2o__fatal(i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
int oldfoo(bar)
char bar;
{ return (bar - 2); }


x86 assembly (clang, -O0):
<oldfoo>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<oldfoo>:
movsbl %dil,%eax
add    $0xfffffffe,%eax
ret

LLVM IR (-O0):
define i32 @oldfoo(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = sub nsw i32 %5, 2
ret i32 %6
}

LLVM IR (-O2):
define i32 @oldfoo(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = add nsw i32 %3, -2
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;
typedef int int8_t;

/* Variables and functions */
__attribute__((always_)) uint32_t rotl32(uint32_t x, int8_t r) {
  return (x << r) | (x >> (32 - r));
}


x86 assembly (clang, -O0):
<rotl32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotl32>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rotl32(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 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rotl32(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage:\n"
         "flockcover path len\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Usage:\0Aflockcover path len\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [27 x i8] c"Usage:\0Aflockcover path len\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
struct seq_frame_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct seq_frame_t *);
void seq_free(struct seq_frame_t *frame_stream) { free(frame_stream); }


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

x86 assembly (clang, -O2):
<seq_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.seq_frame_t = type { i32 }
define void @seq_free(%struct.seq_frame_t* nocapture %0) {
%2 = tail call i32 @free(%struct.seq_frame_t* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, long);
int /*<<< orphan*/ stderr;
void _E__pr_header(char const *f, long ln, char const *msg) {
  (void)fflush(stderr);
  (void)fprintf(stderr, "%s: \"%s\", line %ld: ", msg, f, ln);
}


x86 assembly (clang, -O0):
<_E__pr_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xea2(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_E__pr_header>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2ea8(%rip),%r12
mov    (%r12),%edi
call   1040 <fflush@plt>
mov    (%r12),%edi
lea    0xeb4(%rip),%rsi
mov    %r15,%rdx
mov    %rbx,%rcx
mov    %r14,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"%s: \22%s\22, line %ld: \00"
define void @_E__pr_header(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = call i32 @fflush(i32 %7)
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %6
%11 = load i8*, i8** %4
%12 = load i64, i64* %5
%13 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i64 %12)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"%s: \22%s\22, line %ld: \00"
define void @_E__pr_header(i8* %0, i64 %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fflush(i32 %4)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %0, i64 %1)
ret void
}
signed short int
signedshortint_ignoring_unsignedlonglong(signed short int x,
                                         unsigned long long y) {
  return x;
}


x86 assembly (clang, -O0):
<signedshortint_ignoring_unsignedlonglong>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @signedshortint_ignoring_unsignedlonglong(i16 signext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @signedshortint_ignoring_unsignedlonglong(i16 returned signext %0, i64 %1) {
ret i16 %0
}
void passageParReference(int *nombre) { *nombre = 300; }


x86 assembly (clang, -O0):
<passageParReference>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x12c,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<passageParReference>:
movl   $0x12c,(%rdi)
ret

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

LLVM IR (-O2):
define void @passageParReference(i32* nocapture writeonly %0) {
store i32 300, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
void frimg() {
  printf("Flashing '/sdcard/recovery.img' to "
         "'/dev/block/platform/msm_sdcc.1/by-name/recovery'");
  char buf[256];
  sprintf(buf, "/system/bin/sh -c %s",
          "'dd if=/sdcard/recovery.img "
          "of=/dev/block/platform/msm_sdcc.1/by-name/recovery'");
  system(buf);
}


x86 assembly (clang, -O0):
<frimg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
lea    -0x100(%rbp),%rdi
lea    0xf00(%rip),%rsi
lea    0xf0e(%rip),%rdx
call   1050 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frimg>:
push   %rbx
sub    $0x100,%rsp
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
lea    0xf0a(%rip),%rsi
lea    0xf18(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [85 x i8] c"Flashing '/sdcard/recovery.img' to '/dev/block/platform/msm_sdcc.1/by-name/recovery'\00"
@.str.1 = [21 x i8] c"/system/bin/sh -c %s\00"
@.str.2 = [80 x i8] c"'dd if=/sdcard/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery'\00"
define void @frimg() {
%1 = alloca [256 x i8]
%2 = call i32 @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.2, i64 0, i64 0))
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%6 = call i32 @system(i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [85 x i8] c"Flashing '/sdcard/recovery.img' to '/dev/block/platform/msm_sdcc.1/by-name/recovery'\00"
@.str.1 = [21 x i8] c"/system/bin/sh -c %s\00"
@.str.2 = [80 x i8] c"'dd if=/sdcard/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery'\00"
define void @frimg() {
%1 = alloca [256 x i8]
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @system(i8* %3)
ret void
}
/* Variables and functions */
int NewSocket();
int /*<<< orphan*/ event_dispatch();
int /*<<< orphan*/ event_init();
int /*<<< orphan*/ exit(int);
int main(int argc, char *argv[]) {
  int retval;
  event_init();
  retval = NewSocket();
  if (retval == -1) {
    exit(-1);
  }
  event_dispatch();
  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    $0x0,%al
call   1060 <event_init@plt>
mov    $0x0,%al
call   1040 <NewSocket@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    117b <main+0x3b>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    $0x0,%al
call   1030 <event_dispatch@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <event_init@plt>
xor    %eax,%eax
call   1040 <NewSocket@plt>
cmp    $0xffffffff,%eax
je     115f <main+0x1f>
xor    %eax,%eax
call   1030 <event_dispatch@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0xffffffff,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @event_init()
%4 = tail call i32 (...) @NewSocket()
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
%9 = tail call i32 (...) @event_dispatch()
ret i32 0
}
void EVP_CIPHER_CTX_cleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_CIPHER_CTX_cleanup() {
ret void
}
/* Type definitions */
typedef double uint32_t;

/* Variables and functions */
int mt_genrand_int32();
double mt_genrand_res53(void) {
  uint32_t a = mt_genrand_int32() >> 5, b = mt_genrand_int32() >> 6;
  return (a * 67108864.0 + b) * (1.0 / 9007199254740992.0);
}


x86 assembly (clang, -O0):
<mt_genrand_res53>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <mt_genrand_int32@plt>
sar    $0x5,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <mt_genrand_int32@plt>
sar    $0x6,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xeb8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xea0(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mt_genrand_res53>:
push   %rax
xor    %eax,%eax
call   1030 <mt_genrand_int32@plt>
sar    $0x5,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <mt_genrand_int32@plt>
sar    $0x6,%eax
cvtsi2sd %eax,%xmm1
movsd  (%rsp),%xmm0
mulsd  0xec1(%rip),%xmm0
addsd  %xmm1,%xmm0
mulsd  0xebd(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @mt_genrand_res53() {
%1 = alloca double
%2 = alloca double
%3 = call i32 (...) @mt_genrand_int32()
%4 = ashr i32 %3, 5
%5 = sitofp i32 %4 to double
store double %5, double* %1
%6 = call i32 (...) @mt_genrand_int32()
%7 = ashr i32 %6, 6
%8 = sitofp i32 %7 to double
store double %8, double* %2
%9 = load double, double* %1
%10 = load double, double* %2
%11 = call double @llvm.fmuladd.f64(double %9, double 0x4190000000000000, double %10)
%12 = fmul double %11, 0x3CA0000000000000
ret double %12
}

LLVM IR (-O2):
define double @mt_genrand_res53() {
%1 = tail call i32 (...) @mt_genrand_int32()
%2 = ashr i32 %1, 5
%3 = sitofp i32 %2 to double
%4 = tail call i32 (...) @mt_genrand_int32()
%5 = ashr i32 %4, 6
%6 = sitofp i32 %5 to double
%7 = tail call double @llvm.fmuladd.f64(double %3, double 0x4190000000000000, double %6)
%8 = fmul double %7, 0x3CA0000000000000
ret double %8
}
void passageParCopie(int nombre) { nombre = 200; }


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

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

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

LLVM IR (-O2):
define void @passageParCopie(i32 %0) {
ret void
}
/* Variables and functions */
int _InterlockedExchangeSub(int volatile *, int);
int test_InterlockedExchangeSub(int volatile *value, int mask) {
  return _InterlockedExchangeSub(value, mask);
}


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

x86 assembly (clang, -O2):
<test_InterlockedExchangeSub>:
jmp    1030 <_InterlockedExchangeSub@plt>

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

LLVM IR (-O2):
define i32 @test_InterlockedExchangeSub(i32* %0, i32 %1) {
%3 = tail call i32 @_InterlockedExchangeSub(i32* %0, i32 %1)
ret i32 %3
}
int HelpItem102(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem102() {
ret i32 0
}
int xpos(int pos) { return pos / 64; }


x86 assembly (clang, -O0):
<xpos>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<xpos>:
lea    0x3f(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0x6,%eax
ret

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

LLVM IR (-O2):
define i32 @xpos(i32 %0) {
%2 = sdiv i32 %0, 64
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ writeLog(char *, int /*<<< orphan*/ *, char *);
int main() {
  char data[80];
  writeLog("Oops!", NULL, "er");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"Oops!\00"
@.str.1 = [3 x i8] c"er\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
store i32 0, i32* %1
%3 = call i32 @writeLog(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"Oops!\00"
@.str.1 = [3 x i8] c"er\00"
define i32 @main() {
%1 = tail call i32 @writeLog(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void esai_iomux_config() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @sort_vl_with_frame() {
ret void
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRAC_set(void) { return U_WMRCORENONE_set("U_WMRAC"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRAC\00"
define i8* @U_WMRAC_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRAC\00"
define i8* @U_WMRAC_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
int A(int x, int y) {
  int d, e, f;
  printf("enter A\n");
  printf("&d: %x\n&e: %x\n&f: %x\n", &d, &e, &f);
  d = 3;
  e = 4;
  f = 5;
  B(d, e);
  printf("exit A\n");
}


x86 assembly (clang, -O0):
<A>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x3,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
movl   $0x5,-0x18(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    $0x0,%al
call   1030 <B@plt>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<A>:
sub    $0x18,%rsp
lea    0xedb(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb9(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
xor    %eax,%eax
call   1050 <printf@plt>
movl   $0x3,0x14(%rsp)
movl   $0x4,0x10(%rsp)
movl   $0x5,0xc(%rsp)
mov    $0x3,%edi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <B@plt>
lea    0xe91(%rip),%rdi
call   1040 <puts@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"enter A\0A\00"
@.str.1 = [22 x i8] c"&d: %x\0A&e: %x\0A&f: %x\0A\00"
@.str.2 = [8 x i8] c"exit A\0A\00"
define i32 @A(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32* %6, i32* %7, i32* %8)
store i32 3, i32* %6
store i32 4, i32* %7
store i32 5, i32* %8
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = call i32 (i32, i32, ...) bitcast (i32 (...)* @B to i32 (i32, i32, ...)*)(i32 %11, i32 %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@.str.1 = [22 x i8] c"&d: %x\0A&e: %x\0A&f: %x\0A\00"
@str = [8 x i8] c"enter A\00"
@str.3 = [7 x i8] c"exit A\00"
define i32 @A(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32* %3, i32* %4, i32* %5)
store i32 3, i32* %3
store i32 4, i32* %4
store i32 5, i32* %5
%11 = call i32 (i32, i32, ...) bitcast (i32 (...)* @B to i32 (i32, i32, ...)*)(i32 3, i32 4)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.3, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ e_abs();
int /*<<< orphan*/ e_and();
void e_and_abs() {
  e_abs();
  e_and();
}


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

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

LLVM IR (-O0):
define void @e_and_abs() {
%1 = call i32 (...) @e_abs()
%2 = call i32 (...) @e_and()
ret void
}

LLVM IR (-O2):
define void @e_and_abs() {
%1 = tail call i32 (...) @e_abs()
%2 = tail call i32 (...) @e_and()
ret void
}
/* Variables and functions */
scalar_t__ M_PI;
float cosf(float);
float sine_custom_io(float step, float max_steps, float max_val) {
  return max_val * cosf((6.28318530718f * step / max_steps) + (float)M_PI) +
         max_val;
}


x86 assembly (clang, -O0):
<sine_custom_io>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xec7(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
mov    0x2e9e(%rip),%rax
cvtsi2ssq (%rax),%xmm1
addss  %xmm1,%xmm0
call   1030 <cosf@plt>
movaps %xmm0,%xmm2
movss  -0x10(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sine_custom_io>:
push   %rax
movss  %xmm2,0x4(%rsp)
mulss  0xee1(%rip),%xmm0
divss  %xmm1,%xmm0
mov    0x2ebe(%rip),%rax
xorps  %xmm1,%xmm1
cvtsi2ssq (%rax),%xmm1
addss  %xmm1,%xmm0
call   1030 <cosf@plt>
movss  0x4(%rsp),%xmm1
mulss  %xmm1,%xmm0
addss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global i64 0
define float @sine_custom_io(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* %6
%8 = load float, float* %4
%9 = fmul float 0x401921FB60000000, %8
%10 = load float, float* %5
%11 = fdiv float %9, %10
%12 = load i64, i64* @M_PI
%13 = sitofp i64 %12 to float
%14 = fadd float %11, %13
%15 = call float @cosf(float %14)
%16 = load float, float* %6
%17 = call float @llvm.fmuladd.f32(float %7, float %15, float %16)
ret float %17
}

LLVM IR (-O2):
@M_PI = global i64 0
define float @sine_custom_io(float %0, float %1, float %2) {
%4 = fmul float %0, 0x401921FB60000000
%5 = fdiv float %4, %1
%6 = load i64, i64* @M_PI
%7 = sitofp i64 %6 to float
%8 = fadd float %5, %7
%9 = tail call float @cosf(float %8)
%10 = tail call float @llvm.fmuladd.f32(float %2, float %9, float %2)
ret float %10
}
/* Variables and functions */
scalar_t__ EEXIST;
scalar_t__ errno;
scalar_t__ mkdir(char const *, int);
int create_dir(char const *dir) {
  if (mkdir(dir, 0755)) {
    if (errno == EEXIST)
      return 0;
    return errno;
  }
  return 0;
}


x86 assembly (clang, -O0):
<create_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x1ed,%esi
call   1030 <mkdir@plt>
cmp    $0x0,%rax
je     116c <create_dir+0x5c>
mov    0x2e9d(%rip),%rax
mov    (%rax),%rax
mov    0x2e9b(%rip),%rcx
cmp    (%rcx),%rax
jne    115a <create_dir+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1173 <create_dir+0x63>
mov    0x2e77(%rip),%rax
mov    (%rax),%rax
mov    %eax,-0x4(%rbp)
jmp    1173 <create_dir+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_dir>:
push   %rax
mov    $0x1ed,%esi
call   1030 <mkdir@plt>
mov    0x2eb6(%rip),%rcx
mov    (%rcx),%rcx
mov    0x2eb4(%rip),%rdx
xor    %esi,%esi
cmp    (%rdx),%rcx
cmove  %esi,%ecx
test   %rax,%rax
cmove  %esi,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i64 0
@EEXIST = global i64 0
define i32 @create_dir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @mkdir(i8* %4, i32 493)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load i64, i64* @errno
%9 = load i64, i64* @EEXIST
%10 = icmp eq i64 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 0, i32* %2
br label %16
12: ; preds = %7
%13 = load i64, i64* @errno
%14 = trunc i64 %13 to i32
store i32 %14, i32* %2
br label %16
15: ; preds = %1
store i32 0, i32* %2
br label %16
16: ; preds = %15, %12, %11
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
@errno = global i64 0
@EEXIST = global i64 0
define i32 @create_dir(i8* nocapture %0) {
%2 = tail call i64 @mkdir(i8* %0, i32 493)
%3 = icmp eq i64 %2, 0
%4 = load i64, i64* @errno
%5 = load i64, i64* @EEXIST
%6 = icmp eq i64 %4, %5
%7 = trunc i64 %4 to i32
%8 = select i1 %3, i1 true, i1 %6
%9 = select i1 %8, i32 0, i32 %7
ret i32 %9
}
void ff_hevc_put_hevc_uni_w_qpel_hv12_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_hv12_10_sse4() {
ret void
}
void efx_mcdi_mon_remove(struct efx_nic *efx) {}


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

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

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

LLVM IR (-O2):
%struct.efx_nic = type opaque
define void @efx_mcdi_mon_remove(%struct.efx_nic* nocapture %0) {
ret void
}
/* Variables and functions */
int log(float);
float powtodb(float f) {
  if (f <= 0)
    return (0);
  else {
    float val = 100 + 10. / 2.302585092994 * log(f);
    return (val < 0 ? 0 : val);
  }
}


x86 assembly (clang, -O0):
<powtodb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1137 <powtodb+0x27>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1194 <powtodb+0x84>
movss  -0x8(%rbp),%xmm0
call   1030 <log@plt>
cvtsi2sd %eax,%xmm0
movsd  0xeb3(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeaf(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1180 <powtodb+0x70>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    118a <powtodb+0x7a>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<powtodb>:
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
jae    114d <powtodb+0x3d>
push   %rax
movaps %xmm1,%xmm0
call   1030 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xecd(%rip),%xmm0
addsd  0xecd(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm1
xorps  %xmm0,%xmm0
maxss  %xmm1,%xmm0
add    $0x8,%rsp
ret

LLVM IR (-O0):
define float @powtodb(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %3
%5 = load float, float* %3
%6 = fcmp ole float %5, 0.000000e+00
br i1 %6, label %7, label %8
7: ; preds = %1
store float 0.000000e+00, float* %2
br label %21
8: ; preds = %1
%9 = load float, float* %3
%10 = call i32 @log(float %9)
%11 = sitofp i32 %10 to double
%12 = call double @llvm.fmuladd.f64(double 0x40115F2CED384F8A, double %11, double 1.000000e+02)
%13 = fptrunc double %12 to float
store float %13, float* %4
%14 = load float, float* %4
%15 = fcmp olt float %14, 0.000000e+00
br i1 %15, label %16, label %17
16: ; preds = %8
br label %19
17: ; preds = %8
%18 = load float, float* %4
br label %19
19: ; preds = %17, %16
%20 = phi float [ 0.000000e+00, %16 ], [ %18, %17 ]
store float %20, float* %2
br label %21
21: ; preds = %19, %7
%22 = load float, float* %2
ret float %22
}

LLVM IR (-O2):
define float @powtodb(float %0) {
%2 = fcmp ugt float %0, 0.000000e+00
br i1 %2, label %3, label %10
3: ; preds = %1
%4 = tail call i32 @log(float %0)
%5 = sitofp i32 %4 to double
%6 = tail call double @llvm.fmuladd.f64(double %5, double 0x40115F2CED384F8A, double 1.000000e+02)
%7 = fptrunc double %6 to float
%8 = fcmp olt float %7, 0.000000e+00
%9 = select i1 %8, float 0.000000e+00, float %7
br label %10
10: ; preds = %1, %3
%11 = phi float [ %9, %3 ], [ 0.000000e+00, %1 ]
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
void waitForInput() {
  getchar();
  return;
}


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

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

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

LLVM IR (-O2):
define void @waitForInput() {
%1 = tail call i32 (...) @getchar()
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t new_size(int32_t old_size, int32_t needed_size) {
  while (old_size < needed_size) {
    old_size = old_size << 1;
  }
  return old_size;
}


x86 assembly (clang, -O0):
<new_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1124 <new_size+0x24>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110a <new_size+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_size>:
mov    %edi,%eax
lea    (%rax,%rax,1),%edi
cmp    %esi,%eax
jl     1100 <new_size>
ret

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

LLVM IR (-O2):
define i32 @new_size(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %6, %3 ]
%5 = icmp slt i32 %4, %1
%6 = shl i32 %4, 1
br i1 %5, label %3, label %7
7: ; preds = %3
ret i32 %4
}
/* Variables and functions */
int unlink(char const *);
int DeleteFile(const char *name) {
  if (NULL == name)
    return -1;
  return unlink(name);
}


x86 assembly (clang, -O0):
<DeleteFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    1134 <DeleteFile+0x24>
movl   $0xffffffff,-0x4(%rbp)
jmp    1140 <DeleteFile+0x30>
mov    -0x10(%rbp),%rdi
call   1030 <unlink@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DeleteFile>:
test   %rdi,%rdi
je     111a <DeleteFile+0xa>
jmp    1030 <unlink@plt>
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @DeleteFile(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @unlink(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ -1, %1 ]
ret i32 %6
}