xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ idc(int *);
int test22(int *q, int *x) {
  idc(q);
  if (x)
    ;
  int *p = q;
  return *p;
}


x86 assembly (clang, -O0):
<test22>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <idc@plt>
cmpq   $0x0,-0x10(%rbp)
je     1139 <test22+0x29>
jmp    1139 <test22+0x29>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test22>:
push   %rbx
mov    %rdi,%rbx
call   1030 <idc@plt>
mov    (%rbx),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @test22(i32* %0, i32* nocapture readnone %1) {
%3 = tail call i32 @idc(i32* %0)
%4 = load i32, i32* %0
ret i32 %4
}
/* Variables and functions */
int is_prime(long long);
int /*<<< orphan*/ printf(char *, long long);
int main(void) {
  long long n;
  for (n = 600851475143; n > 2; n--)
    if (is_prime(n) == 1)
      printf("%lld isnt prime", n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movabs $0x8be589eac7,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x2,-0x10(%rbp)
jle    1180 <main+0x60>
mov    -0x10(%rbp),%rdi
call   1040 <is_prime@plt>
cmp    $0x1,%eax
jne    116a <main+0x4a>
mov    -0x10(%rbp),%rsi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
jmp    116f <main+0x4f>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movabs $0x8be589eac8,%rbx
lea    0xecb(%rip),%r14
jmp    1146 <main+0x26>
nopw   0x0(%rax,%rax,1)
cmp    $0x3,%rbx
jbe    1164 <main+0x44>
add    $0xffffffffffffffff,%rbx
mov    %rbx,%rdi
call   1040 <is_prime@plt>
cmp    $0x1,%eax
jne    1140 <main+0x20>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
jmp    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"%lld isnt prime\00"
define i32 @main() {
br label %1
1: ; preds = %0, %7
%2 = phi i64 [ 600851475143, %0 ], [ %8, %7 ]
%3 = tail call i32 @is_prime(i64 %2)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 %2)
br label %7
7: ; preds = %1, %5
%8 = add nsw i64 %2, -1
%9 = icmp ugt i64 %2, 3
br i1 %9, label %1, label %10
10: ; preds = %7
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ feof(int /*<<< orphan*/);
int /*<<< orphan*/ quote_calc3_parse();
int /*<<< orphan*/ stdin;
int main(void) {
  while (!feof(stdin)) {
    quote_calc3_parse();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
call   1030 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1152 <main+0x32>
jmp    115e <main+0x3e>
mov    $0x0,%al
call   1040 <quote_calc3_parse@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ec0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edi
call   1030 <feof@plt>
test   %eax,%eax
jne    1144 <main+0x24>
xor    %eax,%eax
call   1040 <quote_calc3_parse@plt>
jmp    1130 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* @stdin
%4 = call i32 @feof(i32 %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (...) @quote_calc3_parse()
br label %2
9: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @feof(i32 %1)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %0, %4
%5 = tail call i32 (...) @quote_calc3_parse()
%6 = load i32, i32* @stdin
%7 = tail call i32 @feof(i32 %6)
%8 = icmp eq i32 %7, 0
br i1 %8, label %4, label %9
9: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char *);
void usage(const char *program_name) {
  printf(
      "Usage: %s [OPTION]... [FILE]...\n"
      "Check whether input files are valid UTF-8.\n"
      "\n"
      "  -h, --help       display this help text and exit\n"
      "  -q, --quiet      suppress all normal output\n"
      "  -l, --list       print only names of FILEs containing invalid UTF-8\n"
      "  -i, --invert     list valid UTF-8 files instead of invalid ones\n"
      "  -v, --verbose    print detailed error (multiple lines)\n"
      "\n"
      "This is version %s.\n",
      program_name, "1.2");
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
lea    0x1063(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [388 x i8] c"Usage: %s [OPTION]... [FILE]...\0ACheck whether input files are valid UTF-8.\0A\0A -h, --help display this help text and exit\0A -q, --quiet suppress all normal output\0A -l, --list print only names of FILEs containing invalid UTF-8\0A -i, --invert list valid UTF-8 files instead of invalid ones\0A -v, --verbose print detailed error (multiple lines)\0A\0AThis is version %s.\0A\00"
@.str.1 = [4 x i8] c"1.2\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([388 x i8], [388 x i8]* @.str, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [388 x i8] c"Usage: %s [OPTION]... [FILE]...\0ACheck whether input files are valid UTF-8.\0A\0A -h, --help display this help text and exit\0A -q, --quiet suppress all normal output\0A -l, --list print only names of FILEs containing invalid UTF-8\0A -i, --invert list valid UTF-8 files instead of invalid ones\0A -v, --verbose print detailed error (multiple lines)\0A\0AThis is version %s.\0A\00"
@.str.1 = [4 x i8] c"1.2\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([388 x i8], [388 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
float log10f(float);
float lin2db(float lin) {
  if (lin == 0.0f)
    return -90.0f;
  else
    return (20.0f * log10f(lin));
}


x86 assembly (clang, -O0):
<lin2db>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1146 <lin2db+0x36>
jp     1146 <lin2db+0x36>
movss  0xec8(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1164 <lin2db+0x54>
movss  -0x8(%rbp),%xmm0
call   1030 <log10f@plt>
movaps %xmm0,%xmm1
movss  0xea5(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lin2db>:
push   %rax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1125 <lin2db+0x15>
jp     1125 <lin2db+0x15>
movss  0xedd(%rip),%xmm0
pop    %rax
ret
call   1030 <log10f@plt>
mulss  0xed2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @lin2db(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp oeq float %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store float -9.000000e+01, float* %2
br label %11
7: ; preds = %1
%8 = load float, float* %3
%9 = call float @log10f(float %8)
%10 = fmul float 2.000000e+01, %9
store float %10, float* %2
br label %11
11: ; preds = %7, %6
%12 = load float, float* %2
ret float %12
}

LLVM IR (-O2):
define float @lin2db(float %0) {
%2 = fcmp oeq float %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call float @log10f(float %0)
%5 = fmul float %4, 2.000000e+01
br label %6
6: ; preds = %1, %3
%7 = phi float [ %5, %3 ], [ -9.000000e+01, %1 ]
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void pf1() { printf("Function Test 1\n"); }


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

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

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

LLVM IR (-O2):
@str = [16 x i8] c"Function Test 1\00"
define void @pf1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
void swap_res(struct pci_res **p1, struct pci_res **p2) {
  struct pci_res *tmp = *p1;
  *p1 = *p2;
  *p2 = tmp;
}


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

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

LLVM IR (-O0):
%struct.pci_res = type opaque
define void @swap_res(%struct.pci_res** %0, %struct.pci_res** %1) {
%3 = alloca %struct.pci_res**
%4 = alloca %struct.pci_res**
%5 = alloca %struct.pci_res*
store %struct.pci_res** %0, %struct.pci_res*** %3
store %struct.pci_res** %1, %struct.pci_res*** %4
%6 = load %struct.pci_res**, %struct.pci_res*** %3
%7 = load %struct.pci_res*, %struct.pci_res** %6
store %struct.pci_res* %7, %struct.pci_res** %5
%8 = load %struct.pci_res**, %struct.pci_res*** %4
%9 = load %struct.pci_res*, %struct.pci_res** %8
%10 = load %struct.pci_res**, %struct.pci_res*** %3
store %struct.pci_res* %9, %struct.pci_res** %10
%11 = load %struct.pci_res*, %struct.pci_res** %5
%12 = load %struct.pci_res**, %struct.pci_res*** %4
store %struct.pci_res* %11, %struct.pci_res** %12
ret void
}

LLVM IR (-O2):
%struct.pci_res = type opaque
define void @swap_res(%struct.pci_res** nocapture %0, %struct.pci_res** nocapture %1) {
%3 = load %struct.pci_res*, %struct.pci_res** %0
%4 = load %struct.pci_res*, %struct.pci_res** %1
store %struct.pci_res* %4, %struct.pci_res** %0
store %struct.pci_res* %3, %struct.pci_res** %1
ret void
}
char *my_stpcpy(char *a, const char *b) {
  while (*b)
    *a++ = *b++;
  *a = 0;
  return (char *)a;
}


x86 assembly (clang, -O0):
<my_stpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1140 <my_stpcpy+0x40>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    110c <my_stpcpy+0xc>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_stpcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1121 <my_stpcpy+0x21>
add    $0x1,%rsi
nopl   (%rax)
mov    %cl,(%rax)
add    $0x1,%rax
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <my_stpcpy+0x10>
movb   $0x0,(%rax)
ret

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

LLVM IR (-O2):
define i8* @my_stpcpy(i8* writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = phi i8* [ %10, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %6, i8* %8
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret i8* %14
}
double interpolateLinear(double y1, double y2, double x1, double x2,
                         double x0) {
  return ((y2 - y1) / (x2 - x1) * (x0 - x1) + y1);
}


x86 assembly (clang, -O0):
<interpolateLinear>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm2
subsd  -0x18(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpolateLinear>:
subsd  %xmm0,%xmm1
subsd  %xmm2,%xmm3
divsd  %xmm3,%xmm1
subsd  %xmm2,%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm4,%xmm0
ret

LLVM IR (-O0):
define double @interpolateLinear(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = load double, double* %7
%12 = load double, double* %6
%13 = fsub double %11, %12
%14 = load double, double* %9
%15 = load double, double* %8
%16 = fsub double %14, %15
%17 = fdiv double %13, %16
%18 = load double, double* %10
%19 = load double, double* %8
%20 = fsub double %18, %19
%21 = load double, double* %6
%22 = call double @llvm.fmuladd.f64(double %17, double %20, double %21)
ret double %22
}

LLVM IR (-O2):
define double @interpolateLinear(double %0, double %1, double %2, double %3, double %4) {
%6 = fsub double %1, %0
%7 = fsub double %3, %2
%8 = fdiv double %6, %7
%9 = fsub double %4, %2
%10 = tail call double @llvm.fmuladd.f64(double %8, double %9, double %0)
ret double %10
}
/* Variables and functions */
int issetugid();
int main(void) {
  int status;
  status = issetugid();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @issetugid()
ret i32 0
}
int Parent(i) {
  if (i % 2 == 0)
    return i / 2;
  else
    return (i - 1) / 2;
}


x86 assembly (clang, -O0):
<Parent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    112e <Parent+0x2e>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    113f <Parent+0x3f>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Parent>:
mov    %edi,%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @Parent(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sdiv i32 %8, 2
store i32 %9, i32* %2
br label %14
10: ; preds = %1
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 1
%13 = sdiv i32 %12, 2
store i32 %13, i32* %2
br label %14
14: ; preds = %10, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @Parent(i32 %0) {
%2 = and i32 %0, -2
%3 = sdiv i32 %2, 2
ret i32 %3
}
void adis16260_remove_trigger(struct iio_dev *indio_dev) {}


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

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

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define void @adis16260_remove_trigger(%struct.iio_dev* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
main() {
  int i = 0;
  if (sizeof(unsigned long int) == 4) {
    unsigned long int z = 0;
    do {
      z -= 0x00004000;
      i++;
      if (i > 0x00040000)
        abort();
    } while (z > 0);
    exit(0);
  } else if (sizeof(unsigned int) == 4) {
    unsigned int z = 0;
    do {
      z -= 0x00004000;
      i++;
      if (i > 0x00040000)
        abort();
    } while (z > 0);
    exit(0);
  } else
    exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x4000,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x40000,-0x8(%rbp)
jle    1165 <main+0x45>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    116a <main+0x4a>
cmpl   $0x0,-0xc(%rbp)
ja     113d <main+0x1d>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %14, %0
%5 = load i32, i32* %3
%6 = sub i32 %5, 16384
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 262144
br i1 %10, label %11, label %13
11: ; preds = %4
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %4
br label %14
14: ; preds = %13
%15 = load i32, i32* %3
%16 = icmp ugt i32 %15, 0
br i1 %16, label %4, label %17
17: ; preds = %14
%18 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
int main() {
  int x = 1;
  if (x << 2 != 4) {
    goto ERROR;
  }
  if (1 << 2 != 4) {
    goto ERROR;
  }
  if (5 << 2 != 20) {
    goto ERROR;
  }
  if (4 >> 2 != 1) {
    goto ERROR;
  }
  if (20 >> 2 != 5) {
    goto ERROR;
  }
  if (1 >> 2 != 0) {
    goto ERROR;
  }
  if (5 >> 2 != 1) {
    goto ERROR;
  }
  return 0;
ERROR:
  goto ERROR;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
cmp    $0x4,%eax
je     1126 <main+0x26>
jmp    112a <main+0x2a>
xor    %eax,%eax
pop    %rbp
ret
jmp    112a <main+0x2a>

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
double _ferf(double);
double ferf(double x) {
  if (x < 0) {
    return -_ferf(-x);
  }
  return _ferf(x);
}


x86 assembly (clang, -O0):
<ferf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    116d <ferf+0x5d>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <_ferf@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117c <ferf+0x6c>
movsd  -0x10(%rbp),%xmm0
call   1030 <_ferf@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ferf>:
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    1132 <ferf+0x22>
push   %rax
xorpd  0xedd(%rip),%xmm0
call   1030 <_ferf@plt>
xorpd  0xed0(%rip),%xmm0
pop    %rax
ret
jmp    1030 <_ferf@plt>

LLVM IR (-O0):
define double @ferf(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load double, double* %3
%8 = fneg double %7
%9 = call double @_ferf(double %8)
%10 = fneg double %9
store double %10, double* %2
br label %14
11: ; preds = %1
%12 = load double, double* %3
%13 = call double @_ferf(double %12)
store double %13, double* %2
br label %14
14: ; preds = %11, %6
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @ferf(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = fneg double %0
%5 = tail call double @_ferf(double %4)
%6 = fneg double %5
br label %9
7: ; preds = %1
%8 = tail call double @_ferf(double %0)
br label %9
9: ; preds = %7, %3
%10 = phi double [ %6, %3 ], [ %8, %7 ]
ret double %10
}
/* Variables and functions */
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ nocbreak();
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_return(int /*<<< orphan*/);
void cmd_nocbreak(int nargs, char **args) {
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(1);
  report_return(nocbreak());
}


x86 assembly (clang, -O0):
<cmd_nocbreak>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1040 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1167 <cmd_nocbreak+0x27>
jmp    117f <cmd_nocbreak+0x3f>
mov    $0x1,%edi
call   1050 <report_count@plt>
mov    $0x0,%al
call   1060 <nocbreak@plt>
mov    %eax,%edi
call   1030 <report_return@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_nocbreak>:
push   %rax
xor    %esi,%esi
call   1040 <check_arg_count@plt>
cmp    $0x1,%eax
jne    114f <cmd_nocbreak+0xf>
pop    %rax
ret
mov    $0x1,%edi
call   1050 <report_count@plt>
xor    %eax,%eax
call   1060 <nocbreak@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <report_return@plt>

LLVM IR (-O0):
define void @cmd_nocbreak(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 0)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %13
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 (...) @nocbreak()
%12 = call i32 @report_return(i32 %11)
br label %13
13: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @cmd_nocbreak(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 (...) @nocbreak()
%8 = tail call i32 @report_return(i32 %7)
br label %9
9: ; preds = %2, %5
ret void
}
/* Type definitions */
struct _stor_lookup_create_rsp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct _stor_lookup_create_rsp *);
void stor_lookup_create_rsp_free(struct _stor_lookup_create_rsp *ptr) {
  free(ptr);
}


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

x86 assembly (clang, -O2):
<stor_lookup_create_rsp_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct._stor_lookup_create_rsp = type { i32 }
define void @stor_lookup_create_rsp_free(%struct._stor_lookup_create_rsp* %0) {
%2 = alloca %struct._stor_lookup_create_rsp*
store %struct._stor_lookup_create_rsp* %0, %struct._stor_lookup_create_rsp** %2
%3 = load %struct._stor_lookup_create_rsp*, %struct._stor_lookup_create_rsp** %2
%4 = call i32 @free(%struct._stor_lookup_create_rsp* %3)
ret void
}

LLVM IR (-O2):
%struct._stor_lookup_create_rsp = type { i32 }
define void @stor_lookup_create_rsp_free(%struct._stor_lookup_create_rsp* nocapture %0) {
%2 = tail call i32 @free(%struct._stor_lookup_create_rsp* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void popcomplex16array(char *x, int n) {
  popNarray((char *)x, (unsigned int)(n * 16));
}


x86 assembly (clang, -O0):
<popcomplex16array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x4,%esi
call   1030 <popNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<popcomplex16array>:
shl    $0x4,%esi
jmp    1030 <popNarray@plt>

LLVM IR (-O0):
define void @popcomplex16array(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = mul nsw i32 %6, 16
%8 = call i32 @popNarray(i8* %5, i32 %7)
ret void
}

LLVM IR (-O2):
define void @popcomplex16array(i8* %0, i32 %1) {
%3 = shl nsw i32 %1, 4
%4 = tail call i32 @popNarray(i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int match(char const *, char *);
int is_dir(const char *rawString) {
  char *regexString = "[0-9]+[ ]+[0-9]+[ ]+d[rwx-]{9} ";
  return match(rawString, regexString);
}


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

x86 assembly (clang, -O2):
<is_dir>:
lea    0xee9(%rip),%rsi
jmp    1030 <match@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"[0-9]+[ ]+[0-9]+[ ]+d[rwx-]{9} \00"
define i32 @is_dir(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %2
%5 = load i8*, i8** %3
%6 = call i32 @match(i8* %4, i8* %5)
ret i32 %6
}

LLVM IR (-O2):
@.str = [32 x i8] c"[0-9]+[ ]+[0-9]+[ ]+d[rwx-]{9} \00"
define i32 @is_dir(i8* %0) {
%2 = tail call i32 @match(i8* %0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ F(char *);
int /*<<< orphan*/ print_P(int /*<<< orphan*/);
void print_n_close() { print_P(F("'/>\n")); }


x86 assembly (clang, -O0):
<print_n_close>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <F@plt>
mov    %eax,%edi
call   1040 <print_P@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_n_close>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <F@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <print_P@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"'/>\0A\00"
define void @print_n_close() {
%1 = call i32 @F(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @print_P(i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"'/>\0A\00"
define void @print_n_close() {
%1 = tail call i32 @F(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_P(i32 %1)
ret void
}
void fp_f(float f) {}


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

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

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

LLVM IR (-O2):
define void @fp_f(float %0) {
ret void
}
int foo(int *a) { return a[0]; }


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

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

LLVM IR (-O0):
define i32 @foo(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @foo(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
void RTAvloIOPortGetBestFit(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvloIOPortGetBestFit() {
ret void
}
int main() {
  void *idt = 0;
  __asm__("lidt %0" ::"m"(idt));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
lidt   -0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movq   $0x0,-0x8(%rsp)
lidt   -0x8(%rsp)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
store i8* null, i8** %1
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ ADC_Accum(int, unsigned long volatile);
int32_t ADC_Work(void) {
  ADC_Accum(1, (*(volatile unsigned long *)(0xE0034000 + 0x14)));
  ADC_Accum(2, (*(volatile unsigned long *)(0xE0034000 + 0x18)));
  return ((uint32_t)(((((double)100 * (double)(5 * 11059200)) /
                       ((double)(7) * 1000.0f * 1000.0f))) +
                     0.5f));
}


x86 assembly (clang, -O0):
<ADC_Work>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe0034014,%eax
mov    (%rax),%rsi
mov    $0x1,%edi
call   1030 <ADC_Accum@plt>
mov    $0xe0034018,%eax
mov    (%rax),%rsi
mov    $0x2,%edi
call   1030 <ADC_Accum@plt>
mov    $0x316,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADC_Work>:
push   %rbx
mov    $0xe0034014,%ebx
mov    (%rbx),%rsi
mov    $0x1,%edi
call   1030 <ADC_Accum@plt>
mov    0x4(%rbx),%rsi
mov    $0x2,%edi
call   1030 <ADC_Accum@plt>
mov    $0x316,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ADC_Work() {
%1 = load volatile i64, i64* inttoptr (i64 3758309396 to i64*)
%2 = call i32 @ADC_Accum(i32 1, i64 %1)
%3 = load volatile i64, i64* inttoptr (i64 3758309400 to i64*)
%4 = call i32 @ADC_Accum(i32 2, i64 %3)
ret i32 790
}

LLVM IR (-O2):
define i32 @ADC_Work() {
%1 = load volatile i64, i64* inttoptr (i64 3758309396 to i64*)
%2 = tail call i32 @ADC_Accum(i32 1, i64 %1)
%3 = load volatile i64, i64* inttoptr (i64 3758309400 to i64*)
%4 = tail call i32 @ADC_Accum(i32 2, i64 %3)
ret i32 790
}
/* Variables and functions */
void *calloc(int, size_t);
int /*<<< orphan*/ diag(int, char *);
int /*<<< orphan*/ exit(int);
void *allocate(size_t bytes) {
  void *p;
  p = calloc(1, bytes);
  if (p == NULL)
    do {
      diag(1, "calloc");
      exit(2);
    } while (0);
  return (p);
}


x86 assembly (clang, -O0):
<allocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1179 <allocate+0x49>
jmp    115e <allocate+0x2e>
mov    $0x1,%edi
lea    0xe96(%rip),%rsi
call   1030 <diag@plt>
mov    $0x2,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocate>:
push   %rax
mov    %rdi,%rsi
mov    $0x1,%edi
call   1040 <calloc@plt>
test   %rax,%rax
je     1145 <allocate+0x15>
pop    %rcx
ret
lea    0xeb4(%rip),%rsi
mov    $0x1,%edi
call   1030 <diag@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"calloc\00"
define i8* @allocate(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @calloc(i32 1, i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
br label %9
9: ; preds = %8
%10 = call i32 @diag(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 2)
unreachable
12: ; No predecessors!
br label %13
13: ; preds = %12, %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [7 x i8] c"calloc\00"
define i8* @allocate(i64 %0) {
%2 = tail call i8* @calloc(i32 1, i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @diag(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 2)
unreachable
7: ; preds = %1
ret i8* %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t hash_string(char *s) {
  uint32_t h, x;
  h = 0;
  x = *s;
  while (x != 0) {
    h = 31 * h + x;
    s++;
    x = *s;
  }
  return h;
}


x86 assembly (clang, -O0):
<hash_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1148 <hash_string+0x48>
imul   $0x1f,-0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x10(%rbp)
jmp    1119 <hash_string+0x19>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_string>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <hash_string+0x28>
add    $0x1,%rdi
xor    %edx,%edx
mov    %edx,%eax
xchg   %ax,%ax
movsbl %cl,%ecx
shl    $0x5,%eax
sub    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1110 <hash_string+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = mul nsw i32 %6, 31
%10 = add nsw i32 %9, %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %10, %4 ]
ret i32 %15
}
void glUniform1iv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glUniform1iv() {
ret void
}
void dfn_av() {}


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

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

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

LLVM IR (-O2):
define void @dfn_av() {
ret void
}
void chaine_dessine(float l1, float l2, float alpha, float beta) {}


x86 assembly (clang, -O0):
<chaine_dessine>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @chaine_dessine(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
ret void
}

LLVM IR (-O2):
define void @chaine_dessine(float %0, float %1, float %2, float %3) {
ret void
}
int isatty(int file) { return file < 3; }


x86 assembly (clang, -O0):
<isatty>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isatty>:
xor    %eax,%eax
cmp    $0x3,%edi
setl   %al
ret

LLVM IR (-O0):
define i32 @isatty(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 3
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @isatty(i32 %0) {
%2 = icmp slt i32 %0, 3
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
float rsqrt1(float);
float accurateSqrt(float x) { return x * rsqrt1(x); }


x86 assembly (clang, -O0):
<accurateSqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <rsqrt1@plt>
movaps %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accurateSqrt>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1030 <rsqrt1@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @accurateSqrt(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = call float @rsqrt1(float %4)
%6 = fmul float %3, %5
ret float %6
}

LLVM IR (-O2):
define float @accurateSqrt(float %0) {
%2 = tail call float @rsqrt1(float %0)
%3 = fmul float %2, %0
ret float %3
}
/* Type definitions */
typedef scalar_t__ ssize_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fread(char *, int, size_t, int /*<<< orphan*/ *);
void read_output(FILE *fd, size_t count, char *buffer) {
  size_t left = count;
  while (left != 0) {
    ssize_t r = fread(buffer, sizeof(char), count, fd);
    if (r == 0)
      break;
    else
      left -= r;
  }
}


x86 assembly (clang, -O0):
<read_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1175 <read_output+0x65>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1161 <read_output+0x51>
jmp    1175 <read_output+0x65>
mov    -0x28(%rbp),%rcx
mov    -0x20(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <read_output+0x1c>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_output>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%r15
mov    %rsi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
test   %rbx,%rbx
je     1150 <read_output+0x40>
mov    %r14,%rdi
mov    $0x1,%esi
mov    %r12,%rdx
mov    %r15,%rcx
call   1030 <fread@plt>
sub    %rax,%rbx
test   %rax,%rax
jne    1130 <read_output+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @read_output(i32* %0, i64 %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%9 = load i64, i64* %5
store i64 %9, i64* %7
br label %10
10: ; preds = %25, %3
%11 = load i64, i64* %7
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %26
13: ; preds = %10
%14 = load i8*, i8** %6
%15 = load i64, i64* %5
%16 = load i32*, i32** %4
%17 = call i64 @fread(i8* %14, i32 1, i64 %15, i32* %16)
store i64 %17, i64* %8
%18 = load i64, i64* %8
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %13
br label %26
21: ; preds = %13
%22 = load i64, i64* %8
%23 = load i64, i64* %7
%24 = sub i64 %23, %22
store i64 %24, i64* %7
br label %25
25: ; preds = %21
br label %10
26: ; preds = %20, %10
ret void
}

LLVM IR (-O2):
define void @read_output(i32* nocapture %0, i64 %1, i8* nocapture %2) {
br label %4
4: ; preds = %7, %3
%5 = phi i64 [ %1, %3 ], [ %10, %7 ]
%6 = icmp eq i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = tail call i64 @fread(i8* %2, i32 1, i64 %1, i32* %0)
%9 = icmp eq i64 %8, 0
%10 = sub i64 %5, %8
br i1 %9, label %11, label %4
11: ; preds = %7, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_fib(int);
int /*<<< orphan*/ printf(char *);
int main() {
  print_fib(500);
  printf("\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1f4,%edi
call   1030 <print_fib@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @print_fib(i32 500)
%2 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
scalar_t__ clr_eol;
int /*<<< orphan*/ min_putp(scalar_t__);
int min_clreol(void) {
  if (clr_eol) {
    min_putp(clr_eol);
    return 0;
  } else
    return 1;
}


x86 assembly (clang, -O0):
<min_clreol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
cmpq   $0x0,(%rax)
je     1144 <min_clreol+0x34>
mov    0x2eb0(%rip),%rax
mov    (%rax),%rdi
call   1030 <min_putp@plt>
movl   $0x0,-0x4(%rbp)
jmp    114b <min_clreol+0x3b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_clreol>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%rdi
test   %rdi,%rdi
je     1129 <min_clreol+0x19>
call   1030 <min_putp@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@clr_eol = global i64 0
define i32 @min_clreol() {
%1 = alloca i32
%2 = load i64, i64* @clr_eol
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i64, i64* @clr_eol
%6 = call i32 @min_putp(i64 %5)
store i32 0, i32* %1
br label %8
7: ; preds = %0
store i32 1, i32* %1
br label %8
8: ; preds = %7, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@clr_eol = global i64 0
define i32 @min_clreol() {
%1 = load i64, i64* @clr_eol
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @min_putp(i64 %1)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ 0, %3 ], [ 1, %0 ]
ret i32 %6
}
const char *loader_BASIC_get_type(void) { return "BASIC"; }


x86 assembly (clang, -O0):
<loader_BASIC_get_type>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"BASIC\00"
define i8* @loader_BASIC_get_type() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"BASIC\00"
define i8* @loader_BASIC_get_type() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned int min_byte1;
};
typedef TYPE_1__ XFontStruct;

/* Variables and functions */
void set_XFontStruct_min_byte1(void *_p, unsigned _v) {
  ((XFontStruct *)_p)->min_byte1 = (unsigned)_v;
}


x86 assembly (clang, -O0):
<set_XFontStruct_min_byte1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XFontStruct_min_byte1>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XFontStruct_min_byte1(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XFontStruct_min_byte1(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main() {
  char c = 'a';
  int i = 32;
  float f = 2.3;
  printf("Character is %c\n", c);
  printf("Integer   is %i\n", i);
  printf("Float     is %f\n", f);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x61,-0x1(%rbp)
movl   $0x20,-0x8(%rbp)
movl   $0x40133333,-0xc(%rbp)
movsbl -0x1(%rbp),%eax
cvtsi2ss %eax,%xmm0
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
cvtsi2ssl -0x8(%rbp),%xmm0
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef4(%rip),%rdi
movss  0xee0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
movss  0xed0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
movss  0xec0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Character is %c\0A\00"
@.str.1 = [17 x i8] c"Integer is %i\0A\00"
@.str.2 = [17 x i8] c"Float is %f\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca float
store i8 97, i8* %1
store i32 32, i32* %2
store float 0x4002666660000000, float* %3
%4 = load i8, i8* %1
%5 = sitofp i8 %4 to float
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), float %5)
%7 = load i32, i32* %2
%8 = sitofp i32 %7 to float
%9 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), float %8)
%10 = load float, float* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Character is %c\0A\00"
@.str.1 = [17 x i8] c"Integer is %i\0A\00"
@.str.2 = [17 x i8] c"Float is %f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), float 9.700000e+01)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), float 3.200000e+01)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), float 0x4002666660000000)
ret i32 0
}