xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ step_hash(int);
short func_1(void) {
  short l_2 = 0xFD41L;
  step_hash(1);
  return l_2;
}


x86 assembly (clang, -O0):
<func_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movw   $0xfd41,-0x2(%rbp)
mov    $0x1,%edi
call   1030 <step_hash@plt>
movswl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_1>:
push   %rax
mov    $0x1,%edi
call   1030 <step_hash@plt>
mov    $0xfd41,%ax
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @func_1() {
%1 = alloca i16
store i16 -703, i16* %1
%2 = call i32 @step_hash(i32 1)
%3 = load i16, i16* %1
ret i16 %3
}

LLVM IR (-O2):
define signext i16 @func_1() {
%1 = tail call i32 @step_hash(i32 1)
ret i16 -703
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
void parseutils_buf2str(char *out, const char *buf, size_t len) {
  memcpy(out, buf, len);
  out[len] = '\0';
}


x86 assembly (clang, -O0):
<parseutils_buf2str>:
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),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseutils_buf2str>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <memcpy@plt>
movb   $0x0,(%rbx,%r14,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @parseutils_buf2str(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @memcpy(i8* %7, i8* %8, i64 %9)
%11 = load i8*, i8** %4
%12 = load i64, i64* %6
%13 = getelementptr inbounds i8, i8* %11, i64 %12
store i8 0, i8* %13
ret void
}

LLVM IR (-O2):
define void @parseutils_buf2str(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
%5 = getelementptr inbounds i8, i8* %0, i64 %2
store i8 0, i8* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int routineB(void (*routine)(int, int)) {
  int x, y;
  scanf("%d %d", &x, &y);
  routine(x, y);
  printf("%d %d\n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<routineB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   *%rax
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<routineB>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xed1(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   *%rbx
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [7 x i8] c"%d %d\0A\00"
define i32 @routineB(void (i32, i32)* nocapture %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %10)
ret i32 0
}
void config_save() {}


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

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

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

LLVM IR (-O2):
define void @config_save() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dump(int *, int);
int /*<<< orphan*/ merge_sort(int *, int);
void merge_sort_test() {
  int test[10] = {5, 8, 9, 23, 67, 1, 3, 7, 31, 56};
  merge_sort(test, 10);
  dump(test, 10);
}


x86 assembly (clang, -O0):
<merge_sort_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1050 <merge_sort@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1030 <dump@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort_test>:
push   %rbx
sub    $0x30,%rsp
mov    0xef4(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <merge_sort@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <dump@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.merge_sort_test.test = [10 x i32] [i32 5, i32 8, i32 9, i32 23, i32 67, i32 1, i32 3, i32 7, i32 31, i32 56]
define void @merge_sort_test() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @merge_sort(i32* %3, i32 10)
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%6 = call i32 @dump(i32* %5, i32 10)
ret void
}

LLVM IR (-O2):
@__const.merge_sort_test.test = [10 x i32] [i32 5, i32 8, i32 9, i32 23, i32 67, i32 1, i32 3, i32 7, i32 31, i32 56]
define void @merge_sort_test() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @merge_sort(i32* %3, i32 10)
%5 = call i32 @dump(i32* %3, i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_hw();
int /*<<< orphan*/ init_mem();
int /*<<< orphan*/ init_task();
int init_all(void) {
  init_mem();
  init_hw();
  init_task();
  return 0;
}


x86 assembly (clang, -O0):
<init_all>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <init_mem@plt>
mov    $0x0,%al
call   1050 <init_hw@plt>
mov    $0x0,%al
call   1040 <init_task@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_all>:
push   %rax
xor    %eax,%eax
call   1030 <init_mem@plt>
xor    %eax,%eax
call   1050 <init_hw@plt>
xor    %eax,%eax
call   1040 <init_task@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @init_all() {
%1 = call i32 (...) @init_mem()
%2 = call i32 (...) @init_hw()
%3 = call i32 (...) @init_task()
ret i32 0
}

LLVM IR (-O2):
define i32 @init_all() {
%1 = tail call i32 (...) @init_mem()
%2 = tail call i32 (...) @init_hw()
%3 = tail call i32 (...) @init_task()
ret i32 0
}
void fa83(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    a:
      goto a;
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa83>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa83+0x4>

x86 assembly (clang, -O2):
<fa83>:
jmp    1100 <fa83>

LLVM IR (-O0):
define void @fa83() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; preds = %16
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
br label %19
19: ; preds = %19, %18
br label %19
20: ; No predecessors!
br label %21
21: ; preds = %21, %20
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
br label %24
24: ; preds = %24, %23
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
27: ; preds = %27
br label %27
}

LLVM IR (-O2):
define void @fa83() {
br label %1
1: ; preds = %1, %0
br label %1
}
void pbnum(n) int n;
{
  register int num;
  num = (n < 0) ? -n : n;
  do {
    putback(num % 10 + '0');
  } while ((num /= 10) > 0);
  if (n < 0)
    putback('-');
}


x86 assembly (clang, -O0):
<pbnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1132 <pbnum+0x22>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1138 <pbnum+0x28>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x30,%edi
mov    $0x0,%al
call   1030 <putback@plt>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jg     113e <pbnum+0x2e>
cmpl   $0x0,-0x4(%rbp)
jge    1182 <pbnum+0x72>
mov    $0x2d,%edi
mov    $0x0,%al
call   1030 <putback@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pbnum>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
xchg   %ax,%ax
movslq %eax,%rbx
imul   $0x66666667,%rbx,%rbp
mov    %rbp,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rbp
add    %ecx,%ebp
lea    0x0(%rbp,%rbp,1),%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x30,%edi
xor    %eax,%eax
call   1030 <putback@plt>
mov    %ebp,%eax
cmp    $0x9,%ebx
jg     1120 <pbnum+0x10>
test   %r14d,%r14d
js     115e <pbnum+0x4e>
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    $0x2d,%edi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putback@plt>

LLVM IR (-O0):
define void @pbnum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sub nsw i32 0, %7
br label %11
9: ; preds = %1
%10 = load i32, i32* %2
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %8, %6 ], [ %10, %9 ]
store i32 %12, i32* %3
br label %13
13: ; preds = %18, %11
%14 = load i32, i32* %3
%15 = srem i32 %14, 10
%16 = add nsw i32 %15, 48
%17 = call i32 (i32, ...) bitcast (i32 (...)* @putback to i32 (i32, ...)*)(i32 %16)
br label %18
18: ; preds = %13
%19 = load i32, i32* %3
%20 = sdiv i32 %19, 10
store i32 %20, i32* %3
%21 = icmp sgt i32 %20, 0
br i1 %21, label %13, label %22
22: ; preds = %18
%23 = load i32, i32* %2
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = call i32 (i32, ...) bitcast (i32 (...)* @putback to i32 (i32, ...)*)(i32 45)
br label %27
27: ; preds = %25, %22
ret void
}

LLVM IR (-O2):
define void @pbnum(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = sub nsw i32 0, %0
%4 = select i1 %2, i32 %3, i32 %0
br label %5
5: ; preds = %5, %1
%6 = phi i32 [ %4, %1 ], [ %10, %5 ]
%7 = srem i32 %6, 10
%8 = add nsw i32 %7, 48
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @putback to i32 (i32, ...)*)(i32 %8)
%10 = sdiv i32 %6, 10
%11 = icmp sgt i32 %6, 9
br i1 %11, label %5, label %12
12: ; preds = %5
br i1 %2, label %13, label %15
13: ; preds = %12
%14 = tail call i32 (i32, ...) bitcast (i32 (...)* @putback to i32 (i32, ...)*)(i32 45)
br label %15
15: ; preds = %13, %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cutils_fmtc_repr(char *, int, char *, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stdout;
void cutils_cout_char_print(char character) {
  char buffer[8];
  cutils_fmtc_repr(buffer, 8, &character, 1);
  fprintf(stdout, "%s\n", buffer);
}


x86 assembly (clang, -O0):
<cutils_cout_char_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    -0x9(%rbp),%rdi
mov    $0x8,%esi
lea    -0x1(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <cutils_fmtc_repr@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    -0x9(%rbp),%rdx
lea    0xea7(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutils_cout_char_print>:
push   %rbx
sub    $0x10,%rsp
mov    %dil,0x7(%rsp)
lea    0x8(%rsp),%rbx
lea    0x7(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x1,%ecx
call   1030 <cutils_fmtc_repr@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@stdout = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @cutils_cout_char_print(i8 signext %0) {
%2 = alloca i8
%3 = alloca [8 x i8]
store i8 %0, i8* %2
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%5 = call i32 @cutils_fmtc_repr(i8* %4, i32 8, i8* %2, i32 1)
%6 = load i32, i32* @stdout
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
void *hhcalloc(int, size_t);
void *hhmalloc(size_t size) { return hhcalloc(1, size); }


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

x86 assembly (clang, -O2):
<hhmalloc>:
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <hhcalloc@plt>

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

LLVM IR (-O2):
define i8* @hhmalloc(i64 %0) {
%2 = tail call i8* @hhcalloc(i32 1, i64 %0)
ret i8* %2
}
/* Type definitions */
typedef int uint32_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
int32_t arith_shift_left(int32_t x, int shift) {
  return (int32_t)(((uint32_t)x) << shift);
}


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

x86 assembly (clang, -O2):
<arith_shift_left>:
mov    %esi,%ecx
shl    %cl,%edi
movslq %edi,%rax
ret

LLVM IR (-O0):
define i64 @arith_shift_left(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = trunc i64 %5 to i32
%7 = load i32, i32* %4
%8 = shl i32 %6, %7
%9 = sext i32 %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @arith_shift_left(i64 %0, i32 %1) {
%3 = trunc i64 %0 to i32
%4 = shl i32 %3, %1
%5 = sext i32 %4 to i64
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ test_9();
int main(void) {
  test_9();
  const char *str = "\x12\x34\x56\x78";
  printf("%x", *(int *)str);
}


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"\124Vx\00"
@.str.1 = [3 x i8] c"%x\00"
define i32 @main() {
%1 = alloca i8*
%2 = call i32 (...) @test_9()
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = load i8*, i8** %1
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%x\00"
define i32 @main() {
%1 = tail call i32 (...) @test_9()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2018915346)
ret i32 0
}
/* Variables and functions */
scalar_t__ dcac_info_ops(int, int, int /*<<< orphan*/ *, char *, int);
int dcac_get_attr_name(int fd, char *buf, int bufsize) {
  return (int)dcac_info_ops(61, fd, NULL, buf, bufsize);
}


x86 assembly (clang, -O0):
<dcac_get_attr_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0x3d,%edi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <dcac_info_ops@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcac_get_attr_name>:
mov    %edx,%r8d
mov    %rsi,%rcx
mov    %edi,%esi
mov    $0x3d,%edi
xor    %edx,%edx
jmp    1030 <dcac_info_ops@plt>

LLVM IR (-O0):
define i32 @dcac_get_attr_name(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i64 @dcac_info_ops(i32 61, i32 %7, i32* null, i8* %8, i32 %9)
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @dcac_get_attr_name(i32 %0, i8* %1, i32 %2) {
%4 = tail call i64 @dcac_info_ops(i32 61, i32 %0, i32* null, i8* %1, i32 %2)
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ HonggfuzzFetchData(int /*<<< orphan*/ const **, size_t *);
void HF_ITER(const uint8_t **buf_ptr, size_t *len_ptr) {
  HonggfuzzFetchData(buf_ptr, len_ptr);
}


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

x86 assembly (clang, -O2):
<HF_ITER>:
jmp    1030 <HonggfuzzFetchData@plt>

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

LLVM IR (-O2):
define void @HF_ITER(i32** %0, i64* %1) {
%3 = tail call i32 @HonggfuzzFetchData(i32** %0, i64* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xb6() {
  Assert_real((isxdigit(182) == 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",
              915, ("isxdigit should be 0 for 0xb6"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xb6>:
push   %rax
mov    $0xb6,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x393,%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 = [30 x i8] c"isxdigit should be 0 for 0xb6\00"
define void @t_isxdigit_0xb6() {
%1 = call i64 @isxdigit(i32 182)
%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 915, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xb6\00"
define void @t_isxdigit_0xb6() {
%1 = tail call i64 @isxdigit(i32 182)
%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 915, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int ft_strcmp(char *s1, char *s2) {
  return ((*s1 == *s2 && *s1) ? ft_strcmp(s1 + 1, s2 + 1) : *s1 - *s2);
}


x86 assembly (clang, -O0):
<ft_strcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1163 <ft_strcmp+0x53>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1163 <ft_strcmp+0x53>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
add    $0x1,%rsi
call   1030 <ft_strcmp@plt>
mov    %eax,-0x14(%rbp)
jmp    1176 <ft_strcmp+0x66>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strcmp>:
mov    (%rdi),%al
mov    (%rsi),%cl
test   %al,%al
je     1134 <ft_strcmp+0x34>
cmp    %cl,%al
jne    1134 <ft_strcmp+0x34>
mov    $0x1,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rdx,1),%eax
movzbl (%rsi,%rdx,1),%ecx
test   %al,%al
je     1134 <ft_strcmp+0x34>
add    $0x1,%rdx
cmp    %cl,%al
je     1120 <ft_strcmp+0x20>
movsbl %al,%eax
movsbl %cl,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ft_strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %7, %10
br i1 %11, label %12, label %23
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %23
17: ; preds = %12
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i64 1
%20 = load i8*, i8** %4
%21 = getelementptr inbounds i8, i8* %20, i64 1
%22 = call i32 @ft_strcmp(i8* %19, i8* %21)
br label %31
23: ; preds = %12, %2
%24 = load i8*, i8** %3
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = load i8*, i8** %4
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = sub nsw i32 %26, %29
br label %31
31: ; preds = %23, %17
%32 = phi i32 [ %22, %17 ], [ %30, %23 ]
ret i32 %32
}

LLVM IR (-O2):
define i32 @ft_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp ne i8 %3, %4
%6 = icmp eq i8 %3, 0
%7 = or i1 %6, %5
br i1 %7, label %18, label %8
8: ; preds = %2, %8
%9 = phi i8* [ %12, %8 ], [ %1, %2 ]
%10 = phi i8* [ %11, %8 ], [ %0, %2 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = load i8, i8* %11
%14 = load i8, i8* %12
%15 = icmp ne i8 %13, %14
%16 = icmp eq i8 %13, 0
%17 = or i1 %16, %15
br i1 %17, label %18, label %8
18: ; preds = %8, %2
%19 = phi i8 [ %3, %2 ], [ %13, %8 ]
%20 = phi i8 [ %4, %2 ], [ %14, %8 ]
%21 = sext i8 %19 to i32
%22 = sext i8 %20 to i32
%23 = sub nsw i32 %21, %22
ret i32 %23
}
int utos1(unsigned int value) {
  return (value & 0x80) ? -(signed)(value ^ 0xff) - 1 : value;
}


x86 assembly (clang, -O0):
<utos1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1130 <utos1+0x30>
mov    -0x4(%rbp),%ecx
xor    $0xff,%ecx
xor    %eax,%eax
sub    %ecx,%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <utos1+0x36>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utos1>:
mov    %edi,%eax
xor    $0xffffff00,%eax
test   $0x80,%dil
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @utos1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 128
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = xor i32 %7, 255
%9 = sub nsw i32 0, %8
%10 = sub nsw i32 %9, 1
br label %13
11: ; preds = %1
%12 = load i32, i32* %2
br label %13
13: ; preds = %11, %6
%14 = phi i32 [ %10, %6 ], [ %12, %11 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @utos1(i32 %0) {
%2 = and i32 %0, 128
%3 = icmp eq i32 %2, 0
%4 = xor i32 %0, -256
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int readbyte();
int readfilelength() {
  int fs = 0, bv = 0;
  int a, b, c;
  a = readbyte() * 256 * 256;
  b = readbyte() * 256;
  c = readbyte();
  fs = a + b + c;
  printf("%d bytes \n", fs);
  return fs;
}


x86 assembly (clang, -O0):
<readfilelength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <readbyte@plt>
shl    $0x8,%eax
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <readbyte@plt>
shl    $0x8,%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <readbyte@plt>
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readfilelength>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <readbyte@plt>
mov    %eax,%ebx
shl    $0x10,%ebx
xor    %eax,%eax
call   1040 <readbyte@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1040 <readbyte@plt>
mov    %eax,%ebx
add    %ebp,%ebx
lea    0xeb1(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%d bytes \0A\00"
define i32 @readfilelength() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%6 = call i32 (...) @readbyte()
%7 = mul nsw i32 %6, 256
%8 = mul nsw i32 %7, 256
store i32 %8, i32* %3
%9 = call i32 (...) @readbyte()
%10 = mul nsw i32 %9, 256
store i32 %10, i32* %4
%11 = call i32 (...) @readbyte()
store i32 %11, i32* %5
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = add nsw i32 %12, %13
%15 = load i32, i32* %5
%16 = add nsw i32 %14, %15
store i32 %16, i32* %1
%17 = load i32, i32* %1
%18 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
@.str = [11 x i8] c"%d bytes \0A\00"
define i32 @readfilelength() {
%1 = tail call i32 (...) @readbyte()
%2 = shl nsw i32 %1, 16
%3 = tail call i32 (...) @readbyte()
%4 = shl nsw i32 %3, 8
%5 = tail call i32 (...) @readbyte()
%6 = add nsw i32 %4, %2
%7 = add nsw i32 %6, %5
%8 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ NAME_CONSTRAINTS;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ NAME_CONSTRAINTS_it;
void NAME_CONSTRAINTS_free(NAME_CONSTRAINTS *a) {
  ASN1_item_free((ASN1_VALUE *)a, &NAME_CONSTRAINTS_it);
}


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

x86 assembly (clang, -O2):
<NAME_CONSTRAINTS_free>:
mov    0x2ee1(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

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

LLVM IR (-O2):
@NAME_CONSTRAINTS_it = global i32 0
define void @NAME_CONSTRAINTS_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @NAME_CONSTRAINTS_it)
ret void
}
int set_usemalloc() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @set_usemalloc() {
ret i32 0
}
void gdk_colormap_new() {}


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

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

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

LLVM IR (-O2):
define void @gdk_colormap_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void xmlClose(void) { printf("</system>\n"); }


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"</system>\00"
define void @xmlClose() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int sweep_quaddobl_real_run(void) {
  int fail, *b;
  double *c;
  int precision = 2;
  fail = _ada_use_c2phc(621, &precision, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<sweep_quaddobl_real_run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x2,-0x1c(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x26d,%edi
lea    -0x1c(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sweep_quaddobl_real_run>:
push   %rax
movl   $0x2,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x26d,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sweep_quaddobl_real_run() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca double*
%4 = alloca i32
store i32 2, i32* %4
%5 = load i32*, i32** %2
%6 = load double*, double** %3
%7 = call i32 @_ada_use_c2phc(i32 621, i32* %4, i32* %5, double* %6)
store i32 %7, i32* %1
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @sweep_quaddobl_real_run() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 2, i32* %1
%3 = call i32 @_ada_use_c2phc(i32 621, i32* %1, i32* undef, double* undef)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ randLIB_get_n_bytes_random(int /*<<< orphan*/ *, int);
uint32_t randLIB_get_32bit(void) {
  uint32_t ret_val;
  randLIB_get_n_bytes_random((uint8_t *)&ret_val, 4);
  return ret_val;
}


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

x86 assembly (clang, -O2):
<randLIB_get_32bit>:
push   %rax
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <randLIB_get_n_bytes_random@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @randLIB_get_32bit() {
%1 = alloca i32
%2 = call i32 @randLIB_get_n_bytes_random(i32* %1, i32 4)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @randLIB_get_32bit() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @randLIB_get_n_bytes_random(i32* %1, i32 4)
%4 = load i32, i32* %1
ret i32 %4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t div64_u64(uint64_t dividend, uint64_t divisor) {
  return dividend / divisor;
}


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

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

LLVM IR (-O0):
define i32 @div64_u64(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 = sdiv i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @div64_u64(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ bill(char *);
int /*<<< orphan*/ fred(int);
void main() {
  fred(666666);
  bill("Hello World");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa2c2a,%edi
call   1040 <fred@plt>
lea    0xecb(%rip),%rdi
call   1030 <bill@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa2c2a,%edi
call   1040 <fred@plt>
lea    0xece(%rip),%rdi
pop    %rax
jmp    1030 <bill@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Hello World\00"
define void @main() {
%1 = call i32 @fred(i32 666666)
%2 = call i32 @bill(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello World\00"
define void @main() {
%1 = tail call i32 @fred(i32 666666)
%2 = tail call i32 @bill(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int privsep_rresvport_af(int *, int /*<<< orphan*/);
int privsep_rresvport(int *lport) {
  return privsep_rresvport_af(lport, AF_INET);
}


x86 assembly (clang, -O0):
<privsep_rresvport>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
call   1030 <privsep_rresvport_af@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<privsep_rresvport>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <privsep_rresvport_af@plt>

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

LLVM IR (-O2):
@AF_INET = global i32 0
define i32 @privsep_rresvport(i32* %0) {
%2 = load i32, i32* @AF_INET
%3 = tail call i32 @privsep_rresvport_af(i32* %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ jupiter_print(char *);
int main(int argc, char *argv[]) {
  jupiter_print(argv[0]);
  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    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <jupiter_print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    (%rsi),%rdi
call   1030 <jupiter_print@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 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @jupiter_print(i8* %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @jupiter_print(i8* %3)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void test_vorrimm_u32x4(uint32_t *__restrict__ dest, uint32_t *a) {
  int i;
  for (i = 0; i < 4; i++) {
    dest[i] = a[i] | 1;
  }
}


x86 assembly (clang, -O0):
<test_vorrimm_u32x4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    1144 <test_vorrimm_u32x4+0x44>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
or     $0x1,%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <test_vorrimm_u32x4+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_vorrimm_u32x4>:
movups (%rsi),%xmm0
orps   0xef6(%rip),%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @test_vorrimm_u32x4(i32* noalias %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %6
6: ; preds = %20, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 4
br i1 %8, label %9, label %23
9: ; preds = %6
%10 = load i32*, i32** %4
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
%15 = or i32 %14, 1
%16 = load i32*, i32** %3
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
store i32 %15, i32* %19
br label %20
20: ; preds = %9
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %6
23: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @test_vorrimm_u32x4(i32* noalias nocapture writeonly %0, i32* nocapture %1) {
%3 = bitcast i32* %1 to <4 x i32>*
%4 = load <4 x i32>, <4 x i32>* %3
%5 = or <4 x i32> %4, <i32 1, i32 1, i32 1, i32 1>
%6 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %5, <4 x i32>* %6
ret void
}
/* Variables and functions */
scalar_t__ calculate();
int /*<<< orphan*/ doX();
void problems_in_macros_between_if_else() {
  if (calculate()) {
    doX();
  }
}


x86 assembly (clang, -O0):
<problems_in_macros_between_if_else>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <calculate@plt>
cmp    $0x0,%rax
je     113c <problems_in_macros_between_if_else+0x1c>
mov    $0x0,%al
call   1040 <doX@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<problems_in_macros_between_if_else>:
push   %rax
xor    %eax,%eax
call   1030 <calculate@plt>
test   %rax,%rax
je     1135 <problems_in_macros_between_if_else+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1040 <doX@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @problems_in_macros_between_if_else() {
%1 = call i64 (...) @calculate()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @doX()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @problems_in_macros_between_if_else() {
%1 = tail call i64 (...) @calculate()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @doX()
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free_protected_blocks();
int /*<<< orphan*/ free_unused_blocks();
void AT_free_protected_blocks() {
  free_unused_blocks();
  free_protected_blocks();
}


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

x86 assembly (clang, -O2):
<AT_free_protected_blocks>:
push   %rax
xor    %eax,%eax
call   1040 <free_unused_blocks@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <free_protected_blocks@plt>

LLVM IR (-O0):
define void @AT_free_protected_blocks() {
%1 = call i32 (...) @free_unused_blocks()
%2 = call i32 (...) @free_protected_blocks()
ret void
}

LLVM IR (-O2):
define void @AT_free_protected_blocks() {
%1 = tail call i32 (...) @free_unused_blocks()
%2 = tail call i32 (...) @free_protected_blocks()
ret void
}
int hammingWeight(unsigned n) {
  int i = 0;
  while (n) {
    if (n & 1)
      i++;
    n >>= 1;
  }
  return i;
}


x86 assembly (clang, -O0):
<hammingWeight>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113e <hammingWeight+0x3e>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1130 <hammingWeight+0x30>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <hammingWeight+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hammingWeight>:
xor    %eax,%eax
test   %edi,%edi
je     1120 <hammingWeight+0x20>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %edx,%eax
shr    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <hammingWeight+0x10>
ret

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

LLVM IR (-O2):
define i32 @hammingWeight(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = and i32 %5, 1
%7 = add nuw nsw i32 %4, %6
%8 = lshr i32 %5, 1
%9 = icmp ult i32 %5, 2
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_MD_CTX;

/* Variables and functions */
int EVP_MD_CTX_cleanup(int /*<<< orphan*/ *);
int /*<<< orphan*/ EVP_MD_CTX_init(int /*<<< orphan*/ *);
int EVP_MD_CTX_reset(EVP_MD_CTX *ctx) {
  int ret = EVP_MD_CTX_cleanup(ctx);
  if (!ret) {
    return ret;
  }
  EVP_MD_CTX_init(ctx);
  return ret;
}


x86 assembly (clang, -O0):
<EVP_MD_CTX_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <EVP_MD_CTX_cleanup@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    114d <EVP_MD_CTX_reset+0x2d>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115c <EVP_MD_CTX_reset+0x3c>
mov    -0x10(%rbp),%rdi
call   1030 <EVP_MD_CTX_init@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EVP_MD_CTX_reset>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <EVP_MD_CTX_cleanup@plt>
mov    %eax,%ebp
test   %eax,%eax
je     1139 <EVP_MD_CTX_reset+0x19>
mov    %rbx,%rdi
call   1030 <EVP_MD_CTX_init@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @EVP_MD_CTX_reset(i32* %0) {
%2 = tail call i32 @EVP_MD_CTX_cleanup(i32* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @EVP_MD_CTX_init(i32* %0)
br label %6
6: ; preds = %1, %4
ret i32 %2
}
/* Variables and functions */
long labs(long);
int signalOf(long x) {
  if (x == 0)
    return 0;
  else
    return (int)(x / labs(x));
}


x86 assembly (clang, -O0):
<signalOf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <signalOf+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1153 <signalOf+0x43>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <labs@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cqto
idiv   %rcx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signalOf>:
xor    %ecx,%ecx
xor    %eax,%eax
test   %rdi,%rdi
setns  %al
lea    -0x1(%rax,%rax,1),%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @signalOf(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %13
7: ; preds = %1
%8 = load i64, i64* %3
%9 = load i64, i64* %3
%10 = call i64 @labs(i64 %9)
%11 = sdiv i64 %8, %10
%12 = trunc i64 %11 to i32
store i32 %12, i32* %2
br label %13
13: ; preds = %7, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @signalOf(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = icmp sgt i64 %0, -1
%4 = select i1 %3, i32 1, i32 -1
%5 = select i1 %2, i32 0, i32 %4
ret i32 %5
}
/* Variables and functions */
int flob();
int main(void) { return (flob() == 1 ? 0 : 1); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <flob@plt>
mov    %eax,%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x1,%edx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <flob@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @flob()
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 0, i32 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @flob()
%2 = icmp ne i32 %1, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
struct SoundDriverNull {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct SoundDriverNull *);
void CloseSoundNull(struct SoundDriverNull *object) { free(object); }


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

x86 assembly (clang, -O2):
<CloseSoundNull>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.SoundDriverNull = type { i32 }
define void @CloseSoundNull(%struct.SoundDriverNull* nocapture %0) {
%2 = tail call i32 @free(%struct.SoundDriverNull* %0)
ret void
}
void RSM() {}


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

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

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

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