xunge/DecIR huggingface dataset:
/* Variables and functions */
void CL_CDDialog(void) {}


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

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

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

LLVM IR (-O2):
define void @CL_CDDialog() {
ret void
}
void PyInit_mydpss(void) {}


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

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

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

LLVM IR (-O2):
define void @PyInit_mydpss() {
ret void
}
void I_NoAppServicesLockLobby(void) {}


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

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

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

LLVM IR (-O2):
define void @I_NoAppServicesLockLobby() {
ret void
}
/* Variables and functions */
double bot_randf();
float bot_signed_randf() { return bot_randf() * 2.0 - 1.0; }


x86 assembly (clang, -O0):
<bot_signed_randf>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <bot_randf@plt>
addsd  %xmm0,%xmm0
movsd  0xed9(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bot_signed_randf>:
push   %rax
xor    %eax,%eax
call   1030 <bot_randf@plt>
addsd  %xmm0,%xmm0
addsd  0xedc(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @bot_signed_randf() {
%1 = call double (...) @bot_randf()
%2 = call double @llvm.fmuladd.f64(double %1, double 2.000000e+00, double -1.000000e+00)
%3 = fptrunc double %2 to float
ret float %3
}

LLVM IR (-O2):
define float @bot_signed_randf() {
%1 = tail call double (...) @bot_randf()
%2 = tail call double @llvm.fmuladd.f64(double %1, double 2.000000e+00, double -1.000000e+00)
%3 = fptrunc double %2 to float
ret float %3
}
int process_cach_init() { return 0; }


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

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

LLVM IR (-O0):
define i32 @process_cach_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @process_cach_init() {
ret i32 0
}
unsigned char inb(int port) { return (((unsigned char *)0x80000000)[port]); }


x86 assembly (clang, -O0):
<inb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    $0x80000000,%eax
movzbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inb>:
movslq %edi,%rax
mov    $0x80000000,%ecx
mov    (%rax,%rcx,1),%al
ret

LLVM IR (-O0):
define zeroext i8 @inb(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* inttoptr (i64 2147483648 to i8*), i64 %4
%6 = load i8, i8* %5
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @inb(i32 %0) {
%2 = sext i32 %0 to i64
%3 = getelementptr inbounds i8, i8* inttoptr (i64 2147483648 to i8*), i64 %2
%4 = load i8, i8* %3
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
void *empty_thread(void *a) { pthread_exit(NULL); }


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

x86 assembly (clang, -O2):
<empty_thread>:
xor    %edi,%edi
jmp    1030 <pthread_exit@plt>

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

LLVM IR (-O2):
define noalias i8* @empty_thread(i8* nocapture readnone %0) {
%2 = tail call i32 @pthread_exit(i32* null)
ret i8* undef
}
/* Variables and functions */
char toupper(char);
void ucase(char *line, int len) {
  int i = 0;
  for (i = 0; i < len; i++) {
    line[i] = toupper(line[i]);
  }
}


x86 assembly (clang, -O0):
<ucase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1165 <ucase+0x55>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <ucase+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ucase>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1147 <ucase+0x37>
mov    %rdi,%r15
mov    %esi,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1030 <toupper@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <ucase+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ucase(i8* 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 i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call signext i8 @toupper(i8 signext %9)
store i8 %10, i8* %8
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
int main() {
  int i = 123, j = 5;
  while (i < 10) {
    while (j < 5) {
      j++;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x7b,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1145 <main+0x45>
jmp    1128 <main+0x28>
cmpl   $0x5,-0xc(%rbp)
jge    1140 <main+0x40>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <main+0x28>
jmp    1119 <main+0x19>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
scalar_t__ ntohs(unsigned short);
unsigned short in_cksum_shouldbe(unsigned short sum,
                                 unsigned short computed_sum) {
  unsigned long shouldbe;
  shouldbe = sum;
  shouldbe += ntohs(computed_sum);
  shouldbe = (shouldbe & 0xFFFF) + (shouldbe >> 16);
  shouldbe = (shouldbe & 0xFFFF) + (shouldbe >> 16);
  return shouldbe;
}


x86 assembly (clang, -O0):
<in_cksum_shouldbe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
mov    %rax,-0x10(%rbp)
movzwl -0x4(%rbp),%edi
call   1030 <ntohs@plt>
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xffff,%rax
mov    -0x10(%rbp),%rcx
shr    $0x10,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xffff,%rax
mov    -0x10(%rbp),%rcx
shr    $0x10,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_cksum_shouldbe>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <ntohs@plt>
add    %rbx,%rax
movzwl %ax,%ecx
shr    $0x10,%rax
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x10,%ecx
add    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @in_cksum_shouldbe(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i64
store i16 %0, i16* %3
store i16 %1, i16* %4
%6 = load i16, i16* %3
%7 = zext i16 %6 to i64
store i64 %7, i64* %5
%8 = load i16, i16* %4
%9 = call i64 @ntohs(i16 zeroext %8)
%10 = load i64, i64* %5
%11 = add i64 %10, %9
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = and i64 %12, 65535
%14 = load i64, i64* %5
%15 = lshr i64 %14, 16
%16 = add i64 %13, %15
store i64 %16, i64* %5
%17 = load i64, i64* %5
%18 = and i64 %17, 65535
%19 = load i64, i64* %5
%20 = lshr i64 %19, 16
%21 = add i64 %18, %20
store i64 %21, i64* %5
%22 = load i64, i64* %5
%23 = trunc i64 %22 to i16
ret i16 %23
}

LLVM IR (-O2):
define zeroext i16 @in_cksum_shouldbe(i16 zeroext %0, i16 zeroext %1) {
%3 = zext i16 %0 to i64
%4 = tail call i64 @ntohs(i16 zeroext %1)
%5 = add i64 %4, %3
%6 = and i64 %5, 65535
%7 = lshr i64 %5, 16
%8 = add nuw nsw i64 %6, %7
%9 = lshr i64 %8, 16
%10 = add nuw nsw i64 %9, %8
%11 = trunc i64 %10 to i16
ret i16 %11
}
/* Variables and functions */
unsigned long hash_64(unsigned long, unsigned int);
unsigned long hash_ptr(void *ptr, unsigned int bits) {
  return hash_64((unsigned long)ptr, bits);
}


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

x86 assembly (clang, -O2):
<hash_ptr>:
jmp    1030 <hash_64@plt>

LLVM IR (-O0):
define i64 @hash_ptr(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 = ptrtoint i8* %5 to i64
%7 = load i32, i32* %4
%8 = call i64 @hash_64(i64 %6, i32 %7)
ret i64 %8
}

LLVM IR (-O2):
define i64 @hash_ptr(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = tail call i64 @hash_64(i64 %3, i32 %1)
ret i64 %4
}
unsigned long elf_hash(const unsigned char *name) {
  unsigned long h = 0, g;
  while (*name) {
    h = (h << 4) + *name++;
    g = h & 0xf0000000ul;
    if (g)
      h ^= g >> 24;
    h &= ~g;
  }
  return h;
}


x86 assembly (clang, -O0):
<elf_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1180 <elf_hash+0x80>
mov    -0x10(%rbp),%rax
shl    $0x4,%rax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movzbl (%rcx),%ecx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
movabs $0xf0000000,%rax
and    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116b <elf_hash+0x6b>
mov    -0x18(%rbp),%rax
shr    $0x18,%rax
xor    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
xor    $0xffffffffffffffff,%rax
and    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <elf_hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<elf_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     113d <elf_hash+0x3d>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
shl    $0x4,%rax
movzbl %cl,%ecx
add    %rax,%rcx
mov    %ecx,%eax
and    $0xf0000000,%eax
mov    %rax,%rdx
shr    $0x18,%rdx
xor    %rcx,%rdx
not    %rax
and    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <elf_hash+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @elf_hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
store i8* %0, i8** %2
store i64 0, i64* %3
br label %5
5: ; preds = %26, %1
%6 = load i8*, i8** %2
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %31
9: ; preds = %5
%10 = load i64, i64* %3
%11 = shl i64 %10, 4
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
%14 = load i8, i8* %12
%15 = zext i8 %14 to i64
%16 = add i64 %11, %15
store i64 %16, i64* %3
%17 = load i64, i64* %3
%18 = and i64 %17, 4026531840
store i64 %18, i64* %4
%19 = load i64, i64* %4
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %26
21: ; preds = %9
%22 = load i64, i64* %4
%23 = lshr i64 %22, 24
%24 = load i64, i64* %3
%25 = xor i64 %24, %23
store i64 %25, i64* %3
br label %26
26: ; preds = %21, %9
%27 = load i64, i64* %4
%28 = xor i64 %27, -1
%29 = load i64, i64* %3
%30 = and i64 %29, %28
store i64 %30, i64* %3
br label %5
31: ; preds = %5
%32 = load i64, i64* %3
ret i64 %32
}

LLVM IR (-O2):
define i64 @elf_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %19, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %17, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i64 [ %16, %4 ], [ 0, %1 ]
%8 = shl i64 %7, 4
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = zext i8 %5 to i64
%11 = add i64 %8, %10
%12 = and i64 %11, 4026531840
%13 = lshr exact i64 %12, 24
%14 = xor i64 %13, %11
%15 = xor i64 %12, -1
%16 = and i64 %14, %15
%17 = load i8, i8* %9
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %4
19: ; preds = %4, %1
%20 = phi i64 [ 0, %1 ], [ %16, %4 ]
ret i64 %20
}
/* Variables and functions */
int getchar();
short int getint() {
  register int b1, b2;
  b1 = getchar() & 0377;
  b2 = getchar();
  return ((((b2 > 128) ? (b2 - 256) : b2) << 8) + b1);
}


x86 assembly (clang, -O0):
<getint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
and    $0xff,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jle    114e <getint+0x3e>
mov    -0x8(%rbp),%eax
sub    $0x100,%eax
mov    %eax,-0xc(%rbp)
jmp    1154 <getint+0x44>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
add    -0x4(%rbp),%eax
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getint>:
push   %rbx
xor    %eax,%eax
call   1030 <getchar@plt>
movzbl %al,%ebx
xor    %eax,%eax
call   1030 <getchar@plt>
shl    $0x8,%eax
or     %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i16 @getint() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @getchar()
%4 = and i32 %3, 255
store i32 %4, i32* %1
%5 = call i32 (...) @getchar()
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 128
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 256
br label %13
11: ; preds = %0
%12 = load i32, i32* %2
br label %13
13: ; preds = %11, %8
%14 = phi i32 [ %10, %8 ], [ %12, %11 ]
%15 = shl i32 %14, 8
%16 = load i32, i32* %1
%17 = add nsw i32 %15, %16
%18 = trunc i32 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define signext i16 @getint() {
%1 = tail call i32 (...) @getchar()
%2 = and i32 %1, 255
%3 = tail call i32 (...) @getchar()
%4 = shl i32 %3, 8
%5 = or i32 %4, %2
%6 = trunc i32 %5 to i16
ret i16 %6
}
/* Type definitions */
struct cmd_arg {
  int dummy;
};

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


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

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

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

LLVM IR (-O2):
%struct.cmd_arg = type { i32 }
define void @cmdShowInterfaceStatistics(i32 %0, %struct.cmd_arg* nocapture readnone %1) {
%3 = tail call i32 (...) @showInterfaceStatistics()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, long);
int /*<<< orphan*/ stderr;
long strtol(char const *, char **, int /*<<< orphan*/);
long parse_number(const char *val) {
  char *c;
  long parsed = strtol(val, &c, 0);
  if (*c != '\0')
    fprintf(stderr, "!! Parsed %s as %ld\n", val, parsed);
  return parsed;
}


x86 assembly (clang, -O0):
<parse_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1040 <strtol@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116c <parse_number+0x4c>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xe99(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_number>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsp,%rsi
xor    %edx,%edx
call   1040 <strtol@plt>
mov    %rax,%rbx
mov    (%rsp),%rax
cmpb   $0x0,(%rax)
je     1158 <parse_number+0x38>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1030 <fprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"!! Parsed %s as %ld\0A\00"
define i64 @parse_number(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strtol(i8* %5, i8** %3, i32 0)
store i64 %6, i64* %4
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %1
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %2
%14 = load i64, i64* %4
%15 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %13, i64 %14)
br label %16
16: ; preds = %11, %1
%17 = load i64, i64* %4
ret i64 %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"!! Parsed %s as %ld\0A\00"
define i64 @parse_number(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @strtol(i8* %0, i8** %2, i32 0)
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %4)
br label %11
11: ; preds = %8, %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ long_usage();
void optPrintUsage() { long_usage(); }


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

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

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

LLVM IR (-O2):
define void @optPrintUsage() {
%1 = tail call i32 (...) @long_usage()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putf8_seqlen(char *);
int putf8_strlen(char *s) {
  int count = 0;
  while (*(s += putf8_seqlen(s)))
    count++;
  return count;
}


x86 assembly (clang, -O0):
<putf8_strlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <putf8_seqlen@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
mov    %rax,%rdx
add    %rcx,%rdx
mov    %rdx,-0x8(%rbp)
cmpb   $0x0,(%rax,%rcx,1)
je     1157 <putf8_strlen+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <putf8_strlen+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putf8_strlen>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0xffffffff,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <putf8_seqlen@plt>
cltq
add    $0x1,%ebp
cmpb   $0x0,(%rbx,%rax,1)
lea    (%rbx,%rax,1),%rbx
jne    1120 <putf8_strlen+0x10>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @putf8_strlen(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 i8*, i8** %2
%6 = call i32 @putf8_seqlen(i8* %5)
%7 = load i8*, i8** %2
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds i8, i8* %7, i64 %8
store i8* %9, i8** %2
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @putf8_strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = phi i32 [ 0, %1 ], [ %10, %2 ]
%5 = tail call i32 @putf8_seqlen(i8* %3)
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %3, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
%10 = add nuw nsw i32 %4, 1
br i1 %9, label %11, label %2
11: ; preds = %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ printf(char *, char);
int main(void) {
  char *p = malloc(1);
  *p = 'a';
  char c = *(p + 1);
  printf("\n [%c]\n", c);
  free(p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x61,(%rax)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0x11(%rbp)
lea    0xe9b(%rip),%rdi
movsbl -0x11(%rbp),%esi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
movb   $0x61,(%rax)
lea    0xeb8(%rip),%rdi
xor    %esi,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"\0A [%c]\0A\00"
define i32 @main() {
%1 = tail call dereferenceable_or_null(1) i8* @malloc(i32 1)
store i8 97, i8* %1
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 signext undef)
%3 = tail call i32 @free(i8* %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ getyx(int /*<<< orphan*/ *, int, int);
int winch(int /*<<< orphan*/ *);
int /*<<< orphan*/ wmove(int /*<<< orphan*/ *, int, int);
int readwin(WINDOW *win, int line, int col) {
  int oldline, oldcol;
  int c;
  getyx(win, oldline, oldcol);
  wmove(win, line, col);
  c = winch(win);
  wmove(win, oldline, oldcol);
  return (c);
}


x86 assembly (clang, -O0):
<readwin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1030 <getyx@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1050 <wmove@plt>
mov    -0x8(%rbp),%rdi
call   1040 <winch@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1050 <wmove@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readwin>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <getyx@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1050 <wmove@plt>
mov    %rbx,%rdi
call   1040 <winch@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1050 <wmove@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @readwin(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32*, i32** %4
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @getyx(i32* %10, i32 %11, i32 %12)
%14 = load i32*, i32** %4
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = call i32 @wmove(i32* %14, i32 %15, i32 %16)
%18 = load i32*, i32** %4
%19 = call i32 @winch(i32* %18)
store i32 %19, i32* %9
%20 = load i32*, i32** %4
%21 = load i32, i32* %7
%22 = load i32, i32* %8
%23 = call i32 @wmove(i32* %20, i32 %21, i32 %22)
%24 = load i32, i32* %9
ret i32 %24
}

LLVM IR (-O2):
define i32 @readwin(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @getyx(i32* %0, i32 undef, i32 undef)
%5 = tail call i32 @wmove(i32* %0, i32 %1, i32 %2)
%6 = tail call i32 @winch(i32* %0)
%7 = tail call i32 @wmove(i32* %0, i32 undef, i32 undef)
ret i32 %6
}
int getgnugolbyintuition() {}


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

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

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

LLVM IR (-O2):
define i32 @getgnugolbyintuition() {
ret i32 undef
}
/* Type definitions */
struct wpa_ctrl {
  int dummy;
};

/* Variables and functions */
int wpa_ctrl_command(struct wpa_ctrl *, char *);
int wpa_cli_cmd_save_config(struct wpa_ctrl *ctrl, int argc,
                            const char *argv[]) {
  return wpa_ctrl_command(ctrl, "SAVE_CONFIG");
}


x86 assembly (clang, -O0):
<wpa_cli_cmd_save_config>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed2(%rip),%rsi
call   1030 <wpa_ctrl_command@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_cli_cmd_save_config>:
lea    0xee9(%rip),%rsi
jmp    1030 <wpa_ctrl_command@plt>

LLVM IR (-O0):
%struct.wpa_ctrl = type { i32 }
@.str = [12 x i8] c"SAVE_CONFIG\00"
define i32 @wpa_cli_cmd_save_config(%struct.wpa_ctrl* %0, i32 %1, i8** %2) {
%4 = alloca %struct.wpa_ctrl*
%5 = alloca i32
%6 = alloca i8**
store %struct.wpa_ctrl* %0, %struct.wpa_ctrl** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load %struct.wpa_ctrl*, %struct.wpa_ctrl** %4
%8 = call i32 @wpa_ctrl_command(%struct.wpa_ctrl* %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 %8
}

LLVM IR (-O2):
%struct.wpa_ctrl = type { i32 }
@.str = [12 x i8] c"SAVE_CONFIG\00"
define i32 @wpa_cli_cmd_save_config(%struct.wpa_ctrl* %0, i32 %1, i8** nocapture readnone %2) {
%4 = tail call i32 @wpa_ctrl_command(%struct.wpa_ctrl* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}
__typeof__(puts((void *)1)) test_puts_205(void) { return puts((void *)1); }


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

x86 assembly (clang, -O2):
<test_puts_205>:
mov    $0x1,%edi
xor    %eax,%eax
jmp    1030 <puts@plt>

LLVM IR (-O0):
define i32 @test_puts_205() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* inttoptr (i64 1 to i8*))
ret i32 %1
}

LLVM IR (-O2):
define i32 @test_puts_205() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* inttoptr (i64 1 to i8*))
ret i32 %1
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int tkeyisok(char tkey[]) {
  if (strcmp(tkey, "zdlPehvkuthSLH2345uhKSJe5lgk6ktn") == 0) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<tkeyisok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <tkeyisok+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <tkeyisok+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [33 x i8] c"zdlPehvkuthSLH2345uhKSJe5lgk6ktn\00"
define i32 @tkeyisok(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
double sqrt(double);
double EDsqrt(double x) { return (.5 / sqrt(x)); }


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

x86 assembly (clang, -O2):
<EDsqrt>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1121 <EDsqrt+0x11>
sqrtsd %xmm0,%xmm0
jmp    1126 <EDsqrt+0x16>
call   1030 <sqrt@plt>
movsd  0xed2(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @EDsqrt(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sqrt(double %3)
%5 = fdiv double 5.000000e-01, %4
ret double %5
}

LLVM IR (-O2):
define double @EDsqrt(double %0) {
%2 = tail call double @sqrt(double %0)
%3 = fdiv double 5.000000e-01, %2
ret double %3
}
/* Variables and functions */
scalar_t__ malloca(int, int);
void *ehci_maligned(int size, int alignement, int crossing) {
  return (void *)malloca(size, alignement);
}


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

x86 assembly (clang, -O2):
<ehci_maligned>:
jmp    1030 <malloca@plt>

LLVM IR (-O0):
define i8* @ehci_maligned(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 = call i64 @malloca(i32 %7, i32 %8)
%10 = inttoptr i64 %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @ehci_maligned(i32 %0, i32 %1, i32 %2) {
%4 = tail call i64 @malloca(i32 %0, i32 %1)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x20() {
  Assert_real((isprint(32)),
              "/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_isprint.c",
              165, ("isprint should be 1 for  "));
}


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

x86 assembly (clang, -O2):
<t_isprint_0x20>:
push   %rax
mov    $0x20,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xa5,%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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for \00"
define void @t_isprint_0x20() {
%1 = call i32 @isprint(i32 32)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 165, 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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for \00"
define void @t_isprint_0x20() {
%1 = tail call i32 @isprint(i32 32)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 165, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_9Duint8_reg(unsigned char val) {
  return ((val) & (-0x9D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_9Duint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff63,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_9Duint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 99
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef char *int64_t;

/* Variables and functions */
int64_t aeron_counter_increment(volatile int64_t *addr, int64_t value) {
  int64_t result = 0;
  do {
    __asm__ volatile("lock; xaddq %0, %1"
                     : "=r"(result), "+m"(*addr)
                     : "0"(value));
  } while (0);
  return result;
}


x86 assembly (clang, -O0):
<aeron_counter_increment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
lock xadd %rax,(%rcx)
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<aeron_counter_increment>:
mov    %rsi,%rax
lock xadd %rax,(%rdi)
ret

LLVM IR (-O0):
define i8* @aeron_counter_increment(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
%5 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
store i8* null, i8** %5
br label %6
6: ; preds = %2
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %4
%9 = call i8* asm sideeffect "lock; xaddq $0, $1", "=r,=*m,0,*m,~{dirflag},~{fpsr},~{flags}"(i8** elementtype(i8*) %7, i8* %8, i8** elementtype(i8*) %7)
store i8* %9, i8** %5
br label %10
10: ; preds = %6
%11 = load i8*, i8** %5
ret i8* %11
}

LLVM IR (-O2):
define i8* @aeron_counter_increment(i8** %0, i8* %1) {
%3 = tail call i8* asm sideeffect "lock; xaddq $0, $1", "=r,=*m,0,*m,~{dirflag},~{fpsr},~{flags}"(i8** elementtype(i8*) %0, i8* %1, i8** elementtype(i8*) %0)
ret i8* %3
}
void ff_hevc_put_hevc_uni_epel_v4_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_v4_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *malloc(size_t);
void *amalloc(size_t s) {
  void *ret;
  ret = malloc(s);
  if (!ret)
    abort();
  return ret;
}


x86 assembly (clang, -O0):
<amalloc>:
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    114b <amalloc+0x2b>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<amalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     112d <amalloc+0xd>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @amalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define noalias i8* @amalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret i8* %2
}
int bar(_Bool b) { return b & -2; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
and    $0xfffffffe,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @bar(i1 zeroext %0) {
%2 = alloca i8
%3 = zext i1 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = trunc i8 %4 to i1
%6 = zext i1 %5 to i32
%7 = and i32 %6, -2
ret i32 %7
}

LLVM IR (-O2):
define i32 @bar(i1 zeroext %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ERR_get_error();
int /*<<< orphan*/ err(int, char *, int /*<<< orphan*/);
void bn_check(int x) {
  if (x == 0)
    err(1, "big number failure %lx", ERR_get_error());
}


x86 assembly (clang, -O0):
<bn_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    114f <bn_check+0x2f>
mov    $0x0,%al
call   1040 <ERR_get_error@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0xeb6(%rip),%rsi
call   1030 <err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bn_check>:
test   %edi,%edi
je     1125 <bn_check+0x5>
ret
push   %rax
xor    %eax,%eax
call   1040 <ERR_get_error@plt>
lea    0xecc(%rip),%rsi
mov    $0x1,%edi
mov    %eax,%edx
pop    %rax
jmp    1030 <err@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"big number failure %lx\00"
define void @bn_check(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = call i32 (...) @ERR_get_error()
%7 = call i32 @err(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"big number failure %lx\00"
define void @bn_check(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 (...) @ERR_get_error()
%5 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %6
6: ; preds = %3, %1
ret void
}
const char *dill_lstrip(const char *string, char delim) {
  const char *pos = string;
  while (*pos && *pos == delim)
    ++pos;
  return pos;
}


x86 assembly (clang, -O0):
<dill_lstrip>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     113e <dill_lstrip+0x3e>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    114e <dill_lstrip+0x4e>
jmp    115f <dill_lstrip+0x5f>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1116 <dill_lstrip+0x16>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dill_lstrip>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
je     1121 <dill_lstrip+0x21>
cmp    %sil,%cl
je     1110 <dill_lstrip+0x10>
ret

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

LLVM IR (-O2):
define i8* @dill_lstrip(i8* %0, i8 signext %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %9, %3 ]
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
%7 = icmp eq i8 %5, %1
%8 = and i1 %6, %7
%9 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %8, label %3, label %10
10: ; preds = %3
ret i8* %4
}
/* Variables and functions */
int asm_main(int, char **);
int main(int argc, char **argv) {
  int ret_status;
  ret_status = asm_main(argc, argv);
  return ret_status;
}


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <asm_main@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @asm_main(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ print(char *, char *, int);
int main() {
  print("str:%s, int:%d", "hello world", 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xee2(%rip),%rsi
mov    $0x2,%edx
call   1030 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xef0(%rip),%rsi
mov    $0x2,%edx
call   1030 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"str:%s, int:%d\00"
@.str.1 = [12 x i8] c"hello world\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @print(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 2)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"str:%s, int:%d\00"
@.str.1 = [12 x i8] c"hello world\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 2)
ret i32 0
}
int thermal_notify_cdev_state_update(int cdev_id, int state) { return 0; }


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

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

LLVM IR (-O0):
define i32 @thermal_notify_cdev_state_update(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @thermal_notify_cdev_state_update(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
unsigned char fuzzRandomByte();
void fuzzRandomBlob(int nBuf, unsigned char *zBuf) {
  int i;
  for (i = 0; i < nBuf; i++) {
    zBuf[i] = fuzzRandomByte();
  }
}


x86 assembly (clang, -O0):
<fuzzRandomBlob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1154 <fuzzRandomBlob+0x44>
mov    $0x0,%al
call   1030 <fuzzRandomByte@plt>
mov    %al,%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <fuzzRandomBlob+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fuzzRandomBlob>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
jle    1144 <fuzzRandomBlob+0x34>
mov    %rsi,%r14
mov    %edi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <fuzzRandomByte@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <fuzzRandomBlob+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @fuzzRandomBlob(i32 %0, i8* nocapture writeonly %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = tail call zeroext i8 (...) @fuzzRandomByte()
%9 = getelementptr inbounds i8, i8* %1, i64 %7
store i8 %8, i8* %9
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}