xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sem_unlink(char *);
void deleteSem() { sem_unlink("/mymutex"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"/mymutex\00"
define void @deleteSem() {
%1 = call i32 @sem_unlink(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"/mymutex\00"
define void @deleteSem() {
%1 = tail call i32 @sem_unlink(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
float gamma_CCTF(float, double);
float AdobeRGB_OETF(float value) { return gamma_CCTF(value, 2.19921875); }


x86 assembly (clang, -O0):
<AdobeRGB_OETF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
call   1030 <gamma_CCTF@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AdobeRGB_OETF>:
movsd  0xee8(%rip),%xmm1
jmp    1030 <gamma_CCTF@plt>

LLVM IR (-O0):
define float @AdobeRGB_OETF(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @gamma_CCTF(float %3, double 0x4001980000000000)
ret float %4
}

LLVM IR (-O2):
define float @AdobeRGB_OETF(float %0) {
%2 = tail call float @gamma_CCTF(float %0, double 0x4001980000000000)
ret float %2
}
/* Type definitions */
struct array {
  int dummy;
};

/* Variables and functions */
int array_add(struct array *, void const *);
int stack_push(struct array *st, const void *data) {
  return array_add(st, data);
}


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

x86 assembly (clang, -O2):
<stack_push>:
jmp    1030 <array_add@plt>

LLVM IR (-O0):
%struct.array = type { i32 }
define i32 @stack_push(%struct.array* %0, i8* %1) {
%3 = alloca %struct.array*
%4 = alloca i8*
store %struct.array* %0, %struct.array** %3
store i8* %1, i8** %4
%5 = load %struct.array*, %struct.array** %3
%6 = load i8*, i8** %4
%7 = call i32 @array_add(%struct.array* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.array = type { i32 }
define i32 @stack_push(%struct.array* %0, i8* %1) {
%3 = tail call i32 @array_add(%struct.array* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ fio_atol(char **);
char *fio_cli_get(char const *);
int fio_cli_get_i(char const *name) {
  char const *val = fio_cli_get(name);
  if (!val)
    return 0;
  int i = (int)fio_atol((char **)&val);
  return i;
}


x86 assembly (clang, -O0):
<fio_cli_get_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <fio_cli_get@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1150 <fio_cli_get_i+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1162 <fio_cli_get_i+0x42>
lea    -0x18(%rbp),%rdi
call   1030 <fio_atol@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fio_cli_get_i>:
push   %rax
call   1040 <fio_cli_get@plt>
mov    %rax,(%rsp)
test   %rax,%rax
je     1139 <fio_cli_get_i+0x19>
mov    %rsp,%rdi
call   1030 <fio_atol@plt>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @fio_cli_get_i(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = tail call i8* @fio_cli_get(i8* %0)
store i8* %4, i8** %2
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = call i64 @fio_atol(i8** %2)
%8 = trunc i64 %7 to i32
br label %9
9: ; preds = %1, %6
%10 = phi i32 [ %8, %6 ], [ 0, %1 ]
ret i32 %10
}
int test_imm_D6uint32_reg(unsigned int val) {
  return ((val) & (0xD6 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D6uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xd6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_D6uint32_reg(i32 %0) {
%2 = and i32 %0, 214
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
unsigned long hash(unsigned long *, int, unsigned long);
int /*<<< orphan*/ memcpy(unsigned long *, int *, int);
unsigned long get_hash_subg(int *subg, int m) {
  int off = m % (sizeof(unsigned long) / sizeof(int));
  unsigned long hash0;
  memcpy(&hash0, subg, off * sizeof(int));
  return hash((unsigned long *)&subg[off],
              (int)(m * sizeof(int) / sizeof(unsigned long)), hash0);
}


x86 assembly (clang, -O0):
<get_hash_subg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
and    $0x1,%rax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
lea    -0x18(%rbp),%rdi
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rdi
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
shr    $0x3,%rax
mov    %eax,%esi
mov    -0x18(%rbp),%rdx
call   1030 <hash@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_hash_subg>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%ebx
and    $0x1,%ebx
mov    %ebx,%edx
shl    $0x2,%edx
lea    0x8(%rsp),%rdi
mov    %r14,%rsi
call   1040 <memcpy@plt>
lea    (%r14,%rbx,4),%rdi
sar    %ebp
mov    0x8(%rsp),%rdx
mov    %ebp,%esi
call   1030 <hash@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i64 @get_hash_subg(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = urem i64 %8, 2
%10 = trunc i64 %9 to i32
store i32 %10, i32* %5
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = mul i64 %13, 4
%15 = trunc i64 %14 to i32
%16 = call i32 @memcpy(i64* %6, i32* %11, i32 %15)
%17 = load i32*, i32** %3
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = bitcast i32* %20 to i64*
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = mul i64 %23, 4
%25 = udiv i64 %24, 8
%26 = trunc i64 %25 to i32
%27 = load i64, i64* %6
%28 = call i64 @hash(i64* %21, i32 %26, i64 %27)
ret i64 %28
}

LLVM IR (-O2):
define i64 @get_hash_subg(i32* %0, i32 %1) {
%3 = alloca i64
%4 = and i32 %1, 1
%5 = bitcast i64* %3 to i8*
%6 = zext i32 %4 to i64
%7 = shl nuw nsw i32 %4, 2
%8 = call i32 @memcpy(i64* %3, i32* %0, i32 %7)
%9 = getelementptr inbounds i32, i32* %0, i64 %6
%10 = bitcast i32* %9 to i64*
%11 = ashr i32 %1, 1
%12 = load i64, i64* %3
%13 = call i64 @hash(i64* %10, i32 %11, i64 %12)
ret i64 %13
}
/* Type definitions */
typedef int u_int32_t;

/* Variables and functions */
u_int32_t H(u_int32_t b, u_int32_t c, u_int32_t d) {
  return (b & c) | (b & d) | (c & d);
}


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

x86 assembly (clang, -O2):
<H>:
mov    %edx,%eax
or     %esi,%eax
and    %edi,%eax
and    %esi,%edx
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @H(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = and i32 %7, %8
%10 = load i32, i32* %4
%11 = load i32, i32* %6
%12 = and i32 %10, %11
%13 = or i32 %9, %12
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = and i32 %14, %15
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @H(i32 %0, i32 %1, i32 %2) {
%4 = or i32 %2, %1
%5 = and i32 %4, %0
%6 = and i32 %2, %1
%7 = or i32 %5, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t test_tagged_nonint_bitmask1(uint16_t val) { return val; }


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

x86 assembly (clang, -O2):
<test_tagged_nonint_bitmask1>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @test_tagged_nonint_bitmask1(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
double cosd(double);
double sind(double);
double tand(double rad) { return sind(rad) / cosd(rad); }


x86 assembly (clang, -O0):
<tand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sind@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <cosd@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tand>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <sind@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <cosd@plt>
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @tand(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sind(double %3)
%5 = load double, double* %2
%6 = call double @cosd(double %5)
%7 = fdiv double %4, %6
ret double %7
}

LLVM IR (-O2):
define double @tand(double %0) {
%2 = tail call double @sind(double %0)
%3 = tail call double @cosd(double %0)
%4 = fdiv double %2, %3
ret double %4
}
int initializeBoardString(char boardStr[65]) {
  int i;
  for (i = 0; i < 65; i++) {
    boardStr[i] = '0';
  }
  boardStr[64] = 0;
  return 1;
}


x86 assembly (clang, -O0):
<initializeBoardString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x41,-0xc(%rbp)
jge    1133 <initializeBoardString+0x33>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x30,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <initializeBoardString+0xf>
mov    -0x8(%rbp),%rax
movb   $0x0,0x40(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<initializeBoardString>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
movb   $0x0,0x40(%rdi)
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @initializeBoardString(i8* nocapture writeonly %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 64
store i8 0, i8* %2
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void Print(int *array, int len) {
  int i;
  for (i = 0; i < len; i++) {
    printf("%d ", array[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<Print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <Print+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <Print+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Print>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <Print+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <Print+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @Print(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AbsoluteIndexedXX0(int);
int /*<<< orphan*/ ROL8(int /*<<< orphan*/);
void Op3EM1X0(void) { ROL8(AbsoluteIndexedXX0(3)); }


x86 assembly (clang, -O0):
<Op3EM1X0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <AbsoluteIndexedXX0@plt>
mov    %eax,%edi
call   1040 <ROL8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op3EM1X0>:
push   %rax
mov    $0x3,%edi
call   1030 <AbsoluteIndexedXX0@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <ROL8@plt>

LLVM IR (-O0):
define void @Op3EM1X0() {
%1 = call i32 @AbsoluteIndexedXX0(i32 3)
%2 = call i32 @ROL8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op3EM1X0() {
%1 = tail call i32 @AbsoluteIndexedXX0(i32 3)
%2 = tail call i32 @ROL8(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwrite(void const *, int, size_t, int /*<<< orphan*/ *);
int writef(FILE *f, const void *buf, size_t n) {
  return fwrite(buf, 1, n, f) != 1;
}


x86 assembly (clang, -O0):
<writef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fwrite@plt>
cmp    $0x1,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writef>:
push   %rax
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
call   1030 <fwrite@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @writef(i32* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @fwrite(i8* %1, i32 1, i64 %2, i32* %0)
%5 = icmp ne i32 %4, 1
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int _mm_extract_epi16(int /*<<< orphan*/, int);
int __mm_extract_epi16(__m128i A, int const I) {
  return _mm_extract_epi16(A, 1);
}


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

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

LLVM IR (-O0):
define i32 @__mm_extract_epi16(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 @_mm_extract_epi16(i32 %5, i32 1)
ret i32 %6
}

LLVM IR (-O2):
define i32 @__mm_extract_epi16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_extract_epi16(i32 %0, i32 1)
ret i32 %3
}
int test_imm_37uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x37 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_37uint64_midword_mem>:
testb  $0x37,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_37uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 3604480
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
FILE *popen(const char *Command, const char *Mode) {
  errno = ENOSYS;
  return 0;
}


x86 assembly (clang, -O0):
<popen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<popen>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32* @popen(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32* null
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define noalias i32* @popen(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32* null
}
float decodeFloat(char *input) {
  unsigned int f = 0;
  for (int i = 3; i >= 0; i--) {
    f |= ((*(unsigned char *)input) << 8 * i) & (255 << 8 * i);
    input++;
  }
  return *((float *)&f);
}


x86 assembly (clang, -O0):
<decodeFloat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1160 <decodeFloat+0x60>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%ecx
shl    $0x3,%ecx
shl    %cl,%eax
mov    -0x10(%rbp),%ecx
shl    $0x3,%ecx
mov    $0xff,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <decodeFloat+0x16>
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<decodeFloat>:
mov    (%rdi),%eax
bswap  %eax
movd   %eax,%xmm0
ret

LLVM IR (-O0):
define float @decodeFloat(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 3, i32* %4
br label %5
5: ; preds = %23, %1
%6 = load i32, i32* %4
%7 = icmp sge i32 %6, 0
br i1 %7, label %8, label %26
8: ; preds = %5
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i32, i32* %4
%13 = mul nsw i32 8, %12
%14 = shl i32 %11, %13
%15 = load i32, i32* %4
%16 = mul nsw i32 8, %15
%17 = shl i32 255, %16
%18 = and i32 %14, %17
%19 = load i32, i32* %3
%20 = or i32 %19, %18
store i32 %20, i32* %3
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %2
br label %23
23: ; preds = %8
%24 = load i32, i32* %4
%25 = add nsw i32 %24, -1
store i32 %25, i32* %4
br label %5
26: ; preds = %5
%27 = bitcast i32* %3 to float*
%28 = load float, float* %27
ret float %28
}

LLVM IR (-O2):
define float @decodeFloat(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 8
%14 = or i32 %13, %9
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = or i32 %14, %17
%19 = bitcast i32 %18 to float
ret float %19
}
struct s3c24x0_i2c *s3c24x0_get_base_i2c(void) {
  return (struct s3c24x0_i2c *)0x15400000;
}


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

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

LLVM IR (-O0):
%struct.s3c24x0_i2c = type opaque
define %struct.s3c24x0_i2c* @s3c24x0_get_base_i2c() {
ret %struct.s3c24x0_i2c* inttoptr (i64 356515840 to %struct.s3c24x0_i2c*)
}

LLVM IR (-O2):
%struct.s3c24x0_i2c = type opaque
define %struct.s3c24x0_i2c* @s3c24x0_get_base_i2c() {
ret %struct.s3c24x0_i2c* inttoptr (i64 356515840 to %struct.s3c24x0_i2c*)
}
/* Variables and functions */
int /*<<< orphan*/ lt_fatal(char *);
scalar_t__ malloc(size_t);
void *xmalloc(size_t num) {
  void *p = (void *)malloc(num);
  if (!p)
    lt_fatal("Memory exhausted");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
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    1150 <xmalloc+0x30>
lea    0xeb5(%rip),%rdi
call   1030 <lt_fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <xmalloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <lt_fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @lt_fatal(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [17 x i8] c"Memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @lt_fatal(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = inttoptr i64 %2 to i8*
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ print_error_msg(char *);
void print_many_br() { print_error_msg("too many closing brackets!"); }


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"too many closing brackets!\00"
define void @print_many_br() {
%1 = call i32 @print_error_msg(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"too many closing brackets!\00"
define void @print_many_br() {
%1 = tail call i32 @print_error_msg(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FATAL(char *, int);
void fpecatch(int n) { FATAL("floating point exception %d", n); }


x86 assembly (clang, -O0):
<fpecatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <FATAL@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fpecatch>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <FATAL@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"floating point exception %d\00"
define void @fpecatch(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @FATAL(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"floating point exception %d\00"
define void @fpecatch(i32 %0) {
%2 = tail call i32 @FATAL(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_screen_size();
void sigwinch_handler(int a) { get_screen_size(); }


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

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

LLVM IR (-O0):
define void @sigwinch_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @get_screen_size()
ret void
}

LLVM IR (-O2):
define void @sigwinch_handler(i32 %0) {
%2 = tail call i32 (...) @get_screen_size()
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ cmd;
};
typedef TYPE_1__ osd_cmd_t;

/* Variables and functions */
int /*<<< orphan*/ OSD_Clear;
int /*<<< orphan*/ OSD_SEND_CMD;
int ioctl(int, int /*<<< orphan*/, TYPE_1__ *);
int OSDClear(int dev) {
  osd_cmd_t dc;
  dc.cmd = OSD_Clear;
  return ioctl(dev, OSD_SEND_CMD, &dc);
}


x86 assembly (clang, -O0):
<OSDClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebf(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSDClear>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsp)
mov    0x2ecc(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <ioctl@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
@OSD_Clear = global i32 0
@OSD_SEND_CMD = global i32 0
define i32 @OSDClear(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.TYPE_3__
store i32 %0, i32* %2
%4 = load i32, i32* @OSD_Clear
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
store i32 %4, i32* %5
%6 = load i32, i32* %2
%7 = load i32, i32* @OSD_SEND_CMD
%8 = call i32 @ioctl(i32 %6, i32 %7, %struct.TYPE_3__* %3)
ret i32 %8
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
@OSD_Clear = global i32 0
@OSD_SEND_CMD = global i32 0
define i32 @OSDClear(i32 %0) {
%2 = alloca %struct.TYPE_3__
%3 = bitcast %struct.TYPE_3__* %2 to i8*
%4 = load i32, i32* @OSD_Clear
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %2, i64 0, i32 0
store i32 %4, i32* %5
%6 = load i32, i32* @OSD_SEND_CMD
%7 = call i32 @ioctl(i32 %0, i32 %6, %struct.TYPE_3__* %2)
ret i32 %7
}
/* Type definitions */
struct bloom_filter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct bloom_filter *);
void bloom_destroy(struct bloom_filter *b) { free(b); }


x86 assembly (clang, -O0):
<bloom_destroy>:
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):
<bloom_destroy>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.bloom_filter = type { i32 }
define void @bloom_destroy(%struct.bloom_filter* %0) {
%2 = alloca %struct.bloom_filter*
store %struct.bloom_filter* %0, %struct.bloom_filter** %2
%3 = load %struct.bloom_filter*, %struct.bloom_filter** %2
%4 = call i32 @free(%struct.bloom_filter* %3)
ret void
}

LLVM IR (-O2):
%struct.bloom_filter = type { i32 }
define void @bloom_destroy(%struct.bloom_filter* nocapture %0) {
%2 = tail call i32 @free(%struct.bloom_filter* %0)
ret void
}
/* Variables and functions */
scalar_t__ strcasecmp(char const *, char const *);
int acase_ne(const char *pat, const char *text) {
  return (strcasecmp(text, pat) != 0);
}


x86 assembly (clang, -O0):
<acase_ne>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acase_ne>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <strcasecmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @acase_ne(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strcasecmp(i8* %1, i8* %0)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void mmuExit(void) {}


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

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

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

LLVM IR (-O2):
define void @mmuExit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ islower(int);
void t_islower_0x71() {
  Assert_real((islower(113)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              570, ("islower should be 1 for q"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x71>:
push   %rax
mov    $0x71,%edi
call   1030 <islower@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x23a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for q\00"
define void @t_islower_0x71() {
%1 = call i32 @islower(i32 113)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 570, 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for q\00"
define void @t_islower_0x71() {
%1 = tail call i32 @islower(i32 113)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 570, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int word_size();
long long int mask_value(const long long int v) {
  const unsigned int ws = word_size();
  long long int mask;
  if (64 == 64 && ws == 64)
    return v;
  mask = (1LL << ws) - 1;
  return v & mask;
}


x86 assembly (clang, -O0):
<mask_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <word_size@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x40,-0x14(%rbp)
jne    113d <mask_value+0x2d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115e <mask_value+0x4e>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
sub    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
and    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mask_value>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <word_size@plt>
mov    $0xffffffffffffffff,%rsi
mov    $0xffffffffffffffff,%rdx
mov    %eax,%ecx
shl    %cl,%rdx
cmp    $0x40,%eax
not    %rdx
cmove  %rsi,%rdx
and    %rbx,%rdx
mov    %rdx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @mask_value(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i32
%5 = alloca i64
store i64 %0, i64* %3
%6 = call i32 (...) @word_size()
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 64
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i64, i64* %3
store i64 %10, i64* %2
br label %19
11: ; preds = %1
%12 = load i32, i32* %4
%13 = zext i32 %12 to i64
%14 = shl i64 1, %13
%15 = sub nsw i64 %14, 1
store i64 %15, i64* %5
%16 = load i64, i64* %3
%17 = load i64, i64* %5
%18 = and i64 %16, %17
store i64 %18, i64* %2
br label %19
19: ; preds = %11, %9
%20 = load i64, i64* %2
ret i64 %20
}

LLVM IR (-O2):
define i64 @mask_value(i64 %0) {
%2 = tail call i32 (...) @word_size()
%3 = icmp eq i32 %2, 64
%4 = zext i32 %2 to i64
%5 = shl nsw i64 -1, %4
%6 = xor i64 %5, -1
%7 = select i1 %3, i64 -1, i64 %6
%8 = and i64 %7, %0
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           unsigned int, char const *, char const *);
int /*<<< orphan*/ stderr;
void __assert_fail(const char *assertion, const char *file, unsigned int line,
                   const char *function) {
  fprintf(stderr, "%s:%i: %s: Assertion %s failed.", file, line, function,
          assertion);
  abort();
}


x86 assembly (clang, -O0):
<__assert_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x8(%rbp),%r9
lea    0xeaa(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<__assert_fail>:
push   %rax
mov    %rcx,%r8
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%r9
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"%s:%i: %s: Assertion %s failed.\00"
define void @__assert_fail(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = load i8*, i8** %5
%14 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %10, i32 %11, i8* %12, i8* %13)
%15 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"%s:%i: %s: Assertion %s failed.\00"
define void @__assert_fail(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2, i8* %3, i8* %0)
%7 = tail call i32 (...) @abort()
unreachable
}
I0AX1(r0, r1, x0, x1, p0, p1) unsigned char r0, r1;
unsigned char *p0, *p1;
{
  if (22 <= (((unsigned char *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<I0AX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movslq -0x10(%rbp),%rcx
mov    $0xa98ac7,%eax
movzbl (%rax,%rcx,1),%ecx
mov    $0x16,%eax
cmp    %ecx,%eax
jg     1144 <I0AX1+0x44>
movl   $0x1,-0x4(%rbp)
jmp    114b <I0AX1+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I0AX1>:
movslq %ecx,%rcx
xor    %eax,%eax
cmpb   $0x16,0xa98ac7(%rcx)
setae  %al
ret

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

LLVM IR (-O2):
define i32 @I0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture readnone %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i8, i8* inttoptr (i64 11111111 to i8*), i64 %7
%9 = load i8, i8* %8
%10 = icmp ugt i8 %9, 21
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ and_n();
void opcode_e6() { and_n(); }


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

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

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

LLVM IR (-O2):
define void @opcode_e6() {
%1 = tail call i32 (...) @and_n()
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ clip_mask;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
unsigned long get_XGCValues_clip_mask(void *_p) {
  return (unsigned long)((XGCValues *)_p)->clip_mask;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XGCValues_clip_mask(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XGCValues_clip_mask(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
void bzero(void *dest, int length) {
  char *d = dest;
  while (length--)
    *d++ = 0;
}


x86 assembly (clang, -O0):
<bzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     113e <bzero+0x3e>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x0,(%rax)
jmp    1113 <bzero+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bzero>:
test   %esi,%esi
je     1122 <bzero+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @bzero(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
scalar_t__ waitpid(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
void signal_handler_child(int p) {
  while (waitpid(-1, NULL, WNOHANG) > 0)
    ;
}


x86 assembly (clang, -O0):
<signal_handler_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <waitpid@plt>
cmp    $0x0,%rax
jle    1141 <signal_handler_child+0x31>
jmp    111b <signal_handler_child+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_handler_child>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <waitpid@plt>
test   %rax,%rax
jg     1120 <signal_handler_child+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
define void @signal_handler_child(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* @WNOHANG
%5 = call i64 @waitpid(i32 -1, i32* null, i32 %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @signal_handler_child(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = load i32, i32* @WNOHANG
%4 = tail call i64 @waitpid(i32 -1, i32* null, i32 %3)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _IO(float, int);
int ioctl(int, int /*<<< orphan*/);
int fpui_refresh(int fd) { return (ioctl(fd, _IO('f', 8))); }


x86 assembly (clang, -O0):
<fpui_refresh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movss  0xec7(%rip),%xmm0
mov    $0x8,%edi
call   1030 <_IO@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fpui_refresh>:
push   %rbx
mov    %edi,%ebx
movss  0xed5(%rip),%xmm0
mov    $0x8,%edi
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @fpui_refresh(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_IO(float 1.020000e+02, i32 8)
%5 = call i32 @ioctl(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @fpui_refresh(i32 %0) {
%2 = tail call i32 @_IO(float 1.020000e+02, i32 8)
%3 = tail call i32 @ioctl(i32 %0, i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
__attribute__((always_)) extern void
Uart0_SetFormat(uint8_t bpc, uint8_t parity, uint8_t stopbits) {}


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

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

LLVM IR (-O0):
define void @Uart0_SetFormat(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @Uart0_SetFormat(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Type definitions */
typedef scalar_t__ u_int8_t;

/* Variables and functions */
u_int8_t log8(size_t x) {
  u_int8_t i;
  for (i = 0; x != 0; i++) {
    x >>= 8;
  }
  return i;
}


x86 assembly (clang, -O0):
<log8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <log8+0x38>
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <log8+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<log8>:
xor    %eax,%eax
test   %rdi,%rdi
je     1124 <log8+0x24>
mov    %rdi,%rcx
nopw   0x0(%rax,%rax,1)
shr    $0x8,%rcx
add    $0x1,%rax
cmp    $0xff,%rdi
mov    %rcx,%rdi
ja     1110 <log8+0x10>
ret

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

LLVM IR (-O2):
define i64 @log8(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %7, %3 ], [ 0, %1 ]
%5 = phi i64 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i64 %5, 8
%7 = add nuw nsw i64 %4, 1
%8 = icmp ult i64 %5, 256
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i64 [ 0, %1 ], [ %7, %3 ]
ret i64 %10
}
/* Variables and functions */
int RTFToToken(int, int, int, int /*<<< orphan*/);
int RTFSkipToToken(int class, int major, int minor) {
  return RTFToToken(class, major, minor, 0);
}


x86 assembly (clang, -O0):
<RTFSkipToToken>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
xor    %ecx,%ecx
call   1030 <RTFToToken@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTFSkipToToken>:
xor    %ecx,%ecx
jmp    1030 <RTFToToken@plt>

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

LLVM IR (-O2):
define i32 @RTFSkipToToken(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @RTFToToken(i32 %0, i32 %1, i32 %2, i32 0)
ret i32 %4
}