xunge/DecIR huggingface dataset:
void aeCreateFileEvent(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               32, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<aeCreateFileEvent>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x20,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<aeCreateFileEvent>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x20,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.aeCreateFileEvent = [18 x i8] c"aeCreateFileEvent\00"
define void @aeCreateFileEvent() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.aeCreateFileEvent, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.aeCreateFileEvent = [18 x i8] c"aeCreateFileEvent\00"
define void @aeCreateFileEvent() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.aeCreateFileEvent, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc_via_ptr(int);
void malloc_ptr_free_ok() {
  int *p = (int *)malloc_via_ptr(sizeof(int));
  free(p);
}


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

x86 assembly (clang, -O2):
<malloc_ptr_free_ok>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc_via_ptr@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @malloc_ptr_free_ok() {
%1 = alloca i32*
%2 = call i64 @malloc_via_ptr(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 @free(i32* %4)
ret void
}

LLVM IR (-O2):
define void @malloc_ptr_free_ok() {
%1 = tail call i64 @malloc_via_ptr(i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @free(i32* %2)
ret void
}
unsigned long branch_bform_target(const unsigned int instr) {
  signed long imm;
  imm = instr & 0xFFFC;
  if (imm & 0x8000)
    imm -= 0x10000;
  return (unsigned long)imm;
}


x86 assembly (clang, -O0):
<branch_bform_target>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffc,%eax
mov    %eax,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x8000,%rax
cmp    $0x0,%rax
je     1137 <branch_bform_target+0x37>
mov    -0x10(%rbp),%rax
sub    $0x10000,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<branch_bform_target>:
and    $0xfffc,%edi
lea    -0x10000(%rdi),%rax
test   $0x8000,%edi
cmove  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @branch_bform_target(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 65532
%6 = zext i32 %5 to i64
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = and i64 %7, 32768
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i64, i64* %3
%12 = sub nsw i64 %11, 65536
store i64 %12, i64* %3
br label %13
13: ; preds = %10, %1
%14 = load i64, i64* %3
ret i64 %14
}

LLVM IR (-O2):
define i64 @branch_bform_target(i32 %0) {
%2 = and i32 %0, 65532
%3 = zext i32 %2 to i64
%4 = and i64 %3, 32768
%5 = icmp eq i64 %4, 0
%6 = or i64 %3, -65536
%7 = select i1 %5, i64 %3, i64 %6
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ __DCACHE_IALL();
int /*<<< orphan*/ __DSB();
int /*<<< orphan*/ __ISB();
void csi_dcache_invalid(void) {
  __DSB();
  __ISB();
  __DCACHE_IALL();
  __DSB();
  __ISB();
}


x86 assembly (clang, -O0):
<csi_dcache_invalid>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <__DSB@plt>
mov    $0x0,%al
call   1030 <__ISB@plt>
mov    $0x0,%al
call   1050 <__DCACHE_IALL@plt>
mov    $0x0,%al
call   1040 <__DSB@plt>
mov    $0x0,%al
call   1030 <__ISB@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<csi_dcache_invalid>:
push   %rax
xor    %eax,%eax
call   1040 <__DSB@plt>
xor    %eax,%eax
call   1030 <__ISB@plt>
xor    %eax,%eax
call   1050 <__DCACHE_IALL@plt>
xor    %eax,%eax
call   1040 <__DSB@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <__ISB@plt>

LLVM IR (-O0):
define void @csi_dcache_invalid() {
%1 = call i32 (...) @__DSB()
%2 = call i32 (...) @__ISB()
%3 = call i32 (...) @__DCACHE_IALL()
%4 = call i32 (...) @__DSB()
%5 = call i32 (...) @__ISB()
ret void
}

LLVM IR (-O2):
define void @csi_dcache_invalid() {
%1 = tail call i32 (...) @__DSB()
%2 = tail call i32 (...) @__ISB()
%3 = tail call i32 (...) @__DCACHE_IALL()
%4 = tail call i32 (...) @__DSB()
%5 = tail call i32 (...) @__ISB()
ret void
}
/* Variables and functions */
float pow(float, int);
float f(float x) { return (pow(x, 3) - 10); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
movss  0xecc(%rip),%xmm1
subss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
mov    $0x3,%edi
call   1030 <pow@plt>
addss  0xedd(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @pow(float %3, i32 3)
%5 = fsub float %4, 1.000000e+01
ret float %5
}

LLVM IR (-O2):
define float @f(float %0) {
%2 = tail call float @pow(float %0, i32 3)
%3 = fadd float %2, -1.000000e+01
ret float %3
}
int foo10() { return 10; }


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

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

LLVM IR (-O0):
define i32 @foo10() {
ret i32 10
}

LLVM IR (-O2):
define i32 @foo10() {
ret i32 10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memchunk_sine() {
  printf("NOT IMPLEMENTED:"
         "pa_memchunk_sine"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"NOT IMPLEMENTED:pa_memchunk_sine\0A\00"
define i32 @pa_memchunk_sine() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_memchunk_sine\00"
define i32 @pa_memchunk_sine() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fdasd_menu(void) {
  printf("Command action\n"
         "   m   print this menu\n"
         "   p   print the partition table\n"
         "   n   add a new partition\n"
         "   d   delete a partition\n"
         "   l   list known partition types\n"
         "   v   change volume serial\n"
         "   t   change partition type\n"
         "   r   re-create VTOC and delete all partitions\n"
         "   u   re-create VTOC re-using existing partition sizes\n"
         "   s   show mapping (partition number - data set name)\n"
         "   q   quit without saving changes\n"
         "   w   write table to disk and exit\n");
}


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

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

LLVM IR (-O0):
@.str = [446 x i8] c"Command action\0A m print this menu\0A p print the partition table\0A n add a new partition\0A d delete a partition\0A l list known partition types\0A v change volume serial\0A t change partition type\0A r re-create VTOC and delete all partitions\0A u re-create VTOC re-using existing partition sizes\0A s show mapping (partition number - data set name)\0A q quit without saving changes\0A w write table to disk and exit\0A\00"
define void @fdasd_menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([446 x i8], [446 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [445 x i8] c"Command action\0A m print this menu\0A p print the partition table\0A n add a new partition\0A d delete a partition\0A l list known partition types\0A v change volume serial\0A t change partition type\0A r re-create VTOC and delete all partitions\0A u re-create VTOC re-using existing partition sizes\0A s show mapping (partition number - data set name)\0A q quit without saving changes\0A w write table to disk and exit\00"
define void @fdasd_menu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([445 x i8], [445 x i8]* @str, i64 0, i64 0))
ret void
}
void *map2check_non_det_pointer() { return 0; }


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

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

LLVM IR (-O0):
define i8* @map2check_non_det_pointer() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @map2check_non_det_pointer() {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int checkArgument(int num, const char *fileName) {
  int errorNone = 0;
  if (num != 2) {
    errorNone = 1;
    printf("Invalid arguments error Please input Filepath correctly ! \n");
    exit(1);
  } else {
    errorNone = 0;
  }
  return errorNone;
}


x86 assembly (clang, -O0):
<checkArgument>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x4(%rbp)
je     115d <checkArgument+0x3d>
movl   $0x1,-0x14(%rbp)
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkArgument>:
cmp    $0x2,%edi
jne    1128 <checkArgument+0x8>
xor    %eax,%eax
ret
push   %rax
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"Invalid arguments error Please input Filepath correctly ! \0A\00"
define i32 @checkArgument(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 0, i32* %5
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %11
8: ; preds = %2
store i32 1, i32* %5
%9 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %2
store i32 0, i32* %5
br label %12
12: ; preds = %11
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
@str = [59 x i8] c"Invalid arguments error Please input Filepath correctly ! \00"
define i32 @checkArgument(i32 %0, i8* nocapture readnone %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
ret i32 0
}
char EncodePosChar(int c) {
  if (c <= 0 || c > 52)
    return (0);
  if (c <= 26)
    return ((char)('a' + c - 1));
  else
    return ((char)('A' + c - 27));
}


x86 assembly (clang, -O0):
<EncodePosChar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    111b <EncodePosChar+0x1b>
cmpl   $0x34,-0x8(%rbp)
jle    1124 <EncodePosChar+0x24>
movb   $0x0,-0x1(%rbp)
jmp    114b <EncodePosChar+0x4b>
cmpl   $0x1a,-0x8(%rbp)
jg     113f <EncodePosChar+0x3f>
mov    -0x8(%rbp),%eax
add    $0x61,%eax
sub    $0x1,%eax
mov    %al,-0x1(%rbp)
jmp    114b <EncodePosChar+0x4b>
mov    -0x8(%rbp),%eax
add    $0x41,%eax
sub    $0x1b,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EncodePosChar>:
mov    %edi,%eax
lea    -0x35(%rax),%ecx
cmp    $0xffffffcc,%ecx
jae    110d <EncodePosChar+0xd>
xor    %eax,%eax
ret
cmp    $0x1a,%eax
ja     1115 <EncodePosChar+0x15>
add    $0x60,%al
ret
add    $0x26,%al
ret

LLVM IR (-O0):
define signext i8 @EncodePosChar(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 52
br i1 %8, label %9, label %10
9: ; preds = %6, %1
store i8 0, i8* %2
br label %23
10: ; preds = %6
%11 = load i32, i32* %3
%12 = icmp sle i32 %11, 26
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = load i32, i32* %3
%15 = add nsw i32 97, %14
%16 = sub nsw i32 %15, 1
%17 = trunc i32 %16 to i8
store i8 %17, i8* %2
br label %23
18: ; preds = %10
%19 = load i32, i32* %3
%20 = add nsw i32 65, %19
%21 = sub nsw i32 %20, 27
%22 = trunc i32 %21 to i8
store i8 %22, i8* %2
br label %23
23: ; preds = %18, %13, %9
%24 = load i8, i8* %2
ret i8 %24
}

LLVM IR (-O2):
define signext i8 @EncodePosChar(i32 %0) {
%2 = add i32 %0, -53
%3 = icmp ult i32 %2, -52
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = icmp ult i32 %0, 27
%6 = trunc i32 %0 to i8
br i1 %5, label %7, label %9
7: ; preds = %4
%8 = add nuw nsw i8 %6, 96
br label %11
9: ; preds = %4
%10 = add nuw nsw i8 %6, 38
br label %11
11: ; preds = %1, %9, %7
%12 = phi i8 [ %8, %7 ], [ %10, %9 ], [ 0, %1 ]
ret i8 %12
}
int mapping_add() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mapping_add() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int age = 10;
  int height = 72;
  printf("I am %i years old.\n", age);
  printf("I am %d inches tall.\n", height);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
movl   $0x48,-0x18(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"I am %i years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 10, i32* %6
store i32 72, i32* %7
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %7
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"I am %i years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 72)
ret i32 0
}
void copy_keysig(c1, c2) {
  char data[2];
  data[0] = c1;
  data[1] = c2;
  mf_write_meta_event(0x59, data, 2);
}


x86 assembly (clang, -O0):
<copy_keysig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%eax
mov    %al,-0x9(%rbp)
lea    -0xa(%rbp),%rsi
mov    $0x59,%edi
mov    $0x2,%edx
mov    $0x0,%al
call   1030 <mf_write_meta_event@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_keysig>:
push   %rax
mov    %dil,0x6(%rsp)
mov    %sil,0x7(%rsp)
lea    0x6(%rsp),%rsi
mov    $0x59,%edi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <mf_write_meta_event@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @copy_keysig(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [2 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
store i8 %7, i8* %8
%9 = load i32, i32* %4
%10 = trunc i32 %9 to i8
%11 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
store i8 %10, i8* %11
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%13 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @mf_write_meta_event to i32 (i32, i8*, i32, ...)*)(i32 89, i8* %12, i32 2)
ret void
}

LLVM IR (-O2):
define void @copy_keysig(i32 %0, i32 %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = trunc i32 %0 to i8
store i8 %5, i8* %4
%6 = trunc i32 %1 to i8
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %6, i8* %7
%8 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @mf_write_meta_event to i32 (i32, i8*, i32, ...)*)(i32 89, i8* %4, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x76() {
  Assert_real((isxdigit(118) == 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_isxdigit.c",
              595, ("isxdigit should be 0 for v"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x76>:
push   %rax
mov    $0x76,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x253,%edx
pop    %rax
jmp    1040 <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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for v\00"
define void @t_isxdigit_0x76() {
%1 = call i64 @isxdigit(i32 118)
%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 595, i8* getelementptr inbounds ([27 x i8], [27 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for v\00"
define void @t_isxdigit_0x76() {
%1 = tail call i64 @isxdigit(i32 118)
%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 595, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int judge(int x) {
  int i;
  if (x == 1)
    return 0;
  for (i = 2; i * i <= x; i++)
    if (!(x % i))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<judge>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    111d <judge+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    116a <judge+0x6a>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1163 <judge+0x63>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1150 <judge+0x50>
movl   $0x0,-0x4(%rbp)
jmp    116a <judge+0x6a>
jmp    1155 <judge+0x55>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1124 <judge+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<judge>:
xor    %ecx,%ecx
cmp    $0x1,%edi
jne    110a <judge+0xa>
mov    %ecx,%eax
ret
cmp    $0x4,%edi
jge    1115 <judge+0x15>
mov    $0x1,%eax
ret
mov    $0x2,%esi
nopw   0x0(%rax,%rax,1)
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1107 <judge+0x7>
add    $0x1,%esi
mov    %esi,%eax
imul   %esi,%eax
cmp    %edi,%eax
jle    1120 <judge+0x20>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @judge(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = icmp slt i32 %0, 4
br i1 %4, label %13, label %8
5: ; preds = %8
%6 = mul nsw i32 %12, %12
%7 = icmp sgt i32 %6, %0
br i1 %7, label %13, label %8
8: ; preds = %3, %5
%9 = phi i32 [ %12, %5 ], [ 2, %3 ]
%10 = srem i32 %0, %9
%11 = icmp eq i32 %10, 0
%12 = add nuw nsw i32 %9, 1
br i1 %11, label %13, label %5
13: ; preds = %8, %5, %3, %1
%14 = phi i32 [ 0, %1 ], [ 1, %3 ], [ 0, %8 ], [ 1, %5 ]
ret i32 %14
}
int f(int *restrict p, int *restrict q) {
  p = q;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @f(i32* noalias nocapture readnone %0, i32* noalias nocapture readnone %1) {
ret i32 0
}
int fetrans_shutdown(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fetrans_shutdown() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ xasprintf(char **, char *, unsigned long);
char *xultostr(unsigned long num) {
  char *str;
  xasprintf(&str, "%ld", num);
  return str;
}


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

x86 assembly (clang, -O2):
<xultostr>:
push   %rax
mov    %rdi,%rdx
lea    0xee5(%rip),%rsi
mov    %rsp,%rdi
call   1030 <xasprintf@plt>
mov    (%rsp),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define i8* @xultostr(i64 %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i32 @xasprintf(i8** %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %0)
%5 = load i8*, i8** %2
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ g(int);
main() { g(2); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <g@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1030 <g@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @g(i32 2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @g(i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mysubmodule_destroy();
void mymodule_destroy() { mysubmodule_destroy(); }


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

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

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

LLVM IR (-O2):
define void @mymodule_destroy() {
%1 = tail call i32 (...) @mysubmodule_destroy()
ret void
}
/* Variables and functions */
unsigned long NewThread18(void *);
unsigned long newthread(void *th) { return NewThread18(th); }


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

x86 assembly (clang, -O2):
<newthread>:
jmp    1030 <NewThread18@plt>

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

LLVM IR (-O2):
define i64 @newthread(i8* %0) {
%2 = tail call i64 @NewThread18(i8* %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
long foo(double i) {
  if (i != 2.0)
    abort();
  return 26;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    113f <foo+0x2f>
jp     113f <foo+0x2f>
jmp    1146 <foo+0x36>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x1a,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
ucomisd 0xee7(%rip),%xmm0
jne    1124 <foo+0x14>
jp     1124 <foo+0x14>
mov    $0x1a,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i64 @foo(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp une double %3, 2.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
ret i64 26
}

LLVM IR (-O2):
define i64 @foo(double %0) {
%2 = fcmp une double %0, 2.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret i64 26
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int write(int, unsigned char *, int);
void putblk(unsigned char *blk, int len) {
  int rslt;
  rslt = write(1, blk, len);
  if (rslt != len) {
    fprintf(stderr, "putblk: write error\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<putblk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     117e <putblk+0x4e>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
lea    0xe91(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putblk>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
mov    $0x1,%edi
mov    %ebx,%edx
call   1030 <write@plt>
cmp    %ebx,%eax
jne    1148 <putblk+0x18>
pop    %rbx
ret
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
lea    0xea8(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"putblk: write error\0A\00"
define void @putblk(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @write(i32 1, i8* %0, i32 %1)
%4 = icmp eq i32 %3, %1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *);
void add_line_to_file(FILE *fd, char *column_a, char *column_b) {
  fprintf(fd, "%s    %s\n", column_a, column_b);
}


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

x86 assembly (clang, -O2):
<add_line_to_file>:
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xee3(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%s %s\0A\00"
define void @add_line_to_file(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%s %s\0A\00"
define void @add_line_to_file(i32* nocapture %0, i8* %1, i8* %2) {
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2)
ret void
}
const char *ucdn_get_unicode_version(void) { return "10.0.0"; }


x86 assembly (clang, -O0):
<ucdn_get_unicode_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ucdn_get_unicode_version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [7 x i8] c"10.0.0\00"
define i8* @ucdn_get_unicode_version() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"10.0.0\00"
define i8* @ucdn_get_unicode_version() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int pthread_attr_init(pthread_attr_t *attr) {
  (void)attr;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @pthread_attr_init(i32* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ RSA;

/* Variables and functions */
int /*<<< orphan*/ ASN1_ITEM_rptr(int /*<<< orphan*/);
int /*<<< orphan*/ *ASN1_item_dup(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ RSAPublicKey;
RSA *RSAPublicKey_dup(RSA *rsa) {
  return ASN1_item_dup(ASN1_ITEM_rptr(RSAPublicKey), rsa);
}


x86 assembly (clang, -O0):
<RSAPublicKey_dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <ASN1_ITEM_rptr@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
call   1040 <ASN1_item_dup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RSAPublicKey_dup>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <ASN1_ITEM_rptr@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <ASN1_item_dup@plt>

LLVM IR (-O0):
@RSAPublicKey = global i32 0
define i32* @RSAPublicKey_dup(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @RSAPublicKey
%4 = call i32 @ASN1_ITEM_rptr(i32 %3)
%5 = load i32*, i32** %2
%6 = call i32* @ASN1_item_dup(i32 %4, i32* %5)
ret i32* %6
}

LLVM IR (-O2):
@RSAPublicKey = global i32 0
define i32* @RSAPublicKey_dup(i32* %0) {
%2 = load i32, i32* @RSAPublicKey
%3 = tail call i32 @ASN1_ITEM_rptr(i32 %2)
%4 = tail call i32* @ASN1_item_dup(i32 %3, i32* %0)
ret i32* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test();
int main(void) {
  printf("Hello, world!\n");
  test();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, world!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @test()
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @test()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puthex(int, unsigned int);
void puthex16(unsigned int v) { puthex(4, v); }


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

x86 assembly (clang, -O2):
<puthex16>:
mov    %edi,%esi
mov    $0x4,%edi
jmp    1030 <puthex@plt>

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

LLVM IR (-O2):
define void @puthex16(i32 %0) {
%2 = tail call i32 @puthex(i32 4, i32 %0)
ret void
}
char *strcpy(char *dest, const char *src) {
  char *ret = dest;
  while (*dest++ = *src++)
    ;
  return ret;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1143 <strcpy+0x43>
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
double eval_A(int i, int j) {
  int d = (((i + j) * (i + j + 1)) >> 1) + i + 1;
  return 1.0 / d;
}


x86 assembly (clang, -O0):
<eval_A>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
sar    $0x1,%eax
add    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xecb(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_A>:
lea    (%rsi,%rdi,1),%eax
lea    (%rsi,%rdi,1),%ecx
add    $0x1,%ecx
imul   %eax,%ecx
sar    %ecx
lea    (%rdi,%rcx,1),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xee0(%rip),%xmm0
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @eval_A(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 = add nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = add nsw i32 %9, %10
%12 = add nsw i32 %11, 1
%13 = mul nsw i32 %8, %12
%14 = ashr i32 %13, 1
%15 = load i32, i32* %3
%16 = add nsw i32 %14, %15
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
%18 = load i32, i32* %5
%19 = sitofp i32 %18 to double
%20 = fdiv double 1.000000e+00, %19
ret double %20
}

LLVM IR (-O2):
define double @eval_A(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = add nsw i32 %3, 1
%5 = mul nsw i32 %4, %3
%6 = ashr i32 %5, 1
%7 = add i32 %0, 1
%8 = add i32 %7, %6
%9 = sitofp i32 %8 to double
%10 = fdiv double 1.000000e+00, %9
ret double %10
}
void TestAppP$Leds$led2On(void) { LedsP$Leds$led2On(); }


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

x86 assembly (clang, -O2):
<TestAppP$Leds$led2On>:
xor    %eax,%eax
jmp    1030 <LedsP$Leds$led2On@plt>

LLVM IR (-O0):
define void @"TestAppP$Leds$led2On"() {
%1 = call i32 (...) @"LedsP$Leds$led2On"()
ret void
}

LLVM IR (-O2):
define void @"TestAppP$Leds$led2On"() {
%1 = tail call i32 (...) @"LedsP$Leds$led2On"()
ret void
}
int close(int file) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @close(i32 %0) {
ret i32 0
}
/* Variables and functions */
int egetc();
long to32bit(int, int, int, int);
long read32bit() {
  int c1, c2, c3, c4;
  c1 = egetc();
  c2 = egetc();
  c3 = egetc();
  c4 = egetc();
  return to32bit(c1, c2, c3, c4);
}


x86 assembly (clang, -O0):
<read32bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <egetc@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <egetc@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <egetc@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <egetc@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <to32bit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read32bit>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1040 <egetc@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1040 <egetc@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <egetc@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <egetc@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <to32bit@plt>

LLVM IR (-O0):
define i64 @read32bit() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 (...) @egetc()
store i32 %5, i32* %1
%6 = call i32 (...) @egetc()
store i32 %6, i32* %2
%7 = call i32 (...) @egetc()
store i32 %7, i32* %3
%8 = call i32 (...) @egetc()
store i32 %8, i32* %4
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i64 @to32bit(i32 %9, i32 %10, i32 %11, i32 %12)
ret i64 %13
}

LLVM IR (-O2):
define i64 @read32bit() {
%1 = tail call i32 (...) @egetc()
%2 = tail call i32 (...) @egetc()
%3 = tail call i32 (...) @egetc()
%4 = tail call i32 (...) @egetc()
%5 = tail call i64 @to32bit(i32 %1, i32 %2, i32 %3, i32 %4)
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ letters;

/* Variables and functions */
int getsize(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  char letters[] = {'a', 'b', 'c'};
  int size = getsize(letters);
  printf("The size of the array is %li\n", sizeof(letters));
  printf("The size of the array is %i\nj", size);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeca(%rip),%ax
mov    %ax,-0x13(%rbp)
mov    0xec2(%rip),%al
mov    %al,-0x11(%rbp)
lea    -0x13(%rbp),%rdi
call   1040 <getsize@plt>
mov    %eax,-0x18(%rbp)
lea    0xead(%rip),%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movb   $0x63,0xe(%rsp)
movw   $0x6261,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1040 <getsize@plt>
mov    %eax,%ebx
lea    0xebf(%rip),%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.letters = [3 x i8] c"abc"
@.str = [30 x i8] c"The size of the array is %li\0A\00"
@.str.1 = [30 x i8] c"The size of the array is %i\0Aj\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [3 x i8]
%6 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = bitcast [3 x i8]* %5 to i8*
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
%9 = call i32 @getsize(i8* %8)
store i32 %9, i32* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 3)
%11 = load i32, i32* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.letters = [3 x i8] c"abc"
@.str = [30 x i8] c"The size of the array is %li\0A\00"
@.str.1 = [30 x i8] c"The size of the array is %i\0Aj\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [3 x i8]
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%5 = call i32 @getsize(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 3)
%7 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;
struct timespec {
  int dummy;
};

/* Variables and functions */
int FUTEX_LOCK_PI;
int /*<<< orphan*/ SYS_futex;
int syscall(int /*<<< orphan*/, int /*<<< orphan*/ *, int, int /*<<< orphan*/,
            struct timespec *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int futex_lock_pi(u_int32_t *uaddr, struct timespec *timeout, int opflags) {
  return syscall(SYS_futex, uaddr, FUTEX_LOCK_PI | opflags, 0, timeout, NULL,
                 0);
}


x86 assembly (clang, -O0):
<futex_lock_pi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
or     -0x14(%rbp),%edx
mov    -0x10(%rbp),%r8
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%r9d
movl   $0x0,(%rsp)
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<futex_lock_pi>:
push   %rax
mov    %rsi,%r8
mov    %rdi,%rsi
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    0x2eb9(%rip),%rax
or     (%rax),%edx
movl   $0x0,(%rsp)
xor    %ecx,%ecx
xor    %r9d,%r9d
call   1030 <syscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@SYS_futex = global i32 0
@FUTEX_LOCK_PI = global i32 0
define i32 @futex_lock_pi(i32* %0, %struct.timespec* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca %struct.timespec*
%6 = alloca i32
store i32* %0, i32** %4
store %struct.timespec* %1, %struct.timespec** %5
store i32 %2, i32* %6
%7 = load i32, i32* @SYS_futex
%8 = load i32*, i32** %4
%9 = load i32, i32* @FUTEX_LOCK_PI
%10 = load i32, i32* %6
%11 = or i32 %9, %10
%12 = load %struct.timespec*, %struct.timespec** %5
%13 = call i32 @syscall(i32 %7, i32* %8, i32 %11, i32 0, %struct.timespec* %12, i32* null, i32 0)
ret i32 %13
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@SYS_futex = global i32 0
@FUTEX_LOCK_PI = global i32 0
define i32 @futex_lock_pi(i32* %0, %struct.timespec* %1, i32 %2) {
%4 = load i32, i32* @SYS_futex
%5 = load i32, i32* @FUTEX_LOCK_PI
%6 = or i32 %5, %2
%7 = tail call i32 @syscall(i32 %4, i32* %0, i32 %6, i32 0, %struct.timespec* %1, i32* null, i32 0)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ write2ToEco(unsigned char *, unsigned short);
void conv2FromX86ToEco(unsigned char *p) {
  unsigned short data;
  data = *(unsigned short *)p;
  write2ToEco(p, data);
}


x86 assembly (clang, -O0):
<conv2FromX86ToEco>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ax
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
movzwl -0xa(%rbp),%esi
call   1030 <write2ToEco@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conv2FromX86ToEco>:
movzwl (%rdi),%esi
jmp    1030 <write2ToEco@plt>

LLVM IR (-O0):
define void @conv2FromX86ToEco(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i16*
%6 = load i16, i16* %5
store i16 %6, i16* %3
%7 = load i8*, i8** %2
%8 = load i16, i16* %3
%9 = call i32 @write2ToEco(i8* %7, i16 zeroext %8)
ret void
}

LLVM IR (-O2):
define void @conv2FromX86ToEco(i8* %0) {
%2 = bitcast i8* %0 to i16*
%3 = load i16, i16* %2
%4 = tail call i32 @write2ToEco(i8* %0, i16 zeroext %3)
ret void
}
int cairo_code_draw_16seg_get_height() { return 45; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_16seg_get_height() {
ret i32 45
}

LLVM IR (-O2):
define i32 @cairo_code_draw_16seg_get_height() {
ret i32 45
}