xunge/DecIR huggingface dataset:
int iNemoEngineAPI_Initialization(char LocalEarthMagField, int MagFullScale,
                                  int formFactorNumber) {
  return 0;
}


x86 assembly (clang, -O0):
<iNemoEngineAPI_Initialization>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @iNemoEngineAPI_Initialization(i8 signext %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
ret i32 0
}

LLVM IR (-O2):
define i32 @iNemoEngineAPI_Initialization(i8 signext %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ MonitorNetlinkUevent();
int main(int argc, char **argv) {
  MonitorNetlinkUevent();
  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)
mov    $0x0,%al
call   1030 <MonitorNetlinkUevent@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
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 = call i32 (...) @MonitorNetlinkUevent()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @MonitorNetlinkUevent()
ret i32 0
}
/* Variables and functions */
int SendBatch_Sample();
int main(void) { return SendBatch_Sample(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @SendBatch_Sample()
ret i32 %1
}
void stack_destroy_data(void *data) {}


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

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

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

LLVM IR (-O2):
define void @stack_destroy_data(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *gui_check_ptr(void *ptr) {
  if (!ptr) {
    abort();
  }
  return ptr;
}


x86 assembly (clang, -O0):
<gui_check_ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112e <gui_check_ptr+0x1e>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_check_ptr>:
test   %rdi,%rdi
je     1119 <gui_check_ptr+0x9>
mov    %rdi,%rax
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @gui_check_ptr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
define i8* @gui_check_ptr(i8* readnone returned %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret i8* %0
}
void float_interpolator_c(float *s, float s_invw, float *e, float e_invw,
                          float t, float *r, float r_invw) {
  float ts = s[0] * s_invw;
  float te = e[0] * e_invw;
  r[0] = (ts + (te - ts) * t) / r_invw;
}


x86 assembly (clang, -O0):
<float_interpolator_c>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
movss  %xmm1,-0x1c(%rbp)
movss  %xmm2,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
movss  %xmm3,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x30(%rbp),%xmm1
movss  -0x34(%rbp),%xmm0
subss  -0x30(%rbp),%xmm0
movss  -0x20(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
divss  -0x2c(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_interpolator_c>:
mulss  (%rdi),%xmm0
mulss  (%rsi),%xmm1
subss  %xmm0,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
divss  %xmm3,%xmm1
movss  %xmm1,(%rdx)
ret

LLVM IR (-O0):
define void @float_interpolator_c(float* %0, float %1, float* %2, float %3, float %4, float* %5, float %6) {
%8 = alloca float*
%9 = alloca float
%10 = alloca float*
%11 = alloca float
%12 = alloca float
%13 = alloca float*
%14 = alloca float
%15 = alloca float
%16 = alloca float
store float* %0, float** %8
store float %1, float* %9
store float* %2, float** %10
store float %3, float* %11
store float %4, float* %12
store float* %5, float** %13
store float %6, float* %14
%17 = load float*, float** %8
%18 = getelementptr inbounds float, float* %17, i64 0
%19 = load float, float* %18
%20 = load float, float* %9
%21 = fmul float %19, %20
store float %21, float* %15
%22 = load float*, float** %10
%23 = getelementptr inbounds float, float* %22, i64 0
%24 = load float, float* %23
%25 = load float, float* %11
%26 = fmul float %24, %25
store float %26, float* %16
%27 = load float, float* %15
%28 = load float, float* %16
%29 = load float, float* %15
%30 = fsub float %28, %29
%31 = load float, float* %12
%32 = call float @llvm.fmuladd.f32(float %30, float %31, float %27)
%33 = load float, float* %14
%34 = fdiv float %32, %33
%35 = load float*, float** %13
%36 = getelementptr inbounds float, float* %35, i64 0
store float %34, float* %36
ret void
}

LLVM IR (-O2):
define void @float_interpolator_c(float* nocapture %0, float %1, float* nocapture %2, float %3, float %4, float* nocapture writeonly %5, float %6) {
%8 = load float, float* %0
%9 = fmul float %8, %1
%10 = load float, float* %2
%11 = fmul float %10, %3
%12 = fsub float %11, %9
%13 = tail call float @llvm.fmuladd.f32(float %12, float %4, float %9)
%14 = fdiv float %13, %6
store float %14, float* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_puts(char *);
int /*<<< orphan*/ log_putx(size_t);
void *malloc(size_t);
int /*<<< orphan*/ panic();
void *xmalloc(size_t size) {
  void *p;
  p = malloc(size);
  if (p == NULL) {
    log_puts("failed to allocate ");
    log_putx(size);
    log_puts(" bytes\n");
    panic();
  }
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
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,-0x10(%rbp)
jne    118c <xmalloc+0x4c>
lea    0xe95(%rip),%rdi
call   1040 <log_puts@plt>
mov    -0x8(%rbp),%rdi
call   1060 <log_putx@plt>
lea    0xe94(%rip),%rdi
call   1040 <log_puts@plt>
mov    $0x0,%al
call   1030 <panic@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    117b <xmalloc+0x3b>
lea    0xea5(%rip),%rdi
call   1040 <log_puts@plt>
mov    %r14,%rdi
call   1060 <log_putx@plt>
lea    0xea5(%rip),%rdi
call   1040 <log_puts@plt>
xor    %eax,%eax
call   1030 <panic@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [20 x i8] c"failed to allocate \00"
@.str.1 = [8 x i8] c" bytes\0A\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = call i32 @log_puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%10 = load i64, i64* %2
%11 = call i32 @log_putx(i64 %10)
%12 = call i32 @log_puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 (...) @panic()
br label %14
14: ; preds = %8, %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [20 x i8] c"failed to allocate \00"
@.str.1 = [8 x i8] c" bytes\0A\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = tail call i32 @log_puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @log_putx(i64 %0)
%7 = tail call i32 @log_puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 (...) @panic()
br label %9
9: ; preds = %4, %1
ret i8* %2
}
int test_imm_30int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x30 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_30int64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x30,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_30int64_highword_mem>:
testb  $0x30,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_30int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 48
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_30int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 206158430208
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int x2(void) {
  printf(" x2");
  return 2;
}


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

x86 assembly (clang, -O2):
<x2>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c" x2\00"
define i32 @x2() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 2
}

LLVM IR (-O2):
@.str = [4 x i8] c" x2\00"
define i32 @x2() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ turn45(int *, int *);
int rotate(int *xdir, int *ydir, int turn) {
  int i;
  for (i = 0; i < turn; i += 45) {
    turn45(xdir, ydir);
  }
  return 0;
}


x86 assembly (clang, -O0):
<rotate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1151 <rotate+0x41>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <turn45@plt>
mov    -0x18(%rbp),%eax
add    $0x2d,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <rotate+0x1a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edx,%edx
jle    1142 <rotate+0x32>
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <turn45@plt>
add    $0x2d,%ebp
cmp    %ebx,%ebp
jl     1130 <rotate+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rotate(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %16, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = load i32*, i32** %4
%14 = load i32*, i32** %5
%15 = call i32 @turn45(i32* %13, i32* %14)
br label %16
16: ; preds = %12
%17 = load i32, i32* %7
%18 = add nsw i32 %17, 45
store i32 %18, i32* %7
br label %8
19: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
define i32 @rotate(i32* %0, i32* %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %10
5: ; preds = %3, %5
%6 = phi i32 [ %8, %5 ], [ 0, %3 ]
%7 = tail call i32 @turn45(i32* %0, i32* %1)
%8 = add nuw nsw i32 %6, 45
%9 = icmp slt i32 %8, %2
br i1 %9, label %5, label %10
10: ; preds = %5, %3
ret i32 0
}
/* Variables and functions */
int getFontWidth(int);
int strlen(char *);
int getTextWidth(char *text, int font_nr) {
  return (text != NULL ? strlen(text) * getFontWidth(font_nr) : 0);
}


x86 assembly (clang, -O0):
<getTextWidth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115e <getTextWidth+0x3e>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <getFontWidth@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    1168 <getTextWidth+0x48>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    1168 <getTextWidth+0x48>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTextWidth>:
test   %rdi,%rdi
je     1142 <getTextWidth+0x22>
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <getFontWidth@plt>
imul   %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @getTextWidth(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 @strlen(i8* %8)
%10 = load i32, i32* %4
%11 = call i32 @getFontWidth(i32 %10)
%12 = mul nsw i32 %9, %11
br label %14
13: ; preds = %2
br label %14
14: ; preds = %13, %7
%15 = phi i32 [ %12, %7 ], [ 0, %13 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @getTextWidth(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i32 @strlen(i8* %0)
%6 = tail call i32 @getFontWidth(i32 %1)
%7 = mul nsw i32 %6, %5
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
scalar_t__ countLeadingZeros32(unsigned long long);
char countLeadingZeros64(unsigned long long a) {
  char shiftCount;
  shiftCount = 0;
  if (a < ((unsigned long long)1) << 32) {
    shiftCount += 32;
  } else {
    a >>= 32;
  }
  shiftCount += countLeadingZeros32(a);
  return shiftCount;
}


x86 assembly (clang, -O0):
<countLeadingZeros64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
movabs $0x100000000,%rax
cmp    %rax,-0x8(%rbp)
jae    1143 <countLeadingZeros64+0x33>
movsbl -0x9(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x9(%rbp)
jmp    114f <countLeadingZeros64+0x3f>
mov    -0x8(%rbp),%rax
shr    $0x20,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <countLeadingZeros32@plt>
mov    %rax,%rcx
movsbq -0x9(%rbp),%rax
add    %rcx,%rax
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<countLeadingZeros64>:
push   %rbx
xor    %ebx,%ebx
mov    %rdi,%rax
shr    $0x20,%rax
sete   %bl
cmovne %rax,%rdi
call   1030 <countLeadingZeros32@plt>
shl    $0x5,%ebx
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @countLeadingZeros64(i64 %0) {
%2 = alloca i64
%3 = alloca i8
store i64 %0, i64* %2
store i8 0, i8* %3
%4 = load i64, i64* %2
%5 = icmp ult i64 %4, 4294967296
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = add nsw i32 %8, 32
%10 = trunc i32 %9 to i8
store i8 %10, i8* %3
br label %14
11: ; preds = %1
%12 = load i64, i64* %2
%13 = lshr i64 %12, 32
store i64 %13, i64* %2
br label %14
14: ; preds = %11, %6
%15 = load i64, i64* %2
%16 = call i64 @countLeadingZeros32(i64 %15)
%17 = load i8, i8* %3
%18 = sext i8 %17 to i64
%19 = add nsw i64 %18, %16
%20 = trunc i64 %19 to i8
store i8 %20, i8* %3
%21 = load i8, i8* %3
ret i8 %21
}

LLVM IR (-O2):
define signext i8 @countLeadingZeros64(i64 %0) {
%2 = icmp ult i64 %0, 4294967296
%3 = lshr i64 %0, 32
%4 = select i1 %2, i64 %0, i64 %3
%5 = select i1 %2, i64 32, i64 4294967296
%6 = tail call i64 @countLeadingZeros32(i64 %4)
%7 = add i64 %6, %5
%8 = trunc i64 %7 to i8
ret i8 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%ld\n", sizeof(time_t));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}
int test_imm_7Dint16_reg(short val) {
  return ((val) & (0x7D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_7Dint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x7d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_7Dint16_reg>:
test   $0x7d,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_7Dint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 125
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_7Dint16_reg(i16 signext %0) {
%2 = and i16 %0, 125
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(
      stderr,
      "usage: split [-l line_count] [-a suffix_length] [file [prefix]]\n"
      "       split -b byte_count[K|k|M|m|G|g] [-a suffix_length] [file "
      "[prefix]]\n"
      "       split -n chunk_count [-a suffix_length] [file [prefix]]\n"
      "       split -p pattern [-a suffix_length] [file [prefix]]\n");
  exit(EX_USAGE);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [262 x i8] c"usage: split [-l line_count] [-a suffix_length] [file [prefix]]\0A split -b byte_count[K|k|M|m|G|g] [-a suffix_length] [file [prefix]]\0A split -n chunk_count [-a suffix_length] [file [prefix]]\0A split -p pattern [-a suffix_length] [file [prefix]]\0A\00"
@EX_USAGE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([262 x i8], [262 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [262 x i8] c"usage: split [-l line_count] [-a suffix_length] [file [prefix]]\0A split -b byte_count[K|k|M|m|G|g] [-a suffix_length] [file [prefix]]\0A split -n chunk_count [-a suffix_length] [file [prefix]]\0A split -p pattern [-a suffix_length] [file [prefix]]\0A\00"
@EX_USAGE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([262 x i8], [262 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
double level1_saturation(double x1, double x2, double x3, double c1,
                         double c2) {
  return c2 * (x2 - x3 - c1 - (x1 - x3) * 0.5) * (x1 - x3);
}


x86 assembly (clang, -O0):
<level1_saturation>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
subsd  -0x18(%rbp),%xmm2
subsd  -0x20(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xea6(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<level1_saturation>:
subsd  %xmm2,%xmm1
subsd  %xmm3,%xmm1
subsd  %xmm2,%xmm0
movsd  0xeec(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm4,%xmm2
mulsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @level1_saturation(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = load double, double* %10
%12 = load double, double* %7
%13 = load double, double* %8
%14 = fsub double %12, %13
%15 = load double, double* %9
%16 = fsub double %14, %15
%17 = load double, double* %6
%18 = load double, double* %8
%19 = fsub double %17, %18
%20 = fneg double %19
%21 = call double @llvm.fmuladd.f64(double %20, double 5.000000e-01, double %16)
%22 = fmul double %11, %21
%23 = load double, double* %6
%24 = load double, double* %8
%25 = fsub double %23, %24
%26 = fmul double %22, %25
ret double %26
}

LLVM IR (-O2):
define double @level1_saturation(double %0, double %1, double %2, double %3, double %4) {
%6 = fsub double %1, %2
%7 = fsub double %6, %3
%8 = fsub double %0, %2
%9 = fneg double %8
%10 = tail call double @llvm.fmuladd.f64(double %9, double 5.000000e-01, double %7)
%11 = fmul double %10, %4
%12 = fmul double %8, %11
ret double %12
}
int iw_imgtype_alpha_channel_index(int t) {
  switch (t) {
  case 0x0110:
    return 3;
  case 0x0101:
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<iw_imgtype_alpha_channel_index>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x101,%eax
je     113c <iw_imgtype_alpha_channel_index+0x3c>
jmp    111d <iw_imgtype_alpha_channel_index+0x1d>
mov    -0xc(%rbp),%eax
sub    $0x110,%eax
jne    1148 <iw_imgtype_alpha_channel_index+0x48>
jmp    1130 <iw_imgtype_alpha_channel_index+0x30>
movl   $0x3,-0x4(%rbp)
jmp    114f <iw_imgtype_alpha_channel_index+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    114f <iw_imgtype_alpha_channel_index+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iw_imgtype_alpha_channel_index>:
xor    %ecx,%ecx
cmp    $0x101,%edi
sete   %cl
cmp    $0x110,%edi
mov    $0x3,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @iw_imgtype_alpha_channel_index(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 272, label %5
i32 257, label %6
]
5: ; preds = %1
store i32 3, i32* %2
br label %8
6: ; preds = %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @iw_imgtype_alpha_channel_index(i32 %0) {
%2 = icmp eq i32 %0, 257
%3 = zext i1 %2 to i32
%4 = icmp eq i32 %0, 272
%5 = select i1 %4, i32 3, i32 %3
ret i32 %5
}
int xcommon_is_fullscreen_supported(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @xcommon_is_fullscreen_supported() {
ret i32 1
}

LLVM IR (-O2):
define i32 @xcommon_is_fullscreen_supported() {
ret i32 1
}
int check_permissions(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @check_permissions() {
ret i32 1
}

LLVM IR (-O2):
define i32 @check_permissions() {
ret i32 1
}
/* Type definitions */
struct tms {
  scalar_t__ tms_stime;
  scalar_t__ tms_utime;
};
typedef scalar_t__ clock_t;

/* Variables and functions */
clock_t clock(void) {
  struct tms buf;
  return (unsigned long)buf.tms_utime + buf.tms_stime;
}


x86 assembly (clang, -O0):
<clock>:
push   %rbp
mov    %rsp,%rbp
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.tms = type { i64, i64 }
define i64 @clock() {
%1 = alloca %struct.tms
%2 = getelementptr inbounds %struct.tms, %struct.tms* %1, i32 0, i32 1
%3 = load i64, i64* %2
%4 = getelementptr inbounds %struct.tms, %struct.tms* %1, i32 0, i32 0
%5 = load i64, i64* %4
%6 = add i64 %3, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @clock() {
ret i64 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x3e() {
  Assert_real((isalpha(62) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              315, ("isalpha should be 0 for >"));
}


x86 assembly (clang, -O0):
<t_isalpha_0x3e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3e,%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x13b,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0x3e>:
push   %rax
mov    $0x3e,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x13b,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for >\00"
define void @t_isalpha_0x3e() {
%1 = call i64 @isalpha(i32 62)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 315, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for >\00"
define void @t_isalpha_0x3e() {
%1 = tail call i64 @isalpha(i32 62)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 315, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(int);
int get_list(int *list, int len) {
  srand(374677);
  int i = 0;
  for (i = 0; i < len; i++) {
    list[i] = rand() % (len * 20);
  }
  return 0;
}


x86 assembly (clang, -O0):
<get_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x5b795,%edi
call   1030 <srand@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117a <get_list+0x5a>
mov    $0x0,%al
call   1040 <rand@plt>
imul   $0x14,-0xc(%rbp),%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1147 <get_list+0x27>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_list>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %esi,%r14d
mov    %rdi,%r15
mov    $0x5b795,%edi
call   1030 <srand@plt>
test   %r14d,%r14d
jle    1168 <get_list+0x48>
lea    0x0(,%r14,4),%eax
lea    (%rax,%rax,4),%r12d
mov    %r14d,%ebx
xor    %ebp,%ebp
xchg   %ax,%ax
xor    %eax,%eax
call   1040 <rand@plt>
cltd
idiv   %r12d
mov    %edx,(%r15,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1150 <get_list+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get_list(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = call i32 @srand(i32 374677)
store i32 0, i32* %5
store i32 0, i32* %5
br label %7
7: ; preds = %20, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %23
11: ; preds = %7
%12 = call i32 (...) @rand()
%13 = load i32, i32* %4
%14 = mul nsw i32 %13, 20
%15 = srem i32 %12, %14
%16 = load i32*, i32** %3
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
store i32 %15, i32* %19
br label %20
20: ; preds = %11
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %7
23: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @get_list(i32* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @srand(i32 374677)
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %15
5: ; preds = %2
%6 = mul nsw i32 %1, 20
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ 0, %5 ], [ %13, %8 ]
%10 = tail call i32 (...) @rand()
%11 = srem i32 %10, %6
%12 = getelementptr inbounds i32, i32* %0, i64 %9
store i32 %11, i32* %12
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %7
br i1 %14, label %15, label %8
15: ; preds = %8, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ wifi_promiscuous_enable(int /*<<< orphan*/);
void smart_disable(void) { wifi_promiscuous_enable(0); }


x86 assembly (clang, -O0):
<smart_disable>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <wifi_promiscuous_enable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<smart_disable>:
xor    %edi,%edi
jmp    1030 <wifi_promiscuous_enable@plt>

LLVM IR (-O0):
define void @smart_disable() {
%1 = call i32 @wifi_promiscuous_enable(i32 0)
ret void
}

LLVM IR (-O2):
define void @smart_disable() {
%1 = tail call i32 @wifi_promiscuous_enable(i32 0)
ret void
}
const char *EatEOL(const char *pSrc) {
  if (pSrc) {
    if (*pSrc == '\x0D')
      pSrc++;
    if (*pSrc == '\x0A')
      pSrc++;
  }
  return pSrc;
}


x86 assembly (clang, -O0):
<EatEOL>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1150 <EatEOL+0x50>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
jne    112f <EatEOL+0x2f>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    114b <EatEOL+0x4b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1150 <EatEOL+0x50>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EatEOL>:
test   %rdi,%rdi
je     111d <EatEOL+0x1d>
xor    %ecx,%ecx
cmpb   $0xd,(%rdi)
sete   %cl
xor    %eax,%eax
cmpb   $0xa,(%rdi,%rcx,1)
sete   %al
add    %rdi,%rax
add    %rcx,%rax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @EatEOL(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 13
%6 = zext i1 %5 to i64
%7 = getelementptr i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 10
%10 = zext i1 %9 to i64
%11 = getelementptr i8, i8* %7, i64 %10
br label %12
12: ; preds = %3, %1
%13 = phi i8* [ null, %1 ], [ %11, %3 ]
ret i8* %13
}
short *test_func_03(short *p, int *x) {
  int r = 0;
  r += *p++;
  r += *p++;
  r += *p++;
  *x = r;
  return p;
}


x86 assembly (clang, -O0):
<test_func_03>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x8(%rbp)
movswl (%rax),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x8(%rbp)
movswl (%rax),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x8(%rbp)
movswl (%rax),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_func_03>:
movswl (%rdi),%eax
movswl 0x2(%rdi),%ecx
add    %eax,%ecx
movswl 0x4(%rdi),%edx
lea    0x6(%rdi),%rax
add    %ecx,%edx
mov    %edx,(%rsi)
ret

LLVM IR (-O0):
define i16* @test_func_03(i16* %0, i32* %1) {
%3 = alloca i16*
%4 = alloca i32*
%5 = alloca i32
store i16* %0, i16** %3
store i32* %1, i32** %4
store i32 0, i32* %5
%6 = load i16*, i16** %3
%7 = getelementptr inbounds i16, i16* %6, i32 1
store i16* %7, i16** %3
%8 = load i16, i16* %6
%9 = sext i16 %8 to i32
%10 = load i32, i32* %5
%11 = add nsw i32 %10, %9
store i32 %11, i32* %5
%12 = load i16*, i16** %3
%13 = getelementptr inbounds i16, i16* %12, i32 1
store i16* %13, i16** %3
%14 = load i16, i16* %12
%15 = sext i16 %14 to i32
%16 = load i32, i32* %5
%17 = add nsw i32 %16, %15
store i32 %17, i32* %5
%18 = load i16*, i16** %3
%19 = getelementptr inbounds i16, i16* %18, i32 1
store i16* %19, i16** %3
%20 = load i16, i16* %18
%21 = sext i16 %20 to i32
%22 = load i32, i32* %5
%23 = add nsw i32 %22, %21
store i32 %23, i32* %5
%24 = load i32, i32* %5
%25 = load i32*, i32** %4
store i32 %24, i32* %25
%26 = load i16*, i16** %3
ret i16* %26
}

LLVM IR (-O2):
define i16* @test_func_03(i16* %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds i16, i16* %0, i64 1
%4 = load i16, i16* %0
%5 = sext i16 %4 to i32
%6 = getelementptr inbounds i16, i16* %0, i64 2
%7 = load i16, i16* %3
%8 = sext i16 %7 to i32
%9 = add nsw i32 %8, %5
%10 = getelementptr inbounds i16, i16* %0, i64 3
%11 = load i16, i16* %6
%12 = sext i16 %11 to i32
%13 = add nsw i32 %9, %12
store i32 %13, i32* %1
ret i16* %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
void fputword(unsigned short s, FILE *f) {
  unsigned char b[2];
  b[0] = (unsigned char)(s & 0xff);
  b[1] = (unsigned char)((s >> 8) & 0xff);
  fwrite(b, 2, 1, f);
}


x86 assembly (clang, -O0):
<fputword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x12(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,-0x11(%rbp)
lea    -0x12(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputword>:
push   %rax
mov    %rsi,%rcx
mov    %di,0x6(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @fputword(i16 zeroext %0, i32* nocapture %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = trunc i16 %0 to i8
store i8 %5, i8* %4
%6 = lshr i16 %0, 8
%7 = trunc i16 %6 to i8
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %7, i8* %8
%9 = call i32 @fwrite(i8* %4, i32 2, i32 1, i32* %1)
ret void
}
/* Variables and functions */
scalar_t__ ableToGet(int, int, int, int, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *);
void main() {
  int x_s = 0;
  int y_s = 0;
  int x_d = 1;
  int y_d = 9;
  if (ableToGet(x_d, y_d, x_s, y_s, 0, 1)) {
    printf("Possible");
  } else {
    printf("ImPossible");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x9,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
call   1040 <ableToGet@plt>
cmp    $0x0,%rax
je     1179 <main+0x59>
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
jmp    1185 <main+0x65>
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x9,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
call   1040 <ableToGet@plt>
test   %rax,%rax
lea    0xeb9(%rip),%rax
lea    0xeb4(%rip),%rdi
cmove  %rax,%rdi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"Possible\00"
@.str.1 = [11 x i8] c"ImPossible\00"
define void @main() {
%1 = tail call i64 @ableToGet(i32 1, i32 9, i32 0, i32 0, i32 0, i32 1)
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @printf(i8* dereferenceable(1) %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ say_hello();
int main() {
  say_hello();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @say_hello()
ret i32 0
}
void *Cyc_Fn_fp_apply(void *(*f)(void *), void *x) {
  return ({ f(x); });
}


x86 assembly (clang, -O0):
<Cyc_Fn_fp_apply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Fn_fp_apply>:
mov    %rdi,%rax
mov    %rsi,%rdi
jmp    *%rax

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

LLVM IR (-O2):
define i8* @Cyc_Fn_fp_apply(i8* (i8*)* nocapture %0, i8* %1) {
%3 = tail call i8* %0(i8* %1)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int fastlz1_compress(int /*<<< orphan*/ const *, int, int /*<<< orphan*/ *);
int fastlz2_compress(int /*<<< orphan*/ const *, int, int /*<<< orphan*/ *);
int fastlz_compress(const uint8_t *input, int length, uint8_t *output) {
  if (length < 65536)
    return fastlz1_compress(input, length, output);
  return fastlz2_compress(input, length, output);
}


x86 assembly (clang, -O0):
<fastlz_compress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0x10000,-0x14(%rbp)
jge    1158 <fastlz_compress+0x38>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1030 <fastlz1_compress@plt>
mov    %eax,-0x4(%rbp)
jmp    116b <fastlz_compress+0x4b>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1040 <fastlz2_compress@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastlz_compress>:
cmp    $0xffff,%esi
jg     112d <fastlz_compress+0xd>
jmp    1030 <fastlz1_compress@plt>
jmp    1040 <fastlz2_compress@plt>

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

LLVM IR (-O2):
define i32 @fastlz_compress(i32* %0, i32 %1, i32* %2) {
%4 = icmp slt i32 %1, 65536
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @fastlz1_compress(i32* %0, i32 %1, i32* %2)
br label %9
7: ; preds = %3
%8 = tail call i32 @fastlz2_compress(i32* %0, i32 %1, i32* %2)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
ret i32 %10
}
/* Type definitions */
typedef scalar_t__ uint_fast8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int /*<<< orphan*/ IntEnable(scalar_t__);
int /*<<< orphan*/ IntRegister(scalar_t__, void (*)());
int _CANBaseValid(int /*<<< orphan*/);
scalar_t__ _CANIntNumberGet(int /*<<< orphan*/);
void CANIntRegister(uint32_t ui32Base, void (*pfnHandler)(void)) {
  uint_fast8_t ui8IntNumber;
  ASSERT(_CANBaseValid(ui32Base));
  ui8IntNumber = _CANIntNumberGet(ui32Base);
  ASSERT(ui8IntNumber != 0);
  IntRegister(ui8IntNumber, pfnHandler);
  IntEnable(ui8IntNumber);
}


x86 assembly (clang, -O0):
<CANIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <_CANBaseValid@plt>
mov    %eax,%edi
call   1070 <ASSERT@plt>
mov    -0x4(%rbp),%edi
call   1040 <_CANIntNumberGet@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <ASSERT@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <IntRegister@plt>
mov    -0x18(%rbp),%rdi
call   1030 <IntEnable@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CANIntRegister>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1060 <_CANBaseValid@plt>
mov    %eax,%edi
call   1070 <ASSERT@plt>
mov    %ebp,%edi
call   1040 <_CANIntNumberGet@plt>
mov    %rax,%rbp
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1070 <ASSERT@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1050 <IntRegister@plt>
mov    %rbp,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @CANIntRegister(i32 %0, void ()* %1) {
%3 = alloca i32
%4 = alloca void ()*
%5 = alloca i64
store i32 %0, i32* %3
store void ()* %1, void ()** %4
%6 = load i32, i32* %3
%7 = call i32 @_CANBaseValid(i32 %6)
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %3
%10 = call i64 @_CANIntNumberGet(i32 %9)
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = icmp ne i64 %11, 0
%13 = zext i1 %12 to i32
%14 = call i32 @ASSERT(i32 %13)
%15 = load i64, i64* %5
%16 = load void ()*, void ()** %4
%17 = bitcast void ()* %16 to void (...)*
%18 = call i32 @IntRegister(i64 %15, void (...)* %17)
%19 = load i64, i64* %5
%20 = call i32 @IntEnable(i64 %19)
ret void
}

LLVM IR (-O2):
define void @CANIntRegister(i32 %0, void ()* %1) {
%3 = tail call i32 @_CANBaseValid(i32 %0)
%4 = tail call i32 @ASSERT(i32 %3)
%5 = tail call i64 @_CANIntNumberGet(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @ASSERT(i32 %7)
%9 = bitcast void ()* %1 to void (...)*
%10 = tail call i32 @IntRegister(i64 %5, void (...)* %9)
%11 = tail call i32 @IntEnable(i64 %5)
ret void
}
int int_compare_func(void *key1, void *key2) { return (long)key1 - (long)key2; }


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

x86 assembly (clang, -O2):
<int_compare_func>:
mov    %rdi,%rax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @int_compare_func(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = sub nsw i64 %6, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @int_compare_func(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = ptrtoint i8* %1 to i64
%5 = sub nsw i64 %3, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}