xunge/DecIR huggingface dataset:
/* Variables and functions */
int _sys_open(char *, int, int);
int open(char *file, int mode, int perms) {
  return _sys_open(file, mode, perms);
}


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

x86 assembly (clang, -O2):
<open>:
jmp    1030 <_sys_open@plt>

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

LLVM IR (-O2):
define i32 @open(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @_sys_open(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
void ff_hevc_put_hevc_bi_w_qpel_h16_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_h16_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void x6() { printf(" x6-1"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c" x6-1\00"
define void @x6() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double myatof(char *);
int /*<<< orphan*/ printf(char *, double);
int main() {
  char *s = "-1213.223e-3";
  printf("%f\n", myatof(s));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"-1213.223e-3\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call double @myatof(i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"-1213.223e-3\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call double @myatof(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %1)
ret i32 0
}
/* Variables and functions */
unsigned int __blsmsk_u32(unsigned int);
unsigned int func_blsmsk32(unsigned int X) { return __blsmsk_u32(X); }


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

x86 assembly (clang, -O2):
<func_blsmsk32>:
jmp    1030 <__blsmsk_u32@plt>

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

LLVM IR (-O2):
define i32 @func_blsmsk32(i32 %0) {
%2 = tail call i32 @__blsmsk_u32(i32 %0)
ret i32 %2
}
/* Type definitions */
struct stream {
  int dummy;
};

/* Variables and functions */
int decode_address_context(unsigned char const *, struct stream *);
int decode_address_context_64bit_is1(const unsigned char *pkt,
                                     struct stream *stream) {
  return decode_address_context(pkt, stream);
}


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

x86 assembly (clang, -O2):
<decode_address_context_64bit_is1>:
jmp    1030 <decode_address_context@plt>

LLVM IR (-O0):
%struct.stream = type { i32 }
define i32 @decode_address_context_64bit_is1(i8* %0, %struct.stream* %1) {
%3 = alloca i8*
%4 = alloca %struct.stream*
store i8* %0, i8** %3
store %struct.stream* %1, %struct.stream** %4
%5 = load i8*, i8** %3
%6 = load %struct.stream*, %struct.stream** %4
%7 = call i32 @decode_address_context(i8* %5, %struct.stream* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stream = type { i32 }
define i32 @decode_address_context_64bit_is1(i8* %0, %struct.stream* %1) {
%3 = tail call i32 @decode_address_context(i8* %0, %struct.stream* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
void print_array(int *v, int n) {
  for (int i = 0; i < n; ++i) {
    printf("%d ", v[i]);
  }
  puts("");
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1167 <print_array+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <print_array+0x16>
lea    0xe95(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [1 x i8] zeroinitializer
define void @print_array(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 = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Variables and functions */
int /*<<< orphan*/ free5(void *****);
void free5uchar(unsigned char *****p) { free5((void *****)p); }


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

x86 assembly (clang, -O2):
<free5uchar>:
jmp    1030 <free5@plt>

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

LLVM IR (-O2):
define void @free5uchar(i8***** %0) {
%2 = tail call i32 @free5(i8***** %0)
ret void
}
int test_imm_19uint32_reg(unsigned int val) {
  return ((val) & (0x19 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_19uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x19,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_19uint32_reg>:
test   $0x19,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_19uint32_reg(i32 %0) {
%2 = and i32 %0, 25
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void TxColor(int N) { printf("\033[38;5;%dm", N); }


x86 assembly (clang, -O0):
<TxColor>:
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):
<TxColor>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[38;5;%dm\00"
define void @TxColor(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
struct mosquitto {
  int dummy;
};

/* Variables and functions */
int _mosquitto_send_simple_command(struct mosquitto *, int);
int /*<<< orphan*/ assert(struct mosquitto *);
int _mosquitto_send_disconnect(struct mosquitto *mosq) {
  assert(mosq);
  return _mosquitto_send_simple_command(mosq, 0xE0);
}


x86 assembly (clang, -O0):
<_mosquitto_send_disconnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    $0xe0,%esi
call   1040 <_mosquitto_send_simple_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mosquitto_send_disconnect>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    %rbx,%rdi
mov    $0xe0,%esi
pop    %rbx
jmp    1040 <_mosquitto_send_simple_command@plt>

LLVM IR (-O0):
%struct.mosquitto = type { i32 }
define i32 @_mosquitto_send_disconnect(%struct.mosquitto* %0) {
%2 = alloca %struct.mosquitto*
store %struct.mosquitto* %0, %struct.mosquitto** %2
%3 = load %struct.mosquitto*, %struct.mosquitto** %2
%4 = call i32 @assert(%struct.mosquitto* %3)
%5 = load %struct.mosquitto*, %struct.mosquitto** %2
%6 = call i32 @_mosquitto_send_simple_command(%struct.mosquitto* %5, i32 224)
ret i32 %6
}

LLVM IR (-O2):
%struct.mosquitto = type { i32 }
define i32 @_mosquitto_send_disconnect(%struct.mosquitto* %0) {
%2 = tail call i32 @assert(%struct.mosquitto* %0)
%3 = tail call i32 @_mosquitto_send_simple_command(%struct.mosquitto* %0, i32 224)
ret i32 %3
}
/* Type definitions */
struct t_item {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ w_type(struct t_item *);
char const *wt_get_name(int /*<<< orphan*/);
const char *get_weapon_name(struct t_item *w) { return wt_get_name(w_type(w)); }


x86 assembly (clang, -O0):
<get_weapon_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <w_type@plt>
mov    %eax,%edi
call   1040 <wt_get_name@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.t_item = type { i32 }
define i8* @get_weapon_name(%struct.t_item* %0) {
%2 = alloca %struct.t_item*
store %struct.t_item* %0, %struct.t_item** %2
%3 = load %struct.t_item*, %struct.t_item** %2
%4 = call i32 @w_type(%struct.t_item* %3)
%5 = call i8* @wt_get_name(i32 %4)
ret i8* %5
}

LLVM IR (-O2):
%struct.t_item = type { i32 }
define i8* @get_weapon_name(%struct.t_item* %0) {
%2 = tail call i32 @w_type(%struct.t_item* %0)
%3 = tail call i8* @wt_get_name(i32 %2)
ret i8* %3
}
void cprop_test2(int *data) {
  int j = 1;
  int k = 2;
  int m = 4;
  int n = k * m;
  j = n + j;
  data[0] = j;
}


x86 assembly (clang, -O0):
<cprop_test2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cprop_test2>:
movl   $0x9,(%rdi)
ret

LLVM IR (-O0):
define void @cprop_test2(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %2
store i32 1, i32* %3
store i32 2, i32* %4
store i32 4, i32* %5
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = mul nsw i32 %7, %8
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = load i32*, i32** %2
%15 = getelementptr inbounds i32, i32* %14, i64 0
store i32 %13, i32* %15
ret void
}

LLVM IR (-O2):
define void @cprop_test2(i32* nocapture writeonly %0) {
store i32 9, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ merge(int *, int, int, int);
void merge_sort(int *A, int first, int last) {
  int middle = (first + last) / 2;
  if (first < last) {
    merge_sort(A, first, middle);
    merge_sort(A, middle + 1, last);
    merge(A, first, middle, last);
  }
}


x86 assembly (clang, -O0):
<merge_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1182 <merge_sort+0x62>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1040 <merge_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <merge_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <merge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort>:
cmp    %edx,%esi
jge    1172 <merge_sort+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1040 <merge_sort@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1040 <merge_sort@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <merge@plt>
ret

LLVM IR (-O0):
define void @merge_sort(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = add nsw i32 %8, %9
%11 = sdiv i32 %10, 2
store i32 %11, i32* %7
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %28
15: ; preds = %3
%16 = load i32*, i32** %4
%17 = load i32, i32* %5
%18 = load i32, i32* %7
%19 = load i32*, i32** %4
%20 = load i32, i32* %7
%21 = add nsw i32 %20, 1
%22 = load i32, i32* %6
%23 = load i32*, i32** %4
%24 = load i32, i32* %5
%25 = load i32, i32* %7
%26 = load i32, i32* %6
%27 = call i32 @merge(i32* %23, i32 %24, i32 %25, i32 %26)
br label %28
28: ; preds = %15, %3
ret void
}

LLVM IR (-O2):
define void @merge_sort(i32* %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, %1
%5 = sdiv i32 %4, 2
%6 = icmp slt i32 %1, %2
br i1 %6, label %8, label %7
7: ; preds = %3, %8
ret void
8: ; preds = %3
tail call void @merge_sort(i32* %0, i32 %1, i32 %5)
%9 = add nsw i32 %5, 1
tail call void @merge_sort(i32* %0, i32 %9, i32 %2)
%10 = tail call i32 @merge(i32* %0, i32 %1, i32 %5, i32 %2)
br label %7
}
void mem_write32(int val, unsigned char *p) {
  *(p + 0) = (val >> 0) & 0xFF;
  *(p + 1) = (val >> 8) & 0xFF;
  *(p + 2) = (val >> 16) & 0xFF;
  *(p + 3) = (val >> 24) & 0xFF;
}


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

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

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

LLVM IR (-O2):
define void @mem_write32(i32 %0, i8* nocapture writeonly %1) {
%3 = trunc i32 %0 to i8
store i8 %3, i8* %1
%4 = lshr i32 %0, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %0, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %8, i8* %9
%10 = lshr i32 %0, 24
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
ret void
}
void ABGRToNV21() {}


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

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

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

LLVM IR (-O2):
define void @ABGRToNV21() {
ret void
}
void __arch_pause(void) { __asm__("  nop;" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @__arch_pause() {
tail call void asm sideeffect " nop;", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int __fcat__();
int main(int argc, char *argv[]) { return (__fcat__()); }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @__fcat__()
ret i32 %3
}
void NOROM_RFCCpePatchReset(void) {}


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

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

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

LLVM IR (-O2):
define void @NOROM_RFCCpePatchReset() {
ret void
}
/* Variables and functions */
float acosf(float);
float HMM_ACosF(float Radians) {
  float Result = acosf(Radians);
  return (Result);
}


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

x86 assembly (clang, -O2):
<HMM_ACosF>:
jmp    1030 <acosf@plt>

LLVM IR (-O0):
define float @HMM_ACosF(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = call float @acosf(float %4)
store float %5, float* %3
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
define float @HMM_ACosF(float %0) {
%2 = tail call float @acosf(float %0)
ret float %2
}
void packetio_tx_queryresp() {}


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

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

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

LLVM IR (-O2):
define void @packetio_tx_queryresp() {
ret void
}
/* Type definitions */
typedef int __u16;

/* Variables and functions */
int cec_has_specific(__u16 log_addr_mask) { return log_addr_mask & (1 << 14); }


x86 assembly (clang, -O0):
<cec_has_specific>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x4000,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cec_has_specific>:
mov    %edi,%eax
and    $0x4000,%eax
ret

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

LLVM IR (-O2):
define i32 @cec_has_specific(i32 %0) {
%2 = and i32 %0, 16384
ret i32 %2
}
void buslogic_log(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @buslogic_log(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hoc_pushx(int);
int /*<<< orphan*/ hoc_ret();
hoc_plotx() {
  hoc_ret();
  hoc_pushx(0.);
}


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

x86 assembly (clang, -O2):
<hoc_plotx>:
push   %rax
xor    %eax,%eax
call   1030 <hoc_ret@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <hoc_pushx@plt>

LLVM IR (-O0):
define i32 @hoc_plotx() {
%1 = alloca i32
%2 = call i32 (...) @hoc_ret()
%3 = call i32 @hoc_pushx(i32 0)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @hoc_plotx() {
%1 = tail call i32 (...) @hoc_ret()
%2 = tail call i32 @hoc_pushx(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
void *calloc(size_t, int);
int /*<<< orphan*/ err(int /*<<< orphan*/, char *, size_t);
void *scalloc(size_t size) {
  void *result = calloc(size, 1);
  if (result == NULL)
    err(EXIT_FAILURE, "calloc(%zd)", size);
  return result;
}


x86 assembly (clang, -O0):
<scalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1162 <scalloc+0x42>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea3(%rip),%rsi
call   1040 <err@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1151 <scalloc+0x31>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xeb7(%rip),%rsi
mov    %r14,%rdx
call   1040 <err@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [12 x i8] c"calloc(%zd)\00"
define i8* @scalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @calloc(i64 %4, i32 1)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @EXIT_FAILURE
%10 = load i64, i64* %2
%11 = call i32 @err(i32 %9, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %10)
br label %12
12: ; preds = %8, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str = [12 x i8] c"calloc(%zd)\00"
define i8* @scalloc(i64 %0) {
%2 = tail call i8* @calloc(i64 %0, i32 1)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @err(i32 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %7
7: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int NI_USUAL_PFI_SELECT(unsigned int);
unsigned NI_AO_SCAN_BEGIN_SRC_PFI(unsigned pfi_channel) {
  return NI_USUAL_PFI_SELECT(pfi_channel);
}


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

x86 assembly (clang, -O2):
<NI_AO_SCAN_BEGIN_SRC_PFI>:
jmp    1030 <NI_USUAL_PFI_SELECT@plt>

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

LLVM IR (-O2):
define i32 @NI_AO_SCAN_BEGIN_SRC_PFI(i32 %0) {
%2 = tail call i32 @NI_USUAL_PFI_SELECT(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *swirjson_szSerialize(char *, char *, unsigned long);
char *swirjson_nSerialize(char *szKey, int nValue, unsigned long ulTimestamp) {
  char szValue[16];
  sprintf(szValue, "%d", nValue);
  return swirjson_szSerialize(szKey, szValue, ulTimestamp);
}


x86 assembly (clang, -O0):
<swirjson_nSerialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xebf(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <swirjson_szSerialize@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swirjson_nSerialize>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %esi,%edx
mov    %rdi,%rbx
lea    0xec8(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <swirjson_szSerialize@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @swirjson_nSerialize(i8* %0, i32 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64
%7 = alloca [16 x i8]
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%8 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%9 = load i32, i32* %5
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i8*, i8** %4
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%13 = load i64, i64* %6
%14 = call i8* @swirjson_szSerialize(i8* %11, i8* %12, i64 %13)
ret i8* %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @swirjson_nSerialize(i8* %0, i32 %1, i64 %2) {
%4 = alloca [16 x i8]
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%7 = call i8* @swirjson_szSerialize(i8* %0, i8* %5, i64 %2)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ ConvertCharToStringStack(char *, char);
int IndexOf2_internal(char *, char *, int const, char const, char const);
int IndexOfChar2_internal(char *input, char target, const int count,
                          const char openSymbolWithin,
                          const char closeSymbolWithin) {
  char target2[2];
  ConvertCharToStringStack(target2, target);
  int output = IndexOf2_internal(input, target2, count, openSymbolWithin,
                                 closeSymbolWithin);
  return output;
}


x86 assembly (clang, -O0):
<IndexOfChar2_internal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %r8b,%al
mov    %rdi,-0x8(%rbp)
mov    %sil,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    %cl,-0x11(%rbp)
mov    %al,-0x12(%rbp)
lea    -0x14(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <ConvertCharToStringStack@plt>
mov    -0x8(%rbp),%rdi
lea    -0x14(%rbp),%rsi
mov    -0x10(%rbp),%edx
mov    -0x11(%rbp),%al
movsbl %al,%ecx
movsbl -0x12(%rbp),%r8d
call   1040 <IndexOf2_internal@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IndexOfChar2_internal>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%ebx
mov    %rdi,%rbp
lea    0xe(%rsp),%r12
mov    %r12,%rdi
call   1030 <ConvertCharToStringStack@plt>
mov    %rbp,%rdi
mov    %r12,%rsi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <IndexOf2_internal@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @IndexOfChar2_internal(i8* %0, i8 signext %1, i32 %2, i8 signext %3, i8 signext %4) {
%6 = alloca i8*
%7 = alloca i8
%8 = alloca i32
%9 = alloca i8
%10 = alloca i8
%11 = alloca [2 x i8]
%12 = alloca i32
store i8* %0, i8** %6
store i8 %1, i8* %7
store i32 %2, i32* %8
store i8 %3, i8* %9
store i8 %4, i8* %10
%13 = getelementptr inbounds [2 x i8], [2 x i8]* %11, i64 0, i64 0
%14 = load i8, i8* %7
%15 = call i32 @ConvertCharToStringStack(i8* %13, i8 signext %14)
%16 = load i8*, i8** %6
%17 = getelementptr inbounds [2 x i8], [2 x i8]* %11, i64 0, i64 0
%18 = load i32, i32* %8
%19 = load i8, i8* %9
%20 = load i8, i8* %10
%21 = call i32 @IndexOf2_internal(i8* %16, i8* %17, i32 %18, i8 signext %19, i8 signext %20)
store i32 %21, i32* %12
%22 = load i32, i32* %12
ret i32 %22
}

LLVM IR (-O2):
define i32 @IndexOfChar2_internal(i8* %0, i8 signext %1, i32 %2, i8 signext %3, i8 signext %4) {
%6 = alloca [2 x i8]
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
%8 = call i32 @ConvertCharToStringStack(i8* %7, i8 signext %1)
%9 = call i32 @IndexOf2_internal(i8* %0, i8* %7, i32 %2, i8 signext %3, i8 signext %4)
ret i32 %9
}
/* Variables and functions */
scalar_t__ Char_3d_array(int, int, int);
float ***Float_3d_array(int i_size, int j_size, int k_size) {
  return ((float ***)Char_3d_array(i_size, j_size, k_size * sizeof(float)));
}


x86 assembly (clang, -O0):
<Float_3d_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <Char_3d_array@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Float_3d_array>:
shl    $0x2,%edx
jmp    1030 <Char_3d_array@plt>

LLVM IR (-O0):
define float*** @Float_3d_array(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i64 @Char_3d_array(i32 %7, i32 %8, i32 %12)
%14 = inttoptr i64 %13 to float***
ret float*** %14
}

LLVM IR (-O2):
define float*** @Float_3d_array(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %2, 2
%5 = tail call i64 @Char_3d_array(i32 %0, i32 %1, i32 %4)
%6 = inttoptr i64 %5 to float***
ret float*** %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void amaret_local_Mcu_reset__E() { printf("Mcu.reset\n"); }


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"Mcu.reset\00"
define void @amaret_local_Mcu_reset__E() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_stream_si128(void *, int /*<<< orphan*/);
void test_stream_si128(__m128i x, void *y) { _mm_stream_si128(y, x); }


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

x86 assembly (clang, -O2):
<test_stream_si128>:
mov    %edi,%eax
mov    %rsi,%rdi
mov    %eax,%esi
jmp    1030 <_mm_stream_si128@plt>

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

LLVM IR (-O2):
define void @test_stream_si128(i32 %0, i8* %1) {
%3 = tail call i32 @_mm_stream_si128(i8* %1, i32 %0)
ret void
}
/* Variables and functions */
int getchar();
int getN() {
  int c;
  int total = 0;
  while ('0' <= (c = getchar()) && c <= '9') {
    total = (total * 10) + (c - '0');
  }
  return total;
}


x86 assembly (clang, -O0):
<getN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,%edx
mov    %edx,-0x4(%rbp)
xor    %eax,%eax
mov    $0x30,%ecx
cmp    %edx,%ecx
mov    %al,-0x9(%rbp)
jg     1147 <getN+0x37>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1157 <getN+0x47>
jmp    116b <getN+0x5b>
imul   $0xa,-0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <getN+0xf>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getN>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <getchar@plt>
add    $0xffffffd0,%eax
cmp    $0x9,%eax
ja     1145 <getN+0x35>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    (%rbx,%rbx,4),%ecx
lea    (%rax,%rcx,2),%ebx
xor    %eax,%eax
call   1030 <getchar@plt>
add    $0xffffffd0,%eax
cmp    $0xa,%eax
jb     1130 <getN+0x20>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getN() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %11, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %1
%5 = icmp sle i32 48, %4
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %1
%8 = icmp sle i32 %7, 57
br label %9
9: ; preds = %6, %3
%10 = phi i1 [ false, %3 ], [ %8, %6 ]
br i1 %10, label %11, label %17
11: ; preds = %9
%12 = load i32, i32* %2
%13 = mul nsw i32 %12, 10
%14 = load i32, i32* %1
%15 = sub nsw i32 %14, 48
%16 = add nsw i32 %13, %15
store i32 %16, i32* %2
br label %3
17: ; preds = %9
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @getN() {
%1 = tail call i32 (...) @getchar()
%2 = add i32 %1, -48
%3 = icmp ult i32 %2, 10
br i1 %3, label %4, label %12
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ %2, %0 ]
%6 = phi i32 [ %8, %4 ], [ 0, %0 ]
%7 = mul nsw i32 %6, 10
%8 = add nsw i32 %5, %7
%9 = tail call i32 (...) @getchar()
%10 = add i32 %9, -48
%11 = icmp ult i32 %10, 10
br i1 %11, label %4, label %12
12: ; preds = %4, %0
%13 = phi i32 [ 0, %0 ], [ %8, %4 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ tres_mem_arch_init();
void tres_mem_init(void) { tres_mem_arch_init(); }


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

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

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

LLVM IR (-O2):
define void @tres_mem_init() {
%1 = tail call i32 (...) @tres_mem_arch_init()
ret void
}
void printversion(void) {
  ;
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @printversion() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_slli_pi16(int /*<<< orphan*/, int);
__m64 test_mm_slli_pi16(__m64 a) { return _mm_slli_pi16(a, 3); }


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

x86 assembly (clang, -O2):
<test_mm_slli_pi16>:
mov    $0x3,%esi
jmp    1030 <_mm_slli_pi16@plt>

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

LLVM IR (-O2):
define i32 @test_mm_slli_pi16(i32 %0) {
%2 = tail call i32 @_mm_slli_pi16(i32 %0, i32 3)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x2b() {
  Assert_real((isupper(43) == 0),
              "/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_isupper.c",
              220, ("isupper should be 0 for +"));
}


x86 assembly (clang, -O0):
<t_isupper_0x2b>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2b,%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0xdc,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0x2b>:
push   %rax
mov    $0x2b,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xdc,%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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for +\00"
define void @t_isupper_0x2b() {
%1 = call i64 @isupper(i32 43)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 220, 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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for +\00"
define void @t_isupper_0x2b() {
%1 = tail call i64 @isupper(i32 43)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 220, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void g_string_set_size() {}


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

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

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

LLVM IR (-O2):
define void @g_string_set_size() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ move(int, scalar_t__);
int /*<<< orphan*/ printw(char *);
void printbottombettingbox() {
  move(17, (0 + 31));
  printw("|x = toggle information box      ");
  move(17 + 1, (0 + 31));
  printw("|i = list playing instructions   ");
  move(17 + 2, (0 + 31));
  printw("*--------------------------------");
}


x86 assembly (clang, -O0):
<printbottombettingbox>:
push   %rbp
mov    %rsp,%rbp
mov    $0x11,%edi
mov    $0x1f,%esi
call   1040 <move@plt>
lea    0xec6(%rip),%rdi
call   1030 <printw@plt>
mov    $0x12,%edi
mov    $0x1f,%esi
call   1040 <move@plt>
lea    0xecd(%rip),%rdi
call   1030 <printw@plt>
mov    $0x13,%edi
mov    $0x1f,%esi
call   1040 <move@plt>
lea    0xed4(%rip),%rdi
call   1030 <printw@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printbottombettingbox>:
push   %rax
mov    $0x1f,%esi
mov    $0x11,%edi
call   1040 <move@plt>
lea    0xec9(%rip),%rdi
call   1030 <printw@plt>
mov    $0x1f,%esi
mov    $0x12,%edi
call   1040 <move@plt>
lea    0xed0(%rip),%rdi
call   1030 <printw@plt>
mov    $0x1f,%esi
mov    $0x13,%edi
call   1040 <move@plt>
lea    0xed7(%rip),%rdi
pop    %rax
jmp    1030 <printw@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"|x = toggle information box \00"
@.str.1 = [34 x i8] c"|i = list playing instructions \00"
@.str.2 = [34 x i8] c"*--------------------------------\00"
define void @printbottombettingbox() {
%1 = call i32 @move(i32 17, i64 31)
%2 = call i32 @printw(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @move(i32 18, i64 31)
%4 = call i32 @printw(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @move(i32 19, i64 31)
%6 = call i32 @printw(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"|x = toggle information box \00"
@.str.1 = [34 x i8] c"|i = list playing instructions \00"
@.str.2 = [34 x i8] c"*--------------------------------\00"
define void @printbottombettingbox() {
%1 = tail call i32 @move(i32 17, i64 31)
%2 = tail call i32 @printw(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @move(i32 18, i64 31)
%4 = tail call i32 @printw(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @move(i32 19, i64 31)
%6 = tail call i32 @printw(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int rem_handler(char **save) {
  (void)save;
  return 3;
}


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

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

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

LLVM IR (-O2):
define i32 @rem_handler(i8** nocapture readnone %0) {
ret i32 3
}
foobar(a, b) {
  int c;
  c = a % b;
  a = a / b;
  return a + b;
}


x86 assembly (clang, -O0):
<foobar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foobar(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = srem i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sdiv i32 %9, %10
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = add nsw i32 %12, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @foobar(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
%4 = add nsw i32 %3, %1
ret i32 %4
}
int _muldivr(int a, int b, int c) {
  return ((unsigned long long)a * (unsigned long long)b + (c >> 1)) / c;
}


x86 assembly (clang, -O0):
<_muldivr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movslq -0x4(%rbp),%rax
movslq -0x8(%rbp),%rcx
imul   %rcx,%rax
mov    -0xc(%rbp),%ecx
sar    $0x1,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
xor    %edx,%edx
div    %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<_muldivr>:
mov    %edx,%ecx
movslq %edi,%rax
movslq %esi,%rdx
imul   %rax,%rdx
mov    %ecx,%eax
sar    %eax
cltq
add    %rdx,%rax
movslq %ecx,%rsi
mov    %rax,%rdx
or     %rsi,%rdx
shr    $0x20,%rdx
je     112a <_muldivr+0x2a>
xor    %edx,%edx
div    %rsi
ret
xor    %edx,%edx
div    %ecx
ret

LLVM IR (-O0):
define i32 @_muldivr(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = mul i64 %8, %10
%12 = load i32, i32* %6
%13 = ashr i32 %12, 1
%14 = sext i32 %13 to i64
%15 = add i64 %11, %14
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = udiv i64 %15, %17
%19 = trunc i64 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @_muldivr(i32 %0, i32 %1, i32 %2) {
%4 = sext i32 %0 to i64
%5 = sext i32 %1 to i64
%6 = mul nsw i64 %5, %4
%7 = ashr i32 %2, 1
%8 = sext i32 %7 to i64
%9 = add nsw i64 %6, %8
%10 = sext i32 %2 to i64
%11 = udiv i64 %9, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}