xunge/DecIR huggingface dataset:
/* Variables and functions */
double gsl_stats_sd(double *, int, int);
double sd(double data[], int n) { return gsl_stats_sd(data, 1, n); }


x86 assembly (clang, -O0):
<sd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0x1,%esi
call   1030 <gsl_stats_sd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd>:
mov    %esi,%edx
mov    $0x1,%esi
jmp    1030 <gsl_stats_sd@plt>

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

LLVM IR (-O2):
define double @sd(double* %0, i32 %1) {
%3 = tail call double @gsl_stats_sd(double* %0, i32 1, i32 %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ asSpace(char);
int /*<<< orphan*/ outbufByte(int /*<<< orphan*/);
void outbufAsSpace(char c) { outbufByte(asSpace(c)); }


x86 assembly (clang, -O0):
<outbufAsSpace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <asSpace@plt>
mov    %eax,%edi
call   1040 <outbufByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @outbufAsSpace(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @asSpace(i8 signext %3)
%5 = call i32 @outbufByte(i32 %4)
ret void
}

LLVM IR (-O2):
define void @outbufAsSpace(i8 signext %0) {
%2 = tail call i32 @asSpace(i8 signext %0)
%3 = tail call i32 @outbufByte(i32 %2)
ret void
}
void foo41() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @XtCallCallbacks() {
ret void
}
float farenheitToCelsius(float farenheit) {
  return (5.0 / 9.0) * (farenheit - 32.0);
}


x86 assembly (clang, -O0):
<farenheitToCelsius>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeee(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xeda(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<farenheitToCelsius>:
cvtss2sd %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @farenheitToCelsius(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fsub double %4, 3.200000e+01
%6 = fmul double 0x3FE1C71C71C71C72, %5
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @farenheitToCelsius(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, -3.200000e+01
%4 = fmul double %3, 0x3FE1C71C71C71C72
%5 = fptrunc double %4 to float
ret float %5
}
int main(int argc, char **argv) {
  int x;
  int y;
  x = argc;
  x = x * x - 2 * x;
  y = 4 + argc;
  do {
    if (x > 2) {
      x = x - 1;
    } else {
      x = x - 1;
      if (2 * x > y) {
        y = 2;
      } else {
        y = 3;
      };
    };
    x = x - 1;
  } while (x > 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x2,-0x14(%rbp)
jle    114b <main+0x4b>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    117b <main+0x7b>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
cmp    -0x18(%rbp),%eax
jle    116f <main+0x6f>
movl   $0x2,-0x18(%rbp)
jmp    1176 <main+0x76>
movl   $0x3,-0x18(%rbp)
jmp    117b <main+0x7b>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     1133 <main+0x33>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %6
%11 = mul nsw i32 %9, %10
%12 = load i32, i32* %6
%13 = mul nsw i32 2, %12
%14 = sub nsw i32 %11, %13
store i32 %14, i32* %6
%15 = load i32, i32* %4
%16 = add nsw i32 4, %15
store i32 %16, i32* %7
br label %17
17: ; preds = %36, %2
%18 = load i32, i32* %6
%19 = icmp sgt i32 %18, 2
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = load i32, i32* %6
%22 = sub nsw i32 %21, 1
store i32 %22, i32* %6
br label %33
23: ; preds = %17
%24 = load i32, i32* %6
%25 = sub nsw i32 %24, 1
store i32 %25, i32* %6
%26 = load i32, i32* %6
%27 = mul nsw i32 2, %26
%28 = load i32, i32* %7
%29 = icmp sgt i32 %27, %28
br i1 %29, label %30, label %31
30: ; preds = %23
store i32 2, i32* %7
br label %32
31: ; preds = %23
store i32 3, i32* %7
br label %32
32: ; preds = %31, %30
br label %33
33: ; preds = %32, %20
%34 = load i32, i32* %6
%35 = sub nsw i32 %34, 1
store i32 %35, i32* %6
br label %36
36: ; preds = %33
%37 = load i32, i32* %6
%38 = icmp sgt i32 %37, 0
br i1 %38, label %17, label %39
39: ; preds = %36
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
void spi_finished(void) {}


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

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

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

LLVM IR (-O2):
define void @spi_finished() {
ret void
}
int IsDigit(char ch) {
  if (ch >= '0' && ch <= '9') {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<IsDigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1130 <IsDigit+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1130 <IsDigit+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <IsDigit+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsDigit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @IsDigit(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %13
12: ; preds = %7, %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @IsDigit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ haptic_hal_write8(int, int);
void haptic_start_motor(void) { haptic_hal_write8(0x0C, 0x01); }


x86 assembly (clang, -O0):
<haptic_start_motor>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc,%edi
mov    $0x1,%esi
call   1030 <haptic_hal_write8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<haptic_start_motor>:
mov    $0xc,%edi
mov    $0x1,%esi
jmp    1030 <haptic_hal_write8@plt>

LLVM IR (-O0):
define void @haptic_start_motor() {
%1 = call i32 @haptic_hal_write8(i32 12, i32 1)
ret void
}

LLVM IR (-O2):
define void @haptic_start_motor() {
%1 = tail call i32 @haptic_hal_write8(i32 12, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
int /*<<< orphan*/ *opendir(char *);
int canEnter(char *path) {
  int result = 0;
  DIR *dir = opendir(path);
  result = ((dir != NULL) ? 1 : 0);
  closedir(dir);
  return result;
}


x86 assembly (clang, -O0):
<canEnter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <closedir@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<canEnter>:
push   %rbx
call   1030 <opendir@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %rax,%rdi
call   1040 <closedir@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @canEnter(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32*
store i8* %0, i8** %2
store i32 0, i32* %3
%5 = load i8*, i8** %2
%6 = call i32* @opendir(i8* %5)
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = icmp ne i32* %7, null
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
store i32 %10, i32* %3
%11 = load i32*, i32** %4
%12 = call i32 @closedir(i32* %11)
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @canEnter(i8* nocapture %0) {
%2 = tail call i32* @opendir(i8* %0)
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @closedir(i32* %2)
ret i32 %4
}
void signed_char_xor_unsigned_char(signed char *LHS, unsigned char RHS) {
  (*LHS) ^= RHS;
}


x86 assembly (clang, -O0):
<signed_char_xor_unsigned_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%edx
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_char_xor_unsigned_char>:
xor    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @signed_char_xor_unsigned_char(i8* nocapture %0, i8 zeroext %1) {
%3 = load i8, i8* %0
%4 = xor i8 %3, %1
store i8 %4, i8* %0
ret void
}
void tegra_unregister_simon_notifier(struct notifier_block *nb) {}


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

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

LLVM IR (-O0):
%struct.notifier_block = type opaque
define void @tegra_unregister_simon_notifier(%struct.notifier_block* %0) {
%2 = alloca %struct.notifier_block*
store %struct.notifier_block* %0, %struct.notifier_block** %2
ret void
}

LLVM IR (-O2):
%struct.notifier_block = type opaque
define void @tegra_unregister_simon_notifier(%struct.notifier_block* nocapture %0) {
ret void
}
int foo_sub(const unsigned char *tmp, int i, int val) {
  return (unsigned char)(((tmp[i] - val) > 0xFF)
                             ? 0xFF
                             : (((tmp[i] - val) < 0) ? 0 : (tmp[i] - val)));
}


x86 assembly (clang, -O0):
<foo_sub>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
sub    -0x10(%rbp),%eax
cmp    $0xff,%eax
jle    1135 <foo_sub+0x35>
mov    $0xff,%eax
mov    %eax,-0x14(%rbp)
jmp    116f <foo_sub+0x6f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
sub    -0x10(%rbp),%eax
cmp    $0x0,%eax
jge    1157 <foo_sub+0x57>
xor    %eax,%eax
mov    %eax,-0x18(%rbp)
jmp    1169 <foo_sub+0x69>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_sub>:
movslq %esi,%rax
movzbl (%rdi,%rax,1),%eax
xor    %ecx,%ecx
sub    %edx,%eax
movzbl %al,%edx
cmovs  %ecx,%edx
cmp    $0x100,%eax
mov    $0xff,%eax
cmovl  %edx,%eax
ret

LLVM IR (-O0):
define i32 @foo_sub(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 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i32, i32* %6
%14 = sub nsw i32 %12, %13
%15 = icmp sgt i32 %14, 255
br i1 %15, label %16, label %17
16: ; preds = %3
br label %39
17: ; preds = %3
%18 = load i8*, i8** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = load i32, i32* %6
%25 = sub nsw i32 %23, %24
%26 = icmp slt i32 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %17
br label %37
28: ; preds = %17
%29 = load i8*, i8** %4
%30 = load i32, i32* %5
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %29, i64 %31
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = load i32, i32* %6
%36 = sub nsw i32 %34, %35
br label %37
37: ; preds = %28, %27
%38 = phi i32 [ 0, %27 ], [ %36, %28 ]
br label %39
39: ; preds = %37, %16
%40 = phi i32 [ 255, %16 ], [ %38, %37 ]
%41 = trunc i32 %40 to i8
%42 = zext i8 %41 to i32
ret i32 %42
}

LLVM IR (-O2):
define i32 @foo_sub(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = sub nsw i32 %7, %2
%9 = icmp sgt i32 %8, 255
%10 = icmp slt i32 %8, 0
%11 = and i32 %8, 255
%12 = select i1 %10, i32 0, i32 %11
%13 = select i1 %9, i32 255, i32 %12
ret i32 %13
}
/* Variables and functions */
void *calloc(size_t, size_t);
void *__softboundmpx_safe_calloc(size_t nmemb, size_t size) {
  return calloc(nmemb, size);
}


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

x86 assembly (clang, -O2):
<__softboundmpx_safe_calloc>:
jmp    1030 <calloc@plt>

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

LLVM IR (-O2):
define noalias i8* @__softboundmpx_safe_calloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
ret i8* %3
}
long reduceInt(long left, long right, unsigned char op) {
  switch (op) {
  case 0x0E:
    return left + right;
  case 0x0F:
    return left - right;
  case 0x10:
    return left * right;
  case 0x11:
    return left / right;
  }
  return 0;
}


x86 assembly (clang, -O0):
<reduceInt>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %al,-0x19(%rbp)
movzbl -0x19(%rbp),%eax
add    $0xfffffff2,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x3,%eax
ja     1182 <reduceInt+0x82>
mov    -0x28(%rbp),%rax
lea    0xece(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    118a <reduceInt+0x8a>
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    118a <reduceInt+0x8a>
mov    -0x10(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    118a <reduceInt+0x8a>
mov    -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
mov    %rax,-0x8(%rbp)
jmp    118a <reduceInt+0x8a>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reduceInt>:
add    $0xf2,%dl
cmp    $0x3,%dl
ja     1122 <reduceInt+0x22>
movzbl %dl,%eax
lea    0xeee(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
add    %rdi,%rsi
mov    %rsi,%rax
ret
xor    %esi,%esi
mov    %rsi,%rax
ret
sub    %rsi,%rdi
mov    %rdi,%rax
ret
imul   %rdi,%rsi
mov    %rsi,%rax
ret
mov    %rdi,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     114c <reduceInt+0x4c>
mov    %rdi,%rax
cqto
idiv   %rsi
ret
mov    %edi,%eax
xor    %edx,%edx
div    %esi
mov    %eax,%esi
mov    %rsi,%rax
ret

LLVM IR (-O0):
define i64 @reduceInt(i64 %0, i64 %1, i8 zeroext %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8
store i64 %0, i64* %5
store i64 %1, i64* %6
store i8 %2, i8* %7
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
switch i32 %9, label %26 [
i32 14, label %10
i32 15, label %14
i32 16, label %18
i32 17, label %22
]
10: ; preds = %3
%11 = load i64, i64* %5
%12 = load i64, i64* %6
%13 = add nsw i64 %11, %12
store i64 %13, i64* %4
br label %27
14: ; preds = %3
%15 = load i64, i64* %5
%16 = load i64, i64* %6
%17 = sub nsw i64 %15, %16
store i64 %17, i64* %4
br label %27
18: ; preds = %3
%19 = load i64, i64* %5
%20 = load i64, i64* %6
%21 = mul nsw i64 %19, %20
store i64 %21, i64* %4
br label %27
22: ; preds = %3
%23 = load i64, i64* %5
%24 = load i64, i64* %6
%25 = sdiv i64 %23, %24
store i64 %25, i64* %4
br label %27
26: ; preds = %3
store i64 0, i64* %4
br label %27
27: ; preds = %26, %22, %18, %14, %10
%28 = load i64, i64* %4
ret i64 %28
}

LLVM IR (-O2):
define i64 @reduceInt(i64 %0, i64 %1, i8 zeroext %2) {
switch i8 %2, label %12 [
i8 14, label %4
i8 15, label %6
i8 16, label %8
i8 17, label %10
]
4: ; preds = %3
%5 = add nsw i64 %1, %0
br label %12
6: ; preds = %3
%7 = sub nsw i64 %0, %1
br label %12
8: ; preds = %3
%9 = mul nsw i64 %1, %0
br label %12
10: ; preds = %3
%11 = sdiv i64 %0, %1
br label %12
12: ; preds = %3, %10, %8, %6, %4
%13 = phi i64 [ %11, %10 ], [ %9, %8 ], [ %7, %6 ], [ %5, %4 ], [ 0, %3 ]
ret i64 %13
}
/* Variables and functions */
int gsw_rho(double, double, double);
double gsw_specvol(double sa, double ct, double p) {
  return (1e0 / gsw_rho(sa, ct, p));
}


x86 assembly (clang, -O0):
<gsw_specvol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <gsw_rho@plt>
cvtsi2sd %eax,%xmm1
movsd  0xeb9(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsw_specvol>:
push   %rax
call   1030 <gsw_rho@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0xedb(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @gsw_specvol(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* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = call i32 @gsw_rho(double %7, double %8, double %9)
%11 = sitofp i32 %10 to double
%12 = fdiv double 1.000000e+00, %11
ret double %12
}

LLVM IR (-O2):
define double @gsw_specvol(double %0, double %1, double %2) {
%4 = tail call i32 @gsw_rho(double %0, double %1, double %2)
%5 = sitofp i32 %4 to double
%6 = fdiv double 1.000000e+00, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  printf("Come from %s!\n", argv[0]);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Come from %s!\0A\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
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Come from %s!\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_pixel(unsigned int i) {
  if (i)
    printf("x ");
  else
    printf(". ");
}


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

x86 assembly (clang, -O2):
<print_pixel>:
test   %edi,%edi
lea    0xeea(%rip),%rax
lea    0xee0(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"x \00"
@.str.1 = [3 x i8] c". \00"
define void @print_pixel(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @printf(i8* dereferenceable(1) %3)
ret void
}
/* Variables and functions */
int any_decrqss(char const *, char *);
int rpt_DECSFC(const char *the_title) { return any_decrqss(the_title, "*s"); }


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

x86 assembly (clang, -O2):
<rpt_DECSFC>:
lea    0xee9(%rip),%rsi
jmp    1030 <any_decrqss@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"*s\00"
define i32 @rpt_DECSFC(i8* %0) {
%2 = tail call i32 @any_decrqss(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
float dist_Squared(float x, float y, float z, float e) {
  (void)e;
  return (x * x + y * y + z * z);
}


x86 assembly (clang, -O0):
<dist_Squared>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist_Squared>:
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
mulss  %xmm2,%xmm2
addss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @dist_Squared(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %8
%10 = load float, float* %5
%11 = load float, float* %5
%12 = load float, float* %6
%13 = load float, float* %6
%14 = fmul float %12, %13
%15 = call float @llvm.fmuladd.f32(float %10, float %11, float %14)
%16 = load float, float* %7
%17 = load float, float* %7
%18 = call float @llvm.fmuladd.f32(float %16, float %17, float %15)
ret float %18
}

LLVM IR (-O2):
define float @dist_Squared(float %0, float %1, float %2, float %3) {
%5 = fmul float %1, %1
%6 = tail call float @llvm.fmuladd.f32(float %0, float %0, float %5)
%7 = tail call float @llvm.fmuladd.f32(float %2, float %2, float %6)
ret float %7
}
/* Variables and functions */
int strcmp(char const *, char const *);
int strcoll(const char *s1, const char *s2) { return strcmp(s1, s2); }


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

x86 assembly (clang, -O2):
<strcoll>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @strcoll(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
int toChar(int c) {
  if (0 <= c && c <= 9) {
    return c + '0';
  } else if (10 <= c && c <= 35) {
    return c + 'a' - 10;
  }
  return -1;
}


x86 assembly (clang, -O0):
<toChar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%eax
jg     112a <toChar+0x2a>
cmpl   $0x9,-0x8(%rbp)
jg     112a <toChar+0x2a>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    115f <toChar+0x5f>
mov    $0xa,%eax
cmp    -0x8(%rbp),%eax
jg     1153 <toChar+0x53>
cmpl   $0x23,-0x8(%rbp)
jg     1153 <toChar+0x53>
mov    -0x8(%rbp),%eax
add    $0x61,%eax
sub    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    115f <toChar+0x5f>
jmp    1158 <toChar+0x58>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toChar>:
mov    %edi,%eax
cmp    $0x9,%edi
ja     110b <toChar+0xb>
add    $0x30,%eax
ret
lea    -0xa(%rax),%ecx
add    $0x57,%eax
cmp    $0x1a,%ecx
mov    $0xffffffff,%ecx
cmovb  %eax,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @toChar(i32 %0) {
%2 = icmp ult i32 %0, 10
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = add nuw nsw i32 %0, 48
br label %10
5: ; preds = %1
%6 = add i32 %0, -10
%7 = icmp ult i32 %6, 26
%8 = add nsw i32 %0, 87
%9 = select i1 %7, i32 %8, i32 -1
br label %10
10: ; preds = %5, %3
%11 = phi i32 [ %4, %3 ], [ %9, %5 ]
ret i32 %11
}
int fun(int a, int b) { return a + b; }


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

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

LLVM IR (-O0):
define i32 @fun(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @fun(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long);
int /*<<< orphan*/ third(int);
extern void second(unsigned long arg) {
  printf("second: 0x%x\n", arg);
  third(0xc0ffee);
}


x86 assembly (clang, -O0):
<second>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
mov    $0xc0ffee,%edi
call   1030 <third@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<second>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0xc0ffee,%edi
pop    %rax
jmp    1030 <third@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"second: 0x%x\0A\00"
define void @second(i64 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 %0)
%3 = tail call i32 @third(i32 12648430)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint_fast8_t;
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ RTI_ReadItemEx(int, int /*<<< orphan*/, int /*<<< orphan*/,
                                  int /*<<< orphan*/ *);
uint_fast8_t RTI_ReadItem(uint8_t ui8ItemID, uint8_t ui8Length,
                          uint8_t *pui8Value) {
  return RTI_ReadItemEx(0xFF, ui8ItemID, ui8Length, pui8Value);
}


x86 assembly (clang, -O0):
<RTI_ReadItem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    $0xff,%edi
call   1030 <RTI_ReadItemEx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTI_ReadItem>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    $0xff,%edi
jmp    1030 <RTI_ReadItemEx@plt>

LLVM IR (-O0):
define i32 @RTI_ReadItem(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32*, i32** %6
%10 = call i32 @RTI_ReadItemEx(i32 255, i32 %7, i32 %8, i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @RTI_ReadItem(i32 %0, i32 %1, i32* %2) {
%4 = tail call i32 @RTI_ReadItemEx(i32 255, i32 %0, i32 %1, i32* %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
size_t wcsrtombs(char *, int /*<<< orphan*/ const **, size_t,
                 int /*<<< orphan*/ *);
size_t wcstombs(char *dst, const wchar_t *src, size_t len) {
  return wcsrtombs(dst, &src, len, NULL);
}


x86 assembly (clang, -O0):
<wcstombs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <wcsrtombs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcstombs>:
push   %rax
mov    %rsi,(%rsp)
mov    %rsp,%rsi
xor    %ecx,%ecx
call   1030 <wcsrtombs@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i64 @wcstombs(i8* %0, i32* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i64
store i8* %0, i8** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %6
%9 = call i64 @wcsrtombs(i8* %7, i32** %5, i64 %8, i32* null)
ret i64 %9
}

LLVM IR (-O2):
define i64 @wcstombs(i8* %0, i32* %1, i64 %2) {
%4 = alloca i32*
store i32* %1, i32** %4
%5 = call i64 @wcsrtombs(i8* %0, i32** %4, i64 %2, i32* null)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x8b() {
  Assert_real((isbdigit(139) == 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_isbdigit.c",
              700, ("isbdigit should be 0 for 0x8b"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x8b>:
push   %rax
mov    $0x8b,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x2bc,%edx
pop    %rax
jmp    1030 <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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x8b\00"
define void @t_isbdigit_0x8b() {
%1 = call i64 @isbdigit(i32 139)
%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 700, 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x8b\00"
define void @t_isbdigit_0x8b() {
%1 = tail call i64 @isbdigit(i32 139)
%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 700, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void locale_finalise(void) {}


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

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

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

LLVM IR (-O2):
define void @locale_finalise() {
ret void
}
/* Variables and functions */
int random();
long number_mm(void) { return random() >> 6; }


x86 assembly (clang, -O0):
<number_mm>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <random@plt>
sar    $0x6,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_mm>:
push   %rax
xor    %eax,%eax
call   1030 <random@plt>
sar    $0x6,%eax
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @number_mm() {
%1 = call i32 (...) @random()
%2 = ashr i32 %1, 6
%3 = sext i32 %2 to i64
ret i64 %3
}

LLVM IR (-O2):
define i64 @number_mm() {
%1 = tail call i32 (...) @random()
%2 = ashr i32 %1, 6
%3 = sext i32 %2 to i64
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void die(const char *message) {
  fprintf(stderr, "%s\n", message);
  abort();
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @die(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_slli_si64(int /*<<< orphan*/, int);
__m64 test_mm_slli_si64(__m64 a) { return _mm_slli_si64(a, 3); }


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

x86 assembly (clang, -O2):
<test_mm_slli_si64>:
mov    $0x3,%esi
jmp    1030 <_mm_slli_si64@plt>

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

LLVM IR (-O2):
define i32 @test_mm_slli_si64(i32 %0) {
%2 = tail call i32 @_mm_slli_si64(i32 %0, i32 3)
ret i32 %2
}
int ck_ssleay_is_installed(void) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @ck_ssleay_is_installed() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ get_word(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char buf[0x1000];
  get_word(buf, 5);
  printf("%s\n", buf);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1000,%rsp
lea    -0x1000(%rbp),%rdi
mov    $0x5,%esi
call   1040 <get_word@plt>
lea    -0x1000(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1000,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [4096 x i8]
%2 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 0
%3 = call i32 @get_word(i8* %2, i32 5)
%4 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [4096 x i8]
%2 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 0
%3 = call i32 @get_word(i8* %2, i32 5)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
struct shash_node {
  int dummy;
};
struct shash {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ hash_name(char *);
struct shash_node *shash_add_nocopy__(struct shash *, char *, void const *,
                                      int /*<<< orphan*/);
struct shash_node *shash_add_nocopy(struct shash *sh, char *name,
                                    const void *data) {
  return shash_add_nocopy__(sh, name, data, hash_name(name));
}


x86 assembly (clang, -O0):
<shash_add_nocopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <hash_name@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
call   1040 <shash_add_nocopy__@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shash_add_nocopy>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %rsi,%rdi
call   1030 <hash_name@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <shash_add_nocopy__@plt>

LLVM IR (-O0):
%struct.shash_node = type { i32 }
%struct.shash = type { i32 }
define %struct.shash_node* @shash_add_nocopy(%struct.shash* %0, i8* %1, i8* %2) {
%4 = alloca %struct.shash*
%5 = alloca i8*
%6 = alloca i8*
store %struct.shash* %0, %struct.shash** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.shash*, %struct.shash** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = load i8*, i8** %5
%11 = call i32 @hash_name(i8* %10)
%12 = call %struct.shash_node* @shash_add_nocopy__(%struct.shash* %7, i8* %8, i8* %9, i32 %11)
ret %struct.shash_node* %12
}

LLVM IR (-O2):
%struct.shash_node = type { i32 }
%struct.shash = type { i32 }
define %struct.shash_node* @shash_add_nocopy(%struct.shash* %0, i8* %1, i8* %2) {
%4 = tail call i32 @hash_name(i8* %1)
%5 = tail call %struct.shash_node* @shash_add_nocopy__(%struct.shash* %0, i8* %1, i8* %2, i32 %4)
ret %struct.shash_node* %5
}
void wakeup_source_pmic_cleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @wakeup_source_pmic_cleanup() {
ret void
}
int move_at_velocity(int motor, int velocity) {}


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

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

LLVM IR (-O0):
define i32 @move_at_velocity(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* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @move_at_velocity(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ error(int /*<<< orphan*/, char *);
double ranf();
double uniform(double a, double b) {
  if (a > b)
    error(0, "uniform Argument Error: a > b");
  return (a + (b - a) * ranf());
}


x86 assembly (clang, -O0):
<uniform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1150 <uniform+0x30>
xor    %edi,%edi
lea    0xeb5(%rip),%rsi
call   1040 <error@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <ranf@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uniform>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
ucomisd %xmm1,%xmm0
jbe    1144 <uniform+0x24>
lea    0xec3(%rip),%rsi
xor    %edi,%edi
call   1040 <error@plt>
movsd  0x8(%rsp),%xmm0
subsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <ranf@plt>
mulsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"uniform Argument Error: a > b\00"
define double @uniform(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 ogt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @error(i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = load double, double* %3
%12 = load double, double* %4
%13 = load double, double* %3
%14 = fsub double %12, %13
%15 = call double (...) @ranf()
%16 = call double @llvm.fmuladd.f64(double %14, double %15, double %11)
ret double %16
}

LLVM IR (-O2):
@.str = [30 x i8] c"uniform Argument Error: a > b\00"
define double @uniform(double %0, double %1) {
%3 = fcmp ogt double %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @error(i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
%7 = fsub double %1, %0
%8 = tail call double (...) @ranf()
%9 = tail call double @llvm.fmuladd.f64(double %7, double %8, double %0)
ret double %9
}
void doit4(int *x) { *x = 333; }


x86 assembly (clang, -O0):
<doit4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x14d,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<doit4>:
movl   $0x14d,(%rdi)
ret

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

LLVM IR (-O2):
define void @doit4(i32* nocapture writeonly %0) {
store i32 333, i32* %0
ret void
}
void X509_REQ_get_attr_by_OBJ(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_REQ_get_attr_by_OBJ() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void err_msg(const char *msg) { fprintf(stderr, "%s", msg); }


x86 assembly (clang, -O0):
<err_msg>:
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
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_msg>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @err_msg(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @err_msg(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int compare_strings(const void *pa, const void *pb) {
  const char *a = *((char **)pa);
  const char *b = *((char **)pb);
  return strcmp(a, b);
}


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

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

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

LLVM IR (-O2):
define i32 @compare_strings(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}