xunge/DecIR huggingface dataset:
int math_N(n, h)
int n;
int h;
{
  register int i;
  double v;
  for (i = 0, v = (int)n; i < h; i++)
    v = log2(v);
  return (int)ceil((double)1.0 * n / v);
}


x86 assembly (clang, -O0):
<math_N>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1168 <math_N+0x48>
movsd  -0x18(%rbp),%xmm0
call   1030 <log2@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <math_N+0x1f>
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xe8b(%rip),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x18(%rbp),%xmm0
call   1040 <ceil@plt>
cvttsd2si %xmm0,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_N>:
push   %rbx
sub    $0x10,%rsp
cvtsi2sd %edi,%xmm0
movsd  %xmm0,0x8(%rsp)
test   %esi,%esi
jle    114a <math_N+0x2a>
mov    %esi,%ebx
movsd  0x8(%rsp),%xmm0
nopl   0x0(%rax,%rax,1)
call   1030 <log2@plt>
add    $0xffffffff,%ebx
jne    1140 <math_N+0x20>
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1040 <ceil@plt>
cvttsd2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @math_N(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to double
store double %8, double* %6
br label %9
9: ; preds = %16, %2
%10 = load i32, i32* %5
%11 = load i32, i32* %4
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %19
13: ; preds = %9
%14 = load double, double* %6
%15 = call double @log2(double %14)
store double %15, double* %6
br label %16
16: ; preds = %13
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %9
19: ; preds = %9
%20 = load i32, i32* %3
%21 = sitofp i32 %20 to double
%22 = fmul double 1.000000e+00, %21
%23 = load double, double* %6
%24 = fdiv double %22, %23
%25 = call double @llvm.ceil.f64(double %24)
%26 = fptosi double %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @math_N(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to double
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %11
5: ; preds = %2, %5
%6 = phi double [ %8, %5 ], [ %3, %2 ]
%7 = phi i32 [ %9, %5 ], [ 0, %2 ]
%8 = tail call double @log2(double %6)
%9 = add nuw nsw i32 %7, 1
%10 = icmp eq i32 %9, %1
br i1 %10, label %11, label %5
11: ; preds = %5, %2
%12 = phi double [ %3, %2 ], [ %8, %5 ]
%13 = fdiv double %3, %12
%14 = tail call double @llvm.ceil.f64(double %13)
%15 = fptosi double %14 to i32
ret i32 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ ENOENT;
scalar_t__ errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int can_write(char *str) {
  FILE *file;
  if ((file = fopen(str, "r")) == NULL) {
    if (errno == ENOENT) {
      return 1;
    } else {
      return 1;
    }
  } else {
    fclose(file);
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<can_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    117c <can_write+0x5c>
mov    0x2e8f(%rip),%rax
mov    (%rax),%rax
mov    0x2e75(%rip),%rcx
cmp    (%rcx),%rax
jne    1170 <can_write+0x50>
movl   $0x1,-0x4(%rbp)
jmp    118c <can_write+0x6c>
movl   $0x1,-0x4(%rbp)
jmp    118c <can_write+0x6c>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<can_write>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     113e <can_write+0x1e>
mov    %rax,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@errno = global i64 0
@ENOENT = global i64 0
define i32 @can_write(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i64, i64* @errno
%10 = load i64, i64* @ENOENT
%11 = icmp eq i64 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %17
13: ; preds = %8
store i32 1, i32* %2
br label %17
14: ; preds = %1
%15 = load i32*, i32** %4
%16 = call i32 @fclose(i32* %15)
store i32 0, i32* %2
br label %17
17: ; preds = %14, %13, %12
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@errno = global i64 0
@ENOENT = global i64 0
define i32 @can_write(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 0, %4 ], [ 1, %1 ]
ret i32 %7
}
int PR8962_f(int *t) {
  if (__extension__({
        _Bool r;
        if (t)
          r = 0;
        else
          r = 1;
        r;
      }))
    return 0;
  return *t;
}


x86 assembly (clang, -O0):
<PR8962_f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     111c <PR8962_f+0x1c>
movb   $0x0,-0x11(%rbp)
jmp    1120 <PR8962_f+0x20>
movb   $0x1,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
mov    %al,-0x12(%rbp)
testb  $0x1,-0x12(%rbp)
je     113e <PR8962_f+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    1147 <PR8962_f+0x47>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PR8962_f>:
test   %rdi,%rdi
je     1108 <PR8962_f+0x8>
mov    (%rdi),%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @PR8962_f(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i8
%5 = alloca i8
store i32* %0, i32** %3
%6 = load i32*, i32** %3
%7 = icmp ne i32* %6, null
br i1 %7, label %8, label %9
8: ; preds = %1
store i8 0, i8* %4
br label %10
9: ; preds = %1
store i8 1, i8* %4
br label %10
10: ; preds = %9, %8
%11 = load i8, i8* %4
%12 = trunc i8 %11 to i1
%13 = zext i1 %12 to i8
store i8 %13, i8* %5
%14 = load i8, i8* %5
%15 = trunc i8 %14 to i1
br i1 %15, label %16, label %17
16: ; preds = %10
store i32 0, i32* %2
br label %20
17: ; preds = %10
%18 = load i32*, i32** %3
%19 = load i32, i32* %18
store i32 %19, i32* %2
br label %20
20: ; preds = %17, %16
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @PR8962_f(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = load i32, i32* %0
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ RamWrite32A(int, int /*<<< orphan*/);
void ClrMesFil(void) {
  RamWrite32A(0x0000 + 0x04D0, 0);
  RamWrite32A(0x0004 + 0x0000 + 0x04D0, 0);
  RamWrite32A(0x0004 + 0x0004 + 0x0000 + 0x04D0, 0);
  RamWrite32A(0x0004 + 0x0004 + 0x0004 + 0x0000 + 0x04D0, 0);
  RamWrite32A(0x0000 + 0x04E0, 0);
  RamWrite32A(0x0004 + 0x0000 + 0x04E0, 0);
  RamWrite32A(0x0004 + 0x0004 + 0x0000 + 0x04E0, 0);
  RamWrite32A(0x0004 + 0x0004 + 0x0004 + 0x0000 + 0x04E0, 0);
}


x86 assembly (clang, -O0):
<ClrMesFil>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4d0,%edi
xor    %esi,%esi
call   1030 <RamWrite32A@plt>
mov    $0x4d4,%edi
xor    %esi,%esi
call   1030 <RamWrite32A@plt>
mov    $0x4d8,%edi
xor    %esi,%esi
call   1030 <RamWrite32A@plt>
mov    $0x4dc,%edi
xor    %esi,%esi
call   1030 <RamWrite32A@plt>
mov    $0x4e0,%edi
xor    %esi,%esi
call   1030 <RamWrite32A@plt>
mov    $0x4e4,%edi
xor    %esi,%esi
call   1030 <RamWrite32A@plt>
mov    $0x4e8,%edi
xor    %esi,%esi
call   1030 <RamWrite32A@plt>
mov    $0x4ec,%edi
xor    %esi,%esi
call   1030 <RamWrite32A@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClrMesFil>:
push   %rax
mov    $0x4d0,%edi
xor    %esi,%esi
call   1030 <RamWrite32A@plt>
mov    $0x4d4,%edi
xor    %esi,%esi
call   1030 <RamWrite32A@plt>
mov    $0x4d8,%edi
xor    %esi,%esi
call   1030 <RamWrite32A@plt>
mov    $0x4dc,%edi
xor    %esi,%esi
call   1030 <RamWrite32A@plt>
mov    $0x4e0,%edi
xor    %esi,%esi
call   1030 <RamWrite32A@plt>
mov    $0x4e4,%edi
xor    %esi,%esi
call   1030 <RamWrite32A@plt>
mov    $0x4e8,%edi
xor    %esi,%esi
call   1030 <RamWrite32A@plt>
mov    $0x4ec,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <RamWrite32A@plt>

LLVM IR (-O0):
define void @ClrMesFil() {
%1 = call i32 @RamWrite32A(i32 1232, i32 0)
%2 = call i32 @RamWrite32A(i32 1236, i32 0)
%3 = call i32 @RamWrite32A(i32 1240, i32 0)
%4 = call i32 @RamWrite32A(i32 1244, i32 0)
%5 = call i32 @RamWrite32A(i32 1248, i32 0)
%6 = call i32 @RamWrite32A(i32 1252, i32 0)
%7 = call i32 @RamWrite32A(i32 1256, i32 0)
%8 = call i32 @RamWrite32A(i32 1260, i32 0)
ret void
}

LLVM IR (-O2):
define void @ClrMesFil() {
%1 = tail call i32 @RamWrite32A(i32 1232, i32 0)
%2 = tail call i32 @RamWrite32A(i32 1236, i32 0)
%3 = tail call i32 @RamWrite32A(i32 1240, i32 0)
%4 = tail call i32 @RamWrite32A(i32 1244, i32 0)
%5 = tail call i32 @RamWrite32A(i32 1248, i32 0)
%6 = tail call i32 @RamWrite32A(i32 1252, i32 0)
%7 = tail call i32 @RamWrite32A(i32 1256, i32 0)
%8 = tail call i32 @RamWrite32A(i32 1260, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x09() {
  Assert_real((isupper(9) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              50, ("isupper should be 0 for 0x09"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x09>:
push   %rax
mov    $0x9,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x32,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x09\00"
define void @t_isupper_0x09() {
%1 = call i64 @isupper(i32 9)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 50, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x09\00"
define void @t_isupper_0x09() {
%1 = tail call i64 @isupper(i32 9)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 50, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SendInterrupt(int, int, int, int);
void ScuSendLevel0DMAEnd(void) { SendInterrupt(0x4B, 0x5, 0x0800, 0x00000800); }


x86 assembly (clang, -O0):
<ScuSendLevel0DMAEnd>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4b,%edi
mov    $0x5,%esi
mov    $0x800,%ecx
mov    %ecx,%edx
call   1030 <SendInterrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ScuSendLevel0DMAEnd>:
mov    $0x4b,%edi
mov    $0x5,%esi
mov    $0x800,%edx
mov    $0x800,%ecx
jmp    1030 <SendInterrupt@plt>

LLVM IR (-O0):
define void @ScuSendLevel0DMAEnd() {
%1 = call i32 @SendInterrupt(i32 75, i32 5, i32 2048, i32 2048)
ret void
}

LLVM IR (-O2):
define void @ScuSendLevel0DMAEnd() {
%1 = tail call i32 @SendInterrupt(i32 75, i32 5, i32 2048, i32 2048)
ret void
}
void transfer_YUV888_to_YUV888(unsigned char *(*output), unsigned char *input) {
  (*output)[0] = (int)input[0];
  (*output)[1] = input[1];
  (*output)[2] = input[2];
  (*output) += 3;
}


x86 assembly (clang, -O0):
<transfer_YUV888_to_YUV888>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x3,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<transfer_YUV888_to_YUV888>:
mov    (%rsi),%al
mov    (%rdi),%rcx
mov    %al,(%rcx)
mov    0x1(%rsi),%al
mov    (%rdi),%rcx
mov    %al,0x1(%rcx)
mov    0x2(%rsi),%al
mov    (%rdi),%rcx
mov    %al,0x2(%rcx)
addq   $0x3,(%rdi)
ret

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

LLVM IR (-O2):
define void @transfer_YUV888_to_YUV888(i8** nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = load i8*, i8** %0
store i8 %3, i8* %4
%5 = getelementptr inbounds i8, i8* %1, i64 1
%6 = load i8, i8* %5
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %8
%9 = getelementptr inbounds i8, i8* %1, i64 2
%10 = load i8, i8* %9
%11 = load i8*, i8** %0
%12 = getelementptr inbounds i8, i8* %11, i64 2
store i8 %10, i8* %12
%13 = load i8*, i8** %0
%14 = getelementptr inbounds i8, i8* %13, i64 3
store i8* %14, i8** %0
ret void
}
/* Variables and functions */
int hash(char *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  int res;
  char word[200];
  scanf("%s", word);
  res = hash(word);
  printf("%li", res);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1050 <scanf@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <hash@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xd0,%rsp
lea    0xec1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <hash@plt>
lea    0xeaa(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%li\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @hash(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
void core_abort() { asm volatile("syscall" : :); }


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

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

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

LLVM IR (-O2):
define void @core_abort() {
tail call void asm sideeffect "syscall", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void stm32_enable_write_protection() {}


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

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

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

LLVM IR (-O2):
define void @stm32_enable_write_protection() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ iokit_post_constructor_init();
void last_kernel_constructor(void) { iokit_post_constructor_init(); }


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

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

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

LLVM IR (-O2):
define void @last_kernel_constructor() {
%1 = tail call i32 (...) @iokit_post_constructor_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int set_cursor_visibility(bool visible) {
  if (visible)
    printf("\033[?25h");
  else
    printf("\033[?25l");
  return 0;
}


x86 assembly (clang, -O0):
<set_cursor_visibility>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1136 <set_cursor_visibility+0x26>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <set_cursor_visibility+0x32>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cursor_visibility>:
push   %rax
test   %edi,%edi
lea    0xeed(%rip),%rax
lea    0xedf(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"\1B[?25h\00"
@.str.1 = [7 x i8] c"\1B[?25l\00"
define i32 @set_cursor_visibility(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"\1B[?25h\00"
@.str.1 = [7 x i8] c"\1B[?25l\00"
define i32 @set_cursor_visibility(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @printf(i8* dereferenceable(1) %3)
ret i32 0
}
/* Variables and functions */
char *talloc_strdup_append_buffer(char *, char const *);
void torture_dump_data_str_cb(const char *buf, void *private_data) {
  char **dump = (char **)private_data;
  *dump = talloc_strdup_append_buffer(*dump, buf);
}


x86 assembly (clang, -O0):
<torture_dump_data_str_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <talloc_strdup_append_buffer@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<torture_dump_data_str_cb>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    (%rbx),%rdi
call   1030 <talloc_strdup_append_buffer@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @torture_dump_data_str_cb(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i8**
store i8** %7, i8*** %5
%8 = load i8**, i8*** %5
%9 = load i8*, i8** %8
%10 = load i8*, i8** %3
%11 = call i8* @talloc_strdup_append_buffer(i8* %9, i8* %10)
%12 = load i8**, i8*** %5
store i8* %11, i8** %12
ret void
}

LLVM IR (-O2):
define void @torture_dump_data_str_cb(i8* %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i8**
%4 = load i8*, i8** %3
%5 = tail call i8* @talloc_strdup_append_buffer(i8* %4, i8* %0)
store i8* %5, i8** %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ run_tests_array_style();
int /*<<< orphan*/ run_tests_ptr_style();
int main(void) {
  run_tests_array_style();
  run_tests_ptr_style();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <run_tests_array_style@plt>
xor    %eax,%eax
call   1040 <run_tests_ptr_style@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @run_tests_array_style()
%3 = call i32 (...) @run_tests_ptr_style()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @run_tests_array_style()
%2 = tail call i32 (...) @run_tests_ptr_style()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CONS_Debug(int, char *);
int /*<<< orphan*/ HU_LoadGraphics();
int /*<<< orphan*/ ST_LoadGraphics();
int /*<<< orphan*/ ST_ReloadSkinFaceGraphics();
void R_ReloadHUDGraphics(void) {
  CONS_Debug(0x0008, "R_ReloadHUDGraphics()...\n");
  ST_LoadGraphics();
  HU_LoadGraphics();
  ST_ReloadSkinFaceGraphics();
}


x86 assembly (clang, -O0):
<R_ReloadHUDGraphics>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
lea    0xeb0(%rip),%rsi
call   1050 <CONS_Debug@plt>
mov    $0x0,%al
call   1030 <ST_LoadGraphics@plt>
mov    $0x0,%al
call   1040 <HU_LoadGraphics@plt>
mov    $0x0,%al
call   1060 <ST_ReloadSkinFaceGraphics@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<R_ReloadHUDGraphics>:
push   %rax
lea    0xeb8(%rip),%rsi
mov    $0x8,%edi
call   1050 <CONS_Debug@plt>
xor    %eax,%eax
call   1030 <ST_LoadGraphics@plt>
xor    %eax,%eax
call   1040 <HU_LoadGraphics@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <ST_ReloadSkinFaceGraphics@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"R_ReloadHUDGraphics()...\0A\00"
define void @R_ReloadHUDGraphics() {
%1 = call i32 @CONS_Debug(i32 8, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @ST_LoadGraphics()
%3 = call i32 (...) @HU_LoadGraphics()
%4 = call i32 (...) @ST_ReloadSkinFaceGraphics()
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"R_ReloadHUDGraphics()...\0A\00"
define void @R_ReloadHUDGraphics() {
%1 = tail call i32 @CONS_Debug(i32 8, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @ST_LoadGraphics()
%3 = tail call i32 (...) @HU_LoadGraphics()
%4 = tail call i32 (...) @ST_ReloadSkinFaceGraphics()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ recursive_truc(int /*<<< orphan*/, int, int *);
int /*<<< orphan*/ truc(int, int *);
int main(int argc, char **argv) {
  int T[3] = {1, 2, 3};
  recursive_truc(0, 3, T);
  puts("Non recursif");
  truc(3, T);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x1c(%rbp)
mov    0xeb8(%rip),%eax
mov    %eax,-0x14(%rbp)
lea    -0x1c(%rbp),%rdx
xor    %edi,%edi
mov    $0x3,%esi
call   1040 <recursive_truc@plt>
lea    0xea2(%rip),%rdi
call   1030 <puts@plt>
lea    -0x1c(%rbp),%rsi
mov    $0x3,%edi
call   1050 <truc@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0xecd(%rip),%eax
mov    %eax,0x8(%rsp)
mov    0xeba(%rip),%rax
mov    %rax,(%rsp)
mov    %rsp,%rbx
xor    %edi,%edi
mov    $0x3,%esi
mov    %rbx,%rdx
call   1040 <recursive_truc@plt>
lea    0xea9(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
mov    %rbx,%rsi
call   1050 <truc@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.T = [3 x i32] [i32 1, i32 2, i32 3]
@.str = [13 x i8] c"Non recursif\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [3 x i32]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = bitcast [3 x i32]* %5 to i8*
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%8 = call i32 @recursive_truc(i32 0, i32 3, i32* %7)
%9 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%11 = call i32 @truc(i32 3, i32* %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.T = [3 x i32] [i32 1, i32 2, i32 3]
@.str = [13 x i8] c"Non recursif\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [3 x i32]
%4 = bitcast [3 x i32]* %3 to i8*
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%6 = call i32 @recursive_truc(i32 0, i32 3, i32* %5)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @truc(i32 3, i32* %5)
ret i32 0
}
/* Variables and functions */
float fabsf(float);
float dtMathFabsf(float x) { return fabsf(x); }


x86 assembly (clang, -O0):
<dtMathFabsf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xeeb(%rip),%xmm1
pand   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtMathFabsf>:
andps  0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define float @dtMathFabsf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.fabs.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @dtMathFabsf(float %0) {
%2 = tail call float @llvm.fabs.f32(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ FlightTelemetryStatsHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void FlightTelemetryStatsLogging() {
  UAVObjLogging(FlightTelemetryStatsHandle());
}


x86 assembly (clang, -O0):
<FlightTelemetryStatsLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <FlightTelemetryStatsHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlightTelemetryStatsLogging>:
push   %rax
xor    %eax,%eax
call   1040 <FlightTelemetryStatsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @FlightTelemetryStatsLogging() {
%1 = call i32 (...) @FlightTelemetryStatsHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @FlightTelemetryStatsLogging() {
%1 = tail call i32 (...) @FlightTelemetryStatsHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_imm(int);
int /*<<< orphan*/ write_instr(int);
int f3_handler(char **save) {
  write_instr(0x00);
  write_imm(0x3C);
  write_instr(0x28);
  return 0;
}


x86 assembly (clang, -O0):
<f3_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x3c,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3_handler>:
push   %rax
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x3c,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f3_handler(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @write_instr(i32 0)
%4 = call i32 @write_imm(i32 60)
%5 = call i32 @write_instr(i32 40)
ret i32 0
}

LLVM IR (-O2):
define i32 @f3_handler(i8** nocapture readnone %0) {
%2 = tail call i32 @write_instr(i32 0)
%3 = tail call i32 @write_imm(i32 60)
%4 = tail call i32 @write_instr(i32 40)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ putchar(char);
long rand();
void separator(int repeat, char c) {
  int x;
  long int r;
  for (x = 0; x < repeat; x++)
    putchar(c);
  putchar('\n');
  r = rand();
  printf("%d\n", r);
  return;
}


x86 assembly (clang, -O0):
<separator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    116b <separator+0x3b>
movsbl -0x5(%rbp),%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <separator+0x18>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x0,%al
call   1050 <rand@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe75(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<separator>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    114c <separator+0x1c>
mov    %edi,%ebx
movsbl %sil,%ebp
nopl   (%rax)
mov    %ebp,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1140 <separator+0x10>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1050 <rand@plt>
lea    0xe9c(%rip),%rdi
mov    %rax,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @separator(i32 %0, i8 signext %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @putchar(i8 signext %1)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = tail call i32 @putchar(i8 signext 10)
%11 = tail call i64 (...) @rand()
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %11)
ret void
}
/* Variables and functions */
float ps2_fabsf(float);
int ps2_float_equals(float a, float b, float tolerance) {
  return ps2_fabsf(a - b) < tolerance;
}


x86 assembly (clang, -O0):
<ps2_float_equals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
call   1030 <ps2_fabsf@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ps2_float_equals>:
push   %rax
movss  %xmm2,0x4(%rsp)
subss  %xmm1,%xmm0
call   1030 <ps2_fabsf@plt>
xor    %eax,%eax
movss  0x4(%rsp),%xmm1
ucomiss %xmm0,%xmm1
seta   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ps2_float_equals(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 = load float, float* %5
%9 = fsub float %7, %8
%10 = call float @ps2_fabsf(float %9)
%11 = load float, float* %6
%12 = fcmp olt float %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @ps2_float_equals(float %0, float %1, float %2) {
%4 = fsub float %0, %1
%5 = tail call float @ps2_fabsf(float %4)
%6 = fcmp olt float %5, %2
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
struct fatx_fs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fatx_print(struct fatx_fs *, int, char *, char const *);
int fatx_mknod(struct fatx_fs *fs, char const *path) {
  fatx_print(fs, 5, "fatx_mknod(path=\"%s\")\n", path);
  return -1;
}


x86 assembly (clang, -O0):
<fatx_mknod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x5,%esi
lea    0xecc(%rip),%rdx
call   1030 <fatx_print@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fatx_mknod>:
push   %rax
mov    %rsi,%rcx
lea    0xee5(%rip),%rdx
mov    $0x5,%esi
call   1030 <fatx_print@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.fatx_fs = type { i32 }
@.str = [23 x i8] c"fatx_mknod(path=\22%s\22)\0A\00"
define i32 @fatx_mknod(%struct.fatx_fs* %0, i8* %1) {
%3 = alloca %struct.fatx_fs*
%4 = alloca i8*
store %struct.fatx_fs* %0, %struct.fatx_fs** %3
store i8* %1, i8** %4
%5 = load %struct.fatx_fs*, %struct.fatx_fs** %3
%6 = load i8*, i8** %4
%7 = call i32 @fatx_print(%struct.fatx_fs* %5, i32 5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 -1
}

LLVM IR (-O2):
%struct.fatx_fs = type { i32 }
@.str = [23 x i8] c"fatx_mknod(path=\22%s\22)\0A\00"
define i32 @fatx_mknod(%struct.fatx_fs* %0, i8* %1) {
%3 = tail call i32 @fatx_print(%struct.fatx_fs* %0, i32 5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 -1
}
void heap_stats(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ set_busy(int);
void get_right_fork(int mine) {
  int item = (((mine) + 1) % 5);
  set_busy(item);
}


x86 assembly (clang, -O0):
<get_right_fork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <set_busy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_right_fork>:
add    $0x1,%edi
movslq %edi,%rdi
imul   $0x66666667,%rdi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%edi
jmp    1030 <set_busy@plt>

LLVM IR (-O0):
define void @get_right_fork(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
%6 = srem i32 %5, 5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @set_busy(i32 %7)
ret void
}

LLVM IR (-O2):
define void @get_right_fork(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = srem i32 %2, 5
%4 = tail call i32 @set_busy(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgxor(void) { gen("xorq\t%rcx,%rax"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"xorq\09%rcx,%rax\00"
define void @cgxor() {
%1 = call i32 @gen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"xorq\09%rcx,%rax\00"
define void @cgxor() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void SHL_L_IMM(int reg, int count) {
  addbyte(0xc1);
  addbyte(0xc0 | reg | 0x20);
  addbyte(count);
}


x86 assembly (clang, -O0):
<SHL_L_IMM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0xc1,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
or     $0xc0,%edi
or     $0x20,%edi
call   1030 <addbyte@plt>
mov    -0x8(%rbp),%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHL_L_IMM>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0xc1,%edi
call   1030 <addbyte@plt>
or     $0xe0,%ebp
mov    %ebp,%edi
call   1030 <addbyte@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @SHL_L_IMM(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 193)
%6 = load i32, i32* %3
%7 = or i32 192, %6
%8 = or i32 %7, 32
%9 = call i32 @addbyte(i32 %8)
%10 = load i32, i32* %4
%11 = call i32 @addbyte(i32 %10)
ret void
}

LLVM IR (-O2):
define void @SHL_L_IMM(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 193)
%4 = or i32 %0, 224
%5 = tail call i32 @addbyte(i32 %4)
%6 = tail call i32 @addbyte(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ xsnprintf(char *, int, char *, char const *, char const *);
const char *fix_name(const char *name, const char *prefix) {
  static char buf[256];
  xsnprintf(buf, sizeof(buf), "%s%s", prefix, name);
  return buf;
}


x86 assembly (clang, -O0):
<fix_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%r8
lea    0x2f11(%rip),%rdi
mov    $0x100,%esi
lea    0xec5(%rip),%rdx
call   1030 <xsnprintf@plt>
lea    0x2ef9(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fix_name>:
push   %rbx
mov    %rsi,%rcx
mov    %rdi,%r8
lea    0x2f22(%rip),%rbx
lea    0xedb(%rip),%rdx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1030 <xsnprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@fix_name.buf = internal global [256 x i8] zeroinitializer
@.str = [5 x i8] c"%s%s\00"
define i8* @fix_name(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @xsnprintf(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @fix_name.buf, i64 0, i64 0), i32 256, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @fix_name.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@fix_name.buf = internal global [256 x i8] zeroinitializer
@.str = [5 x i8] c"%s%s\00"
define i8* @fix_name(i8* %0, i8* %1) {
%3 = tail call i32 @xsnprintf(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @fix_name.buf, i64 0, i64 0), i32 256, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @fix_name.buf, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ base64_test();
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("Base64 tests: %s\n", base64_test() ? "PASSED" : "FAILED");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <base64_test@plt>
mov    %rax,%rcx
lea    0xed9(%rip),%rsi
lea    0xecb(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <base64_test@plt>
test   %rax,%rax
lea    0xee7(%rip),%rax
lea    0xed9(%rip),%rsi
cmove  %rax,%rsi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Base64 tests: %s\0A\00"
@.str.1 = [7 x i8] c"PASSED\00"
@.str.2 = [7 x i8] c"FAILED\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @base64_test()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0)
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Base64 tests: %s\0A\00"
@.str.1 = [7 x i8] c"PASSED\00"
@.str.2 = [7 x i8] c"FAILED\00"
define i32 @main() {
%1 = tail call i64 (...) @base64_test()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
unsigned int peak_transfer_attach(const char *x) {
  (void)x;
  return (1);
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/, char const *,
                            int /*<<< orphan*/);
void rlb_vlog_vfprintf(int prio, const char *fmt, va_list ap) {
  vfprintf(stderr, fmt, ap);
  fputc('\n', stderr);
}


x86 assembly (clang, -O0):
<rlb_vlog_vfprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <vfprintf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1030 <fputc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rlb_vlog_vfprintf>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
call   1040 <vfprintf@plt>
mov    (%rbx),%esi
mov    $0xa,%edi
pop    %rbx
jmp    1030 <fputc@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @rlb_vlog_vfprintf(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* @stderr
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @vfprintf(i32 %7, i8* %8, i32 %9)
%11 = load i32, i32* @stderr
%12 = call i32 @fputc(i8 signext 10, i32 %11)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @rlb_vlog_vfprintf(i32 %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @vfprintf(i32 %4, i8* %1, i32 %2)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fputc(i8 signext 10, i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cprintf(char *, char *);
void noin(void) {
  cprintf("%s", "illegal instruction format #\n");
  return;
}


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

x86 assembly (clang, -O2):
<noin>:
lea    0xee9(%rip),%rdi
lea    0xee5(%rip),%rsi
jmp    1030 <cprintf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [30 x i8] c"illegal instruction format #\0A\00"
define void @noin() {
%1 = call i32 @cprintf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [30 x i8] c"illegal instruction format #\0A\00"
define void @noin() {
%1 = tail call i32 @cprintf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int fun1257() { return 1257; }


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

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

LLVM IR (-O0):
define i32 @fun1257() {
ret i32 1257
}

LLVM IR (-O2):
define i32 @fun1257() {
ret i32 1257
}
/* Variables and functions */
scalar_t__ accept(char *);
int /*<<< orphan*/ error();
void expect(char *s) {
  if (accept(s) == 0)
    error();
}


x86 assembly (clang, -O0):
<expect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <accept@plt>
cmp    $0x0,%rax
jne    1146 <expect+0x26>
mov    $0x0,%al
call   1030 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expect>:
push   %rax
call   1040 <accept@plt>
test   %rax,%rax
je     112d <expect+0xd>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1030 <error@plt>

LLVM IR (-O0):
define void @expect(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @accept(i8* %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @error()
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @expect(i8* %0) {
%2 = tail call i64 @accept(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @error()
br label %6
6: ; preds = %4, %1
ret void
}
unsigned int vsetne2(unsigned int a, unsigned int b) {
  unsigned int r, c;
  r = a ^ b;
  c = r | 0x80008000;
  c = c - 0x00010001;
  c = r | c;
  c = c & 0x80008000;
  r = c >> 15;
  return r;
}


x86 assembly (clang, -O0):
<vsetne2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
or     $0x80008000,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x10001,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0x80008000,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shr    $0xf,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsetne2>:
xor    %esi,%edi
mov    %edi,%eax
or     $0x80008000,%eax
add    $0xfffeffff,%eax
or     %edi,%eax
shr    $0xf,%eax
and    $0x10001,%eax
ret

LLVM IR (-O0):
define i32 @vsetne2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = xor i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = or i32 %10, -2147450880
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = sub i32 %12, 65537
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = or i32 %14, %15
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = and i32 %17, -2147450880
store i32 %18, i32* %6
%19 = load i32, i32* %6
%20 = lshr i32 %19, 15
store i32 %20, i32* %5
%21 = load i32, i32* %5
ret i32 %21
}

LLVM IR (-O2):
define i32 @vsetne2(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = or i32 %3, -2147450880
%5 = add i32 %4, -65537
%6 = or i32 %5, %3
%7 = lshr i32 %6, 15
%8 = and i32 %7, 65537
ret i32 %8
}
void mem_storage_tx_commit(void *handle) { return; }


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

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

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

LLVM IR (-O2):
define void @mem_storage_tx_commit(i8* nocapture %0) {
ret void
}