xunge/DecIR huggingface dataset:
void swap(int array[], int a, int b) {
  if (a == b)
    return;
  int temp = array[a];
  array[a] = array[b];
  array[b] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    111f <swap+0x1f>
jmp    1151 <swap+0x51>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
cmp    %edx,%esi
je     1116 <swap+0x16>
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @swap(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %3
br label %32
12: ; preds = %3
%13 = load i32*, i32** %4
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
store i32 %17, i32* %7
%18 = load i32*, i32** %4
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
%22 = load i32, i32* %21
%23 = load i32*, i32** %4
%24 = load i32, i32* %5
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
%27 = load i32, i32* %7
%28 = load i32*, i32** %4
%29 = load i32, i32* %6
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i32, i32* %28, i64 %30
store i32 %27, i32* %31
br label %32
32: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, %2
br i1 %4, label %12, label %5
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = sext i32 %2 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
store i32 %11, i32* %7
store i32 %8, i32* %10
br label %12
12: ; preds = %3, %5
ret void
}
__attribute__((used, no, noclone)) void foo(int *x, int *y) {
  asm volatile("" : : "g"(x), "g"(y) : "memory");
  if (*x != 1 || *y != 2)
    __builtin_abort();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,-0x18(%rbp)
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x1,(%rax)
jne    114a <foo+0x3a>
mov    -0x10(%rbp),%rax
cmpl   $0x2,(%rax)
je     114f <foo+0x3f>
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
sub    $0x18,%rsp
mov    %rsi,0x8(%rsp)
mov    %rdi,0x10(%rsp)
cmpl   $0x1,(%rdi)
jne    112d <foo+0x1d>
cmpl   $0x2,(%rsi)
jne    112d <foo+0x1d>
add    $0x18,%rsp
ret
call   1030 <abort@plt>

LLVM IR (-O0):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void (i32*, i32*)* @foo to i8*)], section "llvm.metadata"
define void @foo(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = icmp ne i32 %8, 1
br i1 %9, label %14, label %10
10: ; preds = %2
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = icmp ne i32 %12, 2
br i1 %13, label %14, label %15
14: ; preds = %10, %2
unreachable
15: ; preds = %10
ret void
}

LLVM IR (-O2):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void (i32*, i32*)* @foo to i8*)], section "llvm.metadata"
define void @foo(i32* %0, i32* %1) {
tail call void asm sideeffect "", "imr,imr,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* %0, i32* %1)
%3 = load i32, i32* %0
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 2
br i1 %7, label %9, label %8
8: ; preds = %5, %2
tail call void @abort()
unreachable
9: ; preds = %5
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fread(char *, int, int, int /*<<< orphan*/ *);
void fileFlushInput(FILE *f) {
  char buf[256];
  while (fread(buf, 1, 256, f))
    ;
}


x86 assembly (clang, -O0):
<fileFlushInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
mov    $0x100,%edx
call   1030 <fread@plt>
cmp    $0x0,%rax
je     1148 <fileFlushInput+0x38>
jmp    111f <fileFlushInput+0xf>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileFlushInput>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x100,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
test   %rax,%rax
jne    1120 <fileFlushInput+0x10>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @fileFlushInput(i32* %0) {
%2 = alloca i32*
%3 = alloca [256 x i8]
store i32* %0, i32** %2
br label %4
4: ; preds = %9, %1
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%6 = load i32*, i32** %2
%7 = call i64 @fread(i8* %5, i32 1, i32 256, i32* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %4
br label %4
10: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @fileFlushInput(i32* nocapture %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
br label %4
4: ; preds = %4, %1
%5 = call i64 @fread(i8* %3, i32 1, i32 256, i32* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %4
7: ; preds = %4
ret void
}
unsigned getval_331() { return 398576265U; }


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

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

LLVM IR (-O0):
define i32 @getval_331() {
ret i32 398576265
}

LLVM IR (-O2):
define i32 @getval_331() {
ret i32 398576265
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int add_abbrev(int /*<<< orphan*/ const *, int /*<<< orphan*/ const *, int);
int vle_abbr_add_no_remap(const wchar_t lhs[], const wchar_t rhs[]) {
  return add_abbrev(lhs, rhs, 1);
}


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

x86 assembly (clang, -O2):
<vle_abbr_add_no_remap>:
mov    $0x1,%edx
jmp    1030 <add_abbrev@plt>

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

LLVM IR (-O2):
define i32 @vle_abbr_add_no_remap(i32* %0, i32* %1) {
%3 = tail call i32 @add_abbrev(i32* %0, i32* %1, i32 1)
ret i32 %3
}
int main() {
  int x, y, z;
  int a, b;
  x = 0;
  y = 0;
  if (x < 5) {
    x = y + x;
    x = y + x;
  }
  a = x;
  b = y;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1135 <main+0x35>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
char *replaceChars(char *, char *, char *);
char *attributeEncode(char *str) {
  return replaceChars(replaceChars(str, "\"", "&quot;"), "'", "&#39;");
}


x86 assembly (clang, -O0):
<attributeEncode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    0xed4(%rip),%rdx
call   1030 <replaceChars@plt>
mov    %rax,%rdi
lea    0xecc(%rip),%rsi
lea    0xec7(%rip),%rdx
call   1030 <replaceChars@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<attributeEncode>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xee3(%rip),%rdx
call   1030 <replaceChars@plt>
lea    0xede(%rip),%rsi
lea    0xed9(%rip),%rdx
mov    %rax,%rdi
pop    %rax
jmp    1030 <replaceChars@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\22\00"
@.str.1 = [7 x i8] c"&quot;\00"
@.str.2 = [2 x i8] c"'\00"
@.str.3 = [6 x i8] c"&;\00"
define i8* @attributeEncode(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @replaceChars(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%5 = call i8* @replaceChars(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i8* %5
}

LLVM IR (-O2):
@.str = [2 x i8] c"\22\00"
@.str.1 = [7 x i8] c"&quot;\00"
@.str.2 = [2 x i8] c"'\00"
@.str.3 = [6 x i8] c"&;\00"
define i8* @attributeEncode(i8* %0) {
%2 = tail call i8* @replaceChars(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i8* @replaceChars(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ OSRAMWriteByte(int);
int /*<<< orphan*/ OSRAMWriteFinal(int);
int /*<<< orphan*/ OSRAMWriteFirst(int);
void OSRAMDisplayOff(void) {
  OSRAMWriteFirst(0x80);
  OSRAMWriteByte(0xae);
  OSRAMWriteByte(0x80);
  OSRAMWriteByte(0xad);
  OSRAMWriteByte(0x80);
  OSRAMWriteFinal(0x8a);
}


x86 assembly (clang, -O0):
<OSRAMDisplayOff>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80,%edi
call   1050 <OSRAMWriteFirst@plt>
mov    $0xae,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x80,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0xad,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x80,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x8a,%edi
call   1030 <OSRAMWriteFinal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSRAMDisplayOff>:
push   %rax
mov    $0x80,%edi
call   1050 <OSRAMWriteFirst@plt>
mov    $0xae,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x80,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0xad,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x80,%edi
call   1040 <OSRAMWriteByte@plt>
mov    $0x8a,%edi
pop    %rax
jmp    1030 <OSRAMWriteFinal@plt>

LLVM IR (-O0):
define void @OSRAMDisplayOff() {
%1 = call i32 @OSRAMWriteFirst(i32 128)
%2 = call i32 @OSRAMWriteByte(i32 174)
%3 = call i32 @OSRAMWriteByte(i32 128)
%4 = call i32 @OSRAMWriteByte(i32 173)
%5 = call i32 @OSRAMWriteByte(i32 128)
%6 = call i32 @OSRAMWriteFinal(i32 138)
ret void
}

LLVM IR (-O2):
define void @OSRAMDisplayOff() {
%1 = tail call i32 @OSRAMWriteFirst(i32 128)
%2 = tail call i32 @OSRAMWriteByte(i32 174)
%3 = tail call i32 @OSRAMWriteByte(i32 128)
%4 = tail call i32 @OSRAMWriteByte(i32 173)
%5 = tail call i32 @OSRAMWriteByte(i32 128)
%6 = tail call i32 @OSRAMWriteFinal(i32 138)
ret void
}
/* Variables and functions */
int computeB5(int);
int readRawTemperature();
float BMP180_readTemperature(void) {
  int UT, B5;
  float temp;
  UT = readRawTemperature();
  B5 = computeB5(UT);
  temp = (B5 + 8) >> 4;
  temp /= 10;
  return temp;
}


x86 assembly (clang, -O0):
<BMP180_readTemperature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <readRawTemperature@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <computeB5@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x8,%eax
sar    $0x4,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xea4(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BMP180_readTemperature>:
push   %rax
xor    %eax,%eax
call   1040 <readRawTemperature@plt>
mov    %eax,%edi
call   1030 <computeB5@plt>
add    $0x8,%eax
sar    $0x4,%eax
cvtsi2ss %eax,%xmm0
divss  0xebf(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @BMP180_readTemperature() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = call i32 (...) @readRawTemperature()
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = call i32 @computeB5(i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 8
%9 = ashr i32 %8, 4
%10 = sitofp i32 %9 to float
store float %10, float* %3
%11 = load float, float* %3
%12 = fdiv float %11, 1.000000e+01
store float %12, float* %3
%13 = load float, float* %3
ret float %13
}

LLVM IR (-O2):
define float @BMP180_readTemperature() {
%1 = tail call i32 (...) @readRawTemperature()
%2 = tail call i32 @computeB5(i32 %1)
%3 = add nsw i32 %2, 8
%4 = ashr i32 %3, 4
%5 = sitofp i32 %4 to float
%6 = fdiv float %5, 1.000000e+01
ret float %6
}
int prime(int n) {
  int i;
  for (i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     114d <prime+0x4d>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    113a <prime+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1154 <prime+0x54>
jmp    113f <prime+0x3f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <prime+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prime>:
mov    $0x1,%ecx
cmp    $0x4,%edi
jl     1125 <prime+0x25>
mov    $0x2,%esi
nop
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1128 <prime+0x28>
add    $0x1,%esi
mov    %esi,%eax
imul   %esi,%eax
cmp    %edi,%eax
jle    1110 <prime+0x10>
mov    %ecx,%eax
ret
xor    %ecx,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @prime(i32 %0) {
%2 = icmp slt i32 %0, 4
br i1 %2, label %11, label %6
3: ; preds = %6
%4 = mul nsw i32 %10, %10
%5 = icmp sgt i32 %4, %0
br i1 %5, label %11, label %6
6: ; preds = %1, %3
%7 = phi i32 [ %10, %3 ], [ 2, %1 ]
%8 = srem i32 %0, %7
%9 = icmp eq i32 %8, 0
%10 = add nuw nsw i32 %7, 1
br i1 %9, label %11, label %3
11: ; preds = %6, %3, %1
%12 = phi i32 [ 1, %1 ], [ 1, %3 ], [ 0, %6 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ch8_XFONT() { printf("Error: ch8_XFONT not yet implemented\n"); }


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

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

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

LLVM IR (-O2):
@str = [37 x i8] c"Error: ch8_XFONT not yet implemented\00"
define void @ch8_XFONT() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret void
}
void SteamAPI_ISteamMatchmakingServers_RefreshQuery(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamMatchmakingServers_RefreshQuery>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamMatchmakingServers_RefreshQuery = [47 x i8] c"SteamAPI_ISteamMatchmakingServers_RefreshQuery\00"
define void @SteamAPI_ISteamMatchmakingServers_RefreshQuery(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @__func__.SteamAPI_ISteamMatchmakingServers_RefreshQuery, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamMatchmakingServers_RefreshQuery = [47 x i8] c"SteamAPI_ISteamMatchmakingServers_RefreshQuery\00"
define void @SteamAPI_ISteamMatchmakingServers_RefreshQuery(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @__func__.SteamAPI_ISteamMatchmakingServers_RefreshQuery, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct SocketBuffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bufferWrite(int *, int, struct SocketBuffer *);
void writeInt(int value, struct SocketBuffer *buff) {
  bufferWrite(&value, 4, buff);
}


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

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

LLVM IR (-O0):
%struct.SocketBuffer = type { i32 }
define void @writeInt(i32 %0, %struct.SocketBuffer* %1) {
%3 = alloca i32
%4 = alloca %struct.SocketBuffer*
store i32 %0, i32* %3
store %struct.SocketBuffer* %1, %struct.SocketBuffer** %4
%5 = load %struct.SocketBuffer*, %struct.SocketBuffer** %4
%6 = call i32 @bufferWrite(i32* %3, i32 4, %struct.SocketBuffer* %5)
ret void
}

LLVM IR (-O2):
%struct.SocketBuffer = type { i32 }
define void @writeInt(i32 %0, %struct.SocketBuffer* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @bufferWrite(i32* %3, i32 4, %struct.SocketBuffer* %1)
ret void
}
/* Variables and functions */
int code_convert(char *, char *, char const *, size_t, char *, size_t);
int u2g(const char *inbuf, size_t inlen, char *outbuf, size_t outlen) {
  return code_convert("utf-8", "gbk", inbuf, inlen, outbuf, outlen);
}


x86 assembly (clang, -O0):
<u2g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
lea    0xec1(%rip),%rdi
lea    0xec0(%rip),%rsi
call   1030 <code_convert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u2g>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xedd(%rip),%rdi
lea    0xedc(%rip),%rsi
jmp    1030 <code_convert@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"utf-8\00"
@.str.1 = [4 x i8] c"gbk\00"
define i32 @u2g(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i8*, i8** %7
%12 = load i64, i64* %8
%13 = call i32 @code_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %9, i64 %10, i8* %11, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
@.str = [6 x i8] c"utf-8\00"
@.str.1 = [4 x i8] c"gbk\00"
define i32 @u2g(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = tail call i32 @code_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0, i64 %1, i8* %2, i64 %3)
ret i32 %5
}
void gdk_display_supports_cursor_alpha() {}


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

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

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

LLVM IR (-O2):
define void @gdk_display_supports_cursor_alpha() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_degree_of_quaddobl_polynomial(int k, int *d) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(389, &k, d, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_degree_of_quaddobl_polynomial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x185,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_degree_of_quaddobl_polynomial>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x185,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syscon_degree_of_quaddobl_polynomial(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc4c(i32 389, i32* %3, i32* %7, double* %8, i32 0)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @syscon_degree_of_quaddobl_polynomial(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc4c(i32 389, i32* %3, i32* %1, double* undef, i32 0)
ret i32 %4
}
void voidFuncIntArg(int i) {}


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

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

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

LLVM IR (-O2):
define void @voidFuncIntArg(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(char);
void main(void) { foo('\n'); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1030 <foo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xa,%edi
jmp    1030 <foo@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @foo(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @foo(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print();
int /*<<< orphan*/ printf(char *, float);
void main() {
  int i = 1;
  printf("Int i = %d", i);
  print();
  float f = 0.1;
  printf("Float f = %f", f);
  float fi = i + f;
  print();
  printf("Float fi = %f", fi);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <print@plt>
movss  0xeb1(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
cvtsi2ssl -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <print@plt>
movss  -0xc(%rbp),%xmm0
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee4(%rip),%rdi
movss  0xed0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <print@plt>
lea    0xed4(%rip),%rdi
movss  0xeb9(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <print@plt>
lea    0xec6(%rip),%rdi
movss  0xea2(%rip),%xmm0
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Int i = %d\00"
@.str.1 = [13 x i8] c"Float f = %f\00"
@.str.2 = [14 x i8] c"Float fi = %f\00"
define void @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 1, i32* %1
%4 = load i32, i32* %1
%5 = sitofp i32 %4 to float
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %5)
%7 = call i32 (...) @print()
store float 0x3FB99999A0000000, float* %2
%8 = load float, float* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), float %8)
%10 = load i32, i32* %1
%11 = sitofp i32 %10 to float
%12 = load float, float* %2
%13 = fadd float %11, %12
store float %13, float* %3
%14 = call i32 (...) @print()
%15 = load float, float* %3
%16 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), float %15)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"Int i = %d\00"
@.str.1 = [13 x i8] c"Float f = %f\00"
@.str.2 = [14 x i8] c"Float fi = %f\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float 1.000000e+00)
%2 = tail call i32 (...) @print()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), float 0x3FB99999A0000000)
%4 = tail call i32 (...) @print()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), float 0x3FF19999A0000000)
ret void
}
float erffc(float x) {
  float gammp(float a, float x);
  float gammq(float a, float x);
  if (x < 0.0)
    return (1.0 + gammp(0.5, x * x));
  else
    return (gammq(0.5, x * x));
}


x86 assembly (clang, -O0):
<erffc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1178 <erffc+0x58>
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  0xeab(%rip),%xmm0
call   1040 <gammp@plt>
cvtss2sd %xmm0,%xmm1
movsd  0xea2(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1194 <erffc+0x74>
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  0xe76(%rip),%xmm0
call   1030 <gammq@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erffc>:
push   %rax
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
mulss  %xmm1,%xmm1
movss  0xeca(%rip),%xmm0
jbe    1147 <erffc+0x27>
call   1040 <gammp@plt>
addss  0xebf(%rip),%xmm0
pop    %rax
ret
pop    %rax
jmp    1030 <gammq@plt>

LLVM IR (-O0):
define float @erffc(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fpext float %4 to double
%6 = fcmp olt double %5, 0.000000e+00
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load float, float* %3
%9 = load float, float* %3
%10 = fmul float %8, %9
%11 = call float @gammp(float 5.000000e-01, float %10)
%12 = fpext float %11 to double
%13 = fadd double 1.000000e+00, %12
%14 = fptrunc double %13 to float
store float %14, float* %2
br label %20
15: ; preds = %1
%16 = load float, float* %3
%17 = load float, float* %3
%18 = fmul float %16, %17
%19 = call float @gammq(float 5.000000e-01, float %18)
store float %19, float* %2
br label %20
20: ; preds = %15, %7
%21 = load float, float* %2
ret float %21
}

LLVM IR (-O2):
define float @erffc(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fmul float %0, %0
br i1 %2, label %4, label %7
4: ; preds = %1
%5 = tail call float @gammp(float 5.000000e-01, float %3)
%6 = fadd float %5, 1.000000e+00
br label %9
7: ; preds = %1
%8 = tail call float @gammq(float 5.000000e-01, float %3)
br label %9
9: ; preds = %7, %4
%10 = phi float [ %6, %4 ], [ %8, %7 ]
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ import_does_not_exist();
void __attribute__((constructor)) my_init(void) { import_does_not_exist(); }


x86 assembly (clang, -O0):
<my_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <import_does_not_exist@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @my_init, i8* null }]
define void @my_init() {
%1 = call i32 (...) @import_does_not_exist()
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @my_init, i8* null }]
define void @my_init() {
%1 = tail call i32 (...) @import_does_not_exist()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __print_float(double);
int main() {
  __print_float(0.27);
  __print_float(12.34);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xee7(%rip),%xmm0
call   1030 <__print_float@plt>
movsd  0xee2(%rip),%xmm0
call   1030 <__print_float@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @__print_float(double 2.700000e-01)
%3 = call i32 @__print_float(double 1.234000e+01)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__print_float(double 2.700000e-01)
%2 = tail call i32 @__print_float(double 1.234000e+01)
ret i32 0
}
const char *pathcon_nm5_name_out(int i) {
  switch (i) {
  case 0:
    return "o0";
  case 1:
    return "o1";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<pathcon_nm5_name_out>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     112b <pathcon_nm5_name_out+0x2b>
jmp    111a <pathcon_nm5_name_out+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     113b <pathcon_nm5_name_out+0x3b>
jmp    114b <pathcon_nm5_name_out+0x4b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <pathcon_nm5_name_out+0x53>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <pathcon_nm5_name_out+0x53>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcon_nm5_name_out>:
xor    %ecx,%ecx
cmp    $0x1,%edi
lea    0xef7(%rip),%rax
cmove  %rax,%rcx
test   %edi,%edi
lea    0xee7(%rip),%rax
cmovne %rcx,%rax
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
define i8* @pathcon_nm5_name_out(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* null
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
void *mmap(void *, size_t, int, int, int, int /*<<< orphan*/);
void *_dl_mmap(void *start, size_t len, int prot, int flags, int fd,
               off_t offset) {
  return mmap(start, len, prot, flags, fd, offset);
}


x86 assembly (clang, -O0):
<_dl_mmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
call   1030 <mmap@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dl_mmap>:
jmp    1030 <mmap@plt>

LLVM IR (-O0):
define i8* @_dl_mmap(i8* %0, i64 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %7
store i64 %1, i64* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i8*, i8** %7
%14 = load i64, i64* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call i8* @mmap(i8* %13, i64 %14, i32 %15, i32 %16, i32 %17, i32 %18)
ret i8* %19
}

LLVM IR (-O2):
define i8* @_dl_mmap(i8* %0, i64 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i8* @mmap(i8* %0, i64 %1, i32 %2, i32 %3, i32 %4, i32 %5)
ret i8* %7
}
/* Variables and functions */
scalar_t__ rintf(float);
int interpNN_b(unsigned char *sl, int w, int h, float x, float y, float o,
               unsigned char *v, int is_alpha) {
  *v = sl[(int)rintf(x) + (int)rintf(y) * w];
  return 0;
}


x86 assembly (clang, -O0):
<interpNN_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movss  %xmm1,-0x18(%rbp)
movss  %xmm2,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
movss  -0x14(%rbp),%xmm0
call   1030 <rintf@plt>
mov    %eax,-0x3c(%rbp)
movss  -0x18(%rbp),%xmm0
call   1030 <rintf@plt>
mov    -0x3c(%rbp),%ecx
mov    %rax,%rdx
mov    -0x38(%rbp),%rax
imul   -0xc(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%cl
mov    -0x28(%rbp),%rax
mov    %cl,(%rax)
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpNN_b>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
movss  %xmm1,0x4(%rsp)
mov    %esi,%ebp
mov    %rdi,%r15
call   1030 <rintf@plt>
mov    %rax,%rbx
movss  0x4(%rsp),%xmm0
call   1030 <rintf@plt>
imul   %ebp,%eax
add    %ebx,%eax
cltq
mov    (%r15,%rax,1),%al
mov    %al,(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @interpNN_b(i8* %0, i32 %1, i32 %2, float %3, float %4, float %5, i8* %6, i32 %7) {
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca i8*
%16 = alloca i32
store i8* %0, i8** %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store float %3, float* %12
store float %4, float* %13
store float %5, float* %14
store i8* %6, i8** %15
store i32 %7, i32* %16
%17 = load i8*, i8** %9
%18 = load float, float* %12
%19 = call i64 @rintf(float %18)
%20 = trunc i64 %19 to i32
%21 = load float, float* %13
%22 = call i64 @rintf(float %21)
%23 = trunc i64 %22 to i32
%24 = load i32, i32* %10
%25 = mul nsw i32 %23, %24
%26 = add nsw i32 %20, %25
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %17, i64 %27
%29 = load i8, i8* %28
%30 = load i8*, i8** %15
store i8 %29, i8* %30
ret i32 0
}

LLVM IR (-O2):
define i32 @interpNN_b(i8* nocapture %0, i32 %1, i32 %2, float %3, float %4, float %5, i8* nocapture writeonly %6, i32 %7) {
%9 = tail call i64 @rintf(float %3)
%10 = trunc i64 %9 to i32
%11 = tail call i64 @rintf(float %4)
%12 = trunc i64 %11 to i32
%13 = mul nsw i32 %12, %1
%14 = add nsw i32 %13, %10
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %0, i64 %15
%17 = load i8, i8* %16
store i8 %17, i8* %6
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
char *umalloc(size_t);
char *ustrdup_len(const char *s, size_t len) {
  char *r = umalloc(len + 1);
  memcpy(r, s, len);
  r[len] = '\0';
  return r;
}


x86 assembly (clang, -O0):
<ustrdup_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1040 <umalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ustrdup_len>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
lea    0x1(%rsi),%rdi
call   1040 <umalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <memcpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @ustrdup_len(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = add i64 %6, 1
%8 = call i8* @umalloc(i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i8*, i8** %3
%11 = load i64, i64* %4
%12 = call i32 @memcpy(i8* %9, i8* %10, i64 %11)
%13 = load i8*, i8** %5
%14 = load i64, i64* %4
%15 = getelementptr inbounds i8, i8* %13, i64 %14
store i8 0, i8* %15
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @ustrdup_len(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i8* @umalloc(i64 %3)
%5 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %1)
%6 = getelementptr inbounds i8, i8* %4, i64 %1
store i8 0, i8* %6
ret i8* %4
}
char *XGetIMValues() {}


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

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

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

LLVM IR (-O2):
define noalias i8* @XGetIMValues() {
ret i8* undef
}
void swap(int *arr, unsigned int ai, unsigned int bi) {
  int temp = arr[ai];
  arr[ai] = arr[bi];
  arr[bi] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    %esi,%eax
mov    (%rdi,%rax,4),%ecx
mov    %edx,%edx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = zext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = zext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
float fdim(float x, float y) {
  float z;
  z = x - y;
  return z;
}


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

x86 assembly (clang, -O2):
<fdim>:
subss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @fdim(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fsub float %6, %7
store float %8, float* %5
%9 = load float, float* %5
ret float %9
}

LLVM IR (-O2):
define float @fdim(float %0, float %1) {
%3 = fsub float %0, %1
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ emit_rorimm(int, int, int);
void emit_rotr(int t) { emit_rorimm(t, 1, t); }


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

x86 assembly (clang, -O2):
<emit_rotr>:
mov    $0x1,%esi
mov    %edi,%edx
jmp    1030 <emit_rorimm@plt>

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

LLVM IR (-O2):
define void @emit_rotr(i32 %0) {
%2 = tail call i32 @emit_rorimm(i32 %0, i32 1, i32 %0)
ret void
}
void f31(void) {
  ({
    ({
      goto a;
      0;
    });
  a:
    ({ 0; });
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f31>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f31() {
ret void
}
/* Variables and functions */
float sqrt(float);
float SE(float sum, float sumsq, int no) {
  float mean;
  mean = sum / no;
  return sqrt(((sumsq - no * mean * mean) / (no - 1)) / no);
}


x86 assembly (clang, -O0):
<SE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm1
cvtsi2ssl -0xc(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SE>:
cvtsi2ss %edi,%xmm2
divss  %xmm2,%xmm0
movaps %xmm2,%xmm3
mulss  %xmm0,%xmm3
mulss  %xmm0,%xmm3
subss  %xmm3,%xmm1
add    $0xffffffff,%edi
xorps  %xmm0,%xmm0
cvtsi2ss %edi,%xmm0
divss  %xmm0,%xmm1
divss  %xmm2,%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jb     1149 <SE+0x39>
xorps  %xmm0,%xmm0
sqrtss %xmm1,%xmm0
ret
movaps %xmm1,%xmm0
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define float @SE(float %0, float %1, i32 %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca i32
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store i32 %2, i32* %6
%8 = load float, float* %4
%9 = load i32, i32* %6
%10 = sitofp i32 %9 to float
%11 = fdiv float %8, %10
store float %11, float* %7
%12 = load float, float* %5
%13 = load i32, i32* %6
%14 = sitofp i32 %13 to float
%15 = load float, float* %7
%16 = fmul float %14, %15
%17 = load float, float* %7
%18 = fneg float %16
%19 = call float @llvm.fmuladd.f32(float %18, float %17, float %12)
%20 = load i32, i32* %6
%21 = sub nsw i32 %20, 1
%22 = sitofp i32 %21 to float
%23 = fdiv float %19, %22
%24 = load i32, i32* %6
%25 = sitofp i32 %24 to float
%26 = fdiv float %23, %25
%27 = call float @sqrt(float %26)
ret float %27
}

LLVM IR (-O2):
define float @SE(float %0, float %1, i32 %2) {
%4 = sitofp i32 %2 to float
%5 = fdiv float %0, %4
%6 = fneg float %5
%7 = fmul float %4, %6
%8 = tail call float @llvm.fmuladd.f32(float %7, float %5, float %1)
%9 = add nsw i32 %2, -1
%10 = sitofp i32 %9 to float
%11 = fdiv float %8, %10
%12 = fdiv float %11, %4
%13 = tail call float @sqrt(float %12)
ret float %13
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_open_solution_input_file(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(130, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_open_solution_input_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x82,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_open_solution_input_file>:
mov    $0x82,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @solcon_open_solution_input_file() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 130, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @solcon_open_solution_input_file() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 130, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}