xunge/DecIR huggingface dataset:
/* Variables and functions */
int BIT(int);
int wpa_key_mgmt_wpa_ieee8021x(int akm) {
  return !!(akm & (BIT(0) | BIT(5) | BIT(14) | BIT(7)));
}


x86 assembly (clang, -O0):
<wpa_key_mgmt_wpa_ieee8021x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
call   1030 <BIT@plt>
mov    %eax,-0x14(%rbp)
mov    $0x5,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    $0xe,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    $0x7,%edi
call   1030 <BIT@plt>
mov    -0xc(%rbp),%ecx
mov    %eax,%edx
mov    -0x8(%rbp),%eax
or     %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_key_mgmt_wpa_ieee8021x>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
xor    %edi,%edi
call   1030 <BIT@plt>
mov    %eax,%ebp
mov    $0x5,%edi
call   1030 <BIT@plt>
mov    %eax,%ebx
or     %ebp,%ebx
mov    $0xe,%edi
call   1030 <BIT@plt>
mov    %eax,%ebp
mov    $0x7,%edi
call   1030 <BIT@plt>
or     %ebp,%eax
or     %ebx,%eax
xor    %ecx,%ecx
test   %r14d,%eax
setne  %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @wpa_key_mgmt_wpa_ieee8021x(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @BIT(i32 0)
%5 = call i32 @BIT(i32 5)
%6 = or i32 %4, %5
%7 = call i32 @BIT(i32 14)
%8 = or i32 %6, %7
%9 = call i32 @BIT(i32 7)
%10 = or i32 %8, %9
%11 = and i32 %3, %10
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
%14 = xor i1 %13, true
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @wpa_key_mgmt_wpa_ieee8021x(i32 %0) {
%2 = tail call i32 @BIT(i32 0)
%3 = tail call i32 @BIT(i32 5)
%4 = or i32 %3, %2
%5 = tail call i32 @BIT(i32 14)
%6 = or i32 %4, %5
%7 = tail call i32 @BIT(i32 7)
%8 = or i32 %6, %7
%9 = and i32 %8, %0
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
void rop3_82_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = S & *D;
  stk2 = T | stk3;
  stk1 = *D ^ stk2;
  *D = stk1;
}


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

x86 assembly (clang, -O2):
<rop3_82_0_0>:
mov    (%rdi),%al
and    %al,%sil
or     %dl,%sil
xor    %al,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_82_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = and i32 %11, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8*, i8** %4
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = load i8, i8* %8
%27 = zext i8 %26 to i32
%28 = xor i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = load i8*, i8** %4
store i8 %30, i8* %31
ret void
}

LLVM IR (-O2):
define void @rop3_82_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %1
%6 = or i8 %5, %2
%7 = xor i8 %6, %4
store i8 %7, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ radio_set_random_adrs(int /*<<< orphan*/ *);
void ll_set_random_adrs(uint8_t *rand_adrs) {
  radio_set_random_adrs(rand_adrs);
}


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

x86 assembly (clang, -O2):
<ll_set_random_adrs>:
jmp    1030 <radio_set_random_adrs@plt>

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

LLVM IR (-O2):
define void @ll_set_random_adrs(i32* %0) {
%2 = tail call i32 @radio_set_random_adrs(i32* %0)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int dobldobl_row_reduce_system(int diag) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc4c(708, &diag, b, c, 0);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @dobldobl_row_reduce_system(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 708, i32* %2, i32* undef, double* undef, i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gpio_write_scl_sda(int, int);
void operation_i2c_stop() {
  gpio_write_scl_sda(1, 0);
  gpio_write_scl_sda(1, 1);
}


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

x86 assembly (clang, -O2):
<operation_i2c_stop>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <gpio_write_scl_sda@plt>
mov    $0x1,%edi
mov    $0x1,%esi
pop    %rax
jmp    1030 <gpio_write_scl_sda@plt>

LLVM IR (-O0):
define void @operation_i2c_stop() {
%1 = call i32 @gpio_write_scl_sda(i32 1, i32 0)
%2 = call i32 @gpio_write_scl_sda(i32 1, i32 1)
ret void
}

LLVM IR (-O2):
define void @operation_i2c_stop() {
%1 = tail call i32 @gpio_write_scl_sda(i32 1, i32 0)
%2 = tail call i32 @gpio_write_scl_sda(i32 1, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cvttps_pi32(int /*<<< orphan*/);
__m64 test_mm_cvttps_pi32(__m128 a) { return _mm_cvttps_pi32(a); }


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

x86 assembly (clang, -O2):
<test_mm_cvttps_pi32>:
jmp    1030 <_mm_cvttps_pi32@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cvttps_pi32(i32 %0) {
%2 = tail call i32 @_mm_cvttps_pi32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *TNCJob_free_wrapper(void *arg) {
  free(arg);
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @TNCJob_free_wrapper(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ ransacH(double *, int, double, double, int, double *,
                           int /*<<< orphan*/, int /*<<< orphan*/, int, int);
void ransacHsimple(double *u, int len, double th, double *H) {
  ransacH(u, len, th, 0.95, 1000000, H, 0, 0, 1, 28);
}


x86 assembly (clang, -O0):
<ransacHsimple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
mov    -0x20(%rbp),%rcx
movsd  0xec0(%rip),%xmm1
mov    $0xf4240,%edx
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x1,(%rsp)
movl   $0x1c,0x8(%rsp)
call   1030 <ransacH@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ransacHsimple>:
push   %rax
mov    %rdx,%rcx
movsd  0xee4(%rip),%xmm1
mov    $0xf4240,%edx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x1c
push   $0x1
call   1030 <ransacH@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
define void @ransacHsimple(double* %0, i32 %1, double %2, double* %3) {
%5 = alloca double*
%6 = alloca i32
%7 = alloca double
%8 = alloca double*
store double* %0, double** %5
store i32 %1, i32* %6
store double %2, double* %7
store double* %3, double** %8
%9 = load double*, double** %5
%10 = load i32, i32* %6
%11 = load double, double* %7
%12 = load double*, double** %8
%13 = call i32 @ransacH(double* %9, i32 %10, double %11, double 0x3FEE666666666666, i32 1000000, double* %12, i32 0, i32 0, i32 1, i32 28)
ret void
}

LLVM IR (-O2):
define void @ransacHsimple(double* %0, i32 %1, double %2, double* %3) {
%5 = tail call i32 @ransacH(double* %0, i32 %1, double %2, double 0x3FEE666666666666, i32 1000000, double* %3, i32 0, i32 0, i32 1, i32 28)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_new_state();
int /*<<< orphan*/ test_state_equals();
void main() {
  test_new_state();
  test_state_equals();
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_new_state@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <test_state_equals@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @test_new_state()
%2 = call i32 (...) @test_state_equals()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @test_new_state()
%2 = tail call i32 (...) @test_state_equals()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ktty_putc(char);
void ktty_puts(char *s) {
  while (*s) {
    ktty_putc(*s);
    *s++;
  }
}


x86 assembly (clang, -O0):
<ktty_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <ktty_puts+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <ktty_putc@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <ktty_puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ktty_puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <ktty_puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <ktty_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <ktty_puts+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @ktty_puts(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = call i32 @ktty_putc(i8 signext %9)
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
%13 = load i8, i8* %11
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @ktty_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @ktty_putc(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
long ft_real_value(long long inp) {
  if (inp < 0)
    return (-inp);
  return (inp);
}


x86 assembly (clang, -O0):
<ft_real_value>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1122 <ft_real_value+0x22>
xor    %eax,%eax
sub    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112a <ft_real_value+0x2a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @ft_real_value(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ genericError(char *, int, char const *, int const,
                                int const);
void __errorNodeNotFound(const char *file, const int line, const int nodeId) {
  genericError("%s:%d We couldn't find the node %d inside a graph", 7, file,
               line, nodeId);
}


x86 assembly (clang, -O0):
<__errorNodeNotFound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xecc(%rip),%rdi
mov    $0x7,%esi
call   1030 <genericError@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__errorNodeNotFound>:
mov    %edx,%r8d
mov    %esi,%ecx
mov    %rdi,%rdx
lea    0xee1(%rip),%rdi
mov    $0x7,%esi
jmp    1030 <genericError@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"%s:%d We couldn't find the node %d inside a graph\00"
define void @__errorNodeNotFound(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @genericError(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 7, i8* %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"%s:%d We couldn't find the node %d inside a graph\00"
define void @__errorNodeNotFound(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @genericError(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 7, i8* %0, i32 %1, i32 %2)
ret void
}
/* Type definitions */
struct cmd_arg {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ showAdslStatistics();
void cmdShowAdslStatistics(int cmdType, struct cmd_arg *pCmdArg) {
  showAdslStatistics();
}


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

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

LLVM IR (-O0):
%struct.cmd_arg = type { i32 }
define void @cmdShowAdslStatistics(i32 %0, %struct.cmd_arg* %1) {
%3 = alloca i32
%4 = alloca %struct.cmd_arg*
store i32 %0, i32* %3
store %struct.cmd_arg* %1, %struct.cmd_arg** %4
%5 = call i32 (...) @showAdslStatistics()
ret void
}

LLVM IR (-O2):
%struct.cmd_arg = type { i32 }
define void @cmdShowAdslStatistics(i32 %0, %struct.cmd_arg* nocapture readnone %1) {
%3 = tail call i32 (...) @showAdslStatistics()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *cat_name(char *name) {
  char trick_name[81];
  strcpy(trick_name, name);
  strcat(trick_name, "\n");
  strcpy(name, trick_name);
  return name;
}


x86 assembly (clang, -O0):
<cat_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x60(%rbp),%rdi
lea    0xebc(%rip),%rsi
call   1040 <strcat@plt>
mov    -0x8(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cat_name>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xec1(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define i8* @cat_name(i8* returned %0) {
%2 = alloca [81 x i8]
%3 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* %0)
%5 = call i32 @strcat(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @strcpy(i8* %0, i8* %3)
ret i8* %0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void mp2vseqx_set_framerated(uint8_t *p_mp2vseqx, uint8_t i_framerated) {
  p_mp2vseqx[9] &= 0xe0;
  p_mp2vseqx[9] |= i_framerated & 0x1f;
}


x86 assembly (clang, -O0):
<mp2vseqx_set_framerated>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%ecx
and    $0xe0,%ecx
mov    %ecx,0x24(%rax)
mov    -0xc(%rbp),%ecx
and    $0x1f,%ecx
mov    -0x8(%rbp),%rax
or     0x24(%rax),%ecx
mov    %ecx,0x24(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vseqx_set_framerated>:
mov    $0xe0,%eax
and    0x24(%rdi),%eax
and    $0x1f,%esi
or     %eax,%esi
mov    %esi,0x24(%rdi)
ret

LLVM IR (-O0):
define void @mp2vseqx_set_framerated(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 = getelementptr inbounds i32, i32* %5, i64 9
%7 = load i32, i32* %6
%8 = and i32 %7, 224
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = and i32 %9, 31
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 9
%13 = load i32, i32* %12
%14 = or i32 %13, %10
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @mp2vseqx_set_framerated(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 9
%4 = load i32, i32* %3
%5 = and i32 %4, 224
%6 = and i32 %1, 31
%7 = or i32 %5, %6
store i32 %7, i32* %3
ret void
}
/* Type definitions */
typedef unsigned int uint32_t;

/* Variables and functions */
int CHAR_BIT;
unsigned int UINT32_MAX;
uint32_t estimate_max_nverts(int hash_bits, int r) {
  const size_t partition_bits = hash_bits / r;
  return (partition_bits >= sizeof(uint32_t) * CHAR_BIT)
             ? UINT32_MAX
             : ((1u << (partition_bits - 1))) * r;
}


x86 assembly (clang, -O0):
<estimate_max_nverts>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2eb6(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
cmp    %rcx,%rax
jb     1143 <estimate_max_nverts+0x43>
mov    0x2ebf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    115b <estimate_max_nverts+0x5b>
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<estimate_max_nverts>:
mov    %edi,%eax
cltd
idiv   %esi
cltq
mov    0x2eca(%rip),%rcx
movslq (%rcx),%rdx
shl    $0x2,%rdx
lea    -0x1(%rax),%ecx
shl    %cl,%esi
cmp    %rax,%rdx
ja     1128 <estimate_max_nverts+0x28>
mov    0x2ed2(%rip),%rax
mov    (%rax),%esi
mov    %esi,%eax
ret

LLVM IR (-O0):
@CHAR_BIT = global i32 0
@UINT32_MAX = global i32 0
define i32 @estimate_max_nverts(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sdiv i32 %6, %7
%9 = sext i32 %8 to i64
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = load i32, i32* @CHAR_BIT
%12 = sext i32 %11 to i64
%13 = mul i64 4, %12
%14 = icmp uge i64 %10, %13
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = load i32, i32* @UINT32_MAX
br label %24
17: ; preds = %2
%18 = load i64, i64* %5
%19 = sub i64 %18, 1
%20 = trunc i64 %19 to i32
%21 = shl i32 1, %20
%22 = load i32, i32* %4
%23 = mul i32 %21, %22
br label %24
24: ; preds = %17, %15
%25 = phi i32 [ %16, %15 ], [ %23, %17 ]
ret i32 %25
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
@UINT32_MAX = global i32 0
define i32 @estimate_max_nverts(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
%4 = sext i32 %3 to i64
%5 = load i32, i32* @CHAR_BIT
%6 = sext i32 %5 to i64
%7 = shl nsw i64 %6, 2
%8 = icmp ugt i64 %7, %4
%9 = load i32, i32* @UINT32_MAX
%10 = add i32 %3, -1
%11 = shl i32 %1, %10
%12 = select i1 %8, i32 %11, i32 %9
ret i32 %12
}
void RTSemMutexRequest(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSemMutexRequest() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AxisAngToQuaternion(double *, double, double *);
int /*<<< orphan*/ RotToAxisAng(double **, double *, double *);
void RotToQuaternion(double R[3][3], double q[4]) {
  double omghat[3];
  double theta;
  RotToAxisAng(R, omghat, &theta);
  AxisAngToQuaternion(omghat, theta, q);
  return;
}


x86 assembly (clang, -O0):
<RotToQuaternion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x38(%rbp),%rdx
call   1030 <RotToAxisAng@plt>
lea    -0x30(%rbp),%rdi
movsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rsi
call   1040 <AxisAngToQuaternion@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RotToQuaternion>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
lea    0x10(%rsp),%r14
lea    0x8(%rsp),%rdx
mov    %r14,%rsi
call   1030 <RotToAxisAng@plt>
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <AxisAngToQuaternion@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @RotToQuaternion([3 x double]* %0, double* %1) {
%3 = alloca [3 x double]*
%4 = alloca double*
%5 = alloca [3 x double]
%6 = alloca double
store [3 x double]* %0, [3 x double]** %3
store double* %1, double** %4
%7 = load [3 x double]*, [3 x double]** %3
%8 = bitcast [3 x double]* %7 to double**
%9 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 0
%10 = call i32 @RotToAxisAng(double** %8, double* %9, double* %6)
%11 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 0
%12 = load double, double* %6
%13 = load double*, double** %4
%14 = call i32 @AxisAngToQuaternion(double* %11, double %12, double* %13)
ret void
}

LLVM IR (-O2):
define void @RotToQuaternion([3 x double]* %0, double* %1) {
%3 = alloca [3 x double]
%4 = alloca double
%5 = bitcast [3 x double]* %3 to i8*
%6 = bitcast double* %4 to i8*
%7 = bitcast [3 x double]* %0 to double**
%8 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%9 = call i32 @RotToAxisAng(double** %7, double* %8, double* %4)
%10 = load double, double* %4
%11 = call i32 @AxisAngToQuaternion(double* %8, double %10, double* %1)
ret void
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, int,
                           char *);
int /*<<< orphan*/ stderr;
char *strerror(int);
void losing(char *program, char *reason) {
  int err = errno;
  fprintf(stderr, "%s: losing: %s: (%d) %s\n", program, reason, err,
          strerror(err));
  exit(1);
}


x86 assembly (clang, -O0):
<losing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    0x2e8d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <strerror@plt>
mov    -0x2c(%rbp),%edi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%r8d
mov    %rax,%r9
lea    0xe71(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<losing>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
mov    0x2e94(%rip),%rax
mov    (%rax),%ebp
mov    0x2e93(%rip),%rax
mov    (%rax),%ebx
mov    %ebp,%edi
call   1050 <strerror@plt>
lea    0xea3(%rip),%rsi
mov    %ebx,%edi
mov    %r15,%rdx
mov    %r14,%rcx
mov    %ebp,%r8d
mov    %rax,%r9
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@errno = global i32 0
@stderr = global i32 0
@.str = [25 x i8] c"%s: losing: %s: (%d) %s\0A\00"
define void @losing(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i32, i32* @errno
store i32 %6, i32* %5
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = load i32, i32* %5
%12 = call i8* @strerror(i32 %11)
%13 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i32 %10, i8* %12)
%14 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@errno = global i32 0
@stderr = global i32 0
@.str = [25 x i8] c"%s: losing: %s: (%d) %s\0A\00"
define void @losing(i8* %0, i8* %1) {
%3 = load i32, i32* @errno
%4 = load i32, i32* @stderr
%5 = tail call i8* @strerror(i32 %3)
%6 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %3, i8* %5)
%7 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void print_delimiter(char *text, char *delimiter) {
  printf("%s%s%s\n", delimiter, text, delimiter);
}


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

x86 assembly (clang, -O2):
<print_delimiter>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
mov    %rsi,%rcx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%s%s%s\0A\00"
define void @print_delimiter(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0, i8* %1)
ret void
}
void I_StartupHardwareGraphics(void) {}


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

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

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

LLVM IR (-O2):
define void @I_StartupHardwareGraphics() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
scalar_t__ read(int, char *, int);
void read_message(char *buffer, int fd) {
  memset(buffer, 0, 256);
  if (read(fd, buffer, 256) < 0) {
    exit(1);
  }
}


x86 assembly (clang, -O0):
<read_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1030 <memset@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    $0x100,%edx
call   1040 <read@plt>
cmp    $0x0,%rax
jge    1174 <read_message+0x44>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_message>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x100,%edx
call   1030 <memset@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x100,%edx
call   1040 <read@plt>
test   %rax,%rax
js     115f <read_message+0x2f>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @read_message(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @memset(i8* %5, i32 0, i32 256)
%7 = load i32, i32* %4
%8 = load i8*, i8** %3
%9 = call i64 @read(i32 %7, i8* %8, i32 256)
%10 = icmp slt i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @read_message(i8* %0, i32 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i32 256)
%4 = tail call i64 @read(i32 %1, i8* %0, i32 256)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret void
}
/* Variables and functions */
unsigned long LoadAudio292(char const *);
unsigned long loadaudio(const char *s) { return LoadAudio292(s); }


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

x86 assembly (clang, -O2):
<loadaudio>:
jmp    1030 <LoadAudio292@plt>

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

LLVM IR (-O2):
define i64 @loadaudio(i8* %0) {
%2 = tail call i64 @LoadAudio292(i8* %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int square(int);
int main(void) {
  printf("after square: %d\n", square(10));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1030 <square@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"after square: %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @square(i32 10)
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"after square: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @square(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalpha(int);
void t_isalpha_0x47() {
  Assert_real((isalpha(71)),
              "/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_isalpha.c",
              360, ("isalpha should be 1 for G"));
}


x86 assembly (clang, -O0):
<t_isalpha_0x47>:
push   %rbp
mov    %rsp,%rbp
mov    $0x47,%edi
call   1030 <isalpha@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x168,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0x47>:
push   %rax
mov    $0x47,%edi
call   1030 <isalpha@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x168,%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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for G\00"
define void @t_isalpha_0x47() {
%1 = call i32 @isalpha(i32 71)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 360, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for G\00"
define void @t_isalpha_0x47() {
%1 = tail call i32 @isalpha(i32 71)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 360, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct json {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ create_reference(struct json *);
int /*<<< orphan*/ json_add_item_to_object(struct json *, char const *,
                                           int /*<<< orphan*/);
void json_add_item_reference_to_object(struct json *object, const char *string,
                                       struct json *item) {
  json_add_item_to_object(object, string, create_reference(item));
}


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

x86 assembly (clang, -O2):
<json_add_item_reference_to_object>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdx,%rdi
call   1030 <create_reference@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <json_add_item_to_object@plt>

LLVM IR (-O0):
%struct.json = type { i32 }
define void @json_add_item_reference_to_object(%struct.json* %0, i8* %1, %struct.json* %2) {
%4 = alloca %struct.json*
%5 = alloca i8*
%6 = alloca %struct.json*
store %struct.json* %0, %struct.json** %4
store i8* %1, i8** %5
store %struct.json* %2, %struct.json** %6
%7 = load %struct.json*, %struct.json** %4
%8 = load i8*, i8** %5
%9 = load %struct.json*, %struct.json** %6
%10 = call i32 @create_reference(%struct.json* %9)
%11 = call i32 @json_add_item_to_object(%struct.json* %7, i8* %8, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.json = type { i32 }
define void @json_add_item_reference_to_object(%struct.json* %0, i8* %1, %struct.json* %2) {
%4 = tail call i32 @create_reference(%struct.json* %2)
%5 = tail call i32 @json_add_item_to_object(%struct.json* %0, i8* %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  assert((2 | 3) == 1);
  return 0;
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ *stdout;
FILE *PosixRedirect_stdout() { return stdout; }


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

x86 assembly (clang, -O2):
<PosixRedirect_stdout>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%rax
ret

LLVM IR (-O0):
@stdout = global i32* null
define i32* @PosixRedirect_stdout() {
%1 = load i32*, i32** @stdout
ret i32* %1
}

LLVM IR (-O2):
@stdout = global i32* null
define i32* @PosixRedirect_stdout() {
%1 = load i32*, i32** @stdout
ret i32* %1
}
void LEDS_init() {}


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

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

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

LLVM IR (-O2):
define void @LEDS_init() {
ret void
}
/* Variables and functions */
int core3_safe(char const *);
int U_EMRSETTEXTALIGN_safe(const char *record) { return (core3_safe(record)); }


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

x86 assembly (clang, -O2):
<U_EMRSETTEXTALIGN_safe>:
jmp    1030 <core3_safe@plt>

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

LLVM IR (-O2):
define i32 @U_EMRSETTEXTALIGN_safe(i8* %0) {
%2 = tail call i32 @core3_safe(i8* %0)
ret i32 %2
}
/* Variables and functions */
long strtol(char const *, char **, int);
int str2int(const char *str) {
  char *p;
  long l = strtol(str, &p, 10);
  if (p && (*p != '\0'))
    return (-1);
  return ((int)l);
}


x86 assembly (clang, -O0):
<str2int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1159 <str2int+0x49>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1159 <str2int+0x49>
movl   $0xffffffff,-0x4(%rbp)
jmp    1160 <str2int+0x50>
mov    -0x20(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str2int>:
push   %rax
mov    %rsp,%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    (%rsp),%rdx
test   %rdx,%rdx
je     1131 <str2int+0x21>
mov    $0xffffffff,%ecx
cmpb   $0x0,(%rdx)
jne    1133 <str2int+0x23>
mov    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @str2int(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i64 @strtol(i8* %6, i8** %4, i32 10)
store i64 %7, i64* %5
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %16
10: ; preds = %1
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 -1, i32* %2
br label %19
16: ; preds = %10, %1
%17 = load i64, i64* %5
%18 = trunc i64 %17 to i32
store i32 %18, i32* %2
br label %19
19: ; preds = %16, %15
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @str2int(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @strtol(i8* %0, i8** %2, i32 10)
%5 = load i8*, i8** %2
%6 = icmp eq i8* %5, null
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load i8, i8* %5
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7, %1
%11 = trunc i64 %4 to i32
br label %12
12: ; preds = %7, %10
%13 = phi i32 [ %11, %10 ], [ -1, %7 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int getSpringConstant(void) {
  int k;
  printf("Enter the spring constant (N/m): ");
  scanf("%d", &k);
  return k;
}


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

x86 assembly (clang, -O2):
<getSpringConstant>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Enter the spring constant (N/m): \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @getSpringConstant() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [34 x i8] c"Enter the spring constant (N/m): \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @getSpringConstant() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
int back(void) {
  printf("%s:%s\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/Boshin/workspace/refs/heads/baseline/"
         "ARMToolChain/source/glibc-2.21/elf/tst-deep1mod2.c",
         __func__);
  return -1;
}


x86 assembly (clang, -O0):
<back>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee5(%rip),%rsi
lea    0xf90(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<back>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee8(%rip),%rsi
lea    0xf93(%rip),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%s:%s\0A\00"
@.str.1 = [178 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Boshin/workspace/refs/heads/baseline/ARMToolChain/source/glibc-2.21/elf/tst-deep1mod2.c\00"
@__func__.back = [5 x i8] c"back\00"
define i32 @back() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([178 x i8], [178 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.back, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s:%s\0A\00"
@.str.1 = [178 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Boshin/workspace/refs/heads/baseline/ARMToolChain/source/glibc-2.21/elf/tst-deep1mod2.c\00"
@__func__.back = [5 x i8] c"back\00"
define i32 @back() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([178 x i8], [178 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.back, i64 0, i64 0))
ret i32 -1
}
void tdefault_pass_signals(struct target_ops *self, int arg1,
                           unsigned char *arg2) {}


x86 assembly (clang, -O0):
<tdefault_pass_signals>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.target_ops = type opaque
define void @tdefault_pass_signals(%struct.target_ops* %0, i32 %1, i8* %2) {
%4 = alloca %struct.target_ops*
%5 = alloca i32
%6 = alloca i8*
store %struct.target_ops* %0, %struct.target_ops** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
%struct.target_ops = type opaque
define void @tdefault_pass_signals(%struct.target_ops* nocapture %0, i32 %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int send_msg(int, unsigned char *, int);
int send_error(int socket, unsigned char *msg) {
  return send_msg(socket, msg, 9);
}


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

x86 assembly (clang, -O2):
<send_error>:
mov    $0x9,%edx
jmp    1030 <send_msg@plt>

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

LLVM IR (-O2):
define i32 @send_error(i32 %0, i8* %1) {
%3 = tail call i32 @send_msg(i32 %0, i8* %1, i32 9)
ret i32 %3
}
void RTAvlGCPhysGetBestFit(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlGCPhysGetBestFit() {
ret void
}
double __muldf3(double a __attribute__((unused)),
                double b __attribute__((unused))) {
  return 0.0;
}


x86 assembly (clang, -O0):
<__muldf3>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__muldf3>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @__muldf3(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @__muldf3(double %0, double %1) {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ cli();
void interrupt_disable() { cli(); }


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

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

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

LLVM IR (-O2):
define void @interrupt_disable() {
%1 = tail call i32 (...) @cli()
ret void
}
double foo(u)
unsigned u;
{ return u; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2sd %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%eax
cvtsi2sd %rax,%xmm0
ret

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

LLVM IR (-O2):
define double @foo(i32 %0) {
%2 = uitofp i32 %0 to double
ret double %2
}
int used_fn_knrarg(arg)
int arg __attribute__((used));
{ return 0; }


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

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

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

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