xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int serialReadEscape(int, unsigned char *);
unsigned char expectCHKSUM(int fd) {
  unsigned char b;
  int size;
  printf("{CHKSUM");
  size = serialReadEscape(fd, &b);
  printf("<0x%02x>}", b);
  return size;
}


x86 assembly (clang, -O0):
<expectCHKSUM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
lea    -0x5(%rbp),%rsi
call   1040 <serialReadEscape@plt>
mov    %eax,-0xc(%rbp)
movzbl -0x5(%rbp),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expectCHKSUM>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf(%rsp),%rsi
mov    %ebx,%edi
call   1040 <serialReadEscape@plt>
mov    %eax,%ebx
movzbl 0xf(%rsp),%esi
lea    0xeb9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"{CHKSUM\00"
@.str.1 = [10 x i8] c"<0x%02x>}\00"
define zeroext i8 @expectCHKSUM(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = call i32 @serialReadEscape(i32 %6, i8* %3)
store i32 %7, i32* %4
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %4
%12 = trunc i32 %11 to i8
ret i8 %12
}

LLVM IR (-O2):
@.str = [8 x i8] c"{CHKSUM\00"
@.str.1 = [10 x i8] c"<0x%02x>}\00"
define zeroext i8 @expectCHKSUM(i32 %0) {
%2 = alloca i8
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @serialReadEscape(i32 %0, i8* %2)
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = trunc i32 %4 to i8
ret i8 %8
}
void __rts_init() {}


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

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

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

LLVM IR (-O2):
define void @__rts_init() {
ret void
}
int u_odd(const int a) { return a % 2; }


x86 assembly (clang, -O0):
<u_odd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<u_odd>:
mov    %edi,%eax
mov    %edi,%ecx
shr    $0x1f,%ecx
add    %edi,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @u_odd(i32 %0) {
%2 = srem i32 %0, 2
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Svuj zapocet implementujte zde\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"Svuj zapocet implementujte zde\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [31 x i8] c"Svuj zapocet implementujte zde\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int foo();
int main(void) { return foo() - 42; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = add nsw i32 %1, -42
ret i32 %2
}
void gtk_toggle_action_set_draw_as_radio() {}


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

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

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

LLVM IR (-O2):
define void @gtk_toggle_action_set_draw_as_radio() {
ret void
}
double eval_cne(double x, double y) { return x != y; }


x86 assembly (clang, -O0):
<eval_cne>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_cne>:
cmpneqsd %xmm1,%xmm0
movsd  0xef3(%rip),%xmm1
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @eval_cne(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp une double %5, %6
%8 = zext i1 %7 to i32
%9 = sitofp i32 %8 to double
ret double %9
}

LLVM IR (-O2):
define double @eval_cne(double %0, double %1) {
%3 = fcmp une double %0, %1
%4 = uitofp i1 %3 to double
ret double %4
}
/* Variables and functions */
int distribuzione_stramba(int *, int, int);
int /*<<< orphan*/ quicksort(int *, int, int);
void quicksort_strambo(int a[], int sx, int dx) {
  int perno, pivot;
  if (sx < dx) {
    perno = distribuzione_stramba(a, sx, dx);
    quicksort(a, sx, perno - 1);
    quicksort(a, perno, dx);
  }
}


x86 assembly (clang, -O0):
<quicksort_strambo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1171 <quicksort_strambo+0x51>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <distribuzione_stramba@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1030 <quicksort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <quicksort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort_strambo>:
cmp    %edx,%esi
jge    115f <quicksort_strambo+0x3f>
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
mov    %rdi,%r14
call   1040 <distribuzione_stramba@plt>
mov    %eax,%r15d
lea    -0x1(%r15),%edx
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <quicksort@plt>
mov    %r14,%rdi
mov    %r15d,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <quicksort@plt>
ret

LLVM IR (-O0):
define void @quicksort_strambo(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %26
12: ; preds = %3
%13 = load i32*, i32** %4
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @distribuzione_stramba(i32* %13, i32 %14, i32 %15)
store i32 %16, i32* %7
%17 = load i32*, i32** %4
%18 = load i32, i32* %5
%19 = load i32, i32* %7
%20 = sub nsw i32 %19, 1
%21 = call i32 @quicksort(i32* %17, i32 %18, i32 %20)
%22 = load i32*, i32** %4
%23 = load i32, i32* %7
%24 = load i32, i32* %6
%25 = call i32 @quicksort(i32* %22, i32 %23, i32 %24)
br label %26
26: ; preds = %12, %3
ret void
}

LLVM IR (-O2):
define void @quicksort_strambo(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %10
5: ; preds = %3
%6 = tail call i32 @distribuzione_stramba(i32* %0, i32 %1, i32 %2)
%7 = add nsw i32 %6, -1
%8 = tail call i32 @quicksort(i32* %0, i32 %1, i32 %7)
%9 = tail call i32 @quicksort(i32* %0, i32 %6, i32 %2)
br label %10
10: ; preds = %5, %3
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int padcon_get_standard_step_size(double *step) {
  int fail;
  int precision = 0;
  int *b;
  fail = _ada_use_c2phc4c(868, &precision, b, step, 0);
  return fail;
}


x86 assembly (clang, -O0):
<padcon_get_standard_step_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    $0x364,%edi
lea    -0x10(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padcon_get_standard_step_size>:
push   %rax
mov    %rdi,%rcx
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x364,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @padcon_get_standard_step_size(double* %0) {
%2 = alloca double*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store double* %0, double** %2
store i32 0, i32* %4
%6 = load i32*, i32** %5
%7 = load double*, double** %2
%8 = call i32 @_ada_use_c2phc4c(i32 868, i32* %4, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @padcon_get_standard_step_size(double* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @_ada_use_c2phc4c(i32 868, i32* %2, i32* undef, double* %0, i32 0)
ret i32 %4
}
void rop3_114_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = T ^ S;
  stk2 = *D | stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_114_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_114_0_1>:
mov    %edx,%eax
xor    %sil,%al
mov    (%rdi),%r8b
or     %r8b,%al
xor    %sil,%al
mov    %edx,%ecx
not    %cl
or     %sil,%cl
and    %al,%cl
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %cl,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_114_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %9
%16 = load i8*, i8** %4
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %5
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = load i8, i8* %5
%32 = zext i8 %31 to i32
%33 = and i32 %30, %32
%34 = load i8, i8* %7
%35 = zext i8 %34 to i32
%36 = load i8, i8* %6
%37 = zext i8 %36 to i32
%38 = xor i32 %37, -1
%39 = and i32 %35, %38
%40 = or i32 %33, %39
%41 = load i8, i8* %6
%42 = zext i8 %41 to i32
%43 = load i8, i8* %5
%44 = zext i8 %43 to i32
%45 = xor i32 %44, -1
%46 = and i32 %42, %45
%47 = load i8*, i8** %4
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = and i32 %46, %49
%51 = or i32 %40, %50
%52 = trunc i32 %51 to i8
%53 = load i8*, i8** %4
store i8 %52, i8* %53
ret void
}

LLVM IR (-O2):
define void @rop3_114_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, %1
%5 = load i8, i8* %0
%6 = or i8 %5, %4
%7 = xor i8 %6, %1
%8 = xor i8 %2, -1
%9 = or i8 %8, %1
%10 = and i8 %7, %9
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %5
%14 = or i8 %10, %13
store i8 %14, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage(char *argv0) {
  fprintf(stderr, "%s: [-l] <n> <min_ld> <min_iso> [<a_len>]\n", argv0);
  fprintf(stderr, "\t-l  Find the longest code\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xee4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rbx
mov    (%rbx),%edi
lea    0xedc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef7(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"%s: [-l] <n> <min_ld> <min_iso> [<a_len>]\0A\00"
@.str.1 = [28 x i8] c"\09-l Find the longest code\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"%s: [-l] <n> <min_ld> <min_iso> [<a_len>]\0A\00"
@.str.1 = [28 x i8] c"\09-l Find the longest code\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char *fcvt(arg, ndigits, decpt, sign)
double arg;
int ndigits, *decpt, *sign;
{ return cvt(arg, ndigits, decpt, sign, 0); }


x86 assembly (clang, -O0):
<fcvt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x1,%al
call   1030 <cvt@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcvt>:
push   %rax
xor    %ecx,%ecx
mov    $0x1,%al
call   1030 <cvt@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @fcvt(double %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca double
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
store double %0, double* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load double, double* %5
%10 = load i32, i32* %6
%11 = load i32*, i32** %7
%12 = load i32*, i32** %8
%13 = call i32 (double, i32, i32*, i32*, i32, ...) bitcast (i32 (...)* @cvt to i32 (double, i32, i32*, i32*, i32, ...)*)(double %9, i32 %10, i32* %11, i32* %12, i32 0)
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i8*
ret i8* %15
}

LLVM IR (-O2):
define i8* @fcvt(double %0, i32 %1, i32* %2, i32* %3) {
%5 = tail call i32 (double, i32, i32*, i32*, i32, ...) bitcast (i32 (...)* @cvt to i32 (double, i32, i32*, i32*, i32, ...)*)(double %0, i32 %1, i32* %2, i32* %3, i32 0)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ umfpack_zi_symbolic(long, long, long *, long *, double *,
                                       double *, void **, double *, double *);
void umf4zsym_(long *m, long *n, long Ap[], long Ai[], double Ax[], double Az[],
               void **Symbolic, double Control[20], double Info[90]) {
  (void)umfpack_zi_symbolic(*m, *n, Ap, Ai, Ax, Az, Symbolic, Control, Info);
}


x86 assembly (clang, -O0):
<umf4zsym_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r11
mov    0x18(%rbp),%r10
mov    0x20(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <umfpack_zi_symbolic@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umf4zsym_>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <umfpack_zi_symbolic@plt>

LLVM IR (-O0):
define void @umf4zsym_(i64* %0, i64* %1, i64* %2, i64* %3, double* %4, double* %5, i8** %6, double* %7, double* %8) {
%10 = alloca i64*
%11 = alloca i64*
%12 = alloca i64*
%13 = alloca i64*
%14 = alloca double*
%15 = alloca double*
%16 = alloca i8**
%17 = alloca double*
%18 = alloca double*
store i64* %0, i64** %10
store i64* %1, i64** %11
store i64* %2, i64** %12
store i64* %3, i64** %13
store double* %4, double** %14
store double* %5, double** %15
store i8** %6, i8*** %16
store double* %7, double** %17
store double* %8, double** %18
%19 = load i64*, i64** %10
%20 = load i64, i64* %19
%21 = load i64*, i64** %11
%22 = load i64, i64* %21
%23 = load i64*, i64** %12
%24 = load i64*, i64** %13
%25 = load double*, double** %14
%26 = load double*, double** %15
%27 = load i8**, i8*** %16
%28 = load double*, double** %17
%29 = load double*, double** %18
%30 = call i32 @umfpack_zi_symbolic(i64 %20, i64 %22, i64* %23, i64* %24, double* %25, double* %26, i8** %27, double* %28, double* %29)
ret void
}

LLVM IR (-O2):
define void @umf4zsym_(i64* nocapture %0, i64* nocapture %1, i64* %2, i64* %3, double* %4, double* %5, i8** %6, double* %7, double* %8) {
%10 = load i64, i64* %0
%11 = load i64, i64* %1
%12 = tail call i32 @umfpack_zi_symbolic(i64 %10, i64 %11, i64* %2, i64* %3, double* %4, double* %5, i8** %6, double* %7, double* %8)
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef int int32_t;

/* Variables and functions */
uint64_t rotateL_fun_uint64_t(uint64_t x, int32_t i) {
  if ((i %= 64) == 0)
    return x;
  return (x << i) | (x >> (64 - i));
}


x86 assembly (clang, -O0):
<rotateL_fun_uint64_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cmp    $0x0,%edx
jne    112c <rotateL_fun_uint64_t+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <rotateL_fun_uint64_t+0x48>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    -0x8(%rbp),%edx
mov    $0x40,%ecx
sub    -0xc(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotateL_fun_uint64_t>:
lea    0x3f(%rsi),%eax
test   %esi,%esi
cmovns %esi,%eax
and    $0xffffffc0,%eax
sub    %eax,%esi
mov    %edi,%edx
mov    %esi,%ecx
shl    %cl,%edx
neg    %cl
mov    %edi,%eax
sar    %cl,%eax
or     %edx,%eax
test   %esi,%esi
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @rotateL_fun_uint64_t(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = srem i32 %6, 64
store i32 %7, i32* %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %20
11: ; preds = %2
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = shl i32 %12, %13
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = sub nsw i32 64, %16
%18 = ashr i32 %15, %17
%19 = or i32 %14, %18
store i32 %19, i32* %3
br label %20
20: ; preds = %11, %9
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @rotateL_fun_uint64_t(i32 %0, i32 %1) {
%3 = srem i32 %1, 64
%4 = icmp eq i32 %3, 0
%5 = shl i32 %0, %3
%6 = sub nsw i32 64, %3
%7 = ashr i32 %0, %6
%8 = or i32 %7, %5
%9 = select i1 %4, i32 %0, i32 %8
ret i32 %9
}
/* Variables and functions */
double vlength(float *);
int /*<<< orphan*/ vscale(float *, double);
void vnormal(float v[3]) { vscale(v, 1.0 / vlength(v)); }


x86 assembly (clang, -O0):
<vnormal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <vlength@plt>
mov    -0x10(%rbp),%rdi
movaps %xmm0,%xmm1
movsd  0xeb4(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1040 <vscale@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vnormal>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vlength@plt>
movsd  0xecf(%rip),%xmm1
divsd  %xmm0,%xmm1
mov    %rbx,%rdi
movapd %xmm1,%xmm0
pop    %rbx
jmp    1040 <vscale@plt>

LLVM IR (-O0):
define void @vnormal(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float*, float** %2
%5 = call double @vlength(float* %4)
%6 = fdiv double 1.000000e+00, %5
%7 = call i32 @vscale(float* %3, double %6)
ret void
}

LLVM IR (-O2):
define void @vnormal(float* %0) {
%2 = tail call double @vlength(float* %0)
%3 = fdiv double 1.000000e+00, %2
%4 = tail call i32 @vscale(float* %0, double %3)
ret void
}
/* Variables and functions */
int ENOSYS;
int /*<<< orphan*/ mp_msg(int, int, char *, char const *);
int preinit(const char *arg) {
  if (arg) {
    mp_msg(3, 2, "[VO_NULL] Unknown subdevice: %s.\n", arg);
    return ENOSYS;
  }
  return 0;
}


x86 assembly (clang, -O0):
<preinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1152 <preinit+0x42>
mov    -0x10(%rbp),%rcx
mov    $0x3,%edi
mov    $0x2,%esi
lea    0xec4(%rip),%rdx
call   1030 <mp_msg@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1159 <preinit+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<preinit>:
test   %rdi,%rdi
je     113d <preinit+0x2d>
push   %rax
mov    %rdi,%rcx
lea    0xee0(%rip),%rdx
mov    $0x3,%edi
mov    $0x2,%esi
call   1030 <mp_msg@plt>
mov    0x2eb2(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [34 x i8] c"[VO_NULL] Unknown subdevice: %s.\0A\00"
@ENOSYS = global i32 0
define i32 @preinit(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i32 @mp_msg(i32 3, i32 2, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32, i32* @ENOSYS
store i32 %9, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@.str = [34 x i8] c"[VO_NULL] Unknown subdevice: %s.\0A\00"
@ENOSYS = global i32 0
define i32 @preinit(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @mp_msg(i32 3, i32 2, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = load i32, i32* @ENOSYS
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ 0, %1 ]
ret i32 %7
}
/* Type definitions */
struct Timer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ timerStart(struct Timer *, unsigned long long const);
int /*<<< orphan*/ timerStop(struct Timer *);
void timerRestart(struct Timer *timer, const unsigned long long timeStamp) {
  timerStop(timer);
  timerStart(timer, timeStamp);
}


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

x86 assembly (clang, -O2):
<timerRestart>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <timerStop@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <timerStart@plt>

LLVM IR (-O0):
%struct.Timer = type { i32 }
define void @timerRestart(%struct.Timer* %0, i64 %1) {
%3 = alloca %struct.Timer*
%4 = alloca i64
store %struct.Timer* %0, %struct.Timer** %3
store i64 %1, i64* %4
%5 = load %struct.Timer*, %struct.Timer** %3
%6 = call i32 @timerStop(%struct.Timer* %5)
%7 = load %struct.Timer*, %struct.Timer** %3
%8 = load i64, i64* %4
%9 = call i32 @timerStart(%struct.Timer* %7, i64 %8)
ret void
}

LLVM IR (-O2):
%struct.Timer = type { i32 }
define void @timerRestart(%struct.Timer* %0, i64 %1) {
%3 = tail call i32 @timerStop(%struct.Timer* %0)
%4 = tail call i32 @timerStart(%struct.Timer* %0, i64 %1)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void dhara_w16(uint8_t *data, uint16_t v) {
  data[0] = v;
  data[1] = v >> 8;
}


x86 assembly (clang, -O0):
<dhara_w16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dhara_w16>:
mov    %esi,(%rdi)
sar    $0x8,%esi
mov    %esi,0x4(%rdi)
ret

LLVM IR (-O0):
define void @dhara_w16(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 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
store i32 %5, i32* %7
%8 = load i32, i32* %4
%9 = ashr i32 %8, 8
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 1
store i32 %9, i32* %11
ret void
}

LLVM IR (-O2):
define void @dhara_w16(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
%3 = ashr i32 %1, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %3, i32* %4
ret void
}
/* Type definitions */
struct roff_node {
  int dummy;
};
struct roff_meta {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_line(char *, int /*<<< orphan*/);
int pre_ll(const struct roff_meta *meta, struct roff_node *n) {
  print_line(".ll", 0);
  return 1;
}


x86 assembly (clang, -O0):
<pre_ll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed9(%rip),%rdi
xor    %esi,%esi
call   1030 <print_line@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pre_ll>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %esi,%esi
call   1030 <print_line@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.roff_meta = type { i32 }
%struct.roff_node = type { i32 }
@.str = [4 x i8] c".ll\00"
define i32 @pre_ll(%struct.roff_meta* %0, %struct.roff_node* %1) {
%3 = alloca %struct.roff_meta*
%4 = alloca %struct.roff_node*
store %struct.roff_meta* %0, %struct.roff_meta** %3
store %struct.roff_node* %1, %struct.roff_node** %4
%5 = call i32 @print_line(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 1
}

LLVM IR (-O2):
%struct.roff_meta = type { i32 }
%struct.roff_node = type { i32 }
@.str = [4 x i8] c".ll\00"
define i32 @pre_ll(%struct.roff_meta* nocapture readnone %0, %struct.roff_node* nocapture readnone %1) {
%3 = tail call i32 @print_line(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
int /*<<< orphan*/ errx(int, char *);
void *malloc(size_t);
void *xmalloc(size_t n) {
  void *p;
  if (n == 0)
    errx(1, "attempted to allocate 0 bytes");
  if ((p = malloc(n)) == NULL)
    err(1, "failed to allocate memory");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1158 <xmalloc+0x28>
mov    $0x1,%edi
lea    0xead(%rip),%rsi
call   1030 <errx@plt>
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1180 <xmalloc+0x50>
mov    $0x1,%edi
lea    0xea3(%rip),%rsi
call   1040 <err@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    114a <xmalloc+0x1a>
lea    0xec0(%rip),%rsi
mov    $0x1,%edi
call   1030 <errx@plt>
mov    %rbx,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    116b <xmalloc+0x3b>
lea    0xebd(%rip),%rsi
mov    $0x1,%edi
call   1040 <err@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"attempted to allocate 0 bytes\00"
@.str.1 = [26 x i8] c"failed to allocate memory\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @errx(i32 1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = load i64, i64* %2
%10 = call i8* @malloc(i64 %9)
store i8* %10, i8** %3
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 @err(i32 1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %8
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [30 x i8] c"attempted to allocate 0 bytes\00"
@.str.1 = [26 x i8] c"failed to allocate memory\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = tail call i8* @malloc(i64 %0)
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ outnop1str(char *);
void clrBreg() { outnop1str("CLRB"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"CLRB\00"
define void @clrBreg() {
%1 = call i32 @outnop1str(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"CLRB\00"
define void @clrBreg() {
%1 = tail call i32 @outnop1str(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x6f() {
  Assert_real((isupper(111) == 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",
              560, ("isupper should be 0 for o"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x6f>:
push   %rax
mov    $0x6f,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x230,%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 = [26 x i8] c"isupper should be 0 for o\00"
define void @t_isupper_0x6f() {
%1 = call i64 @isupper(i32 111)
%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 560, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for o\00"
define void @t_isupper_0x6f() {
%1 = tail call i64 @isupper(i32 111)
%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 560, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WRITETEST(char *);
void EraseLnAll() { WRITETEST("\033[2K"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2K\00"
define void @EraseLnAll() {
%1 = call i32 @WRITETEST(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2K\00"
define void @EraseLnAll() {
%1 = tail call i32 @WRITETEST(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
void printchar(char **str, int c) {
  **str = c;
  ++(*str);
}


x86 assembly (clang, -O0):
<printchar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<printchar>:
mov    (%rdi),%rax
mov    %sil,(%rax)
addq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @printchar(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = trunc i32 %5 to i8
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %7
store i8 %6, i8* %8
%9 = load i8**, i8*** %3
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %9
ret void
}

LLVM IR (-O2):
define void @printchar(i8** nocapture %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = load i8*, i8** %0
store i8 %3, i8* %4
%5 = load i8*, i8** %0
%6 = getelementptr inbounds i8, i8* %5, i64 1
store i8* %6, i8** %0
ret void
}
int main() {
  int i;
  int j;
  i = 5;
  for (j = 0; j < 5; j++) {
    int i = 0;
  }
  return i;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1138 <main+0x38>
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <main+0x19>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 5
}
void UART0_Set_Format() {
  (*((volatile unsigned long *)0x7F005000)) =
      (((8 - 5) << 0) + ((0) << 2) + ((0) << 3) + ((0) << 6));
  (*((volatile unsigned long *)0x7F005004)) =
      (((1) << 0) + ((1) << 2) + ((0) << 10) + ((0) << 6));
  (*((volatile unsigned long *)0x7F005008)) =
      (((1) << 0) + ((0) << 1) + ((0) << 2) + ((0) << 4) + ((0) << 6));
  (*((volatile unsigned long *)0x7F00500C)) = 0;
}


x86 assembly (clang, -O0):
<UART0_Set_Format>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f005000,%eax
movq   $0x3,(%rax)
mov    $0x7f005004,%eax
movq   $0x5,(%rax)
mov    $0x7f005008,%eax
movq   $0x1,(%rax)
mov    $0x7f00500c,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UART0_Set_Format>:
movq   $0x3,0x7f005000
movq   $0x5,0x7f005004
movq   $0x1,0x7f005008
movq   $0x0,0x7f00500c
ret

LLVM IR (-O0):
define void @UART0_Set_Format() {
store volatile i64 3, i64* inttoptr (i64 2130726912 to i64*)
store volatile i64 5, i64* inttoptr (i64 2130726916 to i64*)
store volatile i64 1, i64* inttoptr (i64 2130726920 to i64*)
store volatile i64 0, i64* inttoptr (i64 2130726924 to i64*)
ret void
}

LLVM IR (-O2):
define void @UART0_Set_Format() {
store volatile i64 3, i64* inttoptr (i64 2130726912 to i64*)
store volatile i64 5, i64* inttoptr (i64 2130726916 to i64*)
store volatile i64 1, i64* inttoptr (i64 2130726920 to i64*)
store volatile i64 0, i64* inttoptr (i64 2130726924 to i64*)
ret void
}
/* Variables and functions */
int a_cas(int volatile *, int, int);
int a_fetch_add(volatile int *x, int v) {
  int old;
  do
    old = *x;
  while (a_cas(x, old, old + v) != old);
  return old;
}


x86 assembly (clang, -O0):
<a_fetch_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0x10(%rbp),%edx
add    -0xc(%rbp),%edx
call   1030 <a_cas@plt>
cmp    -0x10(%rbp),%eax
jne    111f <a_fetch_add+0xf>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_fetch_add>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%r15
nopl   0x0(%rax,%rax,1)
mov    (%r15),%ebx
lea    (%rbx,%r14,1),%edx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <a_cas@plt>
cmp    %ebx,%eax
jne    1120 <a_fetch_add+0x10>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @a_fetch_add(i32* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = load volatile i32, i32* %0
%5 = add nsw i32 %4, %1
%6 = tail call i32 @a_cas(i32* %0, i32 %4, i32 %5)
%7 = icmp eq i32 %6, %4
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 %4
}
/* Type definitions */
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
unsigned long long tempo_em_microsegundos() {
  struct timeval tempo;
  unsigned long long resp = 0L;
  gettimeofday(&tempo, NULL);
  resp = (unsigned long long)(tempo.tv_sec * 1000000);
  resp += (unsigned long long)(tempo.tv_usec);
  return resp;
}


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

x86 assembly (clang, -O2):
<tempo_em_microsegundos>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movslq 0x8(%rsp),%rax
imul   $0xf4240,%rax,%rax
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @tempo_em_microsegundos() {
%1 = alloca %struct.timeval
%2 = alloca i64
store i64 0, i64* %2
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
store i64 %7, i64* %2
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%9 = load i64, i64* %8
%10 = load i64, i64* %2
%11 = add i64 %10, %9
store i64 %11, i64* %2
%12 = load i64, i64* %2
ret i64 %12
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @tempo_em_microsegundos() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add i64 %9, %7
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void real2c(float r) { printf("%f\n", r); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define void @real2c(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define void @real2c(float %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long long, unsigned long long,
                          unsigned long long);
int main() {
  unsigned long long x = -1;
  unsigned long long y = -1;
  unsigned long long z = x * y;
  printf("%llu * %llu = %llu\n", x, y, z);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
movq   $0xffffffffffffffff,-0x10(%rbp)
ff
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
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
mov    $0x1,%ecx
mov    $0xffffffffffffffff,%rsi
mov    $0xffffffffffffffff,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [20 x i8] c"%llu * %llu = %llu\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i64 -1, i64 -1, i64 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ spin();
unsigned long toggle(unsigned long val) {
  spin();
  return ~val;
}


x86 assembly (clang, -O0):
<toggle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <spin@plt>
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toggle>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <spin@plt>
not    %rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @toggle(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 (...) @spin()
%4 = load i64, i64* %2
%5 = xor i64 %4, -1
ret i64 %5
}

LLVM IR (-O2):
define i64 @toggle(i64 %0) {
%2 = tail call i32 (...) @spin()
%3 = xor i64 %0, -1
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_cvtsi64_sd(int /*<<< orphan*/, long long);
__m128d test_mm_cvtsi64_sd(__m128d A, long long B) {
  return _mm_cvtsi64_sd(A, B);
}


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

x86 assembly (clang, -O2):
<test_mm_cvtsi64_sd>:
jmp    1030 <_mm_cvtsi64_sd@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cvtsi64_sd(i32 %0, i64 %1) {
%3 = tail call i32 @_mm_cvtsi64_sd(i32 %0, i64 %1)
ret i32 %3
}