xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void imprime(char *v, int n) {
  for (char *c = v; c < v + n; c++)
    printf("%c", *c);
}


x86 assembly (clang, -O0):
<imprime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
jae    1163 <imprime+0x53>
mov    -0x18(%rbp),%rax
lea    0xeb6(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1127 <imprime+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprime>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1144 <imprime+0x34>
mov    %rdi,%rbx
movslq %esi,%r15
add    %rdi,%r15
lea    0xed7(%rip),%r14
nopl   0x0(%rax)
movsbl (%rbx),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %r15,%rbx
jb     1130 <imprime+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @imprime(i8* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = icmp sgt i32 %1, 0
br i1 %5, label %7, label %6
6: ; preds = %7, %2
ret void
7: ; preds = %2, %7
%8 = phi i8* [ %11, %7 ], [ %0, %2 ]
%9 = load i8, i8* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %9)
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = icmp ult i8* %11, %4
br i1 %12, label %7, label %6
}
void load_stat_from_file(void) {}


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

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

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

LLVM IR (-O2):
define void @load_stat_from_file() {
ret void
}
void gtk_progress_bar_set_orientation() {}


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

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

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

LLVM IR (-O2):
define void @gtk_progress_bar_set_orientation() {
ret void
}
__attribute__((always_)) void pci_mmcfg_early_init(void) {}


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

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

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

LLVM IR (-O2):
define void @pci_mmcfg_early_init() {
ret void
}
/* Variables and functions */
long compute(int, int);
int /*<<< orphan*/ printf(char *, long);
void main() {
  long f;
  f = compute(5, 6);
  printf("sum=%d\n", f);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x5,%edi
mov    $0x6,%esi
call   1040 <compute@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
mov    $0x6,%esi
call   1040 <compute@plt>
lea    0xec9(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"sum=%d\0A\00"
define void @main() {
%1 = tail call i64 @compute(i32 5, i32 6)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 %1)
ret void
}
/* Variables and functions */
unsigned char func1(int, int, unsigned char);
unsigned char macc(int, int, int);
unsigned char abxx(void) {
  unsigned char a;
  a = macc(1, 2, 3);
  a = func1(1, 2, a);
  return a;
}


x86 assembly (clang, -O0):
<abxx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1040 <macc@plt>
mov    %al,-0x1(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
movzbl -0x1(%rbp),%edx
call   1030 <func1@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<abxx>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1040 <macc@plt>
movzbl %al,%edx
mov    $0x1,%edi
mov    $0x2,%esi
pop    %rax
jmp    1030 <func1@plt>

LLVM IR (-O0):
define zeroext i8 @abxx() {
%1 = alloca i8
%2 = call zeroext i8 @macc(i32 1, i32 2, i32 3)
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = call zeroext i8 @func1(i32 1, i32 2, i8 zeroext %3)
store i8 %4, i8* %1
%5 = load i8, i8* %1
ret i8 %5
}

LLVM IR (-O2):
define zeroext i8 @abxx() {
%1 = tail call zeroext i8 @macc(i32 1, i32 2, i32 3)
%2 = tail call zeroext i8 @func1(i32 1, i32 2, i8 zeroext %1)
ret i8 %2
}
void foo647(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo647(i32 %0) {
ret void
}
/* Type definitions */
typedef int const u_int16_t;
typedef int u_char;

/* Variables and functions */
u_int16_t __get_unaligned_be16(const u_char *p) { return p[0] << 8 | p[1]; }


x86 assembly (clang, -O0):
<__get_unaligned_be16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     0x4(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_unaligned_be16>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @__get_unaligned_be16(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @__get_unaligned_be16(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = or i32 %3, %5
ret i32 %6
}
void gtk_action_group_set_translation_domain() {}


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

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

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

LLVM IR (-O2):
define void @gtk_action_group_set_translation_domain() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ unix_init_signals();
void init_signals(void) { unix_init_signals(); }


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

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

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

LLVM IR (-O2):
define void @init_signals() {
%1 = tail call i32 (...) @unix_init_signals()
ret void
}
/* Variables and functions */
int pl011_getc();
int serial_getc(void) {
  int err;
  do {
    err = pl011_getc();
  } while (err == -1);
  return err >= 0 ? err : 0;
}


x86 assembly (clang, -O0):
<serial_getc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <pl011_getc@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
je     1118 <serial_getc+0x8>
cmpl   $0x0,-0x4(%rbp)
jl     1141 <serial_getc+0x31>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    114b <serial_getc+0x3b>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    114b <serial_getc+0x3b>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_getc>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <pl011_getc@plt>
cmp    $0xffffffff,%eax
je     1120 <serial_getc+0x10>
xor    %ecx,%ecx
test   %eax,%eax
cmovns %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @serial_getc() {
%1 = alloca i32
br label %2
2: ; preds = %4, %0
%3 = call i32 (...) @pl011_getc()
store i32 %3, i32* %1
br label %4
4: ; preds = %2
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, -1
br i1 %6, label %2, label %7
7: ; preds = %4
%8 = load i32, i32* %1
%9 = icmp sge i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = load i32, i32* %1
br label %13
12: ; preds = %7
br label %13
13: ; preds = %12, %10
%14 = phi i32 [ %11, %10 ], [ 0, %12 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @serial_getc() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @pl011_getc()
%3 = icmp eq i32 %2, -1
br i1 %3, label %1, label %4
4: ; preds = %1
%5 = icmp sgt i32 %2, 0
%6 = select i1 %5, i32 %2, i32 0
ret i32 %6
}
/* Variables and functions */
int copy_rights_with_fallback(int, int, int /*<<< orphan*/ *);
int copy_rights(int fdf, int fdt) {
  return copy_rights_with_fallback(fdf, fdt, NULL);
}


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

x86 assembly (clang, -O2):
<copy_rights>:
xor    %edx,%edx
jmp    1030 <copy_rights_with_fallback@plt>

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

LLVM IR (-O2):
define i32 @copy_rights(i32 %0, i32 %1) {
%3 = tail call i32 @copy_rights_with_fallback(i32 %0, i32 %1, i32* null)
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long serial;
};
struct TYPE_4__ {
  TYPE_1__ xselection;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xselection_serial(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xselection.serial = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XEvent_xselection_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bb_init();
int /*<<< orphan*/ prng_seed(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ uci_main();
int main(int argc, char **argv) {
  bb_init();
  prng_seed(time(NULL));
  uci_main();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <bb_init@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <prng_seed@plt>
mov    $0x0,%al
call   1060 <uci_main@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <bb_init@plt>
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <prng_seed@plt>
xor    %eax,%eax
call   1060 <uci_main@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @bb_init()
%7 = call i32 @time(i32* null)
%8 = call i32 @prng_seed(i32 %7)
%9 = call i32 (...) @uci_main()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @bb_init()
%4 = tail call i32 @time(i32* null)
%5 = tail call i32 @prng_seed(i32 %4)
%6 = tail call i32 (...) @uci_main()
ret i32 0
}
void oil_random_argb(void) {}


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

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

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

LLVM IR (-O2):
define void @oil_random_argb() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_base(int, int, char *);
int /*<<< orphan*/ printf(char *);
void print_hexadecimal(int num) {
  static char map[] = {'0', '1', '2', '3', '4', '5', '6', '7',
                       '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
  printf("Hexadecimal: ");
  print_base(num, 16, map);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_hexadecimal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x10,%esi
lea    0x2efa(%rip),%rdx
call   1040 <print_base@plt>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hexadecimal>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
lea    0x2efa(%rip),%rdx
mov    %ebx,%edi
mov    $0x10,%esi
call   1050 <print_base@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@print_hexadecimal.map = internal global [16 x i8] c"0123456789ABCDEF"
@.str = [14 x i8] c"Hexadecimal: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_hexadecimal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @print_base(i32 %4, i32 16, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @print_hexadecimal.map, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@print_hexadecimal.map = internal global [16 x i8] c"0123456789ABCDEF"
@.str = [14 x i8] c"Hexadecimal: \00"
define void @print_hexadecimal(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @print_base(i32 %0, i32 16, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @print_hexadecimal.map, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
ret void
}
void _M2_StringConvert_finish(__attribute__((unused)) int argc,
                              __attribute__((unused)) char *argv[]) {}


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

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

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

LLVM IR (-O2):
define void @_M2_StringConvert_finish(i32 %0, i8** nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ appuyezEntree(char *);
int /*<<< orphan*/ lireEtAfficherFichier(char *);
int /*<<< orphan*/ menuSolo();
int /*<<< orphan*/ titre(char *);
void aide(void) {
  titre("Aide");
  lireEtAfficherFichier("aide.txt");
  appuyezEntree("Appuyez sur ENTREE pour revenir au menu principal : ");
  menuSolo();
}


x86 assembly (clang, -O0):
<aide>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1040 <titre@plt>
lea    0xeae(%rip),%rdi
call   1030 <lireEtAfficherFichier@plt>
lea    0xeab(%rip),%rdi
call   1050 <appuyezEntree@plt>
mov    $0x0,%al
call   1060 <menuSolo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<aide>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <titre@plt>
lea    0xeb1(%rip),%rdi
call   1030 <lireEtAfficherFichier@plt>
lea    0xeae(%rip),%rdi
call   1050 <appuyezEntree@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <menuSolo@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"Aide\00"
@.str.1 = [9 x i8] c"aide.txt\00"
@.str.2 = [53 x i8] c"Appuyez sur ENTREE pour revenir au menu principal : \00"
define void @aide() {
%1 = call i32 @titre(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @lireEtAfficherFichier(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @appuyezEntree(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (...) @menuSolo()
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"Aide\00"
@.str.1 = [9 x i8] c"aide.txt\00"
@.str.2 = [53 x i8] c"Appuyez sur ENTREE pour revenir au menu principal : \00"
define void @aide() {
%1 = tail call i32 @titre(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @lireEtAfficherFichier(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @appuyezEntree(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 (...) @menuSolo()
ret void
}
int main(void) {
  extern int printf(const char *, ...);
  void *f = (void *)printf;
  (*(int (*)(const char *, ...))f)("Bite my shorts. Also my chars and ints\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   *-0x10(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [40 x i8] c"Bite my shorts. Also my chars and ints\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* bitcast (i32 (i8*, ...)* @printf to i8*), i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32 (i8*, ...)*
%5 = call i32 (i8*, ...) %4(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [39 x i8] c"Bite my shorts. Also my chars and ints\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void symbol26_little(void) {}


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

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

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

LLVM IR (-O2):
define void @symbol26_little() {
ret void
}
void __hv_xor_f(float bIn0, float bIn1, float *bOut) {
  *bOut = (float)(((int)bIn0) ^ ((int)bIn1));
}


x86 assembly (clang, -O0):
<__hv_xor_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
cvttss2si -0x4(%rbp),%eax
cvttss2si -0x8(%rbp),%ecx
xor    %ecx,%eax
cvtsi2ss %eax,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hv_xor_f>:
cvttss2si %xmm0,%eax
cvttss2si %xmm1,%ecx
xor    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @__hv_xor_f(float %0, float %1, float* %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float*
store float %0, float* %4
store float %1, float* %5
store float* %2, float** %6
%7 = load float, float* %4
%8 = fptosi float %7 to i32
%9 = load float, float* %5
%10 = fptosi float %9 to i32
%11 = xor i32 %8, %10
%12 = sitofp i32 %11 to float
%13 = load float*, float** %6
store float %12, float* %13
ret void
}

LLVM IR (-O2):
define void @__hv_xor_f(float %0, float %1, float* nocapture writeonly %2) {
%4 = fptosi float %0 to i32
%5 = fptosi float %1 to i32
%6 = xor i32 %5, %4
%7 = sitofp i32 %6 to float
store float %7, float* %2
ret void
}
/* Variables and functions */
int detectPresence(char *);
scalar_t__ graphicMode();
int gmessagePresent() {
  static int lGmessagePresent = -1;
  if (lGmessagePresent < 0) {
    lGmessagePresent = detectPresence("gmessage");
  }
  return lGmessagePresent && graphicMode();
}


x86 assembly (clang, -O0):
<gmessagePresent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,0x2f01(%rip)
jge    1147 <gmessagePresent+0x27>
lea    0xec4(%rip),%rdi
call   1040 <detectPresence@plt>
mov    %eax,0x2ee9(%rip)
xor    %eax,%eax
cmpl   $0x0,0x2ee0(%rip)
mov    %al,-0x1(%rbp)
je     116a <gmessagePresent+0x4a>
mov    $0x0,%al
call   1030 <graphicMode@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmessagePresent>:
push   %rax
mov    0x2f09(%rip),%eax
test   %eax,%eax
js     1143 <gmessagePresent+0x23>
test   %eax,%eax
je     1159 <gmessagePresent+0x39>
xor    %eax,%eax
call   1030 <graphicMode@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
lea    0xeb6(%rip),%rdi
call   1040 <detectPresence@plt>
mov    %eax,0x2edb(%rip)
test   %eax,%eax
jne    112f <gmessagePresent+0xf>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@gmessagePresent.lGmessagePresent = internal global i32 -1
@.str = [9 x i8] c"gmessage\00"
define i32 @gmessagePresent() {
%1 = load i32, i32* @gmessagePresent.lGmessagePresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @detectPresence(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @gmessagePresent.lGmessagePresent
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @gmessagePresent.lGmessagePresent
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = call i64 (...) @graphicMode()
%10 = icmp ne i64 %9, 0
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ false, %5 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@gmessagePresent.lGmessagePresent = internal unnamed_addr global i32 -1
@.str = [9 x i8] c"gmessage\00"
define i32 @gmessagePresent() {
%1 = load i32, i32* @gmessagePresent.lGmessagePresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @detectPresence(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @gmessagePresent.lGmessagePresent
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %4, %3 ], [ %1, %0 ]
%7 = icmp eq i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = tail call i64 (...) @graphicMode()
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ 0, %5 ], [ %11, %8 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ pq_downheap(int, int *, int);
void pq_build(int *items, int size) {
  for (int i = size / 2 - 1; i >= 0; i--) {
    pq_downheap(i, items, size);
  }
}


x86 assembly (clang, -O0):
<pq_build>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1157 <pq_build+0x47>
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <pq_downheap@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1130 <pq_build+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pq_build>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%esi
jl     1145 <pq_build+0x35>
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%ebx
shr    %ebx
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
lea    -0x2(%rbx),%edi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <pq_downheap@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1130 <pq_build+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @pq_build(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* %4
%7 = sdiv i32 %6, 2
%8 = sub nsw i32 %7, 1
store i32 %8, i32* %5
br label %9
9: ; preds = %17, %2
%10 = load i32, i32* %5
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %20
12: ; preds = %9
%13 = load i32, i32* %5
%14 = load i32*, i32** %3
%15 = load i32, i32* %4
%16 = call i32 @pq_downheap(i32 %13, i32* %14, i32 %15)
br label %17
17: ; preds = %12
%18 = load i32, i32* %5
%19 = add nsw i32 %18, -1
store i32 %19, i32* %5
br label %9
20: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @pq_build(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = lshr i32 %1, 1
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i32 [ %9, %7 ], [ %5, %4 ]
%9 = add nsw i32 %8, -1
%10 = tail call i32 @pq_downheap(i32 %9, i32* %0, i32 %1)
%11 = icmp ugt i32 %8, 1
br i1 %11, label %7, label %6
}
/* Type definitions */
struct fd {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fd_close(struct fd *);
int /*<<< orphan*/ fd_free(struct fd *);
int /*<<< orphan*/ fdstack_unlink(struct fd *);
int /*<<< orphan*/ fdtable_unlink(struct fd *);
void fd_pop(struct fd *fd) {
  fd_close(fd);
  fdtable_unlink(fd);
  fdstack_unlink(fd);
  fd_free(fd);
}


x86 assembly (clang, -O0):
<fd_pop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <fd_close@plt>
mov    -0x8(%rbp),%rdi
call   1060 <fdtable_unlink@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fdstack_unlink@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fd_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_pop>:
push   %rbx
mov    %rdi,%rbx
call   1050 <fd_close@plt>
mov    %rbx,%rdi
call   1060 <fdtable_unlink@plt>
mov    %rbx,%rdi
call   1040 <fdstack_unlink@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fd_free@plt>

LLVM IR (-O0):
%struct.fd = type { i32 }
define void @fd_pop(%struct.fd* %0) {
%2 = alloca %struct.fd*
store %struct.fd* %0, %struct.fd** %2
%3 = load %struct.fd*, %struct.fd** %2
%4 = call i32 @fd_close(%struct.fd* %3)
%5 = load %struct.fd*, %struct.fd** %2
%6 = call i32 @fdtable_unlink(%struct.fd* %5)
%7 = load %struct.fd*, %struct.fd** %2
%8 = call i32 @fdstack_unlink(%struct.fd* %7)
%9 = load %struct.fd*, %struct.fd** %2
%10 = call i32 @fd_free(%struct.fd* %9)
ret void
}

LLVM IR (-O2):
%struct.fd = type { i32 }
define void @fd_pop(%struct.fd* %0) {
%2 = tail call i32 @fd_close(%struct.fd* %0)
%3 = tail call i32 @fdtable_unlink(%struct.fd* %0)
%4 = tail call i32 @fdstack_unlink(%struct.fd* %0)
%5 = tail call i32 @fd_free(%struct.fd* %0)
ret void
}
int _abi(i)
int i;
{ return (i >= 0 ? i : -i); }


x86 assembly (clang, -O0):
<_abi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     111c <_abi+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <_abi+0x24>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_abi>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @_abi(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
br label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = sub nsw i32 0, %8
br label %10
10: ; preds = %7, %5
%11 = phi i32 [ %6, %5 ], [ %9, %7 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @_abi(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ MC_put2_8(int, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ const *, int, int, int);
void MC_put_y_8_3dnow(uint8_t *dest, const uint8_t *ref, int stride,
                      int height) {
  MC_put2_8(height, dest, ref, stride, stride, 1);
}


x86 assembly (clang, -O0):
<MC_put_y_8_3dnow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    $0x1,%r9d
call   1030 <MC_put2_8@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MC_put_y_8_3dnow>:
mov    %edx,%r8d
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %ecx,%edi
mov    %r8d,%ecx
mov    $0x1,%r9d
jmp    1030 <MC_put2_8@plt>

LLVM IR (-O0):
define void @MC_put_y_8_3dnow(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* %8
%10 = load i32*, i32** %5
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %7
%14 = call i32 @MC_put2_8(i32 %9, i32* %10, i32* %11, i32 %12, i32 %13, i32 1)
ret void
}

LLVM IR (-O2):
define void @MC_put_y_8_3dnow(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @MC_put2_8(i32 %3, i32* %0, i32* %1, i32 %2, i32 %2, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_hex(int *);
int /*<<< orphan*/ print_int(int);
int /*<<< orphan*/ puts(char *);
void my_printfh(char *str, int *ptr, int value) {
  puts(str);
  print_hex(ptr);
  puts(" = ");
  print_int(value);
  puts("\n");
}


x86 assembly (clang, -O0):
<my_printfh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
mov    -0x10(%rbp),%rdi
call   1050 <print_hex@plt>
lea    0xea4(%rip),%rdi
call   1030 <puts@plt>
mov    -0x14(%rbp),%edi
call   1040 <print_int@plt>
lea    0xe94(%rip),%rdi
call   1030 <puts@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_printfh>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1050 <print_hex@plt>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
mov    %ebp,%edi
call   1040 <print_int@plt>
lea    0xea5(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c" = \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @my_printfh(i8* nocapture %0, i32* %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) %0)
%5 = tail call i32 @print_hex(i32* %1)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @print_int(i32 %2)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
struct ubi_wl_entry *may_reserve_for_fm(struct ubi_device *ubi,
                                        struct ubi_wl_entry *e,
                                        struct rb_root *root) {
  return e;
}


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

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

LLVM IR (-O0):
%struct.ubi_device = type opaque
%struct.ubi_wl_entry = type opaque
%struct.rb_root = type opaque
define %struct.ubi_wl_entry* @may_reserve_for_fm(%struct.ubi_device* %0, %struct.ubi_wl_entry* %1, %struct.rb_root* %2) {
%4 = alloca %struct.ubi_device*
%5 = alloca %struct.ubi_wl_entry*
%6 = alloca %struct.rb_root*
store %struct.ubi_device* %0, %struct.ubi_device** %4
store %struct.ubi_wl_entry* %1, %struct.ubi_wl_entry** %5
store %struct.rb_root* %2, %struct.rb_root** %6
%7 = load %struct.ubi_wl_entry*, %struct.ubi_wl_entry** %5
ret %struct.ubi_wl_entry* %7
}

LLVM IR (-O2):
%struct.ubi_device = type opaque
%struct.ubi_wl_entry = type opaque
%struct.rb_root = type opaque
define %struct.ubi_wl_entry* @may_reserve_for_fm(%struct.ubi_device* nocapture readnone %0, %struct.ubi_wl_entry* readnone returned %1, %struct.rb_root* nocapture readnone %2) {
ret %struct.ubi_wl_entry* %1
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
char *realloc(char *, int);
char *myrealloc(char *ptr, int len) {
  if ((ptr = realloc(ptr, len)) == 0)
    error("Insufficient memory: %m");
  return (ptr);
}


x86 assembly (clang, -O0):
<myrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jne    1155 <myrealloc+0x35>
lea    0xeb0(%rip),%rdi
call   1040 <error@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [24 x i8] c"Insufficient memory: %m\00"
define i8* @myrealloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i8* @realloc(i8* %5, i32 %6)
store i8* %7, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [24 x i8] c"Insufficient memory: %m\00"
define i8* @myrealloc(i8* %0, i32 %1) {
%3 = tail call i8* @realloc(i8* %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
void virgl_adjust_frame(ADJUST_FRAME_ARGS_DECL) {}


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

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

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

LLVM IR (-O2):
define void @virgl_adjust_frame(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int pthread_join(pthread_t __th, void **__thread_return) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<pthread_join>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_join>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @pthread_join(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @pthread_join(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void world(void *arg) {
  printf("hi.world:%s\n", arg == NULL ? "" : (char *)arg);
}


x86 assembly (clang, -O0):
<world>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1137 <world+0x27>
lea    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    113f <world+0x2f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<world>:
test   %rdi,%rdi
lea    0xef2(%rip),%rsi
cmovne %rdi,%rsi
lea    0xedb(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"hi.world:%s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define void @world(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %8
6: ; preds = %1
%7 = load i8*, i8** %2
br label %8
8: ; preds = %6, %5
%9 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %5 ], [ %7, %6 ]
%10 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"hi.world:%s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define void @world(i8* %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x57() {
  Assert_real((isalnum(87)),
              "/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_isalnum.c",
              440, ("isalnum should be 1 for W"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x57>:
push   %rax
mov    $0x57,%edi
call   1030 <isalnum@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1b8,%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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for W\00"
define void @t_isalnum_0x57() {
%1 = call i32 @isalnum(i32 87)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 440, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for W\00"
define void @t_isalnum_0x57() {
%1 = tail call i32 @isalnum(i32 87)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 440, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *allocMem(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *strdupAdd(const char *string, int add) {
  char *res = allocMem(strlen(string) + 1 + add);
  strcpy(res, string);
  return res;
}


x86 assembly (clang, -O0):
<strdupAdd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
movslq -0xc(%rbp),%rax
add    %rax,%rdi
call   1050 <allocMem@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdupAdd>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <strlen@plt>
movslq %ebp,%rcx
lea    (%rcx,%rax,1),%rdi
add    $0x1,%rdi
call   1050 <allocMem@plt>
mov    %rax,%rbp
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @strdupAdd(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = add nsw i64 %7, 1
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = add nsw i64 %8, %10
%12 = call i8* @allocMem(i64 %11)
store i8* %12, i8** %5
%13 = load i8*, i8** %5
%14 = load i8*, i8** %3
%15 = call i32 @strcpy(i8* %13, i8* %14)
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @strdupAdd(i8* %0, i32 %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = sext i32 %1 to i64
%5 = add nsw i64 %4, 1
%6 = add i64 %5, %3
%7 = tail call i8* @allocMem(i64 %6)
%8 = tail call i32 @strcpy(i8* %7, i8* %0)
ret i8* %7
}
int __ii_cxt_r(int i, int cxt) { return i + cxt; }


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

x86 assembly (clang, -O2):
<__ii_cxt_r>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @__ii_cxt_r(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 = load i32, i32* %4
%7 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @__ii_cxt_r(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int number;
  printf("Type in your number: ");
  scanf("%i", &number);
  if (number < 0) {
    number = -number;
  }
  printf("The absolute value is: %i\n", number);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jge    115f <main+0x3f>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
test   %esi,%esi
jns    114e <main+0x2e>
neg    %esi
mov    %esi,0x4(%rsp)
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Type in your number: \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [27 x i8] c"The absolute value is: %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32, i32* %2
%9 = sub nsw i32 0, %8
store i32 %9, i32* %2
br label %10
10: ; preds = %7, %0
%11 = load i32, i32* %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Type in your number: \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [27 x i8] c"The absolute value is: %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = sub nsw i32 0, %5
store i32 %8, i32* %1
br label %9
9: ; preds = %7, %0
%10 = phi i32 [ %8, %7 ], [ %5, %0 ]
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
double sqrt(int /*<<< orphan*/);
int /*<<< orphan*/ stdlib_strided_dnanvariancech(int /*<<< orphan*/ const,
                                                 double const, double const *,
                                                 int /*<<< orphan*/ const);
double stdlib_strided_dnanstdevch(const int64_t N, const double correction,
                                  const double *X, const int64_t stride) {
  return sqrt(stdlib_strided_dnanvariancech(N, correction, X, stride));
}


x86 assembly (clang, -O0):
<stdlib_strided_dnanstdevch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <stdlib_strided_dnanvariancech@plt>
mov    %eax,%edi
call   1030 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @stdlib_strided_dnanstdevch(i32 %0, double %1, double* %2, i32 %3) {
%5 = tail call i32 @stdlib_strided_dnanvariancech(i32 %0, double %1, double* %2, i32 %3)
%6 = tail call double @sqrt(i32 %5)
ret double %6
}