xunge/DecIR huggingface dataset:
/* Type definitions */
struct in_addr {
  int /*<<< orphan*/ s_addr;
};

/* Variables and functions */
int htonl(int /*<<< orphan*/);
int /*<<< orphan*/ inet_aton(char const *, struct in_addr *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  struct in_addr ia;
  inet_aton(argv[1], &ia);
  printf("0x%x\n", htonl(ia.s_addr));
  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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <inet_aton@plt>
mov    -0x18(%rbp),%edi
call   1040 <htonl@plt>
mov    %eax,%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
mov    %rsp,%rsi
call   1050 <inet_aton@plt>
mov    (%rsp),%edi
call   1040 <htonl@plt>
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
@.str = [6 x i8] c"0x%x\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.in_addr
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @inet_aton(i8* %9, %struct.in_addr* %6)
%11 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %6, i32 0, i32 0
%12 = load i32, i32* %11
%13 = call i32 @htonl(i32 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
@.str = [6 x i8] c"0x%x\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.in_addr
%4 = bitcast %struct.in_addr* %3 to i8*
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @inet_aton(i8* %6, %struct.in_addr* %3)
%8 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i64 0, i32 0
%9 = load i32, i32* %8
%10 = call i32 @htonl(i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memory_exhausted();
void *realloc(void *, size_t);
void *jv_mem_realloc(void *p, size_t sz) {
  p = realloc(p, sz);
  if (!p) {
    memory_exhausted();
  }
  return p;
}


x86 assembly (clang, -O0):
<jv_mem_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1153 <jv_mem_realloc+0x33>
mov    $0x0,%al
call   1030 <memory_exhausted@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jv_mem_realloc>:
push   %rbx
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <jv_mem_realloc+0x15>
xor    %eax,%eax
call   1030 <memory_exhausted@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @jv_mem_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @memory_exhausted()
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t __float_encoded_array_size(const float *p, uint32_t elements) {
  (void)p;
  return (4) * elements;
}


x86 assembly (clang, -O0):
<__float_encoded_array_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__float_encoded_array_size>:
lea    0x0(,%rsi,4),%eax
ret

LLVM IR (-O0):
define i32 @__float_encoded_array_size(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
store float* %0, float** %3
store i32 %1, i32* %4
%5 = load float*, float** %3
%6 = load i32, i32* %4
%7 = mul nsw i32 4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @__float_encoded_array_size(float* nocapture readnone %0, i32 %1) {
%3 = shl nsw i32 %1, 2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int setjmp(int /*<<< orphan*/);
int EX_setjmp(jmp_buf *env) { return setjmp(*env); }


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

x86 assembly (clang, -O2):
<EX_setjmp>:
push   %rax
mov    (%rdi),%edi
call   1030 <setjmp@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @EX_setjmp(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = call i32 @setjmp(i32 %2)
ret i32 %3
}
int rust_dir_get_mode(struct dirent *entry_ptr) { return -1; }


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

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

LLVM IR (-O0):
%struct.dirent = type opaque
define i32 @rust_dir_get_mode(%struct.dirent* %0) {
%2 = alloca %struct.dirent*
store %struct.dirent* %0, %struct.dirent** %2
ret i32 -1
}

LLVM IR (-O2):
%struct.dirent = type opaque
define i32 @rust_dir_get_mode(%struct.dirent* nocapture readnone %0) {
ret i32 -1
}
/* Type definitions */
struct iscsi_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct iscsi_node *);
void iscsi_node_free(struct iscsi_node *node) { free(node); }


x86 assembly (clang, -O0):
<iscsi_node_free>:
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):
<iscsi_node_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.iscsi_node = type { i32 }
define void @iscsi_node_free(%struct.iscsi_node* nocapture %0) {
%2 = tail call i32 @free(%struct.iscsi_node* %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int send_event;
};
struct TYPE_4__ {
  TYPE_1__ xkeymap;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xkeymap_send_event(void *_p, int _v) {
  ((XEvent *)_p)->xkeymap.send_event = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xkeymap_send_event>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XEvent_xkeymap_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
char *_(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int quick_usage(const char *path) {
  fprintf(stderr, _("Try \"%s -h\" for more information.\n"), path);
  return 2;
}


x86 assembly (clang, -O0):
<quick_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
lea    0xec1(%rip),%rdi
call   1040 <_@plt>
mov    -0xc(%rbp),%edi
mov    %rax,%rsi
mov    -0x8(%rbp),%rdx
call   1030 <fprintf@plt>
mov    $0x2,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quick_usage>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebp
lea    0xeca(%rip),%rdi
call   1040 <_@plt>
mov    %ebp,%edi
mov    %rax,%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x2,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Try \22%s -h\22 for more information.\0A\00"
define i32 @quick_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i8* @_(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 @fprintf(i32 %3, i8* %4, i8* %5)
ret i32 2
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Try \22%s -h\22 for more information.\0A\00"
define i32 @quick_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i8* @_(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @fprintf(i32 %2, i8* %3, i8* %0)
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int write(int, void *, int);
int i_write(int fd, void *msg, int len) {
  if (-1 == write(fd, msg, len)) {
    perror("i_write error");
    exit(0);
  }
  return (0);
}


x86 assembly (clang, -O0):
<i_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1173 <i_write+0x43>
lea    0xe99(%rip),%rdi
call   1040 <perror@plt>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_write>:
push   %rax
call   1030 <write@plt>
cmp    $0xffffffff,%eax
je     113f <i_write+0xf>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeba(%rip),%rdi
call   1040 <perror@plt>
xor    %edi,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"i_write error\00"
define i32 @i_write(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 0)
unreachable
9: ; preds = %3
ret i32 0
}
int test_imm_C6int8_mem(signed char *val) {
  return ((*val) & (-0xC6 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_C6int8_mem>:
movsbl (%rdi),%eax
test   $0xffffff3a,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C6int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -198
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
/* Variables and functions */
float sine_custom_io(float, float, float);
float sine_custom_f_io(float step, float max_steps, float max_val) {
  return sine_custom_io(step, max_steps, max_val);
}


x86 assembly (clang, -O0):
<sine_custom_f_io>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <sine_custom_io@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sine_custom_f_io>:
jmp    1030 <sine_custom_io@plt>

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

LLVM IR (-O2):
define float @sine_custom_f_io(float %0, float %1, float %2) {
%4 = tail call float @sine_custom_io(float %0, float %1, float %2)
ret float %4
}
/* Variables and functions */
int omp_get_thread_num();
int /*<<< orphan*/ work2(int);
void test2() {
  int i;
#pragma omp parallel private(i)
  {
    i = omp_get_thread_num();
    work2(i);
  }
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <work2@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test2() {
%1 = alloca i32
%2 = call i32 (...) @omp_get_thread_num()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @work2(i32 %3)
ret void
}

LLVM IR (-O2):
define void @test2() {
%1 = tail call i32 (...) @omp_get_thread_num()
%2 = tail call i32 @work2(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, float, long);
int fun(long int a, float b, char c) {
  printf("char: %c - float: %55.50f - int: %20ld\n", c, b, a);
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
movss  -0x14(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
lea    0xec6(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [40 x i8] c"char: %c - float: %55.50f - int: %20ld\0A\00"
define i32 @fun(i64 %0, float %1, i8 signext %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca float
%7 = alloca i8
store i64 %0, i64* %5
store float %1, float* %6
store i8 %2, i8* %7
%8 = load i8, i8* %7
%9 = load float, float* %6
%10 = load i64, i64* %5
%11 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8 signext %8, float %9, i64 %10)
%12 = load i32, i32* %4
ret i32 %12
}

LLVM IR (-O2):
@.str = [40 x i8] c"char: %c - float: %55.50f - int: %20ld\0A\00"
define i32 @fun(i64 %0, float %1, i8 signext %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8 signext %2, float %1, i64 %0)
ret i32 undef
}
/* Variables and functions */
int _isascii(int);
int isascii(int c) { return _isascii(c); }


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

x86 assembly (clang, -O2):
<isascii>:
jmp    1030 <_isascii@plt>

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

LLVM IR (-O2):
define i32 @isascii(i32 %0) {
%2 = tail call i32 @_isascii(i32 %0)
ret i32 %2
}
/* Variables and functions */
unsigned char VIM_HAPI_GetPictureSize(unsigned short *, unsigned short *);
unsigned char V5H_Tool_GetJpegSize(unsigned char *ptr, unsigned long length,
                                   unsigned short *SizeX,
                                   unsigned short *SizeY) {
  { return (VIM_HAPI_GetPictureSize(SizeX, SizeY)); }
}


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

x86 assembly (clang, -O2):
<V5H_Tool_GetJpegSize>:
mov    %rdx,%rdi
mov    %rcx,%rsi
jmp    1030 <VIM_HAPI_GetPictureSize@plt>

LLVM IR (-O0):
define zeroext i8 @V5H_Tool_GetJpegSize(i8* %0, i64 %1, i16* %2, i16* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i16*
%8 = alloca i16*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i16* %2, i16** %7
store i16* %3, i16** %8
%9 = load i16*, i16** %7
%10 = load i16*, i16** %8
%11 = call zeroext i8 @VIM_HAPI_GetPictureSize(i16* %9, i16* %10)
ret i8 %11
}

LLVM IR (-O2):
define zeroext i8 @V5H_Tool_GetJpegSize(i8* nocapture readnone %0, i64 %1, i16* %2, i16* %3) {
%5 = tail call zeroext i8 @VIM_HAPI_GetPictureSize(i16* %2, i16* %3)
ret i8 %5
}
/* Type definitions */
struct sigaction {
  int dummy;
};

/* Variables and functions */
int _NSIG;
int __rt_sigaction(int, struct sigaction const *, struct sigaction *, int,
                   int /*<<< orphan*/);
int __libc_sigaction(int signum, const struct sigaction *act,
                     struct sigaction *oldact) {
  return __rt_sigaction(signum, act, oldact, _NSIG / 8, 0);
}


x86 assembly (clang, -O0):
<__libc_sigaction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
xor    %r8d,%r8d
call   1030 <__rt_sigaction@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__libc_sigaction>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
lea    0x7(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
sar    $0x3,%ecx
xor    %r8d,%r8d
jmp    1030 <__rt_sigaction@plt>

LLVM IR (-O0):
%struct.sigaction = type { i32 }
@_NSIG = global i32 0
define i32 @__libc_sigaction(i32 %0, %struct.sigaction* %1, %struct.sigaction* %2) {
%4 = alloca i32
%5 = alloca %struct.sigaction*
%6 = alloca %struct.sigaction*
store i32 %0, i32* %4
store %struct.sigaction* %1, %struct.sigaction** %5
store %struct.sigaction* %2, %struct.sigaction** %6
%7 = load i32, i32* %4
%8 = load %struct.sigaction*, %struct.sigaction** %5
%9 = load %struct.sigaction*, %struct.sigaction** %6
%10 = load i32, i32* @_NSIG
%11 = sdiv i32 %10, 8
%12 = call i32 @__rt_sigaction(i32 %7, %struct.sigaction* %8, %struct.sigaction* %9, i32 %11, i32 0)
ret i32 %12
}

LLVM IR (-O2):
%struct.sigaction = type { i32 }
@_NSIG = global i32 0
define i32 @__libc_sigaction(i32 %0, %struct.sigaction* %1, %struct.sigaction* %2) {
%4 = load i32, i32* @_NSIG
%5 = sdiv i32 %4, 8
%6 = tail call i32 @__rt_sigaction(i32 %0, %struct.sigaction* %1, %struct.sigaction* %2, i32 %5, i32 0)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void showarr(int arr[], int n) {
  int i = 0;
  while (n--)
    printf("%d, ", arr[i++]);
  printf("\n");
}


x86 assembly (clang, -O0):
<showarr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1162 <showarr+0x52>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1126 <showarr+0x16>
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showarr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
je     1157 <showarr+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
add    $0x1,%rbx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    %ebx,%r12d
jne    1140 <showarr+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%d, \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @showarr(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %10, %2
%7 = load i32, i32* %4
%8 = add nsw i32 %7, -1
store i32 %8, i32* %4
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = add nsw i32 %12, 1
store i32 %13, i32* %5
%14 = sext i32 %12 to i64
%15 = getelementptr inbounds i32, i32* %11, i64 %14
%16 = load i32, i32* %15
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %6
18: ; preds = %6
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d, \00"
define void @showarr(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %8, %4 ], [ 0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = add nsw i32 %6, -1
%8 = add nuw nsw i64 %5, 1
%9 = getelementptr inbounds i32, i32* %0, i64 %5
%10 = load i32, i32* %9
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = icmp eq i32 %7, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
size_t hash_(const char *k) {
  size_t hash = 0;
  while (*k) {
    hash = hash * 101 + *k++;
  }
  return hash;
}


x86 assembly (clang, -O0):
<hash_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1141 <hash_+0x41>
imul   $0x65,-0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbq (%rcx),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <hash_+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_>:
mov    (%rdi),%cl
test   %cl,%cl
je     1127 <hash_+0x27>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
imul   $0x65,%rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @hash_(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i64 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = mul i64 %6, 101
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i64
%11 = add i64 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 0, %1 ], [ %11, %4 ]
ret i64 %15
}
void flush(queue) {}


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

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

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

LLVM IR (-O2):
define void @flush(i32 %0) {
ret void
}
/* Type definitions */
struct event_base {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ event_base_lookexit(struct event_base *,
                                       int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int);
void handle_sigint(int sig, short ev, void *arg) {
  struct event_base *base = arg;
  printf("Caught signal %d\n", sig);
  event_base_lookexit(base, NULL);
}


x86 assembly (clang, -O0):
<handle_sigint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <event_base_lookexit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_sigint>:
push   %rbx
mov    %rdx,%rbx
mov    %edi,%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1040 <event_base_lookexit@plt>

LLVM IR (-O0):
%struct.event_base = type { i32 }
@.str = [18 x i8] c"Caught signal %d\0A\00"
define void @handle_sigint(i32 %0, i16 signext %1, i8* %2) {
%4 = alloca i32
%5 = alloca i16
%6 = alloca i8*
%7 = alloca %struct.event_base*
store i32 %0, i32* %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to %struct.event_base*
store %struct.event_base* %9, %struct.event_base** %7
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load %struct.event_base*, %struct.event_base** %7
%13 = call i32 @event_base_lookexit(%struct.event_base* %12, i32* null)
ret void
}

LLVM IR (-O2):
%struct.event_base = type { i32 }
@.str = [18 x i8] c"Caught signal %d\0A\00"
define void @handle_sigint(i32 %0, i16 signext %1, i8* %2) {
%4 = bitcast i8* %2 to %struct.event_base*
%5 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = tail call i32 @event_base_lookexit(%struct.event_base* %4, i32* null)
ret void
}
void move16(void) {}


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

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

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

LLVM IR (-O2):
define void @move16() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void __attribute__((no)) quebec(int a) {
  printf("%d", a);
  return;
}


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

x86 assembly (clang, -O2):
<quebec>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @quebec(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int fscanf(int /*<<< orphan*/ *, char *, int *);
int /*<<< orphan*/ perror(char *);
int parsekey(char *keyfile) {
  FILE *pFile;
  pFile = fopen(keyfile, "r");
  if (pFile != NULL) {
    int i;
    return fscanf(pFile, "%d", &i);
  } else {
    perror("The following error has occurred");
  }
}


x86 assembly (clang, -O0):
<parsekey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1177 <parsekey+0x47>
mov    -0x18(%rbp),%rdi
lea    0xe9c(%rip),%rsi
lea    -0x1c(%rbp),%rdx
call   1030 <fscanf@plt>
mov    %eax,-0x4(%rbp)
jmp    1183 <parsekey+0x53>
lea    0xe87(%rip),%rdi
call   1050 <perror@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parsekey>:
push   %rax
lea    0xec8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1158 <parsekey+0x28>
lea    0xeb9(%rip),%rsi
lea    0x4(%rsp),%rdx
mov    %rax,%rdi
call   1030 <fscanf@plt>
pop    %rcx
ret
lea    0xea6(%rip),%rdi
call   1050 <perror@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [33 x i8] c"The following error has occurred\00"
define i32 @parsekey(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %4
%8 = load i32*, i32** %4
%9 = icmp ne i32* %8, null
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i32*, i32** %4
%12 = call i32 @fscanf(i32* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
store i32 %12, i32* %2
br label %15
13: ; preds = %1
%14 = call i32 @perror(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %10, %13
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [33 x i8] c"The following error has occurred\00"
define i32 @parsekey(i8* nocapture %0) {
%2 = alloca i32
%3 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = bitcast i32* %2 to i8*
%7 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
br label %10
8: ; preds = %1
%9 = tail call i32 @perror(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %7, %5 ], [ undef, %8 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ summe(int *, int *);
int main(void) {
  int n = 100;
  int s = 0;
  summe(&n, &s);
  printf("sum 1 to 100 = 5050, trick comp'd as: %d\n", s);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x64,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <summe@plt>
mov    (%rsp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"sum 1 to 100 = 5050, trick comp'd as: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 100, i32* %1
store i32 0, i32* %2
%3 = call i32 @summe(i32* %1, i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [42 x i8] c"sum 1 to 100 = 5050, trick comp'd as: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 100, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = call i32 @summe(i32* %1, i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dlaset_(char *, int *, int *, double *, double *, double *,
                           int *);
void aa_cla_dlaset(char UPLO, int M, int N, double ALPHA, double BETA,
                   double *A, int LDA) {
  dlaset_(&UPLO, &M, &N, &ALPHA, &BETA, A, &LDA);
}


x86 assembly (clang, -O0):
<aa_cla_dlaset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    -0x28(%rbp),%r9
lea    -0x1(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x18(%rbp),%rcx
lea    -0x20(%rbp),%r8
lea    -0x2c(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <dlaset_@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_cla_dlaset>:
sub    $0x28,%rsp
mov    %rcx,%r9
mov    %dil,0xb(%rsp)
mov    %esi,0x14(%rsp)
mov    %edx,0x10(%rsp)
movsd  %xmm0,0x20(%rsp)
movsd  %xmm1,0x18(%rsp)
mov    %r8d,0xc(%rsp)
lea    0xc(%rsp),%rax
mov    %rax,(%rsp)
lea    0xb(%rsp),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x20(%rsp),%rcx
lea    0x18(%rsp),%r8
call   1030 <dlaset_@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define void @aa_cla_dlaset(i8 signext %0, i32 %1, i32 %2, double %3, double %4, double* %5, i32 %6) {
%8 = alloca i8
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca double*
%14 = alloca i32
store i8 %0, i8* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store double %3, double* %11
store double %4, double* %12
store double* %5, double** %13
store i32 %6, i32* %14
%15 = load double*, double** %13
%16 = call i32 @dlaset_(i8* %8, i32* %9, i32* %10, double* %11, double* %12, double* %15, i32* %14)
ret void
}

LLVM IR (-O2):
define void @aa_cla_dlaset(i8 signext %0, i32 %1, i32 %2, double %3, double %4, double* %5, i32 %6) {
%8 = alloca i8
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca i32
store i8 %0, i8* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store double %3, double* %11
store double %4, double* %12
store i32 %6, i32* %13
%14 = call i32 @dlaset_(i8* %8, i32* %9, i32* %10, double* %11, double* %12, double* %5, i32* %13)
ret void
}
void IN_NULL_StopJoy(int joystick) {}


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

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

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

LLVM IR (-O2):
define void @IN_NULL_StopJoy(i32 %0) {
ret void
}
/* Variables and functions */
char *_resposta_padrao(int, int, char *);
char *ConsultarNumeroSessao(int sessao, char *codigo_ativacao,
                            int numero_sessao) {
  return _resposta_padrao(sessao, 11003, "Sess\xc3\xa3o n\xc3\xa3o existe");
}


x86 assembly (clang, -O0):
<ConsultarNumeroSessao>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2afb,%esi
lea    0xecf(%rip),%rdx
call   1030 <_resposta_padrao@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConsultarNumeroSessao>:
lea    0xee9(%rip),%rdx
mov    $0x2afb,%esi
jmp    1030 <_resposta_padrao@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Sess\C3\A3o n\C3\A3o existe\00"
define i8* @ConsultarNumeroSessao(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = call i8* @_resposta_padrao(i32 %7, i32 11003, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}

LLVM IR (-O2):
@.str = [20 x i8] c"Sess\C3\A3o n\C3\A3o existe\00"
define i8* @ConsultarNumeroSessao(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i8* @_resposta_padrao(i32 %0, i32 11003, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}
long long mul(long long a, long long b) {
  long long ans = a * b;
  return ans;
}


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

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

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

LLVM IR (-O2):
define i64 @mul(i64 %0, i64 %1) {
%3 = mul nsw i64 %1, %0
ret i64 %3
}
void foo_1_2_2_2_2_2_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_2_2_2_1_2_2() {
ret void
}
void I422ToYUY2Row_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @I422ToYUY2Row_Any_AVX2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ m68ki_jump(int /*<<< orphan*/);
int /*<<< orphan*/ m68ki_pull_32();
void m68k_op_rts_32(void) {
  ;
  m68ki_jump(m68ki_pull_32());
}


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

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

LLVM IR (-O0):
define void @m68k_op_rts_32() {
%1 = call i32 (...) @m68ki_pull_32()
%2 = call i32 @m68ki_jump(i32 %1)
ret void
}

LLVM IR (-O2):
define void @m68k_op_rts_32() {
%1 = tail call i32 (...) @m68ki_pull_32()
%2 = tail call i32 @m68ki_jump(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ s2rectxz(float, float, float, float, float);
void s2rectxz_(float *xmin, float *xmax, float *zmin, float *zmax, float *y) {
  s2rectxz(*xmin, *xmax, *zmin, *zmax, *y);
}


x86 assembly (clang, -O0):
<s2rectxz_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm3
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm4
call   1030 <s2rectxz@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2rectxz_>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
movss  (%rdx),%xmm2
movss  (%rcx),%xmm3
movss  (%r8),%xmm4
jmp    1030 <s2rectxz@plt>

LLVM IR (-O0):
define void @s2rectxz_(float* %0, float* %1, float* %2, float* %3, float* %4) {
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
store float* %0, float** %6
store float* %1, float** %7
store float* %2, float** %8
store float* %3, float** %9
store float* %4, float** %10
%11 = load float*, float** %6
%12 = load float, float* %11
%13 = load float*, float** %7
%14 = load float, float* %13
%15 = load float*, float** %8
%16 = load float, float* %15
%17 = load float*, float** %9
%18 = load float, float* %17
%19 = load float*, float** %10
%20 = load float, float* %19
%21 = call i32 @s2rectxz(float %12, float %14, float %16, float %18, float %20)
ret void
}

LLVM IR (-O2):
define void @s2rectxz_(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* nocapture %3, float* nocapture %4) {
%6 = load float, float* %0
%7 = load float, float* %1
%8 = load float, float* %2
%9 = load float, float* %3
%10 = load float, float* %4
%11 = tail call i32 @s2rectxz(float %6, float %7, float %8, float %9, float %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ THAtomicCompareAndSwapLong(long volatile *, long, long);
long THAtomicAddLong(long volatile *a, long value) {
  long oldvalue;
  do {
    oldvalue = *a;
  } while (!THAtomicCompareAndSwapLong(a, oldvalue, (oldvalue + value)));
  return oldvalue;
}


x86 assembly (clang, -O0):
<THAtomicAddLong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x18(%rbp),%rdx
add    -0x10(%rbp),%rdx
call   1030 <THAtomicCompareAndSwapLong@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1120 <THAtomicAddLong+0x10>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<THAtomicAddLong>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
nopl   0x0(%rax,%rax,1)
mov    (%r15),%rbx
lea    (%rbx,%r14,1),%rdx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <THAtomicCompareAndSwapLong@plt>
test   %eax,%eax
je     1120 <THAtomicAddLong+0x10>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i64 @THAtomicAddLong(i64* %0, i64 %1) {
br label %3
3: ; preds = %3, %2
%4 = load volatile i64, i64* %0
%5 = add nsw i64 %4, %1
%6 = tail call i32 @THAtomicCompareAndSwapLong(i64* %0, i64 %4, i64 %5)
%7 = icmp eq i32 %6, 0
br i1 %7, label %3, label %8
8: ; preds = %3
ret i64 %4
}
void ml_assert_handler(char *msg, char *file, int line, const char *func) {}


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

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

LLVM IR (-O0):
define void @ml_assert_handler(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
ret void
}

LLVM IR (-O2):
define void @ml_assert_handler(i8* nocapture %0, i8* nocapture %1, i32 %2, i8* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void x_cgo_sys_thread_create(void *(*func)(void *), void *arg) {
  fprintf(stderr, "x_cgo_sys_thread_create not implemented");
  abort();
}


x86 assembly (clang, -O0):
<x_cgo_sys_thread_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<x_cgo_sys_thread_create>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"x_cgo_sys_thread_create not implemented\00"
define void @x_cgo_sys_thread_create(i8* (i8*)* %0, i8* %1) {
%3 = alloca i8* (i8*)*
%4 = alloca i8*
store i8* (i8*)* %0, i8* (i8*)** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"x_cgo_sys_thread_create not implemented\00"
define void @x_cgo_sys_thread_create(i8* (i8*)* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ ispunct(int);
void t_ispunct_0x7d() {
  Assert_real((ispunct(125)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              630, ("ispunct should be 1 for }"));
}


x86 assembly (clang, -O0):
<t_ispunct_0x7d>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7d,%edi
call   1030 <ispunct@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x276,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0x7d>:
push   %rax
mov    $0x7d,%edi
call   1030 <ispunct@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x276,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for }\00"
define void @t_ispunct_0x7d() {
%1 = call i32 @ispunct(i32 125)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 630, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for }\00"
define void @t_ispunct_0x7d() {
%1 = tail call i32 @ispunct(i32 125)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 630, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen_call(char *);
int /*<<< orphan*/ gen_pop();
void gen_and(void) {
  gen_pop();
  gen_call("ccand");
}


x86 assembly (clang, -O0):
<gen_and>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <gen_pop@plt>
lea    0xece(%rip),%rdi
call   1040 <gen_call@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_and>:
push   %rax
xor    %eax,%eax
call   1030 <gen_pop@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <gen_call@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"ccand\00"
define void @gen_and() {
%1 = call i32 (...) @gen_pop()
%2 = call i32 @gen_call(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"ccand\00"
define void @gen_and() {
%1 = tail call i32 (...) @gen_pop()
%2 = tail call i32 @gen_call(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}