xunge/DecIR huggingface dataset:
/* Variables and functions */
long double __gcc_qadd(double, double, double, double);
long double __gcc_qsub(double a, double b, double c, double d) {
  return __gcc_qadd(a, b, -c, -d);
}


x86 assembly (clang, -O0):
<__gcc_qsub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movapd 0xec2(%rip),%xmm4
movsd  -0x18(%rbp),%xmm2
pxor   %xmm4,%xmm2
movsd  -0x20(%rbp),%xmm3
pxor   %xmm4,%xmm3
call   1030 <__gcc_qadd@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__gcc_qsub>:
movaps 0xee9(%rip),%xmm4
xorps  %xmm4,%xmm2
xorps  %xmm4,%xmm3
jmp    1030 <__gcc_qadd@plt>

LLVM IR (-O0):
define x86_fp80 @__gcc_qsub(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = load double, double* %7
%12 = fneg double %11
%13 = load double, double* %8
%14 = fneg double %13
%15 = call x86_fp80 @__gcc_qadd(double %9, double %10, double %12, double %14)
ret x86_fp80 %15
}

LLVM IR (-O2):
define x86_fp80 @__gcc_qsub(double %0, double %1, double %2, double %3) {
%5 = fneg double %2
%6 = fneg double %3
%7 = tail call x86_fp80 @__gcc_qadd(double %0, double %1, double %5, double %6)
ret x86_fp80 %7
}
/* Variables and functions */
int PnameDef();
PlibraryNameDef() {
  int b = -1;
  ;
  b = PnameDef();
  return (b);
}


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

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

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

LLVM IR (-O2):
define i32 @PlibraryNameDef() {
%1 = tail call i32 (...) @PnameDef()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("----------------PROCESS START----------------\n");
  printf("Prob 1: segmentFault\n");
  int *a = 0;
  *a = 0;
  printf("----------------PROCESS   END----------------\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
call   1030 <printf@plt>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
lea    0xeee(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [47 x i8] c"----------------PROCESS START----------------\0A\00"
@.str.1 = [22 x i8] c"Prob 1: segmentFault\0A\00"
@.str.2 = [47 x i8] c"----------------PROCESS END----------------\0A\00"
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
%7 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
store i32* null, i32** %6
%9 = load i32*, i32** %6
store i32 0, i32* %9
%10 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [46 x i8] c"----------------PROCESS START----------------\00"
@str.3 = [21 x i8] c"Prob 1: segmentFault\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.3, i64 0, i64 0))
unreachable
}
char *file_check(void) { return ("not verified"); }


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"not verified\00"
define i8* @file_check() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}
double max_double(double a, double b) {
  double max;
  max = a;
  if (b > a)
    max = b;
  return (max);
}


x86 assembly (clang, -O0):
<max_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1132 <max_double+0x32>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_double>:
maxsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @max_double(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* %3
store double %6, double* %5
%7 = load double, double* %4
%8 = load double, double* %3
%9 = fcmp ogt double %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load double, double* %4
store double %11, double* %5
br label %12
12: ; preds = %10, %2
%13 = load double, double* %5
ret double %13
}

LLVM IR (-O2):
define double @max_double(double %0, double %1) {
%3 = fcmp ogt double %1, %0
%4 = select i1 %3, double %1, double %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void ansi_escape(char *seq) { printf("%s%s", "\033[", seq); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
@.str.1 = [3 x i8] c"\1B[\00"
define void @ansi_escape(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
int get2() { return 2; }


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

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

LLVM IR (-O0):
define i32 @get2() {
ret i32 2
}

LLVM IR (-O2):
define i32 @get2() {
ret i32 2
}
/* Variables and functions */
char *all_tests();
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  char *result = all_tests();
  if (result != 0) {
    printf("%s\n", result);
  } else {
    printf("ALL TESTS PASSED\n");
  }
  return result != 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <all_tests@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1163 <main+0x43>
mov    -0x18(%rbp),%rsi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1171 <main+0x51>
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <all_tests@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1135 <main+0x15>
mov    %rbx,%rdi
jmp    113c <main+0x1c>
lea    0xec4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
test   %rbx,%rbx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [18 x i8] c"ALL TESTS PASSED\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i8* (...) @all_tests()
store i8* %7, i8** %6
%8 = load i8*, i8** %6
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i8*, i8** %6
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %15
13: ; preds = %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %10
%16 = load i8*, i8** %6
%17 = icmp ne i8* %16, null
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
@str = [17 x i8] c"ALL TESTS PASSED\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* (...) @all_tests()
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @puts(i8* %3)
br label %9
7: ; preds = %2
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
%10 = zext i1 %4 to i32
ret i32 %10
}
int int32(const unsigned char *ptr) {
  int x = ptr[3];
  x = (x << 8) | ptr[2];
  x = (x << 8) | ptr[1];
  x = (x << 8) | ptr[0];
  return x;
}


x86 assembly (clang, -O0):
<int32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @int32(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 3
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = shl i32 %8, 8
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 2
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = or i32 %9, %13
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = shl i32 %15, 8
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i64 1
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = or i32 %16, %20
store i32 %21, i32* %3
%22 = load i32, i32* %3
%23 = shl i32 %22, 8
%24 = load i8*, i8** %2
%25 = getelementptr inbounds i8, i8* %24, i64 0
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = or i32 %23, %27
store i32 %28, i32* %3
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
define i32 @int32(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %4, 16
%9 = shl nuw nsw i32 %7, 8
%10 = or i32 %9, %8
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = or i32 %10, %13
%15 = shl nuw i32 %14, 8
%16 = load i8, i8* %0
%17 = zext i8 %16 to i32
%18 = or i32 %15, %17
ret i32 %18
}
/* Variables and functions */
int syscall(int, unsigned int, int);
int eventfd(unsigned int count, int flags) {
  return syscall(flags ? 356 : 351, count, flags);
}


x86 assembly (clang, -O0):
<eventfd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x15f,%edi
mov    $0x164,%eax
cmp    $0x0,%ecx
cmovne %eax,%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eventfd>:
mov    %esi,%edx
mov    %edi,%esi
xor    %eax,%eax
test   %edx,%edx
setne  %al
lea    (%rax,%rax,4),%edi
add    $0x15f,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @eventfd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 356, i32 351
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @syscall(i32 %8, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @eventfd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i32 351, i32 356
%5 = tail call i32 @syscall(i32 %4, i32 %0, i32 %1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_9274() {
  Assert_real((isqrt(9274) == 96),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              1470, ("Integer square root of 9274 should be 96"));
}


x86 assembly (clang, -O0):
<t_sqrt_9274>:
push   %rbp
mov    %rsp,%rbp
mov    $0x243a,%edi
call   1030 <isqrt@plt>
cmp    $0x60,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x5be,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_9274>:
push   %rax
mov    $0x243a,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x60,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x5be,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 9274 should be 96\00"
define void @t_sqrt_9274() {
%1 = call i32 @isqrt(i32 9274)
%2 = icmp eq i32 %1, 96
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1470, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 9274 should be 96\00"
define void @t_sqrt_9274() {
%1 = tail call i32 @isqrt(i32 9274)
%2 = icmp eq i32 %1, 96
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1470, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
__attribute__((always_)) const int xisnanf(float x) { return x != x; }


x86 assembly (clang, -O0):
<xisnanf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x4(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xisnanf>:
xor    %eax,%eax
ucomiss %xmm0,%xmm0
setp   %al
ret

LLVM IR (-O0):
define i32 @xisnanf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fcmp une float %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @xisnanf(float %0) {
%2 = fcmp uno float %0, 0.000000e+00
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int same_screen;
};
struct TYPE_4__ {
  TYPE_1__ xbutton;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xbutton_same_screen(void *_p, int _v) {
  ((XEvent *)_p)->xbutton.same_screen = (int)_v;
}


x86 assembly (clang, -O0):
<set_XEvent_xbutton_same_screen>:
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_XEvent_xbutton_same_screen>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xbutton_same_screen(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_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xbutton_same_screen(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void destroy_adk() { return; }


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

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

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

LLVM IR (-O2):
define void @destroy_adk() {
ret void
}
/* Variables and functions */
scalar_t__ util_le_buf_to_dword(unsigned char *);
int util_le_buf4_to_int(unsigned char *buf) {
  return (int)util_le_buf_to_dword(buf);
}


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

x86 assembly (clang, -O2):
<util_le_buf4_to_int>:
jmp    1030 <util_le_buf_to_dword@plt>

LLVM IR (-O0):
define i32 @util_le_buf4_to_int(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @util_le_buf_to_dword(i8* %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @util_le_buf4_to_int(i8* %0) {
%2 = tail call i64 @util_le_buf_to_dword(i8* %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
time_t get_localtime(struct tm *rectime) {
  time_t timer;
  struct tm *ltm;
  time(&timer);
  ltm = localtime(&timer);
  *rectime = *ltm;
  return timer;
}


x86 assembly (clang, -O0):
<get_localtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <time@plt>
lea    -0xc(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rcx),%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_localtime>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <time@plt>
mov    %r14,%rdi
call   1030 <localtime@plt>
mov    (%rax),%eax
mov    %eax,(%rbx)
mov    0x4(%rsp),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @get_localtime(%struct.tm* %0) {
%2 = alloca %struct.tm*
%3 = alloca i32
%4 = alloca %struct.tm*
store %struct.tm* %0, %struct.tm** %2
%5 = call i32 @time(i32* %3)
%6 = call %struct.tm* @localtime(i32* %3)
store %struct.tm* %6, %struct.tm** %4
%7 = load %struct.tm*, %struct.tm** %2
%8 = load %struct.tm*, %struct.tm** %4
%9 = bitcast %struct.tm* %7 to i8*
%10 = bitcast %struct.tm* %8 to i8*
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @get_localtime(%struct.tm* nocapture writeonly %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @time(i32* %2)
%5 = call %struct.tm* @localtime(i32* %2)
%6 = getelementptr %struct.tm, %struct.tm* %5, i64 0, i32 0
%7 = getelementptr %struct.tm, %struct.tm* %0, i64 0, i32 0
%8 = load i32, i32* %6
store i32 %8, i32* %7
%9 = load i32, i32* %2
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void foo() { printf("hello world\n"); }


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"hello world\00"
define void @foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatalf(char *, char const *const);
void fatal(const char *const msg) { fatalf("%s", msg); }


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

x86 assembly (clang, -O2):
<fatal>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <fatalf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @fatal(i8* %0) {
%2 = tail call i32 @fatalf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int start_counter_cpu(int cpu) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @start_counter_cpu(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int evaluate_postfix(char *);
void test_division() { assert(evaluate_postfix("12 4 /") == 3); }


x86 assembly (clang, -O0):
<test_division>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <evaluate_postfix@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_division>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <evaluate_postfix@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"12 4 /\00"
define void @test_division() {
%1 = call i32 @evaluate_postfix(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 3
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"12 4 /\00"
define void @test_division() {
%1 = tail call i32 @evaluate_postfix(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 3
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *);
main() {
  char *ch = "makes sense";
  char *p = ch;
  ++p;
  printf("%p, %s, %s\n", p, p, ch);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xec2(%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
lea    0xee2(%rip),%rdx
lea    0xeda(%rip),%rcx
mov    %rdx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"makes sense\00"
@.str.1 = [12 x i8] c"%p, %s, %s\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 1), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 1), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ write_frame(int /*<<< orphan*/ *, int /*<<< orphan*/,
                               int /*<<< orphan*/, int /*<<< orphan*/);
void write_color(uint16_t *p, uint8_t red, uint8_t green, uint8_t blue) {
  write_frame(p, red, green, blue);
}


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

x86 assembly (clang, -O2):
<write_color>:
jmp    1030 <write_frame@plt>

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

LLVM IR (-O2):
define void @write_color(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @write_frame(i32* %0, i32 %1, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
char *strdup(char *);
int strsplit(char *, char **, char *);
char *name_from_url(char *url) {
  char *parts[1024];
  char *s = strdup(url);
  int len = strsplit(s, parts, "/");
  return parts[len - 1];
}


x86 assembly (clang, -O0):
<name_from_url>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2020,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x2018(%rbp)
mov    -0x2018(%rbp),%rdi
lea    -0x2010(%rbp),%rsi
lea    0xeac(%rip),%rdx
call   1030 <strsplit@plt>
mov    %eax,-0x201c(%rbp)
mov    -0x201c(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x2010(%rbp,%rax,8),%rax
ff
add    $0x2020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<name_from_url>:
sub    $0x2008,%rsp
call   1040 <strdup@plt>
lea    0xecd(%rip),%rdx
mov    %rsp,%rsi
mov    %rax,%rdi
call   1030 <strsplit@plt>
cltq
mov    -0x8(%rsp,%rax,8),%rax
add    $0x2008,%rsp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
define i8* @name_from_url(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8*]
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i8* @strdup(i8* %6)
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = getelementptr inbounds [1024 x i8*], [1024 x i8*]* %3, i64 0, i64 0
%10 = call i32 @strsplit(i8* %8, i8** %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = sub nsw i32 %11, 1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [1024 x i8*], [1024 x i8*]* %3, i64 0, i64 %13
%15 = load i8*, i8** %14
ret i8* %15
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i8* @name_from_url(i8* nocapture %0) {
%2 = alloca [1024 x i8*]
%3 = bitcast [1024 x i8*]* %2 to i8*
%4 = tail call i8* @strdup(i8* %0)
%5 = getelementptr inbounds [1024 x i8*], [1024 x i8*]* %2, i64 0, i64 0
%6 = call i32 @strsplit(i8* %4, i8** %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = add nsw i32 %6, -1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [1024 x i8*], [1024 x i8*]* %2, i64 0, i64 %8
%10 = load i8*, i8** %9
ret i8* %10
}
/* Variables and functions */
char *malloc_string(int);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *);
char *colorize_sep(void) {
  char *output = malloc_string(32);
  sprintf(output, "%s%s%s", "\x1b[0m", "│", "\x1b[0m");
  return output;
}


x86 assembly (clang, -O0):
<colorize_sep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x20,%edi
call   1030 <malloc_string@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xebf(%rip),%rsi
lea    0xebf(%rip),%r8
lea    0xebd(%rip),%rcx
mov    %r8,%rdx
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<colorize_sep>:
push   %rbx
mov    $0x20,%edi
call   1030 <malloc_string@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rsi
lea    0xed0(%rip),%rcx
lea    0xec4(%rip),%rdx
mov    %rax,%rdi
mov    %rdx,%r8
call   1040 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%s%s%s\00"
@.str.1 = [5 x i8] c"\1B[0m\00"
@.str.2 = [4 x i8] c"\E2\94\82\00"
define i8* @colorize_sep() {
%1 = alloca i8*
%2 = call i8* @malloc_string(i32 32)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%5 = load i8*, i8** %1
ret i8* %5
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s%s%s\00"
@.str.1 = [5 x i8] c"\1B[0m\00"
@.str.2 = [4 x i8] c"\E2\94\82\00"
define i8* @colorize_sep() {
%1 = tail call i8* @malloc_string(i32 32)
%2 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret i8* %1
}
int octave_wait_for_input(int fid) {
  int retval = -1;
  retval = 1;
  return retval;
}


x86 assembly (clang, -O0):
<octave_wait_for_input>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @octave_wait_for_input(i32 %0) {
ret i32 1
}
void RTErrInfoSetF(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/
sclass_univ_duplicate_entry(int /*<<< orphan*/, int /*<<< orphan*/ const *,
                            int /*<<< orphan*/, int /*<<< orphan*/ const *,
                            int /*<<< orphan*/, int /*<<< orphan*/);
uint8_t sclass_duplicate_entry(uint8_t oldnleng, const uint8_t *oldname,
                               uint8_t newnleng, const uint8_t *newname) {
  return sclass_univ_duplicate_entry(oldnleng, oldname, newnleng, newname, 0,
                                     0);
}


x86 assembly (clang, -O0):
<sclass_duplicate_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
xor    %r9d,%r9d
mov    %r9d,%r8d
call   1030 <sclass_univ_duplicate_entry@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sclass_duplicate_entry>:
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <sclass_univ_duplicate_entry@plt>

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

LLVM IR (-O2):
define i32 @sclass_duplicate_entry(i32 %0, i32* %1, i32 %2, i32* %3) {
%5 = tail call i32 @sclass_univ_duplicate_entry(i32 %0, i32* %1, i32 %2, i32* %3, i32 0, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char);
int main() {
  char c;
  int i = 0;
  for (i; i < 257; i++) {
    c = i;
    printf("%d - %c\n", i, c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x101,-0xc(%rbp)
jge    115a <main+0x4a>
mov    -0xc(%rbp),%eax
mov    %al,-0x5(%rbp)
mov    -0xc(%rbp),%esi
lea    0xebd(%rip),%rdi
movsbl -0x5(%rbp),%edx
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
movsbl %bl,%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x101,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d - %c\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = trunc i32 %2 to i8
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2, i8 signext %3)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 257
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
void do_ping(int argc, char *argv[]) {
  (void)argc;
  (void)argv;
}


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

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

LLVM IR (-O0):
define void @do_ping(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 = load i8**, i8*** %4
ret void
}

LLVM IR (-O2):
define void @do_ping(i32 %0, i8** nocapture %1) {
ret void
}
void ExttHitMonthAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttHitMonthAuxTable() {
ret void
}
/* Type definitions */
struct thrd_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct thrd_info *);
void thrds_clean(struct thrd_info *tinfo) { free(tinfo); }


x86 assembly (clang, -O0):
<thrds_clean>:
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):
<thrds_clean>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.thrd_info = type { i32 }
define void @thrds_clean(%struct.thrd_info* nocapture %0) {
%2 = tail call i32 @free(%struct.thrd_info* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int foo(int);
int main() {
  if (foo(3) != 3)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
call   1040 <foo@plt>
cmp    $0x3,%eax
je     1149 <main+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
call   1040 <foo@plt>
cmp    $0x3,%eax
jne    1134 <main+0x14>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 3)
%3 = icmp ne i32 %2, 3
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 3)
%2 = icmp eq i32 %1, 3
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
void c_LEVEL5_IRQ(struct c_exception_frame *frame) {}


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

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

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

LLVM IR (-O2):
%struct.c_exception_frame = type opaque
define void @c_LEVEL5_IRQ(%struct.c_exception_frame* nocapture %0) {
ret void
}
void diffVt(double vec1[3], double vec2[3], double ans[3]) {
  ans[0] = vec1[0] - vec2[0];
  ans[1] = vec1[1] - vec2[1];
  ans[2] = vec1[2] - vec2[2];
}


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

x86 assembly (clang, -O2):
<diffVt>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
movsd  %xmm0,(%rdx)
movsd  0x8(%rdi),%xmm0
subsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x8(%rdx)
movsd  0x10(%rdi),%xmm0
subsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rdx)
ret

LLVM IR (-O0):
define void @diffVt(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %4
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %5
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fsub double %9, %12
%14 = load double*, double** %6
%15 = getelementptr inbounds double, double* %14, i64 0
store double %13, double* %15
%16 = load double*, double** %4
%17 = getelementptr inbounds double, double* %16, i64 1
%18 = load double, double* %17
%19 = load double*, double** %5
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = fsub double %18, %21
%23 = load double*, double** %6
%24 = getelementptr inbounds double, double* %23, i64 1
store double %22, double* %24
%25 = load double*, double** %4
%26 = getelementptr inbounds double, double* %25, i64 2
%27 = load double, double* %26
%28 = load double*, double** %5
%29 = getelementptr inbounds double, double* %28, i64 2
%30 = load double, double* %29
%31 = fsub double %27, %30
%32 = load double*, double** %6
%33 = getelementptr inbounds double, double* %32, i64 2
store double %31, double* %33
ret void
}

LLVM IR (-O2):
define void @diffVt(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %0
%5 = load double, double* %1
%6 = fsub double %4, %5
store double %6, double* %2
%7 = getelementptr inbounds double, double* %0, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %1, i64 1
%10 = load double, double* %9
%11 = fsub double %8, %10
%12 = getelementptr inbounds double, double* %2, i64 1
store double %11, double* %12
%13 = getelementptr inbounds double, double* %0, i64 2
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %1, i64 2
%16 = load double, double* %15
%17 = fsub double %14, %16
%18 = getelementptr inbounds double, double* %2, i64 2
store double %17, double* %18
ret void
}
int small(int a, int b) {
  if (a < b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<small>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1121 <small+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <small+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<small>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @small(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ munmap(void *, int);
void hl_free_executable_memory(void *c, int size) { munmap(c, size); }


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

x86 assembly (clang, -O2):
<hl_free_executable_memory>:
jmp    1030 <munmap@plt>

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

LLVM IR (-O2):
define void @hl_free_executable_memory(i8* %0, i32 %1) {
%3 = tail call i32 @munmap(i8* %0, i32 %1)
ret void
}
unsigned string_hash_func(const void *p) {
  unsigned hash = 0;
  const char *c;
  for (c = p; *c; c++)
    hash = 31 * hash + (unsigned)*c;
  return hash;
}


x86 assembly (clang, -O0):
<string_hash_func>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <string_hash_func+0x45>
imul   $0x1f,-0xc(%rbp),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1117 <string_hash_func+0x17>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @string_hash_func(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 i8* [ %11, %4 ], [ %0, %1 ]
%7 = phi i32 [ %10, %4 ], [ 0, %1 ]
%8 = mul i32 %7, 31
%9 = sext i8 %5 to i32
%10 = add i32 %8, %9
%11 = getelementptr inbounds i8, i8* %6, 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
}
int getbits(int num, int pos, int bits) {
  return (num >> (pos + 1 - bits) & ~(~0 << bits));
}


x86 assembly (clang, -O0):
<getbits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
sar    %cl,%eax
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbits>:
sub    %edx,%esi
lea    0x1(%rsi),%ecx
sar    %cl,%edi
mov    $0xffffffff,%eax
mov    %edx,%ecx
shl    %cl,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @getbits(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = add nsw i32 %8, 1
%10 = load i32, i32* %6
%11 = sub nsw i32 %9, %10
%12 = ashr i32 %7, %11
%13 = load i32, i32* %6
%14 = shl i32 -1, %13
%15 = xor i32 %14, -1
%16 = and i32 %12, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @getbits(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, 1
%5 = sub i32 %4, %2
%6 = ashr i32 %0, %5
%7 = shl nsw i32 -1, %2
%8 = xor i32 %7, -1
%9 = and i32 %6, %8
ret i32 %9
}