xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ padout(int);
int strlen(char const *);
int /*<<< orphan*/ writestr(char const *);
void writetbl(const char *s, int width) {
  writestr(s);
  width = width - strlen(s);
  if (width > 0)
    padout(width);
}


x86 assembly (clang, -O0):
<writetbl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <writestr@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1173 <writetbl+0x43>
mov    -0xc(%rbp),%edi
call   1040 <padout@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writetbl>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1050 <writestr@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
sub    %eax,%ebp
jle    1156 <writetbl+0x26>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <padout@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @writetbl(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 @writestr(i8* %5)
%7 = load i32, i32* %4
%8 = load i8*, i8** %3
%9 = call i32 @strlen(i8* %8)
%10 = sub nsw i32 %7, %9
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = load i32, i32* %4
%15 = call i32 @padout(i32 %14)
br label %16
16: ; preds = %13, %2
ret void
}

LLVM IR (-O2):
define void @writetbl(i8* %0, i32 %1) {
%3 = tail call i32 @writestr(i8* %0)
%4 = tail call i32 @strlen(i8* %0)
%5 = sub nsw i32 %1, %4
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @padout(i32 %5)
br label %9
9: ; preds = %7, %2
ret void
}
int fastsgn(const float f) { return 1 + (((*(int *)&f) >> 31) << 1); }


x86 assembly (clang, -O0):
<fastsgn>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
shl    $0x1,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastsgn>:
movmskps %xmm0,%eax
shl    $0x1f,%eax
sar    $0x1e,%eax
or     $0x1,%eax
ret

LLVM IR (-O0):
define i32 @fastsgn(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = bitcast float* %2 to i32*
%4 = load i32, i32* %3
%5 = ashr i32 %4, 31
%6 = shl i32 %5, 1
%7 = add nsw i32 1, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @fastsgn(float %0) {
%2 = bitcast float %0 to i32
%3 = ashr i32 %2, 30
%4 = or i32 %3, 1
ret i32 %4
}
/* Type definitions */
typedef float uint32_t;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, float);
void ironlake_debug_panel_fitting_3(char *result, int len, int reg,
                                    uint32_t val, uint32_t devid) {
  snprintf(result, len, "vscale initial phase %f", val / (float)(1 << 15));
}


x86 assembly (clang, -O0):
<ironlake_debug_panel_fitting_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movss  %xmm1,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movss  -0x14(%rbp),%xmm0
movss  0xec0(%rip),%xmm1
divss  %xmm1,%xmm0
lea    0xeb9(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ironlake_debug_panel_fitting_3>:
mulss  0xee8(%rip),%xmm0
lea    0xee5(%rip),%rdx
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"vscale initial phase %f\00"
define void @ironlake_debug_panel_fitting_3(i8* %0, i32 %1, i32 %2, float %3, float %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca float
%10 = alloca float
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store float %3, float* %9
store float %4, float* %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load float, float* %9
%14 = fdiv float %13, 3.276800e+04
%15 = call i32 @snprintf(i8* %11, i32 %12, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), float %14)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"vscale initial phase %f\00"
define void @ironlake_debug_panel_fitting_3(i8* %0, i32 %1, i32 %2, float %3, float %4) {
%6 = fmul float %3, 0x3F00000000000000
%7 = tail call i32 @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), float %6)
ret void
}
int maxFD(int a, int b) { return a < b ? b : a; }


x86 assembly (clang, -O0):
<maxFD>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <maxFD+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <maxFD+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maxFD>:
mov    %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @maxFD(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ writel(int /*<<< orphan*/, void *);
void write_pxpen(unsigned port, uint32_t value) {
  writel(value, (void *)0xb0010000 + (port * 0x100) + (0x70));
}


x86 assembly (clang, -O0):
<write_pxpen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    %eax,%eax
mov    $0xb0010000,%esi
add    %rax,%rsi
add    $0x70,%rsi
call   1030 <writel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_pxpen>:
mov    %esi,%eax
shl    $0x8,%edi
mov    $0xb0010070,%esi
add    %rdi,%rsi
mov    %eax,%edi
jmp    1030 <writel@plt>

LLVM IR (-O0):
define void @write_pxpen(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 = mul i32 %6, 256
%8 = zext i32 %7 to i64
%9 = getelementptr i8, i8* inttoptr (i64 2952855552 to i8*), i64 %8
%10 = getelementptr i8, i8* %9, i64 112
%11 = call i32 @writel(i32 %5, i8* %10)
ret void
}

LLVM IR (-O2):
define void @write_pxpen(i32 %0, i32 %1) {
%3 = shl i32 %0, 8
%4 = zext i32 %3 to i64
%5 = getelementptr i8, i8* inttoptr (i64 2952855552 to i8*), i64 %4
%6 = getelementptr i8, i8* %5, i64 112
%7 = tail call i32 @writel(i32 %1, i8* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scheduler();
int main() {
  scheduler();
  return 0;
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @UYVYToYRow_Any_SSE2() {
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int rotate_r(int, int);
uint64_t S0(uint64_t h1) {
  return rotate_r(h1, 28) ^ rotate_r(h1, 34) ^ rotate_r(h1, 39);
}


x86 assembly (clang, -O0):
<S0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1c,%esi
call   1030 <rotate_r@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x22,%esi
call   1030 <rotate_r@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x27,%esi
call   1030 <rotate_r@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<S0>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    $0x1c,%esi
call   1030 <rotate_r@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    $0x22,%esi
call   1030 <rotate_r@plt>
mov    %eax,%ebp
xor    %r14d,%ebp
mov    %ebx,%edi
mov    $0x27,%esi
call   1030 <rotate_r@plt>
xor    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @S0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @rotate_r(i32 %3, i32 28)
%5 = load i32, i32* %2
%6 = call i32 @rotate_r(i32 %5, i32 34)
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = call i32 @rotate_r(i32 %8, i32 39)
%10 = xor i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @S0(i32 %0) {
%2 = tail call i32 @rotate_r(i32 %0, i32 28)
%3 = tail call i32 @rotate_r(i32 %0, i32 34)
%4 = xor i32 %3, %2
%5 = tail call i32 @rotate_r(i32 %0, i32 39)
%6 = xor i32 %4, %5
ret i32 %6
}
/* Variables and functions */
scalar_t__ _eml_parse822_is_atom_char_ex(char);
scalar_t__ _eml_parse822_is_char(char);
int _eml_parse822_is_atom_char(char c) {
  return _eml_parse822_is_char(c) && _eml_parse822_is_atom_char_ex(c);
}


x86 assembly (clang, -O0):
<_eml_parse822_is_atom_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <_eml_parse822_is_char@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
je     115c <_eml_parse822_is_atom_char+0x3c>
movsbl -0x1(%rbp),%edi
call   1040 <_eml_parse822_is_atom_char_ex@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_eml_parse822_is_atom_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <_eml_parse822_is_char@plt>
test   %rax,%rax
je     1142 <_eml_parse822_is_atom_char+0x22>
movsbl %bl,%edi
call   1040 <_eml_parse822_is_atom_char_ex@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_eml_parse822_is_atom_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @_eml_parse822_is_char(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @_eml_parse822_is_atom_char_ex(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @_eml_parse822_is_atom_char(i8 signext %0) {
%2 = tail call i64 @_eml_parse822_is_char(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @_eml_parse822_is_atom_char_ex(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
void PDMCritSectIsOwnerEx(void) {}


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

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

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

LLVM IR (-O2):
define void @PDMCritSectIsOwnerEx() {
ret void
}
/* Type definitions */
typedef int uint;

/* Variables and functions */
unsigned GetFieldW4(uint *A, register uint index) {
  register uint i = index / 8, j = (index & 0x7) << 2;
  return (A[i] << (28 - j)) >> (28);
}


x86 assembly (clang, -O0):
<GetFieldW4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x7,%eax
shl    $0x2,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x1c,%ecx
sub    -0x14(%rbp),%ecx
shl    %cl,%eax
sar    $0x1c,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetFieldW4>:
lea    0x7(%rsi),%eax
test   %esi,%esi
cmovns %esi,%eax
sar    $0x3,%eax
lea    0x0(,%rsi,4),%ecx
cltq
mov    (%rdi,%rax,4),%eax
not    %cl
and    $0x1c,%cl
shl    %cl,%eax
sar    $0x1c,%eax
ret

LLVM IR (-O0):
define i32 @GetFieldW4(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sdiv i32 %7, 8
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = and i32 %9, 7
%11 = shl i32 %10, 2
store i32 %11, i32* %6
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = load i32, i32* %6
%18 = sub nsw i32 28, %17
%19 = shl i32 %16, %18
%20 = ashr i32 %19, 28
ret i32 %20
}

LLVM IR (-O2):
define i32 @GetFieldW4(i32* nocapture %0, i32 %1) {
%3 = sdiv i32 %1, 8
%4 = shl i32 %1, 2
%5 = sext i32 %3 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = and i32 %4, 28
%9 = xor i32 %8, 28
%10 = shl i32 %7, %9
%11 = ashr i32 %10, 28
ret i32 %11
}
int test_imm_16uint16_reg(unsigned short val) {
  return ((val) & (0x16 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_16uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x16,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_16uint16_reg>:
test   $0x16,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_16uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 22
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ add_something(int);
int /*<<< orphan*/ make_minimum(int);
void splitjoin_example(int add_this, int min) {
  add_something(add_this);
  make_minimum(min);
}


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

x86 assembly (clang, -O2):
<splitjoin_example>:
push   %rbx
mov    %esi,%ebx
call   1040 <add_something@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <make_minimum@plt>

LLVM IR (-O0):
define void @splitjoin_example(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 = call i32 @add_something(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @make_minimum(i32 %7)
ret void
}

LLVM IR (-O2):
define void @splitjoin_example(i32 %0, i32 %1) {
%3 = tail call i32 @add_something(i32 %0)
%4 = tail call i32 @make_minimum(i32 %1)
ret void
}
/* Variables and functions */
int printf(char *, unsigned int);
int chained(void) {
  unsigned a = 0x7EABCDF4;
  return printf("%u\n", a << 3 >> 1);
}


x86 assembly (clang, -O0):
<chained>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x7eabcdf4,-0x4(%rbp)
mov    -0x4(%rbp),%esi
shl    $0x3,%esi
shr    $0x1,%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chained>:
lea    0xee9(%rip),%rdi
mov    $0x7aaf37d0,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @chained() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2058303440)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void *malloc(size_t const);
int /*<<< orphan*/ printf(char *);
void *expr_alloc(const size_t segsize) {
  void *maddr = malloc(segsize);
  if (maddr == NULL) {
    printf("ERROR: no memory! Exiting...\n");
    exit(1);
  }
  return maddr;
}


x86 assembly (clang, -O0):
<expr_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116a <expr_alloc+0x3a>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expr_alloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <expr_alloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"ERROR: no memory! Exiting...\0A\00"
define i8* @expr_alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@str = [29 x i8] c"ERROR: no memory! Exiting...\00"
define noalias i8* @expr_alloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ RRCA();
int /*<<< orphan*/ T_WAIT_UNTIL(int);
void op_0x0f(void) {
  RRCA();
  T_WAIT_UNTIL(4);
  return;
}


x86 assembly (clang, -O0):
<op_0x0f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <RRCA@plt>
mov    $0x4,%edi
call   1030 <T_WAIT_UNTIL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_0x0f>:
push   %rax
xor    %eax,%eax
call   1040 <RRCA@plt>
mov    $0x4,%edi
pop    %rax
jmp    1030 <T_WAIT_UNTIL@plt>

LLVM IR (-O0):
define void @op_0x0f() {
%1 = call i32 (...) @RRCA()
%2 = call i32 @T_WAIT_UNTIL(i32 4)
ret void
}

LLVM IR (-O2):
define void @op_0x0f() {
%1 = tail call i32 (...) @RRCA()
%2 = tail call i32 @T_WAIT_UNTIL(i32 4)
ret void
}
int addSum(int x, int y) { return x + y; }


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

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

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

LLVM IR (-O2):
define i32 @addSum(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void subfn(void *x) { free(x); }


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

x86 assembly (clang, -O2):
<subfn>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @subfn(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
unsigned long THRandom_random();
unsigned long Random_random() { return THRandom_random(); }


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

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

LLVM IR (-O0):
define i64 @Random_random() {
%1 = call i64 (...) @THRandom_random()
ret i64 %1
}

LLVM IR (-O2):
define i64 @Random_random() {
%1 = tail call i64 (...) @THRandom_random()
ret i64 %1
}
void normal2x_height_generic_output(void *data, unsigned *out_width,
                                    unsigned *out_height, unsigned width,
                                    unsigned height) {
  *out_width = width;
  *out_height = height << 1;
}


x86 assembly (clang, -O0):
<normal2x_height_generic_output>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<normal2x_height_generic_output>:
mov    %ecx,(%rsi)
add    %r8d,%r8d
mov    %r8d,(%rdx)
ret

LLVM IR (-O0):
define void @normal2x_height_generic_output(i8* %0, i32* %1, i32* %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %9
%12 = load i32*, i32** %7
store i32 %11, i32* %12
%13 = load i32, i32* %10
%14 = shl i32 %13, 1
%15 = load i32*, i32** %8
store i32 %14, i32* %15
ret void
}

LLVM IR (-O2):
define void @normal2x_height_generic_output(i8* nocapture readnone %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32 %3, i32 %4) {
store i32 %3, i32* %1
%6 = shl i32 %4, 1
store i32 %6, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int open(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
int cam_c_init(const char *codec_node) {
  int dev_fp = -1;
  dev_fp = open(codec_node, O_RDWR);
  if (dev_fp < 0) {
    perror(codec_node);
    return -1;
  }
  return dev_fp;
}


x86 assembly (clang, -O0):
<cam_c_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
call   1030 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1167 <cam_c_init+0x47>
mov    -0x10(%rbp),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116d <cam_c_init+0x4d>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cam_c_init>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
call   1030 <open@plt>
test   %eax,%eax
js     1138 <cam_c_init+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@O_RDWR = global i32 0
define i32 @cam_c_init(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 -1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* @O_RDWR
%7 = call i32 @open(i8* %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = call i32 @perror(i8* %11)
store i32 -1, i32* %2
br label %15
13: ; preds = %1
%14 = load i32, i32* %4
store i32 %14, i32* %2
br label %15
15: ; preds = %13, %10
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@O_RDWR = global i32 0
define i32 @cam_c_init(i8* nocapture %0) {
%2 = load i32, i32* @O_RDWR
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @perror(i8* %0)
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ -1, %5 ], [ %3, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void help_(char nome[], char msg[]) {
  fprintf(stderr, "%s\nUso: %s (-c | -d) offset stringa\n", msg, nome);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<help_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help_>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rcx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"%s\0AUso: %s (-c | -d) offset stringa\0A\00"
@EXIT_FAILURE = global i32 0
define void @help_(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"%s\0AUso: %s (-c | -d) offset stringa\0A\00"
@EXIT_FAILURE = global i32 0
define void @help_(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
}
/* Variables and functions */
float __ocml_add_rtn_f32(float, float);
float __fadd_ru(float x, float y) { return __ocml_add_rtn_f32(x, y); }


x86 assembly (clang, -O0):
<__fadd_ru>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <__ocml_add_rtn_f32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fadd_ru>:
jmp    1030 <__ocml_add_rtn_f32@plt>

LLVM IR (-O0):
define float @__fadd_ru(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call float @__ocml_add_rtn_f32(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @__fadd_ru(float %0, float %1) {
%3 = tail call float @__ocml_add_rtn_f32(float %0, float %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ scrputc(int /*<<< orphan*/);
int scrputs(char *str) {
  int nwrite = 0;
  while (*str) {
    scrputc(*(str++));
    nwrite++;
  }
  return nwrite;
}


x86 assembly (clang, -O0):
<scrputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1155 <scrputs+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <scrputc@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <scrputs+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scrputs>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1138 <scrputs+0x28>
mov    %rdi,%r14
xor    %ebx,%ebx
nop
movsbl %al,%edi
call   1030 <scrputc@plt>
movzbl 0x1(%r14,%rbx,1),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <scrputs+0x10>
jmp    113a <scrputs+0x2a>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @scrputs(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = sext i8 %5 to i32
%10 = tail call i32 @scrputc(i32 %9)
%11 = add nuw nsw i32 %6, 1
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}
const char *name_to_dirname(const char *name) {
  if (name[0] == 0)
    return "(EMPTY)";
  else
    return name;
}


x86 assembly (clang, -O0):
<name_to_dirname>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1128 <name_to_dirname+0x28>
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1130 <name_to_dirname+0x30>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<name_to_dirname>:
cmpb   $0x0,(%rdi)
lea    0xef6(%rip),%rax
cmovne %rdi,%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"(EMPTY)\00"
define i8* @name_to_dirname(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
br label %12
10: ; preds = %1
%11 = load i8*, i8** %3
store i8* %11, i8** %2
br label %12
12: ; preds = %10, %9
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
@.str = [8 x i8] c"(EMPTY)\00"
define i8* @name_to_dirname(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0
ret i8* %4
}
/* Variables and functions */
float *alien_pointer();
int /*<<< orphan*/ dpop();
float to_float(int /*<<< orphan*/);
void primitive_set_alien_float(void) {
  float *ptr = alien_pointer();
  float value = to_float(dpop());
  *ptr = value;
}


x86 assembly (clang, -O0):
<primitive_set_alien_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <alien_pointer@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <to_float@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_set_alien_float>:
push   %rbx
xor    %eax,%eax
call   1050 <alien_pointer@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <to_float@plt>
movss  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @primitive_set_alien_float() {
%1 = alloca float*
%2 = alloca float
%3 = call float* (...) @alien_pointer()
store float* %3, float** %1
%4 = call i32 (...) @dpop()
%5 = call float @to_float(i32 %4)
store float %5, float* %2
%6 = load float, float* %2
%7 = load float*, float** %1
store float %6, float* %7
ret void
}

LLVM IR (-O2):
define void @primitive_set_alien_float() {
%1 = tail call float* (...) @alien_pointer()
%2 = tail call i32 (...) @dpop()
%3 = tail call float @to_float(i32 %2)
store float %3, float* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x4b() {
  Assert_real((isalnum(75)),
              "/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_isalnum.c",
              380, ("isalnum should be 1 for K"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x4b>:
push   %rax
mov    $0x4b,%edi
call   1030 <isalnum@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x17c,%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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for K\00"
define void @t_isalnum_0x4b() {
%1 = call i32 @isalnum(i32 75)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 380, 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for K\00"
define void @t_isalnum_0x4b() {
%1 = tail call i32 @isalnum(i32 75)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 380, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void fun2(void) {
  extern j;
  j++;
}


x86 assembly (clang, -O0):
<fun2>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    0x2ec9(%rip),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun2>:
mov    0x2ed9(%rip),%rax
addl   $0x1,(%rax)
ret

LLVM IR (-O0):
@j = external global i32
define void @fun2() {
%1 = load i32, i32* @j
%2 = add nsw i32 %1, 1
store i32 %2, i32* @j
ret void
}

LLVM IR (-O2):
@j = external global i32
define void @fun2() {
%1 = load i32, i32* @j
%2 = add nsw i32 %1, 1
store i32 %2, i32* @j
ret void
}
/* Variables and functions */
char *realloc(char *, scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
void set_check_parameter(char **param, const char *value) {
  *param = realloc(*param, strlen(value) + 1);
  if (*param) {
    strcpy(*param, value);
  }
}


x86 assembly (clang, -O0):
<set_check_parameter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %rax,%rsi
add    $0x1,%rsi
call   1050 <realloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     118c <set_check_parameter+0x5c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_check_parameter>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%r15
mov    %rsi,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rsi
mov    %r15,%rdi
call   1050 <realloc@plt>
mov    %rax,(%rbx)
test   %rax,%rax
je     116a <set_check_parameter+0x3a>
mov    %rax,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <strcpy@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @set_check_parameter(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** %5
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i8* @realloc(i8* %6, i64 %9)
%11 = load i8**, i8*** %3
store i8* %10, i8** %11
%12 = load i8**, i8*** %3
%13 = load i8*, i8** %12
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %20
15: ; preds = %2
%16 = load i8**, i8*** %3
%17 = load i8*, i8** %16
%18 = load i8*, i8** %4
%19 = call i32 @strcpy(i8* %17, i8* %18)
br label %20
20: ; preds = %15, %2
ret void
}

LLVM IR (-O2):
define void @set_check_parameter(i8** nocapture %0, i8* %1) {
%3 = load i8*, i8** %0
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add nsw i64 %4, 1
%6 = tail call i8* @realloc(i8* %3, i64 %5)
store i8* %6, i8** %0
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @strcpy(i8* %6, i8* %1)
br label %10
10: ; preds = %8, %2
ret void
}
int cmpFunc(const void *a, const void *b) { return (*(int *)b - *(int *)a); }


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

x86 assembly (clang, -O2):
<cmpFunc>:
mov    (%rsi),%eax
sub    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @cmpFunc(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @cmpFunc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
void f(int n) {}


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

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

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

LLVM IR (-O2):
define void @f(i32 %0) {
ret void
}
/* Variables and functions */
long double strtold(char const *, char **);
long double atold(const char *s) {
  static char **leftover;
  return strtold(s, leftover);
}


x86 assembly (clang, -O0):
<atold>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2f09(%rip),%rsi
call   1030 <strtold@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atold>:
xor    %esi,%esi
jmp    1030 <strtold@plt>

LLVM IR (-O0):
@atold.leftover = internal global i8** null
define x86_fp80 @atold(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8**, i8*** @atold.leftover
%5 = call x86_fp80 @strtold(i8* %3, i8** %4)
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @atold(i8* nocapture %0) {
%2 = tail call x86_fp80 @strtold(i8* nocapture %0, i8** null)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int arr[11] = {1, 1, 3, 4, 5, 999, 3, 5, 4, 6, 6};
  int num = arr[0];
  for (int i = 1; i < 11; i++) {
    num ^= arr[i];
  }
  printf("%d\n", num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xebf(%rip),%rsi
mov    $0x2c,%edx
call   1040 <memcpy@plt>
mov    -0x40(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x1,-0x48(%rbp)
cmpl   $0xb,-0x48(%rbp)
jge    117e <main+0x5e>
movslq -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%eax
xor    -0x44(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1158 <main+0x38>
mov    -0x44(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.arr = [11 x i32] [i32 1, i32 1, i32 3, i32 4, i32 5, i32 999, i32 3, i32 5, i32 4, i32 6, i32 6]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [11 x i32]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [11 x i32]* %6 to i8*
%10 = getelementptr inbounds [11 x i32], [11 x i32]* %6, i64 0, i64 0
%11 = load i32, i32* %10
store i32 %11, i32* %7
store i32 1, i32* %8
br label %12
12: ; preds = %22, %2
%13 = load i32, i32* %8
%14 = icmp slt i32 %13, 11
br i1 %14, label %15, label %25
15: ; preds = %12
%16 = load i32, i32* %8
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [11 x i32], [11 x i32]* %6, i64 0, i64 %17
%19 = load i32, i32* %18
%20 = load i32, i32* %7
%21 = xor i32 %20, %19
store i32 %21, i32* %7
br label %22
22: ; preds = %15
%23 = load i32, i32* %8
%24 = add nsw i32 %23, 1
store i32 %24, i32* %8
br label %12
25: ; preds = %12
%26 = load i32, i32* %7
%27 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %26)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 999)
ret i32 0
}
void gtk_tree_view_get_enable_search() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_get_enable_search() {
ret void
}
int test_isGreater(int x, int y) { return x > y; }


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

x86 assembly (clang, -O2):
<test_isGreater>:
xor    %eax,%eax
cmp    %esi,%edi
setg   %al
ret

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

LLVM IR (-O2):
define i32 @test_isGreater(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
yyColAtPos(pos) long pos;
{
  long c;
  c = pos % 1000L;
  return c;
}


x86 assembly (clang, -O0):
<yyColAtPos>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<yyColAtPos>:
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
mov    %rdi,%rax
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
shr    $0x7,%rdx
add    %eax,%edx
imul   $0x3e8,%edx,%eax
sub    %eax,%edi
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @yyColAtPos(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = srem i64 %4, 1000
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @yyColAtPos(i64 %0) {
%2 = srem i64 %0, 1000
%3 = trunc i64 %2 to i32
ret i32 %3
}
int compare_time_stamp_vals(const void *elem1, const void *elem2) {
  double val1 = *((double *)elem1);
  double val2 = *((double *)elem2);
  if (val1 > val2)
    return 1;
  if (val1 < val2)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<compare_time_stamp_vals>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1142 <compare_time_stamp_vals+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1169 <compare_time_stamp_vals+0x69>
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1162 <compare_time_stamp_vals+0x62>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <compare_time_stamp_vals+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_time_stamp_vals>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomisd %xmm1,%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare_time_stamp_vals(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
store double %10, double* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to double*
%13 = load double, double* %12
store double %13, double* %7
%14 = load double, double* %6
%15 = load double, double* %7
%16 = fcmp ogt double %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %3
br label %24
18: ; preds = %2
%19 = load double, double* %6
%20 = load double, double* %7
%21 = fcmp olt double %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 -1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @compare_time_stamp_vals(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp ogt double %4, %6
%8 = fcmp olt double %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x1f() {
  Assert_real((isodigit(31) == 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",
              160, ("isodigit should be 0 for 0x1f"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x1f>:
push   %rax
mov    $0x1f,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xa0,%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 = [30 x i8] c"isodigit should be 0 for 0x1f\00"
define void @t_isodigit_0x1f() {
%1 = call i64 @isodigit(i32 31)
%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 160, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x1f\00"
define void @t_isodigit_0x1f() {
%1 = tail call i64 @isodigit(i32 31)
%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 160, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}