xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/, char const *,
                            int /*<<< orphan*/);
void vWarning(const char *fmt, va_list args) {
  fprintf(stderr, "CHYBA: ");
  vfprintf(stderr, fmt, args);
}


x86 assembly (clang, -O0):
<vWarning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <vfprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vWarning>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2eb0(%rip),%r14
mov    (%r14),%edi
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
mov    %ebp,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <vfprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"CHYBA: \00"
define void @vWarning(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @vfprintf(i32 %7, i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"CHYBA: \00"
define void @vWarning(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @vfprintf(i32 %5, i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void nrerror(char *errstr) {
  fprintf(stderr, "NRERROR: %s\n", errstr);
  exit(0);
}


x86 assembly (clang, -O0):
<nrerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<nrerror>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [13 x i8] c"NRERROR: %s\0A\00"
define void @nrerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [13 x i8] c"NRERROR: %s\0A\00"
define void @nrerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *);
int open_error(const char *filename, const char *mode) {
  printf("Failure opening %s for %s\n", filename, mode);
  return 1;
}


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

x86 assembly (clang, -O2):
<open_error>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [27 x i8] c"Failure opening %s for %s\0A\00"
define i32 @open_error(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret i32 1
}
int random_postconf(void *arg) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @random_postconf(i8* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ cpu_irq_disable();
void sched_lock(void) { cpu_irq_disable(); }


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

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

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

LLVM IR (-O2):
define void @sched_lock() {
%1 = tail call i32 (...) @cpu_irq_disable()
ret void
}
/* Variables and functions */
unsigned long cris_swapwbrlz(unsigned long);
extern unsigned long kernel_ffs(unsigned long w) {
  return w ? cris_swapwbrlz(w) + 1 : 0;
}


x86 assembly (clang, -O0):
<kernel_ffs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113d <kernel_ffs+0x2d>
mov    -0x8(%rbp),%rdi
call   1030 <cris_swapwbrlz@plt>
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1148 <kernel_ffs+0x38>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    1148 <kernel_ffs+0x38>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_ffs>:
test   %rdi,%rdi
je     1124 <kernel_ffs+0x14>
push   %rax
call   1030 <cris_swapwbrlz@plt>
add    $0x1,%rax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @kernel_ffs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = call i64 @cris_swapwbrlz(i64 %6)
%8 = add i64 %7, 1
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %5
%11 = phi i64 [ %8, %5 ], [ 0, %9 ]
ret i64 %11
}

LLVM IR (-O2):
define i64 @kernel_ffs(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i64 @cris_swapwbrlz(i64 %0)
%5 = add i64 %4, 1
br label %6
6: ; preds = %1, %3
%7 = phi i64 [ %5, %3 ], [ 0, %1 ]
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int __VERIFIER_nondet_int();
int main() {
  int x = __VERIFIER_nondet_int();
  if (x > 0 && x < 2)
    __VERIFIER_assert(x == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    115e <main+0x3e>
cmpl   $0x2,-0x8(%rbp)
jge    115e <main+0x3e>
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x1,%eax
jne    1137 <main+0x17>
mov    $0x1,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 1
%12 = zext i1 %11 to i32
%13 = call i32 @__VERIFIER_assert(i32 %12)
br label %14
14: ; preds = %9, %6, %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @__VERIFIER_assert(i32 1)
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void I2CMasterIntClear(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(0x40002000 + 0x0000081C))) = 0x00000001;
}


x86 assembly (clang, -O0):
<I2CMasterIntClear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x4000281c,%eax
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CMasterIntClear>:
movq   $0x1,0x4000281c
ret

LLVM IR (-O0):
define void @I2CMasterIntClear(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
store volatile i64 1, i64* inttoptr (i64 1073752092 to i64*)
ret void
}

LLVM IR (-O2):
define void @I2CMasterIntClear(i32 %0) {
store volatile i64 1, i64* inttoptr (i64 1073752092 to i64*)
ret void
}
void UARTFlowCtrlTrigLvlConfig(unsigned int baseAdd, unsigned int rtsHaltFlag,
                               unsigned int rtsStartFlag) {
  unsigned tcrValue = 0;
  tcrValue = rtsHaltFlag & (0x0000000Fu);
  tcrValue |= (rtsStartFlag << (0x00000004u)) & (0x000000F0u);
  (*((volatile unsigned int *)(baseAdd + (0x18)))) = tcrValue;
}


x86 assembly (clang, -O0):
<UARTFlowCtrlTrigLvlConfig>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x4,%eax
and    $0xf0,%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x18,%eax
mov    %eax,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTFlowCtrlTrigLvlConfig>:
and    $0xf,%esi
shl    $0x4,%edx
movzbl %dl,%eax
or     %esi,%eax
add    $0x18,%edi
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @UARTFlowCtrlTrigLvlConfig(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, 15
%5 = shl i32 %2, 4
%6 = and i32 %5, 240
%7 = or i32 %6, %4
%8 = add i32 %0, 24
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
store volatile i32 %7, i32* %10
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
void sprint_mov_data(char *str, uint8_t data) {
  sprintf(str,
          "MOV   A, #"
          "0x%02X"
          "                  ",
          data);
}


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

x86 assembly (clang, -O2):
<sprint_mov_data>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"MOV A,x%02X \00"
define void @sprint_mov_data(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 = load i32, i32* %4
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"MOV A,x%02X \00"
define void @sprint_mov_data(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
int logicalShift(int x, int n) {
  int num = ~((1 << 31) >> n << 1);
  return num & (x >> n);
}


x86 assembly (clang, -O0):
<logicalShift>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x80000000,%eax
sar    %cl,%eax
shl    $0x1,%eax
xor    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<logicalShift>:
mov    %esi,%ecx
mov    $0x80000000,%eax
sar    %cl,%eax
add    %eax,%eax
not    %eax
sar    %cl,%edi
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @logicalShift(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = ashr i32 -2147483648, %6
%8 = shl i32 %7, 1
%9 = xor i32 %8, -1
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = ashr i32 %11, %12
%14 = and i32 %10, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @logicalShift(i32 %0, i32 %1) {
%3 = ashr i32 -2147483648, %1
%4 = shl i32 %3, 1
%5 = xor i32 %4, -1
%6 = ashr i32 %0, %1
%7 = and i32 %6, %5
ret i32 %7
}
char *GCMRegionCodeToStr(char code) {
  switch (code) {
  case 'E':
    return "USA/NTSC";
  case 'P':
    return "Europe/PAL";
  case 'J':
    return "Japan/NTSC";
  default:
    return "Other";
  }
}


x86 assembly (clang, -O0):
<GCMRegionCodeToStr>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x45,%eax
je     1141 <GCMRegionCodeToStr+0x41>
jmp    111f <GCMRegionCodeToStr+0x1f>
mov    -0x10(%rbp),%eax
sub    $0x4a,%eax
je     1161 <GCMRegionCodeToStr+0x61>
jmp    1130 <GCMRegionCodeToStr+0x30>
mov    -0x10(%rbp),%eax
sub    $0x50,%eax
je     1151 <GCMRegionCodeToStr+0x51>
jmp    1171 <GCMRegionCodeToStr+0x71>
lea    0xeb8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117c <GCMRegionCodeToStr+0x7c>
lea    0xeb1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117c <GCMRegionCodeToStr+0x7c>
lea    0xeac(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117c <GCMRegionCodeToStr+0x7c>
lea    0xea7(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GCMRegionCodeToStr>:
cmp    $0x45,%edi
je     1117 <GCMRegionCodeToStr+0x17>
cmp    $0x4a,%edi
je     111f <GCMRegionCodeToStr+0x1f>
cmp    $0x50,%edi
jne    1127 <GCMRegionCodeToStr+0x27>
lea    0xef3(%rip),%rax
ret
lea    0xee2(%rip),%rax
ret
lea    0xeee(%rip),%rax
ret
lea    0xef1(%rip),%rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"USA/NTSC\00"
@.str.1 = [11 x i8] c"Europe/PAL\00"
@.str.2 = [11 x i8] c"Japan/NTSC\00"
@.str.3 = [6 x i8] c"Other\00"
define i8* @GCMRegionCodeToStr(i8 signext %0) {
%2 = alloca i8*
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %9 [
i32 69, label %6
i32 80, label %7
i32 74, label %8
]
6: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
7: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
8: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %10
9: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %10
10: ; preds = %9, %8, %7, %6
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [9 x i8] c"USA/NTSC\00"
@.str.1 = [11 x i8] c"Europe/PAL\00"
@.str.2 = [11 x i8] c"Japan/NTSC\00"
@.str.3 = [6 x i8] c"Other\00"
define i8* @GCMRegionCodeToStr(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %5 [
i32 69, label %6
i32 80, label %3
i32 74, label %4
]
3: ; preds = %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %4, %3
%7 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), %5 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, size_t);
void *realloc(void *, size_t);
void *CTA_Realloc(void *ptr, size_t size) {
  void *ptrOut = realloc(ptr, size);
  if (!ptrOut) {
    printf("CTA_Malloc: Warning: malloc returns NULL. (size=%zd)\n", size);
  }
  return ptrOut;
}


x86 assembly (clang, -O0):
<CTA_Realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115c <CTA_Realloc+0x3c>
mov    -0x10(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CTA_Realloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <CTA_Realloc+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [54 x i8] c"CTA_Malloc: Warning: malloc returns NULL. (size=%zd)\0A\00"
define i8* @CTA_Realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = load i64, i64* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i64 %12)
br label %14
14: ; preds = %11, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [54 x i8] c"CTA_Malloc: Warning: malloc returns NULL. (size=%zd)\0A\00"
define noalias i8* @CTA_Realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ FIONREAD;
scalar_t__ ioctl(int, int /*<<< orphan*/, char *);
int zpeek(int fd) {
  int count;
  return (ioctl(fd, FIONREAD, (char *)&count) < 0 ? -1 : count);
}


x86 assembly (clang, -O0):
<zpeek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
jge    1147 <zpeek+0x37>
mov    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    114d <zpeek+0x3d>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zpeek>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
js     1135 <zpeek+0x25>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@FIONREAD = global i32 0
define i32 @zpeek(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @FIONREAD
%5 = call i64 @ioctl(i32 %0, i32 %4, i8* %3)
%6 = icmp slt i64 %5, 0
%7 = load i32, i32* %2
%8 = select i1 %6, i32 -1, i32 %7
ret i32 %8
}
int GetBlue(unsigned int rgb) { return (int)(rgb & 0xff); }


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

x86 assembly (clang, -O2):
<GetBlue>:
movzbl %dil,%eax
ret

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

LLVM IR (-O2):
define i32 @GetBlue(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
void BN_bin2bn(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_bin2bn() {
ret void
}
void wakeup(int signo) {}


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

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

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

LLVM IR (-O2):
define void @wakeup(i32 %0) {
ret void
}
/* Variables and functions */
int INT_MIN;
int /*<<< orphan*/ puts(char *);
void doit() {
  int x;
  if (x < INT_MIN)
    puts("x < INT_MIN");
}


x86 assembly (clang, -O0):
<doit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x4(%rbp),%eax
mov    0x2ec6(%rip),%rcx
cmp    (%rcx),%eax
jge    1136 <doit+0x26>
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@INT_MIN = global i32 0
@.str = [12 x i8] c"x < INT_MIN\00"
define void @doit() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = load i32, i32* @INT_MIN
%4 = icmp slt i32 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@INT_MIN = global i32 0
define void @doit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LOCK_UN;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ flock(int, int /*<<< orphan*/);
void unlock(int fd) {
  flock(fd, LOCK_UN);
  close(fd);
}


x86 assembly (clang, -O0):
<unlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
call   1040 <flock@plt>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlock>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
call   1040 <flock@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close@plt>

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

LLVM IR (-O2):
@LOCK_UN = global i32 0
define void @unlock(i32 %0) {
%2 = load i32, i32* @LOCK_UN
%3 = tail call i32 @flock(i32 %0, i32 %2)
%4 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sendCallback(char *, long, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, long);
int messageHandler(char *caller, char *message_name, long msg_id,
                   char *arguments) {
  char msg[4028];
  sprintf(msg, "message: %s %lu \n", arguments, msg_id);
  sendCallback(caller, msg_id, msg);
  return 1;
}


x86 assembly (clang, -O0):
<messageHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0xfe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0xfe0(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xeaf(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0xfe0(%rbp),%rdx
call   1030 <sendCallback@plt>
mov    $0x1,%eax
add    $0xfe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<messageHandler>:
push   %r15
push   %r14
push   %rbx
sub    $0xfc0,%rsp
mov    %rdx,%rbx
mov    %rdi,%r14
lea    0xec7(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rcx,%rdx
mov    %rbx,%rcx
call   1040 <sprintf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1030 <sendCallback@plt>
mov    $0x1,%eax
add    $0xfc0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [18 x i8] c"message: %s %lu \0A\00"
define i32 @messageHandler(i8* %0, i8* %1, i64 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
%9 = alloca [4028 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [4028 x i8], [4028 x i8]* %9, i64 0, i64 0
%11 = load i8*, i8** %8
%12 = load i64, i64* %7
%13 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %11, i64 %12)
%14 = load i8*, i8** %5
%15 = load i64, i64* %7
%16 = getelementptr inbounds [4028 x i8], [4028 x i8]* %9, i64 0, i64 0
%17 = call i32 @sendCallback(i8* %14, i64 %15, i8* %16)
ret i32 1
}

LLVM IR (-O2):
@.str = [18 x i8] c"message: %s %lu \0A\00"
define i32 @messageHandler(i8* %0, i8* nocapture readnone %1, i64 %2, i8* %3) {
%5 = alloca [4028 x i8]
%6 = getelementptr inbounds [4028 x i8], [4028 x i8]* %5, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3, i64 %2)
%8 = call i32 @sendCallback(i8* %0, i64 %2, i8* %6)
ret i32 1
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=aml-meson-m400-2 USING_OS_MEMORY=1 API_VERSION=17 "
         "REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Thu "
         "Feb 28 21:45:19 COT 2013 BUILD=DEBUG CPU= USING_UMP=1 "
         "USING_MALI200=0 USING_MALI400=4 USING_MALI400_L2_CACHE=1 USING_GP2=0 "
         "KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c "
         "platform/meson_platform/mali_fix.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 "
         "USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=";
}


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

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

LLVM IR (-O0):
@.str = [462 x i8] c"malidrv: CONFIG=aml-meson-m400-2 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Thu Feb 28 21:45:19 COT 2013 BUILD=DEBUG CPU= USING_UMP=1 USING_MALI200=0 USING_MALI400=4 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c platform/meson_platform/mali_fix.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([462 x i8], [462 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [462 x i8] c"malidrv: CONFIG=aml-meson-m400-2 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Thu Feb 28 21:45:19 COT 2013 BUILD=DEBUG CPU= USING_UMP=1 USING_MALI200=0 USING_MALI400=4 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c platform/meson_platform/mali_fix.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([462 x i8], [462 x i8]* @.str, i64 0, i64 0)
}
int qsort_cmp__double(const void *x, const void *y) {
  if (*((double *)x) > *((double *)y))
    return (-1);
  else
    return (*((double *)x) < *((double *)y));
}


x86 assembly (clang, -O0):
<qsort_cmp__double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    112e <qsort_cmp__double+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    114d <qsort_cmp__double+0x4d>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @qsort_cmp__double(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 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
char *calloc(int, int);
char *copy_string(char *, char *);
char *postpend_char(char *s, char a) {
  char *ret = calloc(4096, sizeof(char));
  char *hold = copy_string(ret, s);
  hold[0] = a;
  return ret;
}


x86 assembly (clang, -O0):
<postpend_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    $0x1000,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <copy_string@plt>
mov    %rax,-0x20(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<postpend_char>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
mov    $0x1000,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,%rbp
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <copy_string@plt>
mov    %r14b,(%rax)
mov    %rbp,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @postpend_char(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8 %1, i8* %4
%7 = call i8* @calloc(i32 4096, i32 1)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = load i8*, i8** %3
%10 = call i8* @copy_string(i8* %8, i8* %9)
store i8* %10, i8** %6
%11 = load i8, i8* %4
%12 = load i8*, i8** %6
%13 = getelementptr inbounds i8, i8* %12, i64 0
store i8 %11, i8* %13
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define i8* @postpend_char(i8* %0, i8 signext %1) {
%3 = tail call dereferenceable_or_null(4096) i8* @calloc(i32 4096, i32 1)
%4 = tail call i8* @copy_string(i8* %3, i8* %0)
store i8 %1, i8* %4
ret i8* %3
}
void addReplyErrorFormat(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               25, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<addReplyErrorFormat>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x19,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<addReplyErrorFormat>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x19,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.addReplyErrorFormat = [20 x i8] c"addReplyErrorFormat\00"
define void @addReplyErrorFormat() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 25, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.addReplyErrorFormat, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.addReplyErrorFormat = [20 x i8] c"addReplyErrorFormat\00"
define void @addReplyErrorFormat() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 25, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.addReplyErrorFormat, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *filename) {
  fprintf(stderr, "Usage: %s [-a, add] [-r read] [-i init/reset]\n", filename);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [47 x i8] c"Usage: %s [-a, add] [-r read] [-i init/reset]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"Usage: %s [-a, add] [-r read] [-i init/reset]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct Connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Database_close(struct Connection *);
scalar_t__ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ printf(char *, char const *);
void die(const char *message, struct Connection *conn) {
  if (errno) {
    perror(message);
  } else {
    printf("ERROR: %s\n", message);
  }
  Database_close(conn);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e89(%rip),%rax
cmpq   $0x0,(%rax)
je     116f <die+0x2f>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
jmp    117f <die+0x3f>
mov    -0x8(%rbp),%rsi
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1060 <Database_close@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    0x2e92(%rip),%rax
cmpq   $0x0,(%rax)
je     116e <die+0x2e>
mov    %rsi,%rdi
call   1040 <perror@plt>
mov    %rbx,%rdi
call   1060 <Database_close@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
jmp    115c <die+0x1c>

LLVM IR (-O0):
%struct.Connection = type { i32 }
@errno = global i64 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @die(i8* %0, %struct.Connection* %1) {
%3 = alloca i8*
%4 = alloca %struct.Connection*
store i8* %0, i8** %3
store %struct.Connection* %1, %struct.Connection** %4
%5 = load i64, i64* @errno
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 @perror(i8* %8)
br label %13
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %10, %7
%14 = load %struct.Connection*, %struct.Connection** %4
%15 = call i32 @Database_close(%struct.Connection* %14)
%16 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
%struct.Connection = type { i32 }
@errno = global i64 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @die(i8* %0, %struct.Connection* %1) {
%3 = load i64, i64* @errno
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @perror(i8* %0)
br label %9
7: ; preds = %2
%8 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %9
9: ; preds = %7, %5
%10 = tail call i32 @Database_close(%struct.Connection* %1)
%11 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ say_hello(int, int, int);
int main(int argc, char **argv) {
  int x = 0x55;
  int y = 0x56;
  int z = 0x57;
  char str[] = "String";
  say_hello(10 * 331, 0x256, 0x257);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x55,-0x14(%rbp)
movl   $0x56,-0x18(%rbp)
movl   $0x57,-0x1c(%rbp)
mov    0xebf(%rip),%eax
mov    %eax,-0x23(%rbp)
mov    0xeb9(%rip),%ax
mov    %ax,-0x1f(%rbp)
mov    0xeb1(%rip),%al
mov    %al,-0x1d(%rbp)
mov    $0xcee,%edi
mov    $0x256,%esi
mov    $0x257,%edx
call   1030 <say_hello@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xcee,%edi
mov    $0x256,%esi
mov    $0x257,%edx
call   1030 <say_hello@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.str = [7 x i8] c"String\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [7 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 85, i32* %6
store i32 86, i32* %7
store i32 87, i32* %8
%10 = bitcast [7 x i8]* %9 to i8*
%11 = call i32 @say_hello(i32 3310, i32 598, i32 599)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @say_hello(i32 3310, i32 598, i32 599)
ret i32 0
}
/* Variables and functions */
void *memset(void *, int, size_t);
void *mm_block_memset(void *data, int c, size_t len) {
  return memset(data, c, len);
}


x86 assembly (clang, -O0):
<mm_block_memset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    %rdi,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x18(%rbp),%rdx
movzbl %al,%esi
call   1030 <memset@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mm_block_memset>:
jmp    1030 <memset@plt>

LLVM IR (-O0):
define i8* @mm_block_memset(i8* %0, i32 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = trunc i32 %8 to i8
%10 = load i64, i64* %6
ret i8* %7
}

LLVM IR (-O2):
define i8* @mm_block_memset(i8* returned writeonly %0, i32 %1, i64 %2) {
%4 = trunc i32 %1 to i8
tail call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 %4, i64 %2, i1 false)
ret i8* %0
}
void catch_alarm(int number) {}


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

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

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

LLVM IR (-O2):
define void @catch_alarm(i32 %0) {
ret void
}
void foo782() {}


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

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

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

LLVM IR (-O2):
define void @foo782() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printID(int taskid) { printf("id: %d\n", taskid); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"id: %d\0A\00"
define void @printID(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void tlbtrace_refmem_qemu(unsigned int addr) {}


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

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

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

LLVM IR (-O2):
define void @tlbtrace_refmem_qemu(i32 %0) {
ret void
}
int test_imm_9Duint32_reg(unsigned int val) {
  return ((val) & (0x9D << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_9Duint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 157
%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_9Duint32_reg(i32 %0) {
%2 = and i32 %0, 157
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void EEPROM_Start(void) {}


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

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

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

LLVM IR (-O2):
define void @EEPROM_Start() {
ret void
}
extern int sudirribe_for_updates(void f(int x)) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sudirribe_for_updates(void (i32)* nocapture readnone %0) {
ret i32 0
}
double Sleef_asin_u35(double x) { return __builtin_asin(x); }


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

x86 assembly (clang, -O2):
<Sleef_asin_u35>:
jmp    1030 <asin@plt>

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

LLVM IR (-O2):
define double @Sleef_asin_u35(double %0) {
%2 = tail call double @asin(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x3f() {
  Assert_real((isalpha(63) == 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_isalpha.c",
              320, ("isalpha should be 0 for ?"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x3f>:
push   %rax
mov    $0x3f,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x140,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for ?\00"
define void @t_isalpha_0x3f() {
%1 = call i64 @isalpha(i32 63)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 320, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for ?\00"
define void @t_isalpha_0x3f() {
%1 = tail call i64 @isalpha(i32 63)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 320, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void gdk_window_set_override_redirect() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_set_override_redirect() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test(char *, char *);
void TEST_cpp_null_directive(void) {
  test("X", "#\n"
            "X");
}


x86 assembly (clang, -O0):
<TEST_cpp_null_directive>:
push   %rbp
mov    %rsp,%rbp
lea    0xee7(%rip),%rdi
lea    0xede(%rip),%rsi
call   1030 <test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TEST_cpp_null_directive>:
lea    0xeeb(%rip),%rdi
lea    0xee2(%rip),%rsi
jmp    1030 <test@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"X\00"
@.str.1 = [4 x i8] c"#\0AX\00"
define void @TEST_cpp_null_directive() {
%1 = call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"X\00"
@.str.1 = [4 x i8] c"#\0AX\00"
define void @TEST_cpp_null_directive() {
%1 = tail call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}