xunge/DecIR huggingface dataset:
int verif_reel(char *adresse_du_character) {
  if (adresse_du_character[0] >= 48 && adresse_du_character[0] <= 57) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<verif_reel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     1134 <verif_reel+0x34>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jg     1134 <verif_reel+0x34>
movl   $0x1,-0x4(%rbp)
jmp    113b <verif_reel+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<verif_reel>:
mov    (%rdi),%cl
add    $0xd0,%cl
xor    %eax,%eax
cmp    $0xa,%cl
setb   %al
ret

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

LLVM IR (-O2):
define i32 @verif_reel(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
%5 = zext i1 %4 to i32
ret i32 %5
}
void this_cpu_disable_ftrace(void) {}


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

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

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

LLVM IR (-O2):
define void @this_cpu_disable_ftrace() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int freee(char *s) {
  free(s);
  return (1);
}


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

x86 assembly (clang, -O2):
<freee>:
push   %rax
call   1030 <free@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @freee(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 1
}
const char *nonnull(const char *s) { return s ? s : "(null)"; }


x86 assembly (clang, -O0):
<nonnull>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1120 <nonnull+0x20>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1130 <nonnull+0x30>
lea    0xed9(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1130 <nonnull+0x30>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nonnull>:
test   %rdi,%rdi
lea    0xef6(%rip),%rax
cmovne %rdi,%rax
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"(null)\00"
define i8* @nonnull(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0
ret i8* %3
}
unsigned long prev(unsigned long index, unsigned long count) {
  if ((index - count) < 0) {
    return 30000 + index - count;
  } else {
    return index - count;
  }
}


x86 assembly (clang, -O0):
<prev>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
cmp    $0x0,%rax
jae    1135 <prev+0x35>
mov    -0x10(%rbp),%rax
add    $0x7530,%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1141 <prev+0x41>
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @prev(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = sub i64 %6, %7
%9 = icmp ult i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i64, i64* %4
%12 = add i64 30000, %11
%13 = load i64, i64* %5
%14 = sub i64 %12, %13
store i64 %14, i64* %3
br label %19
15: ; preds = %2
%16 = load i64, i64* %4
%17 = load i64, i64* %5
%18 = sub i64 %16, %17
store i64 %18, i64* %3
br label %19
19: ; preds = %15, %10
%20 = load i64, i64* %3
ret i64 %20
}

LLVM IR (-O2):
define i64 @prev(i64 %0, i64 %1) {
%3 = sub i64 %0, %1
ret i64 %3
}
/* Variables and functions */
int PAPI_read_ts(int, long long *, long long *);
void papif_read_ts_(int *EventSet, long long *values, long long *cycles,
                    int *check) {
  *check = PAPI_read_ts(*EventSet, values, cycles);
}


x86 assembly (clang, -O0):
<papif_read_ts_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <PAPI_read_ts@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<papif_read_ts_>:
push   %rbx
mov    %rcx,%rbx
mov    (%rdi),%edi
call   1030 <PAPI_read_ts@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @papif_read_ts_(i32* %0, i64* %1, i64* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i64*
%7 = alloca i64*
%8 = alloca i32*
store i32* %0, i32** %5
store i64* %1, i64** %6
store i64* %2, i64** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = load i64*, i64** %6
%12 = load i64*, i64** %7
%13 = call i32 @PAPI_read_ts(i32 %10, i64* %11, i64* %12)
%14 = load i32*, i32** %8
store i32 %13, i32* %14
ret void
}

LLVM IR (-O2):
define void @papif_read_ts_(i32* nocapture %0, i64* %1, i64* %2, i32* nocapture writeonly %3) {
%5 = load i32, i32* %0
%6 = tail call i32 @PAPI_read_ts(i32 %5, i64* %1, i64* %2)
store i32 %6, i32* %3
ret void
}
int reloc_imm(int offset) { return ((((offset)-8) >> 2) & 0x00ffffff); }


x86 assembly (clang, -O0):
<reloc_imm>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x8,%eax
sar    $0x2,%eax
and    $0xffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reloc_imm>:
lea    0x3fffff8(%rdi),%eax
shr    $0x2,%eax
and    $0xffffff,%eax
ret

LLVM IR (-O0):
define i32 @reloc_imm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 8
%5 = ashr i32 %4, 2
%6 = and i32 %5, 16777215
ret i32 %6
}

LLVM IR (-O2):
define i32 @reloc_imm(i32 %0) {
%2 = add i32 %0, 67108856
%3 = lshr i32 %2, 2
%4 = and i32 %3, 16777215
ret i32 %4
}
int rgb2yuv(double r, double g, double b) {
  double y = 0.299 * r + 0.587 * g + 0.114 * b;
  double u = -0.147 * r - 0.289 * g + 0.436 * b;
  double v = 0.615 * r - 0.515 * g - 0.100 * b;
  return 0;
}


x86 assembly (clang, -O0):
<rgb2yuv>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xf20(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xf0b(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  0xeee(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xecc(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xea0(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  0xe83(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xe61(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe35(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  0xe18(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @rgb2yuv(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%10 = load double, double* %4
%11 = load double, double* %5
%12 = fmul double 5.870000e-01, %11
%13 = call double @llvm.fmuladd.f64(double 2.990000e-01, double %10, double %12)
%14 = load double, double* %6
%15 = call double @llvm.fmuladd.f64(double 1.140000e-01, double %14, double %13)
store double %15, double* %7
%16 = load double, double* %4
%17 = load double, double* %5
%18 = fmul double 2.890000e-01, %17
%19 = fneg double %18
%20 = call double @llvm.fmuladd.f64(double -1.470000e-01, double %16, double %19)
%21 = load double, double* %6
%22 = call double @llvm.fmuladd.f64(double 4.360000e-01, double %21, double %20)
store double %22, double* %8
%23 = load double, double* %4
%24 = load double, double* %5
%25 = fmul double 5.150000e-01, %24
%26 = fneg double %25
%27 = call double @llvm.fmuladd.f64(double 0x3FE3AE147AE147AE, double %23, double %26)
%28 = load double, double* %6
%29 = call double @llvm.fmuladd.f64(double -1.000000e-01, double %28, double %27)
store double %29, double* %9
ret i32 0
}

LLVM IR (-O2):
define i32 @rgb2yuv(double %0, double %1, double %2) {
ret i32 0
}
/* Variables and functions */
int xtables_init();
int main(int argc, char **argv) {
  int ret = 0;
  ret = xtables_init();
  if (ret < 0)
    return ret;
  return ret;
}


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)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <xtables_init@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    114c <main+0x3c>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <main+0x42>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @xtables_init()
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
void write_mem(void *addr, uint32_t value, uint32_t size) {
  uint8_t *addr8 = addr;
  uint16_t *addr16 = addr;
  uint32_t *addr32 = addr;
  switch (size) {
  case 1:
    *addr8 = value;
    break;
  case 2:
    *addr16 = value;
    break;
  case 4:
    *addr32 = value;
    break;
  }
}


x86 assembly (clang, -O0):
<write_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x2c(%rbp)
sub    $0x1,%eax
je     115c <write_mem+0x5c>
jmp    113a <write_mem+0x3a>
mov    -0x2c(%rbp),%eax
sub    $0x2,%eax
je     116a <write_mem+0x6a>
jmp    114b <write_mem+0x4b>
mov    -0x2c(%rbp),%eax
sub    $0x4,%eax
je     1178 <write_mem+0x78>
jmp    1181 <write_mem+0x81>
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    1181 <write_mem+0x81>
mov    -0xc(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
jmp    1181 <write_mem+0x81>
mov    -0xc(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_mem>:
cmp    $0x4,%edx
ja     1111 <write_mem+0x11>
mov    $0x16,%eax
bt     %edx,%eax
jae    1111 <write_mem+0x11>
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @write_mem(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i32*
store i32* %11, i32** %7
%12 = load i8*, i8** %4
%13 = bitcast i8* %12 to i32*
store i32* %13, i32** %8
%14 = load i8*, i8** %4
%15 = bitcast i8* %14 to i32*
store i32* %15, i32** %9
%16 = load i32, i32* %6
switch i32 %16, label %26 [
i32 1, label %17
i32 2, label %20
i32 4, label %23
]
17: ; preds = %3
%18 = load i32, i32* %5
%19 = load i32*, i32** %7
store i32 %18, i32* %19
br label %26
20: ; preds = %3
%21 = load i32, i32* %5
%22 = load i32*, i32** %8
store i32 %21, i32* %22
br label %26
23: ; preds = %3
%24 = load i32, i32* %5
%25 = load i32*, i32** %9
store i32 %24, i32* %25
br label %26
26: ; preds = %3, %23, %20, %17
ret void
}

LLVM IR (-O2):
define void @write_mem(i8* nocapture writeonly %0, i32 %1, i32 %2) {
switch i32 %2, label %6 [
i32 1, label %4
i32 2, label %4
i32 4, label %4
]
4: ; preds = %3, %3, %3
%5 = bitcast i8* %0 to i32*
store i32 %1, i32* %5
br label %6
6: ; preds = %4, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void timefunc(int value) {
  printf("\nFAIL: test15\n");
  exit(1);
}


x86 assembly (clang, -O0):
<timefunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [15 x i8] c"\0AFAIL: test15\0A\00"
define void @timefunc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [14 x i8] c"\0AFAIL: test15\00"
define void @timefunc(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ r4030_delay();
unsigned short r4030_read_reg16(unsigned addr) {
  unsigned short ret = *((volatile unsigned short *)addr);
  r4030_delay();
  return ret;
}


x86 assembly (clang, -O0):
<r4030_read_reg16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    (%rax),%ax
mov    %ax,-0x6(%rbp)
mov    $0x0,%al
call   1030 <r4030_delay@plt>
movzwl -0x6(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r4030_read_reg16>:
push   %rbx
mov    %edi,%eax
movzwl (%rax),%ebx
xor    %eax,%eax
call   1030 <r4030_delay@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @r4030_read_reg16(i32 %0) {
%2 = alloca i32
%3 = alloca i16
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i16*
%7 = load volatile i16, i16* %6
store i16 %7, i16* %3
%8 = call i32 (...) @r4030_delay()
%9 = load i16, i16* %3
ret i16 %9
}

LLVM IR (-O2):
define zeroext i16 @r4030_read_reg16(i32 %0) {
%2 = zext i32 %0 to i64
%3 = inttoptr i64 %2 to i16*
%4 = load volatile i16, i16* %3
%5 = tail call i32 (...) @r4030_delay()
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printEndFormatting(void) {
  printf("\n\n____________________________________\n");
}


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"\0A\0A____________________________________\0A\00"
define void @printEndFormatting() {
%1 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [39 x i8] c"\0A\0A____________________________________\00"
define void @printEndFormatting() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret void
}
void wifi_rsp_i2c_stop(const struct wifi_msg_i2c_stop_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_i2c_stop_rsp_t = type opaque
define void @wifi_rsp_i2c_stop(%struct.wifi_msg_i2c_stop_rsp_t* nocapture %0) {
ret void
}
void TransformAlarmC__1__Counter__overflow(void) {}


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

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

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

LLVM IR (-O2):
define void @TransformAlarmC__1__Counter__overflow() {
ret void
}
double nan(const char *s) { return 0x1.fffff0p128; }


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

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

LLVM IR (-O0):
define double @nan(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret double 0x47FFFFFF00000000
}

LLVM IR (-O2):
define double @nan(i8* nocapture readnone %0) {
ret double 0x47FFFFFF00000000
}
void check_memory_gf_save_c(void) {}


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

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

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

LLVM IR (-O2):
define void @check_memory_gf_save_c() {
ret void
}
void h0(void) {}


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

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

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

LLVM IR (-O2):
define void @h0() {
ret void
}
int acinfo_write_settings_aquastreamXT(struct ac_device_list_element *device,
                                       struct aquastreamxt_settings *settings) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.ac_device_list_element = type opaque
%struct.aquastreamxt_settings = type opaque
define i32 @acinfo_write_settings_aquastreamXT(%struct.ac_device_list_element* %0, %struct.aquastreamxt_settings* %1) {
%3 = alloca %struct.ac_device_list_element*
%4 = alloca %struct.aquastreamxt_settings*
store %struct.ac_device_list_element* %0, %struct.ac_device_list_element** %3
store %struct.aquastreamxt_settings* %1, %struct.aquastreamxt_settings** %4
ret i32 0
}

LLVM IR (-O2):
%struct.ac_device_list_element = type opaque
%struct.aquastreamxt_settings = type opaque
define i32 @acinfo_write_settings_aquastreamXT(%struct.ac_device_list_element* nocapture readnone %0, %struct.aquastreamxt_settings* nocapture readnone %1) {
ret i32 0
}
unsigned kol_key_mode_get() { asm("int $0x40" ::"a"(66), "b"(2)); }


x86 assembly (clang, -O0):
<kol_key_mode_get>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    $0x42,%eax
mov    $0x2,%ebx
int    $0x40
mov    -0xc(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_key_mode_get>:
push   %rbx
mov    $0x42,%eax
mov    $0x2,%ebx
int    $0x40
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @kol_key_mode_get() {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 66, i32 2)
ret i32 undef
}
int constant_test_bit(int nr, const volatile void *addr) {
  return ((1U << (nr & 31)) &
          (((const volatile unsigned int *)addr)[nr >> 5])) != 0;
}


x86 assembly (clang, -O0):
<constant_test_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x10(%rbp),%rcx
mov    -0x4(%rbp),%edx
sar    $0x5,%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,4),%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<constant_test_bit>:
mov    %edi,%ecx
mov    %edi,%eax
sar    $0x5,%eax
cltq
mov    (%rsi,%rax,4),%eax
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @constant_test_bit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = and i32 %5, 31
%7 = shl i32 1, %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %3
%11 = ashr i32 %10, 5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %9, i64 %12
%14 = load volatile i32, i32* %13
%15 = and i32 %7, %14
%16 = icmp ne i32 %15, 0
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @constant_test_bit(i32 %0, i8* %1) {
%3 = and i32 %0, 31
%4 = bitcast i8* %1 to i32*
%5 = ashr i32 %0, 5
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %4, i64 %6
%8 = load volatile i32, i32* %7
%9 = lshr i32 %8, %3
%10 = and i32 %9, 1
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i, a;
  a = 1;
  for (i = 1; i < 11; i++) {
    a = a * i;
  }
  printf("%d\n", a);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3628800)
ret i32 0
}
int test_imm_70uint8_mem(unsigned char *val) {
  return ((*val) & (-0x70 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_70uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -112
%7 = icmp ne i32 %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_70uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -112
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  puts("sorry, this program is designed for FreeBSD only");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [49 x i8] c"sorry, this program is designed for FreeBSD only\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @puts(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [49 x i8] c"sorry, this program is designed for FreeBSD only\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void alpha(void) { printf("alpha()\n"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"alpha()\0A\00"
define void @alpha() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [8 x i8] c"alpha()\00"
define void @alpha() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int fun(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int ret = 0;
  int nr_of_yields = 0;
  long nr_of_reductions;
  ret = fun(1);
  printf("Number of yields %d\n", nr_of_yields);
  printf("RETURNED %d\n", ret);
  if (ret != 201) {
    return 1;
  } else {
    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)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    $0x1,%edi
call   1030 <fun@plt>
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0xc9,-0x14(%rbp)
je     1188 <main+0x68>
movl   $0x1,-0x4(%rbp)
jmp    118f <main+0x6f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
call   1030 <fun@plt>
mov    %eax,%ebx
lea    0xecc(%rip),%rdi
xor    %esi,%esi
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
xor    %eax,%eax
cmp    $0xc9,%ebx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [21 x i8] c"Number of yields %d\0A\00"
@.str.1 = [13 x i8] c"RETURNED %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @fun(i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%6 = icmp ne i32 %3, 201
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("No???\n");
  printf("No??=\n");
  return EXIT_SUCCESS;
}


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

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

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [6 x i8] c"No???\00"
@str.2 = [6 x i8] c"No??=\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.2, i64 0, i64 0))
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ _pwmss_eqep_clk_enable(unsigned int);
scalar_t__ _pwmss_eqep_clk_status_get(unsigned int);
int /*<<< orphan*/ _pwmss_eqep_clk_status_set(unsigned int, int);
int pwmss_eqep_clk_enable(unsigned int device_id) {
  if (device_id > 2) {
    return -1;
  }
  if (_pwmss_eqep_clk_status_get(device_id) != 0) {
    return 1;
  }
  _pwmss_eqep_clk_enable(device_id);
  _pwmss_eqep_clk_status_set(device_id, 1);
  return 0;
}


x86 assembly (clang, -O0):
<pwmss_eqep_clk_enable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jbe    1151 <pwmss_eqep_clk_enable+0x21>
movl   $0xffffffff,-0x4(%rbp)
jmp    118b <pwmss_eqep_clk_enable+0x5b>
mov    -0x8(%rbp),%edi
call   1030 <_pwmss_eqep_clk_status_get@plt>
cmp    $0x0,%rax
je     116f <pwmss_eqep_clk_enable+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    118b <pwmss_eqep_clk_enable+0x5b>
mov    -0x8(%rbp),%edi
call   1040 <_pwmss_eqep_clk_enable@plt>
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
call   1050 <_pwmss_eqep_clk_status_set@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwmss_eqep_clk_enable>:
push   %rbx
mov    $0xffffffff,%eax
cmp    $0x2,%edi
ja     114f <pwmss_eqep_clk_enable+0x1f>
mov    %edi,%ebx
call   1030 <_pwmss_eqep_clk_status_get@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1151 <pwmss_eqep_clk_enable+0x21>
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <_pwmss_eqep_clk_enable@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   1050 <_pwmss_eqep_clk_status_set@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @pwmss_eqep_clk_enable(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ugt i32 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, i32* %2
br label %17
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i64 @_pwmss_eqep_clk_status_get(i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %17
12: ; preds = %7
%13 = load i32, i32* %3
%14 = call i32 @_pwmss_eqep_clk_enable(i32 %13)
%15 = load i32, i32* %3
%16 = call i32 @_pwmss_eqep_clk_status_set(i32 %15, i32 1)
store i32 0, i32* %2
br label %17
17: ; preds = %12, %11, %6
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @pwmss_eqep_clk_enable(i32 %0) {
%2 = icmp ugt i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i64 @_pwmss_eqep_clk_status_get(i32 %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @_pwmss_eqep_clk_enable(i32 %0)
%8 = tail call i32 @_pwmss_eqep_clk_status_set(i32 %0, i32 1)
br label %9
9: ; preds = %3, %1, %6
%10 = phi i32 [ 0, %6 ], [ -1, %1 ], [ 1, %3 ]
ret i32 %10
}
int foo(void) { return 253; }


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

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

LLVM IR (-O0):
define i32 @foo() {
ret i32 253
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 253
}
void FCEUSND_SaveState(void) {}


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

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

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

LLVM IR (-O2):
define void @FCEUSND_SaveState() {
ret void
}
/* Variables and functions */
size_t CRYPTO_secure_actual_size(void *ptr) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @CRYPTO_secure_actual_size(i8* nocapture readnone %0) {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ _IO(int, int);
int ioctl(int, int /*<<< orphan*/);
int cbm_unlisten(int f) { return ioctl(f, _IO(0xcb, 3)); }


x86 assembly (clang, -O0):
<cbm_unlisten>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0xcb,%edi
mov    $0x3,%esi
call   1030 <_IO@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbm_unlisten>:
push   %rbx
mov    %edi,%ebx
mov    $0xcb,%edi
mov    $0x3,%esi
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @cbm_unlisten(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_IO(i32 203, i32 3)
%5 = call i32 @ioctl(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @cbm_unlisten(i32 %0) {
%2 = tail call i32 @_IO(i32 203, i32 3)
%3 = tail call i32 @ioctl(i32 %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ debug_puts(char *);
int /*<<< orphan*/ sim_abort();
int main() {
  debug_puts("\n"
             "This program tests the simulator magic abort port.\n"
             "There should be no more messages after this one.\n");
  sim_abort();
  debug_puts("ERROR - Simulator did not abort?\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <debug_puts@plt>
mov    $0x0,%al
call   1040 <sim_abort@plt>
lea    0xf1d(%rip),%rdi
call   1030 <debug_puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [102 x i8] c"\0AThis program tests the simulator magic abort port.\0AThere should be no more messages after this one.\0A\00"
@.str.1 = [34 x i8] c"ERROR - Simulator did not abort?\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @debug_puts(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @sim_abort()
%4 = call i32 @debug_puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [102 x i8] c"\0AThis program tests the simulator magic abort port.\0AThere should be no more messages after this one.\0A\00"
@.str.1 = [34 x i8] c"ERROR - Simulator did not abort?\0A\00"
define i32 @main() {
%1 = tail call i32 @debug_puts(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @sim_abort()
%3 = tail call i32 @debug_puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
unsigned char *dh_init_private_key(unsigned char *, size_t);
unsigned char *ke_dh_private(unsigned char *priv, size_t size) {
  return dh_init_private_key(priv, size);
}


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

x86 assembly (clang, -O2):
<ke_dh_private>:
jmp    1030 <dh_init_private_key@plt>

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

LLVM IR (-O2):
define i8* @ke_dh_private(i8* %0, i64 %1) {
%3 = tail call i8* @dh_init_private_key(i8* %0, i64 %1)
ret i8* %3
}
/* Type definitions */
typedef int uint8_t;
typedef size_t uint32_t;

/* Variables and functions */
uint8_t get_byte(uint8_t *loc, uint32_t image_addr) {
  uint8_t b = loc[image_addr];
  return 0x00 | b;
}


x86 assembly (clang, -O0):
<get_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
or     $0x0,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @get_byte(i32* nocapture %0, i64 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 %1
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
double EvalAngCor_alpha0_4plus_0plus_15097_L4(double);
double funcAngCor_alpha0_4plus_0plus_15097_L4(double *x, double *par) {
  double result;
  result = par[0] * EvalAngCor_alpha0_4plus_0plus_15097_L4(x[0]);
  return result;
}


x86 assembly (clang, -O0):
<funcAngCor_alpha0_4plus_0plus_15097_L4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <EvalAngCor_alpha0_4plus_0plus_15097_L4@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcAngCor_alpha0_4plus_0plus_15097_L4>:
push   %rax
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rdi),%xmm0
call   1030 <EvalAngCor_alpha0_4plus_0plus_15097_L4@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @funcAngCor_alpha0_4plus_0plus_15097_L4(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %4
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %3
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = call double @EvalAngCor_alpha0_4plus_0plus_15097_L4(double %11)
%13 = fmul double %8, %12
store double %13, double* %5
%14 = load double, double* %5
ret double %14
}

LLVM IR (-O2):
define double @funcAngCor_alpha0_4plus_0plus_15097_L4(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = load double, double* %0
%5 = tail call double @EvalAngCor_alpha0_4plus_0plus_15097_L4(double %4)
%6 = fmul double %3, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ clear();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ usleep(int);
void greet(void) {
  clear();
  printf("WELCOME TO GAME OF FIFTEEN\n");
  usleep(2000000);
}


x86 assembly (clang, -O0):
<greet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <clear@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1e8480,%edi
call   1050 <usleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<greet>:
push   %rax
xor    %eax,%eax
call   1040 <clear@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1e8480,%edi
pop    %rax
jmp    1050 <usleep@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"WELCOME TO GAME OF FIFTEEN\0A\00"
define void @greet() {
%1 = call i32 (...) @clear()
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @usleep(i32 2000000)
ret void
}

LLVM IR (-O2):
@str = [27 x i8] c"WELCOME TO GAME OF FIFTEEN\00"
define void @greet() {
%1 = tail call i32 (...) @clear()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @usleep(i32 2000000)
ret void
}
const char *CRYPTO_get_lock_name(int lock_num) { return ""; }


x86 assembly (clang, -O0):
<CRYPTO_get_lock_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRYPTO_get_lock_name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @CRYPTO_get_lock_name(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @CRYPTO_get_lock_name(i32 %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
size_t minipack_sizeof_float() { return 5; }


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

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

LLVM IR (-O0):
define i64 @minipack_sizeof_float() {
ret i64 5
}

LLVM IR (-O2):
define i64 @minipack_sizeof_float() {
ret i64 5
}
/* Type definitions */
typedef int /*<<< orphan*/ ld;

/* Variables and functions */
int /*<<< orphan*/ send_frame(char *, int);
int sendDisconnect() {
  char ld[] = {7, 2, 1, 1, 255, 2, 1, 0};
  send_frame(ld, sizeof(ld));
}


x86 assembly (clang, -O0):
<sendDisconnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
mov    $0x8,%esi
call   1030 <send_frame@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendDisconnect>:
push   %rax
movabs $0x102ff01010207,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
mov    $0x8,%esi
call   1030 <send_frame@plt>
pop    %rcx
ret

LLVM IR (-O0):
@__const.sendDisconnect.ld = [8 x i8] c"\07\02\01\01\FF\02\01\00"
define i32 @sendDisconnect() {
%1 = alloca i32
%2 = alloca [8 x i8]
%3 = bitcast [8 x i8]* %2 to i8*
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%5 = call i32 @send_frame(i8* %4, i32 8)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @sendDisconnect() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 284769233469959, i64* %1
%3 = call i32 @send_frame(i8* %2, i32 8)
ret i32 undef
}
int test_imm_7Duint32_reg(unsigned int val) {
  return ((val) & (0x7D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_7Duint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x7d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_7Duint32_reg(i32 %0) {
%2 = and i32 %0, 125
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int checkpositiveace(int *a) {
  int i;
  for (i = 0; i < 4; i++) {
    if (*(a + i) > 0)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<checkpositiveace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    114a <checkpositiveace+0x4a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    1137 <checkpositiveace+0x37>
movl   $0x1,-0x4(%rbp)
jmp    1151 <checkpositiveace+0x51>
jmp    113c <checkpositiveace+0x3c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <checkpositiveace+0xf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkpositiveace>:
mov    $0x1,%eax
cmpl   $0x0,(%rdi)
jle    110b <checkpositiveace+0xb>
ret
cmpl   $0x0,0x4(%rdi)
jg     110a <checkpositiveace+0xa>
cmpl   $0x0,0x8(%rdi)
jg     110a <checkpositiveace+0xa>
xor    %eax,%eax
cmpl   $0x0,0xc(%rdi)
setg   %al
ret

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

LLVM IR (-O2):
define i32 @checkpositiveace(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp sgt i32 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = icmp sgt i32 %6, 0
br i1 %7, label %17, label %8
8: ; preds = %4
%9 = getelementptr inbounds i32, i32* %0, i64 2
%10 = load i32, i32* %9
%11 = icmp sgt i32 %10, 0
br i1 %11, label %17, label %12
12: ; preds = %8
%13 = getelementptr inbounds i32, i32* %0, i64 3
%14 = load i32, i32* %13
%15 = icmp sgt i32 %14, 0
%16 = zext i1 %15 to i32
br label %17
17: ; preds = %12, %8, %4, %1
%18 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 1, %8 ], [ %16, %12 ]
ret i32 %18
}
int foo(int a) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 0
}