xunge/DecIR huggingface dataset:
void _cc3_set_cam_ddr_i2c_write(void) {}


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

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

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

LLVM IR (-O2):
define void @_cc3_set_cam_ddr_i2c_write() {
ret void
}
int digitalRead(int pin) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @digitalRead(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gen_op_load_decr();
void spr_read_decr(void *opaque, int sprn) { gen_op_load_decr(); }


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

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

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

LLVM IR (-O2):
define void @spr_read_decr(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (...) @gen_op_load_decr()
ret void
}
/* Type definitions */
struct env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ env_find(struct env *, char const *, int /*<<< orphan*/ *,
                            char const **);
const char *env_get(struct env *env, const char *name) {
  const char *v;
  if (!env_find(env, name, NULL, &v))
    return v;
  return NULL;
}


x86 assembly (clang, -O0):
<env_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
lea    -0x20(%rbp),%rcx
call   1030 <env_find@plt>
cmp    $0x0,%eax
jne    114b <env_get+0x3b>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <env_get+0x43>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<env_get>:
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
lea    0x8(%rsp),%rcx
xor    %edx,%edx
call   1030 <env_find@plt>
test   %eax,%eax
jne    112c <env_get+0x1c>
mov    0x8(%rsp),%rbx
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.env = type { i32 }
define i8* @env_get(%struct.env* %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i32 @env_find(%struct.env* %0, i8* %1, i32* null, i8** %3)
%6 = icmp eq i32 %5, 0
%7 = load i8*, i8** %3
%8 = select i1 %6, i8* %7, i8* null
ret i8* %8
}
void avio_get_str() {}


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

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

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

LLVM IR (-O2):
define void @avio_get_str() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ h3c_clean();
int /*<<< orphan*/ h3c_logoff();
int /*<<< orphan*/ puts(char *);
void exit_handler(int arg) {
  puts("\nExiting...\n");
  h3c_logoff();
  h3c_clean();
  exit(0);
}


x86 assembly (clang, -O0):
<exit_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xeae(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1040 <h3c_logoff@plt>
mov    $0x0,%al
call   1050 <h3c_clean@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<exit_handler>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <h3c_logoff@plt>
xor    %eax,%eax
call   1050 <h3c_clean@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"\0AExiting...\0A\00"
define void @exit_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @h3c_logoff()
%5 = call i32 (...) @h3c_clean()
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [13 x i8] c"\0AExiting...\0A\00"
define void @exit_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @h3c_logoff()
%4 = tail call i32 (...) @h3c_clean()
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ k_error(int /*<<< orphan*/);
int /*<<< orphan*/ sysmsg(int);
void k_deadlock() { k_error(sysmsg(1114)); }


x86 assembly (clang, -O0):
<k_deadlock>:
push   %rbp
mov    %rsp,%rbp
mov    $0x45a,%edi
call   1030 <sysmsg@plt>
mov    %eax,%edi
call   1040 <k_error@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<k_deadlock>:
push   %rax
mov    $0x45a,%edi
call   1030 <sysmsg@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <k_error@plt>

LLVM IR (-O0):
define void @k_deadlock() {
%1 = call i32 @sysmsg(i32 1114)
%2 = call i32 @k_error(i32 %1)
ret void
}

LLVM IR (-O2):
define void @k_deadlock() {
%1 = tail call i32 @sysmsg(i32 1114)
%2 = tail call i32 @k_error(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_augeas_comments() {
  test_parser_verify_parse(test_parser_sourcefile("augeas", " (* comment *)"),
                           "augeas", "", "(* comment *)", 0);
}


x86 assembly (clang, -O0):
<test_augeas_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xece(%rip),%rdx
lea    0xeba(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_augeas_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xed7(%rip),%rdx
lea    0xec3(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"augeas\00"
@.str.1 = [15 x i8] c" (* comment *)\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [14 x i8] c"(* comment *)\00"
define void @test_augeas_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"augeas\00"
@.str.1 = [15 x i8] c" (* comment *)\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [14 x i8] c"(* comment *)\00"
define void @test_augeas_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Console_String(unsigned char *, long long);
void Console_Bool(char b) {
  if (b) {
    Console_String((unsigned char *)"TRUE", (long long)5);
  } else {
    Console_String((unsigned char *)"FALSE", (long long)6);
  }
}


x86 assembly (clang, -O0):
<Console_Bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     113e <Console_Bool+0x2e>
lea    0xed1(%rip),%rdi
mov    $0x5,%esi
call   1030 <Console_String@plt>
jmp    114f <Console_Bool+0x3f>
lea    0xec0(%rip),%rdi
mov    $0x6,%esi
call   1030 <Console_String@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Console_Bool>:
test   %dil,%dil
je     1126 <Console_Bool+0x16>
lea    0xee4(%rip),%rdi
mov    $0x5,%esi
jmp    1030 <Console_String@plt>
lea    0xed8(%rip),%rdi
mov    $0x6,%esi
jmp    1030 <Console_String@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"TRUE\00"
@.str.1 = [6 x i8] c"FALSE\00"
define void @Console_Bool(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = icmp ne i8 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @Console_String(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 5)
br label %9
7: ; preds = %1
%8 = call i32 @Console_String(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 6)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"TRUE\00"
@.str.1 = [6 x i8] c"FALSE\00"
define void @Console_Bool(i8 signext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @Console_String(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 5)
br label %7
5: ; preds = %1
%6 = tail call i32 @Console_String(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 6)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char *, int);
int main() {
  char *firstname = "Patrik";
  int age = 20;
  printf("Hej jag heter %s och är %d år gammal\n", firstname, age);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x14,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"Patrik\00"
@.str.1 = [40 x i8] c"Hej jag heter %s och \C3\A4r %d \C3\A5r gammal\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %2
store i32 20, i32* %3
%4 = load i8*, i8** %2
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i8* %4, i32 %5)
%7 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"Patrik\00"
@.str.1 = [40 x i8] c"Hej jag heter %s och \C3\A4r %d \C3\A5r gammal\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 20)
%2 = tail call i32 (...) @getchar()
ret i32 0
}
/* Type definitions */
struct ct_testsuite {
  int dummy;
};

/* Variables and functions */
size_t ct_runsuite_withargs(struct ct_testsuite const *, int /*<<< orphan*/,
                            int /*<<< orphan*/ *);
size_t ct_runsuite(const struct ct_testsuite *suite) {
  return ct_runsuite_withargs(suite, 0, NULL);
}


x86 assembly (clang, -O0):
<ct_runsuite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <ct_runsuite_withargs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ct_runsuite>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <ct_runsuite_withargs@plt>

LLVM IR (-O0):
%struct.ct_testsuite = type { i32 }
define i64 @ct_runsuite(%struct.ct_testsuite* %0) {
%2 = alloca %struct.ct_testsuite*
store %struct.ct_testsuite* %0, %struct.ct_testsuite** %2
%3 = load %struct.ct_testsuite*, %struct.ct_testsuite** %2
%4 = call i64 @ct_runsuite_withargs(%struct.ct_testsuite* %3, i32 0, i32* null)
ret i64 %4
}

LLVM IR (-O2):
%struct.ct_testsuite = type { i32 }
define i64 @ct_runsuite(%struct.ct_testsuite* %0) {
%2 = tail call i64 @ct_runsuite_withargs(%struct.ct_testsuite* %0, i32 0, i32* null)
ret i64 %2
}
void init_add_rel_color_span_funcs_c(void) {}


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

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

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

LLVM IR (-O2):
define void @init_add_rel_color_span_funcs_c() {
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_network_monitor_flush(void *m) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_network_monitor_flush>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecf(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_network_monitor_flush>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_network_monitor_flush(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_network_monitor_flush(i8* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ conn_clear();
void comm_clear() { conn_clear(); }


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

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

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

LLVM IR (-O2):
define void @comm_clear() {
%1 = tail call i32 (...) @conn_clear()
ret void
}
/* Variables and functions */
unsigned char *blake256_buffer(unsigned char *, unsigned char const *, size_t);
unsigned char *hash_buffer_blake256(unsigned char *out, const unsigned char *in,
                                    size_t in_len) {
  return blake256_buffer(out, in, in_len);
}


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

x86 assembly (clang, -O2):
<hash_buffer_blake256>:
jmp    1030 <blake256_buffer@plt>

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

LLVM IR (-O2):
define i8* @hash_buffer_blake256(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @blake256_buffer(i8* %0, i8* %1, i64 %2)
ret i8* %4
}
void selinux_xfrm_notify_policyload(void) {}


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

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

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

LLVM IR (-O2):
define void @selinux_xfrm_notify_policyload() {
ret void
}
/* Type definitions */
struct sockaddr_storage {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int socklen_t;

/* Variables and functions */
int accept(int, struct sockaddr *, int *);
int accept_connection(int socketfd) {
  int remotefd;
  socklen_t addr_size;
  struct sockaddr_storage remote_addr;
  addr_size = sizeof(struct sockaddr_storage);
  remotefd = accept(socketfd, (struct sockaddr *)&remote_addr, &addr_size);
  return remotefd;
}


x86 assembly (clang, -O0):
<accept_connection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <accept@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accept_connection>:
sub    $0x18,%rsp
movl   $0x4,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <accept@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sockaddr_storage = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @accept_connection(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sockaddr_storage
store i32 %0, i32* %2
store i32 4, i32* %4
%6 = load i32, i32* %2
%7 = bitcast %struct.sockaddr_storage* %5 to %struct.sockaddr*
%8 = call i32 @accept(i32 %6, %struct.sockaddr* %7, i32* %4)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
%struct.sockaddr_storage = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @accept_connection(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr_storage
%4 = bitcast i32* %2 to i8*
%5 = bitcast %struct.sockaddr_storage* %3 to i8*
store i32 4, i32* %2
%6 = bitcast %struct.sockaddr_storage* %3 to %struct.sockaddr*
%7 = call i32 @accept(i32 %0, %struct.sockaddr* %6, i32* %2)
ret i32 %7
}
/* Variables and functions */
int _response(char const *);
int /*<<< orphan*/ write_log(char *, int /*<<< orphan*/);
int do_noop(void) {
  const char mess[] = "200 NOOP command successful.\r\n";
  if (_response(mess) == -1) {
    write_log("write error in do_noop()", 0);
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<do_noop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec9(%rip),%eax
mov    %eax,-0x18(%rbp)
mov    0xec3(%rip),%ax
mov    %ax,-0x14(%rbp)
mov    0xebb(%rip),%al
mov    %al,-0x12(%rbp)
lea    -0x30(%rbp),%rdi
call   1030 <_response@plt>
cmp    $0xffffffff,%eax
jne    1192 <do_noop+0x72>
lea    0xea0(%rip),%rdi
xor    %esi,%esi
call   1040 <write_log@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1199 <do_noop+0x79>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_noop>:
sub    $0x28,%rsp
movups 0xee4(%rip),%xmm0
movups %xmm0,0xf(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <_response@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
je     1151 <do_noop+0x31>
add    $0x28,%rsp
ret
lea    0xec7(%rip),%rdi
xor    %esi,%esi
call   1040 <write_log@plt>
mov    $0xffffffff,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.do_noop.mess = [31 x i8] c"200 NOOP command successful.\0D\0A\00"
@.str = [25 x i8] c"write error in do_noop()\00"
define i32 @do_noop() {
%1 = alloca i32
%2 = alloca [31 x i8]
%3 = bitcast [31 x i8]* %2 to i8*
%4 = getelementptr inbounds [31 x i8], [31 x i8]* %2, i64 0, i64 0
%5 = call i32 @_response(i8* %4)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @write_log(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 0)
store i32 -1, i32* %1
br label %10
9: ; preds = %0
store i32 0, i32* %1
br label %10
10: ; preds = %9, %7
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@__const.do_noop.mess = [31 x i8] c"200 NOOP command successful.\0D\0A\00"
@.str = [25 x i8] c"write error in do_noop()\00"
define i32 @do_noop() {
%1 = alloca [31 x i8]
%2 = getelementptr inbounds [31 x i8], [31 x i8]* %1, i64 0, i64 0
%3 = call i32 @_response(i8* %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @write_log(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 0)
br label %7
7: ; preds = %0, %5
%8 = phi i32 [ -1, %5 ], [ 0, %0 ]
ret i32 %8
}
/* Variables and functions */
int ENODEV;
int sandbox_sdl_key_pressed(int keycode) { return -ENODEV; }


x86 assembly (clang, -O0):
<sandbox_sdl_key_pressed>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    0x2ed0(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sandbox_sdl_key_pressed>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENODEV = global i32 0
define i32 @sandbox_sdl_key_pressed(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENODEV
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@ENODEV = global i32 0
define i32 @sandbox_sdl_key_pressed(i32 %0) {
%2 = load i32, i32* @ENODEV
%3 = sub nsw i32 0, %2
ret i32 %3
}
void __board_assert_mem_reset(void) {}


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

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

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

LLVM IR (-O2):
define void @__board_assert_mem_reset() {
ret void
}
/* Variables and functions */
int nwd(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() { printf("NWD = %d\n", nwd(1989, 867)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7c5,%edi
mov    $0x363,%esi
call   1030 <nwd@plt>
mov    %eax,%esi
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"NWD = %d\0A\00"
define i32 @main() {
%1 = call i32 @nwd(i32 1989, i32 867)
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"NWD = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @nwd(i32 1989, i32 867)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  float fahr, celsius;
  int lower, upper, step;
  lower = 0;
  upper = 300;
  step = 20;
  printf("Fahrenheit\tCelsius\n");
  while (fahr <= upper) {
    celsius = (5.0 / 9.0) * (fahr - 32.0);
    printf("%10.2f\t%7.2f\n", fahr, celsius);
    fahr = fahr + step;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x12c,-0x14(%rbp)
movl   $0x14,-0x18(%rbp)
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm1
cvtsi2ssl -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11b7 <main+0xa7>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea2(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe8e(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe8c(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtsi2ssl -0x18(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1142 <main+0x32>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"Fahrenheit\09Celsius\0A\00"
@.str.1 = [14 x i8] c"%10.2f\09%7.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 300, i32* %5
store i32 20, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %13, %0
%9 = load float, float* %2
%10 = load i32, i32* %5
%11 = sitofp i32 %10 to float
%12 = fcmp ole float %9, %11
br i1 %12, label %13, label %28
13: ; preds = %8
%14 = load float, float* %2
%15 = fpext float %14 to double
%16 = fsub double %15, 3.200000e+01
%17 = fmul double 0x3FE1C71C71C71C72, %16
%18 = fptrunc double %17 to float
store float %18, float* %3
%19 = load float, float* %2
%20 = fpext float %19 to double
%21 = load float, float* %3
%22 = fpext float %21 to double
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %20, double %22)
%24 = load float, float* %2
%25 = load i32, i32* %6
%26 = sitofp i32 %25 to float
%27 = fadd float %24, %26
store float %27, float* %2
br label %8
28: ; preds = %8
%29 = load i32, i32* %1
ret i32 %29
}

LLVM IR (-O2):
@str = [19 x i8] c"Fahrenheit\09Celsius\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int fun114() { return 114; }


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

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

LLVM IR (-O0):
define i32 @fun114() {
ret i32 114
}

LLVM IR (-O2):
define i32 @fun114() {
ret i32 114
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
scalar_t__ __VERIFIER_nondet_bool();
int main() {
  int i = 0;
  while (__VERIFIER_nondet_bool()) {
    for (i = 0; i < 10; i++) {
    }
    i += 10;
  }
  __VERIFIER_assert(i >= 0 && i <= 20);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_bool@plt>
cmp    $0x0,%rax
je     1179 <main+0x59>
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    116b <main+0x4b>
jmp    115d <main+0x3d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114e <main+0x2e>
mov    -0x8(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     1192 <main+0x72>
cmpl   $0x14,-0x8(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_bool@plt>
test   %rax,%rax
jne    1130 <main+0x10>
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
store i32 0, i32* %2
br label %3
3: ; preds = %14, %0
%4 = call i64 (...) @__VERIFIER_nondet_bool()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %17
6: ; preds = %3
store i32 0, i32* %2
br label %7
7: ; preds = %11, %6
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 10
br i1 %9, label %10, label %14
10: ; preds = %7
br label %11
11: ; preds = %10
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %7
14: ; preds = %7
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 10
store i32 %16, i32* %2
br label %3
17: ; preds = %3
%18 = load i32, i32* %2
%19 = icmp sge i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = load i32, i32* %2
%22 = icmp sle i32 %21, 20
br label %23
23: ; preds = %20, %17
%24 = phi i1 [ false, %17 ], [ %22, %20 ]
%25 = zext i1 %24 to i32
%26 = call i32 @__VERIFIER_assert(i32 %25)
%27 = load i32, i32* %1
ret i32 %27
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @__VERIFIER_nondet_bool()
%2 = icmp eq i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0, %3
%4 = tail call i64 (...) @__VERIFIER_nondet_bool()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3, %0
%7 = tail call i32 @__VERIFIER_assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ suite_malloc();
int /*<<< orphan*/ suite_util();
int main(void) {
  suite_malloc();
  suite_util();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @suite_malloc()
%2 = tail call i32 (...) @suite_util()
ret i32 0
}
void RTTimeSystemMilliTS(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTimeSystemMilliTS() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_automake_comment_entities();
void all_automake_tests() { test_automake_comment_entities(); }


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

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

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

LLVM IR (-O2):
define void @all_automake_tests() {
%1 = tail call i32 (...) @test_automake_comment_entities()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
int _hexdump_error(char const *message, int ret) {
  fputs("hexdump"
        ": ",
        stderr);
  perror(message);
  return ret;
}


x86 assembly (clang, -O0):
<_hexdump_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_hexdump_error>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
lea    0xec8(%rip),%rdi
call   1030 <fputs@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"hexdump: \00"
@stderr = global i32 0
define i32 @_hexdump_error(i8* nocapture %0, i32 returned %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @perror(i8* %0)
ret i32 %1
}
/* Type definitions */
struct mdoc {
  int dummy;
};
struct html {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mdoc_meta(struct mdoc const *);
int /*<<< orphan*/ mdoc_node(struct mdoc const *);
int /*<<< orphan*/ print_mdoc(int /*<<< orphan*/, int /*<<< orphan*/,
                              struct html *);
int /*<<< orphan*/ putchar(char);
void html_mdoc(void *arg, const struct mdoc *mdoc) {
  print_mdoc(mdoc_meta(mdoc), mdoc_node(mdoc), (struct html *)arg);
  putchar('\n');
}


x86 assembly (clang, -O0):
<html_mdoc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <mdoc_meta@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <mdoc_node@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
mov    -0x8(%rbp),%rdx
call   1040 <print_mdoc@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<html_mdoc>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1060 <mdoc_meta@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1050 <mdoc_node@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %r14,%rdx
call   1040 <print_mdoc@plt>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
%struct.mdoc = type { i32 }
%struct.html = type { i32 }
define void @html_mdoc(i8* %0, %struct.mdoc* %1) {
%3 = alloca i8*
%4 = alloca %struct.mdoc*
store i8* %0, i8** %3
store %struct.mdoc* %1, %struct.mdoc** %4
%5 = load %struct.mdoc*, %struct.mdoc** %4
%6 = call i32 @mdoc_meta(%struct.mdoc* %5)
%7 = load %struct.mdoc*, %struct.mdoc** %4
%8 = call i32 @mdoc_node(%struct.mdoc* %7)
%9 = load i8*, i8** %3
%10 = bitcast i8* %9 to %struct.html*
%11 = call i32 @print_mdoc(i32 %6, i32 %8, %struct.html* %10)
%12 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
%struct.mdoc = type { i32 }
%struct.html = type { i32 }
define void @html_mdoc(i8* %0, %struct.mdoc* %1) {
%3 = tail call i32 @mdoc_meta(%struct.mdoc* %1)
%4 = tail call i32 @mdoc_node(%struct.mdoc* %1)
%5 = bitcast i8* %0 to %struct.html*
%6 = tail call i32 @print_mdoc(i32 %3, i32 %4, %struct.html* %5)
%7 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ splitmix64();
uint32_t splitmix64_cast32(void) { return (uint32_t)splitmix64(); }


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

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

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

LLVM IR (-O2):
define i32 @splitmix64_cast32() {
%1 = tail call i32 (...) @splitmix64()
ret i32 %1
}
void qbbs_sigtrap(sig) int sig;
{
  loginfo("<quakebbs> caught signal %d; Terminating", sig);
  qbbs_exit();
}


x86 assembly (clang, -O0):
<qbbs_sigtrap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <loginfo@plt>
mov    $0x0,%al
call   1040 <qbbs_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qbbs_sigtrap>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <loginfo@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <qbbs_exit@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"<quakebbs> caught signal %d; Terminating\00"
define void @qbbs_sigtrap(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @loginfo to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 (...) @qbbs_exit()
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"<quakebbs> caught signal %d; Terminating\00"
define void @qbbs_sigtrap(i32 %0) {
%2 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @loginfo to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 (...) @qbbs_exit()
ret void
}
int f10() {
  int x = 4;
  x = 10 + x;
  return 1;
}


x86 assembly (clang, -O0):
<f10>:
push   %rbp
mov    %rsp,%rbp
movl   $0x4,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f10() {
%1 = alloca i32
store i32 4, i32* %1
%2 = load i32, i32* %1
%3 = add nsw i32 10, %2
store i32 %3, i32* %1
ret i32 1
}

LLVM IR (-O2):
define i32 @f10() {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
void *_mm_malloc(int /*<<< orphan*/, int);
void *malloc_mem(uint64_t size) { return _mm_malloc(size, 64); }


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

x86 assembly (clang, -O2):
<malloc_mem>:
mov    $0x40,%esi
jmp    1030 <_mm_malloc@plt>

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

LLVM IR (-O2):
define i8* @malloc_mem(i32 %0) {
%2 = tail call i8* @_mm_malloc(i32 %0, i32 64)
ret i8* %2
}
/* Variables and functions */
char *duplica_string(char *);
int /*<<< orphan*/ free(char *);
char *malloc(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strlen(char *);
int main(void) {
  char *s2 = "Campos verdes";
  char *s;
  s = malloc(strlen(s2));
  s = s2;
  char *s_duplicado;
  s_duplicado = duplica_string(s2);
  printf("%s\n", s_duplicado);
  free(s_duplicado);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <duplica_string@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xe70(%rip),%rdi
call   1050 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
call   1060 <duplica_string@plt>
mov    %rax,%rbx
lea    0xeac(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Campos verdes\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = call i8* @malloc(i32 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %2
store i8* %8, i8** %3
%9 = load i8*, i8** %2
%10 = call i8* @duplica_string(i8* %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %4
%14 = call i32 @free(i8* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Campos verdes\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* @duplica_string(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%4 = tail call i32 @free(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ OPER_PCIX_16();
int /*<<< orphan*/ m68ki_set_ccr(int /*<<< orphan*/);
void m68k_op_move_16_toc_pcix(void) { m68ki_set_ccr(OPER_PCIX_16()); }


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

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

LLVM IR (-O0):
define void @m68k_op_move_16_toc_pcix() {
%1 = call i32 (...) @OPER_PCIX_16()
%2 = call i32 @m68ki_set_ccr(i32 %1)
ret void
}

LLVM IR (-O2):
define void @m68k_op_move_16_toc_pcix() {
%1 = tail call i32 (...) @OPER_PCIX_16()
%2 = tail call i32 @m68ki_set_ccr(i32 %1)
ret void
}
int test_imm_B0int64_midword_reg(long long val) {
  return ((val >> 16) & (0xB0 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_B0int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 176
%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_B0int64_midword_reg(i64 %0) {
%2 = and i64 %0, 11534336
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ do_expression();
int /*<<< orphan*/ eat_blanks();
int /*<<< orphan*/ match(char);
int /*<<< orphan*/ printf(char *);
void do_alloc(void) {
  eat_blanks();
  match('(');
  do_expression();
  match(')');
  printf("\tcall alloc_n\n");
}


x86 assembly (clang, -O0):
<do_alloc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <eat_blanks@plt>
mov    $0x28,%edi
call   1050 <match@plt>
mov    $0x0,%al
call   1060 <do_expression@plt>
mov    $0x29,%edi
call   1050 <match@plt>
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_alloc>:
push   %rax
xor    %eax,%eax
call   1040 <eat_blanks@plt>
mov    $0x28,%edi
call   1050 <match@plt>
xor    %eax,%eax
call   1060 <do_expression@plt>
mov    $0x29,%edi
call   1050 <match@plt>
lea    0xe96(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"\09call alloc_n\0A\00"
define void @do_alloc() {
%1 = call i32 (...) @eat_blanks()
%2 = call i32 @match(i8 signext 40)
%3 = call i32 (...) @do_expression()
%4 = call i32 @match(i8 signext 41)
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"\09call alloc_n\00"
define void @do_alloc() {
%1 = tail call i32 (...) @eat_blanks()
%2 = tail call i32 @match(i8 signext 40)
%3 = tail call i32 (...) @do_expression()
%4 = tail call i32 @match(i8 signext 41)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timespec {
  int dummy;
};
typedef int /*<<< orphan*/ pthread_mutex_t;
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int pthread_cond_timedwait(pthread_cond_t *__restrict __cond,
                           pthread_mutex_t *__restrict __mutex,
                           __const struct timespec *__restrict __abstime) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.timespec = type { i32 }
define i32 @pthread_cond_timedwait(i32* noalias %0, i32* noalias %1, %struct.timespec* noalias %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca %struct.timespec*
store i32* %0, i32** %4
store i32* %1, i32** %5
store %struct.timespec* %2, %struct.timespec** %6
ret i32 0
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define i32 @pthread_cond_timedwait(i32* noalias nocapture readnone %0, i32* noalias nocapture readnone %1, %struct.timespec* noalias nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mexMakeMemoryPersistent(void *);
scalar_t__ mxRealloc(void *, size_t);
void *__wrap_realloc(void *pt, size_t bytes) {
  void *ptr;
  ptr = (void *)mxRealloc(pt, bytes);
  if (ptr != 0)
    mexMakeMemoryPersistent(ptr);
  return ptr;
}


x86 assembly (clang, -O0):
<__wrap_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <mxRealloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1155 <__wrap_realloc+0x35>
mov    -0x18(%rbp),%rdi
call   1030 <mexMakeMemoryPersistent@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wrap_realloc>:
push   %rbx
call   1040 <mxRealloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1136 <__wrap_realloc+0x16>
mov    %rbx,%rdi
call   1030 <mexMakeMemoryPersistent@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @__wrap_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i64 @mxRealloc(i8* %6, i64 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i8*, i8** %5
%14 = call i32 @mexMakeMemoryPersistent(i8* %13)
br label %15
15: ; preds = %12, %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @__wrap_realloc(i8* %0, i64 %1) {
%3 = tail call i64 @mxRealloc(i8* %0, i64 %1)
%4 = inttoptr i64 %3 to i8*
%5 = icmp eq i64 %3, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @mexMakeMemoryPersistent(i8* %4)
br label %8
8: ; preds = %6, %2
ret i8* %4
}
/* Variables and functions */
int getdtablesize();
int main(void) { return getdtablesize(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @getdtablesize()
ret i32 %1
}
/* Type definitions */
struct ibv_flow {
  int dummy;
};

/* Variables and functions */
int ibv_destroy_flow(struct ibv_flow *);
int mlx4_glue_destroy_flow(struct ibv_flow *flow_id) {
  return ibv_destroy_flow(flow_id);
}


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

x86 assembly (clang, -O2):
<mlx4_glue_destroy_flow>:
jmp    1030 <ibv_destroy_flow@plt>

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

LLVM IR (-O2):
%struct.ibv_flow = type { i32 }
define i32 @mlx4_glue_destroy_flow(%struct.ibv_flow* %0) {
%2 = tail call i32 @ibv_destroy_flow(%struct.ibv_flow* %0)
ret i32 %2
}