xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fw_destroy();
void handle_signal(int sig, short event, void *arg) {
  fw_destroy();
  exit(144);
}


x86 assembly (clang, -O0):
<handle_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %rdx,-0x10(%rbp)
mov    $0x0,%al
call   1030 <fw_destroy@plt>
mov    $0x90,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handle_signal>:
push   %rax
xor    %eax,%eax
call   1030 <fw_destroy@plt>
mov    $0x90,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @handle_signal(i32 %0, i16 signext %1, i8* %2) {
%4 = alloca i32
%5 = alloca i16
%6 = alloca i8*
store i32 %0, i32* %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%7 = call i32 (...) @fw_destroy()
%8 = call i32 @exit(i32 144)
unreachable
}

LLVM IR (-O2):
define void @handle_signal(i32 %0, i16 signext %1, i8* nocapture readnone %2) {
%4 = tail call i32 (...) @fw_destroy()
%5 = tail call i32 @exit(i32 144)
unreachable
}
char const *pubnub_sdk_name(void) { return "Windows"; }


x86 assembly (clang, -O0):
<pubnub_sdk_name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"Windows\00"
define i8* @pubnub_sdk_name() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [8 x i8] c"Windows\00"
define i8* @pubnub_sdk_name() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
char *mystrcpy(char *s1, const char *s2) {
  char *s = s1;
  while ((*s++ = *s2++) != 0)
    ;
  return (s1);
}


x86 assembly (clang, -O0):
<mystrcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1147 <mystrcpy+0x47>
jmp    1114 <mystrcpy+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <mystrcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @mystrcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
float _madgwick_ahrs_inv_sqrt(float x) {
  float halfx = 0.5f * x;
  float y = x;
  long i = *(long *)&y;
  i = 0x5f3759df - (i >> 1);
  y = *(float *)&i;
  y = y * (1.5f - (halfx * y * y));
  return y;
}


x86 assembly (clang, -O0):
<_madgwick_ahrs_inv_sqrt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
sar    $0x1,%rcx
mov    $0x5f3759df,%eax
sub    %rcx,%rax
mov    %rax,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm1
movss  0xe88(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @_madgwick_ahrs_inv_sqrt(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca i64
store float %0, float* %2
%6 = load float, float* %2
%7 = fmul float 5.000000e-01, %6
store float %7, float* %3
%8 = load float, float* %2
store float %8, float* %4
%9 = bitcast float* %4 to i64*
%10 = load i64, i64* %9
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = ashr i64 %11, 1
%13 = sub nsw i64 1597463007, %12
store i64 %13, i64* %5
%14 = bitcast i64* %5 to float*
%15 = load float, float* %14
store float %15, float* %4
%16 = load float, float* %4
%17 = load float, float* %3
%18 = load float, float* %4
%19 = fmul float %17, %18
%20 = load float, float* %4
%21 = fneg float %19
%22 = call float @llvm.fmuladd.f32(float %21, float %20, float 1.500000e+00)
%23 = fmul float %16, %22
store float %23, float* %4
%24 = load float, float* %4
ret float %24
}

LLVM IR (-O2):
define float @_madgwick_ahrs_inv_sqrt(float %0) {
ret float poison
}
/* Variables and functions */
unsigned char srgb(double);
void grayscale(unsigned char *out, double v) {
  unsigned char g = srgb(v);
  out[0] = g;
  out[1] = g;
  out[2] = g;
}


x86 assembly (clang, -O0):
<grayscale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <srgb@plt>
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x11(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<grayscale>:
push   %rbx
mov    %rdi,%rbx
call   1030 <srgb@plt>
mov    %al,(%rbx)
mov    %al,0x1(%rbx)
mov    %al,0x2(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @grayscale(i8* nocapture writeonly %0, double %1) {
%3 = tail call zeroext i8 @srgb(double %1)
store i8 %3, i8* %0
%4 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %3, i8* %4
%5 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %3, i8* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ testcond(int);
int main(void) {
  if (testcond(1))
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <testcond@plt>
cmp    $0x0,%rax
je     115a <main+0x2a>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <testcond@plt>
test   %rax,%rax
jne    1147 <main+0x17>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @testcond(i32 1)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @testcond(i32 1)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ instruction_count_end();
int /*<<< orphan*/ instruction_count_set_string(char *);
int /*<<< orphan*/ instruction_count_start();
void __attribute__((optimize("0"))) plus(void) {
  int a = 1;
  int b = 2;
  int c = 0;
  instruction_count_set_string("plus");
  instruction_count_start();
  c = a + b;
  instruction_count_end();
}


x86 assembly (clang, -O0):
<plus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xeac(%rip),%rdi
call   1030 <instruction_count_set_string@plt>
mov    $0x0,%al
call   1050 <instruction_count_start@plt>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <instruction_count_end@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plus>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <instruction_count_set_string@plt>
xor    %eax,%eax
call   1050 <instruction_count_start@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <instruction_count_end@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"plus\00"
define void @plus() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1, i32* %1
store i32 2, i32* %2
store i32 0, i32* %3
%4 = call i32 @instruction_count_set_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @instruction_count_start()
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = add nsw i32 %6, %7
store i32 %8, i32* %3
%9 = call i32 (...) @instruction_count_end()
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"plus\00"
define void @plus() {
%1 = tail call i32 @instruction_count_set_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @instruction_count_start()
%3 = tail call i32 (...) @instruction_count_end()
ret void
}
/* Variables and functions */
void *m_calloc_(size_t, size_t, char *, int);
void *m_calloc_compat(size_t num, size_t size) {
  return m_calloc_(num, size,
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/"
                   "heads/master/dg/z88dk/src/z80asm/lib/alloc.c",
                   263);
}


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

x86 assembly (clang, -O2):
<m_calloc_compat>:
lea    0xee9(%rip),%rdx
mov    $0x107,%ecx
jmp    1030 <m_calloc_@plt>

LLVM IR (-O0):
@.str = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/src/z80asm/lib/alloc.c\00"
define i8* @m_calloc_compat(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = call i8* @m_calloc_(i64 %5, i64 %6, i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str, i64 0, i64 0), i32 263)
ret i8* %7
}

LLVM IR (-O2):
@.str = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/src/z80asm/lib/alloc.c\00"
define i8* @m_calloc_compat(i64 %0, i64 %1) {
%3 = tail call i8* @m_calloc_(i64 %0, i64 %1, i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str, i64 0, i64 0), i32 263)
ret i8* %3
}
void gdk_pango_attr_stipple_new() {}


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

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

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

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

/* Variables and functions */
int prefix_lft_infinite(uint32_t lft) { return lft == 0xFFFFFFFF; }


x86 assembly (clang, -O0):
<prefix_lft_infinite>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prefix_lft_infinite>:
xor    %eax,%eax
cmp    $0xffffffff,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @prefix_lft_infinite(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @prefix_lft_infinite(i32 %0) {
%2 = icmp eq i32 %0, -1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
__attribute__((no)) void sys_open(int n) {
loop:
  if (n > 0) {
    printf("In goto loop...\n");
    n--;
    goto loop;
  }
}


x86 assembly (clang, -O0):
<sys_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    113f <sys_open+0x2f>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    111b <sys_open+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_open>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    1140 <sys_open+0x30>
mov    %edi,%ebx
add    $0x1,%ebx
lea    0xedc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
call   1030 <puts@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1130 <sys_open+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [17 x i8] c"In goto loop...\0A\00"
define void @sys_open(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %6, %1
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = add nsw i32 %8, -1
store i32 %9, i32* %2
br label %3
10: ; preds = %3
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"In goto loop...\00"
define void @sys_open(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%6 = add nsw i32 %4, -1
%7 = icmp ugt i32 %4, 1
br i1 %7, label %3, label %8
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int set_seed(int seed) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(998, &seed, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<set_seed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x3e6,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_seed>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x3e6,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @set_seed(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc(i32 998, i32* %2, i32* %6, double* %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @set_seed(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 998, i32* %2, i32* undef, double* undef)
ret i32 %3
}
/* Variables and functions */
scalar_t__ check(char *);
int /*<<< orphan*/ printf(char *, scalar_t__);
int /*<<< orphan*/ publishing_house(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char ISBN13[20];
  scanf("%s", ISBN13);
  printf("%d", check(ISBN13));
  if (check(ISBN13) != 0)
    publishing_house(ISBN13);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x20(%rbp),%rdi
call   1060 <check@plt>
mov    %rax,%rsi
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
call   1060 <check@plt>
cmp    $0x0,%rax
je     1193 <main+0x53>
lea    -0x20(%rbp),%rdi
call   1040 <publishing_house@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xeb4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1060 <check@plt>
lea    0xe9d(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1060 <check@plt>
test   %rax,%rax
je     1183 <main+0x43>
mov    %rsp,%rdi
call   1040 <publishing_house@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%6 = call i64 @check(i8* %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i64 %6)
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%9 = call i64 @check(i8* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %0
%12 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%13 = call i32 @publishing_house(i8* %12)
br label %14
14: ; preds = %11, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i64 @check(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i64 %4)
%6 = call i64 @check(i8* %2)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %0
%9 = call i32 @publishing_house(i8* %2)
br label %10
10: ; preds = %8, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *n) {
  printf("Usage: %s useraccount /path/program [args]\n", n);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [44 x i8] c"Usage: %s useraccount /path/program [args]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [44 x i8] c"Usage: %s useraccount /path/program [args]\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ rdtsc();
int main() {
  printf("rdtsc: %llu\n", rdtsc());
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"rdtsc: %llu\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @rdtsc()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int gsdelim(char ch) {
  if (ch == ' ')
    return (1);
  if (ch == ';')
    return (1);
  if (ch == ',')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<gsdelim>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jne    1123 <gsdelim+0x23>
movl   $0x1,-0x4(%rbp)
jmp    115c <gsdelim+0x5c>
movsbl -0x5(%rbp),%eax
cmp    $0x3b,%eax
jne    113c <gsdelim+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    115c <gsdelim+0x5c>
movsbl -0x5(%rbp),%eax
cmp    $0x2c,%eax
jne    1155 <gsdelim+0x55>
movl   $0x1,-0x4(%rbp)
jmp    115c <gsdelim+0x5c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsdelim>:
cmp    $0x3b,%dil
ja     1120 <gsdelim+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x800100100000000,%rdx
bt     %rcx,%rdx
jae    1120 <gsdelim+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @gsdelim(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 59, label %3
i8 44, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void print_indent(FILE *stream, int level) {
  int i;
  for (i = 0; i < level; i++) {
    fprintf(stream, "    ");
  }
}


x86 assembly (clang, -O0):
<print_indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1150 <print_indent+0x40>
mov    -0x8(%rbp),%rdi
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_indent+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_indent>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    114a <print_indent+0x3a>
mov    %esi,%ebx
mov    %rdi,%r14
lea    0xedb(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x4,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %r14,%rcx
call   1030 <fwrite@plt>
add    $0xffffffff,%ebx
jne    1130 <print_indent+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c" \00"
define void @print_indent(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 4, i64 1, i32* %0)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %1
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
int rand_hash(int r) { return 1664525 * r ^ 1013904223; }


x86 assembly (clang, -O0):
<rand_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x19660d,-0x4(%rbp),%eax
xor    $0x3c6ef35f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_hash>:
imul   $0x19660d,%edi,%eax
xor    $0x3c6ef35f,%eax
ret

LLVM IR (-O0):
define i32 @rand_hash(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 1664525, %3
%5 = xor i32 %4, 1013904223
ret i32 %5
}

LLVM IR (-O2):
define i32 @rand_hash(i32 %0) {
%2 = mul nsw i32 %0, 1664525
%3 = xor i32 %2, 1013904223
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int buffer_write(int /*<<< orphan*/ *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int buffer_puts(BIO *b, const char *str) {
  return (buffer_write(b, str, strlen(str)));
}


x86 assembly (clang, -O0):
<buffer_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <buffer_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_puts>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <buffer_write@plt>

LLVM IR (-O0):
define i32 @buffer_puts(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @buffer_write(i32* %5, i8* %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @buffer_puts(i32* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @buffer_write(i32* %0, i8* %1, i32 %3)
ret i32 %4
}
/* Type definitions */
struct pgraph_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ abort();
int nv03_pgraph_surf_format(struct pgraph_state *);
int nv03_pgraph_cpp(struct pgraph_state *state) {
  switch (nv03_pgraph_surf_format(state) & 3) {
  case 1:
    return 1;
  case 0:
  case 2:
    return 2;
  case 3:
    return 4;
  default:
    abort();
  }
}


x86 assembly (clang, -O0):
<nv03_pgraph_cpp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <nv03_pgraph_surf_format@plt>
and    $0x3,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x3,%eax
ja     117f <nv03_pgraph_cpp+0x5f>
mov    -0x18(%rbp),%rax
lea    0xeae(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    1186 <nv03_pgraph_cpp+0x66>
movl   $0x2,-0x4(%rbp)
jmp    1186 <nv03_pgraph_cpp+0x66>
movl   $0x4,-0x4(%rbp)
jmp    1186 <nv03_pgraph_cpp+0x66>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nv03_pgraph_cpp>:
push   %rax
call   1030 <nv03_pgraph_surf_format@plt>
and    $0x3,%eax
lea    0xee0(%rip),%rcx
mov    (%rcx,%rax,4),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.pgraph_state = type { i32 }
define i32 @nv03_pgraph_cpp(%struct.pgraph_state* %0) {
%2 = alloca i32
%3 = alloca %struct.pgraph_state*
store %struct.pgraph_state* %0, %struct.pgraph_state** %3
%4 = load %struct.pgraph_state*, %struct.pgraph_state** %3
%5 = call i32 @nv03_pgraph_surf_format(%struct.pgraph_state* %4)
%6 = and i32 %5, 3
switch i32 %6, label %10 [
i32 1, label %7
i32 0, label %8
i32 2, label %8
i32 3, label %9
]
7: ; preds = %1
store i32 1, i32* %2
br label %12
8: ; preds = %1, %1
store i32 2, i32* %2
br label %12
9: ; preds = %1
store i32 4, i32* %2
br label %12
10: ; preds = %1
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %9, %8, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.pgraph_state = type { i32 }
@switch.table.nv03_pgraph_cpp = [4 x i32] [i32 2, i32 1, i32 2, i32 4]
define i32 @nv03_pgraph_cpp(%struct.pgraph_state* %0) {
%2 = tail call i32 @nv03_pgraph_surf_format(%struct.pgraph_state* %0)
%3 = and i32 %2, 3
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.nv03_pgraph_cpp, i64 0, i64 %4
%6 = load i32, i32* %5
ret i32 %6
}
void gtk_icon_factory_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_factory_get_type() {
ret void
}
/* Type definitions */
typedef scalar_t__ wint_t;

/* Variables and functions */
int iswascii(wint_t wc) {
  int c;
  c = (int)wc;
  return ((c & ~0x7F) == 0);
}


x86 assembly (clang, -O0):
<iswascii>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xffffff80,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswascii>:
xor    %eax,%eax
test   $0xffffff80,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @iswascii(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = trunc i64 %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = and i32 %6, -128
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @iswascii(i64 %0) {
%2 = and i64 %0, 4294967168
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
size_t aeron_res_header_address_length(int8_t res_type) {
  return (0x02) == res_type ? (16) : (4);
}


x86 assembly (clang, -O0):
<aeron_res_header_address_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x2,%edx
mov    $0x4,%eax
mov    $0x10,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<aeron_res_header_address_length>:
cmp    $0x2,%edi
mov    $0x10,%ecx
mov    $0x4,%eax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
define i64 @aeron_res_header_address_length(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 2, %3
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 16, i32 4
%7 = sext i32 %6 to i64
ret i64 %7
}

LLVM IR (-O2):
define i64 @aeron_res_header_address_length(i32 %0) {
%2 = icmp eq i32 %0, 2
%3 = select i1 %2, i64 16, i64 4
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ emq_queue_sudirription_release(void *);
void emq_queue_sudirription_list_free_handler(void *value) {
  emq_queue_sudirription_release(value);
}


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

x86 assembly (clang, -O2):
<emq_queue_sudirription_list_free_handler>:
jmp    1030 <emq_queue_sudirription_release@plt>

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

LLVM IR (-O2):
define void @emq_queue_sudirription_list_free_handler(i8* %0) {
%2 = tail call i32 @emq_queue_sudirription_release(i8* %0)
ret void
}
int foo_2() { return 1343; }


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

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

LLVM IR (-O0):
define i32 @foo_2() {
ret i32 1343
}

LLVM IR (-O2):
define i32 @foo_2() {
ret i32 1343
}
/* Type definitions */
struct Layer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ layer_weight_rand(struct Layer *);
void neural_layer_connected_rand(struct Layer *l) { layer_weight_rand(l); }


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

x86 assembly (clang, -O2):
<neural_layer_connected_rand>:
jmp    1030 <layer_weight_rand@plt>

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

LLVM IR (-O2):
%struct.Layer = type { i32 }
define void @neural_layer_connected_rand(%struct.Layer* %0) {
%2 = tail call i32 @layer_weight_rand(%struct.Layer* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, char *);
void function_atid(char *atid) { write("csv-task.csv", "%s\n", atid); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @function_atid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @function_atid(i8* %0) {
%2 = tail call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ iscntrl(int);
int isprint(int c) { return !iscntrl(c); }


x86 assembly (clang, -O0):
<isprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprint>:
push   %rax
call   1030 <iscntrl@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isprint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @iscntrl(i32 %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @isprint(i32 %0) {
%2 = tail call i32 @iscntrl(i32 %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void mainboard_interrupt_handlers(int intXX, int (*intXX_func)(void)) {}


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

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

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

LLVM IR (-O2):
define void @mainboard_interrupt_handlers(i32 %0, i32 ()* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t tlvh_get_version(const uint8_t *p_tlv) { return p_tlv[0]; }


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

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

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

LLVM IR (-O2):
define i32 @tlvh_get_version(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
int main(void) {
  int x = 0;
  int g = 0x0, h = 0x7, j = 0xa, k = 0xf, l = 0xf;
  int y = 10;
  for (int i = 0; i < y; i++) {
    x += y * i;
    g = h & j & i | k;
    g = !g;
  }
  if (x & 0xa > y) {
    x = 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x7,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
movl   $0xf,-0x18(%rbp)
movl   $0xf,-0x1c(%rbp)
movl   $0xa,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    118a <main+0x8a>
mov    -0x20(%rbp),%eax
imul   -0x24(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
and    -0x14(%rbp),%eax
and    -0x24(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1143 <main+0x43>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cmp    -0x20(%rbp),%ecx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     11b0 <main+0xb0>
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 7, i32* %4
store i32 10, i32* %5
store i32 15, i32* %6
store i32 15, i32* %7
store i32 10, i32* %8
store i32 0, i32* %9
br label %10
10: ; preds = %31, %0
%11 = load i32, i32* %9
%12 = load i32, i32* %8
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %34
14: ; preds = %10
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = mul nsw i32 %15, %16
%18 = load i32, i32* %2
%19 = add nsw i32 %18, %17
store i32 %19, i32* %2
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = and i32 %20, %21
%23 = load i32, i32* %9
%24 = and i32 %22, %23
%25 = load i32, i32* %6
%26 = or i32 %24, %25
store i32 %26, i32* %3
%27 = load i32, i32* %3
%28 = icmp ne i32 %27, 0
%29 = xor i1 %28, true
%30 = zext i1 %29 to i32
store i32 %30, i32* %3
br label %31
31: ; preds = %14
%32 = load i32, i32* %9
%33 = add nsw i32 %32, 1
store i32 %33, i32* %9
br label %10
34: ; preds = %10
%35 = load i32, i32* %2
%36 = load i32, i32* %8
%37 = icmp sgt i32 10, %36
%38 = zext i1 %37 to i32
%39 = and i32 %35, %38
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %42
41: ; preds = %34
store i32 0, i32* %2
br label %42
42: ; preds = %41, %34
%43 = load i32, i32* %1
ret i32 %43
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t
hci_event_inquiry_result_with_rssi_get_num_responses(const uint8_t *event) {
  return event[2];
}


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

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

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

LLVM IR (-O2):
define i32 @hci_event_inquiry_result_with_rssi_get_num_responses(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
struct mm_struct {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ flush_tlb_mm(struct mm_struct *);
void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start,
                        unsigned long end) {
  flush_tlb_mm(mm);
}


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

x86 assembly (clang, -O2):
<flush_tlb_pgtables>:
jmp    1030 <flush_tlb_mm@plt>

LLVM IR (-O0):
%struct.mm_struct = type { i32 }
define void @flush_tlb_pgtables(%struct.mm_struct* %0, i64 %1, i64 %2) {
%4 = alloca %struct.mm_struct*
%5 = alloca i64
%6 = alloca i64
store %struct.mm_struct* %0, %struct.mm_struct** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load %struct.mm_struct*, %struct.mm_struct** %4
%8 = call i32 @flush_tlb_mm(%struct.mm_struct* %7)
ret void
}

LLVM IR (-O2):
%struct.mm_struct = type { i32 }
define void @flush_tlb_pgtables(%struct.mm_struct* %0, i64 %1, i64 %2) {
%4 = tail call i32 @flush_tlb_mm(%struct.mm_struct* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
bool isLeftAssociative(char operator) {
  switch (operator) {
  case '+':
  case '-':
  case '*':
  case '/':
  case '%':
    return true;
  case '^':
    return false;
  default:
    assert(0);
  }
}


x86 assembly (clang, -O0):
<isLeftAssociative>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x25,%eax
je     117a <isLeftAssociative+0x6a>
jmp    1133 <isLeftAssociative+0x23>
mov    -0xc(%rbp),%eax
add    $0xffffffd6,%eax
sub    $0x2,%eax
jb     117a <isLeftAssociative+0x6a>
jmp    1147 <isLeftAssociative+0x37>
mov    -0xc(%rbp),%eax
sub    $0x2d,%eax
je     117a <isLeftAssociative+0x6a>
jmp    1158 <isLeftAssociative+0x48>
mov    -0xc(%rbp),%eax
sub    $0x2f,%eax
je     117a <isLeftAssociative+0x6a>
jmp    1169 <isLeftAssociative+0x59>
mov    -0xc(%rbp),%eax
sub    $0x5e,%eax
je     1186 <isLeftAssociative+0x76>
jmp    1192 <isLeftAssociative+0x82>
movl   $0x1,-0x4(%rbp)
jmp    1199 <isLeftAssociative+0x89>
movl   $0x0,-0x4(%rbp)
jmp    1199 <isLeftAssociative+0x89>
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isLeftAssociative>:
add    $0xffffffdb,%edi
cmp    $0x39,%edi
ja     1132 <isLeftAssociative+0x22>
mov    $0x1,%eax
mov    $0x561,%ecx
bt     %rdi,%rcx
jae    1129 <isLeftAssociative+0x19>
ret
cmp    $0x39,%rdi
jne    1132 <isLeftAssociative+0x22>
xor    %eax,%eax
ret
push   %rax
xor    %edi,%edi
call   1030 <assert@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @isLeftAssociative(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %8 [
i32 43, label %6
i32 45, label %6
i32 42, label %6
i32 47, label %6
i32 37, label %6
i32 94, label %7
]
6: ; preds = %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %10
7: ; preds = %1
store i32 0, i32* %2
br label %10
8: ; preds = %1
%9 = call i32 @assert(i32 0)
br label %10
10: ; preds = %6, %7, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @isLeftAssociative(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %4 [
i32 43, label %6
i32 45, label %6
i32 42, label %6
i32 47, label %6
i32 37, label %6
i32 94, label %3
]
3: ; preds = %1
br label %6
4: ; preds = %1
%5 = tail call i32 @assert(i32 0)
br label %6
6: ; preds = %1, %1, %1, %1, %1, %3, %4
%7 = phi i32 [ undef, %4 ], [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %7
}
/* Variables and functions */
double sqrt(float);
unsigned int Euclidean_dis(int sx, int sy, int ex, int ey) {
  double nn;
  nn = sqrt((float)((sx - ex) * (sx - ex) + (sy - ey) * (sy - ey)));
  return nn;
}


x86 assembly (clang, -O0):
<Euclidean_dis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    %ecx,%eax
imul   %eax,%eax
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%edx
sub    %edx,%ecx
imul   %ecx,%ecx
add    %ecx,%eax
cvtsi2ss %eax,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x18(%rbp)
cvttsd2si -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Euclidean_dis>:
push   %rax
sub    %edx,%edi
imul   %edi,%edi
sub    %ecx,%esi
imul   %esi,%esi
add    %edi,%esi
cvtsi2ss %esi,%xmm0
call   1030 <sqrt@plt>
cvttsd2si %xmm0,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @Euclidean_dis(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
%11 = load i32, i32* %7
%12 = sub nsw i32 %10, %11
%13 = load i32, i32* %5
%14 = load i32, i32* %7
%15 = sub nsw i32 %13, %14
%16 = mul nsw i32 %12, %15
%17 = load i32, i32* %6
%18 = load i32, i32* %8
%19 = sub nsw i32 %17, %18
%20 = load i32, i32* %6
%21 = load i32, i32* %8
%22 = sub nsw i32 %20, %21
%23 = mul nsw i32 %19, %22
%24 = add nsw i32 %16, %23
%25 = sitofp i32 %24 to float
%26 = call double @sqrt(float %25)
store double %26, double* %9
%27 = load double, double* %9
%28 = fptoui double %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @Euclidean_dis(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %0, %2
%6 = mul nsw i32 %5, %5
%7 = sub nsw i32 %1, %3
%8 = mul nsw i32 %7, %7
%9 = add nuw nsw i32 %8, %6
%10 = sitofp i32 %9 to float
%11 = tail call double @sqrt(float %10)
%12 = fptoui double %11 to i32
ret i32 %12
}
/* Variables and functions */
int *max(int number_array[], size_t size) {
  int temp_max = number_array[0];
  int i;
  int *max_ptr;
  for (i = 0; i < size; i++) {
    if (number_array[i] > temp_max) {
      temp_max = number_array[i];
    }
  }
  max_ptr = &temp_max;
  return max_ptr;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movslq -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    115f <max+0x5f>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x14(%rbp),%eax
jle    114c <max+0x4c>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
jmp    1151 <max+0x51>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111c <max+0x1c>
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
lea    -0x4(%rsp),%rax
ret

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

LLVM IR (-O2):
define noalias i32* @max(i32* nocapture %0, i64 %1) {
%3 = alloca i32
ret i32* %3
}