xunge/DecIR huggingface dataset:
long lrintf(float x) {
  long retval;
  __asm__ __volatile__("fistpl %0" : "=m"(retval) : "t"(x) : "st");
  return retval;
}


x86 assembly (clang, -O0):
<lrintf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
flds   -0x14(%rbp)
fistpl -0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lrintf>:
movss  %xmm0,-0xc(%rsp)
flds   -0xc(%rsp)
fistpl -0x8(%rsp)
mov    -0x8(%rsp),%rax
ret

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

LLVM IR (-O2):
define i64 @lrintf(float %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = load i64, i64* %2
ret i64 %4
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int gettimeofday(struct timeval *, void *);
int os_gettimeofday(struct timeval *TVal, void *TZone) {
  return gettimeofday(TVal, TZone);
}


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

x86 assembly (clang, -O2):
<os_gettimeofday>:
jmp    1030 <gettimeofday@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @os_gettimeofday(%struct.timeval* %0, i8* %1) {
%3 = alloca %struct.timeval*
%4 = alloca i8*
store %struct.timeval* %0, %struct.timeval** %3
store i8* %1, i8** %4
%5 = load %struct.timeval*, %struct.timeval** %3
%6 = load i8*, i8** %4
%7 = call i32 @gettimeofday(%struct.timeval* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @os_gettimeofday(%struct.timeval* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @gettimeofday(%struct.timeval* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int strnlen(char *, int);
void strnlen_constant6(char x) {
  char a[] = "123456";
  clang_analyzer_eval(strnlen(a, 3) == 3);
  a[0] = x;
  clang_analyzer_eval(strnlen(a, 3) == 3);
}


x86 assembly (clang, -O0):
<strnlen_constant6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    0xecc(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xec6(%rip),%ax
mov    %ax,-0x4(%rbp)
mov    0xebe(%rip),%al
mov    %al,-0x2(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x3,%esi
call   1030 <strnlen@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
mov    -0x1(%rbp),%al
mov    %al,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x3,%esi
call   1030 <strnlen@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnlen_constant6>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
movl   $0x363534,0x3(%rsp)
movl   $0x34333231,(%rsp)
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x3,%esi
call   1030 <strnlen@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
call   1040 <clang_analyzer_eval@plt>
mov    %bl,(%rsp)
mov    %r14,%rdi
mov    $0x3,%esi
call   1030 <strnlen@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
call   1040 <clang_analyzer_eval@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.strnlen_constant6.a = [7 x i8] c"123456\00"
define void @strnlen_constant6(i8 signext %0) {
%2 = alloca i8
%3 = alloca [7 x i8]
store i8 %0, i8* %2
%4 = bitcast [7 x i8]* %3 to i8*
%5 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%6 = call i32 @strnlen(i8* %5, i32 3)
%7 = icmp eq i32 %6, 3
%8 = zext i1 %7 to i32
%9 = call i32 @clang_analyzer_eval(i32 %8)
%10 = load i8, i8* %2
%11 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
store i8 %10, i8* %11
%12 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%13 = call i32 @strnlen(i8* %12, i32 3)
%14 = icmp eq i32 %13, 3
%15 = zext i1 %14 to i32
%16 = call i32 @clang_analyzer_eval(i32 %15)
ret void
}

LLVM IR (-O2):
@__const.strnlen_constant6.a = [7 x i8] c"123456\00"
define void @strnlen_constant6(i8 signext %0) {
%2 = alloca [7 x i8]
%3 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 0
%4 = call i32 @strnlen(i8* %3, i32 3)
%5 = icmp eq i32 %4, 3
%6 = zext i1 %5 to i32
%7 = call i32 @clang_analyzer_eval(i32 %6)
store i8 %0, i8* %3
%8 = call i32 @strnlen(i8* %3, i32 3)
%9 = icmp eq i32 %8, 3
%10 = zext i1 %9 to i32
%11 = call i32 @clang_analyzer_eval(i32 %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void sprinkle_fairy_dust_over_that(void) { printf("%s\n", "magic!"); }


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

x86 assembly (clang, -O2):
<sprinkle_fairy_dust_over_that>:
lea    0xee9(%rip),%rdi
lea    0xee6(%rip),%rsi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [7 x i8] c"magic!\00"
define void @sprinkle_fairy_dust_over_that() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ copyMat4(float *, float *);
int /*<<< orphan*/ hpmMultMat4(float *, float *, float *);
int /*<<< orphan*/ hpmScaling(float, float *);
void hpmScale(float factor, float *mat) {
  float scale[16], r[16];
  hpmScaling(factor, scale);
  hpmMultMat4(scale, mat, r);
  copyMat4(mat, r);
}


x86 assembly (clang, -O0):
<hpmScale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
lea    -0x50(%rbp),%rdi
call   1050 <hpmScaling@plt>
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x90(%rbp),%rdx
call   1030 <hpmMultMat4@plt>
mov    -0x10(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1040 <copyMat4@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hpmScale>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%rbx
lea    0x40(%rsp),%r14
mov    %r14,%rdi
call   1050 <hpmScaling@plt>
mov    %rsp,%r15
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1030 <hpmMultMat4@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <copyMat4@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @hpmScale(float %0, float* %1) {
%3 = alloca float
%4 = alloca float*
%5 = alloca [16 x float]
%6 = alloca [16 x float]
store float %0, float* %3
store float* %1, float** %4
%7 = load float, float* %3
%8 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 0
%9 = call i32 @hpmScaling(float %7, float* %8)
%10 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 0
%11 = load float*, float** %4
%12 = getelementptr inbounds [16 x float], [16 x float]* %6, i64 0, i64 0
%13 = call i32 @hpmMultMat4(float* %10, float* %11, float* %12)
%14 = load float*, float** %4
%15 = getelementptr inbounds [16 x float], [16 x float]* %6, i64 0, i64 0
%16 = call i32 @copyMat4(float* %14, float* %15)
ret void
}

LLVM IR (-O2):
define void @hpmScale(float %0, float* %1) {
%3 = alloca [16 x float]
%4 = alloca [16 x float]
%5 = bitcast [16 x float]* %3 to i8*
%6 = bitcast [16 x float]* %4 to i8*
%7 = getelementptr inbounds [16 x float], [16 x float]* %3, i64 0, i64 0
%8 = call i32 @hpmScaling(float %0, float* %7)
%9 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 0
%10 = call i32 @hpmMultMat4(float* %7, float* %1, float* %9)
%11 = call i32 @copyMat4(float* %1, float* %9)
ret void
}
/* Variables and functions */
scalar_t__ isalpha(int);
scalar_t__ isdigit(int);
int isalnum(int c) { return isdigit(c) || isalpha(c); }


x86 assembly (clang, -O0):
<isalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1157 <isalnum+0x37>
mov    -0x4(%rbp),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalnum>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <isalnum+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <isalpha@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isalnum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isdigit(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @isalpha(i32 %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isalnum(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @isalpha(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ __insn_shufflebytes(int /*<<< orphan*/, int /*<<< orphan*/,
                                       int /*<<< orphan*/);
uint64_t copy_byte(uint8_t byte) { return __insn_shufflebytes(byte, 0, 0); }


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

x86 assembly (clang, -O2):
<copy_byte>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <__insn_shufflebytes@plt>

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

LLVM IR (-O2):
define i32 @copy_byte(i32 %0) {
%2 = tail call i32 @__insn_shufflebytes(i32 %0, i32 0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ bulktester();
int main(int argc, char *argv[]) {
  bulktester();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @bulktester()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @bulktester()
ret i32 0
}
int main() {
  const int n = 100;
  volatile const int m = 23;
  int *p = (int *)&n;
  *p = 32;
  p = (int *)&m;
  *p = 200;
  printf("n = %d , m = %d\n", n, m);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
movl   $0x17,-0xc(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x20,(%rax)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0xc8,(%rax)
mov    -0xc(%rbp),%edx
lea    0xea5(%rip),%rdi
mov    $0x64,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x17,0x4(%rsp)
movl   $0xc8,0x4(%rsp)
mov    0x4(%rsp),%edx
lea    0xed4(%rip),%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"n = %d , m = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
store i32 0, i32* %1
store i32 100, i32* %2
store volatile i32 23, i32* %3
store i32* %2, i32** %4
%5 = load i32*, i32** %4
store i32 32, i32* %5
store i32* %3, i32** %4
%6 = load i32*, i32** %4
store i32 200, i32* %6
%7 = load volatile i32, i32* %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 100, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"n = %d , m = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 23, i32* %1
store i32 200, i32* %1
%3 = load volatile i32, i32* %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 100, i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fun();
void main() { fun(); }


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

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

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @fun()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @fun()
ret void
}
/* Type definitions */
struct timeouts {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct timeouts *);
void timeouts_close(struct timeouts *T) { free(T); }


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

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

LLVM IR (-O2):
%struct.timeouts = type { i32 }
define void @timeouts_close(%struct.timeouts* nocapture %0) {
%2 = tail call i32 @free(%struct.timeouts* %0)
ret void
}
const char *get_ve_name(int endianness) {
  if (endianness)
    return "little-endian";
  else
    return "big-endian";
}


x86 assembly (clang, -O0):
<get_ve_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1121 <get_ve_name+0x21>
lea    0xee8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112c <get_ve_name+0x2c>
lea    0xee6(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ve_name>:
test   %edi,%edi
lea    0xf05(%rip),%rcx
lea    0xef0(%rip),%rax
cmove  %rcx,%rax
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"little-endian\00"
@.str.1 = [11 x i8] c"big-endian\00"
define i8* @get_ve_name(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
__attribute__((no)) float sinf(float a) { return a; }


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

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

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

LLVM IR (-O2):
define float @sinf(float returned %0) {
ret float %0
}
double wyznacznik(double a[][2]) {
  return a[0][0] * a[1][1] - a[1][0] * a[0][1];
}


x86 assembly (clang, -O0):
<wyznacznik>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<wyznacznik>:
movsd  0x8(%rdi),%xmm1
mulsd  0x10(%rdi),%xmm1
movsd  (%rdi),%xmm0
mulsd  0x18(%rdi),%xmm0
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @wyznacznik([2 x double]* %0) {
%2 = alloca [2 x double]*
store [2 x double]* %0, [2 x double]** %2
%3 = load [2 x double]*, [2 x double]** %2
%4 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0
%5 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
%6 = load double, double* %5
%7 = load [2 x double]*, [2 x double]** %2
%8 = getelementptr inbounds [2 x double], [2 x double]* %7, i64 1
%9 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 1
%10 = load double, double* %9
%11 = load [2 x double]*, [2 x double]** %2
%12 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 1
%13 = getelementptr inbounds [2 x double], [2 x double]* %12, i64 0, i64 0
%14 = load double, double* %13
%15 = load [2 x double]*, [2 x double]** %2
%16 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0
%17 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 1
%18 = load double, double* %17
%19 = fmul double %14, %18
%20 = fneg double %19
%21 = call double @llvm.fmuladd.f64(double %6, double %10, double %20)
ret double %21
}

LLVM IR (-O2):
define double @wyznacznik([2 x double]* nocapture %0) {
%2 = getelementptr inbounds [2 x double], [2 x double]* %0, i64 0, i64 0
%3 = load double, double* %2
%4 = getelementptr inbounds [2 x double], [2 x double]* %0, i64 1, i64 1
%5 = load double, double* %4
%6 = getelementptr inbounds [2 x double], [2 x double]* %0, i64 1, i64 0
%7 = load double, double* %6
%8 = getelementptr inbounds [2 x double], [2 x double]* %0, i64 0, i64 1
%9 = load double, double* %8
%10 = fneg double %7
%11 = fmul double %9, %10
%12 = tail call double @llvm.fmuladd.f64(double %3, double %5, double %11)
ret double %12
}
int sys$remove(struct _fab *fab, void *err, void *suc) {
  return ({
    unsigned long resultvar;
    register long int _a3 asm("rdx") = (long)(suc);
    register long int _a2 asm("rsi") = (long)(err);
    register long int _a1 asm("rdi") = (long)(fab);
    asm volatile("movq %1, %%rax\n\t"
                 "int $0x82\n\t"
                 : "=a"(resultvar)
                 : "i"(21), "r"(_a1), "r"(_a2), "r"(_a3)
                 : "memory", "cc", "r11", "cx");
    (long)resultvar;
  });
}


x86 assembly (clang, -O0):
<sys$remove>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    $0x15,%rax
int    $0x82
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys$remove>:
mov    $0x15,%rax
int    $0x82
ret

LLVM IR (-O0):
%struct._fab = type opaque
define i32 @"sys$remove"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = alloca %struct._fab*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
store %struct._fab* %0, %struct._fab** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%12 = load i8*, i8** %6
%13 = ptrtoint i8* %12 to i64
store i64 %13, i64* %8
%14 = load i8*, i8** %5
%15 = ptrtoint i8* %14 to i64
store i64 %15, i64* %9
%16 = load %struct._fab*, %struct._fab** %4
%17 = ptrtoint %struct._fab* %16 to i64
store i64 %17, i64* %10
%18 = load i64, i64* %10
%19 = load i64, i64* %9
%20 = load i64, i64* %8
%21 = call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x82\0A\09", "={ax},i,{rdi},{rsi},{rdx},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 21, i64 %18, i64 %19, i64 %20)
store i64 %21, i64* %7
%22 = load i64, i64* %7
store i64 %22, i64* %11
%23 = load i64, i64* %11
%24 = trunc i64 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
%struct._fab = type opaque
define i32 @"sys$remove"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = ptrtoint i8* %2 to i64
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint %struct._fab* %0 to i64
%7 = tail call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x82\0A\09", "={ax},i,{rdi},{rsi},{rdx},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 21, i64 %6, i64 %5, i64 %4)
%8 = trunc i64 %7 to i32
ret i32 %8
}
double dry_zenith_delay(void) { return 2.235486646978727; }


x86 assembly (clang, -O0):
<dry_zenith_delay>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @dry_zenith_delay() {
ret double 0x4001E246D2BB58BD
}

LLVM IR (-O2):
define double @dry_zenith_delay() {
ret double 0x4001E246D2BB58BD
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void smbus_reset(void) { outb(0xff, 0x0500 + 0x0); }


x86 assembly (clang, -O0):
<smbus_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0xff,%edi
mov    $0x500,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<smbus_reset>:
mov    $0xff,%edi
mov    $0x500,%esi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @smbus_reset() {
%1 = call i32 @outb(i32 255, i32 1280)
ret void
}

LLVM IR (-O2):
define void @smbus_reset() {
%1 = tail call i32 @outb(i32 255, i32 1280)
ret void
}
double test1(double x) { return __builtin_sqrt(x); }


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

x86 assembly (clang, -O2):
<test1>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     111f <test1+0xf>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @test1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sqrt(double %3)
ret double %4
}

LLVM IR (-O2):
define double @test1(double %0) {
%2 = tail call double @sqrt(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ EX_SOFTWARE;
size_t backtrace(void **, int);
int /*<<< orphan*/ backtrace_symbols_fd(void **, size_t, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void signal_handler(int sig) {
  void *array[10];
  size_t size;
  size = backtrace(array, 10);
  fprintf(stderr, "Error: signal %d:\n", sig);
  backtrace_symbols_fd(array, size, 2);
  exit(EX_SOFTWARE);
}


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
mov    $0xa,%esi
call   1040 <backtrace@plt>
mov    %rax,-0x68(%rbp)
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xe90(%rip),%rsi
call   1050 <fprintf@plt>
lea    -0x60(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    $0x2,%edx
call   1030 <backtrace_symbols_fd@plt>
mov    0x2e4a(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<signal_handler>:
push   %rbp
push   %r14
push   %rbx
sub    $0x50,%rsp
mov    %edi,%ebp
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0xa,%esi
call   1040 <backtrace@plt>
mov    %rax,%rbx
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
lea    0xe93(%rip),%rsi
mov    %ebp,%edx
call   1050 <fprintf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x2,%edx
call   1030 <backtrace_symbols_fd@plt>
mov    0x2e4d(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"Error: signal %d:\0A\00"
@EX_SOFTWARE = global i32 0
define void @signal_handler(i32 %0) {
%2 = alloca i32
%3 = alloca [10 x i8*]
%4 = alloca i64
store i32 %0, i32* %2
%5 = getelementptr inbounds [10 x i8*], [10 x i8*]* %3, i64 0, i64 0
%6 = call i64 @backtrace(i8** %5, i32 10)
store i64 %6, i64* %4
%7 = load i32, i32* @stderr
%8 = load i32, i32* %2
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = getelementptr inbounds [10 x i8*], [10 x i8*]* %3, i64 0, i64 0
%11 = load i64, i64* %4
%12 = call i32 @backtrace_symbols_fd(i8** %10, i64 %11, i32 2)
%13 = load i32, i32* @EX_SOFTWARE
%14 = call i32 @exit(i32 %13)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Error: signal %d:\0A\00"
@EX_SOFTWARE = global i32 0
define void @signal_handler(i32 %0) {
%2 = alloca [10 x i8*]
%3 = bitcast [10 x i8*]* %2 to i8*
%4 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 0
%5 = call i64 @backtrace(i8** %4, i32 10)
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0)
%8 = call i32 @backtrace_symbols_fd(i8** %4, i64 %5, i32 2)
%9 = load i32, i32* @EX_SOFTWARE
%10 = call i32 @exit(i32 %9)
unreachable
}
int check_prime(int num) {
  if (num == 1)
    return 0;
  int i, c = 0;
  for (i = 2; i < num; i++) {
    if (num % i == 0)
      return 0;
  }
  return num;
}


x86 assembly (clang, -O0):
<check_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    111d <check_prime+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    116c <check_prime+0x6c>
movl   $0x0,-0x10(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1166 <check_prime+0x66>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1153 <check_prime+0x53>
movl   $0x0,-0x4(%rbp)
jmp    116c <check_prime+0x6c>
jmp    1158 <check_prime+0x58>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112b <check_prime+0x2b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_prime>:
xor    %ecx,%ecx
cmp    $0x1,%edi
jne    110a <check_prime+0xa>
mov    %ecx,%eax
ret
cmp    $0x3,%edi
jl     1130 <check_prime+0x30>
mov    $0x2,%esi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1107 <check_prime+0x7>
add    $0x1,%esi
cmp    %esi,%edi
jne    1120 <check_prime+0x20>
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @check_prime(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = icmp sgt i32 %0, 2
br i1 %4, label %7, label %12
5: ; preds = %7
%6 = icmp eq i32 %11, %0
br i1 %6, label %12, label %7
7: ; preds = %3, %5
%8 = phi i32 [ %11, %5 ], [ 2, %3 ]
%9 = srem i32 %0, %8
%10 = icmp eq i32 %9, 0
%11 = add nuw nsw i32 %8, 1
br i1 %10, label %12, label %5
12: ; preds = %5, %7, %3, %1
%13 = phi i32 [ 0, %1 ], [ %0, %3 ], [ %0, %5 ], [ 0, %7 ]
ret i32 %13
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int sweep_standard_real_run(void) {
  int fail, *b;
  double *c;
  int precision = 0;
  fail = _ada_use_c2phc4c(621, &precision, b, c, 0);
  return fail;
}


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

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

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

LLVM IR (-O2):
define i32 @sweep_standard_real_run() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @_ada_use_c2phc4c(i32 621, i32* %1, i32* undef, double* undef, i32 0)
ret i32 %3
}
void enterIeee802154CpeHdPatch(void) {}


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

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

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

LLVM IR (-O2):
define void @enterIeee802154CpeHdPatch() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cursorshow();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ restorescreen();
int /*<<< orphan*/ setdefaultcolor();
void saftyexit(int status) {
  setdefaultcolor();
  cursorshow();
  restorescreen();
  exit(status);
}


x86 assembly (clang, -O0):
<saftyexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <setdefaultcolor@plt>
mov    $0x0,%al
call   1030 <cursorshow@plt>
mov    $0x0,%al
call   1050 <restorescreen@plt>
mov    -0x4(%rbp),%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<saftyexit>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <setdefaultcolor@plt>
xor    %eax,%eax
call   1030 <cursorshow@plt>
xor    %eax,%eax
call   1050 <restorescreen@plt>
mov    %ebx,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define void @saftyexit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @setdefaultcolor()
%4 = call i32 (...) @cursorshow()
%5 = call i32 (...) @restorescreen()
%6 = load i32, i32* %2
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
define void @saftyexit(i32 %0) {
%2 = tail call i32 (...) @setdefaultcolor()
%3 = tail call i32 (...) @cursorshow()
%4 = tail call i32 (...) @restorescreen()
%5 = tail call i32 @exit(i32 %0)
unreachable
}
int buildBell_il(void *ail, const char *matlabfilename) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @buildBell_il(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
int main(int argc, char **argv) {
  char *buf = NULL;
  buf = malloc(1 << 31);
  fgets(buf, 1024, stdin);
  printf("%s\n", buf);
  free(buf);
  buf = NULL;
  return 1;
}


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)
movq   $0x0,-0x18(%rbp)
mov    $0x80000000,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2e71(%rip),%rax
mov    (%rax),%edx
mov    $0x400,%esi
call   1050 <fgets@plt>
mov    -0x18(%rbp),%rsi
lea    0xe72(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x18(%rbp)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x80000000,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    0x2e93(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1050 <fgets@plt>
lea    0xe95(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [4 x i8] c"%s\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
store i8* null, i8** %6
%7 = call i8* @malloc(i32 -2147483648)
store i8* %7, i8** %6
%8 = load i8*, i8** %6
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %8, i32 1024, i32 %9)
%11 = load i8*, i8** %6
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %6
%14 = call i32 @free(i8* %13)
store i8* null, i8** %6
ret i32 1
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call dereferenceable_or_null(2147483648) i8* @malloc(i32 -2147483648)
%4 = load i32, i32* @stdin
%5 = tail call i32 @fgets(i8* %3, i32 1024, i32 %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%7 = tail call i32 @free(i8* %3)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ GCSReceiverHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void GCSReceiverUpdated() { UAVObjUpdated(GCSReceiverHandle()); }


x86 assembly (clang, -O0):
<GCSReceiverUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <GCSReceiverHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<GCSReceiverUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <GCSReceiverHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @GCSReceiverUpdated() {
%1 = call i32 (...) @GCSReceiverHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @GCSReceiverUpdated() {
%1 = tail call i32 (...) @GCSReceiverHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ japi_drawline(int, int, int, int, int);
void j_drawline(int arg0, int arg1, int arg2, int arg3, int arg4) {
  japi_drawline(arg0, arg1, arg2, arg3, arg4);
}


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

x86 assembly (clang, -O2):
<j_drawline>:
jmp    1030 <japi_drawline@plt>

LLVM IR (-O0):
define void @j_drawline(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @japi_drawline(i32 %11, i32 %12, i32 %13, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
define void @j_drawline(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @japi_drawline(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
char *rtrimsp(char *);
char *rtrimt(char *);
char *rtrim(char *str) {
  char *string;
  string = rtrimsp(str);
  return rtrimt(string);
}


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

x86 assembly (clang, -O2):
<rtrim>:
push   %rax
call   1030 <rtrimsp@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <rtrimt@plt>

LLVM IR (-O0):
define i8* @rtrim(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @rtrimsp(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i8* @rtrimt(i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @rtrim(i8* %0) {
%2 = tail call i8* @rtrimsp(i8* %0)
%3 = tail call i8* @rtrimt(i8* %2)
ret i8* %3
}
int cairo_code_draw_casFLabel_get_width() { return 7; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_casFLabel_get_width() {
ret i32 7
}

LLVM IR (-O2):
define i32 @cairo_code_draw_casFLabel_get_width() {
ret i32 7
}
void gtk_delete_type_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_delete_type_get_type() {
ret void
}
/* Variables and functions */
double __ocml_erfc_f64(double);
double erfc(double x) { return __ocml_erfc_f64(x); }


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

x86 assembly (clang, -O2):
<erfc>:
jmp    1030 <__ocml_erfc_f64@plt>

LLVM IR (-O0):
define double @erfc(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @__ocml_erfc_f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @erfc(double %0) {
%2 = tail call double @__ocml_erfc_f64(double %0)
ret double %2
}
int do_363() { return 363; }


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

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

LLVM IR (-O0):
define i32 @do_363() {
ret i32 363
}

LLVM IR (-O2):
define i32 @do_363() {
ret i32 363
}
int opcode_is_load_store(int opcode) {
  switch (opcode) {
  case 400:
  case 401:
  case 405:
  case 406:
  case 407:
  case 402:
  case 403:
  case 410:
  case 411:
  case 412:
  case 413:
  case 414:
  case 497:
  case 498:
  case 505:
  case 500:
  case 501:
  case 525:
  case 526:
  case 527:
  case 528:
  case 529:
    return (1);
  default:
    return (0);
  }
}


x86 assembly (clang, -O0):
<opcode_is_load_store>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xfffffe70,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x81,%eax
ja     1140 <opcode_is_load_store+0x40>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    1147 <opcode_is_load_store+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<opcode_is_load_store>:
add    $0xfffffe70,%edi
cmp    $0x81,%edi
ja     1124 <opcode_is_load_store+0x24>
mov    $0x1,%eax
lea    0xee6(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @opcode_is_load_store(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 400, label %5
i32 401, label %5
i32 405, label %5
i32 406, label %5
i32 407, label %5
i32 402, label %5
i32 403, label %5
i32 410, label %5
i32 411, label %5
i32 412, label %5
i32 413, label %5
i32 414, label %5
i32 497, label %5
i32 498, label %5
i32 505, label %5
i32 500, label %5
i32 501, label %5
i32 525, label %5
i32 526, label %5
i32 527, label %5
i32 528, label %5
i32 529, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @opcode_is_load_store(i32 %0) {
switch i32 %0, label %2 [
i32 400, label %3
i32 401, label %3
i32 405, label %3
i32 406, label %3
i32 407, label %3
i32 402, label %3
i32 403, label %3
i32 410, label %3
i32 411, label %3
i32 412, label %3
i32 413, label %3
i32 414, label %3
i32 497, label %3
i32 498, label %3
i32 505, label %3
i32 500, label %3
i32 501, label %3
i32 525, label %3
i32 526, label %3
i32 527, label %3
i32 528, label %3
i32 529, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
int LOC(int iy, int ix, int id, int nx, int nd) {
  return ((iy * nx + ix) * nd + id);
}


x86 assembly (clang, -O0):
<LOC>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x10(%rbp),%eax
add    -0x8(%rbp),%eax
imul   -0x14(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LOC>:
imul   %ecx,%edi
lea    (%rdi,%rsi,1),%eax
imul   %r8d,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @LOC(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %9
%13 = mul nsw i32 %11, %12
%14 = load i32, i32* %7
%15 = add nsw i32 %13, %14
%16 = load i32, i32* %10
%17 = mul nsw i32 %15, %16
%18 = load i32, i32* %8
%19 = add nsw i32 %17, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @LOC(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = mul nsw i32 %3, %0
%7 = add nsw i32 %6, %1
%8 = mul nsw i32 %7, %4
%9 = add nsw i32 %8, %2
ret i32 %9
}
const char *enum2str_def(unsigned value, const char *const names[],
                         unsigned items, const char *def) {
  const char *name;
  if (value < items)
    name = names[value];
  else
    name = def;
  return name;
}


x86 assembly (clang, -O0):
<enum2str_def>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    1132 <enum2str_def+0x32>
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x28(%rbp)
jmp    113a <enum2str_def+0x3a>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<enum2str_def>:
mov    %rcx,%rax
cmp    %edx,%edi
jae    110d <enum2str_def+0xd>
mov    %edi,%eax
mov    (%rsi,%rax,8),%rax
ret

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

LLVM IR (-O2):
define i8* @enum2str_def(i32 %0, i8** nocapture %1, i32 %2, i8* readnone %3) {
%5 = icmp ult i32 %0, %2
br i1 %5, label %6, label %10
6: ; preds = %4
%7 = zext i32 %0 to i64
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
br label %10
10: ; preds = %4, %6
%11 = phi i8* [ %9, %6 ], [ %3, %4 ]
ret i8* %11
}
void BIO_new_file(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ free(struct skipnode *);
void skipnode_delete(struct skipnode *node) { free(node); }


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

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

LLVM IR (-O2):
%struct.skipnode = type { i32 }
define void @skipnode_delete(%struct.skipnode* nocapture %0) {
%2 = tail call i32 @free(%struct.skipnode* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void print_error(char *message) {
  fprintf(stderr, "%s: %s\n", "Error", message);
}


x86 assembly (clang, -O0):
<print_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rcx
lea    0xed0(%rip),%rsi
lea    0xed1(%rip),%rdx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_error>:
mov    %rdi,%rcx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
lea    0xede(%rip),%rdx
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [6 x i8] c"Error\00"
define void @print_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void interrupt_8259pic_send_master_eoi() { outb(0x20, 0x20); }


x86 assembly (clang, -O0):
<interrupt_8259pic_send_master_eoi>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%esi
mov    %esi,%edi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<interrupt_8259pic_send_master_eoi>:
mov    $0x20,%edi
mov    $0x20,%esi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @interrupt_8259pic_send_master_eoi() {
%1 = call i32 @outb(i32 32, i32 32)
ret void
}

LLVM IR (-O2):
define void @interrupt_8259pic_send_master_eoi() {
%1 = tail call i32 @outb(i32 32, i32 32)
ret void
}