xunge/DecIR huggingface dataset:
/* Variables and functions */
long long opt_numint_gcd(long long, long long);
long long int opt_numint_lcm(long long int a, long long int b) {
  long long int gcd = opt_numint_gcd(a, b);
  return (a / (gcd)) * b;
}


x86 assembly (clang, -O0):
<opt_numint_lcm>:
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 <opt_numint_gcd@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cqto
idivq  -0x18(%rbp)
imul   -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_numint_lcm>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <opt_numint_gcd@plt>
mov    %rax,%rcx
or     %rbx,%rax
shr    $0x20,%rax
je     1135 <opt_numint_lcm+0x25>
mov    %rbx,%rax
cqto
idiv   %rcx
jmp    113b <opt_numint_lcm+0x2b>
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
imul   %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @opt_numint_lcm(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i64 @opt_numint_gcd(i64 %6, i64 %7)
store i64 %8, i64* %5
%9 = load i64, i64* %3
%10 = load i64, i64* %5
%11 = sdiv i64 %9, %10
%12 = load i64, i64* %4
%13 = mul nsw i64 %11, %12
ret i64 %13
}

LLVM IR (-O2):
define i64 @opt_numint_lcm(i64 %0, i64 %1) {
%3 = tail call i64 @opt_numint_gcd(i64 %0, i64 %1)
%4 = sdiv i64 %0, %3
%5 = mul nsw i64 %4, %1
ret i64 %5
}
unsigned char cf_inb(volatile unsigned char *addr) {
  volatile unsigned char c;
  c = *(addr);
  return c;
}


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

x86 assembly (clang, -O2):
<cf_inb>:
mov    (%rdi),%al
mov    %al,-0x1(%rsp)
mov    -0x1(%rsp),%al
ret

LLVM IR (-O0):
define zeroext i8 @cf_inb(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load volatile i8, i8* %4
store volatile i8 %5, i8* %3
%6 = load volatile i8, i8* %3
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @cf_inb(i8* %0) {
%2 = alloca i8
%3 = load volatile i8, i8* %0
store volatile i8 %3, i8* %2
%4 = load volatile i8, i8* %2
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  union exam {
    int a;
    float b;
  };
  union exam *p, x;
  p = &x;
  x.a = 3;
  printf("%d\n", p->a);
  p->b = 4.5;
  printf("%f\n", x.b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x3,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
movss  0xeb4(%rip),%xmm0
movss  %xmm0,(%rax)
cvttss2si -0x18(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%union.exam = type { i32 }
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %union.exam*
%3 = alloca %union.exam
store i32 0, i32* %1
store %union.exam* %3, %union.exam** %2
%4 = bitcast %union.exam* %3 to i32*
store i32 3, i32* %4
%5 = load %union.exam*, %union.exam** %2
%6 = bitcast %union.exam* %5 to i32*
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load %union.exam*, %union.exam** %2
%10 = bitcast %union.exam* %9 to float*
store float 4.500000e+00, float* %10
%11 = bitcast %union.exam* %3 to float*
%12 = load float, float* %11
%13 = fptosi float %12 to i32
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
%union.exam = type { i32 }
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%f\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 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 4)
ret i32 0
}
int foo(int a) {
  int x;
  x = 0;
  if (a > 0)
    x = 1;
  if (a < 0)
    x = 1;
  return x;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    111f <foo+0x1f>
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1130 <foo+0x30>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
int f_blg_rm1(float a1, float *a2) {
  return (__builtin_islessgreater(a1, *a2));
}


x86 assembly (clang, -O0):
<f_blg_rm1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x10(%rbp),%rax
ucomiss (%rax),%xmm0
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_blg_rm1>:
xor    %eax,%eax
ucomiss (%rdi),%xmm0
setne  %al
ret

LLVM IR (-O0):
define i32 @f_blg_rm1(float %0, float* %1) {
%3 = alloca float
%4 = alloca float*
store float %0, float* %3
store float* %1, float** %4
%5 = load float, float* %3
%6 = load float*, float** %4
%7 = load float, float* %6
%8 = fcmp one float %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @f_blg_rm1(float %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = fcmp one float %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
int fun1381() { return 1381; }


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

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

LLVM IR (-O0):
define i32 @fun1381() {
ret i32 1381
}

LLVM IR (-O2):
define i32 @fun1381() {
ret i32 1381
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
int Xendc(int status, char *label, char *mnemo, char *oper) {
  if (oper)
    error("no operand allowed for ENDC");
  return 0x11;
}


x86 assembly (clang, -O0):
<Xendc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     113e <Xendc+0x2e>
lea    0xec7(%rip),%rdi
call   1030 <error@plt>
mov    $0x11,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Xendc>:
test   %rcx,%rcx
je     1126 <Xendc+0x16>
push   %rax
lea    0xee3(%rip),%rdi
call   1030 <error@plt>
add    $0x8,%rsp
mov    $0x11,%eax
ret

LLVM IR (-O0):
@.str = [28 x i8] c"no operand allowed for ENDC\00"
define i32 @Xendc(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %8
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %4
%12 = call i32 @error(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %4
ret i32 17
}

LLVM IR (-O2):
@.str = [28 x i8] c"no operand allowed for ENDC\00"
define i32 @Xendc(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* readnone %3) {
%5 = icmp eq i8* %3, null
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @error(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret i32 17
}
/* Variables and functions */
int /*<<< orphan*/ FILENAME_MAX;
int /*<<< orphan*/ get_data_dir(char *);
int /*<<< orphan*/ snprintf(char *, int /*<<< orphan*/, char *, char *);
void get_log_file_path(char *buf) {
  char dir[FILENAME_MAX - 13];
  get_data_dir(dir);
  snprintf(buf, FILENAME_MAX, "%s/entries.log", dir);
}


x86 assembly (clang, -O0):
<get_log_file_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%eax
add    $0xfffffff3,%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x20(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
call   1040 <get_data_dir@plt>
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rdi
mov    0x2e79(%rip),%rax
mov    (%rax),%esi
lea    0xe88(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_log_file_path>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    0x2eb4(%rip),%r15
mov    (%r15),%eax
add    $0xfffffff3,%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
call   1040 <get_data_dir@plt>
mov    (%r15),%esi
lea    0xea3(%rip),%rdx
mov    %r14,%rdi
mov    %rbx,%rcx
call   1030 <snprintf@plt>
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@FILENAME_MAX = global i32 0
@.str = [15 x i8] c"%s/entries.log\00"
define void @get_log_file_path(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i32, i32* @FILENAME_MAX
%6 = sub nsw i32 %5, 13
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %3
%9 = alloca i8, i64 %7
store i64 %7, i64* %4
%10 = call i32 @get_data_dir(i8* %9)
%11 = load i8*, i8** %2
%12 = load i32, i32* @FILENAME_MAX
%13 = call i32 @snprintf(i8* %11, i32 %12, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %9)
%14 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
@FILENAME_MAX = global i32 0
@.str = [15 x i8] c"%s/entries.log\00"
define void @get_log_file_path(i8* %0) {
%2 = load i32, i32* @FILENAME_MAX
%3 = add nsw i32 %2, -13
%4 = zext i32 %3 to i64
%5 = alloca i8, i64 %4
%6 = call i32 @get_data_dir(i8* %5)
%7 = load i32, i32* @FILENAME_MAX
%8 = call i32 @snprintf(i8* %0, i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}
/* Variables and functions */
int call2(int, int, int);
int op_if(int condition, int consequent, int alternative) {
  return call2(condition, alternative, consequent);
}


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

x86 assembly (clang, -O2):
<op_if>:
mov    %esi,%eax
mov    %edx,%esi
mov    %eax,%edx
jmp    1030 <call2@plt>

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

LLVM IR (-O2):
define i32 @op_if(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @call2(i32 %0, i32 %2, i32 %1)
ret i32 %4
}
unsigned long read_tsc(void) {
  unsigned a, d;
  __asm __volatile("rdtsc" : "=a"(a), "=d"(d));
  return ((unsigned long)a) | (((unsigned long)d) << 32);
}


x86 assembly (clang, -O0):
<read_tsc>:
push   %rbp
mov    %rsp,%rbp
rdtsc
mov    %eax,-0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x20,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_tsc>:
rdtsc
mov    %eax,%eax
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @read_tsc() {
%1 = alloca i32
%2 = alloca i32
%3 = call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%4 = extractvalue { i32, i32 } %3, 0
%5 = extractvalue { i32, i32 } %3, 1
store i32 %4, i32* %1
store i32 %5, i32* %2
%6 = load i32, i32* %1
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = shl i64 %9, 32
%11 = or i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @read_tsc() {
%1 = tail call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%2 = extractvalue { i32, i32 } %1, 0
%3 = extractvalue { i32, i32 } %1, 1
%4 = zext i32 %2 to i64
%5 = zext i32 %3 to i64
%6 = shl nuw i64 %5, 32
%7 = or i64 %6, %4
ret i64 %7
}
int win_parallel_init(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @win_parallel_init() {
ret i32 1
}
/* Variables and functions */
int strcmp(char const *, char const *);
int sort_utils_string_icmp(const void *const a, const void *const b) {
  const char **x = (const char **)a;
  const char **y = (const char **)b;
  return strcmp(*y, *x);
}


x86 assembly (clang, -O0):
<sort_utils_string_icmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
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    -0x20(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort_utils_string_icmp>:
mov    (%rsi),%rax
mov    (%rdi),%rsi
mov    %rax,%rdi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @sort_utils_string_icmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int getFileSize(char *filename) {
  struct stat statBuf;
  if (stat(filename, &statBuf) == 0) {
    return statBuf.st_size;
  }
  return -1;
}


x86 assembly (clang, -O0):
<getFileSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jne    113e <getFileSize+0x2e>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1145 <getFileSize+0x35>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFileSize>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
neg    %rax
sbb    %eax,%eax
or     (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @getFileSize(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%10 = load i32, i32* %9
store i32 %10, i32* %2
br label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %12
12: ; preds = %11, %8
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @getFileSize(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 %7, i32 -1
ret i32 %8
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
char CHAR_BIT;
int /*<<< orphan*/ assert(int);
void flip_bit(volatile uint8_t *byte, char bit_num) {
  assert(bit_num < CHAR_BIT);
  *byte ^= ~(1 << bit_num);
  *byte = ~(*byte);
}


x86 assembly (clang, -O0):
<flip_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
mov    0x2eb3(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsbl -0x9(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
xor    %edx,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flip_bit>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2ec1(%rip),%rax
xor    %edi,%edi
cmp    %bpl,(%rax)
setg   %dil
call   1030 <assert@plt>
mov    (%rbx),%eax
btc    %ebp,%eax
not    %eax
mov    %eax,(%rbx)
notl   (%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@CHAR_BIT = global i8 0
define void @flip_bit(i32* %0, i8 signext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = load i8, i8* @CHAR_BIT
%8 = sext i8 %7 to i32
%9 = icmp slt i32 %6, %8
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = shl i32 1, %13
%15 = xor i32 %14, -1
%16 = load i32*, i32** %3
%17 = load volatile i32, i32* %16
%18 = xor i32 %17, %15
store volatile i32 %18, i32* %16
%19 = load i32*, i32** %3
%20 = load volatile i32, i32* %19
%21 = xor i32 %20, -1
%22 = load i32*, i32** %3
store volatile i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
@CHAR_BIT = global i8 0
define void @flip_bit(i32* %0, i8 signext %1) {
%3 = load i8, i8* @CHAR_BIT
%4 = icmp sgt i8 %3, %1
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = zext i8 %1 to i32
%8 = shl nuw i32 1, %7
%9 = load volatile i32, i32* %0
%10 = xor i32 %8, %9
%11 = xor i32 %10, -1
store volatile i32 %11, i32* %0
%12 = load volatile i32, i32* %0
%13 = xor i32 %12, -1
store volatile i32 %13, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void imprimir(int tabuleiro[8][8], char *passeio) { printf("%s\n", passeio); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @imprimir([8 x i32]* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void update_cs(int bc, uint32_t *p) { *p += bc + (1 << (19)); }


x86 assembly (clang, -O0):
<update_cs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x80000,%ecx
mov    -0x10(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_cs>:
mov    (%rsi),%eax
add    %edi,%eax
add    $0x80000,%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @update_cs(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 524288
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = add nsw i32 %8, %6
store i32 %9, i32* %7
ret void
}

LLVM IR (-O2):
define void @update_cs(i32 %0, i32* nocapture %1) {
%3 = add nsw i32 %0, 524288
%4 = load i32, i32* %1
%5 = add nsw i32 %3, %4
store i32 %5, i32* %1
ret void
}
/* Variables and functions */
int unlink(char const *);
__attribute__((__weak__, __always___)) int
softboundmpx_unlink(const char *pathname) {
  return unlink(pathname);
}


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

x86 assembly (clang, -O2):
<softboundmpx_unlink>:
jmp    1030 <unlink@plt>

LLVM IR (-O0):
define weak i32 @softboundmpx_unlink(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @unlink(i8* %3)
ret i32 %4
}

LLVM IR (-O2):
define weak i32 @softboundmpx_unlink(i8* %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x2d() {
  Assert_real((isspace(45) == 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_isspace.c",
              230, ("isspace should be 0 for -"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for -\00"
define void @t_isspace_0x2d() {
%1 = tail call i64 @isspace(i32 45)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 230, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct per_cpu_info {
  int dummy;
};
struct blk_io_trace {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ process_fmt(char *, struct per_cpu_info *,
                               struct blk_io_trace *, int, int /*<<< orphan*/,
                               int /*<<< orphan*/ *);
void log_queue(struct per_cpu_info *pci, struct blk_io_trace *t, char *act) {
  process_fmt(act, pci, t, -1, 0, NULL);
}


x86 assembly (clang, -O0):
<log_queue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0xffffffff,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
mov    %eax,%r9d
call   1030 <process_fmt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_queue>:
mov    %rdx,%rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rax,%rdi
mov    $0xffffffff,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <process_fmt@plt>

LLVM IR (-O0):
%struct.per_cpu_info = type { i32 }
%struct.blk_io_trace = type { i32 }
define void @log_queue(%struct.per_cpu_info* %0, %struct.blk_io_trace* %1, i8* %2) {
%4 = alloca %struct.per_cpu_info*
%5 = alloca %struct.blk_io_trace*
%6 = alloca i8*
store %struct.per_cpu_info* %0, %struct.per_cpu_info** %4
store %struct.blk_io_trace* %1, %struct.blk_io_trace** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load %struct.per_cpu_info*, %struct.per_cpu_info** %4
%9 = load %struct.blk_io_trace*, %struct.blk_io_trace** %5
%10 = call i32 @process_fmt(i8* %7, %struct.per_cpu_info* %8, %struct.blk_io_trace* %9, i32 -1, i32 0, i32* null)
ret void
}

LLVM IR (-O2):
%struct.per_cpu_info = type { i32 }
%struct.blk_io_trace = type { i32 }
define void @log_queue(%struct.per_cpu_info* %0, %struct.blk_io_trace* %1, i8* %2) {
%4 = tail call i32 @process_fmt(i8* %2, %struct.per_cpu_info* %0, %struct.blk_io_trace* %1, i32 -1, i32 0, i32* null)
ret void
}
__attribute__((always_)) void pci_disable_sriov(struct pci_dev *dev) {}


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

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

LLVM IR (-O0):
%struct.pci_dev = type opaque
define void @pci_disable_sriov(%struct.pci_dev* %0) {
%2 = alloca %struct.pci_dev*
store %struct.pci_dev* %0, %struct.pci_dev** %2
ret void
}

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @pci_disable_sriov(%struct.pci_dev* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void helpAndLeave(const char *progname, int status) {
  fprintf(stderr, "Usage: %s [-a] <file1> <file2> ... <fileN>\n", progname);
  exit(status);
}


x86 assembly (clang, -O0):
<helpAndLeave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<helpAndLeave>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"Usage: %s [-a] <file1> <file2> ... <fileN>\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %4
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"Usage: %s [-a] <file1> <file2> ... <fileN>\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
unsigned int x(unsigned int);
unsigned int f(unsigned int a, unsigned int b) { return x(a) << b; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <x@plt>
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
mov    %esi,%ebx
call   1030 <x@plt>
mov    %ebx,%ecx
shl    %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @x(i32 %5)
%7 = load i32, i32* %4
%8 = shl i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = tail call i32 @x(i32 %0)
%4 = shl i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int print_three(char *s) {
  printf(s);
  return 0;
}


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

x86 assembly (clang, -O2):
<print_three>:
push   %rax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @print_three(i8* nocapture %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) %0)
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int assign_dobldobl_coefficient_of_slice(int i, int j, double *r) {
  int fail;
  fail = _ada_use_c2phc(633, &i, &j, r);
  return fail;
}


x86 assembly (clang, -O0):
<assign_dobldobl_coefficient_of_slice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    $0x279,%edi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assign_dobldobl_coefficient_of_slice>:
push   %rax
mov    %rdx,%rcx
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
mov    $0x279,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @assign_dobldobl_coefficient_of_slice(i32 %0, i32 %1, double* %2) {
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 @_ada_use_c2phc(i32 633, i32* %4, i32* %5, double* %2)
ret i32 %6
}
int _getpid() {}


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

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

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

LLVM IR (-O2):
define i32 @_getpid() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void fsub_preg32_dword(int reg32) {
  put8(0xD8);
  put8(0x20 + reg32);
}


x86 assembly (clang, -O0):
<fsub_preg32_dword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xd8,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
add    $0x20,%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsub_preg32_dword>:
push   %rbx
mov    %edi,%ebx
mov    $0xd8,%edi
call   1030 <put8@plt>
add    $0x20,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @fsub_preg32_dword(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @put8(i32 216)
%4 = load i32, i32* %2
%5 = add nsw i32 32, %4
%6 = call i32 @put8(i32 %5)
ret void
}

LLVM IR (-O2):
define void @fsub_preg32_dword(i32 %0) {
%2 = tail call i32 @put8(i32 216)
%3 = add nsw i32 %0, 32
%4 = tail call i32 @put8(i32 %3)
ret void
}
/* Type definitions */
struct db_query {
  int dummy;
};
typedef int /*<<< orphan*/ sqlite3_stmt;

/* Variables and functions */
double sqlite3_column_double(int /*<<< orphan*/ *, int);
double db_column_double(struct db_query *query, int i) {
  if (query == NULL)
    return -1;
  return sqlite3_column_double((sqlite3_stmt *)query, i);
}


x86 assembly (clang, -O0):
<db_column_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    113c <db_column_double+0x2c>
movsd  0xece(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    114d <db_column_double+0x3d>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <sqlite3_column_double@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_column_double>:
test   %rdi,%rdi
je     111a <db_column_double+0xa>
jmp    1030 <sqlite3_column_double@plt>
movsd  0xede(%rip),%xmm0
ret

LLVM IR (-O0):
%struct.db_query = type { i32 }
define double @db_column_double(%struct.db_query* %0, i32 %1) {
%3 = alloca double
%4 = alloca %struct.db_query*
%5 = alloca i32
store %struct.db_query* %0, %struct.db_query** %4
store i32 %1, i32* %5
%6 = load %struct.db_query*, %struct.db_query** %4
%7 = icmp eq %struct.db_query* %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
store double -1.000000e+00, double* %3
br label %14
9: ; preds = %2
%10 = load %struct.db_query*, %struct.db_query** %4
%11 = bitcast %struct.db_query* %10 to i32*
%12 = load i32, i32* %5
%13 = call double @sqlite3_column_double(i32* %11, i32 %12)
store double %13, double* %3
br label %14
14: ; preds = %9, %8
%15 = load double, double* %3
ret double %15
}

LLVM IR (-O2):
%struct.db_query = type { i32 }
define double @db_column_double(%struct.db_query* %0, i32 %1) {
%3 = icmp eq %struct.db_query* %0, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = getelementptr %struct.db_query, %struct.db_query* %0, i64 0, i32 0
%6 = tail call double @sqlite3_column_double(i32* %5, i32 %1)
br label %7
7: ; preds = %2, %4
%8 = phi double [ %6, %4 ], [ -1.000000e+00, %2 ]
ret double %8
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void seek(uint32_t offset, FILE *infile) {
  if (-1 == fseek(infile, offset, SEEK_SET)) {
    fprintf(stderr, "seek to 0x%x failed\n", offset);
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<seek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    0x2e8b(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1189 <seek+0x59>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xe8a(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e4e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seek>:
push   %rbx
mov    %edi,%ebx
mov    0x2e9e(%rip),%rax
mov    (%rax),%edx
mov    %rsi,%rdi
mov    %ebx,%esi
call   1040 <fseek@plt>
cmp    $0xffffffff,%eax
je     114d <seek+0x1d>
pop    %rbx
ret
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
lea    0xea3(%rip),%rsi
mov    %ebx,%edx
call   1030 <fprintf@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@SEEK_SET = global i32 0
@stderr = global i32 0
@.str = [21 x i8] c"seek to 0x%x failed\0A\00"
@EXIT_FAILURE = global i32 0
define void @seek(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32, i32* %3
%7 = load i32, i32* @SEEK_SET
%8 = call i32 @fseek(i32* %5, i32 %6, i32 %7)
%9 = icmp eq i32 -1, %8
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i32, i32* %3
%13 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @exit(i32 %14)
unreachable
16: ; preds = %2
ret void
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
@stderr = global i32 0
@.str = [21 x i8] c"seek to 0x%x failed\0A\00"
@EXIT_FAILURE = global i32 0
define void @seek(i32 %0, i32* nocapture %1) {
%3 = load i32, i32* @SEEK_SET
%4 = tail call i32 @fseek(i32* %1, i32 %0, i32 %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %0)
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %2
ret void
}
void INT_Excep_TPU9_TCI9V(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU9_TCI9V() {
ret void
}
long __ocl_convert_long_int(int src) { return (long)src; }


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

x86 assembly (clang, -O2):
<__ocl_convert_long_int>:
movslq %edi,%rax
ret

LLVM IR (-O0):
define i64 @__ocl_convert_long_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
ret i64 %4
}

LLVM IR (-O2):
define i64 @__ocl_convert_long_int(i32 %0) {
%2 = sext i32 %0 to i64
ret i64 %2
}
void clr_HasBMS(unsigned char *pds) { pds[7] &= 0xbf; }


x86 assembly (clang, -O0):
<clr_HasBMS>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x7(%rax),%ecx
and    $0xbf,%ecx
mov    %cl,0x7(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clr_HasBMS>:
andb   $0xbf,0x7(%rdi)
ret

LLVM IR (-O0):
define void @clr_HasBMS(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 7
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = and i32 %6, 191
%8 = trunc i32 %7 to i8
store i8 %8, i8* %4
ret void
}

LLVM IR (-O2):
define void @clr_HasBMS(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 7
%3 = load i8, i8* %2
%4 = and i8 %3, -65
store i8 %4, i8* %2
ret void
}
void av_frame_alloc() {}


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

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

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

LLVM IR (-O2):
define void @av_frame_alloc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fctl_biased_gfb(void *, unsigned char);
void ctl_biased_gfb(void *d, unsigned char uc) {
  fctl_biased_gfb(d, uc / 127.0);
}


x86 assembly (clang, -O0):
<ctl_biased_gfb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
movzbl -0x9(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xeca(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
movzbl %al,%esi
call   1030 <fctl_biased_gfb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctl_biased_gfb>:
cvtsi2sd %esi,%xmm0
divsd  0xee4(%rip),%xmm0
cvttsd2si %xmm0,%eax
movzbl %al,%esi
jmp    1030 <fctl_biased_gfb@plt>

LLVM IR (-O0):
define void @ctl_biased_gfb(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %4
%7 = zext i8 %6 to i32
%8 = sitofp i32 %7 to double
%9 = fdiv double %8, 1.270000e+02
%10 = fptoui double %9 to i8
%11 = call i32 @fctl_biased_gfb(i8* %5, i8 zeroext %10)
ret void
}

LLVM IR (-O2):
define void @ctl_biased_gfb(i8* %0, i8 zeroext %1) {
%3 = uitofp i8 %1 to double
%4 = fdiv double %3, 1.270000e+02
%5 = fptoui double %4 to i8
%6 = tail call i32 @fctl_biased_gfb(i8* %0, i8 zeroext %5)
ret void
}
int test_imm_0Cint8_reg(signed char val) {
  return ((val) & (0x0C << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_0Cint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 12
%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_0Cint8_reg(i8 signext %0) {
%2 = and i8 %0, 12
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void XChangeKeyboardControl() {}


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

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

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

LLVM IR (-O2):
define void @XChangeKeyboardControl() {
ret void
}
int selectVirtualTerminal_BaseScreen(int vt) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @selectVirtualTerminal_BaseScreen(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void fprint_movc_PC(FILE *stream) {
  fprintf(stream, "MOVC  A, @A+PC                  ");
}


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

x86 assembly (clang, -O2):
<fprint_movc_PC>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"MOVC A, @A+PC \00"
define void @fprint_movc_PC(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"MOVC A, @A+PC \00"
define void @fprint_movc_PC(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 32, i64 1, i32* %0)
ret void
}
OP(ed, ee) {}


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
ret i32 undef
}
int test_imm_BCuint8_reg(unsigned char val) {
  return ((val) & (0xBC << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_BCuint8_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, 188
%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_BCuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -68
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
float stbir__support_two(float s) {
  (void)sizeof(s);
  return 2;
}


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

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

LLVM IR (-O0):
define float @stbir__support_two(float %0) {
%2 = alloca float
store float %0, float* %2
ret float 2.000000e+00
}

LLVM IR (-O2):
define float @stbir__support_two(float %0) {
ret float 2.000000e+00
}
long g() { return 0xff000000L; }


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

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

LLVM IR (-O0):
define i64 @g() {
ret i64 4278190080
}

LLVM IR (-O2):
define i64 @g() {
ret i64 4278190080
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int in_slice(int label, int slice, int *position) {
  int a[2], fail;
  double *c;
  a[0] = label;
  a[1] = slice;
  fail = _ada_use_c2phc(58, a, position, c);
  return fail;
}


x86 assembly (clang, -O0):
<in_slice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x3a,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_slice>:
push   %rax
mov    %edi,(%rsp)
mov    %esi,0x4(%rsp)
mov    %rsp,%rsi
mov    $0x3a,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @in_slice(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca [2 x i32]
%8 = alloca i32
%9 = alloca double*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%10 = load i32, i32* %4
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
store i32 %10, i32* %11
%12 = load i32, i32* %5
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
store i32 %12, i32* %13
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%15 = load i32*, i32** %6
%16 = load double*, double** %9
%17 = call i32 @_ada_use_c2phc(i32 58, i32* %14, i32* %15, double* %16)
store i32 %17, i32* %8
%18 = load i32, i32* %8
ret i32 %18
}

LLVM IR (-O2):
define i32 @in_slice(i32 %0, i32 %1, i32* %2) {
%4 = alloca [2 x i32]
%5 = bitcast [2 x i32]* %4 to i8*
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 %0, i32* %6
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
store i32 %1, i32* %7
%8 = call i32 @_ada_use_c2phc(i32 58, i32* %6, i32* %2, double* undef)
ret i32 %8
}
void NeubotEvent_noop(void *opaque) {
  (void)opaque;
  ;
}


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

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

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

LLVM IR (-O2):
define void @NeubotEvent_noop(i8* nocapture %0) {
ret void
}