xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void *malloc(size_t);
void *sfm_malloc(size_t size) {
  void *ptr;
  if ((ptr = malloc(size)) == NULL)
    die("sfm is out of memory!");
  return ptr;
}


x86 assembly (clang, -O0):
<sfm_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    114f <sfm_malloc+0x2f>
lea    0xeb6(%rip),%rdi
call   1040 <die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfm_malloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <sfm_malloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"sfm is out of memory!\00"
define i8* @sfm_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @die(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [22 x i8] c"sfm is out of memory!\00"
define noalias i8* @sfm_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @die(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
void dummy(size_t *auxv) {}


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

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

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

LLVM IR (-O2):
define void @dummy(i64* nocapture %0) {
ret void
}
/* Variables and functions */
int __builtin_nyuzi_read_control_reg(int /*<<< orphan*/);
int get_current_thread_id(void) { return __builtin_nyuzi_read_control_reg(0); }


x86 assembly (clang, -O0):
<get_current_thread_id>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <__builtin_nyuzi_read_control_reg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_current_thread_id>:
xor    %edi,%edi
jmp    1030 <__builtin_nyuzi_read_control_reg@plt>

LLVM IR (-O0):
define i32 @get_current_thread_id() {
%1 = call i32 @__builtin_nyuzi_read_control_reg(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @get_current_thread_id() {
%1 = tail call i32 @__builtin_nyuzi_read_control_reg(i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ fftss_plan_with_nthreads(int);
void DFFTSS_PLAN_WITH_NTHREADS_(int *nthreads) {
  fftss_plan_with_nthreads(*nthreads);
}


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

x86 assembly (clang, -O2):
<DFFTSS_PLAN_WITH_NTHREADS_>:
mov    (%rdi),%edi
jmp    1030 <fftss_plan_with_nthreads@plt>

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

LLVM IR (-O2):
define void @DFFTSS_PLAN_WITH_NTHREADS_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @fftss_plan_with_nthreads(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check_force(char const *, char *);
int /*<<< orphan*/ pcap_list_flush();
bool cmd_new(const char *arg) {
  if (!check_force(arg, "Are you sure you want to reset the PCAP"))
    goto EXIT;
  pcap_list_flush();
EXIT:
  return true;
}


x86 assembly (clang, -O0):
<cmd_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <check_force@plt>
cmp    $0x0,%eax
jne    114a <cmd_new+0x2a>
jmp    1151 <cmd_new+0x31>
mov    $0x0,%al
call   1030 <pcap_list_flush@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_new>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <check_force@plt>
test   %eax,%eax
je     1138 <cmd_new+0x18>
xor    %eax,%eax
call   1030 <pcap_list_flush@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Are you sure you want to reset the PCAP\00"
define i32 @cmd_new(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @check_force(i8* %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %1
br label %9
7: ; preds = %1
%8 = call i32 (...) @pcap_list_flush()
br label %9
9: ; preds = %7, %6
ret i32 1
}

LLVM IR (-O2):
@.str = [40 x i8] c"Are you sure you want to reset the PCAP\00"
define i32 @cmd_new(i8* %0) {
%2 = tail call i32 @check_force(i8* %0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @pcap_list_flush()
br label %6
6: ; preds = %1, %4
ret i32 1
}
void printVector(int *v[], int size) {
  int i;
  for (i = 0; i < size; i++) {
    printf(" [%d] \n", v[i]);
  }
}


x86 assembly (clang, -O0):
<printVector>:
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    115a <printVector+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printVector+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printVector>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1147 <printVector+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xed7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printVector+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [8 x i8] c" [%d] \0A\00"
define void @printVector(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 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 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
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c" [%d] \0A\00"
define void @printVector(i32** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32*, i32** %0, i64 %7
%9 = load i32*, i32** %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __efuse_read_dword(unsigned int, unsigned int *);
int /*<<< orphan*/ efuse_init();
unsigned int efuse_read_byte(unsigned long addr) {
  efuse_init();
  unsigned int int_addr = addr;
  unsigned int off_addr = addr % 4;
  unsigned int r_data = 0;
  __efuse_read_dword(int_addr, &r_data);
  return ((r_data >> (off_addr * 8)) & 0xff);
}


x86 assembly (clang, -O0):
<efuse_read_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <efuse_init@plt>
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
and    $0x3,%rax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0xc(%rbp),%edi
lea    -0x14(%rbp),%rsi
call   1040 <__efuse_read_dword@plt>
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x3,%ecx
shr    %cl,%eax
and    $0xff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<efuse_read_byte>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <efuse_init@plt>
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %ebx,%edi
call   1040 <__efuse_read_dword@plt>
mov    0xc(%rsp),%eax
shl    $0x3,%ebx
mov    %ebx,%ecx
shr    %cl,%eax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @efuse_read_byte(i64 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i64 %0, i64* %2
%6 = call i32 (...) @efuse_init()
%7 = load i64, i64* %2
%8 = trunc i64 %7 to i32
store i32 %8, i32* %3
%9 = load i64, i64* %2
%10 = urem i64 %9, 4
%11 = trunc i64 %10 to i32
store i32 %11, i32* %4
store i32 0, i32* %5
%12 = load i32, i32* %3
%13 = call i32 @__efuse_read_dword(i32 %12, i32* %5)
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = mul i32 %15, 8
%17 = lshr i32 %14, %16
%18 = and i32 %17, 255
ret i32 %18
}

LLVM IR (-O2):
define i32 @efuse_read_byte(i64 %0) {
%2 = alloca i32
%3 = tail call i32 (...) @efuse_init()
%4 = trunc i64 %0 to i32
%5 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%6 = call i32 @__efuse_read_dword(i32 %4, i32* %2)
%7 = load i32, i32* %2
%8 = shl i32 %4, 3
%9 = and i32 %8, 24
%10 = lshr i32 %7, %9
%11 = and i32 %10, 255
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void myputc(char c) { putchar(c); }


x86 assembly (clang, -O0):
<myputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myputc>:
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @myputc(i8 signext %0) {
%2 = tail call i32 @putchar(i8 signext %0)
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
char *strfchr(char *src) {
  while (src && isspace(*src))
    src++;
  return src;
}


x86 assembly (clang, -O0):
<strfchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1142 <strfchr+0x32>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1152 <strfchr+0x42>
jmp    1163 <strfchr+0x53>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <strfchr+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strfchr>:
push   %rbx
test   %rdi,%rdi
je     1134 <strfchr+0x24>
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   (%rax)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <strfchr+0x10>
jmp    1136 <strfchr+0x26>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @strfchr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %13, %1
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
%9 = call i64 @isspace(i8 signext %8)
%10 = icmp ne i64 %9, 0
br label %11
11: ; preds = %6, %3
%12 = phi i1 [ false, %3 ], [ %10, %6 ]
br i1 %12, label %13, label %16
13: ; preds = %11
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %2
br label %3
16: ; preds = %11
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
define i8* @strfchr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %8, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = tail call i64 @isspace(i8 signext %5)
%7 = icmp eq i64 %6, 0
%8 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %7, label %9, label %3
9: ; preds = %3, %1
%10 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %10
}
/* Variables and functions */
int log2(long double);
long double log10l(long double x) {
  return log2(x) * (1 / 0x1.A934F0979A371p+1L);
}


x86 assembly (clang, -O0):
<log10l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <log2@plt>
mov    %eax,-0x14(%rbp)
fildl  -0x14(%rbp)
fldt   0xec9(%rip)
fmulp  %st,%st(1)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log10l>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <log2@plt>
mov    %eax,0x14(%rsp)
fldt   0xed6(%rip)
fimull 0x14(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @log10l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i32 @log2(x86_fp80 %3)
%5 = sitofp i32 %4 to x86_fp80
%6 = fmul x86_fp80 %5, 0xK3FFD9A209A84FBCFF9C4
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @log10l(x86_fp80 %0) {
%2 = tail call i32 @log2(x86_fp80 %0)
%3 = sitofp i32 %2 to x86_fp80
%4 = fmul x86_fp80 %3, 0xK3FFD9A209A84FBCFF9C4
ret x86_fp80 %4
}
void __cyg_profile_func_exit(void *this_fn, void *call_site) {
  (void)this_fn;
  (void)call_site;
}


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

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

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

LLVM IR (-O2):
define void @__cyg_profile_func_exit(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cpc_key_press(int);
int /*<<< orphan*/ cpc_key_unpress(int);
void Joy_Cursor_Up(int value) {
  if (value) {
    cpc_key_press(0x00);
  } else {
    cpc_key_unpress(0x00);
  };
}


x86 assembly (clang, -O0):
<Joy_Cursor_Up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1141 <Joy_Cursor_Up+0x21>
xor    %edi,%edi
call   1030 <cpc_key_press@plt>
jmp    1148 <Joy_Cursor_Up+0x28>
xor    %edi,%edi
call   1040 <cpc_key_unpress@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Joy_Cursor_Up>:
test   %edi,%edi
je     112b <Joy_Cursor_Up+0xb>
xor    %edi,%edi
jmp    1030 <cpc_key_press@plt>
xor    %edi,%edi
jmp    1040 <cpc_key_unpress@plt>

LLVM IR (-O0):
define void @Joy_Cursor_Up(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @cpc_key_press(i32 0)
br label %9
7: ; preds = %1
%8 = call i32 @cpc_key_unpress(i32 0)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @Joy_Cursor_Up(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @cpc_key_press(i32 0)
br label %7
5: ; preds = %1
%6 = tail call i32 @cpc_key_unpress(i32 0)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
scalar_t__ __send_to_ppe(int, int, char **);
char *mktemp(char *template) {
  return (char *)__send_to_ppe(0x2101, 54, &template);
}


x86 assembly (clang, -O0):
<mktemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x2101,%edi
mov    $0x36,%esi
lea    -0x8(%rbp),%rdx
call   1030 <__send_to_ppe@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mktemp>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdx
mov    $0x2101,%edi
mov    $0x36,%esi
call   1030 <__send_to_ppe@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i8* @mktemp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i64 @__send_to_ppe(i32 8449, i32 54, i8** %2)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}

LLVM IR (-O2):
define i8* @mktemp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i64 @__send_to_ppe(i32 8449, i32 54, i8** %2)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
void wrap_traceoff(void) {}


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

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

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

LLVM IR (-O2):
define void @wrap_traceoff() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void pll_aligned_free(void *ptr) { free(ptr); }


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

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

LLVM IR (-O2):
define void @pll_aligned_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void avio_context_free() {}


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

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

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

LLVM IR (-O2):
define void @avio_context_free() {
ret void
}
/* Variables and functions */
unsigned int choisirMenuSansOperationPossible(int);
unsigned int choisirBonusNouveauLvlPersonnage(void) {
  unsigned int choixJoueur;
  choixJoueur = choisirMenuSansOperationPossible(3);
  return choixJoueur;
}


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

x86 assembly (clang, -O2):
<choisirBonusNouveauLvlPersonnage>:
mov    $0x3,%edi
jmp    1030 <choisirMenuSansOperationPossible@plt>

LLVM IR (-O0):
define i32 @choisirBonusNouveauLvlPersonnage() {
%1 = alloca i32
%2 = call i32 @choisirMenuSansOperationPossible(i32 3)
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @choisirBonusNouveauLvlPersonnage() {
%1 = tail call i32 @choisirMenuSansOperationPossible(i32 3)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int proc1(int, int);
int main() {
  printf("%i\n", proc1(3, 4));
  printf("%i\n", proc1(5, 6));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <proc1@plt>
mov    %eax,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%edi
mov    $0x6,%esi
call   1040 <proc1@plt>
mov    %eax,%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <proc1@plt>
lea    0xec9(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x5,%edi
mov    $0x6,%esi
call   1040 <proc1@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = tail call i32 @proc1(i32 3, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @proc1(i32 5, i32 6)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x7f() {
  Assert_real((isodigit(127) == 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_isodigit.c",
              640, ("isodigit should be 0 for 0x7f"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x7f>:
push   %rax
mov    $0x7f,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x280,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x7f\00"
define void @t_isodigit_0x7f() {
%1 = call i64 @isodigit(i32 127)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 640, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x7f\00"
define void @t_isodigit_0x7f() {
%1 = tail call i64 @isodigit(i32 127)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 640, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int key_cmp(void *s1, void *s2) { return s1 == s2; }


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

x86 assembly (clang, -O2):
<key_cmp>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @key_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = icmp eq i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @key_cmp(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int ld_ge_mr1(long double *a1, long double a2) { return (((*a1) >= (a2))); }


x86 assembly (clang, -O0):
<ld_ge_mr1>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
fstpt  -0x20(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
fldt   -0x20(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_ge_mr1>:
fldt   0x8(%rsp)
fldt   (%rdi)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
setae  %al
ret

LLVM IR (-O0):
define i32 @ld_ge_mr1(x86_fp80* %0, x86_fp80 %1) {
%3 = alloca x86_fp80*
%4 = alloca x86_fp80
store x86_fp80* %0, x86_fp80** %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80*, x86_fp80** %3
%6 = load x86_fp80, x86_fp80* %5
%7 = load x86_fp80, x86_fp80* %4
%8 = fcmp oge x86_fp80 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @ld_ge_mr1(x86_fp80* nocapture %0, x86_fp80 %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = fcmp oge x86_fp80 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
int pfunc(int i, int j) { return (i * 256 + j); }


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

x86 assembly (clang, -O2):
<pfunc>:
shl    $0x8,%edi
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @pfunc(i32 %0, i32 %1) {
%3 = shl nsw i32 %0, 8
%4 = add nsw i32 %3, %1
ret i32 %4
}
void *send_to_pc() {}


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

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

LLVM IR (-O0):
define i8* @send_to_pc() {
%1 = alloca i8*
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
define noalias i8* @send_to_pc() {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void Usage(void) {
  printf("usage: propeller-elf-image-size\n         [ -v ]            verbose "
         "output\n         [ -? ]            display a usage message and "
         "exit\n         <name>            file to load\n");
  exit(1);
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [175 x i8] c"usage: propeller-elf-image-size\0A [ -v ] verbose output\0A [ -? ] display a usage message and exit\0A <name> file to load\0A\00"
define void @Usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([175 x i8], [175 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [174 x i8] c"usage: propeller-elf-image-size\0A [ -v ] verbose output\0A [ -? ] display a usage message and exit\0A <name> file to load\00"
define void @Usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([174 x i8], [174 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
float ldexp(int, int);
float av_int2flt(int32_t v) {
  if (v + v > 0xFF000000U)
    return (0.0 / 0.0);
  return ldexp(((v & 0x7FFFFF) + (1 << 23)) * (v >> 31 | 1),
               (v >> 23 & 0xFF) - 150);
}


x86 assembly (clang, -O0):
<av_int2flt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    -0x8(%rbp),%eax
cmp    $0xff000000,%eax
jbe    113e <av_int2flt+0x2e>
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1175 <av_int2flt+0x65>
mov    -0x8(%rbp),%edi
and    $0x7fffff,%edi
add    $0x800000,%edi
mov    -0x8(%rbp),%eax
sar    $0x1f,%eax
or     $0x1,%eax
imul   %eax,%edi
mov    -0x8(%rbp),%esi
sar    $0x17,%esi
and    $0xff,%esi
sub    $0x96,%esi
call   1030 <ldexp@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_int2flt>:
lea    (%rdi,%rdi,1),%eax
cmp    $0xff000000,%eax
jbe    1123 <av_int2flt+0x13>
movss  0xede(%rip),%xmm0
ret
mov    %edi,%ecx
and    $0x7fffff,%ecx
or     $0x800000,%ecx
mov    %edi,%eax
sar    $0x1f,%eax
or     $0x1,%eax
imul   %ecx,%eax
shr    $0x17,%edi
movzbl %dil,%esi
add    $0xffffff6a,%esi
mov    %eax,%edi
jmp    1030 <ldexp@plt>

LLVM IR (-O0):
define float @av_int2flt(i32 %0) {
%2 = alloca float
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* %3
%6 = add nsw i32 %4, %5
%7 = icmp ugt i32 %6, -16777216
br i1 %7, label %8, label %9
8: ; preds = %1
store float 0x7FF8000000000000, float* %2
br label %22
9: ; preds = %1
%10 = load i32, i32* %3
%11 = and i32 %10, 8388607
%12 = add nsw i32 %11, 8388608
%13 = load i32, i32* %3
%14 = ashr i32 %13, 31
%15 = or i32 %14, 1
%16 = mul nsw i32 %12, %15
%17 = load i32, i32* %3
%18 = ashr i32 %17, 23
%19 = and i32 %18, 255
%20 = sub nsw i32 %19, 150
%21 = call float @ldexp(i32 %16, i32 %20)
store float %21, float* %2
br label %22
22: ; preds = %9, %8
%23 = load float, float* %2
ret float %23
}

LLVM IR (-O2):
define float @av_int2flt(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = icmp ugt i32 %2, -16777216
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = and i32 %0, 8388607
%6 = or i32 %5, 8388608
%7 = ashr i32 %0, 31
%8 = or i32 %7, 1
%9 = mul nsw i32 %6, %8
%10 = lshr i32 %0, 23
%11 = and i32 %10, 255
%12 = add nsw i32 %11, -150
%13 = tail call float @ldexp(i32 %9, i32 %12)
br label %14
14: ; preds = %1, %4
%15 = phi float [ %13, %4 ], [ 0x7FF8000000000000, %1 ]
ret float %15
}
int main() {
  int a = 2;
  return --a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
void quat_conjugate(const float q[4], float out[4]) {
  out[0] = q[0];
  out[1] = -q[1];
  out[2] = -q[2];
  out[3] = -q[3];
}


x86 assembly (clang, -O0):
<quat_conjugate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<quat_conjugate>:
movss  (%rdi),%xmm0
movss  %xmm0,(%rsi)
movss  0x4(%rdi),%xmm0
movaps 0xeec(%rip),%xmm1
xorps  %xmm1,%xmm0
movss  %xmm0,0x4(%rsi)
movss  0x8(%rdi),%xmm0
xorps  %xmm1,%xmm0
movss  %xmm0,0x8(%rsi)
movss  0xc(%rdi),%xmm0
xorps  %xmm1,%xmm0
movss  %xmm0,0xc(%rsi)
ret

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

LLVM IR (-O2):
define void @quat_conjugate(float* nocapture %0, float* nocapture writeonly %1) {
%3 = load float, float* %0
store float %3, float* %1
%4 = getelementptr inbounds float, float* %0, i64 1
%5 = load float, float* %4
%6 = fneg float %5
%7 = getelementptr inbounds float, float* %1, i64 1
store float %6, float* %7
%8 = getelementptr inbounds float, float* %0, i64 2
%9 = load float, float* %8
%10 = fneg float %9
%11 = getelementptr inbounds float, float* %1, i64 2
store float %10, float* %11
%12 = getelementptr inbounds float, float* %0, i64 3
%13 = load float, float* %12
%14 = fneg float %13
%15 = getelementptr inbounds float, float* %1, i64 3
store float %14, float* %15
ret void
}
/* Variables and functions */
long get_table_index(char *, char *, char *, char *);
long get_author_index(char *authorname) {
  return get_table_index(authorname, "authors", "authorid", "authorname");
}


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

x86 assembly (clang, -O2):
<get_author_index>:
lea    0xee9(%rip),%rsi
lea    0xeea(%rip),%rdx
lea    0xeec(%rip),%rcx
jmp    1030 <get_table_index@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"authors\00"
@.str.1 = [9 x i8] c"authorid\00"
@.str.2 = [11 x i8] c"authorname\00"
define i64 @get_author_index(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @get_table_index(i8* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret i64 %4
}

LLVM IR (-O2):
@.str = [8 x i8] c"authors\00"
@.str.1 = [9 x i8] c"authorid\00"
@.str.2 = [11 x i8] c"authorname\00"
define i64 @get_author_index(i8* %0) {
%2 = tail call i64 @get_table_index(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret i64 %2
}
/* Variables and functions */
int log10(double);
double LinearToDb(double dfLinear) {
  if (dfLinear == 0) {
    return -1;
  }
  return 20 * log10(dfLinear);
}


x86 assembly (clang, -O0):
<LinearToDb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1147 <LinearToDb+0x37>
jp     1147 <LinearToDb+0x37>
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115d <LinearToDb+0x4d>
movsd  -0x10(%rbp),%xmm0
call   1030 <log10@plt>
imul   $0x14,%eax,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LinearToDb>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1127 <LinearToDb+0x17>
jp     1127 <LinearToDb+0x17>
movsd  0xedb(%rip),%xmm0
pop    %rax
ret
call   1030 <log10@plt>
shl    $0x2,%eax
lea    (%rax,%rax,4),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @LinearToDb(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp oeq double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double -1.000000e+00, double* %2
br label %12
7: ; preds = %1
%8 = load double, double* %3
%9 = call i32 @log10(double %8)
%10 = mul nsw i32 20, %9
%11 = sitofp i32 %10 to double
store double %11, double* %2
br label %12
12: ; preds = %7, %6
%13 = load double, double* %2
ret double %13
}

LLVM IR (-O2):
define double @LinearToDb(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @log10(double %0)
%5 = mul nsw i32 %4, 20
%6 = sitofp i32 %5 to double
br label %7
7: ; preds = %1, %3
%8 = phi double [ %6, %3 ], [ -1.000000e+00, %1 ]
ret double %8
}
/* Type definitions */
typedef int /*<<< orphan*/ ptrdiff_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ inv_adst4_1d_internal_c(int /*<<< orphan*/ *const,
                                           int /*<<< orphan*/ const, int const,
                                           int const, int /*<<< orphan*/ *const,
                                           int /*<<< orphan*/ const);
void dav1d_inv_adst4_1d_c(int32_t *const c, const ptrdiff_t stride,
                          const int min, const int max) {
  inv_adst4_1d_internal_c(c, stride, min, max, c, stride);
}


x86 assembly (clang, -O0):
<dav1d_inv_adst4_1d_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%r8
mov    -0xc(%rbp),%r9d
call   1030 <inv_adst4_1d_internal_c@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dav1d_inv_adst4_1d_c>:
mov    %rdi,%r8
mov    %esi,%r9d
jmp    1030 <inv_adst4_1d_internal_c@plt>

LLVM IR (-O0):
define void @dav1d_inv_adst4_1d_c(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = load i32*, i32** %5
%14 = load i32, i32* %6
%15 = call i32 @inv_adst4_1d_internal_c(i32* %9, i32 %10, i32 %11, i32 %12, i32* %13, i32 %14)
ret void
}

LLVM IR (-O2):
define void @dav1d_inv_adst4_1d_c(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @inv_adst4_1d_internal_c(i32* %0, i32 %1, i32 %2, i32 %3, i32* %0, i32 %1)
ret void
}
/* Variables and functions */
int cosh(double);
double math_sech(double x) { return 1 / cosh(x); }


x86 assembly (clang, -O0):
<math_sech>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <cosh@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_sech>:
push   %rax
call   1030 <cosh@plt>
lea    0x1(%rax),%ecx
xor    %edx,%edx
cmp    $0x3,%ecx
cmovb  %eax,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @math_sech(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @cosh(double %3)
%5 = sdiv i32 1, %4
%6 = sitofp i32 %5 to double
ret double %6
}

LLVM IR (-O2):
define double @math_sech(double %0) {
%2 = tail call i32 @cosh(double %0)
%3 = add i32 %2, 1
%4 = icmp ult i32 %3, 3
%5 = select i1 %4, i32 %2, i32 0
%6 = sitofp i32 %5 to double
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ z80_ed_44_neg();
void z80_ed_4c_neg(void) { z80_ed_44_neg(); }


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

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

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

LLVM IR (-O2):
define void @z80_ed_4c_neg() {
%1 = tail call i32 (...) @z80_ed_44_neg()
ret void
}
void VP8EncDspInitSSE41(void) {}


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

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

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

LLVM IR (-O2):
define void @VP8EncDspInitSSE41() {
ret void
}
int test_fun(int i, int j, int k, int tmp) {
  int c = 0;
  while ((i <= 100) && (j <= k)) {
    tmp = i;
    i = j;
    j = tmp + 1;
    k = k - 1;
    c = c + 1;
  }
  return c;
}


x86 assembly (clang, -O0):
<test_fun>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x64,-0x4(%rbp)
mov    %al,-0x15(%rbp)
jg     1132 <test_fun+0x32>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setle  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1142 <test_fun+0x42>
jmp    116e <test_fun+0x6e>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <test_fun+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fun>:
xor    %eax,%eax
cmp    $0x64,%edi
jg     112b <test_fun+0x2b>
cmp    %edx,%esi
jg     112b <test_fun+0x2b>
add    $0xffffffff,%edx
xor    %ecx,%ecx
lea    -0x1(%rcx),%eax
cmp    $0x64,%esi
jg     1129 <test_fun+0x29>
mov    %esi,%r8d
lea    0x1(%rdi),%esi
add    %edx,%ecx
cmp    %ecx,%edi
mov    %eax,%ecx
mov    %r8d,%edi
jl     1110 <test_fun+0x10>
neg    %eax
ret

LLVM IR (-O0):
define i32 @test_fun(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 0, i32* %9
br label %10
10: ; preds = %19, %4
%11 = load i32, i32* %5
%12 = icmp sle i32 %11, 100
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = icmp sle i32 %14, %15
br label %17
17: ; preds = %13, %10
%18 = phi i1 [ false, %10 ], [ %16, %13 ]
br i1 %18, label %19, label %28
19: ; preds = %17
%20 = load i32, i32* %5
store i32 %20, i32* %8
%21 = load i32, i32* %6
store i32 %21, i32* %5
%22 = load i32, i32* %8
%23 = add nsw i32 %22, 1
store i32 %23, i32* %6
%24 = load i32, i32* %7
%25 = sub nsw i32 %24, 1
store i32 %25, i32* %7
%26 = load i32, i32* %9
%27 = add nsw i32 %26, 1
store i32 %27, i32* %9
br label %10
28: ; preds = %17
%29 = load i32, i32* %9
ret i32 %29
}

LLVM IR (-O2):
define i32 @test_fun(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp slt i32 %0, 101
%6 = icmp sle i32 %1, %2
%7 = and i1 %5, %6
br i1 %7, label %8, label %19
8: ; preds = %4, %8
%9 = phi i32 [ %15, %8 ], [ 0, %4 ]
%10 = phi i32 [ %14, %8 ], [ %2, %4 ]
%11 = phi i32 [ %13, %8 ], [ %1, %4 ]
%12 = phi i32 [ %11, %8 ], [ %0, %4 ]
%13 = add nsw i32 %12, 1
%14 = add nsw i32 %10, -1
%15 = add nuw nsw i32 %9, 1
%16 = icmp slt i32 %11, 101
%17 = icmp slt i32 %12, %14
%18 = select i1 %16, i1 %17, i1 false
br i1 %18, label %8, label %19
19: ; preds = %8, %4
%20 = phi i32 [ 0, %4 ], [ %15, %8 ]
ret i32 %20
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x04() {
  Assert_real((isalpha(4) == 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_isalpha.c",
              25, ("isalpha should be 0 for 0x04"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x04>:
push   %rax
mov    $0x4,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x19,%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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x04\00"
define void @t_isalpha_0x04() {
%1 = call i64 @isalpha(i32 4)
%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 25, i8* getelementptr inbounds ([29 x i8], [29 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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x04\00"
define void @t_isalpha_0x04() {
%1 = tail call i64 @isalpha(i32 4)
%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 25, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int generated_function(void) { return 42; }


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

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

LLVM IR (-O0):
define i32 @generated_function() {
ret i32 42
}

LLVM IR (-O2):
define i32 @generated_function() {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ cat_test_cleanup();
int /*<<< orphan*/ cqm_test_cleanup();
int /*<<< orphan*/ mba_test_cleanup();
int /*<<< orphan*/ mbm_test_cleanup();
void tests_cleanup(void) {
  mbm_test_cleanup();
  mba_test_cleanup();
  cqm_test_cleanup();
  cat_test_cleanup();
}


x86 assembly (clang, -O0):
<tests_cleanup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <mbm_test_cleanup@plt>
mov    $0x0,%al
call   1050 <mba_test_cleanup@plt>
mov    $0x0,%al
call   1040 <cqm_test_cleanup@plt>
mov    $0x0,%al
call   1060 <cat_test_cleanup@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tests_cleanup>:
push   %rax
xor    %eax,%eax
call   1030 <mbm_test_cleanup@plt>
xor    %eax,%eax
call   1050 <mba_test_cleanup@plt>
xor    %eax,%eax
call   1040 <cqm_test_cleanup@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <cat_test_cleanup@plt>

LLVM IR (-O0):
define void @tests_cleanup() {
%1 = call i32 (...) @mbm_test_cleanup()
%2 = call i32 (...) @mba_test_cleanup()
%3 = call i32 (...) @cqm_test_cleanup()
%4 = call i32 (...) @cat_test_cleanup()
ret void
}

LLVM IR (-O2):
define void @tests_cleanup() {
%1 = tail call i32 (...) @mbm_test_cleanup()
%2 = tail call i32 (...) @mba_test_cleanup()
%3 = tail call i32 (...) @cqm_test_cleanup()
%4 = tail call i32 (...) @cat_test_cleanup()
ret void
}
int env_keys_equal(const void *dstr1, const void *dstr2) {
  return dstr1 == dstr2;
}


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

x86 assembly (clang, -O2):
<env_keys_equal>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @env_keys_equal(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = icmp eq i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @env_keys_equal(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int test_harness_run(int, char **);
int test_main(int argc, char **argv) { return test_harness_run(argc, argv); }


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

x86 assembly (clang, -O2):
<test_main>:
jmp    1030 <test_harness_run@plt>

LLVM IR (-O0):
define i32 @test_main(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 = load i8**, i8*** %4
%7 = call i32 @test_harness_run(i32 %5, i8** %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_main(i32 %0, i8** %1) {
%3 = tail call i32 @test_harness_run(i32 %0, i8** %1)
ret i32 %3
}