xunge/DecIR huggingface dataset:
double groundLevel(double x, double z) { return -z; }


x86 assembly (clang, -O0):
<groundLevel>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<groundLevel>:
movaps %xmm1,%xmm0
xorps  0xef6(%rip),%xmm0
ret

LLVM IR (-O0):
define double @groundLevel(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fneg double %5
ret double %6
}

LLVM IR (-O2):
define double @groundLevel(double %0, double %1) {
%3 = fneg double %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void license(void) {
  fprintf(
      stderr,
      "bzip2, a block-sorting file compressor.  "
      "Version 0.9.5d, 4-Sept-99.\n"
      "   \n"
      "   Copyright (C) 1996, 1997, 1998, 1999 by Julian Seward.\n"
      "   \n"
      "   This program is free software; you can redistribute it and/or "
      "modify\n"
      "   it under the terms set out in the LICENSE file, which is included\n"
      "   in the bzip2-0.9.5 source distribution.\n"
      "   \n"
      "   This program is distributed in the hope that it will be useful,\n"
      "   but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
      "   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
      "   LICENSE file for more details.\n"
      "   \n");
}


x86 assembly (clang, -O0):
<license>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<license>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [559 x i8] c"bzip2, a block-sorting file compressor. Version 0.9.5d, 4-Sept-99.\0A \0A Copyright (C) 1996, 1997, 1998, 1999 by Julian Seward.\0A \0A This program is free software; you can redistribute it and/or modify\0A it under the terms set out in the LICENSE file, which is included\0A in the bzip2-0.9.5 source distribution.\0A \0A This program is distributed in the hope that it will be useful,\0A but WITHOUT ANY WARRANTY; without even the implied warranty of\0A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\0A LICENSE file for more details.\0A \0A\00"
define void @license() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([559 x i8], [559 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [559 x i8] c"bzip2, a block-sorting file compressor. Version 0.9.5d, 4-Sept-99.\0A \0A Copyright (C) 1996, 1997, 1998, 1999 by Julian Seward.\0A \0A This program is free software; you can redistribute it and/or modify\0A it under the terms set out in the LICENSE file, which is included\0A in the bzip2-0.9.5 source distribution.\0A \0A This program is distributed in the hope that it will be useful,\0A but WITHOUT ANY WARRANTY; without even the implied warranty of\0A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\0A LICENSE file for more details.\0A \0A\00"
define void @license() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([559 x i8], [559 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned long string_new(char *);
unsigned long int true_to_s() { return string_new("true"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"true\00"
define i64 @true_to_s() {
%1 = call i64 @string_new(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i64 %1
}

LLVM IR (-O2):
@.str = [5 x i8] c"true\00"
define i64 @true_to_s() {
%1 = tail call i64 @string_new(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i64 %1
}
/* Variables and functions */
float stress_funccall_float_1(float const);
float stress_funcdeep_float_6(float const, float const, float const,
                              float const, float const, float const);
float __attribute__((no))
stress_funcdeep_float_7(const float a, const float b, const float c,
                        const float d, const float e, const float f,
                        const float g) {
  return stress_funcdeep_float_6(g, f, e, d, c, b) + stress_funccall_float_1(a);
}


x86 assembly (clang, -O0):
<stress_funcdeep_float_7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  %xmm6,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
movss  -0xc(%rbp),%xmm4
movss  -0x8(%rbp),%xmm5
call   1030 <stress_funcdeep_float_6@plt>
movss  %xmm0,-0x20(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <stress_funccall_float_1@plt>
movaps %xmm0,%xmm1
movss  -0x20(%rbp),%xmm0
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_funcdeep_float_7>:
push   %rax
movaps %xmm2,%xmm7
movaps %xmm1,%xmm8
movss  %xmm0,0x4(%rsp)
movaps %xmm6,%xmm0
movaps %xmm5,%xmm1
movaps %xmm4,%xmm2
movaps %xmm7,%xmm4
movaps %xmm8,%xmm5
call   1030 <stress_funcdeep_float_6@plt>
movss  %xmm0,(%rsp)
movss  0x4(%rsp),%xmm0
call   1040 <stress_funccall_float_1@plt>
addss  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @stress_funcdeep_float_7(float %0, float %1, float %2, float %3, float %4, float %5, float %6) {
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
store float %0, float* %8
store float %1, float* %9
store float %2, float* %10
store float %3, float* %11
store float %4, float* %12
store float %5, float* %13
store float %6, float* %14
%15 = load float, float* %14
%16 = load float, float* %13
%17 = load float, float* %12
%18 = load float, float* %11
%19 = load float, float* %10
%20 = load float, float* %9
%21 = call float @stress_funcdeep_float_6(float %15, float %16, float %17, float %18, float %19, float %20)
%22 = load float, float* %8
%23 = call float @stress_funccall_float_1(float %22)
%24 = fadd float %21, %23
ret float %24
}

LLVM IR (-O2):
define float @stress_funcdeep_float_7(float %0, float %1, float %2, float %3, float %4, float %5, float %6) {
%8 = tail call float @stress_funcdeep_float_6(float %6, float %5, float %4, float %3, float %2, float %1)
%9 = tail call float @stress_funccall_float_1(float %0)
%10 = fadd float %8, %9
ret float %10
}
unsigned long long hashtable_hash_key_djb2(const char *string) {
  unsigned long long hash;
  const char *ptr_string;
  hash = 5381;
  for (ptr_string = string; ptr_string[0]; ptr_string++) {
    hash ^= (hash << 5) + (hash >> 2) + (int)(ptr_string[0]);
  }
  return hash;
}


x86 assembly (clang, -O0):
<hashtable_hash_key_djb2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     115e <hashtable_hash_key_djb2+0x5e>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
mov    -0x10(%rbp),%rcx
shr    $0x2,%rcx
add    %rcx,%rax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
movslq %ecx,%rcx
add    %rcx,%rax
xor    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <hashtable_hash_key_djb2+0x18>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashtable_hash_key_djb2>:
mov    (%rdi),%cl
test   %cl,%cl
je     1137 <hashtable_hash_key_djb2+0x37>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
mov    %rax,%rsi
shr    $0x2,%rsi
add    %rdx,%rsi
movsbq %cl,%rcx
add    %rsi,%rcx
xor    %rcx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hashtable_hash_key_djb2+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @hashtable_hash_key_djb2(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %15, %4 ], [ %2, %1 ]
%6 = phi i8* [ %14, %4 ], [ %0, %1 ]
%7 = phi i64 [ %13, %4 ], [ 5381, %1 ]
%8 = shl i64 %7, 5
%9 = lshr i64 %7, 2
%10 = add i64 %8, %9
%11 = sext i8 %5 to i64
%12 = add i64 %10, %11
%13 = xor i64 %12, %7
%14 = getelementptr inbounds i8, i8* %6, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %4
17: ; preds = %4, %1
%18 = phi i64 [ 5381, %1 ], [ %13, %4 ]
ret i64 %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void del_rule() {
  system("netsh advfirewall firewall delete rule name=\"LoL Chat OFF\"");
  printf("Done.\n");
}


x86 assembly (clang, -O0):
<del_rule>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <system@plt>
lea    0xf04(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<del_rule>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <system@plt>
lea    0xf07(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"netsh advfirewall firewall delete rule name=\22LoL Chat OFF\22\00"
@.str.1 = [7 x i8] c"Done.\0A\00"
define void @del_rule() {
%1 = call i32 @system(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c"netsh advfirewall firewall delete rule name=\22LoL Chat OFF\22\00"
@str = [6 x i8] c"Done.\00"
define void @del_rule() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ minor_code;
};
typedef TYPE_1__ XErrorEvent;

/* Variables and functions */
unsigned char get_XErrorEvent_minor_code(void *_p) {
  return (unsigned char)((XErrorEvent *)_p)->minor_code;
}


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

x86 assembly (clang, -O2):
<get_XErrorEvent_minor_code>:
mov    (%rdi),%al
ret

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

LLVM IR (-O2):
define zeroext i8 @get_XErrorEvent_minor_code(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i8
ret i8 %4
}
unsigned short zigzagenc16(short x) { return x << 1 ^ x >> 15; }


x86 assembly (clang, -O0):
<zigzagenc16>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
shl    $0x1,%eax
movswl -0x2(%rbp),%ecx
sar    $0xf,%ecx
xor    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zigzagenc16>:
lea    (%rdi,%rdi,1),%eax
sar    $0xf,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @zigzagenc16(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = shl i32 %4, 1
%6 = load i16, i16* %2
%7 = sext i16 %6 to i32
%8 = ashr i32 %7, 15
%9 = xor i32 %5, %8
%10 = trunc i32 %9 to i16
ret i16 %10
}

LLVM IR (-O2):
define zeroext i16 @zigzagenc16(i16 signext %0) {
%2 = shl i16 %0, 1
%3 = ashr i16 %0, 15
%4 = xor i16 %2, %3
ret i16 %4
}
int test_imm_3Bint64_lowword_reg(long long val) {
  return ((val) & (0x3B << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_3Bint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 59
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int test_imm_97int64_lowword_reg(long long val) {
  return ((val) & (0x97 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_97int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 151
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int setfileattr(f, a)
char *f;
int a;
{ return chmod(f, a); }


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

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

LLVM IR (-O0):
define i32 @setfileattr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @chmod to i32 (i8*, i32, ...)*)(i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @setfileattr(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @chmod to i32 (i8*, i32, ...)*)(i8* %0, i32 %1)
ret i32 %3
}
int test_imm_C4uint8_reg(unsigned char val) {
  return ((val) & (0xC4 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_C4uint8_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, 196
%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_C4uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -60
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int fun328() { return 328; }


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

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

LLVM IR (-O0):
define i32 @fun328() {
ret i32 328
}

LLVM IR (-O2):
define i32 @fun328() {
ret i32 328
}
/* Variables and functions */
int /*<<< orphan*/ memcmp(void *, void *, size_t);
void uninitvar_memcmp(void) {
  void *s1;
  void *s2;
  size_t n;
  (void)memcmp(s1, s2, n);
}


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

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

LLVM IR (-O0):
define void @uninitvar_memcmp() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i64
%4 = load i8*, i8** %1
%5 = load i8*, i8** %2
%6 = load i64, i64* %3
%7 = call i32 @memcmp(i8* %4, i8* %5, i64 %6)
ret void
}

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

/* Variables and functions */
int /*<<< orphan*/ _mm_srli_epi32(int /*<<< orphan*/, int);
__m128i test_mm_srli_epi32_1(__m128i A) { return _mm_srli_epi32(A, -1); }


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

x86 assembly (clang, -O2):
<test_mm_srli_epi32_1>:
mov    $0xffffffff,%esi
jmp    1030 <_mm_srli_epi32@plt>

LLVM IR (-O0):
define i32 @test_mm_srli_epi32_1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_mm_srli_epi32(i32 %3, i32 -1)
ret i32 %4
}

LLVM IR (-O2):
define i32 @test_mm_srli_epi32_1(i32 %0) {
%2 = tail call i32 @_mm_srli_epi32(i32 %0, i32 -1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ dlink_delete_first();
void *peek();
void *pop() {
  void *p = peek();
  dlink_delete_first();
  return p;
}


x86 assembly (clang, -O0):
<pop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <peek@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <dlink_delete_first@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pop>:
push   %rbx
xor    %eax,%eax
call   1030 <peek@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <dlink_delete_first@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @pop() {
%1 = alloca i8*
%2 = call i8* (...) @peek()
store i8* %2, i8** %1
%3 = call i32 (...) @dlink_delete_first()
%4 = load i8*, i8** %1
ret i8* %4
}

LLVM IR (-O2):
define i8* @pop() {
%1 = tail call i8* (...) @peek()
%2 = tail call i32 (...) @dlink_delete_first()
ret i8* %1
}
int base() { return 10; }


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

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

LLVM IR (-O0):
define i32 @base() {
ret i32 10
}

LLVM IR (-O2):
define i32 @base() {
ret i32 10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x2b() {
  Assert_real((isbdigit(43) == 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",
              220, ("isbdigit should be 0 for +"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x2b>:
push   %rax
mov    $0x2b,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xdc,%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 +\00"
define void @t_isbdigit_0x2b() {
%1 = call i64 @isbdigit(i32 43)
%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 220, 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 +\00"
define void @t_isbdigit_0x2b() {
%1 = tail call i64 @isbdigit(i32 43)
%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 220, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ posix_io();
int /*<<< orphan*/ stream_io();
int main(void) {
  stream_io();
  posix_io();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @stream_io()
%2 = tail call i32 (...) @posix_io()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int n, f = 1;
  for (n = 1; n <= 10; n++) {
    f = f * n;
  }
  printf("%d\n", f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     114f <main+0x3f>
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3628800)
ret i32 0
}
int NewFile() { return 1; }


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

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

LLVM IR (-O0):
define i32 @NewFile() {
ret i32 1
}

LLVM IR (-O2):
define i32 @NewFile() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) { printf("Hello World"); }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ASN1_UTF8STRING_new() {
ret void
}
void acpi_pci_slot_init(void) {}


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

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

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

LLVM IR (-O2):
define void @acpi_pci_slot_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ msgBell(int *);
void msg_bell_(int *const STATUS) {
  int status;
  status = *STATUS;
  msgBell(&status);
  *STATUS = status;
}


x86 assembly (clang, -O0):
<msg_bell_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <msgBell@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_bell_>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    (%rdi),%eax
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <msgBell@plt>
mov    0xc(%rsp),%eax
mov    %eax,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @msg_bell_(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
store i32 %5, i32* %3
%6 = call i32 @msgBell(i32* %3)
%7 = load i32, i32* %3
%8 = load i32*, i32** %2
store i32 %7, i32* %8
ret void
}

LLVM IR (-O2):
define void @msg_bell_(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* %0
store i32 %4, i32* %2
%5 = call i32 @msgBell(i32* %2)
%6 = load i32, i32* %2
store i32 %6, i32* %0
ret void
}
/* Type definitions */
struct feature_pair {
  int dummy;
};
struct CovariateAnalysis {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void _emitJSONUniOffsetL(const struct feature_pair *pair,
                         const struct CovariateAnalysis *covan, FILE *fp) {}


x86 assembly (clang, -O0):
<_emitJSONUniOffsetL>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.feature_pair = type { i32 }
%struct.CovariateAnalysis = type { i32 }
define void @_emitJSONUniOffsetL(%struct.feature_pair* nocapture %0, %struct.CovariateAnalysis* nocapture %1, i32* nocapture %2) {
ret void
}
unsigned long xoconfig(void) {
  int ib = 0;
  union {
    long l;
    char c[4];
  } u;
  int is = (sizeof(int) == 4) ? 0x00020000 : 0;
  u.c[0] = 1;
  u.c[1] = 2;
  u.c[2] = 3;
  u.c[3] = 4;
  if (u.l == 0x01020304)
    ib = 0x00010000;
  return (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | is | ib;
}


x86 assembly (clang, -O0):
<xoconfig>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x20000,-0x14(%rbp)
movb   $0x1,-0x10(%rbp)
movb   $0x2,-0xf(%rbp)
movb   $0x3,-0xe(%rbp)
movb   $0x4,-0xd(%rbp)
cmpq   $0x1020304,-0x10(%rbp)
01
jne    1137 <xoconfig+0x37>
movl   $0x10000,-0x4(%rbp)
mov    -0x14(%rbp),%eax
or     $0xf,%eax
or     -0x4(%rbp),%eax
cltq
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { i64 }
define i64 @xoconfig() {
%1 = alloca i32
%2 = alloca %union.anon
%3 = alloca i32
store i32 0, i32* %1
store i32 131072, i32* %3
%4 = bitcast %union.anon* %2 to [4 x i8]*
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
store i8 1, i8* %5
%6 = bitcast %union.anon* %2 to [4 x i8]*
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 1
store i8 2, i8* %7
%8 = bitcast %union.anon* %2 to [4 x i8]*
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %8, i64 0, i64 2
store i8 3, i8* %9
%10 = bitcast %union.anon* %2 to [4 x i8]*
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %10, i64 0, i64 3
store i8 4, i8* %11
%12 = bitcast %union.anon* %2 to i64*
%13 = load i64, i64* %12
%14 = icmp eq i64 %13, 16909060
br i1 %14, label %15, label %16
15: ; preds = %0
store i32 65536, i32* %1
br label %16
16: ; preds = %15, %0
%17 = load i32, i32* %3
%18 = or i32 15, %17
%19 = load i32, i32* %1
%20 = or i32 %18, %19
%21 = sext i32 %20 to i64
ret i64 %21
}

LLVM IR (-O2):
define i64 @xoconfig() {
ret i64 131087
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void OS_mdelay(int milliseconds) { sleep((milliseconds - 1) / 1000 + 1); }


x86 assembly (clang, -O0):
<OS_mdelay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
add    $0x1,%edi
call   1030 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OS_mdelay>:
add    $0xffffffff,%edi
movslq %edi,%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
sar    $0x26,%rcx
shr    $0x3f,%rax
lea    (%rcx,%rax,1),%edi
add    $0x1,%edi
jmp    1030 <sleep@plt>

LLVM IR (-O0):
define void @OS_mdelay(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1
%5 = sdiv i32 %4, 1000
%6 = add nsw i32 %5, 1
%7 = call i32 @sleep(i32 %6)
ret void
}

LLVM IR (-O2):
define void @OS_mdelay(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = sdiv i32 %2, 1000
%4 = add nsw i32 %3, 1
%5 = tail call i32 @sleep(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_prompt();
int /*<<< orphan*/ printf(char *);
void sig_clean(int signum) {
  (void)signum;
  printf("^X\n");
  print_prompt();
}


x86 assembly (clang, -O0):
<sig_clean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <print_prompt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_clean>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <print_prompt@plt>

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

LLVM IR (-O2):
@str = [3 x i8] c"^X\00"
define void @sig_clean(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @print_prompt()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal_error(char *);
void *realloc(void *, size_t);
void *xrealloc(void *ptr, size_t size) {
  void *new;
  new = realloc(ptr, size);
  if (!new)
    fatal_error("memory allocation error");
  return new;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1158 <xrealloc+0x38>
lea    0xead(%rip),%rdi
call   1030 <fatal_error@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [24 x i8] c"memory allocation error\00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 @fatal_error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [24 x i8] c"memory allocation error\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @fatal_error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ free(double *);
void Free1D(double *data) {
  if (data != NULL) {
    free(data);
    data = NULL;
  }
}


x86 assembly (clang, -O0):
<Free1D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <Free1D+0x28>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Free1D>:
test   %rdi,%rdi
je     111a <Free1D+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @Free1D(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = icmp ne double* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double*, double** %2
%7 = call i32 @free(double* %6)
store double* null, double** %2
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @Free1D(double* %0) {
%2 = icmp eq double* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(double* %0)
br label %5
5: ; preds = %3, %1
ret void
}
int DUMMY_putline(long a, long b, long c, int d, unsigned char *e, int f) {
  return (0);
}


x86 assembly (clang, -O0):
<DUMMY_putline>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @DUMMY_putline(i64 %0, i64 %1, i64 %2, i32 %3, i8* %4, i32 %5) {
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
store i64 %0, i64* %7
store i64 %1, i64* %8
store i64 %2, i64* %9
store i32 %3, i32* %10
store i8* %4, i8** %11
store i32 %5, i32* %12
ret i32 0
}

LLVM IR (-O2):
define i32 @DUMMY_putline(i64 %0, i64 %1, i64 %2, i32 %3, i8* nocapture readnone %4, i32 %5) {
ret i32 0
}
/* Variables and functions */
int SIGUSR1;
void manager(int sig) {
  if (sig == SIGUSR1) {
    return;
  }
}


x86 assembly (clang, -O0):
<manager>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ed7(%rip),%rcx
cmp    (%rcx),%eax
jne    111e <manager+0x1e>
jmp    111e <manager+0x1e>
pop    %rbp
ret

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

LLVM IR (-O0):
@SIGUSR1 = global i32 0
define void @manager(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGUSR1
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@SIGUSR1 = global i32 0
define void @manager(i32 %0) {
ret void
}
/* Type definitions */
struct stack_st_OPENSSL_BLOCK {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
int OPENSSL_sk_find_ex(int /*<<< orphan*/ *, void const *);
int sk_OPENSSL_BLOCK_find_ex(struct stack_st_OPENSSL_BLOCK *sk, void *ptr) {
  return OPENSSL_sk_find_ex((OPENSSL_STACK *)sk, (const void *)ptr);
}


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

x86 assembly (clang, -O2):
<sk_OPENSSL_BLOCK_find_ex>:
jmp    1030 <OPENSSL_sk_find_ex@plt>

LLVM IR (-O0):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define i32 @sk_OPENSSL_BLOCK_find_ex(%struct.stack_st_OPENSSL_BLOCK* %0, i8* %1) {
%3 = alloca %struct.stack_st_OPENSSL_BLOCK*
%4 = alloca i8*
store %struct.stack_st_OPENSSL_BLOCK* %0, %struct.stack_st_OPENSSL_BLOCK** %3
store i8* %1, i8** %4
%5 = load %struct.stack_st_OPENSSL_BLOCK*, %struct.stack_st_OPENSSL_BLOCK** %3
%6 = bitcast %struct.stack_st_OPENSSL_BLOCK* %5 to i32*
%7 = load i8*, i8** %4
%8 = call i32 @OPENSSL_sk_find_ex(i32* %6, i8* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define i32 @sk_OPENSSL_BLOCK_find_ex(%struct.stack_st_OPENSSL_BLOCK* %0, i8* %1) {
%3 = getelementptr %struct.stack_st_OPENSSL_BLOCK, %struct.stack_st_OPENSSL_BLOCK* %0, i64 0, i32 0
%4 = tail call i32 @OPENSSL_sk_find_ex(i32* %3, i8* %1)
ret i32 %4
}
void vpitFinal() {}


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

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

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

LLVM IR (-O2):
define void @vpitFinal() {
ret void
}
void debug_cons_close(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ SHA256_Final(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ SHA256_Init(int /*<<< orphan*/ *);
int /*<<< orphan*/ SHA256_Update(int /*<<< orphan*/ *,
                                 int /*<<< orphan*/ const *, size_t);
void bbp_sha256(uint8_t *digest, const uint8_t *message, size_t len) {
  SHA256_CTX ctx;
  SHA256_Init(&ctx);
  SHA256_Update(&ctx, message, len);
  SHA256_Final(digest, &ctx);
}


x86 assembly (clang, -O0):
<bbp_sha256>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x1c(%rbp),%rdi
call   1030 <SHA256_Init@plt>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rdi
call   1050 <SHA256_Update@plt>
mov    -0x8(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <SHA256_Final@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbp_sha256>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
lea    0x4(%rsp),%r12
mov    %r12,%rdi
call   1030 <SHA256_Init@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <SHA256_Update@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <SHA256_Final@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @bbp_sha256(i32* %0, i32* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i64
%7 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%8 = call i32 @SHA256_Init(i32* %7)
%9 = load i32*, i32** %5
%10 = load i64, i64* %6
%11 = call i32 @SHA256_Update(i32* %7, i32* %9, i64 %10)
%12 = load i32*, i32** %4
%13 = call i32 @SHA256_Final(i32* %12, i32* %7)
ret void
}

LLVM IR (-O2):
define void @bbp_sha256(i32* %0, i32* %1, i64 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i32 @SHA256_Init(i32* %4)
%7 = call i32 @SHA256_Update(i32* %4, i32* %1, i64 %2)
%8 = call i32 @SHA256_Final(i32* %0, i32* %4)
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int stat(char const *, struct stat *);
int sysStat(const char *pszPath, struct stat *pBuf) {
  return stat(pszPath, pBuf);
}


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

x86 assembly (clang, -O2):
<sysStat>:
jmp    1030 <stat@plt>

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @sysStat(i8* nocapture %0, %struct.stat* nocapture %1) {
%3 = tail call i32 @stat(i8* %0, %struct.stat* %1)
ret i32 %3
}
float km_to_mi(float value) { return value * 0.6213711922f; }


x86 assembly (clang, -O0):
<km_to_mi>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<km_to_mi>:
mulss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @km_to_mi(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x3FE3E245E0000000
ret float %4
}

LLVM IR (-O2):
define float @km_to_mi(float %0) {
%2 = fmul float %0, 0x3FE3E245E0000000
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int func1() {
  int x = 3840;
  {
    extern int x;
    printf("%d\n", x);
    return x;
  }
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xf00,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func1>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%esi
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
mov    (%rbx),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@x = external global i32
define i32 @func1() {
%1 = load i32, i32* @x
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @x
ret i32 %3
}
unsigned int do_system_call(int function_number, unsigned p1, unsigned p2,
                            unsigned p3, unsigned p4, unsigned p5) {
  int return_value;
  __asm__ volatile("int $0x80"
                   : "=a"(return_value)
                   : "0"((long)(function_number)), "b"((long)(p1)),
                     "c"((long)(p2)), "d"((long)(p3)), "S"((long)(p4)),
                     "D"((long)(p5)));
  return return_value;
}


x86 assembly (clang, -O0):
<do_system_call>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
movslq -0xc(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %ecx,%ebx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edi
int    $0x80
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_system_call>:
push   %rbx
movslq %edi,%rax
mov    %esi,%ebx
mov    %edx,%r10d
mov    %ecx,%edx
mov    %r8d,%esi
mov    %r9d,%edi
mov    %r10,%rcx
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
define i32 @do_system_call(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%14 = load i32, i32* %7
%15 = sext i32 %14 to i64
%16 = load i32, i32* %8
%17 = zext i32 %16 to i64
%18 = load i32, i32* %9
%19 = zext i32 %18 to i64
%20 = load i32, i32* %10
%21 = zext i32 %20 to i64
%22 = load i32, i32* %11
%23 = zext i32 %22 to i64
%24 = load i32, i32* %12
%25 = zext i32 %24 to i64
%26 = call i64 asm sideeffect "int $$0x80", "={ax},0,{bx},{cx},{dx},{si},{di},~{dirflag},~{fpsr},~{flags}"(i64 %15, i64 %17, i64 %19, i64 %21, i64 %23, i64 %25)
%27 = trunc i64 %26 to i32
store i32 %27, i32* %13
%28 = load i32, i32* %13
ret i32 %28
}

LLVM IR (-O2):
define i32 @do_system_call(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = sext i32 %0 to i64
%8 = zext i32 %1 to i64
%9 = zext i32 %2 to i64
%10 = zext i32 %3 to i64
%11 = zext i32 %4 to i64
%12 = zext i32 %5 to i64
%13 = tail call i64 asm sideeffect "int $$0x80", "={ax},0,{bx},{cx},{dx},{si},{di},~{dirflag},~{fpsr},~{flags}"(i64 %7, i64 %8, i64 %9, i64 %10, i64 %11, i64 %12)
%14 = trunc i64 %13 to i32
ret i32 %14
}