xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test3() { printf("Test 3: Reach nested objects.\n"); }


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"Test 3: Reach nested objects.\0A\00"
define void @test3() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [30 x i8] c"Test 3: Reach nested objects.\00"
define void @test3() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int64_t int64_casval(int64_t *p, int64_t oldval, int64_t newval) {
  int64_t v = *p;
  if (v == oldval)
    *p = newval;
  return v;
}


x86 assembly (clang, -O0):
<int64_casval>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1134 <int64_casval+0x34>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int64_casval>:
mov    (%rdi),%rax
cmp    %rsi,%rax
jne    110b <int64_casval+0xb>
mov    %rdx,(%rdi)
ret

LLVM IR (-O0):
define i64 @int64_casval(i64* %0, i64 %1, i64 %2) {
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64* %0, i64** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64*, i64** %4
%9 = load i64, i64* %8
store i64 %9, i64* %7
%10 = load i64, i64* %7
%11 = load i64, i64* %5
%12 = icmp eq i64 %10, %11
br i1 %12, label %13, label %16
13: ; preds = %3
%14 = load i64, i64* %6
%15 = load i64*, i64** %4
store i64 %14, i64* %15
br label %16
16: ; preds = %13, %3
%17 = load i64, i64* %7
ret i64 %17
}

LLVM IR (-O2):
define i64 @int64_casval(i64* nocapture %0, i64 %1, i64 %2) {
%4 = load i64, i64* %0
%5 = icmp eq i64 %4, %1
br i1 %5, label %6, label %7
6: ; preds = %3
store i64 %2, i64* %0
br label %7
7: ; preds = %6, %3
ret i64 %4
}
OP(dd, c5) {
  illegal_1();
  op_c5();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_c5@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_c5()
ret i32 undef
}
int sqr(void *initdata, int argc, void **argv) {
  float *result = (float *)argv[0];
  float f = *((float *)argv[1]);
  *result = f * f;
  return 0;
}


x86 assembly (clang, -O0):
<sqr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
mulss  -0x24(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqr>:
mov    (%rdx),%rax
mov    0x8(%rdx),%rcx
movss  (%rcx),%xmm0
mulss  %xmm0,%xmm0
movss  %xmm0,(%rax)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @sqr(i8* %0, i32 %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8**
%7 = alloca float*
%8 = alloca float
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%9 = load i8**, i8*** %6
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = bitcast i8* %11 to float*
store float* %12, float** %7
%13 = load i8**, i8*** %6
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = bitcast i8* %15 to float*
%17 = load float, float* %16
store float %17, float* %8
%18 = load float, float* %8
%19 = load float, float* %8
%20 = fmul float %18, %19
%21 = load float*, float** %7
store float %20, float* %21
ret i32 0
}

LLVM IR (-O2):
define i32 @sqr(i8* nocapture readnone %0, i32 %1, i8** nocapture %2) {
%4 = bitcast i8** %2 to float**
%5 = load float*, float** %4
%6 = getelementptr inbounds i8*, i8** %2, i64 1
%7 = bitcast i8** %6 to float**
%8 = load float*, float** %7
%9 = load float, float* %8
%10 = fmul float %9, %9
store float %10, float* %5
ret i32 0
}
main(ac, av) char *av[];
{ return cafe_main(ac, av); }


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <cafe_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @cafe_main to i32 (i32, i8**, ...)*)(i32 %6, i8** %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @cafe_main to i32 (i32, i8**, ...)*)(i32 %0, i8** %1)
ret i32 %3
}
/* Type definitions */
struct assembler {
  int dummy;
};

/* Variables and functions */
int bcode_debug(struct assembler *);
int asm_write(struct assembler *a) { return bcode_debug(a); }


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

x86 assembly (clang, -O2):
<asm_write>:
jmp    1030 <bcode_debug@plt>

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

LLVM IR (-O2):
%struct.assembler = type { i32 }
define i32 @asm_write(%struct.assembler* %0) {
%2 = tail call i32 @bcode_debug(%struct.assembler* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ assert_fail(char const *, int, char *, char *);
scalar_t__ strcmp(char *, char *);
void assert_str_not_equal_(const char *file, int line, char *ex, char *ac) {
  if (strcmp(ex, ac) == 0) {
    assert_fail(file, line, "Expected not <\"%s\"> but was", ex);
  }
}


x86 assembly (clang, -O0):
<assert_str_not_equal_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1165 <assert_str_not_equal_+0x45>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rcx
lea    0xea0(%rip),%rdx
call   1030 <assert_fail@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_str_not_equal_>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%rbp
mov    %rdx,%rdi
mov    %rcx,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1142 <assert_str_not_equal_+0x22>
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0xeb7(%rip),%rdx
mov    %rbp,%rdi
mov    %r14d,%esi
mov    %rbx,%rcx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <assert_fail@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Expected not <\22%s\22> but was\00"
define void @assert_str_not_equal_(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %7
%10 = load i8*, i8** %8
%11 = call i64 @strcmp(i8* %9, i8* %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %4
%14 = load i8*, i8** %5
%15 = load i32, i32* %6
%16 = load i8*, i8** %7
%17 = call i32 @assert_fail(i8* %14, i32 %15, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %16)
br label %18
18: ; preds = %13, %4
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Expected not <\22%s\22> but was\00"
define void @assert_str_not_equal_(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i64 @strcmp(i8* %2, i8* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @assert_fail(i8* %0, i32 %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %9
9: ; preds = %7, %4
ret void
}
void perf_init(char *fname) {
  if (fname)
    ;
}


x86 assembly (clang, -O0):
<perf_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1118 <perf_init+0x18>
jmp    1118 <perf_init+0x18>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @perf_init(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 %6
5: ; preds = %1
br label %6
6: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @perf_init(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__37__IO__toggle();
void Msp430GpioC__1__HplGeneralIO__toggle(void) {
  HplMsp430GeneralIOP__37__IO__toggle();
}


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

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

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

LLVM IR (-O2):
define void @Msp430GpioC__1__HplGeneralIO__toggle() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__37__IO__toggle()
ret void
}
int isnewline(char c) { return ('\n' == c || '\r' == c) ? 1 : 0; }


x86 assembly (clang, -O0):
<isnewline>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0xa,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     1131 <isnewline+0x31>
movsbl -0x1(%rbp),%ecx
mov    $0xd,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnewline>:
cmp    $0xa,%dil
sete   %al
cmp    $0xd,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isnewline(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 10, %4
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 13, %8
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 1, i32 0
ret i32 %13
}

LLVM IR (-O2):
define i32 @isnewline(i8 signext %0) {
%2 = icmp eq i8 %0, 10
%3 = icmp eq i8 %0, 13
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int v[3] = {1, 2, 3};
  ;
  *(v + 1) *= 10;
  printf("%d", v[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0x4(%rbp)
imul   $0xa,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xecf(%rip),%rdi
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    $0x14,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 20)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int print_node(void *data, void *arg) {
  unsigned int *d = (unsigned int *)data;
  printf("%d ", *d);
  return 0;
}


x86 assembly (clang, -O0):
<print_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @print_node(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpgt_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i __attribute__((no, unused)) test(__m128i s1, __m128i s2) {
  return _mm_cmpgt_epi16(s1, s2);
}


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

x86 assembly (clang, -O2):
<test>:
jmp    1030 <_mm_cmpgt_epi16@plt>

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

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpgt_epi16(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int pathcd(char *, char *);
int setcwd(char *path, char *home) { return (pathcd(path, home)); }


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

x86 assembly (clang, -O2):
<setcwd>:
jmp    1030 <pathcd@plt>

LLVM IR (-O0):
define i32 @setcwd(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 = load i8*, i8** %4
%7 = call i32 @pathcd(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @setcwd(i8* %0, i8* %1) {
%3 = tail call i32 @pathcd(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void zfilter_free(void __attribute__((__unused__)) * opaque, void *ptr) {
  free(ptr);
}


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

x86 assembly (clang, -O2):
<zfilter_free>:
mov    %rsi,%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @zfilter_free(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @free(i8* %1)
ret void
}
unsigned xrop3_120_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D & S;
  stk1 = T ^ stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_120_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_120_0_0>:
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_120_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = and i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %7
%26 = load i32, i32* %9
%27 = xor i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
ret i32 %28
}

LLVM IR (-O2):
define i32 @xrop3_120_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = mul nuw nsw i32 %4, 257
%6 = xor i32 %5, %3
ret i32 %6
}
unsigned hqd_get_numa_node() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @hqd_get_numa_node() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ box_double(double);
int /*<<< orphan*/ dpop();
double untag_float_fast(int /*<<< orphan*/);
void primitive_float_add_impl(void) {
  double y = untag_float_fast(dpop());
  double x = untag_float_fast(dpop());
  ;
  box_double(x + y);
}


x86 assembly (clang, -O0):
<primitive_float_add_impl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <untag_float_fast@plt>
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <untag_float_fast@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1050 <box_double@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_float_add_impl>:
push   %rax
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <untag_float_fast@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <untag_float_fast@plt>
addsd  (%rsp),%xmm0
pop    %rax
jmp    1050 <box_double@plt>

LLVM IR (-O0):
define void @primitive_float_add_impl() {
%1 = alloca double
%2 = alloca double
%3 = call i32 (...) @dpop()
%4 = call double @untag_float_fast(i32 %3)
store double %4, double* %1
%5 = call i32 (...) @dpop()
%6 = call double @untag_float_fast(i32 %5)
store double %6, double* %2
%7 = load double, double* %2
%8 = load double, double* %1
%9 = fadd double %7, %8
%10 = call i32 @box_double(double %9)
ret void
}

LLVM IR (-O2):
define void @primitive_float_add_impl() {
%1 = tail call i32 (...) @dpop()
%2 = tail call double @untag_float_fast(i32 %1)
%3 = tail call i32 (...) @dpop()
%4 = tail call double @untag_float_fast(i32 %3)
%5 = fadd double %2, %4
%6 = tail call i32 @box_double(double %5)
ret void
}
double blargg_min(double x, double y) {
  if (y < x)
    x = y;
  return x;
}


x86 assembly (clang, -O0):
<blargg_min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    112c <blargg_min+0x2c>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<blargg_min>:
minsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @blargg_min(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %3
%7 = fcmp olt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %4
store double %9, double* %3
br label %10
10: ; preds = %8, %2
%11 = load double, double* %3
ret double %11
}

LLVM IR (-O2):
define double @blargg_min(double %0, double %1) {
%3 = fcmp olt double %1, %0
%4 = select i1 %3, double %1, double %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sys_one(void) { printf("one\n"); }


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"one\00"
define void @sys_one() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ user_halt();
int halt() {
  user_halt();
  exit(0);
  return 0;
}


x86 assembly (clang, -O0):
<halt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <user_halt@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<halt>:
push   %rax
xor    %eax,%eax
call   1030 <user_halt@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @halt() {
%1 = call i32 (...) @user_halt()
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @halt() {
%1 = tail call i32 (...) @user_halt()
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct xenDevice {
  int dummy;
};
struct device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ freeDevice(struct device *);
void xenFreeDevice(struct xenDevice *dev) { freeDevice((struct device *)dev); }


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

x86 assembly (clang, -O2):
<xenFreeDevice>:
jmp    1030 <freeDevice@plt>

LLVM IR (-O0):
%struct.xenDevice = type { i32 }
%struct.device = type { i32 }
define void @xenFreeDevice(%struct.xenDevice* %0) {
%2 = alloca %struct.xenDevice*
store %struct.xenDevice* %0, %struct.xenDevice** %2
%3 = load %struct.xenDevice*, %struct.xenDevice** %2
%4 = bitcast %struct.xenDevice* %3 to %struct.device*
%5 = call i32 @freeDevice(%struct.device* %4)
ret void
}

LLVM IR (-O2):
%struct.xenDevice = type { i32 }
%struct.device = type { i32 }
define void @xenFreeDevice(%struct.xenDevice* %0) {
%2 = bitcast %struct.xenDevice* %0 to %struct.device*
%3 = tail call i32 @freeDevice(%struct.device* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_cr3_raw();
int /*<<< orphan*/ set_cr3_raw(int /*<<< orphan*/);
void flush_tlb_raw(void) { set_cr3_raw(get_cr3_raw()); }


x86 assembly (clang, -O0):
<flush_tlb_raw>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <get_cr3_raw@plt>
mov    %eax,%edi
call   1030 <set_cr3_raw@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<flush_tlb_raw>:
push   %rax
xor    %eax,%eax
call   1040 <get_cr3_raw@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <set_cr3_raw@plt>

LLVM IR (-O0):
define void @flush_tlb_raw() {
%1 = call i32 (...) @get_cr3_raw()
%2 = call i32 @set_cr3_raw(i32 %1)
ret void
}

LLVM IR (-O2):
define void @flush_tlb_raw() {
%1 = tail call i32 (...) @get_cr3_raw()
%2 = tail call i32 @set_cr3_raw(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VDP_clearSprites();
int /*<<< orphan*/ VDP_releaseAllSprites();
void VDP_resetSprites() {
  VDP_releaseAllSprites();
  VDP_clearSprites();
}


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

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

LLVM IR (-O0):
define void @VDP_resetSprites() {
%1 = call i32 (...) @VDP_releaseAllSprites()
%2 = call i32 (...) @VDP_clearSprites()
ret void
}

LLVM IR (-O2):
define void @VDP_resetSprites() {
%1 = tail call i32 (...) @VDP_releaseAllSprites()
%2 = tail call i32 (...) @VDP_clearSprites()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void put_uint32le(uint32_t x, unsigned char *p) {
  p[0] = (unsigned char)(x & 0xff);
  p[1] = (unsigned char)((x >> 8) & 0xff);
  p[2] = (unsigned char)((x >> 16) & 0xff);
  p[3] = (unsigned char)((x >> 24) & 0xff);
}


x86 assembly (clang, -O0):
<put_uint32le>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_uint32le>:
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @put_uint32le(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 = and i32 %5, 255
%7 = trunc i32 %6 to i8
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i32, i32* %3
%11 = ashr i32 %10, 8
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
%16 = load i32, i32* %3
%17 = ashr i32 %16, 16
%18 = and i32 %17, 255
%19 = trunc i32 %18 to i8
%20 = load i8*, i8** %4
%21 = getelementptr inbounds i8, i8* %20, i64 2
store i8 %19, i8* %21
%22 = load i32, i32* %3
%23 = ashr i32 %22, 24
%24 = and i32 %23, 255
%25 = trunc i32 %24 to i8
%26 = load i8*, i8** %4
%27 = getelementptr inbounds i8, i8* %26, i64 3
store i8 %25, i8* %27
ret void
}

LLVM IR (-O2):
define void @put_uint32le(i32 %0, i8* nocapture writeonly %1) {
%3 = trunc i32 %0 to i8
store i8 %3, i8* %1
%4 = lshr i32 %0, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %0, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %8, i8* %9
%10 = lshr i32 %0, 24
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
float fasterpow2(float p) {
  float clipp = (p < -126) ? -126.0f : p;
  union {
    uint32_t i;
    float f;
  } v = {(uint32_t)((1 << 23) * (clipp + 126.94269504f))};
  return v.f;
}


x86 assembly (clang, -O0):
<fasterpow2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    112d <fasterpow2+0x2d>
movss  0xedd(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1137 <fasterpow2+0x37>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xebf(%rip),%xmm1
addss  -0x8(%rbp),%xmm1
movss  0xeae(%rip),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fasterpow2>:
movss  0xef8(%rip),%xmm1
maxss  %xmm0,%xmm1
addss  0xef0(%rip),%xmm1
mulss  0xeec(%rip),%xmm1
cvttss2si %xmm1,%eax
movd   %eax,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { i32 }
define float @fasterpow2(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca %union.anon
store float %0, float* %2
%5 = load float, float* %2
%6 = fcmp olt float %5, -1.260000e+02
br i1 %6, label %7, label %8
7: ; preds = %1
br label %10
8: ; preds = %1
%9 = load float, float* %2
br label %10
10: ; preds = %8, %7
%11 = phi float [ -1.260000e+02, %7 ], [ %9, %8 ]
store float %11, float* %3
%12 = bitcast %union.anon* %4 to i32*
%13 = load float, float* %3
%14 = fadd float %13, 0x405FBC5520000000
%15 = fmul float 0x4160000000000000, %14
%16 = fptosi float %15 to i32
store i32 %16, i32* %12
%17 = bitcast %union.anon* %4 to float*
%18 = load float, float* %17
ret float %18
}

LLVM IR (-O2):
define float @fasterpow2(float %0) {
%2 = fcmp olt float %0, -1.260000e+02
%3 = select i1 %2, float -1.260000e+02, float %0
%4 = fadd float %3, 0x405FBC5520000000
%5 = fmul float %4, 0x4160000000000000
%6 = fptosi float %5 to i32
%7 = bitcast i32 %6 to float
ret float %7
}
/* Type definitions */
typedef scalar_t__ wchar_t;

/* Variables and functions */
int getCharIndex_Dictionary(wchar_t wchar) {
  long int diff = ((long int)wchar) - ((long int)L'a');
  if (diff >= 0 && diff <= 25) {
    return ((int)diff) + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<getCharIndex_Dictionary>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sub    $0x61,%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jl     1139 <getCharIndex_Dictionary+0x39>
cmpq   $0x19,-0x18(%rbp)
jg     1139 <getCharIndex_Dictionary+0x39>
mov    -0x18(%rbp),%rax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1140 <getCharIndex_Dictionary+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCharIndex_Dictionary>:
lea    -0x61(%rdi),%rcx
lea    -0x60(%rdi),%edx
xor    %eax,%eax
cmp    $0x1a,%rcx
cmovb  %edx,%eax
ret

LLVM IR (-O0):
define i32 @getCharIndex_Dictionary(i64 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = sub nsw i64 %5, 97
store i64 %6, i64* %4
%7 = load i64, i64* %4
%8 = icmp sge i64 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = load i64, i64* %4
%11 = icmp sle i64 %10, 25
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i64, i64* %4
%14 = trunc i64 %13 to i32
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %17
16: ; preds = %9, %1
store i32 0, i32* %2
br label %17
17: ; preds = %16, %12
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @getCharIndex_Dictionary(i64 %0) {
%2 = add i64 %0, -97
%3 = icmp ult i64 %2, 26
%4 = trunc i64 %0 to i32
%5 = add i32 %4, -96
%6 = select i1 %3, i32 %5, i32 0
ret i32 %6
}
/* Type definitions */
struct rusage {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ WAIT_ANY;
int /*<<< orphan*/ __wait4(int /*<<< orphan*/, int *, int, struct rusage *);
pid_t __wait3(int *stat_loc, int options, struct rusage *usage) {
  return __wait4(WAIT_ANY, stat_loc, options, usage);
}


x86 assembly (clang, -O0):
<__wait3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1030 <__wait4@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wait3>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <__wait4@plt>

LLVM IR (-O0):
%struct.rusage = type { i32 }
@WAIT_ANY = global i32 0
define i32 @__wait3(i32* %0, i32 %1, %struct.rusage* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca %struct.rusage*
store i32* %0, i32** %4
store i32 %1, i32* %5
store %struct.rusage* %2, %struct.rusage** %6
%7 = load i32, i32* @WAIT_ANY
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = load %struct.rusage*, %struct.rusage** %6
%11 = call i32 @__wait4(i32 %7, i32* %8, i32 %9, %struct.rusage* %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.rusage = type { i32 }
@WAIT_ANY = global i32 0
define i32 @__wait3(i32* %0, i32 %1, %struct.rusage* %2) {
%4 = load i32, i32* @WAIT_ANY
%5 = tail call i32 @__wait4(i32 %4, i32* %0, i32 %1, %struct.rusage* %2)
ret i32 %5
}
/* Variables and functions */
unsigned int get_servo_targetB(unsigned char);
unsigned int get_servo_tartget_b(unsigned char servoNum) {
  return get_servo_targetB(servoNum);
}


x86 assembly (clang, -O0):
<get_servo_tartget_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <get_servo_targetB@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_servo_tartget_b>:
jmp    1030 <get_servo_targetB@plt>

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

LLVM IR (-O2):
define i32 @get_servo_tartget_b(i8 zeroext %0) {
%2 = tail call i32 @get_servo_targetB(i8 zeroext %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ file_write(int, char *);
int main(int argc, char *argv[]) {
  int i;
  for (i = 1; i < argc; i++) {
    file_write(argc, argv[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115b <main+0x4b>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <file_write@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     1144 <main+0x34>
mov    %rsi,%r14
mov    %edi,%ebp
mov    %edi,%r15d
mov    $0x1,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rsi
mov    %ebp,%edi
call   1030 <file_write@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @file_write(i32 %0, i8* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret i32 0
}
void swap(float *restrict x, float *restrict y) {
  float tmp = *x;
  *x = *y;
  *y = tmp;
}


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

x86 assembly (clang, -O2):
<swap>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
movss  %xmm1,(%rdi)
movss  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @swap(float* noalias %0, float* noalias %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca float
store float* %0, float** %3
store float* %1, float** %4
%6 = load float*, float** %3
%7 = load float, float* %6
store float %7, float* %5
%8 = load float*, float** %4
%9 = load float, float* %8
%10 = load float*, float** %3
store float %9, float* %10
%11 = load float, float* %5
%12 = load float*, float** %4
store float %11, float* %12
ret void
}

LLVM IR (-O2):
define void @swap(float* noalias nocapture %0, float* noalias nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
store float %4, float* %0
store float %3, float* %1
ret void
}
void EpsonSetEncoding(char *encoding) {}


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

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

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

LLVM IR (-O2):
define void @EpsonSetEncoding(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct CONSOLE {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cons_putchar(struct CONSOLE *, char, int);
void cons_putstr0(struct CONSOLE *cons, char *s) {
  for (; *s != 0; s++) {
    cons_putchar(cons, *s, 1);
  }
  return;
}


x86 assembly (clang, -O0):
<cons_putstr0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1156 <cons_putstr0+0x46>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    $0x1,%edx
movsbl (%rax),%esi
call   1030 <cons_putchar@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <cons_putstr0+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cons_putstr0>:
push   %r14
push   %rbx
push   %rax
mov    (%rsi),%al
test   %al,%al
je     114b <cons_putstr0+0x3b>
mov    %rsi,%rbx
mov    %rdi,%r14
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%esi
mov    %r14,%rdi
mov    $0x1,%edx
call   1030 <cons_putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <cons_putstr0+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
%struct.CONSOLE = type { i32 }
define void @cons_putstr0(%struct.CONSOLE* %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %10, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = tail call i32 @cons_putchar(%struct.CONSOLE* %0, i8 signext %6, i32 1)
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
/* Type definitions */
struct stat {
  int st_size;
};
typedef int ssize_t;

/* Variables and functions */
int stat(char *, struct stat *);
ssize_t get_file_size(char *name) {
  struct stat st;
  int err;
  err = stat(name, &st);
  if (err)
    return -1;
  return st.st_size;
}


x86 assembly (clang, -O0):
<get_file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1142 <get_file_size+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    1148 <get_file_size+0x38>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_file_size>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
neg    %eax
sbb    %eax,%eax
or     (%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @get_file_size(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 %7, i32 -1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ SCB_2_I2CStop();
void SCB_2_ScbModeStop(void) { SCB_2_I2CStop(); }


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

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

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

LLVM IR (-O2):
define void @SCB_2_ScbModeStop() {
%1 = tail call i32 (...) @SCB_2_I2CStop()
ret void
}
/* Variables and functions */
char *strdup(int /*<<< orphan*/);
int /*<<< orphan*/ strerror(int);
char *rawsock_strerror(int errnum) { return strdup(strerror(errnum)); }


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

x86 assembly (clang, -O2):
<rawsock_strerror>:
push   %rax
call   1040 <strerror@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <strdup@plt>

LLVM IR (-O0):
define i8* @rawsock_strerror(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @strerror(i32 %3)
%5 = call i8* @strdup(i32 %4)
ret i8* %5
}

LLVM IR (-O2):
define i8* @rawsock_strerror(i32 %0) {
%2 = tail call i32 @strerror(i32 %0)
%3 = tail call i8* @strdup(i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ stdout;
void do1() {
  char a[20];
  printf("Gimme smthng:");
  fflush(stdout);
  scanf("%s", a);
  return;
}


x86 assembly (clang, -O0):
<do1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
lea    -0x20(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1050 <scanf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do1>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
lea    0xeb9(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Gimme smthng:\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @do1() {
%1 = alloca [20 x i8]
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = call i32 @fflush(i32 %3)
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Gimme smthng:\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @do1() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ depth;
};
typedef TYPE_1__ Depth;

/* Variables and functions */
int get_Depth_depth(void *_p) { return (int)((Depth *)_p)->depth; }


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_Depth_depth(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_Depth_depth(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ ui_curses_notify();
void free_update_cache_job(void *data) {
  free(data);
  ui_curses_notify();
}


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

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

LLVM IR (-O0):
define void @free_update_cache_job(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @free(i8* %3)
%5 = call i32 (...) @ui_curses_notify()
ret void
}

LLVM IR (-O2):
define void @free_update_cache_job(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
%3 = tail call i32 (...) @ui_curses_notify()
ret void
}