xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isdigit(int);
char tolower(int);
int hex_char_to_dec(int c) {
  if (isdigit(c)) {
    return c;
  } else {
    return 10 + (tolower(c) - 'a');
  }
}


x86 assembly (clang, -O0):
<hex_char_to_dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1148 <hex_char_to_dec+0x28>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115c <hex_char_to_dec+0x3c>
mov    -0x8(%rbp),%edi
call   1040 <tolower@plt>
movsbl %al,%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_char_to_dec>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
jne    113a <hex_char_to_dec+0x1a>
mov    %ebx,%edi
call   1040 <tolower@plt>
movsbl %al,%ebx
add    $0xffffffa9,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @hex_char_to_dec(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @isdigit(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32, i32* %3
store i32 %8, i32* %2
br label %15
9: ; preds = %1
%10 = load i32, i32* %3
%11 = call signext i8 @tolower(i32 %10)
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 97
%14 = add nsw i32 10, %13
store i32 %14, i32* %2
br label %15
15: ; preds = %9, %7
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @hex_char_to_dec(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call signext i8 @tolower(i32 %0)
%6 = sext i8 %5 to i32
%7 = add nsw i32 %6, -87
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ %0, %1 ]
ret i32 %9
}
int stepSizetoSec(int stepSize) { return 1000 / stepSize; }


x86 assembly (clang, -O0):
<stepSizetoSec>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x3e8,%eax
cltd
idivl  -0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<stepSizetoSec>:
mov    $0x3e8,%eax
xor    %edx,%edx
idiv   %edi
ret

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

LLVM IR (-O2):
define i32 @stepSizetoSec(i32 %0) {
%2 = sdiv i32 1000, %0
ret i32 %2
}
float *vec2_tangent(float *result, float *a) {
  result[0] = a[1];
  result[1] = -a[0];
  return result;
}


x86 assembly (clang, -O0):
<vec2_tangent>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec2_tangent>:
mov    %rdi,%rax
movss  0x4(%rsi),%xmm0
movss  %xmm0,(%rdi)
movss  (%rsi),%xmm0
xorps  0xee9(%rip),%xmm0
movss  %xmm0,0x4(%rdi)
ret

LLVM IR (-O0):
define float* @vec2_tangent(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = getelementptr inbounds float, float* %5, i64 1
%7 = load float, float* %6
%8 = load float*, float** %3
%9 = getelementptr inbounds float, float* %8, i64 0
store float %7, float* %9
%10 = load float*, float** %4
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = fneg float %12
%14 = load float*, float** %3
%15 = getelementptr inbounds float, float* %14, i64 1
store float %13, float* %15
%16 = load float*, float** %3
ret float* %16
}

LLVM IR (-O2):
define float* @vec2_tangent(float* returned writeonly %0, float* nocapture %1) {
%3 = getelementptr inbounds float, float* %1, i64 1
%4 = load float, float* %3
store float %4, float* %0
%5 = load float, float* %1
%6 = fneg float %5
%7 = getelementptr inbounds float, float* %0, i64 1
store float %6, float* %7
ret float* %0
}
/* Variables and functions */
double exp(double);
double t1_f_repulsive(double rij) { return 3264.7 * exp(-3.2394 * rij); }


x86 assembly (clang, -O0):
<t1_f_repulsive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xee3(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xec6(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1_f_repulsive>:
push   %rax
mulsd  0xee7(%rip),%xmm0
call   1030 <exp@plt>
mulsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @t1_f_repulsive(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double -3.239400e+00, %3
%5 = call double @exp(double %4)
%6 = fmul double 3.264700e+03, %5
ret double %6
}

LLVM IR (-O2):
define double @t1_f_repulsive(double %0) {
%2 = fmul double %0, -3.239400e+00
%3 = tail call double @exp(double %2)
%4 = fmul double %3, 3.264700e+03
ret double %4
}
int ft_countchr(const char *s, char c) {
  int count;
  count = 0;
  while (*s) {
    if (*s == c)
      count++;
    s++;
  }
  return (count);
}


x86 assembly (clang, -O0):
<ft_countchr>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114f <ft_countchr+0x4f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    113e <ft_countchr+0x3e>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1115 <ft_countchr+0x15>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_countchr>:
mov    (%rdi),%cl
test   %cl,%cl
je     1126 <ft_countchr+0x26>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
xor    %edx,%edx
cmp    %sil,%cl
sete   %dl
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <ft_countchr+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ft_countchr(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i32
store i8* %0, i8** %3
store i8 %1, i8* %4
store i32 0, i32* %5
br label %6
6: ; preds = %20, %2
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %23
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = load i8, i8* %4
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %13, %15
br i1 %16, label %17, label %20
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %20
20: ; preds = %17, %10
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
br label %6
23: ; preds = %6
%24 = load i32, i32* %5
ret i32 %24
}

LLVM IR (-O2):
define i32 @ft_countchr(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i32 [ %11, %5 ], [ 0, %2 ]
%8 = phi i8* [ %12, %5 ], [ %0, %2 ]
%9 = icmp eq i8 %6, %1
%10 = zext i1 %9 to i32
%11 = add nuw nsw i32 %7, %10
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ 0, %2 ], [ %11, %5 ]
ret i32 %16
}
/* Variables and functions */
int od_ilog(int);
int od_pvq_size_ctx(int n) {
  int logn;
  int odd;
  logn = (od_ilog(n - 1));
  odd = n & 1;
  return 2 * logn - 1 - odd - 7 * (n == 14);
}


x86 assembly (clang, -O0):
<od_pvq_size_ctx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <od_ilog@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
sub    -0xc(%rbp),%eax
cmpl   $0xe,-0x4(%rbp)
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
imul   $0x7,%ecx,%ecx
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<od_pvq_size_ctx>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
mov    %edi,%ebx
not    %ebx
lea    -0x1(%r14),%edi
call   1030 <od_ilog@plt>
or     $0xfffffffe,%ebx
lea    -0x7(%rbx),%ecx
cmp    $0xe,%r14d
cmovne %ebx,%ecx
lea    (%rcx,%rax,2),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @od_pvq_size_ctx(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = sub nsw i32 %5, 1
%7 = call i32 @od_ilog(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = and i32 %8, 1
store i32 %9, i32* %4
%10 = load i32, i32* %3
%11 = mul nsw i32 2, %10
%12 = sub nsw i32 %11, 1
%13 = load i32, i32* %4
%14 = sub nsw i32 %12, %13
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 14
%17 = zext i1 %16 to i32
%18 = mul nsw i32 7, %17
%19 = sub nsw i32 %14, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @od_pvq_size_ctx(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = tail call i32 @od_ilog(i32 %2)
%4 = and i32 %0, 1
%5 = shl nsw i32 %3, 1
%6 = xor i32 %4, -1
%7 = icmp eq i32 %0, 14
%8 = select i1 %7, i32 -7, i32 0
%9 = add nsw i32 %8, %6
%10 = add i32 %9, %5
ret i32 %10
}
/* Variables and functions */
size_t lookup_auto_shrink_capacity(void *context, size_t capacity) {
  return ((3 * (((((capacity) >> 4))) >> 1)));
}


x86 assembly (clang, -O0):
<lookup_auto_shrink_capacity>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x4,%rax
shr    $0x1,%rax
imul   $0x3,%rax,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lookup_auto_shrink_capacity>:
shr    $0x5,%rsi
lea    (%rsi,%rsi,2),%rax
ret

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

LLVM IR (-O2):
define i64 @lookup_auto_shrink_capacity(i8* nocapture readnone %0, i64 %1) {
%3 = lshr i64 %1, 5
%4 = mul nuw nsw i64 %3, 3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ defineVariable();
int main() {
  defineVariable();
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @defineVariable()
ret i32 1
}
void atualiza_mundo_do_jogo() {}


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

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

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

LLVM IR (-O2):
define void @atualiza_mundo_do_jogo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ move(int, int);
void gotoxy(int x, int y) { move(y, x); }


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

x86 assembly (clang, -O2):
<gotoxy>:
mov    %edi,%eax
mov    %esi,%edi
mov    %eax,%esi
jmp    1030 <move@plt>

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

LLVM IR (-O2):
define void @gotoxy(i32 %0, i32 %1) {
%3 = tail call i32 @move(i32 %1, i32 %0)
ret void
}
/* Type definitions */
struct can_frame {
  int can_id;
  int can_dlc;
  int *data;
};

/* Variables and functions */
void init_set_cmd(struct can_frame *frame) {
  frame->can_id = 0x7E7;
  frame->can_dlc = 7;
  frame->data[0] = 0x7F;
  frame->data[1] = 0xFF;
  frame->data[7] = 0x00;
}


x86 assembly (clang, -O0):
<init_set_cmd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x7e7,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x7,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movl   $0x7f,(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movl   $0xff,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movl   $0x0,0x1c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_set_cmd>:
movabs $0x7000007e7,%rax
mov    %rax,(%rdi)
mov    0x8(%rdi),%rax
movabs $0xff0000007f,%rcx
mov    %rcx,(%rax)
movl   $0x0,0x1c(%rax)
ret

LLVM IR (-O0):
%struct.can_frame = type { i32, i32, i32* }
define void @init_set_cmd(%struct.can_frame* %0) {
%2 = alloca %struct.can_frame*
store %struct.can_frame* %0, %struct.can_frame** %2
%3 = load %struct.can_frame*, %struct.can_frame** %2
%4 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %3, i32 0, i32 0
store i32 2023, i32* %4
%5 = load %struct.can_frame*, %struct.can_frame** %2
%6 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %5, i32 0, i32 1
store i32 7, i32* %6
%7 = load %struct.can_frame*, %struct.can_frame** %2
%8 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %7, i32 0, i32 2
%9 = load i32*, i32** %8
%10 = getelementptr inbounds i32, i32* %9, i64 0
store i32 127, i32* %10
%11 = load %struct.can_frame*, %struct.can_frame** %2
%12 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %11, i32 0, i32 2
%13 = load i32*, i32** %12
%14 = getelementptr inbounds i32, i32* %13, i64 1
store i32 255, i32* %14
%15 = load %struct.can_frame*, %struct.can_frame** %2
%16 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %15, i32 0, i32 2
%17 = load i32*, i32** %16
%18 = getelementptr inbounds i32, i32* %17, i64 7
store i32 0, i32* %18
ret void
}

LLVM IR (-O2):
%struct.can_frame = type { i32, i32, i32* }
define void @init_set_cmd(%struct.can_frame* nocapture %0) {
%2 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %0, i64 0, i32 0
store i32 2023, i32* %2
%3 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %0, i64 0, i32 1
store i32 7, i32* %3
%4 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %0, i64 0, i32 2
%5 = load i32*, i32** %4
store i32 127, i32* %5
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 255, i32* %6
%7 = getelementptr inbounds i32, i32* %5, i64 7
store i32 0, i32* %7
ret void
}
test3() {
  int a;
  int b;
}


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

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

LLVM IR (-O0):
define i32 @test3() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @test3() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ _psTrace(char *);
void _psError(char *msg) {
  _psTrace(msg);
  _psTrace("\n");
}


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

x86 assembly (clang, -O2):
<_psError>:
push   %rax
call   1030 <_psTrace@plt>
lea    0xee3(%rip),%rdi
pop    %rax
jmp    1030 <_psTrace@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @_psError(i8* %0) {
%2 = tail call i32 @_psTrace(i8* %0)
%3 = tail call i32 @_psTrace(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setloc(int);
void pbss(void) { setloc(3); }


x86 assembly (clang, -O0):
<pbss>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <setloc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pbss>:
mov    $0x3,%edi
jmp    1030 <setloc@plt>

LLVM IR (-O0):
define void @pbss() {
%1 = call i32 @setloc(i32 3)
ret void
}

LLVM IR (-O2):
define void @pbss() {
%1 = tail call i32 @setloc(i32 3)
ret void
}
/* Variables and functions */
char *strcpy(char *, char const *);
char *strcpy_P(char *dst, const char *src) { return strcpy(dst, src); }


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

x86 assembly (clang, -O2):
<strcpy_P>:
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @strcpy_P(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 i8* @strcpy(i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @strcpy_P(i8* returned %0, i8* nocapture %1) {
%3 = tail call i8* @strcpy(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i8* %0
}
char *langDbgDevTrPause() { return "TR Pause"; }


x86 assembly (clang, -O0):
<langDbgDevTrPause>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<langDbgDevTrPause>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"TR Pause\00"
define i8* @langDbgDevTrPause() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [9 x i8] c"TR Pause\00"
define i8* @langDbgDevTrPause() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ Pie176(long, long, long, long, double, double);
void pie(long x, long y, long rx, long ry, double sa, double ea) {
  Pie176(x, y, rx, ry, sa, ea);
}


x86 assembly (clang, -O0):
<pie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
call   1030 <Pie176@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pie>:
jmp    1030 <Pie176@plt>

LLVM IR (-O0):
define void @pie(i64 %0, i64 %1, i64 %2, i64 %3, double %4, double %5) {
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca double
%12 = alloca double
store i64 %0, i64* %7
store i64 %1, i64* %8
store i64 %2, i64* %9
store i64 %3, i64* %10
store double %4, double* %11
store double %5, double* %12
%13 = load i64, i64* %7
%14 = load i64, i64* %8
%15 = load i64, i64* %9
%16 = load i64, i64* %10
%17 = load double, double* %11
%18 = load double, double* %12
%19 = call i32 @Pie176(i64 %13, i64 %14, i64 %15, i64 %16, double %17, double %18)
ret void
}

LLVM IR (-O2):
define void @pie(i64 %0, i64 %1, i64 %2, i64 %3, double %4, double %5) {
%7 = tail call i32 @Pie176(i64 %0, i64 %1, i64 %2, i64 %3, double %4, double %5)
ret void
}
int test_imm_B4int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xB4 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_B4int64_highword_mem>:
testb  $0xb4,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_B4int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 773094113280
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, char, size_t);
void bzero(void *s, size_t count) { memset(s, '\0', count); }


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

x86 assembly (clang, -O2):
<bzero>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @bzero(i8* %0, i64 %1) {
%3 = tail call i32 @memset(i8* %0, i8 signext 0, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x20() {
  Assert_real((isodigit(32) == 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_isodigit.c",
              165, ("isodigit should be 0 for  "));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x20>:
push   %rax
mov    $0x20,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xa5,%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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for \00"
define void @t_isodigit_0x20() {
%1 = call i64 @isodigit(i32 32)
%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 165, i8* getelementptr inbounds ([27 x i8], [27 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for \00"
define void @t_isodigit_0x20() {
%1 = tail call i64 @isodigit(i32 32)
%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 165, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int is_pow2(int x) { return (x & (x - 1)) > 0; }


x86 assembly (clang, -O0):
<is_pow2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_pow2>:
lea    -0x1(%rdi),%ecx
xor    %eax,%eax
test   %edi,%ecx
setg   %al
ret

LLVM IR (-O0):
define i32 @is_pow2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 %4, 1
%6 = and i32 %3, %5
%7 = icmp sgt i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_pow2(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = and i32 %2, %0
%4 = icmp sgt i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void garciah16() { printf("garciah16 likes Nature Valley bars. \n"); }


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"garciah16 likes Nature Valley bars. \0A\00"
define void @garciah16() {
%1 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [37 x i8] c"garciah16 likes Nature Valley bars. \00"
define void @garciah16() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret void
}
double identity(double *v) { return v[0]; }


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

x86 assembly (clang, -O2):
<identity>:
movsd  (%rdi),%xmm0
ret

LLVM IR (-O0):
define double @identity(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
ret double %5
}

LLVM IR (-O2):
define double @identity(double* nocapture %0) {
%2 = load double, double* %0
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void menu(void) {
  printf("*************************************************************\n");
  printf("Enter the letter corresponding to the desired type or action:\n");
  printf("a) Artichoke\t\tb) Beet\n");
  printf("c) Carrot\t\tq) quit\n");
  printf("*************************************************************\n");
}


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

x86 assembly (clang, -O2):
<menu>:
push   %rbx
lea    0xf4f(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf15(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [63 x i8] c"*************************************************************\0A\00"
@.str.1 = [63 x i8] c"Enter the letter corresponding to the desired type or action:\0A\00"
@.str.2 = [23 x i8] c"a) Artichoke\09\09b) Beet\0A\00"
@.str.3 = [20 x i8] c"c) Carrot\09\09q) quit\0A\00"
define void @menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str.4 = [62 x i8] c"Enter the letter corresponding to the desired type or action:\00"
@str.5 = [22 x i8] c"a) Artichoke\09\09b) Beet\00"
@str.6 = [19 x i8] c"c) Carrot\09\09q) quit\00"
@str.7 = [62 x i8] c"*************************************************************\00"
define void @menu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.7, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.6, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.7, i64 0, i64 0))
ret void
}
/* Type definitions */
struct XCSF {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ loss_mse(struct XCSF const *, double const *,
                            double const *);
double sqrt(int /*<<< orphan*/);
double loss_rmse(const struct XCSF *xcsf, const double *pred, const double *y) {
  return sqrt(loss_mse(xcsf, pred, y));
}


x86 assembly (clang, -O0):
<loss_rmse>:
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    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <loss_mse@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.XCSF = type { i32 }
define double @loss_rmse(%struct.XCSF* %0, double* %1, double* %2) {
%4 = alloca %struct.XCSF*
%5 = alloca double*
%6 = alloca double*
store %struct.XCSF* %0, %struct.XCSF** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load %struct.XCSF*, %struct.XCSF** %4
%8 = load double*, double** %5
%9 = load double*, double** %6
%10 = call i32 @loss_mse(%struct.XCSF* %7, double* %8, double* %9)
%11 = call double @sqrt(i32 %10)
ret double %11
}

LLVM IR (-O2):
%struct.XCSF = type { i32 }
define double @loss_rmse(%struct.XCSF* %0, double* %1, double* %2) {
%4 = tail call i32 @loss_mse(%struct.XCSF* %0, double* %1, double* %2)
%5 = tail call double @sqrt(i32 %4)
ret double %5
}
/* Type definitions */
struct comedi_device {
  int dummy;
};

/* Variables and functions */
int i_APCI16XX_Reset(struct comedi_device *dev) { return 0; }


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

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

LLVM IR (-O0):
%struct.comedi_device = type { i32 }
define i32 @i_APCI16XX_Reset(%struct.comedi_device* %0) {
%2 = alloca %struct.comedi_device*
store %struct.comedi_device* %0, %struct.comedi_device** %2
ret i32 0
}

LLVM IR (-O2):
%struct.comedi_device = type { i32 }
define i32 @i_APCI16XX_Reset(%struct.comedi_device* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int Pop();
int /*<<< orphan*/ Push(int);
int CmdGT(void) {
  int operand2;
  operand2 = Pop();
  Push(Pop() > operand2);
  return 0;
}


x86 assembly (clang, -O0):
<CmdGT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <Pop@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <Pop@plt>
cmp    -0x4(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <Push@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdGT>:
push   %rbx
xor    %eax,%eax
call   1030 <Pop@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <Pop@plt>
xor    %edi,%edi
cmp    %ebx,%eax
setg   %dil
call   1040 <Push@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @CmdGT() {
%1 = alloca i32
%2 = call i32 (...) @Pop()
store i32 %2, i32* %1
%3 = call i32 (...) @Pop()
%4 = load i32, i32* %1
%5 = icmp sgt i32 %3, %4
%6 = zext i1 %5 to i32
%7 = call i32 @Push(i32 %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @CmdGT() {
%1 = tail call i32 (...) @Pop()
%2 = tail call i32 (...) @Pop()
%3 = icmp sgt i32 %2, %1
%4 = zext i1 %3 to i32
%5 = tail call i32 @Push(i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ minHeapFixdown(int *, int, int);
void makeMinHeap(int heaps[], int n) {
  for (int i = (n - 2) / 2; i >= 0; i--) {
    minHeapFixdown(heaps, i, n);
  }
}


x86 assembly (clang, -O0):
<makeMinHeap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1157 <makeMinHeap+0x47>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <minHeapFixdown@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1130 <makeMinHeap+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeMinHeap>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    1141 <makeMinHeap+0x31>
mov    %esi,%ebx
mov    %rdi,%r14
lea    -0x2(%rbx),%eax
shr    $0x1f,%eax
lea    (%rbx,%rax,1),%ebp
add    $0xfffffffe,%ebp
sar    %ebp
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <minHeapFixdown@plt>
add    $0xffffffff,%ebp
jb     1130 <makeMinHeap+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @makeMinHeap(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = add nsw i32 %1, -2
%6 = sdiv i32 %5, 2
br label %8
7: ; preds = %8, %2
ret void
8: ; preds = %4, %8
%9 = phi i32 [ %11, %8 ], [ %6, %4 ]
%10 = tail call i32 @minHeapFixdown(i32* %0, i32 %9, i32 %1)
%11 = add nsw i32 %9, -1
%12 = icmp eq i32 %9, 0
br i1 %12, label %7, label %8
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, unsigned int);
void *realloc(void *, unsigned int);
void *xrealloc(void *ptr, unsigned int howmuch) {
  void *p = realloc(ptr, howmuch);
  if (!p)
    die("Unable to allocate %d bytes of memory", howmuch);
  return p;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1159 <xrealloc+0x39>
mov    -0xc(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1040 <die@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1140 <xrealloc+0x20>
lea    0xec7(%rip),%rdi
mov    %ebp,%esi
call   1040 <die@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Unable to allocate %d bytes of memory\00"
define i8* @xrealloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i8* @realloc(i8* %6, i32 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = load i32, i32* %4
%13 = call i32 @die(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %11, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [38 x i8] c"Unable to allocate %d bytes of memory\00"
define i8* @xrealloc(i8* %0, i32 %1) {
%3 = tail call i8* @realloc(i8* %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @die(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int xserial_port_close(int serline) { close(serline); }


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

x86 assembly (clang, -O2):
<xserial_port_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @xserial_port_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 undef
}
/* Variables and functions */
char *_strupr(char *);
char *strupr(char *str) { return _strupr(str); }


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

x86 assembly (clang, -O2):
<strupr>:
jmp    1030 <_strupr@plt>

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

LLVM IR (-O2):
define i8* @strupr(i8* %0) {
%2 = tail call i8* @_strupr(i8* %0)
ret i8* %2
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int Bits_log2x64(uint64_t number) {
  int out = 0;
  while (number >>= 1) {
    out++;
  }
  return out;
}


x86 assembly (clang, -O0):
<Bits_log2x64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     112e <Bits_log2x64+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <Bits_log2x64+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bits_log2x64>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111c <Bits_log2x64+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
sar    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <Bits_log2x64+0x10>
ret

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

LLVM IR (-O2):
define i32 @Bits_log2x64(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 4
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
int qualityPoints(int n) {
  if (n >= 90)
    return 4;
  else if (n >= 80)
    return 3;
  else if (n >= 70)
    return 2;
  else if (n >= 60)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<qualityPoints>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x5a,-0x8(%rbp)
jl     111d <qualityPoints+0x1d>
movl   $0x4,-0x4(%rbp)
jmp    1166 <qualityPoints+0x66>
cmpl   $0x50,-0x8(%rbp)
jl     1133 <qualityPoints+0x33>
movl   $0x3,-0x4(%rbp)
jmp    1166 <qualityPoints+0x66>
cmpl   $0x46,-0x8(%rbp)
jl     1149 <qualityPoints+0x49>
movl   $0x2,-0x4(%rbp)
jmp    1166 <qualityPoints+0x66>
cmpl   $0x3c,-0x8(%rbp)
jl     115f <qualityPoints+0x5f>
movl   $0x1,-0x4(%rbp)
jmp    1166 <qualityPoints+0x66>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qualityPoints>:
mov    $0x4,%eax
cmp    $0x59,%edi
jg     1126 <qualityPoints+0x26>
mov    $0x3,%eax
cmp    $0x4f,%edi
jg     1126 <qualityPoints+0x26>
mov    $0x2,%eax
cmp    $0x45,%edi
jg     1126 <qualityPoints+0x26>
xor    %eax,%eax
cmp    $0x3c,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @qualityPoints(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 90
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 4, i32* %2
br label %20
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sge i32 %8, 80
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 3, i32* %2
br label %20
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp sge i32 %12, 70
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 2, i32* %2
br label %20
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp sge i32 %16, 60
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 1, i32* %2
br label %20
19: ; preds = %15
store i32 0, i32* %2
br label %20
20: ; preds = %19, %18, %14, %10, %6
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @qualityPoints(i32 %0) {
%2 = icmp sgt i32 %0, 89
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = icmp sgt i32 %0, 79
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = icmp sgt i32 %0, 69
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = icmp sgt i32 %0, 59
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %7, %5, %3, %1
%11 = phi i32 [ 4, %1 ], [ 3, %3 ], [ 2, %5 ], [ %9, %7 ]
ret i32 %11
}
void lh_acquire(int **volatile l, int **volatile i, volatile int **volatile p) {
  assert(**i == 0);
  assert(*i == *p);
}


x86 assembly (clang, -O0):
<lh_acquire>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmpl   $0x0,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lh_acquire>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
mov    %rsi,(%rsp)
mov    %rdx,0x8(%rsp)
mov    (%rsp),%rax
mov    (%rax),%rax
xor    %edi,%edi
cmpl   $0x0,(%rax)
sete   %dil
xor    %eax,%eax
call   1030 <assert@plt>
mov    (%rsp),%rax
mov    (%rax),%rax
mov    0x8(%rsp),%rcx
xor    %edi,%edi
cmp    (%rcx),%rax
sete   %dil
xor    %eax,%eax
add    $0x18,%rsp
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @lh_acquire(i32** %0, i32** %1, i32** %2) {
%4 = alloca i32**
%5 = alloca i32**
%6 = alloca i32**
store volatile i32** %0, i32*** %4
store volatile i32** %1, i32*** %5
store volatile i32** %2, i32*** %6
%7 = load volatile i32**, i32*** %5
%8 = load i32*, i32** %7
%9 = load i32, i32* %8
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %11)
%13 = load volatile i32**, i32*** %5
%14 = load i32*, i32** %13
%15 = load volatile i32**, i32*** %6
%16 = load i32*, i32** %15
%17 = icmp eq i32* %14, %16
%18 = zext i1 %17 to i32
%19 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %18)
ret void
}

LLVM IR (-O2):
define void @lh_acquire(i32** %0, i32** %1, i32** %2) {
%4 = alloca i32**
%5 = alloca i32**
%6 = alloca i32**
store volatile i32** %0, i32*** %4
store volatile i32** %1, i32*** %5
store volatile i32** %2, i32*** %6
%7 = load volatile i32**, i32*** %5
%8 = load i32*, i32** %7
%9 = load i32, i32* %8
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
%12 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %11)
%13 = load volatile i32**, i32*** %5
%14 = load i32*, i32** %13
%15 = load volatile i32**, i32*** %6
%16 = load i32*, i32** %15
%17 = icmp eq i32* %14, %16
%18 = zext i1 %17 to i32
%19 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %18)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int string_equal(const void *v1, const void *v2) {
  return strcmp((const char *)v1, (const char *)v2) == 0;
}


x86 assembly (clang, -O0):
<string_equal>:
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>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_equal>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @string_equal(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 i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @string_equal(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solve_by_quaddobl_homotopy_continuation(int number_of_tasks) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(246, &number_of_tasks, b, c);
  return fail;
}


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

x86 assembly (clang, -O2):
<solve_by_quaddobl_homotopy_continuation>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0xf6,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @solve_by_quaddobl_homotopy_continuation(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 246, i32* %2, i32* undef, double* undef)
ret i32 %3
}
int lg(int n) {
  int retval = -1;
  while (n != 0) {
    n >> 1;
    retval += 1;
  }
  return retval;
}


x86 assembly (clang, -O0):
<lg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1126 <lg+0x26>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <lg+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @lg(i32 %0) {
ret i32 -1
}