xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ CompileWord(int, long);
void DoErase(void) {
  CompileWord(50, 0L);
  CompileWord(76, 0L);
}


x86 assembly (clang, -O0):
<DoErase>:
push   %rbp
mov    %rsp,%rbp
mov    $0x32,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <CompileWord@plt>
mov    $0x4c,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <CompileWord@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoErase>:
push   %rax
mov    $0x32,%edi
xor    %esi,%esi
call   1030 <CompileWord@plt>
mov    $0x4c,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <CompileWord@plt>

LLVM IR (-O0):
define void @DoErase() {
%1 = call i32 @CompileWord(i32 50, i64 0)
%2 = call i32 @CompileWord(i32 76, i64 0)
ret void
}

LLVM IR (-O2):
define void @DoErase() {
%1 = tail call i32 @CompileWord(i32 50, i64 0)
%2 = tail call i32 @CompileWord(i32 76, i64 0)
ret void
}
int eloop_forked(struct eloop *eloop) {
  (void)((eloop));
  return 0;
}


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

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

LLVM IR (-O0):
%struct.eloop = type opaque
define i32 @eloop_forked(%struct.eloop* %0) {
%2 = alloca %struct.eloop*
store %struct.eloop* %0, %struct.eloop** %2
%3 = load %struct.eloop*, %struct.eloop** %2
ret i32 0
}

LLVM IR (-O2):
%struct.eloop = type opaque
define i32 @eloop_forked(%struct.eloop* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ printf(char *);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int main(void) {
  int foo;
  if ((foo = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
    printf("Socket failed. Sad.\n");
    return (1);
  }
  printf("Hello World!\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <socket@plt>
mov    %eax,-0x8(%rbp)
cmp    $0xffffffff,%eax
jne    116c <main+0x4c>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    117f <main+0x5f>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    0x2ea7(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <socket@plt>
xor    %ebx,%ebx
cmp    $0xffffffff,%eax
sete   %bl
lea    0xec4(%rip),%rax
lea    0xeb0(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str = [21 x i8] c"Socket failed. Sad.\0A\00"
@.str.1 = [14 x i8] c"Hello World!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @AF_INET
%4 = load i32, i32* @SOCK_STREAM
%5 = call i32 @socket(i32 %3, i32 %4, i32 0)
store i32 %5, i32* %2
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %1
br label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %11
11: ; preds = %9, %7
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@str = [13 x i8] c"Hello World!\00"
@str.2 = [20 x i8] c"Socket failed. Sad.\00"
define i32 @main() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_STREAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
%4 = icmp eq i32 %3, -1
%5 = select i1 %4, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0)
%6 = zext i1 %4 to i32
%7 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdout;
void output_ontop(char *str) {
  printf("\r%s", str);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<output_ontop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_ontop>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\0D%s\00"
@stdout = global i32 0
define void @output_ontop(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\0D%s\00"
@stdout = global i32 0
define void @output_ontop(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
int test_imm_E3uint32_mem(unsigned int *val) {
  return ((*val) & (0xE3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E3uint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0xe3,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_E3uint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 227
%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_E3uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 227
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ print_it(char *);
int main(int argc, char *argv[]) {
  print_it(argv[0]);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @print_it(i8* %3)
ret i32 0
}
/* Variables and functions */
void *malloc(size_t);
void *fast_alloc_malloc(size_t size, void *params) {
  params = 0;
  return malloc(size);
}


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

x86 assembly (clang, -O2):
<fast_alloc_malloc>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @fast_alloc_malloc(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
store i8* null, i8** %4
%5 = load i64, i64* %3
%6 = call i8* @malloc(i64 %5)
ret i8* %6
}

LLVM IR (-O2):
define noalias i8* @fast_alloc_malloc(i64 %0, i8* nocapture readnone %1) {
%3 = tail call i8* @malloc(i64 %0)
ret i8* %3
}
long double zstdtril(k, t)
long double k, t;
{
  int ki;
  long double y;
  ki = k;
  y = stdtril(ki, t);
  return (y);
}


x86 assembly (clang, -O0):
<zstdtril>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fnstcw -0x4a(%rbp)
movzwl -0x4a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x4c(%rbp)
fldcw  -0x4c(%rbp)
fistpl -0x48(%rbp)
fldcw  -0x4a(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
xor    %eax,%eax
call   1030 <stdtril@plt>
mov    %eax,-0x44(%rbp)
fildl  -0x44(%rbp)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zstdtril>:
sub    $0x28,%rsp
fldt   0x40(%rsp)
fldt   0x30(%rsp)
fnstcw 0x1c(%rsp)
movzwl 0x1c(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x1e(%rsp)
fldcw  0x1e(%rsp)
fistpl 0x20(%rsp)
fldcw  0x1c(%rsp)
mov    0x20(%rsp),%edi
fstpt  (%rsp)
xor    %eax,%eax
call   1030 <stdtril@plt>
mov    %eax,0x24(%rsp)
fildl  0x24(%rsp)
add    $0x28,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @zstdtril(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
%5 = alloca i32
%6 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%7 = load x86_fp80, x86_fp80* %3
%8 = fptosi x86_fp80 %7 to i32
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load x86_fp80, x86_fp80* %4
%11 = call i32 (i32, x86_fp80, ...) bitcast (i32 (...)* @stdtril to i32 (i32, x86_fp80, ...)*)(i32 %9, x86_fp80 %10)
%12 = sitofp i32 %11 to x86_fp80
store x86_fp80 %12, x86_fp80* %6
%13 = load x86_fp80, x86_fp80* %6
ret x86_fp80 %13
}

LLVM IR (-O2):
define x86_fp80 @zstdtril(x86_fp80 %0, x86_fp80 %1) {
%3 = fptosi x86_fp80 %0 to i32
%4 = tail call i32 (i32, x86_fp80, ...) bitcast (i32 (...)* @stdtril to i32 (i32, x86_fp80, ...)*)(i32 %3, x86_fp80 %1)
%5 = sitofp i32 %4 to x86_fp80
ret x86_fp80 %5
}
/* Variables and functions */
int /*<<< orphan*/ clamp(double);
scalar_t__ floor(int);
int pow(int /*<<< orphan*/, int);
unsigned char gammaTransform(double x) {
  return (unsigned char)floor(pow(clamp(x), 1 / 2.2) * 255 + 0.5);
}


x86 assembly (clang, -O0):
<gammaTransform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <clamp@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <pow@plt>
imul   $0xff,%eax,%eax
cvtsi2sd %eax,%xmm0
movsd  0xe9e(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <floor@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gammaTransform>:
push   %rax
call   1030 <clamp@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <pow@plt>
mov    %eax,%ecx
shl    $0x8,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
addsd  0xeab(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <floor@plt>
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @gammaTransform(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @clamp(double %3)
%5 = call i32 @pow(i32 %4, i32 0)
%6 = mul nsw i32 %5, 255
%7 = sitofp i32 %6 to double
%8 = fadd double %7, 5.000000e-01
%9 = fptosi double %8 to i32
%10 = call i64 @floor(i32 %9)
%11 = trunc i64 %10 to i8
ret i8 %11
}

LLVM IR (-O2):
define zeroext i8 @gammaTransform(double %0) {
%2 = tail call i32 @clamp(double %0)
%3 = tail call i32 @pow(i32 %2, i32 0)
%4 = mul nsw i32 %3, 255
%5 = sitofp i32 %4 to double
%6 = fadd double %5, 5.000000e-01
%7 = fptosi double %6 to i32
%8 = tail call i64 @floor(i32 %7)
%9 = trunc i64 %8 to i8
ret i8 %9
}
/* Variables and functions */
unsigned int htonl(unsigned int);
void idtokey(unsigned int id, unsigned char *key) {
  id = htonl(id);
  *((int *)key) = id;
}


x86 assembly (clang, -O0):
<idtokey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idtokey>:
push   %rbx
mov    %rsi,%rbx
call   1030 <htonl@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @idtokey(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = call i32 @htonl(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
store i32 %7, i32* %9
ret void
}

LLVM IR (-O2):
define void @idtokey(i32 %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @htonl(i32 %0)
%4 = bitcast i8* %1 to i32*
store i32 %3, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ free(void *);
void Free(void *ptr) {
  assert(ptr != NULL);
  free(ptr);
}


x86 assembly (clang, -O0):
<Free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Free>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @Free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i8*, i8** %2
%8 = call i32 @free(i8* %7)
ret void
}

LLVM IR (-O2):
define void @Free(i8* %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @free(i8* %0)
ret void
}
void emu_init() {}


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

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

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

LLVM IR (-O2):
define void @emu_init() {
ret void
}
void set_bit(unsigned char *bitmap, int bit) {
  bitmap[3 >> bit] |= (1 << (bit & 7));
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%esi
shl    %cl,%esi
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    $0x3,%edx
sar    %cl,%edx
mov    %edx,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
mov    %esi,%ecx
and    $0x7,%cl
mov    $0x1,%eax
shl    %cl,%eax
mov    $0x3,%edx
mov    %esi,%ecx
shr    %cl,%rdx
or     %al,(%rdi,%rdx,1)
ret

LLVM IR (-O0):
define void @set_bit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 7
%7 = shl i32 1, %6
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = ashr i32 3, %9
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %8, i64 %11
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = or i32 %14, %7
%16 = trunc i32 %15 to i8
store i8 %16, i8* %12
ret void
}

LLVM IR (-O2):
define void @set_bit(i8* nocapture %0, i32 %1) {
%3 = and i32 %1, 7
%4 = shl nuw nsw i32 1, %3
%5 = lshr i32 3, %1
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = trunc i32 %4 to i8
%10 = or i8 %8, %9
store i8 %10, i8* %7
ret void
}
void fn00401050() { return; }


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

x86 assembly (clang, -O2):
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ memcpy(double *, int /*<<< orphan*/ *, int);
double fromRep64(uint64_t x) {
  double ret;
  memcpy(&ret, &x, 8);
  return ret;
}


x86 assembly (clang, -O0):
<fromRep64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fromRep64>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
movsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @fromRep64(i32 %0) {
%2 = alloca i32
%3 = alloca double
store i32 %0, i32* %2
%4 = bitcast double* %3 to i8*
%5 = call i32 @memcpy(double* %3, i32* %2, i32 8)
%6 = load double, double* %3
ret double %6
}
/* Variables and functions */
int fork();
int /*<<< orphan*/ perror(char *);
int fork1(void) {
  int pid;
  pid = fork();
  if (pid == -1)
    perror("fork");
  return pid;
}


x86 assembly (clang, -O0):
<fork1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <fork@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    1148 <fork1+0x28>
lea    0xebd(%rip),%rdi
call   1030 <perror@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fork1>:
push   %rbx
xor    %eax,%eax
call   1040 <fork@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
je     1133 <fork1+0x13>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xec6(%rip),%rdi
call   1030 <perror@plt>
jmp    112f <fork1+0xf>

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

LLVM IR (-O2):
@.str = [5 x i8] c"fork\00"
define i32 @fork1() {
%1 = tail call i32 (...) @fork()
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i32 %1
}
void dummy_combine_accum(int v, int a, struct ui_entry_combiner_state *st) {}


x86 assembly (clang, -O0):
<dummy_combine_accum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.ui_entry_combiner_state = type opaque
define void @dummy_combine_accum(i32 %0, i32 %1, %struct.ui_entry_combiner_state* nocapture %2) {
ret void
}
/* Variables and functions */
int nlz(unsigned int);
__attribute__((const)) unsigned ntz(unsigned x) {
  return 32 - nlz(~x & (x - 1));
}


x86 assembly (clang, -O0):
<ntz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    $0xffffffff,%edi
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
and    %eax,%edi
call   1030 <nlz@plt>
mov    %eax,%ecx
mov    $0x20,%eax
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntz>:
push   %rax
mov    %edi,%eax
not    %eax
add    $0xffffffff,%edi
and    %eax,%edi
call   1030 <nlz@plt>
mov    $0x20,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ntz(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = load i32, i32* %2
%6 = sub i32 %5, 1
%7 = and i32 %4, %6
%8 = call i32 @nlz(i32 %7)
%9 = sub nsw i32 32, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @ntz(i32 %0) {
%2 = xor i32 %0, -1
%3 = add i32 %0, -1
%4 = and i32 %3, %2
%5 = tail call i32 @nlz(i32 %4)
%6 = sub nsw i32 32, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ write_imm(int);
int /*<<< orphan*/ write_instr(int);
int rctrl_handler(char **save) {
  write_instr(0x00);
  write_imm(0xE4);
  write_instr(0x28);
  return 0;
}


x86 assembly (clang, -O0):
<rctrl_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0xe4,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rctrl_handler>:
push   %rax
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0xe4,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rctrl_handler(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @write_instr(i32 0)
%4 = call i32 @write_imm(i32 228)
%5 = call i32 @write_instr(i32 40)
ret i32 0
}

LLVM IR (-O2):
define i32 @rctrl_handler(i8** nocapture readnone %0) {
%2 = tail call i32 @write_instr(i32 0)
%3 = tail call i32 @write_imm(i32 228)
%4 = tail call i32 @write_instr(i32 40)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t st103_get_rx_count(uint8_t ep_num) {
  uint16_t *reg_p = (uint16_t *)((0x40006000UL) + (ep_num * 8 + 6) * 2);
  return *reg_p & 0x03ff;
}


x86 assembly (clang, -O0):
<st103_get_rx_count>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
add    $0x6,%eax
shl    $0x1,%eax
cltq
add    $0x40006000,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0x3ff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<st103_get_rx_count>:
shl    $0x4,%edi
movslq %edi,%rcx
mov    $0x3ff,%eax
and    0x4000600c(%rcx),%eax
ret

LLVM IR (-O0):
define i32 @st103_get_rx_count(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %4, 8
%6 = add nsw i32 %5, 6
%7 = mul nsw i32 %6, 2
%8 = sext i32 %7 to i64
%9 = add i64 1073766400, %8
%10 = inttoptr i64 %9 to i32*
store i32* %10, i32** %3
%11 = load i32*, i32** %3
%12 = load i32, i32* %11
%13 = and i32 %12, 1023
ret i32 %13
}

LLVM IR (-O2):
define i32 @st103_get_rx_count(i32 %0) {
%2 = shl i32 %0, 4
%3 = or i32 %2, 12
%4 = sext i32 %3 to i64
%5 = add nsw i64 %4, 1073766400
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* %6
%8 = and i32 %7, 1023
ret i32 %8
}
void gdk_region_spans_intersect_foreach() {}


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

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

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

LLVM IR (-O2):
define void @gdk_region_spans_intersect_foreach() {
ret void
}
int int_cmp(const void *a, const void *b) {
  const int *ia = (const int *)a;
  const int *ib = (const int *)b;
  return (*ia - *ib);
}


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

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

LLVM IR (-O0):
define i32 @int_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = sub nsw i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @int_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}
unsigned long gfx_get_frame_buffer_size(void) { return (0x00200000); }


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

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

LLVM IR (-O0):
define i64 @gfx_get_frame_buffer_size() {
ret i64 2097152
}

LLVM IR (-O2):
define i64 @gfx_get_frame_buffer_size() {
ret i64 2097152
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int /*<<< orphan*/ gcd(int, int);
int main() {
  int y1 = __VERIFIER_nondet_int();
  int y2 = __VERIFIER_nondet_int();
  if (y1 >= 0 && y2 >= 0) {
    gcd(y1, y2);
  }
  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)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1162 <main+0x42>
cmpl   $0x0,-0xc(%rbp)
jl     1162 <main+0x42>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <gcd@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %ebx,%ebx
js     1142 <main+0x22>
test   %eax,%eax
js     1142 <main+0x22>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <gcd@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = icmp sgt i32 %1, -1
%4 = icmp sgt i32 %2, -1
%5 = select i1 %3, i1 %4, i1 false
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = tail call i32 @gcd(i32 %1, i32 %2)
br label %8
8: ; preds = %6, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Display_Panel_String(char, char *const);
char lcdString(void *parameters) {
  Display_Panel_String('3', (char *const)parameters);
  return 0;
}


x86 assembly (clang, -O0):
<lcdString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x33,%edi
call   1030 <Display_Panel_String@plt>
xor    %eax,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcdString>:
push   %rax
mov    %rdi,%rsi
mov    $0x33,%edi
call   1030 <Display_Panel_String@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define signext i8 @lcdString(i8* %0) {
%2 = tail call i32 @Display_Panel_String(i8 signext 51, i8* %0)
ret i8 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x50() {
  Assert_real((isbdigit(80) == 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_isbdigit.c",
              405, ("isbdigit should be 0 for P"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x50>:
push   %rax
mov    $0x50,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x195,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for P\00"
define void @t_isbdigit_0x50() {
%1 = tail call i64 @isbdigit(i32 80)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 405, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void PRUInit(void) {}


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

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

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

LLVM IR (-O2):
define void @PRUInit() {
ret void
}
int socket(int af, int type, int protocol) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @socket(i32 %0, i32 %1, i32 %2) {
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int __unserialize_uint8(uint8_t *out, const uint8_t *data, int s) {
  if (s < 1)
    return (-1);
  *out = data[0];
  return (1);
}


x86 assembly (clang, -O0):
<__unserialize_uint8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jge    1125 <__unserialize_uint8+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    1138 <__unserialize_uint8+0x38>
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__unserialize_uint8>:
test   %edx,%edx
jle    110e <__unserialize_uint8+0xe>
mov    (%rsi),%eax
mov    %eax,(%rdi)
mov    $0x1,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @__unserialize_uint8(i32* nocapture writeonly %0, i32* nocapture %1, i32 %2) {
%4 = icmp slt i32 %2, 1
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = load i32, i32* %1
store i32 %6, i32* %0
br label %7
7: ; preds = %3, %5
%8 = phi i32 [ 1, %5 ], [ -1, %3 ]
ret i32 %8
}
/* Type definitions */
struct c_array {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _c_free(struct c_array *, char *, int);
int /*<<< orphan*/ c_array_uninit(struct c_array *);
void c_array_destroy(struct c_array *a) {
  c_array_uninit(a);
  do {
    _c_free(
        a,
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/c4pt0r/cutils/refs/heads/master/c_array.c",
        26);
    (a) = NULL;
  } while (0);
}


x86 assembly (clang, -O0):
<c_array_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <c_array_uninit@plt>
mov    -0x8(%rbp),%rdi
lea    0xec0(%rip),%rsi
mov    $0x1a,%edx
call   1030 <_c_free@plt>
movq   $0x0,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_array_destroy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <c_array_uninit@plt>
lea    0xed0(%rip),%rsi
mov    %rbx,%rdi
mov    $0x1a,%edx
pop    %rbx
jmp    1030 <_c_free@plt>

LLVM IR (-O0):
%struct.c_array = type { i32 }
@.str = [132 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/c4pt0r/cutils/refs/heads/master/c_array.c\00"
define void @c_array_destroy(%struct.c_array* %0) {
%2 = alloca %struct.c_array*
store %struct.c_array* %0, %struct.c_array** %2
%3 = load %struct.c_array*, %struct.c_array** %2
%4 = call i32 @c_array_uninit(%struct.c_array* %3)
br label %5
5: ; preds = %1
%6 = load %struct.c_array*, %struct.c_array** %2
%7 = call i32 @_c_free(%struct.c_array* %6, i8* getelementptr inbounds ([132 x i8], [132 x i8]* @.str, i64 0, i64 0), i32 26)
store %struct.c_array* null, %struct.c_array** %2
br label %8
8: ; preds = %5
ret void
}

LLVM IR (-O2):
%struct.c_array = type { i32 }
@.str = [132 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/c4pt0r/cutils/refs/heads/master/c_array.c\00"
define void @c_array_destroy(%struct.c_array* %0) {
%2 = tail call i32 @c_array_uninit(%struct.c_array* %0)
%3 = tail call i32 @_c_free(%struct.c_array* %0, i8* getelementptr inbounds ([132 x i8], [132 x i8]* @.str, i64 0, i64 0), i32 26)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ XModifierKeymap;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XModifierKeymap(void *_p) {
  if (_p == NULL)
    abort();
  free((XModifierKeymap *)_p);
}


x86 assembly (clang, -O0):
<free_XModifierKeymap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XModifierKeymap+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XModifierKeymap>:
test   %rdi,%rdi
je     112a <free_XModifierKeymap+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XModifierKeymap(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XModifierKeymap(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
void free_key_block(unsigned long id) { return; }


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

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

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

LLVM IR (-O2):
define void @free_key_block(i64 %0) {
ret void
}
/* Variables and functions */
int main();
int ymain(void) { return main(); }


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

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

LLVM IR (-O0):
define i32 @ymain() {
%1 = call i32 (...) @main()
ret i32 %1
}

LLVM IR (-O2):
define i32 @ymain() {
%1 = tail call i32 (...) @main()
ret i32 %1
}
/* Type definitions */
struct expr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ expr_print(struct expr *);
int /*<<< orphan*/ printf(char *);
void expr_println(struct expr *e) {
  expr_print(e);
  printf("\n");
}


x86 assembly (clang, -O0):
<expr_println>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <expr_print@plt>
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expr_println>:
push   %rax
call   1030 <expr_print@plt>
mov    $0xa,%edi
pop    %rax
jmp    1040 <putchar@plt>

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

LLVM IR (-O2):
%struct.expr = type { i32 }
define void @expr_println(%struct.expr* %0) {
%2 = tail call i32 @expr_print(%struct.expr* %0)
%3 = tail call i32 @putchar(i32 10)
ret void
}
void traceCall(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
  __builtin_trap();
}


x86 assembly (clang, -O0):
<traceCall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x0,%al
call   1030 <xlogf@plt>
ud2
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<traceCall>:
push   %rax
mov    %rdi,%rdx
lea    0xee5(%rip),%rdi
lea    0xeed(%rip),%rsi
xor    %eax,%eax
call   1030 <xlogf@plt>
ud2

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.traceCall = [10 x i8] c"traceCall\00"
define void @traceCall(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.traceCall, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.traceCall = [10 x i8] c"traceCall\00"
define void @traceCall(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.traceCall, i64 0, i64 0), i8* %0)
tail call void @llvm.trap()
unreachable
}
/* Type definitions */
typedef union ghw_type {
  int dummy;
} ghw_type;

/* Variables and functions */
char *ghw_get_lit(union ghw_type *, int);
int /*<<< orphan*/ printf(char *, char *, int);
void ghw_disp_lit(union ghw_type *type, int e) {
  printf("%s (%d)", ghw_get_lit(type, e), e);
}


x86 assembly (clang, -O0):
<ghw_disp_lit>:
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   1040 <ghw_get_lit@plt>
mov    %rax,%rsi
mov    -0xc(%rbp),%edx
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ghw_disp_lit>:
push   %rbx
mov    %esi,%ebx
call   1040 <ghw_get_lit@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
mov    %ebx,%edx
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
%union.ghw_type = type { i32 }
@.str = [8 x i8] c"%s (%d)\00"
define void @ghw_disp_lit(%union.ghw_type* %0, i32 %1) {
%3 = tail call i8* @ghw_get_lit(%union.ghw_type* %0, i32 %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %1)
ret void
}
/* Variables and functions */
int blowfish_main();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int main_result;
  main_result = 0;
  main_result = blowfish_main();
  printf("%d\n", main_result);
  return main_result;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <blowfish_main@plt>
mov    %eax,%ebx
lea    0xecf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @blowfish_main()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void exitfunc0(void) {
  printf("Executing exitfunc0.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<exitfunc0>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc0>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Executing exitfunc0.\0A\00"
define void @exitfunc0() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [21 x i8] c"Executing exitfunc0.\00"
define void @exitfunc0() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void *realloc(void *, size_t);
void *nrealloc(void *ptr, size_t howmuch) {
  void *r = realloc(ptr, howmuch);
  if (howmuch == 0)
    die("Allocating zero bytes.  Please report a bug.\n");
  if (r == NULL)
    die(("Nano is out of memory!\n"));
  return r;
}


x86 assembly (clang, -O0):
<nrealloc>:
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   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1158 <nrealloc+0x38>
lea    0xead(%rip),%rdi
call   1040 <die@plt>
cmpq   $0x0,-0x18(%rbp)
jne    116f <nrealloc+0x4f>
lea    0xec4(%rip),%rdi
call   1040 <die@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrealloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1030 <realloc@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1144 <nrealloc+0x24>
test   %r14,%r14
je     1155 <nrealloc+0x35>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xeb5(%rip),%rdi
call   1040 <die@plt>
test   %r14,%r14
jne    1139 <nrealloc+0x19>
lea    0xed2(%rip),%rdi
call   1040 <die@plt>
jmp    1139 <nrealloc+0x19>

LLVM IR (-O0):
@.str = [46 x i8] c"Allocating zero bytes. Please report a bug.\0A\00"
@.str.1 = [24 x i8] c"Nano is out of memory!\0A\00"
define i8* @nrealloc(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 i64, i64* %4
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @die(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @die(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %16, %13
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
@.str = [46 x i8] c"Allocating zero bytes. Please report a bug.\0A\00"
@.str.1 = [24 x i8] c"Nano is out of memory!\0A\00"
define noalias i8* @nrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i64 %1, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @die(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
%8 = icmp eq i8* %3, null
br i1 %8, label %9, label %11
9: ; preds = %7
%10 = tail call i32 @die(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
ret i8* %3
}
/* Variables and functions */
scalar_t__ isdigit(char const);
int atoi(const char *s) {
  int r = 0;
  while (isdigit(*s))
    r = r * 10 + *s++ - '0';
  return r;
}


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     115c <atoi+0x4c>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <atoi+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     1153 <atoi+0x43>
add    $0x1,%rbx
xor    %r14d,%r14d
nopl   0x0(%rax,%rax,1)
lea    (%r14,%r14,4),%eax
movsbl -0x1(%rbx),%ecx
lea    (%rcx,%rax,2),%r14d
add    $0xffffffd0,%r14d
movsbl (%rbx),%edi
call   1030 <isdigit@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1130 <atoi+0x20>
jmp    1156 <atoi+0x46>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @isdigit(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %17, label %5
5: ; preds = %1, %5
%6 = phi i32 [ %13, %5 ], [ 0, %1 ]
%7 = phi i8* [ %9, %5 ], [ %0, %1 ]
%8 = mul nsw i32 %6, 10
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %7
%11 = sext i8 %10 to i32
%12 = add i32 %8, -48
%13 = add i32 %12, %11
%14 = load i8, i8* %9
%15 = tail call i64 @isdigit(i8 signext %14)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %5
17: ; preds = %5, %1
%18 = phi i32 [ 0, %1 ], [ %13, %5 ]
ret i32 %18
}