xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void help(char exe[]) {
  printf("%s by Blieque Mariguan <himself AT blieque.co.uk>,\n", exe);
  printf("https://github.com/blieque/fibo, GPL v3.0\n");
}


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

x86 assembly (clang, -O2):
<help>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xefb(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"%s by Blieque Mariguan <himself AT blieque.co.uk>,\0A\00"
@.str.1 = [43 x i8] c"https://github.com/blieque/fibo, GPL v3.0\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"%s by Blieque Mariguan <himself AT blieque.co.uk>,\0A\00"
@str = [42 x i8] c"https://github.com/blieque/fibo, GPL v3.0\00"
define void @help(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *endstak(int /*<<< orphan*/);
int /*<<< orphan*/ locstak();
int /*<<< orphan*/ movstr(char const *, int /*<<< orphan*/);
char *cpystak(const char *x) { return endstak(movstr(x, locstak())); }


x86 assembly (clang, -O0):
<cpystak>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <locstak@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <movstr@plt>
mov    %eax,%edi
call   1050 <endstak@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpystak>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <locstak@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <movstr@plt>
mov    %eax,%edi
pop    %rbx
jmp    1050 <endstak@plt>

LLVM IR (-O0):
define i8* @cpystak(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (...) @locstak()
%5 = call i32 @movstr(i8* %3, i32 %4)
%6 = call i8* @endstak(i32 %5)
ret i8* %6
}

LLVM IR (-O2):
define i8* @cpystak(i8* %0) {
%2 = tail call i32 (...) @locstak()
%3 = tail call i32 @movstr(i8* %0, i32 %2)
%4 = tail call i8* @endstak(i32 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ test_check_fail_with_suite_add_test();
void test_check_fail_with_suite_add_test_constructor(void) {
  test_check_fail_with_suite_add_test();
}


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

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

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

LLVM IR (-O2):
define void @test_check_fail_with_suite_add_test_constructor() {
%1 = tail call i32 (...) @test_check_fail_with_suite_add_test()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int /*<<< orphan*/, int *);
int /*<<< orphan*/ foo(int);
void foobar(int a, int *ptr) { bar(foo(a), ptr); }


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

x86 assembly (clang, -O2):
<foobar>:
push   %rbx
mov    %rsi,%rbx
call   1040 <foo@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @foobar(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 = call i32 @foo(i32 %5)
%7 = load i32*, i32** %4
%8 = call i32 @bar(i32 %6, i32* %7)
ret void
}

LLVM IR (-O2):
define void @foobar(i32 %0, i32* %1) {
%3 = tail call i32 @foo(i32 %0)
%4 = tail call i32 @bar(i32 %3, i32* %1)
ret void
}
int b_twist_r2_on_edgeperm(eperm)
int eperm;
{
  int temp_arr[8];
  b_edgeperm_unpack(eperm, temp_arr);
  two_cycle(temp_arr, 1, 5);
  return b_edgeperm_pack(temp_arr);
}


x86 assembly (clang, -O0):
<b_twist_r2_on_edgeperm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1040 <b_edgeperm_unpack@plt>
lea    -0x30(%rbp),%rdi
mov    $0x1,%esi
mov    $0x5,%edx
mov    $0x0,%al
call   1050 <two_cycle@plt>
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1030 <b_edgeperm_pack@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_twist_r2_on_edgeperm>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <b_edgeperm_unpack@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1050 <two_cycle@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <b_edgeperm_pack@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @b_twist_r2_on_edgeperm(i32 %0) {
%2 = alloca i32
%3 = alloca [8 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%6 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @b_edgeperm_unpack to i32 (i32, i32*, ...)*)(i32 %4, i32* %5)
%7 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%8 = call i32 (i32*, i32, i32, ...) bitcast (i32 (...)* @two_cycle to i32 (i32*, i32, i32, ...)*)(i32* %7, i32 1, i32 5)
%9 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%10 = call i32 (i32*, ...) bitcast (i32 (...)* @b_edgeperm_pack to i32 (i32*, ...)*)(i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @b_twist_r2_on_edgeperm(i32 %0) {
%2 = alloca [8 x i32]
%3 = bitcast [8 x i32]* %2 to i8*
%4 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%5 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @b_edgeperm_unpack to i32 (i32, i32*, ...)*)(i32 %0, i32* %4)
%6 = call i32 (i32*, i32, i32, ...) bitcast (i32 (...)* @two_cycle to i32 (i32*, i32, i32, ...)*)(i32* %4, i32 1, i32 5)
%7 = call i32 (i32*, ...) bitcast (i32 (...)* @b_edgeperm_pack to i32 (i32*, ...)*)(i32* %4)
ret i32 %7
}
/* Variables and functions */
int file_exists_p(char const *);
int fileutils___file_exists_p(const char *filename) {
  return (file_exists_p(filename));
}


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

x86 assembly (clang, -O2):
<fileutils___file_exists_p>:
jmp    1030 <file_exists_p@plt>

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

LLVM IR (-O2):
define i32 @fileutils___file_exists_p(i8* %0) {
%2 = tail call i32 @file_exists_p(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void myprint2(char *print_str) {
  printf("This is mytool12 print %s\n", print_str);
}


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

x86 assembly (clang, -O2):
<myprint2>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"This is mytool12 print %s\0A\00"
define void @myprint2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"This is mytool12 print %s\0A\00"
define void @myprint2(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct programmer_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pgm_default();
void pgm_default_6(struct programmer_t *pgm, const char *p) { pgm_default(); }


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

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

LLVM IR (-O0):
%struct.programmer_t = type { i32 }
define void @pgm_default_6(%struct.programmer_t* %0, i8* %1) {
%3 = alloca %struct.programmer_t*
%4 = alloca i8*
store %struct.programmer_t* %0, %struct.programmer_t** %3
store i8* %1, i8** %4
%5 = call i32 (...) @pgm_default()
ret void
}

LLVM IR (-O2):
%struct.programmer_t = type { i32 }
define void @pgm_default_6(%struct.programmer_t* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @pgm_default()
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;
struct cl_rhash_table {
  int dummy;
};

/* Variables and functions */
scalar_t__ cl_rhash_table_size(struct cl_rhash_table const *);
uint32_t cl_rhash_table_cost_slot(const struct cl_rhash_table *tbl,
                                  uint32_t slot, uint32_t o_slot) {
  return (slot >= o_slot) ? (slot - o_slot)
                          : (cl_rhash_table_size(tbl) + slot - o_slot);
}


x86 assembly (clang, -O0):
<cl_rhash_table_cost_slot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jl     1143 <cl_rhash_table_cost_slot+0x33>
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1158 <cl_rhash_table_cost_slot+0x48>
mov    -0x8(%rbp),%rdi
call   1030 <cl_rhash_table_size@plt>
add    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cl_rhash_table_cost_slot>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
cmp    %rdx,%rsi
jge    1127 <cl_rhash_table_cost_slot+0x17>
call   1030 <cl_rhash_table_size@plt>
add    %rax,%rbx
sub    %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.cl_rhash_table = type { i32 }
define i64 @cl_rhash_table_cost_slot(%struct.cl_rhash_table* %0, i64 %1, i64 %2) {
%4 = alloca %struct.cl_rhash_table*
%5 = alloca i64
%6 = alloca i64
store %struct.cl_rhash_table* %0, %struct.cl_rhash_table** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %5
%8 = load i64, i64* %6
%9 = icmp sge i64 %7, %8
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i64, i64* %5
%12 = load i64, i64* %6
%13 = sub nsw i64 %11, %12
br label %21
14: ; preds = %3
%15 = load %struct.cl_rhash_table*, %struct.cl_rhash_table** %4
%16 = call i64 @cl_rhash_table_size(%struct.cl_rhash_table* %15)
%17 = load i64, i64* %5
%18 = add nsw i64 %16, %17
%19 = load i64, i64* %6
%20 = sub nsw i64 %18, %19
br label %21
21: ; preds = %14, %10
%22 = phi i64 [ %13, %10 ], [ %20, %14 ]
ret i64 %22
}

LLVM IR (-O2):
%struct.cl_rhash_table = type { i32 }
define i64 @cl_rhash_table_cost_slot(%struct.cl_rhash_table* %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %1, %2
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = tail call i64 @cl_rhash_table_size(%struct.cl_rhash_table* %0)
%7 = add nsw i64 %6, %1
br label %8
8: ; preds = %3, %5
%9 = phi i64 [ %7, %5 ], [ %1, %3 ]
%10 = sub nsw i64 %9, %2
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ sca3000_writereg(int, int);
void sca3000_lock(void) { sca3000_writereg(0x1e, 0xcc); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x1e,%edi
mov    $0xcc,%esi
call   1030 <sca3000_writereg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0x1e,%edi
mov    $0xcc,%esi
jmp    1030 <sca3000_writereg@plt>

LLVM IR (-O0):
define void @sca3000_lock() {
%1 = call i32 @sca3000_writereg(i32 30, i32 204)
ret void
}

LLVM IR (-O2):
define void @sca3000_lock() {
%1 = tail call i32 @sca3000_writereg(i32 30, i32 204)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int UDFDescriptor(uint8_t *data, uint16_t *TagID) {
  *TagID = ((uint16_t)data[0] | ((uint16_t)data[(0) + 1] << 8));
  return 0;
}


x86 assembly (clang, -O0):
<UDFDescriptor>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UDFDescriptor>:
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
mov    %eax,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @UDFDescriptor(i64* %0, i32* %1) {
%3 = alloca i64*
%4 = alloca i32*
store i64* %0, i64** %3
store i32* %1, i32** %4
%5 = load i64*, i64** %3
%6 = getelementptr inbounds i64, i64* %5, i64 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = load i64*, i64** %3
%10 = getelementptr inbounds i64, i64* %9, i64 1
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 8
%14 = or i32 %8, %13
%15 = load i32*, i32** %4
store i32 %14, i32* %15
ret i32 0
}

LLVM IR (-O2):
define i32 @UDFDescriptor(i64* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = trunc i64 %3 to i32
%5 = getelementptr inbounds i64, i64* %0, i64 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 8
%9 = or i32 %8, %4
store i32 %9, i32* %1
ret i32 0
}
/* Variables and functions */
scalar_t__ alien_pointer();
int /*<<< orphan*/ box_double(double);
void primitive_alien_double(void) { box_double(*(double *)alien_pointer()); }


x86 assembly (clang, -O0):
<primitive_alien_double>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <alien_pointer@plt>
movsd  (%rax),%xmm0
call   1040 <box_double@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_alien_double>:
push   %rax
xor    %eax,%eax
call   1030 <alien_pointer@plt>
movsd  (%rax),%xmm0
pop    %rax
jmp    1040 <box_double@plt>

LLVM IR (-O0):
define void @primitive_alien_double() {
%1 = call i64 (...) @alien_pointer()
%2 = inttoptr i64 %1 to double*
%3 = load double, double* %2
%4 = call i32 @box_double(double %3)
ret void
}

LLVM IR (-O2):
define void @primitive_alien_double() {
%1 = tail call i64 (...) @alien_pointer()
%2 = inttoptr i64 %1 to double*
%3 = load double, double* %2
%4 = tail call i32 @box_double(double %3)
ret void
}
int test_imm_30int64_lowword_mem(long long *val) {
  return ((*val) & (0x30 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_30int64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 48
%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_30int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 48
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *strcpy(char *, char *);
char *os_filename(char *in, char *out) { return strcpy(out, in); }


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

x86 assembly (clang, -O2):
<os_filename>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @os_filename(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 = load i8*, i8** %3
%7 = call i8* @strcpy(i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @os_filename(i8* nocapture %0, i8* returned %1) {
%3 = tail call i8* @strcpy(i8* dereferenceable(1) %1, i8* dereferenceable(1) %0)
ret i8* %1
}
int autok_abort_action(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @autok_abort_action() {
ret i32 0
}
/* Variables and functions */
int readbytefrommem(unsigned char **memptr) {
  int result = -1;
  if (memptr != NULL) {
    result = **memptr;
    *memptr += 1;
    if (result == 0)
      result = -1;
  }
  return (result);
}


x86 assembly (clang, -O0):
<readbytefrommem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114b <readbytefrommem+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
cmpl   $0x0,-0xc(%rbp)
jne    1146 <readbytefrommem+0x46>
movl   $0xffffffff,-0xc(%rbp)
jmp    114b <readbytefrommem+0x4b>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<readbytefrommem>:
test   %rdi,%rdi
je     111a <readbytefrommem+0x1a>
mov    (%rdi),%rax
movzbl (%rax),%ecx
add    $0x1,%rax
mov    %rax,(%rdi)
cmp    $0x1,%ecx
sbb    %eax,%eax
or     %ecx,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @readbytefrommem(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %7, i8** %0
%8 = icmp eq i8 %5, 0
%9 = select i1 %8, i32 -1, i32 %6
br label %10
10: ; preds = %3, %1
%11 = phi i32 [ %9, %3 ], [ -1, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ strchr(char *, int);
void invalidFunctionArg_strchr(char *cs, int c) {
  (void)strchr(cs, -1);
  (void)strchr(cs, 0);
  (void)strchr(cs, 255);
  (void)strchr(cs, 256);
}


x86 assembly (clang, -O0):
<invalidFunctionArg_strchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xffffffff,%esi
call   1030 <strchr@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <strchr@plt>
mov    -0x8(%rbp),%rdi
mov    $0xff,%esi
call   1030 <strchr@plt>
mov    -0x8(%rbp),%rdi
mov    $0x100,%esi
call   1030 <strchr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invalidFunctionArg_strchr>:
push   %rbx
mov    %rdi,%rbx
mov    $0xffffffff,%esi
call   1030 <strchr@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <strchr@plt>
mov    %rbx,%rdi
mov    $0xff,%esi
call   1030 <strchr@plt>
mov    %rbx,%rdi
mov    $0x100,%esi
pop    %rbx
jmp    1030 <strchr@plt>

LLVM IR (-O0):
define void @invalidFunctionArg_strchr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @strchr(i8* %5, i32 -1)
%7 = load i8*, i8** %3
%8 = call i32 @strchr(i8* %7, i32 0)
%9 = load i8*, i8** %3
%10 = call i32 @strchr(i8* %9, i32 255)
%11 = load i8*, i8** %3
%12 = call i32 @strchr(i8* %11, i32 256)
ret void
}

LLVM IR (-O2):
define void @invalidFunctionArg_strchr(i8* %0, i32 %1) {
%3 = tail call i32 @strchr(i8* %0, i32 -1)
%4 = tail call i32 @strchr(i8* %0, i32 0)
%5 = tail call i32 @strchr(i8* %0, i32 255)
%6 = tail call i32 @strchr(i8* %0, i32 256)
ret void
}
int TestLinkGetType() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @TestLinkGetType() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int sayi = 5644;
  int birler = sayi % 10;
  sayi = sayi / 10;
  int onlar = sayi % 10;
  sayi /= 10;
  int yuzler = sayi % 10;
  sayi /= 10;
  int binler = sayi;
  int toplam = birler + onlar + yuzler + binler;
  printf("Sayilarin toplami:%d\n", toplam);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x160c,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [22 x i8] c"Sayilarin toplami:%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 19)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assign(int /*<<< orphan*/ *, int);
void null_passed_as_argument() { assign(NULL, 42); }


x86 assembly (clang, -O0):
<null_passed_as_argument>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
mov    $0x2a,%esi
call   1030 <assign@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<null_passed_as_argument>:
xor    %edi,%edi
mov    $0x2a,%esi
jmp    1030 <assign@plt>

LLVM IR (-O0):
define void @null_passed_as_argument() {
%1 = call i32 @assign(i32* null, i32 42)
ret void
}

LLVM IR (-O2):
define void @null_passed_as_argument() {
%1 = tail call i32 @assign(i32* null, i32 42)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(int, int /*<<< orphan*/ *);
void write_int16(int val, FILE *fp) {
  fputc(val & 0xFF, fp);
  fputc((val >> 8) & 0xFF, fp);
}


x86 assembly (clang, -O0):
<write_int16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
and    $0xff,%edi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
mov    -0x4(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_int16>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%ebx
movzbl %bl,%edi
call   1030 <fputc@plt>
movzbl %bh,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define void @write_int16(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 = and i32 %5, 255
%7 = load i32*, i32** %4
%8 = call i32 @fputc(i32 %6, i32* %7)
%9 = load i32, i32* %3
%10 = ashr i32 %9, 8
%11 = and i32 %10, 255
%12 = load i32*, i32** %4
%13 = call i32 @fputc(i32 %11, i32* %12)
ret void
}

LLVM IR (-O2):
define void @write_int16(i32 %0, i32* nocapture %1) {
%3 = and i32 %0, 255
%4 = tail call i32 @fputc(i32 %3, i32* %1)
%5 = lshr i32 %0, 8
%6 = and i32 %5, 255
%7 = tail call i32 @fputc(i32 %6, i32* %1)
ret void
}
/* Variables and functions */
int ceil(double);
int ntiles(int n, int t) { return (ceil((double)n / (double)t)); }


x86 assembly (clang, -O0):
<ntiles>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <ceil@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntiles>:
cvtsi2sd %edi,%xmm0
cvtsi2sd %esi,%xmm1
divsd  %xmm1,%xmm0
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define i32 @ntiles(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 = sitofp i32 %5 to double
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = fdiv double %6, %8
%10 = call i32 @ceil(double %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @ntiles(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to double
%4 = sitofp i32 %1 to double
%5 = fdiv double %3, %4
%6 = tail call i32 @ceil(double %5)
ret i32 %6
}
void bufferevent_free(struct bufferevent *bufev) { (void)bufev; }


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

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

LLVM IR (-O0):
%struct.bufferevent = type opaque
define void @bufferevent_free(%struct.bufferevent* %0) {
%2 = alloca %struct.bufferevent*
store %struct.bufferevent* %0, %struct.bufferevent** %2
%3 = load %struct.bufferevent*, %struct.bufferevent** %2
ret void
}

LLVM IR (-O2):
%struct.bufferevent = type opaque
define void @bufferevent_free(%struct.bufferevent* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ _getpid();
pid_t getpid(void) { return _getpid(); }


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

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

LLVM IR (-O0):
define i32 @getpid() {
%1 = call i32 (...) @_getpid()
ret i32 %1
}

LLVM IR (-O2):
define i32 @getpid() {
%1 = tail call i32 (...) @_getpid()
ret i32 %1
}
void platformFinal() {}


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

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

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

LLVM IR (-O2):
define void @platformFinal() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ qprintf(char *, int);
int q_CreateRecursiveLock(int hex) {
  qprintf("*** "
          "CreateRecursiveLock"
          "(%x)\n",
          hex);
  return 0;
}


x86 assembly (clang, -O0):
<q_CreateRecursiveLock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <qprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [29 x i8] c"*** CreateRecursiveLock(%x)\0A\00"
define i32 @q_CreateRecursiveLock(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @qprintf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"*** CreateRecursiveLock(%x)\0A\00"
define i32 @q_CreateRecursiveLock(i32 %0) {
%2 = tail call i32 @qprintf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 0
}
int ft_isprint(int c) {
  if (c >= (unsigned char)' ' && c <= '~')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_isprint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jl     1127 <ft_isprint+0x27>
cmpl   $0x7e,-0x8(%rbp)
jg     1127 <ft_isprint+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <ft_isprint+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isprint>:
add    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x5f,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @ft_isprint(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, int /*<<< orphan*/, int);
off_t lseek(int fd, off_t offset, int whence) {
  return syscall(19, fd, offset, whence);
}


x86 assembly (clang, -O0):
<lseek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x13,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lseek>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x13,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @lseek(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @syscall(i32 19, i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @lseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @syscall(i32 19, i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ addch(char);
int /*<<< orphan*/ move(int, int);
mvaddch(int r, int c, char s) {
  move(r, c);
  addch(s);
}


x86 assembly (clang, -O0):
<mvaddch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <move@plt>
movsbl -0xd(%rbp),%edi
call   1030 <addch@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mvaddch>:
push   %rbx
mov    %edx,%ebx
call   1040 <move@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <addch@plt>

LLVM IR (-O0):
define i32 @mvaddch(i32 %0, i32 %1, i8 signext %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8 %2, i8* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @move(i32 %8, i32 %9)
%11 = load i8, i8* %7
%12 = call i32 @addch(i8 signext %11)
%13 = load i32, i32* %4
ret i32 %13
}

LLVM IR (-O2):
define i32 @mvaddch(i32 %0, i32 %1, i8 signext %2) {
%4 = tail call i32 @move(i32 %0, i32 %1)
%5 = tail call i32 @addch(i8 signext %2)
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ error(char *);
scalar_t__ recv(int, char *, int, int /*<<< orphan*/);
void read_in(int client_socket, char *buf) {
  ssize_t c;
  if ((c = recv(client_socket, buf, 1024, 0)) >= 0) {
    if (c == 0)
      error("peer has closed");
  } else
    error("failed to read browser HTTP_Request");
}


x86 assembly (clang, -O0):
<read_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x400,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jl     116c <read_in+0x4c>
cmpq   $0x0,-0x18(%rbp)
jne    1167 <read_in+0x47>
lea    0xe9e(%rip),%rdi
call   1040 <error@plt>
jmp    1178 <read_in+0x58>
lea    0xe9d(%rip),%rdi
call   1040 <error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_in>:
push   %rax
mov    $0x400,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
test   %rax,%rax
js     1136 <read_in+0x16>
je     1143 <read_in+0x23>
pop    %rax
ret
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1040 <error@plt>
lea    0xeb6(%rip),%rdi
pop    %rax
jmp    1040 <error@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"peer has closed\00"
@.str.1 = [36 x i8] c"failed to read browser HTTP_Request\00"
define void @read_in(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = load i8*, i8** %4
%8 = call i64 @recv(i32 %6, i8* %7, i32 1024, i32 0)
store i64 %8, i64* %5
%9 = icmp sge i64 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load i64, i64* %5
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 @error(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %10
br label %18
16: ; preds = %2
%17 = call i32 @error(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %16, %15
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"peer has closed\00"
@.str.1 = [36 x i8] c"failed to read browser HTTP_Request\00"
define void @read_in(i32 %0, i8* %1) {
%3 = tail call i64 @recv(i32 %0, i8* %1, i32 1024, i32 0)
%4 = icmp sgt i64 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = icmp eq i64 %3, 0
br i1 %6, label %7, label %10
7: ; preds = %2, %5
%8 = phi i8* [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), %5 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), %2 ]
%9 = tail call i32 @error(i8* %8)
br label %10
10: ; preds = %7, %5
ret void
}
void set_sigwinch() {}


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

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

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

LLVM IR (-O2):
define void @set_sigwinch() {
ret void
}
/* Variables and functions */
double __nv_exp2(double);
double exp2(double __a) { return __nv_exp2(__a); }


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

x86 assembly (clang, -O2):
<exp2>:
jmp    1030 <__nv_exp2@plt>

LLVM IR (-O0):
define double @exp2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @__nv_exp2(double %3)
ret double %4
}

LLVM IR (-O2):
define double @exp2(double %0) {
%2 = tail call double @__nv_exp2(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void nexusifree(void *ptr) { free((char *)ptr); }


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

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

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

LLVM IR (-O2):
define void @nexusifree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int /*<<< orphan*/ EPERM;
int /*<<< orphan*/ errno;
int setreuid(uid_t ruid, uid_t euid) {
  errno = EPERM;
  return -1;
}


x86 assembly (clang, -O0):
<setreuid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec6(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setreuid>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EPERM = global i32 0
@errno = global i32 0
define i32 @setreuid(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @EPERM
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EPERM = global i32 0
@errno = global i32 0
define i32 @setreuid(i32 %0, i32 %1) {
%3 = load i32, i32* @EPERM
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ clearMem(char *, int);
char *jakstab_alloc();
int main(int argc, char **argv) {
  char *p1 = jakstab_alloc();
  char *p2 = jakstab_alloc();
  clearMem(p1, 10);
  clearMem(p2, 10);
  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)
mov    $0x0,%al
call   1030 <jakstab_alloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <jakstab_alloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0xa,%esi
call   1040 <clearMem@plt>
mov    -0x20(%rbp),%rdi
mov    $0xa,%esi
call   1040 <clearMem@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <jakstab_alloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <jakstab_alloc@plt>
mov    %rax,%r14
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <clearMem@plt>
mov    %r14,%rdi
mov    $0xa,%esi
call   1040 <clearMem@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i8* (...) @jakstab_alloc()
store i8* %8, i8** %6
%9 = call i8* (...) @jakstab_alloc()
store i8* %9, i8** %7
%10 = load i8*, i8** %6
%11 = call i32 @clearMem(i8* %10, i32 10)
%12 = load i8*, i8** %7
%13 = call i32 @clearMem(i8* %12, i32 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* (...) @jakstab_alloc()
%4 = tail call i8* (...) @jakstab_alloc()
%5 = tail call i32 @clearMem(i8* %3, i32 10)
%6 = tail call i32 @clearMem(i8* %4, i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int __VERIFIER_nondet_int();
int main() {
  int x = __VERIFIER_nondet_int();
  if (x < 1 || x > 1) {
  } else
    __VERIFIER_assert(x == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     114d <main+0x2d>
cmpl   $0x1,-0x8(%rbp)
jle    1152 <main+0x32>
jmp    1163 <main+0x43>
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x1,%eax
jne    1137 <main+0x17>
mov    $0x1,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 1
br i1 %5, label %9, label %6
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %6, %0
br label %15
10: ; preds = %6
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 1
%13 = zext i1 %12 to i32
%14 = call i32 @__VERIFIER_assert(i32 %13)
br label %15
15: ; preds = %10, %9
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @__VERIFIER_assert(i32 1)
br label %5
5: ; preds = %0, %3
ret i32 0
}
long f(short a, short b) { return (long)a / b; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswq -0x2(%rbp),%rax
movswq -0x4(%rbp),%rcx
cqto
idiv   %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
cltd
idiv   %esi
cltq
ret

LLVM IR (-O0):
define i64 @f(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = sext i16 %5 to i64
%7 = load i16, i16* %4
%8 = sext i16 %7 to i64
%9 = sdiv i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @f(i16 signext %0, i16 signext %1) {
%3 = sext i16 %0 to i32
%4 = sext i16 %1 to i32
%5 = sdiv i32 %3, %4
%6 = sext i32 %5 to i64
ret i64 %6
}
/* Type definitions */
struct proctal {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ proctal_implementation_scan_address_start(struct proctal *);
void proctal_scan_address_start(struct proctal *p) {
  proctal_implementation_scan_address_start(p);
}


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

x86 assembly (clang, -O2):
<proctal_scan_address_start>:
jmp    1030 <proctal_implementation_scan_address_start@plt>

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

LLVM IR (-O2):
%struct.proctal = type { i32 }
define void @proctal_scan_address_start(%struct.proctal* %0) {
%2 = tail call i32 @proctal_implementation_scan_address_start(%struct.proctal* %0)
ret void
}
/* Variables and functions */
double pow(double, int);
double calcError(double a, double b, int interactions) {
  return (b - a) / pow(2.0, interactions);
}


x86 assembly (clang, -O0):
<calcError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x14(%rbp),%edi
movsd  0xec1(%rip),%xmm0
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcError>:
push   %rax
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0xede(%rip),%xmm0
call   1030 <pow@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @calcError(double %0, double %1, i32 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i32
store double %0, double* %4
store double %1, double* %5
store i32 %2, i32* %6
%7 = load double, double* %5
%8 = load double, double* %4
%9 = fsub double %7, %8
%10 = load i32, i32* %6
%11 = call double @pow(double 2.000000e+00, i32 %10)
%12 = fdiv double %9, %11
ret double %12
}

LLVM IR (-O2):
define double @calcError(double %0, double %1, i32 %2) {
%4 = fsub double %1, %0
%5 = tail call double @pow(double 2.000000e+00, i32 %2)
%6 = fdiv double %4, %5
ret double %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ info;
  void *info_len;
  void *bpf_fd;
};
union bpf_attr {
  TYPE_1__ info;
};
typedef scalar_t__ __u64;
typedef void *__u32;

/* Variables and functions */
void bpf_attr_setup_get_info(union bpf_attr *attr, __u32 map_fd,
                             __u32 info_size, void *info) {
  attr->info.bpf_fd = map_fd;
  attr->info.info_len = info_size;
  attr->info.info = (__u64)(unsigned long)info;
}


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

x86 assembly (clang, -O2):
<bpf_attr_setup_get_info>:
mov    %rsi,0x10(%rdi)
mov    %rdx,0x8(%rdi)
mov    %rcx,(%rdi)
ret

LLVM IR (-O0):
%union.bpf_attr = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i64, i8*, i8* }
define void @bpf_attr_setup_get_info(%union.bpf_attr* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %union.bpf_attr*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %union.bpf_attr* %0, %union.bpf_attr** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = load %union.bpf_attr*, %union.bpf_attr** %5
%11 = bitcast %union.bpf_attr* %10 to %struct.TYPE_2__*
%12 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %11, i32 0, i32 2
store i8* %9, i8** %12
%13 = load i8*, i8** %7
%14 = load %union.bpf_attr*, %union.bpf_attr** %5
%15 = bitcast %union.bpf_attr* %14 to %struct.TYPE_2__*
%16 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %15, i32 0, i32 1
store i8* %13, i8** %16
%17 = load i8*, i8** %8
%18 = ptrtoint i8* %17 to i64
%19 = load %union.bpf_attr*, %union.bpf_attr** %5
%20 = bitcast %union.bpf_attr* %19 to %struct.TYPE_2__*
%21 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %20, i32 0, i32 0
store i64 %18, i64* %21
ret void
}

LLVM IR (-O2):
%union.bpf_attr = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i64, i8*, i8* }
define void @bpf_attr_setup_get_info(%union.bpf_attr* nocapture writeonly %0, i8* %1, i8* %2, i8* %3) {
%5 = getelementptr inbounds %union.bpf_attr, %union.bpf_attr* %0, i64 0, i32 0, i32 2
store i8* %1, i8** %5
%6 = getelementptr inbounds %union.bpf_attr, %union.bpf_attr* %0, i64 0, i32 0, i32 1
store i8* %2, i8** %6
%7 = ptrtoint i8* %3 to i64
%8 = getelementptr inbounds %union.bpf_attr, %union.bpf_attr* %0, i64 0, i32 0, i32 0
store i64 %7, i64* %8
ret void
}
void ctl_note(int v) {}


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

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

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

LLVM IR (-O2):
define void @ctl_note(i32 %0) {
ret void
}