xunge/DecIR huggingface dataset:
/* Variables and functions */
long fak(int);
long faki(int);
long bikoeff(int m, int n) { return faki(n) / faki(m) * fak(n - m); }


x86 assembly (clang, -O0):
<bikoeff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <faki@plt>
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <faki@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    -0x4(%rbp),%edi
call   1030 <fak@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
imul   %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bikoeff>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%r14d
mov    %esi,%edi
call   1040 <faki@plt>
mov    %rax,%rbp
mov    %r14d,%edi
call   1040 <faki@plt>
mov    %rax,%rcx
mov    %rbp,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     1157 <bikoeff+0x37>
mov    %rbp,%rax
cqto
idiv   %rcx
mov    %rax,%rbp
jmp    115f <bikoeff+0x3f>
mov    %ebp,%eax
xor    %edx,%edx
div    %ecx
mov    %eax,%ebp
sub    %r14d,%ebx
mov    %ebx,%edi
call   1030 <fak@plt>
imul   %rbp,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i64 @bikoeff(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i64 @faki(i32 %5)
%7 = load i32, i32* %3
%8 = call i64 @faki(i32 %7)
%9 = sdiv i64 %6, %8
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = sub nsw i32 %10, %11
%13 = call i64 @fak(i32 %12)
%14 = mul nsw i64 %9, %13
ret i64 %14
}

LLVM IR (-O2):
define i64 @bikoeff(i32 %0, i32 %1) {
%3 = tail call i64 @faki(i32 %1)
%4 = tail call i64 @faki(i32 %0)
%5 = sdiv i64 %3, %4
%6 = sub nsw i32 %1, %0
%7 = tail call i64 @fak(i32 %6)
%8 = mul nsw i64 %7, %5
ret i64 %8
}
int fib(int n) {
  if (n < 2)
    return n;
  return fib(n - 1) + fib(n - 2);
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1130 <fib+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <fib+0x43>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jge    1120 <fib+0x10>
mov    %ebx,%ecx
jmp    1144 <fib+0x34>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <fib@plt>
lea    -0x2(%rbx),%ecx
add    %eax,%ebp
cmp    $0x3,%ebx
mov    %ecx,%ebx
ja     1130 <fib+0x20>
add    %ecx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fib(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ %8, %3 ]
%14 = add nsw i32 %13, %12
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printTitle(void) {
  printf("VGM 1.70 YM2203/YM2608/YM2610 SSG (AY) offset fixer\n");
}


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

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

LLVM IR (-O0):
@.str = [53 x i8] c"VGM 1.70 YM2203/YM2608/YM2610 SSG (AY) offset fixer\0A\00"
define void @printTitle() {
%1 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [52 x i8] c"VGM 1.70 YM2203/YM2608/YM2610 SSG (AY) offset fixer\00"
define void @printTitle() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
ret void
}
int ati(char *str) {}


x86 assembly (clang, -O0):
<ati>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ati(i8* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ dump_out_mmx_noeol(void *, unsigned int, unsigned int);
int /*<<< orphan*/ printf(char *);
void dump_out_mmx(void *buf, unsigned int size, unsigned int index) {
  dump_out_mmx_noeol(buf, size, index);
  printf("\n");
}


x86 assembly (clang, -O0):
<dump_out_mmx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <dump_out_mmx_noeol@plt>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_out_mmx>:
push   %rax
call   1040 <dump_out_mmx_noeol@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @dump_out_mmx(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @dump_out_mmx_noeol(i8* %0, i32 %1, i32 %2)
%5 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cyc_Absyn_type2cap(void *);
void *Cyc_Absyn_type2cap_wrap(unsigned dummy, void *t) {
  return ({ Cyc_Absyn_type2cap(t); });
}


x86 assembly (clang, -O0):
<Cyc_Absyn_type2cap_wrap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <Cyc_Absyn_type2cap@plt>
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Absyn_type2cap_wrap>:
push   %rax
mov    %rsi,%rdi
call   1030 <Cyc_Absyn_type2cap@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @Cyc_Absyn_type2cap_wrap(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @Cyc_Absyn_type2cap(i8* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @Cyc_Absyn_type2cap_wrap(i32 %0, i8* %1) {
%3 = tail call i32 @Cyc_Absyn_type2cap(i8* %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ say_hello();
int main(void) {
  say_hello();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @say_hello()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void nr_free_submatrix(float **b, long nrl, long nrh, long ncl, long nch) {
  free((char *)(b + nrl - 1));
}


x86 assembly (clang, -O0):
<nr_free_submatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nr_free_submatrix>:
lea    (%rdi,%rsi,8),%rdi
add    $0xfffffffffffffff8,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @nr_free_submatrix(float** %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca float**
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store float** %0, float*** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load float**, float*** %6
%12 = load i64, i64* %7
%13 = getelementptr inbounds float*, float** %11, i64 %12
%14 = getelementptr inbounds float*, float** %13, i64 -1
%15 = bitcast float** %14 to i8*
%16 = call i32 @free(i8* %15)
ret void
}

LLVM IR (-O2):
define void @nr_free_submatrix(float** nocapture %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = getelementptr inbounds float*, float** %0, i64 %1
%7 = getelementptr inbounds float*, float** %6, i64 -1
%8 = bitcast float** %7 to i8*
%9 = tail call i32 @free(i8* %8)
ret void
}
/* Variables and functions */
char *strncpy(char *, char const *, size_t);
char *safe_strncpy(char *dst, const char *src, size_t size) {
  dst[size - 1] = '\0';
  return strncpy(dst, src, size - 1);
}


x86 assembly (clang, -O0):
<safe_strncpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
sub    $0x1,%rdx
call   1030 <strncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_strncpy>:
movb   $0x0,-0x1(%rdi,%rdx,1)
add    $0xffffffffffffffff,%rdx
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
define i8* @safe_strncpy(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 i64, i64* %6
%9 = sub i64 %8, 1
%10 = getelementptr inbounds i8, i8* %7, i64 %9
store i8 0, i8* %10
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = load i64, i64* %6
%14 = sub i64 %13, 1
%15 = call i8* @strncpy(i8* %11, i8* %12, i64 %14)
ret i8* %15
}

LLVM IR (-O2):
define i8* @safe_strncpy(i8* returned %0, i8* nocapture %1, i64 %2) {
%4 = add i64 %2, -1
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 0, i8* %5
%6 = tail call i8* @strncpy(i8* dereferenceable(1) %0, i8* %1, i64 %4)
ret i8* %0
}
/* Variables and functions */
double pow(double, double);
double A_mu(double B_mu, double T_ref, double mu_ref) {
  return mu_ref * pow(T_ref, -1.5) * (B_mu + T_ref);
}


x86 assembly (clang, -O0):
<A_mu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec2(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
addsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<A_mu>:
sub    $0x18,%rsp
movsd  %xmm2,0x10(%rsp)
movapd %xmm1,%xmm2
movsd  %xmm1,(%rsp)
movsd  %xmm0,0x8(%rsp)
movsd  0xecf(%rip),%xmm1
movapd %xmm2,%xmm0
call   1030 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @A_mu(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %6
%8 = load double, double* %5
%9 = call double @pow(double %8, double -1.500000e+00)
%10 = fmul double %7, %9
%11 = load double, double* %4
%12 = load double, double* %5
%13 = fadd double %11, %12
%14 = fmul double %10, %13
ret double %14
}

LLVM IR (-O2):
define double @A_mu(double %0, double %1, double %2) {
%4 = tail call double @pow(double %1, double -1.500000e+00)
%5 = fmul double %4, %2
%6 = fadd double %0, %1
%7 = fmul double %6, %5
ret double %7
}
/* Type definitions */
struct array {
  int dummy;
};

/* Variables and functions */
int array_set(struct array *, scalar_t__, void const *);
scalar_t__ array_size(struct array *);
int stack_swap(struct array *st, const void *data) {
  return array_set(st, array_size(st) - 1, data);
}


x86 assembly (clang, -O0):
<stack_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <array_size@plt>
mov    -0x18(%rbp),%rdi
mov    %rax,%rsi
sub    $0x1,%rsi
mov    -0x10(%rbp),%rdx
call   1030 <array_set@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stack_swap>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <array_size@plt>
lea    -0x1(%rax),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <array_set@plt>

LLVM IR (-O0):
%struct.array = type { i32 }
define i32 @stack_swap(%struct.array* %0, i8* %1) {
%3 = alloca %struct.array*
%4 = alloca i8*
store %struct.array* %0, %struct.array** %3
store i8* %1, i8** %4
%5 = load %struct.array*, %struct.array** %3
%6 = load %struct.array*, %struct.array** %3
%7 = call i64 @array_size(%struct.array* %6)
%8 = sub nsw i64 %7, 1
%9 = load i8*, i8** %4
%10 = call i32 @array_set(%struct.array* %5, i64 %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.array = type { i32 }
define i32 @stack_swap(%struct.array* %0, i8* %1) {
%3 = tail call i64 @array_size(%struct.array* %0)
%4 = add nsw i64 %3, -1
%5 = tail call i32 @array_set(%struct.array* %0, i64 %4, i8* %1)
ret i32 %5
}
void IWL_DEBUG_LIMIT(int level, const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @IWL_DEBUG_LIMIT(i32 %0, i8* nocapture %1, ...) {
ret void
}
/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ fopen(char *, char *);
int main(int argc, char const *argv[]) {
  errno = 0;
  fopen("doesn't matter", "r");
  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    0x2eb3(%rip),%rax
movq   $0x0,(%rax)
lea    0xec5(%rip),%rdi
lea    0xecb(%rip),%rsi
call   1030 <fopen@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
movq   $0x0,(%rax)
lea    0xeda(%rip),%rdi
lea    0xee0(%rip),%rsi
call   1030 <fopen@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i64 0
@.str = [15 x i8] c"doesn't matter\00"
@.str.1 = [2 x i8] c"r\00"
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
store i64 0, i64* @errno
%6 = call i32 @fopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@errno = global i64 0
@.str = [15 x i8] c"doesn't matter\00"
@.str.1 = [2 x i8] c"r\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
store i64 0, i64* @errno
%3 = tail call i32 @fopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct timespec {
  unsigned long tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void NanoSleep(unsigned long cNanoSecs) {
  struct timespec Ts;
  Ts.tv_sec = 0;
  Ts.tv_nsec = cNanoSecs;
  nanosleep(&Ts, NULL);
}


x86 assembly (clang, -O0):
<NanoSleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NanoSleep>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
mov    %rdi,0x8(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define void @NanoSleep(i64 %0) {
%2 = alloca i64
%3 = alloca %struct.timespec
store i64 %0, i64* %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i64 0, i64* %4
%5 = load i64, i64* %2
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i64 %5, i64* %6
%7 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define void @NanoSleep(i64 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i64 0, i64* %4
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i64 %0, i64* %5
%6 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xd8() {
  Assert_real((isxdigit(216) == 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",
              1085, ("isxdigit should be 0 for 0xd8"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xd8>:
push   %rax
mov    $0xd8,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x43d,%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 0xd8\00"
define void @t_isxdigit_0xd8() {
%1 = call i64 @isxdigit(i32 216)
%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 1085, 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 0xd8\00"
define void @t_isxdigit_0xd8() {
%1 = tail call i64 @isxdigit(i32 216)
%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 1085, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void testfunc11(void) {
  long int a;
  double dd;
  short unsigned int b;
  short int *p1;
  long int *p2;
  int normalint;
  p2 = (long int *)p1;
  p1 = (short int *)p2;
  b = a;
  dd = b;
  normalint = a;
}


x86 assembly (clang, -O0):
<testfunc11>:
push   %rbp
mov    %rsp,%rbp
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%ax
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x2c(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testfunc11() {
%1 = alloca i64
%2 = alloca double
%3 = alloca i16
%4 = alloca i16*
%5 = alloca i64*
%6 = alloca i32
%7 = load i16*, i16** %4
%8 = bitcast i16* %7 to i64*
store i64* %8, i64** %5
%9 = load i64*, i64** %5
%10 = bitcast i64* %9 to i16*
store i16* %10, i16** %4
%11 = load i64, i64* %1
%12 = trunc i64 %11 to i16
store i16 %12, i16* %3
%13 = load i16, i16* %3
%14 = uitofp i16 %13 to double
store double %14, double* %2
%15 = load i64, i64* %1
%16 = trunc i64 %15 to i32
store i32 %16, i32* %6
ret void
}

LLVM IR (-O2):
define void @testfunc11() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ replace_spaces(char *);
int main(int argc, char **argv) {
  char *str = "Mr John Smith    ";
  printf("%s\n", str);
  replace_spaces(str);
  printf("%s\n", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <replace_spaces@plt>
mov    -0x18(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee7(%rip),%r14
lea    0xece(%rip),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <replace_spaces@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Mr John Smith \00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = load i8*, i8** %6
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %6
%10 = call i32 @replace_spaces(i8* %9)
%11 = load i8*, i8** %6
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Mr John Smith \00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @replace_spaces(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ Window;
typedef int /*<<< orphan*/ Atom;

/* Variables and functions */
int /*<<< orphan*/ XA_WINDOW;
int x_get_property(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
                   int, void **, int *);
int x_get_window_property(Window window, Atom property, Window **prop_ret,
                          int *nr_ret) {
  return x_get_property(window, XA_WINDOW, property, sizeof(Window),
                        (void **)prop_ret, nr_ret);
}


x86 assembly (clang, -O0):
<x_get_window_property>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%r9
mov    $0x4,%ecx
call   1030 <x_get_property@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_get_window_property>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %esi,%edx
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    $0x4,%ecx
jmp    1030 <x_get_property@plt>

LLVM IR (-O0):
@XA_WINDOW = global i32 0
define i32 @x_get_window_property(i32 %0, i32 %1, i32** %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32**
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32** %2, i32*** %7
store i32* %3, i32** %8
%9 = load i32, i32* %5
%10 = load i32, i32* @XA_WINDOW
%11 = load i32, i32* %6
%12 = load i32**, i32*** %7
%13 = bitcast i32** %12 to i8**
%14 = load i32*, i32** %8
%15 = call i32 @x_get_property(i32 %9, i32 %10, i32 %11, i32 4, i8** %13, i32* %14)
ret i32 %15
}

LLVM IR (-O2):
@XA_WINDOW = global i32 0
define i32 @x_get_window_property(i32 %0, i32 %1, i32** %2, i32* %3) {
%5 = load i32, i32* @XA_WINDOW
%6 = bitcast i32** %2 to i8**
%7 = tail call i32 @x_get_property(i32 %0, i32 %5, i32 %1, i32 4, i8** %6, i32* %3)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int fread(void *, int, int, void *);
int /*<<< orphan*/ fseek(void *, long, int /*<<< orphan*/);
int input_ascii_file_indexed_read(void *buf, int size, long index, void *file) {
  fseek(file, index, SEEK_SET);
  return fread(buf, 1, size, file);
}


x86 assembly (clang, -O0):
<input_ascii_file_indexed_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    0x2e9a(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<input_ascii_file_indexed_read>:
push   %rbp
push   %r14
push   %rbx
mov    %rcx,%rbx
mov    %esi,%r14d
mov    %rdi,%rbp
mov    0x2eac(%rip),%rax
mov    (%rax),%eax
mov    %rcx,%rdi
mov    %rdx,%rsi
mov    %eax,%edx
call   1040 <fseek@plt>
mov    %rbp,%rdi
mov    $0x1,%esi
mov    %r14d,%edx
mov    %rbx,%rcx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fread@plt>

LLVM IR (-O0):
@SEEK_SET = global i32 0
define i32 @input_ascii_file_indexed_read(i8* %0, i32 %1, i64 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %8
%10 = load i64, i64* %7
%11 = load i32, i32* @SEEK_SET
%12 = call i32 @fseek(i8* %9, i64 %10, i32 %11)
%13 = load i8*, i8** %5
%14 = load i32, i32* %6
%15 = load i8*, i8** %8
%16 = call i32 @fread(i8* %13, i32 1, i32 %14, i8* %15)
ret i32 %16
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define i32 @input_ascii_file_indexed_read(i8* nocapture %0, i32 %1, i64 %2, i8* nocapture %3) {
%5 = load i32, i32* @SEEK_SET
%6 = tail call i32 @fseek(i8* %3, i64 %2, i32 %5)
%7 = tail call i32 @fread(i8* %0, i32 1, i32 %1, i8* %3)
ret i32 %7
}
/* Variables and functions */
float sqrt(int);
float etr_perimeter_high(float high) {
  float square_root_3 = sqrt(3);
  float perimeter = 2 * high * square_root_3;
  return perimeter;
}


x86 assembly (clang, -O0):
<etr_perimeter_high>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x3,%edi
call   1030 <sqrt@plt>
movss  %xmm0,-0x8(%rbp)
movss  0xecc(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<etr_perimeter_high>:
push   %rax
movss  %xmm0,0x4(%rsp)
mov    $0x3,%edi
call   1030 <sqrt@plt>
movss  0x4(%rsp),%xmm1
addss  %xmm1,%xmm1
mulss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @etr_perimeter_high(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
%5 = call float @sqrt(i32 3)
store float %5, float* %3
%6 = load float, float* %2
%7 = fmul float 2.000000e+00, %6
%8 = load float, float* %3
%9 = fmul float %7, %8
store float %9, float* %4
%10 = load float, float* %4
ret float %10
}

LLVM IR (-O2):
define float @etr_perimeter_high(float %0) {
%2 = tail call float @sqrt(i32 3)
%3 = fmul float %0, 2.000000e+00
%4 = fmul float %3, %2
ret float %4
}
void TimerHalWaitForModuleBeingFullyFunctional(
    unsigned int timerClockControlRegister) {
  while (((*((volatile unsigned int *)(((0x44E00000) + 0) +
                                       timerClockControlRegister))) &
          0x00030000) != 0x0)
    ;
}


x86 assembly (clang, -O0):
<TimerHalWaitForModuleBeingFullyFunctional>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x44e00000,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x30000,%eax
cmp    $0x0,%eax
je     1126 <TimerHalWaitForModuleBeingFullyFunctional+0x26>
jmp    1107 <TimerHalWaitForModuleBeingFullyFunctional+0x7>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerHalWaitForModuleBeingFullyFunctional>:
add    $0x44e00000,%edi
cs nopw 0x0(%rax,%rax,1)
testl  $0x30000,(%rdi)
jne    1110 <TimerHalWaitForModuleBeingFullyFunctional+0x10>
ret

LLVM IR (-O0):
define void @TimerHalWaitForModuleBeingFullyFunctional(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %11, %1
%4 = load i32, i32* %2
%5 = add i32 1155530752, %4
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, 196608
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %3
br label %3
12: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @TimerHalWaitForModuleBeingFullyFunctional(i32 %0) {
%2 = add i32 %0, 1155530752
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
br label %5
5: ; preds = %5, %1
%6 = load volatile i32, i32* %4
%7 = and i32 %6, 196608
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %5
9: ; preds = %5
ret void
}
unsigned long crc32_init() { return (0xFFFFFFFF); }


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

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

LLVM IR (-O0):
define i64 @crc32_init() {
ret i64 4294967295
}

LLVM IR (-O2):
define i64 @crc32_init() {
ret i64 4294967295
}
/* Type definitions */
struct obstack {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ obstack_1grow(struct obstack *, char);
char *obstack_finish(struct obstack *);
char *obstack_strdup(struct obstack *obstack, const char *str) {
  while (1) {
    char c = *str++;
    obstack_1grow(obstack, c);
    if (!c) {
      break;
    }
  }
  return obstack_finish(obstack);
}


x86 assembly (clang, -O0):
<obstack_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x11(%rbp),%esi
call   1040 <obstack_1grow@plt>
cmpb   $0x0,-0x11(%rbp)
jne    1160 <obstack_strdup+0x40>
jmp    1165 <obstack_strdup+0x45>
jmp    1130 <obstack_strdup+0x10>
mov    -0x8(%rbp),%rdi
call   1030 <obstack_finish@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<obstack_strdup>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
nopw   0x0(%rax,%rax,1)
movsbl (%rbx),%ebp
add    $0x1,%rbx
mov    %r14,%rdi
mov    %ebp,%esi
call   1040 <obstack_1grow@plt>
test   %ebp,%ebp
jne    1130 <obstack_strdup+0x10>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <obstack_finish@plt>

LLVM IR (-O0):
%struct.obstack = type { i32 }
define i8* @obstack_strdup(%struct.obstack* %0, i8* %1) {
%3 = alloca %struct.obstack*
%4 = alloca i8*
%5 = alloca i8
store %struct.obstack* %0, %struct.obstack** %3
store i8* %1, i8** %4
br label %6
6: ; preds = %2, %16
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i32 1
store i8* %8, i8** %4
%9 = load i8, i8* %7
store i8 %9, i8* %5
%10 = load %struct.obstack*, %struct.obstack** %3
%11 = load i8, i8* %5
%12 = call i32 @obstack_1grow(%struct.obstack* %10, i8 signext %11)
%13 = load i8, i8* %5
%14 = icmp ne i8 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %6
br label %17
16: ; preds = %6
br label %6
17: ; preds = %15
%18 = load %struct.obstack*, %struct.obstack** %3
%19 = call i8* @obstack_finish(%struct.obstack* %18)
ret i8* %19
}

LLVM IR (-O2):
%struct.obstack = type { i32 }
define i8* @obstack_strdup(%struct.obstack* %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = tail call i32 @obstack_1grow(%struct.obstack* %0, i8 signext %6)
%8 = icmp eq i8 %6, 0
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = tail call i8* @obstack_finish(%struct.obstack* %0)
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ myread(int, int);
main() { myread(2, 4); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @myread(i32 2, i32 4)
ret i32 0
}
void gtk_combo_box_set_focus_on_click() {}


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

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

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

LLVM IR (-O2):
define void @gtk_combo_box_set_focus_on_click() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__23__IO__selectModuleFunc();
void HplMsp430Usart1P__URXD__selectModuleFunc(void) {
  HplMsp430GeneralIOP__23__IO__selectModuleFunc();
}


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

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

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

LLVM IR (-O2):
define void @HplMsp430Usart1P__URXD__selectModuleFunc() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__23__IO__selectModuleFunc()
ret void
}
/* Type definitions */
typedef void *uint32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
void *ftell(int /*<<< orphan*/ *);
uint32_t get_file_size(FILE *fp) {
  int x = ftell(fp);
  uint32_t ret = 0;
  fseek(fp, 0, SEEK_END);
  ret = ftell(fp);
  fseek(fp, x, SEEK_SET);
  return ret;
}


x86 assembly (clang, -O0):
<get_file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e9d(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2e69(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_file_size>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r15
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14d,%esi
call   1040 <fseek@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i8* @get_file_size(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i8*
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i8* @ftell(i32* %5)
%7 = ptrtoint i8* %6 to i32
store i32 %7, i32* %3
store i8* null, i8** %4
%8 = load i32*, i32** %2
%9 = load i32, i32* @SEEK_END
%10 = call i32 @fseek(i32* %8, i32 0, i32 %9)
%11 = load i32*, i32** %2
%12 = call i8* @ftell(i32* %11)
store i8* %12, i8** %4
%13 = load i32*, i32** %2
%14 = load i32, i32* %3
%15 = load i32, i32* @SEEK_SET
%16 = call i32 @fseek(i32* %13, i32 %14, i32 %15)
%17 = load i8*, i8** %4
ret i8* %17
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i8* @get_file_size(i32* nocapture %0) {
%2 = tail call i8* @ftell(i32* %0)
%3 = ptrtoint i8* %2 to i64
%4 = trunc i64 %3 to i32
%5 = load i32, i32* @SEEK_END
%6 = tail call i32 @fseek(i32* %0, i32 0, i32 %5)
%7 = tail call i8* @ftell(i32* %0)
%8 = load i32, i32* @SEEK_SET
%9 = tail call i32 @fseek(i32* %0, i32 %4, i32 %8)
ret i8* %7
}
/* Type definitions */
typedef int /*<<< orphan*/ hashval;

/* Variables and functions */
int /*<<< orphan*/ do_sha_hash(int *, int *);
int /*<<< orphan*/ memset(int *, int, int);
char *sprint_sha1_hash(int *);
char *sha1_crypt(const char *pw) {
  int hashval[20];
  memset(hashval, 0x00, sizeof(hashval));
  do_sha_hash(hashval, (int *)((char *)pw + 3));
  return sprint_sha1_hash(hashval);
}


x86 assembly (clang, -O0):
<sha1_crypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1040 <memset@plt>
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x3,%rsi
call   1030 <do_sha_hash@plt>
lea    -0x60(%rbp),%rdi
call   1050 <sprint_sha1_hash@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha1_crypt>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1040 <memset@plt>
add    $0x3,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <do_sha_hash@plt>
mov    %r14,%rdi
call   1050 <sprint_sha1_hash@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @sha1_crypt(i8* %0) {
%2 = alloca i8*
%3 = alloca [20 x i32]
store i8* %0, i8** %2
%4 = getelementptr inbounds [20 x i32], [20 x i32]* %3, i64 0, i64 0
%5 = call i32 @memset(i32* %4, i32 0, i32 80)
%6 = getelementptr inbounds [20 x i32], [20 x i32]* %3, i64 0, i64 0
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 3
%9 = bitcast i8* %8 to i32*
%10 = call i32 @do_sha_hash(i32* %6, i32* %9)
%11 = getelementptr inbounds [20 x i32], [20 x i32]* %3, i64 0, i64 0
%12 = call i8* @sprint_sha1_hash(i32* %11)
ret i8* %12
}

LLVM IR (-O2):
define i8* @sha1_crypt(i8* %0) {
%2 = alloca [20 x i32]
%3 = bitcast [20 x i32]* %2 to i8*
%4 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%5 = call i32 @memset(i32* %4, i32 0, i32 80)
%6 = getelementptr inbounds i8, i8* %0, i64 3
%7 = bitcast i8* %6 to i32*
%8 = call i32 @do_sha_hash(i32* %4, i32* %7)
%9 = call i8* @sprint_sha1_hash(i32* %4)
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freeloc(void **x) {
  if (*x) {
    free(*x);
    *x = NULL;
  }
}


x86 assembly (clang, -O0):
<freeloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1141 <freeloc+0x31>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeloc>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1128 <freeloc+0x18>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @freeloc(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @free(i8* %2)
store i8* null, i8** %0
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen_call(char *);
int /*<<< orphan*/ gen_pop();
void callstk(void) {
  gen_pop();
  gen_call("callhl");
}


x86 assembly (clang, -O0):
<callstk>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <gen_pop@plt>
lea    0xece(%rip),%rdi
call   1040 <gen_call@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<callstk>:
push   %rax
xor    %eax,%eax
call   1030 <gen_pop@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <gen_call@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"callhl\00"
define void @callstk() {
%1 = call i32 (...) @gen_pop()
%2 = call i32 @gen_call(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"callhl\00"
define void @callstk() {
%1 = tail call i32 (...) @gen_pop()
%2 = tail call i32 @gen_call(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_57uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x57 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_57uint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x20,%rdx
and    $0x57,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_57uint64_highword_reg>:
movabs $0x5700000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_57uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 87
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_57uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 373662154752
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int f3(int t) {
  int a = 32U - t;
  return 32 - a;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x20,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x20,%eax
sub    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f3(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sub i32 32, %4
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sub nsw i32 32, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @f3(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long long);
int main() {
  int a = 2000000000;
  int b = 2000000000;
  long long v = ((long long)a) * b;
  printf("%lld\n", v);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x77359400,-0x8(%rbp)
movl   $0x77359400,-0xc(%rbp)
movslq -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
movabs $0x3782dace9d900000,%rsi
da 82 37
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 4000000000000000000)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ i2c_DisableINT(int /*<<< orphan*/, unsigned char);
void i2c0_DisableINT(unsigned char i2cints) { i2c_DisableINT(0, i2cints); }


x86 assembly (clang, -O0):
<i2c0_DisableINT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %edi,%edi
movzbl -0x1(%rbp),%esi
call   1030 <i2c_DisableINT@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c0_DisableINT>:
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <i2c_DisableINT@plt>

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

LLVM IR (-O2):
define void @i2c0_DisableINT(i8 zeroext %0) {
%2 = tail call i32 @i2c_DisableINT(i32 0, i8 zeroext %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ crc8(void const *, size_t, int, int /*<<< orphan*/);
int write(int, void const *, size_t);
int _write_crc(int fd, const void *buf, size_t count, uint8_t *crc) {
  *crc = crc8(buf, count, (0x31), *crc);
  return write(fd, buf, count);
}


x86 assembly (clang, -O0):
<_write_crc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
mov    $0x31,%edx
call   1040 <crc8@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_write_crc>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %edi,%ebp
mov    (%rcx),%ecx
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    $0x31,%edx
call   1040 <crc8@plt>
mov    %eax,(%rbx)
mov    %ebp,%edi
mov    %r15,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <write@plt>

LLVM IR (-O0):
define i32 @_write_crc(i32 %0, i8* %1, i64 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = load i8*, i8** %6
%10 = load i64, i64* %7
%11 = load i32*, i32** %8
%12 = load i32, i32* %11
%13 = call i32 @crc8(i8* %9, i64 %10, i32 49, i32 %12)
%14 = load i32*, i32** %8
store i32 %13, i32* %14
%15 = load i32, i32* %5
%16 = load i8*, i8** %6
%17 = load i64, i64* %7
%18 = call i32 @write(i32 %15, i8* %16, i64 %17)
ret i32 %18
}

LLVM IR (-O2):
define i32 @_write_crc(i32 %0, i8* %1, i64 %2, i32* nocapture %3) {
%5 = load i32, i32* %3
%6 = tail call i32 @crc8(i8* %1, i64 %2, i32 49, i32 %5)
store i32 %6, i32* %3
%7 = tail call i32 @write(i32 %0, i8* %1, i64 %2)
ret i32 %7
}