xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ pcsc_assert_wire_constants();
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  (void)argc;
  (void)argv;
  printf("Checking ABI...\n");
  if (0 == pcsc_assert_wire_constants())
    printf("OK\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <pcsc_assert_wire_constants@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1163 <main+0x43>
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <pcsc_assert_wire_constants@plt>
test   %rax,%rax
jne    1145 <main+0x25>
lea    0xed0(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Checking ABI...\0A\00"
@.str.1 = [4 x i8] c"OK\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 = load i8**, i8*** %5
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%9 = call i64 (...) @pcsc_assert_wire_constants()
%10 = icmp eq i64 0, %9
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"Checking ABI...\00"
@str.2 = [3 x i8] c"OK\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%4 = tail call i64 (...) @pcsc_assert_wire_constants()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.2, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret i32 0
}
/* Type definitions */
struct glist_n {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct glist_n *);
void _gl_free_node(struct glist_n *nd) {
  if (!nd)
    return;
  free(nd);
}


x86 assembly (clang, -O0):
<_gl_free_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <_gl_free_node+0x1c>
jmp    1135 <_gl_free_node+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_gl_free_node>:
test   %rdi,%rdi
je     111a <_gl_free_node+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.glist_n = type { i32 }
define void @_gl_free_node(%struct.glist_n* %0) {
%2 = alloca %struct.glist_n*
store %struct.glist_n* %0, %struct.glist_n** %2
%3 = load %struct.glist_n*, %struct.glist_n** %2
%4 = icmp ne %struct.glist_n* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load %struct.glist_n*, %struct.glist_n** %2
%8 = call i32 @free(%struct.glist_n* %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.glist_n = type { i32 }
define void @_gl_free_node(%struct.glist_n* %0) {
%2 = icmp eq %struct.glist_n* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.glist_n* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int *unsafe_allocate() {
  int *p = NULL;
  p = (int *)malloc(sizeof(int));
  return p;
}


x86 assembly (clang, -O0):
<unsafe_allocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsafe_allocate>:
mov    $0x4,%edi
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define i32* @unsafe_allocate() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
char f(char *a) {
  char b = test_function();
  asm("" : "=m"(*a) : "r"(b));
  b = test_function();
  return b;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <test_function@plt>
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x9(%rbp),%cl
mov    $0x0,%al
call   1030 <test_function@plt>
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <test_function@plt>
xor    %eax,%eax
call   1030 <test_function@plt>
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @f(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = call i32 (...) @test_function()
%5 = trunc i32 %4 to i8
store i8 %5, i8* %3
%6 = load i8*, i8** %2
%7 = load i8, i8* %3
%8 = call i32 (...) @test_function()
%9 = trunc i32 %8 to i8
store i8 %9, i8* %3
%10 = load i8, i8* %3
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @f(i8* %0) {
%2 = tail call i32 (...) @test_function()
%3 = trunc i32 %2 to i8
tail call void asm "", "=*m,r,~{dirflag},~{fpsr},~{flags}"(i8* elementtype(i8) %0, i8 %3)
%4 = tail call i32 (...) @test_function()
%5 = trunc i32 %4 to i8
ret i8 %5
}
/* Type definitions */
struct timespec {
  int tv_sec;
  long double tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ TIME_UTC;
int /*<<< orphan*/ timespec_get(struct timespec *, int /*<<< orphan*/);
long double get_nanos(void) {
  struct timespec ts;
  timespec_get(&ts, TIME_UTC);
  return ts.tv_sec * 1e9 + ts.tv_nsec;
}


x86 assembly (clang, -O0):
<get_nanos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdi
call   1030 <timespec_get@plt>
cvtsi2sdl -0x20(%rbp),%xmm0
movsd  0xec9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
fldl   -0x28(%rbp)
fldt   -0x10(%rbp)
faddp  %st,%st(1)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_nanos>:
sub    $0x38,%rsp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0x10(%rsp),%rdi
call   1030 <timespec_get@plt>
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0xecb(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
fldt   0x20(%rsp)
faddl  0x8(%rsp)
add    $0x38,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, x86_fp80 }
@TIME_UTC = global i32 0
define x86_fp80 @get_nanos() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @TIME_UTC
%3 = call i32 @timespec_get(%struct.timespec* %1, i32 %2)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = sitofp i32 %5 to double
%7 = fmul double %6, 1.000000e+09
%8 = fpext double %7 to x86_fp80
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%10 = load x86_fp80, x86_fp80* %9
%11 = fadd x86_fp80 %8, %10
ret x86_fp80 %11
}

LLVM IR (-O2):
%struct.timespec = type { i32, x86_fp80 }
@TIME_UTC = global i32 0
define x86_fp80 @get_nanos() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @TIME_UTC
%4 = call i32 @timespec_get(%struct.timespec* %1, i32 %3)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = sitofp i32 %6 to double
%8 = fmul double %7, 1.000000e+09
%9 = fpext double %8 to x86_fp80
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%11 = load x86_fp80, x86_fp80* %10
%12 = fadd x86_fp80 %11, %9
ret x86_fp80 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ XIMText;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XIMText(void) {
  XIMText *_p = (XIMText *)malloc(sizeof(XIMText));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_XIMText>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_XIMText+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_XIMText>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XIMText+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XIMText() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XIMText() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
int MPI_Initialized(int *flag) {
  *flag = 0;
  return 0;
}


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

x86 assembly (clang, -O2):
<MPI_Initialized>:
movl   $0x0,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @MPI_Initialized(i32* nocapture writeonly %0) {
store i32 0, i32* %0
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int read(int, unsigned long long *, int);
unsigned long long wma_convert_ll(unsigned char *);
int wma_file_read_ll(int fd, unsigned long long *pll) {
  uint32_t len;
  int ret;
  len = sizeof(unsigned long long);
  ret = read(fd, pll, len);
  if ((ret < 0) || (ret != len)) {
    return 0;
  }
  *pll = wma_convert_ll((unsigned char *)pll);
  return 1;
}


x86 assembly (clang, -O0):
<wma_file_read_ll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x8,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <read@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     115e <wma_file_read_ll+0x3e>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     116a <wma_file_read_ll+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1184 <wma_file_read_ll+0x64>
mov    -0x10(%rbp),%rdi
call   1030 <wma_convert_ll@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wma_file_read_ll>:
push   %rbx
mov    %rsi,%rbx
mov    $0x8,%edx
call   1040 <read@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x8,%ecx
jne    1147 <wma_file_read_ll+0x27>
mov    %rbx,%rdi
call   1030 <wma_convert_ll@plt>
mov    %rax,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @wma_file_read_ll(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i64* %1, i64** %5
store i32 8, i32* %6
%8 = load i32, i32* %4
%9 = load i64*, i64** %5
%10 = load i32, i32* %6
%11 = call i32 @read(i32 %8, i64* %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp slt i32 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %2
%15 = load i32, i32* %7
%16 = load i32, i32* %6
%17 = icmp ne i32 %15, %16
br i1 %17, label %18, label %19
18: ; preds = %14, %2
store i32 0, i32* %3
br label %24
19: ; preds = %14
%20 = load i64*, i64** %5
%21 = bitcast i64* %20 to i8*
%22 = call i64 @wma_convert_ll(i8* %21)
%23 = load i64*, i64** %5
store i64 %22, i64* %23
store i32 1, i32* %3
br label %24
24: ; preds = %19, %18
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @wma_file_read_ll(i32 %0, i64* %1) {
%3 = tail call i32 @read(i32 %0, i64* %1, i32 8)
%4 = icmp eq i32 %3, 8
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = bitcast i64* %1 to i8*
%7 = tail call i64 @wma_convert_ll(i8* %6)
store i64 %7, i64* %1
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int x = 10;
  int y = 2 * x * x + 13 * x + 4;
  int z = 2 * (x * x + 13 * x) + 4;
  printf("%d\n", y);
  printf("%d\n", z);
  printf("EXPR");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
imul   -0x4(%rbp),%eax
imul   $0xd,-0x4(%rbp),%ecx
add    %ecx,%eax
add    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
imul   $0xd,-0x4(%rbp),%ecx
add    %ecx,%eax
shl    $0x1,%eax
add    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x14e,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1d0,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [5 x i8] c"EXPR\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 10, i32* %1
%4 = load i32, i32* %1
%5 = mul nsw i32 2, %4
%6 = load i32, i32* %1
%7 = mul nsw i32 %5, %6
%8 = load i32, i32* %1
%9 = mul nsw i32 13, %8
%10 = add nsw i32 %7, %9
%11 = add nsw i32 %10, 4
store i32 %11, i32* %2
%12 = load i32, i32* %1
%13 = load i32, i32* %1
%14 = mul nsw i32 %12, %13
%15 = load i32, i32* %1
%16 = mul nsw i32 13, %15
%17 = add nsw i32 %14, %16
%18 = mul nsw i32 2, %17
%19 = add nsw i32 %18, 4
store i32 %19, i32* %3
%20 = load i32, i32* %2
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = load i32, i32* %3
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %22)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [5 x i8] c"EXPR\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 334)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 464)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
short shortTest(short value) { return value; }


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

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

LLVM IR (-O0):
define signext i16 @shortTest(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
ret i16 %3
}

LLVM IR (-O2):
define signext i16 @shortTest(i16 returned signext %0) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: bintoc [-o <out-file>] [<in-file>]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"Usage: bintoc [-o <out-file>] [<in-file>]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"Usage: bintoc [-o <out-file>] [<in-file>]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main(void) { printf("hello github\n"); }


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"hello github\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int mapcon_exponents_of_map(int dim, int ind, int nvr, int *exp) {
  int a[3], fail;
  double *c;
  a[0] = dim;
  a[1] = ind;
  a[2] = nvr;
  fail = _ada_use_c2phc4c(437, a, exp, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<mapcon_exponents_of_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x24(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    $0x1b5,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapcon_exponents_of_map>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
mov    %esi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x1b5,%edi
mov    %rcx,%rdx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @mapcon_exponents_of_map(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca [3 x i32]
%10 = alloca i32
%11 = alloca double*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%12 = load i32, i32* %5
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 0
store i32 %12, i32* %13
%14 = load i32, i32* %6
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 1
store i32 %14, i32* %15
%16 = load i32, i32* %7
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 2
store i32 %16, i32* %17
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 0
%19 = load i32*, i32** %8
%20 = load double*, double** %11
%21 = call i32 @_ada_use_c2phc4c(i32 437, i32* %18, i32* %19, double* %20, i32 0)
store i32 %21, i32* %10
%22 = load i32, i32* %10
ret i32 %22
}

LLVM IR (-O2):
define i32 @mapcon_exponents_of_map(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca [3 x i32]
%6 = bitcast [3 x i32]* %5 to i8*
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
store i32 %0, i32* %7
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
store i32 %1, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 2
store i32 %2, i32* %9
%10 = call i32 @_ada_use_c2phc4c(i32 437, i32* %7, i32* %3, double* undef, i32 0)
ret i32 %10
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ netflow5_handle_pkt(char const *, int);
int netflow5_valid_pkt(char const *, int);
void netflow5_recv_pkt(const char *pkt_buf, int pkt_len,
                       struct sockaddr_in *src_addr) {
  int record_count;
  record_count = netflow5_valid_pkt(pkt_buf, pkt_len);
  if (record_count > 0)
    netflow5_handle_pkt(pkt_buf, record_count);
}


x86 assembly (clang, -O0):
<netflow5_recv_pkt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <netflow5_valid_pkt@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    1158 <netflow5_recv_pkt+0x38>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <netflow5_handle_pkt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<netflow5_recv_pkt>:
push   %rbx
mov    %rdi,%rbx
call   1040 <netflow5_valid_pkt@plt>
test   %eax,%eax
jle    1138 <netflow5_recv_pkt+0x18>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <netflow5_handle_pkt@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
define void @netflow5_recv_pkt(i8* %0, i32 %1, %struct.sockaddr_in* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca %struct.sockaddr_in*
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store %struct.sockaddr_in* %2, %struct.sockaddr_in** %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = call i32 @netflow5_valid_pkt(i8* %8, i32 %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %3
%14 = load i8*, i8** %4
%15 = load i32, i32* %7
%16 = call i32 @netflow5_handle_pkt(i8* %14, i32 %15)
br label %17
17: ; preds = %13, %3
ret void
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
define void @netflow5_recv_pkt(i8* %0, i32 %1, %struct.sockaddr_in* nocapture readnone %2) {
%4 = tail call i32 @netflow5_valid_pkt(i8* %0, i32 %1)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @netflow5_handle_pkt(i8* %0, i32 %4)
br label %8
8: ; preds = %6, %3
ret void
}
/* Type definitions */
struct device_node {
  int dummy;
};

/* Variables and functions */
int of_gpio_named_count(struct device_node *, char *);
int of_gpio_count(struct device_node *np) {
  return of_gpio_named_count(np, "gpios");
}


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

x86 assembly (clang, -O2):
<of_gpio_count>:
lea    0xee9(%rip),%rsi
jmp    1030 <of_gpio_named_count@plt>

LLVM IR (-O0):
%struct.device_node = type { i32 }
@.str = [6 x i8] c"gpios\00"
define i32 @of_gpio_count(%struct.device_node* %0) {
%2 = alloca %struct.device_node*
store %struct.device_node* %0, %struct.device_node** %2
%3 = load %struct.device_node*, %struct.device_node** %2
%4 = call i32 @of_gpio_named_count(%struct.device_node* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
%struct.device_node = type { i32 }
@.str = [6 x i8] c"gpios\00"
define i32 @of_gpio_count(%struct.device_node* %0) {
%2 = tail call i32 @of_gpio_named_count(%struct.device_node* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
void g_cclosure_new() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ v4l2_free_bufs(struct v4l2_driver *);
int v4l2_stop_streaming(struct v4l2_driver *drv) {
  v4l2_free_bufs(drv);
  return 0;
}


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

x86 assembly (clang, -O2):
<v4l2_stop_streaming>:
push   %rax
call   1030 <v4l2_free_bufs@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.v4l2_driver = type { i32 }
define i32 @v4l2_stop_streaming(%struct.v4l2_driver* %0) {
%2 = tail call i32 @v4l2_free_bufs(%struct.v4l2_driver* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ lb_abort();
int /*<<< orphan*/ lbi_assure_write_string(char const *);
void lbi_assure_failed(char const *str) {
  lbi_assure_write_string(str);
  {
    lb_abort();
    while (1)
      ;
  };
}


x86 assembly (clang, -O0):
<lbi_assure_failed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <lbi_assure_write_string@plt>
mov    $0x0,%al
call   1030 <lb_abort@plt>
jmp    113c <lbi_assure_failed+0x1c>

x86 assembly (clang, -O2):
<lbi_assure_failed>:
push   %rax
call   1040 <lbi_assure_write_string@plt>
xor    %eax,%eax
call   1030 <lb_abort@plt>
nopl   (%rax)
jmp    1130 <lbi_assure_failed+0x10>

LLVM IR (-O0):
define void @lbi_assure_failed(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @lbi_assure_write_string(i8* %3)
%5 = call i32 (...) @lb_abort()
br label %6
6: ; preds = %1, %6
br label %6
}

LLVM IR (-O2):
define void @lbi_assure_failed(i8* %0) {
%2 = tail call i32 @lbi_assure_write_string(i8* %0)
%3 = tail call i32 (...) @lb_abort()
br label %4
4: ; preds = %1, %4
br label %4
}
/* Type definitions */
struct A {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ A_read(void *, struct A *, int, unsigned long);
int read_raw_varint32(unsigned long *, void *, int);
int A_read_delimited_from(void *_buffer, struct A *_A, int offset) {
  unsigned long size;
  offset = read_raw_varint32(&size, _buffer, offset);
  A_read(_buffer, _A, offset, size + offset);
  return offset + size;
}


x86 assembly (clang, -O0):
<A_read_delimited_from>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    -0x20(%rbp),%rdi
call   1040 <read_raw_varint32@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
movslq -0x14(%rbp),%rax
add    %rax,%rcx
call   1030 <A_read@plt>
movslq -0x14(%rbp),%rax
add    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<A_read_delimited_from>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
lea    0x8(%rsp),%rdi
mov    %r15,%rsi
call   1040 <read_raw_varint32@plt>
movslq %eax,%rbx
mov    0x8(%rsp),%rcx
add    %rbx,%rcx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1030 <A_read@plt>
add    0x8(%rsp),%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.A = type { i32 }
define i32 @A_read_delimited_from(i8* %0, %struct.A* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca %struct.A*
%6 = alloca i32
%7 = alloca i64
store i8* %0, i8** %4
store %struct.A* %1, %struct.A** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %6
%10 = call i32 @read_raw_varint32(i64* %7, i8* %8, i32 %9)
store i32 %10, i32* %6
%11 = load i8*, i8** %4
%12 = load %struct.A*, %struct.A** %5
%13 = load i32, i32* %6
%14 = load i64, i64* %7
%15 = load i32, i32* %6
%16 = sext i32 %15 to i64
%17 = add i64 %14, %16
%18 = call i32 @A_read(i8* %11, %struct.A* %12, i32 %13, i64 %17)
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = load i64, i64* %7
%22 = add i64 %20, %21
%23 = trunc i64 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
%struct.A = type { i32 }
define i32 @A_read_delimited_from(i8* %0, %struct.A* %1, i32 %2) {
%4 = alloca i64
%5 = bitcast i64* %4 to i8*
%6 = call i32 @read_raw_varint32(i64* %4, i8* %0, i32 %2)
%7 = load i64, i64* %4
%8 = sext i32 %6 to i64
%9 = add i64 %7, %8
%10 = call i32 @A_read(i8* %0, %struct.A* %1, i32 %6, i64 %9)
%11 = load i64, i64* %4
%12 = trunc i64 %11 to i32
%13 = add i32 %6, %12
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_int(void *addr) { printf(" %d", *(int *)addr); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c" %d\00"
define void @print_int(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hangReset();
int /*<<< orphan*/ pinMode(int, int);
void hangInit() {
  pinMode(2, 0x01);
  pinMode(1, 0x01);
  hangReset();
}


x86 assembly (clang, -O0):
<hangInit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <pinMode@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1040 <pinMode@plt>
mov    $0x0,%al
call   1030 <hangReset@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hangInit>:
push   %rax
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <pinMode@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1040 <pinMode@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <hangReset@plt>

LLVM IR (-O0):
define void @hangInit() {
%1 = call i32 @pinMode(i32 2, i32 1)
%2 = call i32 @pinMode(i32 1, i32 1)
%3 = call i32 (...) @hangReset()
ret void
}

LLVM IR (-O2):
define void @hangInit() {
%1 = tail call i32 @pinMode(i32 2, i32 1)
%2 = tail call i32 @pinMode(i32 1, i32 1)
%3 = tail call i32 (...) @hangReset()
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ sbox128x(int, void *);
void sbox128(void *w, uint8_t box) { sbox128x(box & 0x7, w); }


x86 assembly (clang, -O0):
<sbox128>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
and    $0x7,%edi
mov    -0x8(%rbp),%rsi
call   1030 <sbox128x@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbox128>:
mov    %rdi,%rax
and    $0x7,%esi
mov    %esi,%edi
mov    %rax,%rsi
jmp    1030 <sbox128x@plt>

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

LLVM IR (-O2):
define void @sbox128(i8* %0, i32 %1) {
%3 = and i32 %1, 7
%4 = tail call i32 @sbox128x(i32 %3, i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ __glTexParameterfv_size(int /*<<< orphan*/);
__attribute__((visibility("internal"))) __attribute__((pure)) GLint
__glTexParameteriv_size(GLenum e) {
  return __glTexParameterfv_size(e);
}


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

x86 assembly (clang, -O2):
<__glTexParameteriv_size>:
jmp    1030 <__glTexParameterfv_size@plt>

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

LLVM IR (-O2):
define hidden i32 @__glTexParameteriv_size(i32 %0) {
%2 = tail call i32 @__glTexParameterfv_size(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *ntru_malloc(size_t size) {
  void *ptr;
  ptr = malloc(size);
  if (size)
    if (!ptr) {
      fprintf(stderr, "failed to allocate memory, aborting!");
      abort();
    }
  return ptr;
}


x86 assembly (clang, -O0):
<ntru_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1180 <ntru_malloc+0x50>
cmpq   $0x0,-0x10(%rbp)
jne    117b <ntru_malloc+0x4b>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
lea    0xe91(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1180 <ntru_malloc+0x50>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntru_malloc>:
push   %rbx
mov    %rdi,%rbx
call   1050 <malloc@plt>
test   %rbx,%rbx
je     1143 <ntru_malloc+0x13>
test   %rax,%rax
je     1145 <ntru_malloc+0x15>
pop    %rbx
ret
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"failed to allocate memory, aborting!\00"
define i8* @ntru_malloc(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 i64, i64* %2
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = icmp ne i8* %9, null
br i1 %10, label %15, label %11
11: ; preds = %8
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %8
br label %16
16: ; preds = %15, %1
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"failed to allocate memory, aborting!\00"
define noalias i8* @ntru_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i64 %0, 0
%4 = icmp ne i8* %2, null
%5 = or i1 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ ver_up_auto_mark_1_2_36();
void ver_up_game_data_1_2_36(void) { ver_up_auto_mark_1_2_36(); }


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

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

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

LLVM IR (-O2):
define void @ver_up_game_data_1_2_36() {
%1 = tail call i32 (...) @ver_up_auto_mark_1_2_36()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fwrite(char const *, int, size_t, int /*<<< orphan*/ *);
size_t strlen(char const *);
int fwrite_ok(const char *p_str, FILE *p_file) {
  size_t bytes_written;
  size_t bytes_to_write;
  bytes_to_write = strlen(p_str);
  bytes_written = fwrite(p_str, sizeof(char), bytes_to_write, p_file);
  if (bytes_to_write != bytes_written) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<fwrite_ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fwrite@plt>
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
je     1171 <fwrite_ok+0x51>
movl   $0x0,-0x4(%rbp)
jmp    1178 <fwrite_ok+0x58>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fwrite_ok>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %rax,%rdx
mov    %r14,%rcx
call   1040 <fwrite@plt>
xor    %ecx,%ecx
cmp    %rax,%r15
sete   %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @fwrite_ok(i8* nocapture %0, i32* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @fwrite(i8* %0, i32 1, i64 %3, i32* %1)
%5 = icmp eq i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
int next_power_of_2(int n) {
  int m = 1;
  while (m < n)
    m <<= 1;
  return m;
}


x86 assembly (clang, -O0):
<next_power_of_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1128 <next_power_of_2+0x28>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <next_power_of_2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_power_of_2>:
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
cmp    %edi,%eax
jl     1110 <next_power_of_2+0x10>
ret

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

LLVM IR (-O2):
define i32 @next_power_of_2(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %5, %2 ]
%4 = icmp slt i32 %3, %0
%5 = shl i32 %3, 1
br i1 %4, label %2, label %6
6: ; preds = %2
ret i32 %3
}
int main(int argc, char **argv) {
  if (argc == 0) {
    int num = 0;
    printf("%d\n", &num);
  } else {
    int num = argc + 1337;
    num = num * 2063;
    num = num % 73;
    printf("%d\n", num);
  }
  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)
cmpl   $0x0,-0x8(%rbp)
jne    114e <main+0x3e>
movl   $0x0,-0x14(%rbp)
lea    0xec2(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1182 <main+0x72>
mov    -0x8(%rbp),%eax
add    $0x539,%eax
mov    %eax,-0x18(%rbp)
imul   $0x80f,-0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x49,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
test   %edi,%edi
je     115a <main+0x4a>
imul   $0x80f,%edi,%eax
mov    %eax,%ecx
add    $0x2a1657,%ecx
movslq %ecx,%rsi
imul   $0xffffffffe070381d,%rsi,%rcx
shr    $0x20,%rcx
add    %ecx,%eax
add    $0x2a1657,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x6,%eax
add    %ecx,%eax
lea    (%rax,%rax,8),%ecx
lea    (%rax,%rcx,8),%eax
sub    %eax,%esi
lea    0xeaf(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1175 <main+0x65>
movl   $0x0,0x4(%rsp)
lea    0xe97(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = icmp eq i32 %0, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
br label %13
8: ; preds = %2
%9 = mul i32 %0, 2063
%10 = add i32 %9, 2758231
%11 = srem i32 %10, 73
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %8, %5
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void bnfa_free(void *p, int n, int *m) {
  if (p) {
    free(p);
    if (m) {
      m[0] -= n;
    }
  }
}


x86 assembly (clang, -O0):
<bnfa_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1154 <bnfa_free+0x44>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x18(%rbp)
je     114f <bnfa_free+0x3f>
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
jmp    1154 <bnfa_free+0x44>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bnfa_free>:
push   %rbp
push   %rbx
push   %rax
test   %rdi,%rdi
je     1129 <bnfa_free+0x19>
mov    %rdx,%rbx
mov    %esi,%ebp
call   1030 <free@plt>
test   %rbx,%rbx
je     1129 <bnfa_free+0x19>
sub    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @bnfa_free(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %21
9: ; preds = %3
%10 = load i8*, i8** %4
%11 = call i32 @free(i8* %10)
%12 = load i32*, i32** %6
%13 = icmp ne i32* %12, null
br i1 %13, label %14, label %20
14: ; preds = %9
%15 = load i32, i32* %5
%16 = load i32*, i32** %6
%17 = getelementptr inbounds i32, i32* %16, i64 0
%18 = load i32, i32* %17
%19 = sub nsw i32 %18, %15
store i32 %19, i32* %17
br label %20
20: ; preds = %14, %9
br label %21
21: ; preds = %20, %3
ret void
}

LLVM IR (-O2):
define void @bnfa_free(i8* %0, i32 %1, i32* %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %11, label %5
5: ; preds = %3
%6 = tail call i32 @free(i8* %0)
%7 = icmp eq i32* %2, null
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, %1
store i32 %10, i32* %2
br label %11
11: ; preds = %5, %8, %3
ret void
}
void P_entityinit() {}


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

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_v6_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_interface_name(char *);
void get_router_ip_address(char *routerIPAddr) {
  char mac[4];
  get_interface_name(mac);
}


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

x86 assembly (clang, -O2):
<get_router_ip_address>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <get_interface_name@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @get_router_ip_address(i8* nocapture readnone %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = call i32 @get_interface_name(i8* %3)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
double wy2gau(uint64_t r) {
  const double _wynorm = 1.0 / (1ull << 20);
  return ((r & 0x1fffff) + ((r >> 21) & 0x1fffff) + ((r >> 42) & 0x1fffff)) *
             _wynorm -
         3.0;
}


x86 assembly (clang, -O0):
<wy2gau>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  0xef1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1fffff,%eax
mov    -0x4(%rbp),%ecx
sar    $0x15,%ecx
and    $0x1fffff,%ecx
add    %ecx,%eax
mov    -0x4(%rbp),%edx
mov    $0x2a,%ecx
sar    %cl,%edx
mov    %edx,%ecx
and    $0x1fffff,%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  0xeb6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb2(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @wy2gau(i32 %0) {
%2 = alloca i32
%3 = alloca double
store i32 %0, i32* %2
store double 0x3EB0000000000000, double* %3
%4 = load i32, i32* %2
%5 = and i32 %4, 2097151
%6 = load i32, i32* %2
%7 = ashr i32 %6, 21
%8 = and i32 %7, 2097151
%9 = add nsw i32 %5, %8
%10 = load i32, i32* %2
%11 = ashr i32 %10, 42
%12 = and i32 %11, 2097151
%13 = add nsw i32 %9, %12
%14 = sitofp i32 %13 to double
%15 = call double @llvm.fmuladd.f64(double %14, double 0x3EB0000000000000, double -3.000000e+00)
ret double %15
}

LLVM IR (-O2):
define double @wy2gau(i32 %0) {
ret double poison
}