xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ clear();
int /*<<< orphan*/ refresh();
initscr() {
  clear();
  refresh();
}


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

x86 assembly (clang, -O2):
<initscr>:
push   %rax
xor    %eax,%eax
call   1040 <clear@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <refresh@plt>

LLVM IR (-O0):
define i32 @initscr() {
%1 = alloca i32
%2 = call i32 (...) @clear()
%3 = call i32 (...) @refresh()
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @initscr() {
%1 = tail call i32 (...) @clear()
%2 = tail call i32 (...) @refresh()
ret i32 undef
}
unsigned short port_word_in(unsigned short port) {
  unsigned char result;
  __asm__("in %%dx, %%ax" : "=a"(result) : "d"(port));
  return result;
}


x86 assembly (clang, -O0):
<port_word_in>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%ax
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<port_word_in>:
mov    %edi,%edx
in     (%dx),%ax
movzbl %al,%eax
ret

LLVM IR (-O0):
define zeroext i16 @port_word_in(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i8 asm "in %dx, %ax", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
%7 = zext i8 %6 to i16
ret i16 %7
}

LLVM IR (-O2):
define zeroext i16 @port_word_in(i16 zeroext %0) {
%2 = tail call i8 asm "in %dx, %ax", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
%3 = zext i8 %2 to i16
ret i16 %3
}
/* Variables and functions */
scalar_t__ impar(int);
int proximoSitio(int sitioAtual, int quantidade) {
  if (impar(quantidade)) {
    return sitioAtual + 1;
  } else {
    return sitioAtual - 1;
  }
}


x86 assembly (clang, -O0):
<proximoSitio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <impar@plt>
cmp    $0x0,%rax
je     113e <proximoSitio+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1147 <proximoSitio+0x37>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proximoSitio>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <impar@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
or     $0x1,%eax
add    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @proximoSitio(i32 %0, i32 %1) {
%3 = tail call i64 @impar(i32 %1)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -1, i32 1
%6 = add nsw i32 %5, %0
ret i32 %6
}
/* Variables and functions */
double nextafter(double, double);
double nexttoward(double d, long double td) { return nextafter(d, (double)td); }


x86 assembly (clang, -O0):
<nexttoward>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
movsd  %xmm0,-0x8(%rbp)
fstpt  -0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
fldt   -0x20(%rbp)
fstpl  -0x28(%rbp)
movsd  -0x28(%rbp),%xmm1
call   1030 <nextafter@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nexttoward>:
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm1
jmp    1030 <nextafter@plt>

LLVM IR (-O0):
define double @nexttoward(double %0, x86_fp80 %1) {
%3 = alloca double
%4 = alloca x86_fp80
store double %0, double* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load double, double* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = fptrunc x86_fp80 %6 to double
%8 = call double @nextafter(double %5, double %7)
ret double %8
}

LLVM IR (-O2):
define double @nexttoward(double %0, x86_fp80 %1) {
%3 = fptrunc x86_fp80 %1 to double
%4 = tail call double @nextafter(double %0, double %3)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ getuid();
int /*<<< orphan*/ loop();
int /*<<< orphan*/ printf(char *);
int main() {
  if (!getuid()) {
    printf("Not enough stable to be run as root!\n");
  } else {
    loop();
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getuid@plt>
cmp    $0x0,%eax
jne    1160 <main+0x30>
lea    0xeaa(%rip),%rdi
call   1050 <printf@plt>
jmp    1167 <main+0x37>
mov    $0x0,%al
call   1030 <loop@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <getuid@plt>
test   %eax,%eax
je     1145 <main+0x15>
xor    %eax,%eax
call   1040 <loop@plt>
jmp    1151 <main+0x21>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Not enough stable to be run as root!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getuid()
%3 = icmp ne i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 (...) @loop()
br label %8
8: ; preds = %6, %4
ret i32 0
}

LLVM IR (-O2):
@str = [37 x i8] c"Not enough stable to be run as root!\00"
define i32 @main() {
%1 = tail call i32 (...) @getuid()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = tail call i32 (...) @loop()
br label %7
7: ; preds = %5, %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gmove_G2L_1a3t_bc();
int /*<<< orphan*/ gmove_G2L_1a3t_bc2();
int /*<<< orphan*/ gmove_G2L_3a3t_bc();
int main() {
  gmove_G2L_1a3t_bc();
  gmove_G2L_1a3t_bc2();
  gmove_G2L_3a3t_bc();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @gmove_G2L_1a3t_bc()
%2 = tail call i32 (...) @gmove_G2L_1a3t_bc2()
%3 = tail call i32 (...) @gmove_G2L_3a3t_bc()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __isoc99_scanf();
int add1(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[], char *envp[]) {
  int o0;
  __isoc99_scanf();
  o0 = add1(34);
  printf("Sum = %ld\n", o0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1050 <__isoc99_scanf@plt>
mov    $0x22,%edi
call   1040 <add1@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <__isoc99_scanf@plt>
mov    $0x22,%edi
call   1040 <add1@plt>
lea    0xeb7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"Sum = %ld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 (...) @__isoc99_scanf()
%5 = tail call i32 @add1(i32 34)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
bool can_go_l(int x, int n) { return x - n >= 0; }


x86 assembly (clang, -O0):
<can_go_l>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    $0x0,%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<can_go_l>:
xor    %eax,%eax
cmp    %esi,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @can_go_l(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 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
%8 = icmp sge i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @can_go_l(i32 %0, i32 %1) {
%3 = icmp sge i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int test_imm_8Fuint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x8F << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_8Fuint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 614180323328
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct lifo {
  int dummy;
};

/* Variables and functions */
double erf(double);
double pop(struct lifo *);
double opr_erf(struct lifo *stack) {
  double op = pop(stack);
  return erf(op);
}


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

x86 assembly (clang, -O2):
<opr_erf>:
push   %rax
call   1030 <pop@plt>
pop    %rax
jmp    1040 <erf@plt>

LLVM IR (-O0):
%struct.lifo = type { i32 }
define double @opr_erf(%struct.lifo* %0) {
%2 = alloca %struct.lifo*
%3 = alloca double
store %struct.lifo* %0, %struct.lifo** %2
%4 = load %struct.lifo*, %struct.lifo** %2
%5 = call double @pop(%struct.lifo* %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = call double @erf(double %6)
ret double %7
}

LLVM IR (-O2):
%struct.lifo = type { i32 }
define double @opr_erf(%struct.lifo* %0) {
%2 = tail call double @pop(%struct.lifo* %0)
%3 = tail call double @erf(double %2)
ret double %3
}
void arch_flush_thread(struct arch_thread *thread) {}


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

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

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

LLVM IR (-O2):
%struct.arch_thread = type opaque
define void @arch_flush_thread(%struct.arch_thread* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lol();
int /*<<< orphan*/ moin();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ rofl();
void main() {
  printf("main\n");
  lol();
  rofl();
  rofl();
  lol();
  moin();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <lol@plt>
mov    $0x0,%al
call   1040 <rofl@plt>
mov    $0x0,%al
call   1040 <rofl@plt>
mov    $0x0,%al
call   1060 <lol@plt>
mov    $0x0,%al
call   1030 <moin@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <lol@plt>
xor    %eax,%eax
call   1050 <rofl@plt>
xor    %eax,%eax
call   1050 <rofl@plt>
xor    %eax,%eax
call   1060 <lol@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <moin@plt>

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

LLVM IR (-O2):
@str = [5 x i8] c"main\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @lol()
%3 = tail call i32 (...) @rofl()
%4 = tail call i32 (...) @rofl()
%5 = tail call i32 (...) @lol()
%6 = tail call i32 (...) @moin()
ret void
}
/* Variables and functions */
scalar_t__ readLE16(unsigned char *);
unsigned short calc_csum_16bitLE_words(unsigned short *p16, int nwords) {
  unsigned short calc_csum = 0;
  while (nwords--) {
    calc_csum += readLE16((unsigned char *)p16++);
  }
  return calc_csum;
}


x86 assembly (clang, -O0):
<calc_csum_16bitLE_words>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movw   $0x0,-0xe(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1160 <calc_csum_16bitLE_words+0x50>
mov    -0x8(%rbp),%rdi
mov    %rdi,%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
call   1030 <readLE16@plt>
mov    %rax,%rcx
movzwl -0xe(%rbp),%eax
add    %rcx,%rax
mov    %ax,-0xe(%rbp)
jmp    1125 <calc_csum_16bitLE_words+0x15>
movzwl -0xe(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_csum_16bitLE_words>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
je     1135 <calc_csum_16bitLE_words+0x25>
mov    %esi,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax)
lea    0x2(%rdi),%r14
call   1030 <readLE16@plt>
add    %eax,%ebx
mov    %r14,%rdi
add    $0xffffffff,%ebp
jne    1120 <calc_csum_16bitLE_words+0x10>
jmp    1137 <calc_csum_16bitLE_words+0x27>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i16 @calc_csum_16bitLE_words(i16* %0, i32 %1) {
%3 = alloca i16*
%4 = alloca i32
%5 = alloca i16
store i16* %0, i16** %3
store i32 %1, i32* %4
store i16 0, i16* %5
br label %6
6: ; preds = %10, %2
%7 = load i32, i32* %4
%8 = add nsw i32 %7, -1
store i32 %8, i32* %4
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i16*, i16** %3
%12 = getelementptr inbounds i16, i16* %11, i32 1
store i16* %12, i16** %3
%13 = bitcast i16* %11 to i8*
%14 = call i64 @readLE16(i8* %13)
%15 = load i16, i16* %5
%16 = zext i16 %15 to i64
%17 = add nsw i64 %16, %14
%18 = trunc i64 %17 to i16
store i16 %18, i16* %5
br label %6
19: ; preds = %6
%20 = load i16, i16* %5
ret i16 %20
}

LLVM IR (-O2):
define zeroext i16 @calc_csum_16bitLE_words(i16* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %15, label %4
4: ; preds = %2, %4
%5 = phi i16 [ %13, %4 ], [ 0, %2 ]
%6 = phi i32 [ %8, %4 ], [ %1, %2 ]
%7 = phi i16* [ %9, %4 ], [ %0, %2 ]
%8 = add nsw i32 %6, -1
%9 = getelementptr inbounds i16, i16* %7, i64 1
%10 = bitcast i16* %7 to i8*
%11 = tail call i64 @readLE16(i8* %10)
%12 = trunc i64 %11 to i16
%13 = add i16 %5, %12
%14 = icmp eq i32 %8, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %2
%16 = phi i16 [ 0, %2 ], [ %13, %4 ]
ret i16 %16
}
double src_init(int *s, float *data) { return 1; }


x86 assembly (clang, -O0):
<src_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xeec(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @src_init(i32* %0, float* %1) {
%3 = alloca i32*
%4 = alloca float*
store i32* %0, i32** %3
store float* %1, float** %4
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @src_init(i32* nocapture readnone %0, float* nocapture readnone %1) {
ret double 1.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void latex_print_footer(void) {
  puts("\\end{dependency}");
  puts("\\end{document}");
}


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

x86 assembly (clang, -O2):
<latex_print_footer>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeed(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"\\end{dependency}\00"
@.str.1 = [15 x i8] c"\\end{document}\00"
define void @latex_print_footer() {
%1 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"\\end{dependency}\00"
@.str.1 = [15 x i8] c"\\end{document}\00"
define void @latex_print_footer() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void print_string(char *a_string) {
  while (*a_string != '\0') {
    putchar(*a_string++);
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<print_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1148 <print_string+0x38>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    111c <print_string+0xc>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_string>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <print_string+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <print_string+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @print_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
%11 = load i8, i8* %9
%12 = call i32 @putchar(i8 signext %11)
br label %3
13: ; preds = %3
%14 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @print_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = tail call i32 @putchar(i8 signext %5)
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int getLine(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *);
main() {
  int len;
  char line[1000];
  while ((len = getLine(line, 1000)) > 0) {
    reverse(line);
    printf("%s", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <getLine@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1183 <main+0x53>
lea    -0x3f0(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1050 <getLine@plt>
test   %eax,%eax
jle    1184 <main+0x54>
mov    %rsp,%rbx
lea    0xeab(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <getLine@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1000 x i8]
store i32 0, i32* %1
br label %4
4: ; preds = %8, %0
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%6 = call i32 @getLine(i8* %5, i32 1000)
store i32 %6, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%10 = call i32 @reverse(i8* %9)
%11 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %4
13: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getLine(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = call i32 @reverse(i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%8 = call i32 @getLine(i8* %2, i32 1000)
%9 = icmp sgt i32 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int tuner_select(void *, unsigned int, unsigned int);
int bbm_com_tuner_select(void *handle, unsigned int product,
                         unsigned int band) {
  int res;
  res = tuner_select(handle, product, band);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_tuner_select>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <tuner_select@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_tuner_select>:
jmp    1030 <tuner_select@plt>

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

LLVM IR (-O2):
define i32 @bbm_com_tuner_select(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @tuner_select(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
void main() { int i = 3; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"Bar: %d\0A\00"
define void @Bar(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void setupMicSystem() {}


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

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

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

LLVM IR (-O2):
define void @setupMicSystem() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _printmem(char *, int, int);
int /*<<< orphan*/ monLock();
int /*<<< orphan*/ monUnlock();
void mon_printmem(char *mem, int size, int ascii) {
  monLock();
  _printmem(mem, size, ascii);
  monUnlock();
}


x86 assembly (clang, -O0):
<mon_printmem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    $0x0,%al
call   1030 <monLock@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1050 <_printmem@plt>
mov    $0x0,%al
call   1040 <monUnlock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mon_printmem>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <monLock@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1050 <_printmem@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <monUnlock@plt>

LLVM IR (-O0):
define void @mon_printmem(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 (...) @monLock()
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @_printmem(i8* %8, i32 %9, i32 %10)
%12 = call i32 (...) @monUnlock()
ret void
}

LLVM IR (-O2):
define void @mon_printmem(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @monLock()
%5 = tail call i32 @_printmem(i8* %0, i32 %1, i32 %2)
%6 = tail call i32 (...) @monUnlock()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void errout1(const char *msg) {
  fprintf(stderr, "%s\n", msg);
  exit(254);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @errout1(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 254)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ sys_abort();
void recursion_check(void) {
  static int magic = 0;
  if (magic == 0x20DE8101)
    sys_abort();
  magic = 0x20DE8101;
}


x86 assembly (clang, -O0):
<recursion_check>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x20de8101,0x2f0e(%rip)
81 de 20
jne    112b <recursion_check+0x1b>
mov    $0x0,%al
call   1030 <sys_abort@plt>
movl   $0x20de8101,0x2ef7(%rip)
81 de 20
pop    %rbp
ret

x86 assembly (clang, -O2):
<recursion_check>:
push   %rax
cmpb   $0x1,0x2f14(%rip)
jne    1121 <recursion_check+0x11>
xor    %eax,%eax
call   1030 <sys_abort@plt>
movb   $0x1,0x2f04(%rip)
pop    %rax
ret

LLVM IR (-O0):
@recursion_check.magic = internal global i32 0
define void @recursion_check() {
%1 = load i32, i32* @recursion_check.magic
%2 = icmp eq i32 %1, 551452929
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @sys_abort()
br label %5
5: ; preds = %3, %0
store i32 551452929, i32* @recursion_check.magic
ret void
}

LLVM IR (-O2):
@recursion_check.magic = internal unnamed_addr global i1 false
define void @recursion_check() {
%1 = load i1, i1* @recursion_check.magic
br i1 %1, label %2, label %4
2: ; preds = %0
%3 = tail call i32 (...) @sys_abort()
br label %4
4: ; preds = %2, %0
store i1 true, i1* @recursion_check.magic
ret void
}
void Update_Controllers_Net(int num_player) {}


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

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

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

LLVM IR (-O2):
define void @Update_Controllers_Net(i32 %0) {
ret void
}
int do_398() { return 398; }


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

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

LLVM IR (-O0):
define i32 @do_398() {
ret i32 398
}

LLVM IR (-O2):
define i32 @do_398() {
ret i32 398
}
/* Variables and functions */
int /*<<< orphan*/ call_ddv();
int main(void) {
  {
    call_ddv();
    return (0);
  }
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @call_ddv()
ret i32 0
}
void gtk_tree_view_set_rules_hint() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_set_rules_hint() {
ret void
}
void xenbus_backend_bus_register(void) {}


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

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

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

LLVM IR (-O2):
define void @xenbus_backend_bus_register() {
ret void
}
/* Variables and functions */
bool is_end_of_line(char c) { return ((c == '\n') || (c == '\r')); }


x86 assembly (clang, -O0):
<is_end_of_line>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     1129 <is_end_of_line+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0xd,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_end_of_line>:
cmp    $0xa,%dil
sete   %al
cmp    $0xd,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_end_of_line(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 10
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 13
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_end_of_line(i8 signext %0) {
%2 = icmp eq i8 %0, 10
%3 = icmp eq i8 %0, 13
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
char *strcpy(char *dst, const char *src) {
  asm("xor   %rcx, %rcx\r\n"
      "xor   %rdx, %rdx\r\n"
      ".Loop_strcpy:\r\n"
      "cmpb   $0x00, (%rsi, %rcx, 1)\r\n"
      "jz     .Loop_strcpy_end\r\n"
      "movb   (%rsi, %rcx, 1), %dl\r\n"
      "movb   %dl, (%rdi, %rcx, 1)\r\n"
      "inc    %rcx\r\n"
      "jmp    .Loop_strcpy\r\n"
      ".Loop_strcpy_end:\r\n"
      "movb   $0x00, (%rdi, %rcx, 1)\r\n"
      "mov    %rdi, %rax\r\n");
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
xor    %rcx,%rcx
xor    %rdx,%rdx
cmpb   $0x0,(%rsi,%rcx,1)
je     112a <strcpy+0x2a>
mov    (%rsi,%rcx,1),%dl
mov    %dl,(%rdi,%rcx,1)
inc    %rcx
jmp    1112 <strcpy+0x12>
movb   $0x0,(%rdi,%rcx,1)
mov    %rdi,%rax
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
xor    %rcx,%rcx
xor    %rdx,%rdx
cmpb   $0x0,(%rsi,%rcx,1)
je     1117 <strcpy+0x17>
mov    (%rsi,%rcx,1),%dl
mov    %dl,(%rdi,%rcx,1)
inc    %rcx
jmp    1106 <strcpy+0x6>
movb   $0x0,(%rdi,%rcx,1)
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* nocapture readnone %0, i8* nocapture readnone %1) {
tail call void asm sideeffect "xor %rcx, %rcx\0D\0Axor %rdx, %rdx\0D\0A.Loop_strcpy:\0D\0Acmpb $$0x00, (%rsi, %rcx, 1)\0D\0Ajz .Loop_strcpy_end\0D\0Amovb (%rsi, %rcx, 1), %dl\0D\0Amovb %dl, (%rdi, %rcx, 1)\0D\0Ainc %rcx\0D\0Ajmp .Loop_strcpy\0D\0A.Loop_strcpy_end:\0D\0Amovb $$0x00, (%rdi, %rcx, 1)\0D\0Amov %rdi, %rax\0D\0A", "~{dirflag},~{fpsr},~{flags}"()
ret i8* undef
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i, j, N;
  j = __VERIFIER_nondet_int();
  N = __VERIFIER_nondet_int();
  i = N;
  while (i > 0) {
    if (j > 0) {
      j = j - 1;
    } else {
      j = N;
      i = i - 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    116f <main+0x5f>
cmpl   $0x0,-0xc(%rbp)
jle    115b <main+0x4b>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116a <main+0x5a>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1139 <main+0x29>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jle    1143 <main+0x33>
mov    %eax,%ecx
nopw   0x0(%rax,%rax,1)
xor    %edx,%edx
test   %ebx,%ebx
lea    -0x1(%rbx),%esi
setle  %dl
cmovle %eax,%esi
mov    %esi,%ebx
sub    %edx,%ecx
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %4
%7 = load i32, i32* %4
store i32 %7, i32* %2
br label %8
8: ; preds = %21, %0
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %22
11: ; preds = %8
%12 = load i32, i32* %3
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i32, i32* %3
%16 = sub nsw i32 %15, 1
store i32 %16, i32* %3
br label %21
17: ; preds = %11
%18 = load i32, i32* %4
store i32 %18, i32* %3
%19 = load i32, i32* %2
%20 = sub nsw i32 %19, 1
store i32 %20, i32* %2
br label %21
21: ; preds = %17, %14
br label %8
22: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %14
4: ; preds = %0, %4
%5 = phi i32 [ %12, %4 ], [ %2, %0 ]
%6 = phi i32 [ %9, %4 ], [ %1, %0 ]
%7 = icmp sgt i32 %6, 0
%8 = add nsw i32 %6, -1
%9 = select i1 %7, i32 %8, i32 %2
%10 = xor i1 %7, true
%11 = sext i1 %10 to i32
%12 = add nsw i32 %5, %11
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x9a() {
  Assert_real((isalpha(154) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              775, ("isalpha should be 0 for 0x9a"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x9a\00"
define void @t_isalpha_0x9a() {
%1 = call i64 @isalpha(i32 154)
%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 775, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x9a\00"
define void @t_isalpha_0x9a() {
%1 = tail call i64 @isalpha(i32 154)
%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 775, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
void foo(int n) {
  int i;
#pragma omp for schedule(static) ordered
  for (i = 0; i < n; ++i)
    bar(i);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1144 <foo+0x34>
mov    -0x8(%rbp),%edi
call   1030 <bar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <foo+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    112e <foo+0x1e>
mov    %edi,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1030 <bar@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1120 <foo+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @bar(i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
double fatorial(double n) {
  double f = 1L;
  double c;
  for (c = 1L; c <= n; c++) {
    f = f * c;
  }
  return f;
}


x86 assembly (clang, -O0):
<fatorial>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     115d <fatorial+0x5d>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeb2(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1123 <fatorial+0x23>
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fatorial>:
movsd  0xef8(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     112e <fatorial+0x2e>
movsd  0xeea(%rip),%xmm2
movapd %xmm2,%xmm3
movapd %xmm2,%xmm1
xchg   %ax,%ax
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm3
ucomisd %xmm3,%xmm0
jae    1120 <fatorial+0x20>
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @fatorial(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 1.000000e+00, double* %3
store double 1.000000e+00, double* %4
br label %5
5: ; preds = %13, %1
%6 = load double, double* %4
%7 = load double, double* %2
%8 = fcmp ole double %6, %7
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = load double, double* %3
%11 = load double, double* %4
%12 = fmul double %10, %11
store double %12, double* %3
br label %13
13: ; preds = %9
%14 = load double, double* %4
%15 = fadd double %14, 1.000000e+00
store double %15, double* %4
br label %5
16: ; preds = %5
%17 = load double, double* %3
ret double %17
}

LLVM IR (-O2):
define double @fatorial(double %0) {
%2 = fcmp ult double %0, 1.000000e+00
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi double [ %7, %3 ], [ 1.000000e+00, %1 ]
%5 = phi double [ %6, %3 ], [ 1.000000e+00, %1 ]
%6 = fmul double %5, %4
%7 = fadd double %4, 1.000000e+00
%8 = fcmp ugt double %7, %0
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi double [ 1.000000e+00, %1 ], [ %6, %3 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main(void) {
  float f;
  float ff;
  f = ff = 1;
  while (f <= ff) {
    printf("[%.0f]\n", f);
    f = ff;
    ff = 2 * f;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed9(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     117e <main+0x6e>
movss  -0x8(%rbp),%xmm0
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xe95(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1139 <main+0x29>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movss  0xee3(%rip),%xmm1
lea    0xee0(%rip),%rbx
movaps %xmm1,%xmm0
nopw   0x0(%rax,%rax,1)
movss  %xmm1,0xc(%rsp)
movss  %xmm1,0x8(%rsp)
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm1
addss  %xmm1,%xmm1
movss  0x8(%rsp),%xmm0
ucomiss %xmm0,%xmm1
jae    1130 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"[%.0f]\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 1.000000e+00, float* %3
store float 1.000000e+00, float* %2
br label %4
4: ; preds = %8, %0
%5 = load float, float* %2
%6 = load float, float* %3
%7 = fcmp ole float %5, %6
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = load float, float* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float %9)
%11 = load float, float* %3
store float %11, float* %2
%12 = load float, float* %2
%13 = fmul float 2.000000e+00, %12
store float %13, float* %3
br label %4
14: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"[%.0f]\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi float [ 1.000000e+00, %0 ], [ %5, %1 ]
%3 = phi float [ 1.000000e+00, %0 ], [ %2, %1 ]
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float %3)
%5 = fmul float %2, 2.000000e+00
%6 = fcmp ugt float %2, %5
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
void X509_CERT_AUX_new(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_CERT_AUX_new() {
ret void
}
/* Variables and functions */
char *wnn_perror_lang(int /*<<< orphan*/ *);
char *wnn_perror() { return (wnn_perror_lang(NULL)); }


x86 assembly (clang, -O0):
<wnn_perror>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <wnn_perror_lang@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @wnn_perror() {
%1 = call i8* @wnn_perror_lang(i32* null)
ret i8* %1
}

LLVM IR (-O2):
define i8* @wnn_perror() {
%1 = tail call i8* @wnn_perror_lang(i32* null)
ret i8* %1
}
/* Variables and functions */
char *strrchr(const char *s, int c) {
  const char *l = NULL;
  for (;;) {
    if (*s == c)
      l = s;
    if (!*s)
      return (char *)l;
    s++;
  }
  return (char *)l;
}


x86 assembly (clang, -O0):
<strrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
jne    112b <strrchr+0x2b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    113e <strrchr+0x3e>
mov    -0x18(%rbp),%rax
pop    %rbp
ret
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1113 <strrchr+0x13>

x86 assembly (clang, -O2):
<strrchr>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi),%ecx
cmp    %esi,%ecx
cmove  %rdi,%rax
add    $0x1,%rdi
test   %ecx,%ecx
jne    1110 <strrchr+0x10>
ret

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

LLVM IR (-O2):
define i8* @strrchr(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %11, %3 ]
%5 = phi i8* [ null, %2 ], [ %9, %3 ]
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, %1
%9 = select i1 %8, i8* %4, i8* %5
%10 = icmp eq i8 %6, 0
%11 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %10, label %12, label %3
12: ; preds = %3
ret i8* %9
}