xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ sqrt(int);
int isPrime(int n) {
  int i, s = (int)sqrt(n);
  for (i = 2; i <= s; i++) {
    if (n % i == 0)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isPrime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <sqrt@plt>
mov    %eax,-0x10(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1168 <isPrime+0x58>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1155 <isPrime+0x45>
movl   $0x0,-0x4(%rbp)
jmp    116f <isPrime+0x5f>
jmp    115a <isPrime+0x4a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <isPrime+0x1d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPrime>:
push   %rbx
mov    %edi,%ebx
call   1030 <sqrt@plt>
mov    %rax,%rsi
mov    $0x1,%ecx
cmp    $0x2,%esi
jl     114f <isPrime+0x3f>
neg    %esi
mov    $0x2,%edi
nopl   0x0(%rax)
mov    %ebx,%eax
cltd
idiv   %edi
test   %edx,%edx
je     114d <isPrime+0x3d>
lea    (%rsi,%rdi,1),%eax
add    $0x1,%eax
mov    %edi,%edx
add    $0x1,%edx
mov    %edx,%edi
cmp    $0x1,%eax
jne    1130 <isPrime+0x20>
jmp    114f <isPrime+0x3f>
xor    %ecx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @isPrime(i32 %0) {
%2 = tail call i64 @sqrt(i32 %0)
%3 = trunc i64 %2 to i32
%4 = icmp slt i32 %3, 2
br i1 %4, label %12, label %8
5: ; preds = %8
%6 = add nuw i32 %9, 1
%7 = icmp eq i32 %9, %3
br i1 %7, label %12, label %8
8: ; preds = %1, %5
%9 = phi i32 [ %6, %5 ], [ 2, %1 ]
%10 = srem i32 %0, %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %8, %5, %1
%13 = phi i32 [ 1, %1 ], [ 1, %5 ], [ 0, %8 ]
ret i32 %13
}
void glEnable(void) { return; }


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

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gdk_cursor_new_for_display() {
ret void
}
/* Variables and functions */
double EvalAngCor_alpha1_3minus_2plus_15097_L3(double);
double funcAngCor_alpha1_3minus_2plus_15097_L3(double *x, double *par) {
  double result;
  result = par[0] * EvalAngCor_alpha1_3minus_2plus_15097_L3(x[0]);
  return result;
}


x86 assembly (clang, -O0):
<funcAngCor_alpha1_3minus_2plus_15097_L3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <EvalAngCor_alpha1_3minus_2plus_15097_L3@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcAngCor_alpha1_3minus_2plus_15097_L3>:
push   %rax
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rdi),%xmm0
call   1030 <EvalAngCor_alpha1_3minus_2plus_15097_L3@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @funcAngCor_alpha1_3minus_2plus_15097_L3(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %4
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %3
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = call double @EvalAngCor_alpha1_3minus_2plus_15097_L3(double %11)
%13 = fmul double %8, %12
store double %13, double* %5
%14 = load double, double* %5
ret double %14
}

LLVM IR (-O2):
define double @funcAngCor_alpha1_3minus_2plus_15097_L3(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = load double, double* %0
%5 = tail call double @EvalAngCor_alpha1_3minus_2plus_15097_L3(double %4)
%6 = fmul double %3, %5
ret double %6
}
unsigned int shift_11_bit_feedback_register() {
  static unsigned int register_11 = 1;
  unsigned int new_bit;
  new_bit = (register_11 & 0x01) ^ ((register_11 & 0x04) >> 2);
  register_11 = register_11 >> 1;
  register_11 = register_11 | (new_bit << 10);
  return (register_11);
}


x86 assembly (clang, -O0):
<shift_11_bit_feedback_register>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f16(%rip),%eax
and    $0x1,%eax
mov    0x2f0d(%rip),%ecx
and    $0x4,%ecx
shr    $0x2,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    0x2efc(%rip),%eax
shr    $0x1,%eax
mov    %eax,0x2ef3(%rip)
mov    0x2eed(%rip),%eax
mov    -0x4(%rbp),%ecx
shl    $0xa,%ecx
or     %ecx,%eax
mov    %eax,0x2edf(%rip)
mov    0x2ed9(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift_11_bit_feedback_register>:
mov    0x2f1a(%rip),%ecx
mov    %ecx,%eax
shr    $0x2,%eax
xor    %ecx,%eax
shr    %ecx
and    $0x1,%eax
shl    $0xa,%eax
or     %ecx,%eax
mov    %eax,0x2f03(%rip)
ret

LLVM IR (-O0):
@shift_11_bit_feedback_register.register_11 = internal global i32 1
define i32 @shift_11_bit_feedback_register() {
%1 = alloca i32
%2 = load i32, i32* @shift_11_bit_feedback_register.register_11
%3 = and i32 %2, 1
%4 = load i32, i32* @shift_11_bit_feedback_register.register_11
%5 = and i32 %4, 4
%6 = lshr i32 %5, 2
%7 = xor i32 %3, %6
store i32 %7, i32* %1
%8 = load i32, i32* @shift_11_bit_feedback_register.register_11
%9 = lshr i32 %8, 1
store i32 %9, i32* @shift_11_bit_feedback_register.register_11
%10 = load i32, i32* @shift_11_bit_feedback_register.register_11
%11 = load i32, i32* %1
%12 = shl i32 %11, 10
%13 = or i32 %10, %12
store i32 %13, i32* @shift_11_bit_feedback_register.register_11
%14 = load i32, i32* @shift_11_bit_feedback_register.register_11
ret i32 %14
}

LLVM IR (-O2):
@shift_11_bit_feedback_register.register_11 = internal unnamed_addr global i32 1
define i32 @shift_11_bit_feedback_register() {
%1 = load i32, i32* @shift_11_bit_feedback_register.register_11
%2 = lshr i32 %1, 2
%3 = xor i32 %2, %1
%4 = lshr i32 %1, 1
%5 = shl i32 %3, 10
%6 = and i32 %5, 1024
%7 = or i32 %6, %4
store i32 %7, i32* @shift_11_bit_feedback_register.register_11
ret i32 %7
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ TCSAFLUSH;
int tcsetattr(int, int /*<<< orphan*/, struct termios *);
int gp_load_term(int fd, struct termios *tios) {
  return tcsetattr(fd, TCSAFLUSH, tios);
}


x86 assembly (clang, -O0):
<gp_load_term>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebf(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
call   1030 <tcsetattr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gp_load_term>:
mov    %rsi,%rdx
mov    0x2ece(%rip),%rax
mov    (%rax),%esi
jmp    1030 <tcsetattr@plt>

LLVM IR (-O0):
%struct.termios = type { i32 }
@TCSAFLUSH = global i32 0
define i32 @gp_load_term(i32 %0, %struct.termios* %1) {
%3 = alloca i32
%4 = alloca %struct.termios*
store i32 %0, i32* %3
store %struct.termios* %1, %struct.termios** %4
%5 = load i32, i32* %3
%6 = load i32, i32* @TCSAFLUSH
%7 = load %struct.termios*, %struct.termios** %4
%8 = call i32 @tcsetattr(i32 %5, i32 %6, %struct.termios* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@TCSAFLUSH = global i32 0
define i32 @gp_load_term(i32 %0, %struct.termios* %1) {
%3 = load i32, i32* @TCSAFLUSH
%4 = tail call i32 @tcsetattr(i32 %0, i32 %3, %struct.termios* %1)
ret i32 %4
}
/* Variables and functions */
int strcmp(char *, char *);
int myCompare(void *s1, void *s2) {
  char *key1 = (char *)s1;
  char *key2 = (char *)s2;
  return (strcmp(key1, key2));
}


x86 assembly (clang, -O0):
<myCompare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%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):
<myCompare>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @myCompare(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
store i8* %7, i8** %5
%8 = load i8*, i8** %4
store i8* %8, i8** %6
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i32 @strcmp(i8* %9, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @myCompare(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
double factorial(int);
double combRep(int n, int k) {
  return (factorial(n + k - 1) / (factorial(k) * factorial(n - 1)));
}


x86 assembly (clang, -O0):
<combRep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
add    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <factorial@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <factorial@plt>
movsd  -0x18(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<combRep>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %esi,%ebx
lea    (%rdi,%rbx,1),%eax
add    $0xffffffff,%eax
mov    %edi,%ebp
add    $0xffffffff,%ebp
mov    %eax,%edi
call   1030 <factorial@plt>
movsd  %xmm0,0x10(%rsp)
mov    %ebx,%edi
call   1030 <factorial@plt>
movsd  %xmm0,0x8(%rsp)
mov    %ebp,%edi
call   1030 <factorial@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @combRep(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
%8 = sub nsw i32 %7, 1
%9 = call double @factorial(i32 %8)
%10 = load i32, i32* %4
%11 = call double @factorial(i32 %10)
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 1
%14 = call double @factorial(i32 %13)
%15 = fmul double %11, %14
%16 = fdiv double %9, %15
ret double %16
}

LLVM IR (-O2):
define double @combRep(i32 %0, i32 %1) {
%3 = add i32 %0, -1
%4 = add i32 %3, %1
%5 = tail call double @factorial(i32 %4)
%6 = tail call double @factorial(i32 %1)
%7 = tail call double @factorial(i32 %3)
%8 = fmul double %6, %7
%9 = fdiv double %5, %8
ret double %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void set_led(uint8_t led, uint32_t color) {}


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

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

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

LLVM IR (-O2):
define void @set_led(i32 %0, i32 %1) {
ret void
}
unsigned righttrot(unsigned x, int n) {
  return ((~0U & x) >> n) | ((~(~0 << n) & x) << (16 - n));
}


x86 assembly (clang, -O0):
<righttrot>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffffff,%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    -0x8(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
and    -0x4(%rbp),%edx
mov    $0x10,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<righttrot>:
mov    %esi,%ecx
mov    %edi,%edx
shr    %cl,%edx
mov    $0x10,%al
sub    %cl,%al
mov    %eax,%ecx
shl    %cl,%edi
movzwl %di,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @righttrot(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 = and i32 -1, %5
%7 = load i32, i32* %4
%8 = lshr i32 %6, %7
%9 = load i32, i32* %4
%10 = shl i32 -1, %9
%11 = xor i32 %10, -1
%12 = load i32, i32* %3
%13 = and i32 %11, %12
%14 = load i32, i32* %4
%15 = sub nsw i32 16, %14
%16 = shl i32 %13, %15
%17 = or i32 %8, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @righttrot(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = sub nsw i32 16, %1
%5 = shl i32 %0, %4
%6 = and i32 %5, 65535
%7 = or i32 %6, %3
ret i32 %7
}
int fun1281() { return 1281; }


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

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

LLVM IR (-O0):
define i32 @fun1281() {
ret i32 1281
}

LLVM IR (-O2):
define i32 @fun1281() {
ret i32 1281
}
/* Variables and functions */
int /*<<< orphan*/ msleep(unsigned int);
void ssleep(unsigned int seconds) { msleep(seconds * 1000); }


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

x86 assembly (clang, -O2):
<ssleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <msleep@plt>

LLVM IR (-O0):
define void @ssleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 1000
%5 = call i32 @msleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @ssleep(i32 %0) {
%2 = mul i32 %0, 1000
%3 = tail call i32 @msleep(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ oneDimAccess(int *, int *);
void f(int *oneDim) {
  int x;
  oneDimAccess(oneDim, &x);
}


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

x86 assembly (clang, -O2):
<f>:
push   %rax
lea    0x4(%rsp),%rsi
call   1030 <oneDimAccess@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @f(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @oneDimAccess(i32* %0, i32* %2)
ret void
}
int test_keyword_recog() {
  int result = 0;
  return result;
}


x86 assembly (clang, -O0):
<test_keyword_recog>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_keyword_recog() {
ret i32 0
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;
struct buffer {
  int dummy;
};

/* Variables and functions */
int get32le(struct buffer *);
uint64_t get64le(struct buffer *input) {
  uint64_t ret;
  uint32_t low;
  low = get32le(input);
  ret = get32le(input);
  ret <<= 32;
  ret |= low;
  return ret;
}


x86 assembly (clang, -O0):
<get64le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get32le@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get32le@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get64le>:
push   %rbx
mov    %rdi,%rbx
call   1030 <get32le@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <get32le@plt>

LLVM IR (-O0):
%struct.buffer = type { i32 }
define i32 @get64le(%struct.buffer* %0) {
%2 = alloca %struct.buffer*
%3 = alloca i32
%4 = alloca i32
store %struct.buffer* %0, %struct.buffer** %2
%5 = load %struct.buffer*, %struct.buffer** %2
%6 = call i32 @get32le(%struct.buffer* %5)
store i32 %6, i32* %4
%7 = load %struct.buffer*, %struct.buffer** %2
%8 = call i32 @get32le(%struct.buffer* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = shl i32 %9, 32
store i32 %10, i32* %3
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = or i32 %12, %11
store i32 %13, i32* %3
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define i32 @get64le(%struct.buffer* %0) {
%2 = tail call i32 @get32le(%struct.buffer* %0)
%3 = tail call i32 @get32le(%struct.buffer* %0)
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
void example_uninit(int i) {
  char *s = (char *)malloc(4);
  if (s[i] == 0)
    return;
  free(s);
}


x86 assembly (clang, -O0):
<example_uninit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1153 <example_uninit+0x33>
jmp    115c <example_uninit+0x3c>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<example_uninit>:
push   %rbx
mov    %edi,%ebx
mov    $0x4,%edi
call   1040 <malloc@plt>
movslq %ebx,%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     113f <example_uninit+0x1f>
mov    %rax,%rdi
pop    %rbx
jmp    1030 <free@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @example_uninit(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %1
br label %17
14: ; preds = %1
%15 = load i8*, i8** %3
%16 = call i32 @free(i8* %15)
br label %17
17: ; preds = %14, %13
ret void
}

LLVM IR (-O2):
define void @example_uninit(i32 %0) {
%2 = tail call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i8*
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds i8, i8* %3, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = tail call i32 @free(i8* %3)
br label %10
10: ; preds = %1, %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello, world!\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 = [15 x i8] c"hello, world!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"hello, world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void _set_hspare(unsigned char *u) { u[1] |= (1 << 5); }


x86 assembly (clang, -O0):
<_set_hspare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
or     $0x20,%ecx
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_set_hspare>:
orb    $0x20,0x1(%rdi)
ret

LLVM IR (-O0):
define void @_set_hspare(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = or i32 %6, 32
%8 = trunc i32 %7 to i8
store i8 %8, i8* %4
ret void
}

LLVM IR (-O2):
define void @_set_hspare(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = or i8 %3, 32
store i8 %4, i8* %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ atomic_postadd_int16_t(int /*<<< orphan*/ *, int);
int16_t atomic_postinc_int16_t(int16_t *var) {
  return atomic_postadd_int16_t(var, 1);
}


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

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

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

LLVM IR (-O2):
define i32 @atomic_postinc_int16_t(i32* %0) {
%2 = tail call i32 @atomic_postadd_int16_t(i32* %0, i32 1)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
size_t fwrite(char const *, size_t, int, int /*<<< orphan*/ *);
size_t strlen(char const *);
int fputs(const char *string, FILE *file) {
  size_t len = strlen(string);
  if (len == fwrite(string, len, 1, file)) {
    return 0;
  } else
    return EOF;
}


x86 assembly (clang, -O0):
<fputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    $0x1,%edx
call   1040 <fwrite@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
jne    1177 <fputs+0x57>
movl   $0x0,-0x4(%rbp)
jmp    1183 <fputs+0x63>
mov    0x2e6a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputs>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %rax,%rsi
mov    $0x1,%edx
mov    %r14,%rcx
call   1040 <fwrite@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%r15
je     1159 <fputs+0x39>
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @fputs(i8* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i64
store i8* %0, i8** %4
store i32* %1, i32** %5
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
store i64 %8, i64* %6
%9 = load i64, i64* %6
%10 = load i8*, i8** %4
%11 = load i64, i64* %6
%12 = load i32*, i32** %5
%13 = call i64 @fwrite(i8* %10, i64 %11, i32 1, i32* %12)
%14 = icmp eq i64 %9, %13
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 0, i32* %3
br label %18
16: ; preds = %2
%17 = load i32, i32* @EOF
store i32 %17, i32* %3
br label %18
18: ; preds = %16, %15
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @fputs(i8* nocapture %0, i32* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @fwrite(i8* %0, i64 %3, i32 1, i32* %1)
%5 = icmp eq i64 %3, %4
%6 = load i32, i32* @EOF
%7 = select i1 %5, i32 0, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Calculate(int, int, int *, int *);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int x = 5, y = 5, prod, quot;
  Calculate(x, y, &prod, &quot);
  x = prod;
  y = quot;
  printf("%d %d\n", prod, quot);
  printf("%d %d\n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
call   1040 <Calculate@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    $0x5,%edi
mov    $0x5,%esi
call   1040 <Calculate@plt>
mov    0xc(%rsp),%ebx
mov    0x8(%rsp),%ebp
lea    0xeb0(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @Calculate(i32 5, i32 5, i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xeb() {
  Assert_real((isgraph(235) == 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_isgraph.c",
              1180, ("isgraph should be 0 for 0xeb"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xeb>:
push   %rax
mov    $0xeb,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x49c,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xeb\00"
define void @t_isgraph_0xeb() {
%1 = call i64 @isgraph(i32 235)
%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 1180, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xeb\00"
define void @t_isgraph_0xeb() {
%1 = tail call i64 @isgraph(i32 235)
%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 1180, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_dynarray_append() {
  printf("NOT IMPLEMENTED:"
         "pa_dynarray_append"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"NOT IMPLEMENTED:pa_dynarray_append\0A\00"
define i32 @pa_dynarray_append() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [35 x i8] c"NOT IMPLEMENTED:pa_dynarray_append\00"
define i32 @pa_dynarray_append() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ USB_Interrupt_Proc();
void interrupt() { USB_Interrupt_Proc(); }


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

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

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

LLVM IR (-O2):
define void @interrupt() {
%1 = tail call i32 (...) @USB_Interrupt_Proc()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int strcat(char *dest, char *src) { strcpy(dest + strlen(dest), src); }


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
cltq
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
movslq %eax,%rdi
add    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i32 @strcat(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
%11 = load i8*, i8** %5
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @strcat(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i32 @strcpy(i8* %5, i8* %1)
ret i32 undef
}
/* Variables and functions */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ memcpy(float *, float *, int);
float *copy_float_array(float *array, int length) {
  float *new_array = (float *)calloc(length, sizeof(float));
  memcpy(new_array, array, length * sizeof(float));
  return new_array;
}


x86 assembly (clang, -O0):
<copy_float_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_float_array>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,%r15
shl    $0x2,%ebx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1040 <memcpy@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define float* @copy_float_array(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
%5 = alloca float*
store float* %0, float** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = call i64 @calloc(i32 %6, i32 4)
%8 = inttoptr i64 %7 to float*
store float* %8, float** %5
%9 = load float*, float** %5
%10 = load float*, float** %3
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = mul i64 %12, 4
%14 = trunc i64 %13 to i32
%15 = call i32 @memcpy(float* %9, float* %10, i32 %14)
%16 = load float*, float** %5
ret float* %16
}

LLVM IR (-O2):
define float* @copy_float_array(float* %0, i32 %1) {
%3 = tail call i64 @calloc(i32 %1, i32 4)
%4 = inttoptr i64 %3 to float*
%5 = shl i32 %1, 2
%6 = tail call i32 @memcpy(float* %4, float* %0, i32 %5)
ret float* %4
}
int foo(int i) { return -i - 5; }


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

x86 assembly (clang, -O2):
<foo>:
mov    $0xfffffffb,%eax
sub    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = sub i32 -5, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x1a() {
  Assert_real((islower(26) == 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_islower.c",
              135, ("islower should be 0 for 0x1a"));
}


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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x1a\00"
define void @t_islower_0x1a() {
%1 = tail call i64 @islower(i32 26)
%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 135, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main(void) {
  float a = 1.5;
  float b = 2.5;
  __VERIFIER_assert(a > b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xedd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 1.500000e+00, float* %2
store float 2.500000e+00, float* %3
%4 = load float, float* %2
%5 = load float, float* %3
%6 = fcmp ogt float %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @__VERIFIER_assert(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}
signed long int signedlongint_ignoring_unsignedlongint(signed long int x,
                                                       unsigned long int y) {
  return x;
}


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

x86 assembly (clang, -O2):
<signedlongint_ignoring_unsignedlongint>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @signedlongint_ignoring_unsignedlongint(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
ret i64 %5
}

LLVM IR (-O2):
define i64 @signedlongint_ignoring_unsignedlongint(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Variables and functions */
char *asepc(char **, char);
char *getkwargs(char **s, char **key, char **val) {
  char *v = asepc(s, ',');
  char *k = asepc(&v, '=');
  if (key)
    *key = k;
  if (val)
    *val = v;
  return k;
}


x86 assembly (clang, -O0):
<getkwargs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2c,%esi
call   1030 <asepc@plt>
mov    %rax,-0x20(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x3d,%esi
call   1030 <asepc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115e <getkwargs+0x4e>
mov    -0x28(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1174 <getkwargs+0x64>
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getkwargs>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    $0x2c,%esi
call   1030 <asepc@plt>
mov    %rax,(%rsp)
mov    %rsp,%rdi
mov    $0x3d,%esi
call   1030 <asepc@plt>
test   %rbx,%rbx
je     113d <getkwargs+0x2d>
mov    %rax,(%rbx)
test   %r14,%r14
je     1149 <getkwargs+0x39>
mov    (%rsp),%rcx
mov    %rcx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @getkwargs(i8** %0, i8** %1, i8** %2) {
%4 = alloca i8**
%5 = alloca i8**
%6 = alloca i8**
%7 = alloca i8*
%8 = alloca i8*
store i8** %0, i8*** %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%9 = load i8**, i8*** %4
%10 = call i8* @asepc(i8** %9, i8 signext 44)
store i8* %10, i8** %7
%11 = call i8* @asepc(i8** %7, i8 signext 61)
store i8* %11, i8** %8
%12 = load i8**, i8*** %5
%13 = icmp ne i8** %12, null
br i1 %13, label %14, label %17
14: ; preds = %3
%15 = load i8*, i8** %8
%16 = load i8**, i8*** %5
store i8* %15, i8** %16
br label %17
17: ; preds = %14, %3
%18 = load i8**, i8*** %6
%19 = icmp ne i8** %18, null
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = load i8*, i8** %7
%22 = load i8**, i8*** %6
store i8* %21, i8** %22
br label %23
23: ; preds = %20, %17
%24 = load i8*, i8** %8
ret i8* %24
}

LLVM IR (-O2):
define i8* @getkwargs(i8** %0, i8** writeonly %1, i8** writeonly %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
%6 = tail call i8* @asepc(i8** %0, i8 signext 44)
store i8* %6, i8** %4
%7 = call i8* @asepc(i8** %4, i8 signext 61)
%8 = icmp eq i8** %1, null
br i1 %8, label %10, label %9
9: ; preds = %3
store i8* %7, i8** %1
br label %10
10: ; preds = %9, %3
%11 = icmp eq i8** %2, null
br i1 %11, label %14, label %12
12: ; preds = %10
%13 = load i8*, i8** %4
store i8* %13, i8** %2
br label %14
14: ; preds = %12, %10
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
void signHandler(int isigNum) {
  printf("SIGQUIT is %d\n", isigNum);
  exit(1);
}


x86 assembly (clang, -O0):
<signHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<signHandler>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"SIGQUIT is %d\0A\00"
define void @signHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [15 x i8] c"SIGQUIT is %d\0A\00"
define void @signHandler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
void TimerOC4PreloadConfigure(unsigned long ulBase, unsigned long ulOCPreload) {
  unsigned long ulTempccmr2 = 0;

  ;

  ;
  ulTempccmr2 = (*((volatile unsigned long *)(ulBase + 0x0000001C)));
  ulTempccmr2 &= ~0x00000800;
  ulTempccmr2 |= (ulOCPreload << 8);
  (*((volatile unsigned long *)(ulBase + 0x0000001C))) = ulTempccmr2;
}


x86 assembly (clang, -O0):
<TimerOC4PreloadConfigure>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
and    $0xfffffffffffff7ff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x1c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerOC4PreloadConfigure>:
mov    $0xfffffffffffff7ff,%rax
and    0x1c(%rdi),%rax
shl    $0x8,%rsi
or     %rax,%rsi
mov    %rsi,0x1c(%rdi)
ret

LLVM IR (-O0):
define void @TimerOC4PreloadConfigure(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
store i64 0, i64* %5
%6 = load i64, i64* %3
%7 = add i64 %6, 28
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = and i64 %10, -2049
store i64 %11, i64* %5
%12 = load i64, i64* %4
%13 = shl i64 %12, 8
%14 = load i64, i64* %5
%15 = or i64 %14, %13
store i64 %15, i64* %5
%16 = load i64, i64* %5
%17 = load i64, i64* %3
%18 = add i64 %17, 28
%19 = inttoptr i64 %18 to i64*
store volatile i64 %16, i64* %19
ret void
}

LLVM IR (-O2):
define void @TimerOC4PreloadConfigure(i64 %0, i64 %1) {
%3 = add i64 %0, 28
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %5, -2049
%7 = shl i64 %1, 8
%8 = or i64 %6, %7
store volatile i64 %8, i64* %4
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int copy_multprec_start_solutions_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(287, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<copy_multprec_start_solutions_to_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x11f,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_multprec_start_solutions_to_container>:
mov    $0x11f,%edi
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @copy_multprec_start_solutions_to_container() {
%1 = tail call i32 @_ada_use_c2phc(i32 287, i32* undef, i32* undef, double* undef)
ret i32 %1
}
struct change *find_reverse_change(start)
struct change *start;
{
  return start;
}


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

x86 assembly (clang, -O2):
<find_reverse_change>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.change = type opaque
define %struct.change* @find_reverse_change(%struct.change* %0) {
%2 = alloca %struct.change*
store %struct.change* %0, %struct.change** %2
%3 = load %struct.change*, %struct.change** %2
ret %struct.change* %3
}

LLVM IR (-O2):
%struct.change = type opaque
define %struct.change* @find_reverse_change(%struct.change* readnone returned %0) {
ret %struct.change* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main(int argc, char **argv) {
  double U1[1000000];
#pragma omp parallel default(none) private(U1)
  {
    U1[0] = 1.0;
    printf("Hello World: %f\n", U1[0]);
  }
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Hello World: %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1000000 x double]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [1000000 x double], [1000000 x double]* %6, i64 0, i64 0
store double 1.000000e+00, double* %7
%8 = getelementptr inbounds [1000000 x double], [1000000 x double]* %6, i64 0, i64 0
%9 = load double, double* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Hello World: %f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double 1.000000e+00)
ret i32 0
}