xunge/DecIR huggingface dataset:
/* Variables and functions */
int SCR_Strlen(char const *);
int SCR_GetBigStringWidth(const char *str) { return SCR_Strlen(str) * 16; }


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

x86 assembly (clang, -O2):
<SCR_GetBigStringWidth>:
push   %rax
call   1030 <SCR_Strlen@plt>
shl    $0x4,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @SCR_GetBigStringWidth(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @SCR_Strlen(i8* %3)
%5 = mul nsw i32 %4, 16
ret i32 %5
}

LLVM IR (-O2):
define i32 @SCR_GetBigStringWidth(i8* %0) {
%2 = tail call i32 @SCR_Strlen(i8* %0)
%3 = shl nsw i32 %2, 4
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void foo(void) { fprintf(stderr, "called foo()\n"); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"called foo()\0A\00"
define void @foo() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"called foo()\0A\00"
define void @foo() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
int main(void) {
  int x;
  int *p = (void *)0;
  x = (int)p;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
store i32* null, i32** %3
%4 = load i32*, i32** %3
%5 = ptrtoint i32* %4 to i32
store i32 %5, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __bitmap_xor(unsigned long *, unsigned long const *,
                                unsigned long const *, int);
void bitmap_xor(unsigned long *dst, const unsigned long *src1,
                const unsigned long *src2, int nbits) {
  if (nbits <= ((int)sizeof(unsigned long) * 8))
    *dst = *src1 ^ *src2;
  else
    __bitmap_xor(dst, src1, src2, nbits);
}


x86 assembly (clang, -O0):
<bitmap_xor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x40,-0x1c(%rbp)
jg     114b <bitmap_xor+0x3b>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
mov    -0x18(%rbp),%rax
xor    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    115f <bitmap_xor+0x4f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <__bitmap_xor@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_xor>:
cmp    $0x40,%ecx
jg     111f <bitmap_xor+0xf>
mov    (%rdx),%rax
xor    (%rsi),%rax
mov    %rax,(%rdi)
ret
jmp    1030 <__bitmap_xor@plt>

LLVM IR (-O0):
define void @bitmap_xor(i64* %0, i64* %1, i64* %2, i32 %3) {
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca i64*
%8 = alloca i32
store i64* %0, i64** %5
store i64* %1, i64** %6
store i64* %2, i64** %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = icmp sle i32 %9, 64
br i1 %10, label %11, label %18
11: ; preds = %4
%12 = load i64*, i64** %6
%13 = load i64, i64* %12
%14 = load i64*, i64** %7
%15 = load i64, i64* %14
%16 = xor i64 %13, %15
%17 = load i64*, i64** %5
store i64 %16, i64* %17
br label %24
18: ; preds = %4
%19 = load i64*, i64** %5
%20 = load i64*, i64** %6
%21 = load i64*, i64** %7
%22 = load i32, i32* %8
%23 = call i32 @__bitmap_xor(i64* %19, i64* %20, i64* %21, i32 %22)
br label %24
24: ; preds = %18, %11
ret void
}

LLVM IR (-O2):
define void @bitmap_xor(i64* %0, i64* %1, i64* %2, i32 %3) {
%5 = icmp slt i32 %3, 65
br i1 %5, label %6, label %10
6: ; preds = %4
%7 = load i64, i64* %1
%8 = load i64, i64* %2
%9 = xor i64 %8, %7
store i64 %9, i64* %0
br label %12
10: ; preds = %4
%11 = tail call i32 @__bitmap_xor(i64* %0, i64* %1, i64* %2, i32 %3)
br label %12
12: ; preds = %10, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _Error(long, char *);
void Error_ExpressionSyntaxCannotFinishWithExpression(long p_position) {
  _Error(p_position, "Expression syntax cannot finish with an expression");
}


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

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

LLVM IR (-O0):
@.str = [51 x i8] c"Expression syntax cannot finish with an expression\00"
define void @Error_ExpressionSyntaxCannotFinishWithExpression(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_Error(i64 %3, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [51 x i8] c"Expression syntax cannot finish with an expression\00"
define void @Error_ExpressionSyntaxCannotFinishWithExpression(i64 %0) {
%2 = tail call i32 @_Error(i64 %0, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int calculateTriangularNumber(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%i \n", calculateTriangularNumber(10));
  printf("%i \n", calculateTriangularNumber(20));
  printf("%i \n", calculateTriangularNumber(50));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
call   1040 <calculateTriangularNumber@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    $0x14,%edi
call   1040 <calculateTriangularNumber@plt>
mov    %eax,%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x32,%edi
call   1040 <calculateTriangularNumber@plt>
mov    %eax,%esi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xa,%edi
call   1040 <calculateTriangularNumber@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x14,%edi
call   1040 <calculateTriangularNumber@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x32,%edi
call   1040 <calculateTriangularNumber@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%i \0A\00"
define i32 @main() {
%1 = tail call i32 @calculateTriangularNumber(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @calculateTriangularNumber(i32 20)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @calculateTriangularNumber(i32 50)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
int s2e_get_ram_object_bits() {
  int bits;
  __asm__ __volatile__(".byte 0x0f, 0x3f\n"
                       ".byte 0x00, 0x52, 0x00, 0x00\n"
                       ".byte 0x00, 0x00, 0x00, 0x00\n"
                       : "=a"(bits)
                       : "a"(0));
  return bits;
}


x86 assembly (clang, -O0):
<s2e_get_ram_object_bits>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
(bad)
add    %dl,0x0(%rdx)
add    %al,(%rax)
add    %al,(%rax)
add    %cl,0x458bfc45(%rcx)
cld
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2e_get_ram_object_bits>:
xor    %eax,%eax
(bad)
add    %dl,0x0(%rdx)
add    %al,(%rax)
add    %al,(%rax)
add    %al,%bl

LLVM IR (-O0):
define i32 @s2e_get_ram_object_bits() {
%1 = alloca i32
%2 = call i32 asm sideeffect ".byte 0x0f, 0x3f\0A.byte 0x00, 0x52, 0x00, 0x00\0A.byte 0x00, 0x00, 0x00, 0x00\0A", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 0)
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @s2e_get_ram_object_bits() {
%1 = tail call i32 asm sideeffect ".byte 0x0f, 0x3f\0A.byte 0x00, 0x52, 0x00, 0x00\0A.byte 0x00, 0x00, 0x00, 0x00\0A", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 0)
ret i32 %1
}
/* Variables and functions */
int *foo(int *);
int /*<<< orphan*/ test_assert(int);
int main(void) {
  int a, b, c;
  int *p = foo(&a);
  *p = 8;
  test_assert(a == 8);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <foo@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x8,(%rax)
cmpl   $0x8,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <test_assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <foo@plt>
movl   $0x8,(%rax)
xor    %edi,%edi
cmpl   $0x8,0x4(%rsp)
sete   %dil
call   1040 <test_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 0, i32* %1
%6 = call i32* @foo(i32* %2)
store i32* %6, i32** %5
%7 = load i32*, i32** %5
store i32 8, i32* %7
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 8
%10 = zext i1 %9 to i32
%11 = call i32 @test_assert(i32 %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32* @foo(i32* %1)
store i32 8, i32* %3
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 8
%6 = zext i1 %5 to i32
%7 = call i32 @test_assert(i32 %6)
ret i32 0
}
int emac2_ifoutdiscards_set(unsigned int dev_id,
                            union emac2_ifoutdiscards_u *value) {
  return 1;
}


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

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

LLVM IR (-O0):
%union.emac2_ifoutdiscards_u = type opaque
define i32 @emac2_ifoutdiscards_set(i32 %0, %union.emac2_ifoutdiscards_u* %1) {
%3 = alloca i32
%4 = alloca %union.emac2_ifoutdiscards_u*
store i32 %0, i32* %3
store %union.emac2_ifoutdiscards_u* %1, %union.emac2_ifoutdiscards_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.emac2_ifoutdiscards_u = type opaque
define i32 @emac2_ifoutdiscards_set(i32 %0, %union.emac2_ifoutdiscards_u* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int main() {
  int i;
  fprintf(stderr, "addr=%p, size=%ld\n", &i, sizeof i);
#pragma omp target data map(alloc : i)
#pragma omp target data map(present, alloc : i)
  ;
  fprintf(stderr, "i is present\n");
#pragma omp target data map(present, alloc : i)
  ;
  fprintf(stderr, "i is present\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
lea    -0x8(%rbp),%rdx
mov    $0x4,%ecx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
lea    0xead(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2ec5(%rip),%r14
mov    (%r14),%edi
lea    0xedb(%rip),%rsi
lea    0x4(%rsp),%rdx
mov    $0x4,%ecx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xed3(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"addr=%p, size=%ld\0A\00"
@.str.1 = [14 x i8] c"i is present\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32* %2, i64 4)
%5 = load i32, i32* @stderr
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"addr=%p, size=%ld\0A\00"
@.str.1 = [14 x i8] c"i is present\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32* %1, i64 4)
%5 = load i32, i32* @stderr
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void breakpoint() { printf("breakpoint; press return to continue"); }


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"breakpoint; press return to continue\00"
define void @breakpoint() {
%1 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"breakpoint; press return to continue\00"
define void @breakpoint() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}
void test3() { asm volatile("int $0x10"); }


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
int    $0x10
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
int    $0x10
ret

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

LLVM IR (-O2):
define void @test3() {
tail call void asm sideeffect "int $$0x10", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int pwc_set_direction(unsigned gpio, int is_input) { return 0; }


x86 assembly (clang, -O0):
<pwc_set_direction>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @pwc_set_direction(i32 %0, i32 %1) {
ret i32 0
}
void F1(int A1) {}


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

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

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

LLVM IR (-O2):
define void @F1(i32 %0) {
ret void
}
/* Variables and functions */
int bsearch_skill_exact(char const *, int, int);
int bsearch_skill_prefix(char const *, int, int);
int bsearch_skill(const char *name, int first, int top) {
  int sn = bsearch_skill_exact(name, first, top);
  return (sn == -1) ? bsearch_skill_prefix(name, first, top) : sn;
}


x86 assembly (clang, -O0):
<bsearch_skill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <bsearch_skill_exact@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1165 <bsearch_skill+0x45>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <bsearch_skill_prefix@plt>
mov    %eax,-0x18(%rbp)
jmp    116b <bsearch_skill+0x4b>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bsearch_skill>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <bsearch_skill_exact@plt>
cmp    $0xffffffff,%eax
je     113b <bsearch_skill+0x1b>
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <bsearch_skill_prefix@plt>

LLVM IR (-O0):
define i32 @bsearch_skill(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @bsearch_skill_exact(i8* %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %19
14: ; preds = %3
%15 = load i8*, i8** %4
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = call i32 @bsearch_skill_prefix(i8* %15, i32 %16, i32 %17)
br label %21
19: ; preds = %3
%20 = load i32, i32* %7
br label %21
21: ; preds = %19, %14
%22 = phi i32 [ %18, %14 ], [ %20, %19 ]
ret i32 %22
}

LLVM IR (-O2):
define i32 @bsearch_skill(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @bsearch_skill_exact(i8* %0, i32 %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @bsearch_skill_prefix(i8* %0, i32 %1, i32 %2)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ %4, %3 ]
ret i32 %9
}
/* Type definitions */
struct llist_iter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct llist_iter *);
void llist_iter_destroy(struct llist_iter *iter) {
  free(iter);
  iter = NULL;
}


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

x86 assembly (clang, -O2):
<llist_iter_destroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.llist_iter = type { i32 }
define void @llist_iter_destroy(%struct.llist_iter* nocapture %0) {
%2 = tail call i32 @free(%struct.llist_iter* %0)
ret void
}
void pinconf_generic_dump_group(struct pinctrl_dev *pctldev, struct seq_file *s,
                                const char *gname) {
  return;
}


x86 assembly (clang, -O0):
<pinconf_generic_dump_group>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.pinctrl_dev = type opaque
%struct.seq_file = type opaque
define void @pinconf_generic_dump_group(%struct.pinctrl_dev* %0, %struct.seq_file* %1, i8* %2) {
%4 = alloca %struct.pinctrl_dev*
%5 = alloca %struct.seq_file*
%6 = alloca i8*
store %struct.pinctrl_dev* %0, %struct.pinctrl_dev** %4
store %struct.seq_file* %1, %struct.seq_file** %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
%struct.pinctrl_dev = type opaque
%struct.seq_file = type opaque
define void @pinconf_generic_dump_group(%struct.pinctrl_dev* nocapture %0, %struct.seq_file* nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ipt_standard_init();
int /*<<< orphan*/ ipt_statistic_init();
void init_extensions(void) {
  ipt_standard_init();
  ipt_statistic_init();
}


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

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

LLVM IR (-O0):
define void @init_extensions() {
%1 = call i32 (...) @ipt_standard_init()
%2 = call i32 (...) @ipt_statistic_init()
ret void
}

LLVM IR (-O2):
define void @init_extensions() {
%1 = tail call i32 (...) @ipt_standard_init()
%2 = tail call i32 (...) @ipt_statistic_init()
ret void
}
void inc_m32abs(unsigned int *m32) {
  if ((long)m32 & 0xFFFFFFFF80000000LL) {
    printf("Error: destination %lx not in lower 2GB for inc_m32abs()\n",
           (long)m32);
    asm(" int $3; ");
  }
  put8(0xFF);
  put8(0x04);
  put8(0x25);
  put32((int)(unsigned long)m32);
}


x86 assembly (clang, -O0):
<inc_m32abs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xffffffff80000000,%rax
cmp    $0x0,%rax
je     1163 <inc_m32abs+0x33>
mov    -0x8(%rbp),%rsi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
int3
mov    $0xff,%edi
mov    $0x0,%al
call   1030 <put8@plt>
mov    $0x4,%edi
mov    $0x0,%al
call   1030 <put8@plt>
mov    $0x25,%edi
mov    $0x0,%al
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    $0x0,%al
call   1050 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inc_m32abs>:
push   %rbx
mov    %rdi,%rbx
test   $0xffffffff80000000,%rdi
je     114f <inc_m32abs+0x1f>
lea    0xebc(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
int3
mov    $0xff,%edi
xor    %eax,%eax
call   1030 <put8@plt>
mov    $0x4,%edi
xor    %eax,%eax
call   1030 <put8@plt>
mov    $0x25,%edi
xor    %eax,%eax
call   1030 <put8@plt>
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1050 <put32@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"Error: destination %lx not in lower 2GB for inc_m32abs()\0A\00"
define void @inc_m32abs(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = ptrtoint i32* %3 to i64
%5 = and i64 %4, -2147483648
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32*, i32** %2
%9 = ptrtoint i32* %8 to i64
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i64 %9)
br label %11
11: ; preds = %7, %1
%12 = call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 255)
%13 = call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 4)
%14 = call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 37)
%15 = load i32*, i32** %2
%16 = ptrtoint i32* %15 to i64
%17 = trunc i64 %16 to i32
%18 = call i32 (i32, ...) bitcast (i32 (...)* @put32 to i32 (i32, ...)*)(i32 %17)
ret void
}

LLVM IR (-O2):
@.str = [58 x i8] c"Error: destination %lx not in lower 2GB for inc_m32abs()\0A\00"
define void @inc_m32abs(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = icmp ult i32* %0, inttoptr (i64 2147483648 to i32*)
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i64 %2)
tail call void asm sideeffect " int $$3; ", "~{dirflag},~{fpsr},~{flags}"()
br label %6
6: ; preds = %4, %1
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 255)
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 4)
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 37)
%10 = trunc i64 %2 to i32
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @put32 to i32 (i32, ...)*)(i32 %10)
ret void
}
/* Type definitions */
struct in6_addr {
  int *s6_addr;
};

/* Variables and functions */
int rat_lib_6addr_is_multicast(struct in6_addr *addr) {
  return (addr->s6_addr[0] == 0xff);
}


x86 assembly (clang, -O0):
<rat_lib_6addr_is_multicast>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
cmpl   $0xff,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rat_lib_6addr_is_multicast>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmpl   $0xff,(%rcx)
sete   %al
ret

LLVM IR (-O0):
%struct.in6_addr = type { i32* }
define i32 @rat_lib_6addr_is_multicast(%struct.in6_addr* %0) {
%2 = alloca %struct.in6_addr*
store %struct.in6_addr* %0, %struct.in6_addr** %2
%3 = load %struct.in6_addr*, %struct.in6_addr** %2
%4 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %3, i32 0, i32 0
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 255
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
%struct.in6_addr = type { i32* }
define i32 @rat_lib_6addr_is_multicast(%struct.in6_addr* nocapture %0) {
%2 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %0, i64 0, i32 0
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 255
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
float RAND_MAX;
scalar_t__ random();
int should_send(float sample_rate) {
  if (sample_rate < 1.0) {
    float p = ((float)random() / RAND_MAX);
    return sample_rate > p;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<should_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xed2(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    116d <should_send+0x5d>
mov    $0x0,%al
call   1030 <random@plt>
cvtsi2ss %rax,%xmm0
mov    0x2e9d(%rip),%rax
divss  (%rax),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <should_send+0x64>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<should_send>:
push   %rax
mov    $0x1,%eax
movss  0xee2(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    1151 <should_send+0x41>
xor    %eax,%eax
movss  %xmm0,0x4(%rsp)
call   1030 <random@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
mov    0x2ea9(%rip),%rax
divss  (%rax),%xmm0
xor    %eax,%eax
movss  0x4(%rsp),%xmm1
ucomiss %xmm0,%xmm1
seta   %al
pop    %rcx
ret

LLVM IR (-O0):
@RAND_MAX = global float 0.000000e+00
define i32 @should_send(float %0) {
%2 = alloca i32
%3 = alloca float
%4 = alloca float
store float %0, float* %3
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = fcmp olt double %6, 1.000000e+00
br i1 %7, label %8, label %17
8: ; preds = %1
%9 = call i64 (...) @random()
%10 = sitofp i64 %9 to float
%11 = load float, float* @RAND_MAX
%12 = fdiv float %10, %11
store float %12, float* %4
%13 = load float, float* %3
%14 = load float, float* %4
%15 = fcmp ogt float %13, %14
%16 = zext i1 %15 to i32
store i32 %16, i32* %2
br label %18
17: ; preds = %1
store i32 1, i32* %2
br label %18
18: ; preds = %17, %8
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@RAND_MAX = global float 0.000000e+00
define i32 @should_send(float %0) {
%2 = fcmp olt float %0, 1.000000e+00
br i1 %2, label %3, label %10
3: ; preds = %1
%4 = tail call i64 (...) @random()
%5 = sitofp i64 %4 to float
%6 = load float, float* @RAND_MAX
%7 = fdiv float %5, %6
%8 = fcmp olt float %7, %0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %1, %3
%11 = phi i32 [ %9, %3 ], [ 1, %1 ]
ret i32 %11
}
/* Variables and functions */
unsigned int htonl(unsigned int);
unsigned int dc_order(unsigned int x) {
  if (x == htonl(x))
    return (x << 24) | ((x << 8) & 0xff0000) | ((x >> 8) & 0xff00) |
           ((x >> 24) & 0xff);
  else
    return x;
}


x86 assembly (clang, -O0):
<dc_order>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cmp    %ecx,%eax
jne    116e <dc_order+0x5e>
mov    -0x8(%rbp),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
shr    $0x18,%ecx
and    $0xff,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <dc_order+0x64>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dc_order>:
push   %rbx
mov    %edi,%ebx
call   1030 <htonl@plt>
cmp    %ebx,%eax
mov    %ebx,%eax
bswap  %eax
cmovne %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @dc_order(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @htonl(i32 %5)
%7 = icmp eq i32 %4, %6
br i1 %7, label %8, label %23
8: ; preds = %1
%9 = load i32, i32* %3
%10 = shl i32 %9, 24
%11 = load i32, i32* %3
%12 = shl i32 %11, 8
%13 = and i32 %12, 16711680
%14 = or i32 %10, %13
%15 = load i32, i32* %3
%16 = lshr i32 %15, 8
%17 = and i32 %16, 65280
%18 = or i32 %14, %17
%19 = load i32, i32* %3
%20 = lshr i32 %19, 24
%21 = and i32 %20, 255
%22 = or i32 %18, %21
store i32 %22, i32* %2
br label %25
23: ; preds = %1
%24 = load i32, i32* %3
store i32 %24, i32* %2
br label %25
25: ; preds = %23, %8
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @dc_order(i32 %0) {
%2 = tail call i32 @htonl(i32 %0)
%3 = icmp eq i32 %2, %0
%4 = tail call i32 @llvm.bswap.i32(i32 %0)
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
int is_power_of_two(unsigned int x) {
  if (x < 2) {
    return 0;
  }
  while (((x % 2) == 0) && x > 1) {
    x = x >> 1;
  }
  return (x == 1);
}


x86 assembly (clang, -O0):
<is_power_of_two>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jae    111d <is_power_of_two+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    116d <is_power_of_two+0x6d>
jmp    1122 <is_power_of_two+0x22>
mov    -0x8(%rbp),%ecx
and    $0x1,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    1140 <is_power_of_two+0x40>
cmpl   $0x1,-0x8(%rbp)
seta   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1150 <is_power_of_two+0x50>
jmp    115e <is_power_of_two+0x5e>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <is_power_of_two+0x22>
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_power_of_two>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     112c <is_power_of_two+0x2c>
nopw   0x0(%rax,%rax,1)
mov    %edi,%ecx
cmp    $0x2,%edi
jb     1124 <is_power_of_two+0x24>
mov    %ecx,%eax
and    $0x1,%eax
mov    %ecx,%edi
shr    %edi
test   %eax,%eax
je     1110 <is_power_of_two+0x10>
xor    %eax,%eax
cmp    $0x1,%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @is_power_of_two(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ult i32 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %24
7: ; preds = %1
br label %8
8: ; preds = %17, %7
%9 = load i32, i32* %3
%10 = urem i32 %9, 2
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load i32, i32* %3
%14 = icmp ugt i32 %13, 1
br label %15
15: ; preds = %12, %8
%16 = phi i1 [ false, %8 ], [ %14, %12 ]
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = load i32, i32* %3
%19 = lshr i32 %18, 1
store i32 %19, i32* %3
br label %8
20: ; preds = %15
%21 = load i32, i32* %3
%22 = icmp eq i32 %21, 1
%23 = zext i1 %22 to i32
store i32 %23, i32* %2
br label %24
24: ; preds = %20, %6
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @is_power_of_two(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %9, %3 ], [ %0, %1 ]
%5 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
%7 = icmp ugt i32 %4, 1
%8 = and i1 %7, %6
%9 = lshr i32 %4, 1
br i1 %8, label %3, label %10
10: ; preds = %3
%11 = icmp eq i32 %4, 1
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %1, %10
%14 = phi i32 [ %12, %10 ], [ 0, %1 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ gwtAtExit();
int /*<<< orphan*/ gwtEnd();
int /*<<< orphan*/ gwtNewline();
void gwtCleanupAfterSignal() {
  gwtEnd();
  gwtNewline();
  gwtAtExit();
}


x86 assembly (clang, -O0):
<gwtCleanupAfterSignal>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <gwtEnd@plt>
mov    $0x0,%al
call   1050 <gwtNewline@plt>
mov    $0x0,%al
call   1030 <gwtAtExit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gwtCleanupAfterSignal>:
push   %rax
xor    %eax,%eax
call   1040 <gwtEnd@plt>
xor    %eax,%eax
call   1050 <gwtNewline@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <gwtAtExit@plt>

LLVM IR (-O0):
define void @gwtCleanupAfterSignal() {
%1 = call i32 (...) @gwtEnd()
%2 = call i32 (...) @gwtNewline()
%3 = call i32 (...) @gwtAtExit()
ret void
}

LLVM IR (-O2):
define void @gwtCleanupAfterSignal() {
%1 = tail call i32 (...) @gwtEnd()
%2 = tail call i32 (...) @gwtNewline()
%3 = tail call i32 (...) @gwtAtExit()
ret void
}
void joystick_update_buttons() {}


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

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

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

LLVM IR (-O2):
define void @joystick_update_buttons() {
ret void
}
int my_strcmp(char *s1, char *s2) {
  while (*s1++ == *s2++) {
    if (*(s1 - 1) == '\0')
      break;
  }
  return *(s1 - 1) - *(s2 - 1);
}


x86 assembly (clang, -O0):
<my_strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1153 <my_strcmp+0x53>
mov    -0x8(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x0,%eax
jne    114e <my_strcmp+0x4e>
jmp    1153 <my_strcmp+0x53>
jmp    110c <my_strcmp+0xc>
mov    -0x8(%rbp),%rax
movsbl -0x1(%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl -0x1(%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strcmp>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi,%rcx,1),%eax
movzbl (%rsi,%rcx,1),%edx
test   %eax,%eax
je     1124 <my_strcmp+0x24>
add    $0x1,%rcx
cmp    %dl,%al
je     1110 <my_strcmp+0x10>
movsbl %dl,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @my_strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %9, %3 ]
%5 = phi i8* [ %1, %2 ], [ %10, %3 ]
%6 = load i8, i8* %4
%7 = load i8, i8* %5
%8 = icmp ne i8 %6, %7
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = icmp eq i8 %6, 0
%12 = or i1 %11, %8
br i1 %12, label %13, label %3
13: ; preds = %3
%14 = sext i8 %6 to i32
%15 = sext i8 %7 to i32
%16 = sub nsw i32 %14, %15
ret i32 %16
}
int test_imm_58uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x58 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_58uint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0x58,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_58uint64_midword_reg>:
test   $0x580000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_58uint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 88
%6 = icmp ne i64 %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_58uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 5767168
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct link {
  int dummy;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
struct link *http_query_size(char const *, char const *, int /*<<< orphan*/ *,
                             int /*<<< orphan*/, int /*<<< orphan*/);
struct link *http_query(const char *url, const char *action, time_t stoptime) {
  int64_t size;
  return http_query_size(url, action, &size, stoptime, 0);
}


x86 assembly (clang, -O0):
<http_query>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
lea    -0x18(%rbp),%rdx
xor    %r8d,%r8d
call   1030 <http_query_size@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_query>:
push   %rax
mov    %edx,%ecx
lea    0x4(%rsp),%rdx
xor    %r8d,%r8d
call   1030 <http_query_size@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.link = type { i32 }
define %struct.link* @http_query(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call %struct.link* @http_query_size(i8* %8, i8* %9, i32* %7, i32 %10, i32 0)
ret %struct.link* %11
}

LLVM IR (-O2):
%struct.link = type { i32 }
define %struct.link* @http_query(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call %struct.link* @http_query_size(i8* %0, i8* %1, i32* %4, i32 %2, i32 0)
ret %struct.link* %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long serial;
};
typedef TYPE_1__ XCirculateEvent;

/* Variables and functions */
void set_XCirculateEvent_serial(void *_p, unsigned long _v) {
  ((XCirculateEvent *)_p)->serial = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XCirculateEvent_serial>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XCirculateEvent_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int _digest_cmp(unsigned char *, unsigned char *, int);
extern int md5cmp(unsigned char *digest1, unsigned char *digest2) {
  return (_digest_cmp(digest1, digest2, 16));
}


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

x86 assembly (clang, -O2):
<md5cmp>:
mov    $0x10,%edx
jmp    1030 <_digest_cmp@plt>

LLVM IR (-O0):
define i32 @md5cmp(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 @_digest_cmp(i8* %5, i8* %6, i32 16)
ret i32 %7
}

LLVM IR (-O2):
define i32 @md5cmp(i8* %0, i8* %1) {
%3 = tail call i32 @_digest_cmp(i8* %0, i8* %1, i32 16)
ret i32 %3
}
void X509_REQ_set_subject_name(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_REQ_set_subject_name() {
ret void
}
void Term_Hq2x() {}


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

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

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

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

/* Variables and functions */
double timetoJ2000(time_t ttime) {
  return ((double)ttime / 3155760000.0 - 0.3);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  0xef2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xede(%rip),%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
cvtsi2sd %rdi,%xmm0
divsd  0xef3(%rip),%xmm0
addsd  0xef3(%rip),%xmm0
ret

LLVM IR (-O0):
define double @timetoJ2000(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sitofp i64 %3 to double
%5 = fdiv double %4, 3.155760e+09
%6 = fsub double %5, 3.000000e-01
ret double %6
}

LLVM IR (-O2):
define double @timetoJ2000(i64 %0) {
%2 = sitofp i64 %0 to double
%3 = fdiv double %2, 3.155760e+09
%4 = fadd double %3, -3.000000e-01
ret double %4
}
void glmGenerateZeroVector2f(float v[2]) {
  v[0] = 0;
  v[1] = 0;
}


x86 assembly (clang, -O0):
<glmGenerateZeroVector2f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmGenerateZeroVector2f>:
movq   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @glmGenerateZeroVector2f(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
store float 0.000000e+00, float* %4
%5 = load float*, float** %2
%6 = getelementptr inbounds float, float* %5, i64 1
store float 0.000000e+00, float* %6
ret void
}

LLVM IR (-O2):
define void @glmGenerateZeroVector2f(float* nocapture writeonly %0) {
store float 0.000000e+00, float* %0
%2 = getelementptr inbounds float, float* %0, i64 1
store float 0.000000e+00, float* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ deprep_terminal();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void os_bye() {
  deprep_terminal();
  exit(0);
}


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

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

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

LLVM IR (-O2):
define void @os_bye() {
%1 = tail call i32 (...) @deprep_terminal()
%2 = tail call i32 @exit(i32 0)
unreachable
}
void COMP_B1_intr(void) {}


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

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

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

LLVM IR (-O2):
define void @COMP_B1_intr() {
ret void
}
int compare(const void *a, const void *b) {
  const int da = *((const int *)a);
  const int db = *((const int *)b);
  return (da < db) ? -1 : (da == db) ? 0 : 1;
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1137 <compare+0x37>
mov    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    114c <compare+0x4c>
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%esi
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setne  %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp ne i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}