xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *huffmanComplex(char *);
int /*<<< orphan*/ printf(char *, double);
scalar_t__ strlen(char *);
void testError() {
  char *input = "ACTACTTACTACT";
  char *bin = huffmanComplex(input);
  printf("%.3f\n", (double)strlen(input) * 8 / (double)strlen(bin));
  free(bin);
}


x86 assembly (clang, -O0):
<testError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xeb9(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <huffmanComplex@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cvtsi2sd %rax,%xmm0
movsd  0xe8a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
movsd  -0x18(%rbp),%xmm0
cvtsi2sd %rax,%xmm1
divsd  %xmm1,%xmm0
lea    0xe79(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testError>:
push   %rbx
lea    0xec0(%rip),%rdi
call   1060 <huffmanComplex@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <strlen@plt>
cvtsi2sd %rax,%xmm1
movsd  0xe9b(%rip),%xmm0
divsd  %xmm1,%xmm0
lea    0xea6(%rip),%rdi
call   1050 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"ACTACTTACTACT\00"
@.str.1 = [6 x i8] c"%.3f\0A\00"
define void @testError() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = load i8*, i8** %1
%4 = call i8* @huffmanComplex(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %1
%6 = call i64 @strlen(i8* %5)
%7 = sitofp i64 %6 to double
%8 = fmul double %7, 8.000000e+00
%9 = load i8*, i8** %2
%10 = call i64 @strlen(i8* %9)
%11 = sitofp i64 %10 to double
%12 = fdiv double %8, %11
%13 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %12)
%14 = load i8*, i8** %2
%15 = call i32 @free(i8* %14)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"ACTACTTACTACT\00"
@.str.1 = [6 x i8] c"%.3f\0A\00"
define void @testError() {
%1 = tail call i8* @huffmanComplex(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%3 = sitofp i64 %2 to double
%4 = fdiv double 1.040000e+02, %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %4)
%6 = tail call i32 @free(i8* %1)
ret void
}
/* Variables and functions */
int f173(int *);
int f174(int *p) { return f173(p); }


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

x86 assembly (clang, -O2):
<f174>:
jmp    1030 <f173@plt>

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

LLVM IR (-O2):
define i32 @f174(i32* %0) {
%2 = tail call i32 @f173(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ fputc_err(unsigned short, int /*<<< orphan*/ *);
void WriteWORDLE(FILE *outf, unsigned short data) {
  (assert(outf != NULL));
  fputc_err(data & 0xFF, outf);
  fputc_err(data >> 8, outf);
}


x86 assembly (clang, -O0):
<WriteWORDLE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movzwl -0xa(%rbp),%eax
and    $0xff,%eax
mov    -0x8(%rbp),%rsi
movzwl %ax,%edi
call   1040 <fputc_err@plt>
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
mov    -0x8(%rbp),%rsi
movzwl %ax,%edi
call   1040 <fputc_err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteWORDLE>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1030 <assert@plt>
movzbl %bl,%edi
mov    %r14,%rsi
call   1040 <fputc_err@plt>
shr    $0x8,%ebx
mov    %ebx,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fputc_err@plt>

LLVM IR (-O0):
define void @WriteWORDLE(i32* %0, i16 zeroext %1) {
%3 = alloca i32*
%4 = alloca i16
store i32* %0, i32** %3
store i16 %1, i16* %4
%5 = load i32*, i32** %3
%6 = icmp ne i32* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i16, i16* %4
%10 = zext i16 %9 to i32
%11 = and i32 %10, 255
%12 = trunc i32 %11 to i16
%13 = load i32*, i32** %3
%14 = call i32 @fputc_err(i16 zeroext %12, i32* %13)
%15 = load i16, i16* %4
%16 = zext i16 %15 to i32
%17 = ashr i32 %16, 8
%18 = trunc i32 %17 to i16
%19 = load i32*, i32** %3
%20 = call i32 @fputc_err(i16 zeroext %18, i32* %19)
ret void
}

LLVM IR (-O2):
define void @WriteWORDLE(i32* %0, i16 zeroext %1) {
%3 = icmp ne i32* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = and i16 %1, 255
%7 = tail call i32 @fputc_err(i16 zeroext %6, i32* %0)
%8 = lshr i16 %1, 8
%9 = tail call i32 @fputc_err(i16 zeroext %8, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mempcpy(char *, char *, int);
int main(int argc, char *argv[]) {
  char testData[4];
  testData[0] = 0;
  testData[1] = 1;
  testData[2] = 2;
  testData[3] = 3;
  mempcpy(&testData[2], &testData[0], 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x0,-0x14(%rbp)
movb   $0x1,-0x13(%rbp)
movb   $0x2,-0x12(%rbp)
movb   $0x3,-0x11(%rbp)
lea    -0x14(%rbp),%rdi
add    $0x2,%rdi
lea    -0x14(%rbp),%rsi
mov    $0x2,%edx
call   1030 <mempcpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x3020100,0x4(%rsp)
03
lea    0x6(%rsp),%rdi
lea    0x4(%rsp),%rsi
mov    $0x2,%edx
call   1030 <mempcpy@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**
%6 = alloca [4 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
store i8 0, i8* %7
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 1
store i8 1, i8* %8
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 2
store i8 2, i8* %9
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 3
store i8 3, i8* %10
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 2
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%13 = call i32 @mempcpy(i8* %11, i8* %12, i32 2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
store i8 0, i8* %4
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 1
store i8 1, i8* %5
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 2
store i8 2, i8* %6
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 3
store i8 3, i8* %7
%8 = call i32 @mempcpy(i8* %6, i8* %4, i32 2)
ret i32 0
}
test01(const char *s1, const char *s2, int n) {
  return __builtin_strncmp(s1, "abcde", 3);
}


x86 assembly (clang, -O0):
<test01>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed2(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test01>:
lea    0xee9(%rip),%rsi
mov    $0x3,%edx
jmp    1030 <strncmp@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"abcde\00"
define i32 @test01(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = call i32 @strncmp(i8* %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 3)
ret i32 %8
}

LLVM IR (-O2):
@.str = [6 x i8] c"abcde\00"
define i32 @test01(i8* nocapture %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 3)
ret i32 %4
}
int get_tcount() {
  static int tc = 0;
  if (tc > 0)
    return tc;
#pragma omp parallel
  tc = 1;
  return tc;
}


x86 assembly (clang, -O0):
<get_tcount>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f19(%rip)
jle    111f <get_tcount+0x1f>
mov    0x2f0d(%rip),%eax
mov    %eax,-0x4(%rbp)
jmp    1132 <get_tcount+0x32>
movl   $0x1,0x2efb(%rip)
mov    0x2ef5(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tcount>:
cmpb   $0x0,0x2f1d(%rip)
jne    1110 <get_tcount+0x10>
movb   $0x1,0x2f14(%rip)
mov    $0x1,%eax
ret

LLVM IR (-O0):
@get_tcount.tc = internal global i32 0
define i32 @get_tcount() {
%1 = alloca i32
%2 = load i32, i32* @get_tcount.tc
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = load i32, i32* @get_tcount.tc
store i32 %5, i32* %1
br label %8
6: ; preds = %0
store i32 1, i32* @get_tcount.tc
%7 = load i32, i32* @get_tcount.tc
store i32 %7, i32* %1
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@get_tcount.tc = internal unnamed_addr global i1 false
define i32 @get_tcount() {
%1 = load i1, i1* @get_tcount.tc
br i1 %1, label %3, label %2
2: ; preds = %0
store i1 true, i1* @get_tcount.tc
br label %3
3: ; preds = %0, %2
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fgif(char *, char *);
void fgifm(char *buf) { fgif(buf, "-month.gif"); }


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"-month.gif\00"
define void @fgifm(i8* %0) {
%2 = tail call i32 @fgif(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ depth;
};
typedef TYPE_1__ ScreenFormat;

/* Variables and functions */
int get_ScreenFormat_depth(void *_p) {
  return (int)((ScreenFormat *)_p)->depth;
}


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

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

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

LLVM IR (-O2):
define i32 @get_ScreenFormat_depth(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int umain() {
  printf("Hello world!");
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<umain>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
jmp    1120 <umain+0x10>

x86 assembly (clang, -O2):
<umain>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
nopl   (%rax)
jmp    1120 <umain+0x10>

LLVM IR (-O0):
@.str = [13 x i8] c"Hello world!\00"
define i32 @umain() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello world!\00"
define i32 @umain() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) { printf("Bye\n"); }


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"Bye\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned long long int getTimeStamp() { return (0); }


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

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

LLVM IR (-O0):
define i64 @getTimeStamp() {
ret i64 0
}

LLVM IR (-O2):
define i64 @getTimeStamp() {
ret i64 0
}
void put_32(unsigned char *p, unsigned int v) {
  p[3] = (unsigned char)((v)&0xff);
  p[2] = (unsigned char)(((v) >> 8) & 0xff);
  p[1] = (unsigned char)(((v) >> 16) & 0xff);
  p[0] = (unsigned char)(((v) >> 24) & 0xff);
}


x86 assembly (clang, -O0):
<put_32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @put_32(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %3, i8* %4
%5 = lshr i32 %1, 8
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %6, i8* %7
%8 = lshr i32 %1, 16
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %9, i8* %10
%11 = lshr i32 %1, 24
%12 = trunc i32 %11 to i8
store i8 %12, i8* %0
ret void
}
double compute_denom(const double s1, const double s2, const double s3,
                     const double epsv) {
  return 1. / (1. - (s1 + s2 * epsv + s3 * epsv * epsv) * epsv);
}


x86 assembly (clang, -O0):
<compute_denom>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe92(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe86(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_denom>:
mulsd  %xmm3,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm3,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm3,%xmm2
movsd  0xee0(%rip),%xmm0
movapd %xmm0,%xmm1
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @compute_denom(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = load double, double* %8
%12 = call double @llvm.fmuladd.f64(double %10, double %11, double %9)
%13 = load double, double* %7
%14 = load double, double* %8
%15 = fmul double %13, %14
%16 = load double, double* %8
%17 = call double @llvm.fmuladd.f64(double %15, double %16, double %12)
%18 = load double, double* %8
%19 = fneg double %17
%20 = call double @llvm.fmuladd.f64(double %19, double %18, double 1.000000e+00)
%21 = fdiv double 1.000000e+00, %20
ret double %21
}

LLVM IR (-O2):
define double @compute_denom(double %0, double %1, double %2, double %3) {
%5 = tail call double @llvm.fmuladd.f64(double %1, double %3, double %0)
%6 = fmul double %2, %3
%7 = tail call double @llvm.fmuladd.f64(double %6, double %3, double %5)
%8 = fneg double %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double %3, double 1.000000e+00)
%10 = fdiv double 1.000000e+00, %9
ret double %10
}
/* Variables and functions */
int atoi(char *);
int fib_serial(int);
int main_serial(int argc, char *argv[]) {
  int n, result;
  if (argc == 2)
    n = atoi(argv[1]);
  else
    n = 30;
  result = fib_serial(n);
  return result;
}


x86 assembly (clang, -O0):
<main_serial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
jne    114e <main_serial+0x2e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
jmp    1155 <main_serial+0x35>
movl   $0x1e,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <fib_serial@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_serial>:
mov    %edi,%eax
mov    $0x1e,%edi
cmp    $0x2,%eax
jne    113c <main_serial+0x1c>
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
add    $0x8,%rsp
jmp    1030 <fib_serial@plt>

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

LLVM IR (-O2):
define i32 @main_serial(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ 30, %2 ]
%10 = tail call i32 @fib_serial(i32 %9)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ OAL_OBTAIN_SEMAPHORE();
int /*<<< orphan*/ OAL_RELEASE_SEMAPHORE();
int spi_dataread(void *, unsigned short, unsigned char, unsigned char *,
                 unsigned int);
int fc8150_spib_dataread(void *hDevice, unsigned short addr,
                         unsigned char *data, unsigned int length) {
  int res;
  unsigned char command = 0x40;
  OAL_OBTAIN_SEMAPHORE();
  res = spi_dataread(hDevice, addr, command, data, length);
  OAL_RELEASE_SEMAPHORE();
  return res;
}


x86 assembly (clang, -O0):
<fc8150_spib_dataread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movb   $0x40,-0x21(%rbp)
mov    $0x0,%al
call   1050 <OAL_OBTAIN_SEMAPHORE@plt>
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%dx
mov    -0x21(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
movzwl %dx,%esi
movzbl %al,%edx
call   1030 <spi_dataread@plt>
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1040 <OAL_RELEASE_SEMAPHORE@plt>
mov    -0x20(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc8150_spib_dataread>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <OAL_OBTAIN_SEMAPHORE@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x40,%edx
mov    %r15,%rcx
mov    %r14d,%r8d
call   1030 <spi_dataread@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <OAL_RELEASE_SEMAPHORE@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fc8150_spib_dataread(i8* %0, i16 zeroext %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i16
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8
store i8* %0, i8** %5
store i16 %1, i16* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
store i8 64, i8* %10
%11 = call i32 (...) @OAL_OBTAIN_SEMAPHORE()
%12 = load i8*, i8** %5
%13 = load i16, i16* %6
%14 = load i8, i8* %10
%15 = load i8*, i8** %7
%16 = load i32, i32* %8
%17 = call i32 @spi_dataread(i8* %12, i16 zeroext %13, i8 zeroext %14, i8* %15, i32 %16)
store i32 %17, i32* %9
%18 = call i32 (...) @OAL_RELEASE_SEMAPHORE()
%19 = load i32, i32* %9
ret i32 %19
}

LLVM IR (-O2):
define i32 @fc8150_spib_dataread(i8* %0, i16 zeroext %1, i8* %2, i32 %3) {
%5 = tail call i32 (...) @OAL_OBTAIN_SEMAPHORE()
%6 = tail call i32 @spi_dataread(i8* %0, i16 zeroext %1, i8 zeroext 64, i8* %2, i32 %3)
%7 = tail call i32 (...) @OAL_RELEASE_SEMAPHORE()
ret i32 %6
}
void sig_dispatch_handler() {}


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

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

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

LLVM IR (-O2):
define void @sig_dispatch_handler() {
ret void
}
void _set_rsvd_dev(unsigned char *u) { u[1] |= (1 << 6); }


x86 assembly (clang, -O0):
<_set_rsvd_dev>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
or     $0x40,%ecx
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_set_rsvd_dev>:
orb    $0x40,0x1(%rdi)
ret

LLVM IR (-O0):
define void @_set_rsvd_dev(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = or i32 %6, 64
%8 = trunc i32 %7 to i8
store i8 %8, i8* %4
ret void
}

LLVM IR (-O2):
define void @_set_rsvd_dev(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = or i8 %3, 64
store i8 %4, i8* %2
ret void
}
void hostmonitor_host_breath_taken() {}


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

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

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

LLVM IR (-O2):
define void @hostmonitor_host_breath_taken() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *sw();
int main() {
  printf("Got: %s\n", sw());
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <sw@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"Got: %s\0A\00"
define i32 @main() {
%1 = tail call i8* (...) @sw()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
void pwmSetRangeSys(unsigned int range) { return; }


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

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

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

LLVM IR (-O2):
define void @pwmSetRangeSys(i32 %0) {
ret void
}
void _M2_line_finish(__attribute__((unused)) int argc,
                     __attribute__((unused)) char *argv[]) {}


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

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

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

LLVM IR (-O2):
define void @_M2_line_finish(i32 %0, i8** nocapture %1) {
ret void
}
const char *parity_to_str(int parity) {
  if (parity == 1)
    return ("O");
  else if (parity == 2)
    return ("E");
  else
    return ("N");
}


x86 assembly (clang, -O0):
<parity_to_str>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1121 <parity_to_str+0x21>
lea    0xee8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <parity_to_str+0x46>
cmpl   $0x2,-0xc(%rbp)
jne    113b <parity_to_str+0x3b>
lea    0xed0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <parity_to_str+0x46>
lea    0xec2(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parity_to_str>:
cmp    $0x2,%edi
lea    0xef8(%rip),%rax
lea    0xef3(%rip),%rcx
cmove  %rax,%rcx
cmp    $0x1,%edi
lea    0xee1(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"O\00"
@.str.1 = [2 x i8] c"E\00"
@.str.2 = [2 x i8] c"N\00"
define i8* @parity_to_str(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %2
br label %12
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 2
br i1 %9, label %10, label %11
10: ; preds = %7
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %12
11: ; preds = %7
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %12
12: ; preds = %11, %10, %6
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
@.str = [2 x i8] c"O\00"
@.str.1 = [2 x i8] c"E\00"
@.str.2 = [2 x i8] c"N\00"
define i8* @parity_to_str(i32 %0) {
%2 = icmp eq i32 %0, 2
%3 = select i1 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
%4 = icmp eq i32 %0, 1
%5 = select i1 %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ parent();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello World.\n");
  parent();
  printf("Goodbye Cruel World.\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <parent@plt>
lea    0xed0(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World.\0A\00"
@.str.1 = [22 x i8] c"Goodbye Cruel World.\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @parent()
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello World.\00"
@str.2 = [21 x i8] c"Goodbye Cruel World.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @parent()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int off_t;

/* Variables and functions */
int /*<<< orphan*/ err_exit(char *);
int lseek(int, int, int);
off_t seek_file(int fd, off_t offset, int whence) {
  off_t ret;
  ret = lseek(fd, offset, whence);
  if (ret == -1)
    err_exit("lseek");
  return ret;
}


x86 assembly (clang, -O0):
<seek_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <lseek@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xffffffff,-0x10(%rbp)
jne    1158 <seek_file+0x38>
lea    0xead(%rip),%rdi
call   1040 <err_exit@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seek_file>:
push   %rbx
call   1030 <lseek@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1139 <seek_file+0x19>
lea    0xecc(%rip),%rdi
call   1040 <err_exit@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"lseek\00"
define i32 @seek_file(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 = load i32, i32* %6
%11 = call i32 @lseek(i32 %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = call i32 @err_exit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %3
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
@.str = [6 x i8] c"lseek\00"
define i32 @seek_file(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @lseek(i32 %0, i32 %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @err_exit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}
/* Variables and functions */
double BLAS_ddot(int *, double *, int *, double *, int *);
double ddot(int n, double *dx, int incx, double *dy, int incy) {
  dx++;
  dy++;
  return (BLAS_ddot(&n, dx, &incx, dy, &incy));
}


x86 assembly (clang, -O0):
<ddot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    -0x4(%rbp),%rdi
lea    -0x14(%rbp),%rdx
lea    -0x24(%rbp),%r8
call   1030 <BLAS_ddot@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ddot>:
sub    $0x18,%rsp
mov    %edi,0x14(%rsp)
mov    %edx,0x10(%rsp)
mov    %r8d,0xc(%rsp)
add    $0x8,%rsi
add    $0x8,%rcx
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%r8
call   1030 <BLAS_ddot@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @ddot(i32 %0, double* %1, i32 %2, double* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %6
store i32 %2, i32* %7
store i32 %4, i32* %8
%9 = getelementptr inbounds double, double* %1, i64 1
%10 = getelementptr inbounds double, double* %3, i64 1
%11 = call double @BLAS_ddot(i32* %6, double* %9, i32* %7, double* %10, i32* %8)
ret double %11
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_35(int Salt, int Parameter) {
  unsigned b = Salt ^ 0x47706008;
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_f01_35>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0x47706008,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_35>:
xor    $0x47706008,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_35(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = xor i32 %6, 1198546952
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = call i32 @yahoo_M1Common(i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @yahoo_f01_35(i32 %0, i32 %1) {
%3 = xor i32 %0, 1198546952
%4 = tail call i32 @yahoo_M1Common(i32 %3, i32 %1)
ret i32 %4
}
void *Shmat(int shmid, char *shmaddr, int shmflg) {
  void *wsk = shmat(shmid, shmaddr, shmflg);
  if (wsk == (char *)-1) {
    Error("Error on shmat");
  }
  return wsk;
}


x86 assembly (clang, -O0):
<Shmat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x0,%al
call   1040 <shmat@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    $0xffffffffffffffff,%rax
cmp    %rax,-0x20(%rbp)
jne    1168 <Shmat+0x48>
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <Error@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Shmat>:
push   %rbx
xor    %eax,%eax
call   1040 <shmat@plt>
movslq %eax,%rbx
cmp    $0xffffffffffffffff,%rbx
jne    113f <Shmat+0x1f>
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <Error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Error on shmat\00"
define i8* @Shmat(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @shmat to i32 (i32, i8*, i32, ...)*)(i32 %8, i8* %9, i32 %10)
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %7
%14 = load i8*, i8** %7
%15 = icmp eq i8* %14, inttoptr (i64 -1 to i8*)
br i1 %15, label %16, label %18
16: ; preds = %3
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @Error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %3
%19 = load i8*, i8** %7
ret i8* %19
}

LLVM IR (-O2):
@.str = [15 x i8] c"Error on shmat\00"
define i8* @Shmat(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @shmat to i32 (i32, i8*, i32, ...)*)(i32 %0, i8* %1, i32 %2)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = icmp eq i8* %6, inttoptr (i64 -1 to i8*)
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @Error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %3
ret i8* %6
}
void gpio_ata_inactive(void) {}


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

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

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

LLVM IR (-O2):
define void @gpio_ata_inactive() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_indent(int indent) {
  for (int i = 0; i != indent; i++) {
    printf(" ");
  }
}


x86 assembly (clang, -O0):
<print_indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
je     1148 <print_indent+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <print_indent+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_indent>:
push   %rbx
test   %edi,%edi
je     112f <print_indent+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <print_indent+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @print_indent(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %4
3: ; preds = %4, %1
ret void
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @putchar(i32 32)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %3, label %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void kfree(void *obj) { free(obj); }


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

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

LLVM IR (-O2):
define void @kfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int breakf() {}


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

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

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

LLVM IR (-O2):
define i32 @breakf() {
ret i32 undef
}
void scr_shape(int *nrow_ptr, int *ncol_ptr) {
  *nrow_ptr = 24;
  *ncol_ptr = 80;
}


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

x86 assembly (clang, -O2):
<scr_shape>:
movl   $0x18,(%rdi)
movl   $0x50,(%rsi)
ret

LLVM IR (-O0):
define void @scr_shape(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
store i32 24, i32* %5
%6 = load i32*, i32** %4
store i32 80, i32* %6
ret void
}

LLVM IR (-O2):
define void @scr_shape(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
store i32 24, i32* %0
store i32 80, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CE_High();
int /*<<< orphan*/ CE_Low();
int /*<<< orphan*/ Send_Byte(unsigned long);
void Block_Erase_32K(unsigned long Dst) {
  CE_Low();
  Send_Byte(0x52);
  Send_Byte(((Dst & 0xFFFFFF) >> 16));
  Send_Byte(((Dst & 0xFFFF) >> 8));
  Send_Byte(Dst & 0xFF);
  CE_High();
}


x86 assembly (clang, -O0):
<Block_Erase_32K>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <CE_Low@plt>
mov    $0x52,%edi
call   1030 <Send_Byte@plt>
mov    -0x8(%rbp),%rdi
and    $0xffffff,%rdi
shr    $0x10,%rdi
call   1030 <Send_Byte@plt>
mov    -0x8(%rbp),%rdi
and    $0xffff,%rdi
shr    $0x8,%rdi
call   1030 <Send_Byte@plt>
mov    -0x8(%rbp),%rdi
and    $0xff,%rdi
call   1030 <Send_Byte@plt>
mov    $0x0,%al
call   1040 <CE_High@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Block_Erase_32K>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <CE_Low@plt>
mov    $0x52,%edi
call   1030 <Send_Byte@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%edi
call   1030 <Send_Byte@plt>
movzbl %bh,%edi
call   1030 <Send_Byte@plt>
movzbl %bl,%edi
call   1030 <Send_Byte@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <CE_High@plt>

LLVM IR (-O0):
define void @Block_Erase_32K(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 (...) @CE_Low()
%4 = call i32 @Send_Byte(i64 82)
%5 = load i64, i64* %2
%6 = and i64 %5, 16777215
%7 = lshr i64 %6, 16
%8 = call i32 @Send_Byte(i64 %7)
%9 = load i64, i64* %2
%10 = and i64 %9, 65535
%11 = lshr i64 %10, 8
%12 = call i32 @Send_Byte(i64 %11)
%13 = load i64, i64* %2
%14 = and i64 %13, 255
%15 = call i32 @Send_Byte(i64 %14)
%16 = call i32 (...) @CE_High()
ret void
}

LLVM IR (-O2):
define void @Block_Erase_32K(i64 %0) {
%2 = tail call i32 (...) @CE_Low()
%3 = tail call i32 @Send_Byte(i64 82)
%4 = lshr i64 %0, 16
%5 = and i64 %4, 255
%6 = tail call i32 @Send_Byte(i64 %5)
%7 = lshr i64 %0, 8
%8 = and i64 %7, 255
%9 = tail call i32 @Send_Byte(i64 %8)
%10 = and i64 %0, 255
%11 = tail call i32 @Send_Byte(i64 %10)
%12 = tail call i32 (...) @CE_High()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ list();
int main(int argc, char *argv[]) {
  ((void)argc);
  ((void)argv);
  list();
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @list()
ret i32 0
}
void k_fninit() { asm("fninit"); }


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

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

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

LLVM IR (-O2):
define void @k_fninit() {
tail call void asm sideeffect "fninit", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void MipsCpuCaps() {}


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

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

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

LLVM IR (-O2):
define void @MipsCpuCaps() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void die() {
  fprintf(stderr, "vpatch: fatal error\n");
  abort();
  exit(3);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"vpatch: fatal error\0A\00"
define void @die() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"vpatch: fatal error\0A\00"
define void @die() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
void proc_call_3(int p0, int p1, int p2) {}


x86 assembly (clang, -O0):
<proc_call_3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @proc_call_3(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @proc_call_3(i32 %0, i32 %1, i32 %2) {
ret void
}
int min(int a, int b) {
  if (a > b)
    return b;
  else
    return a;
}


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

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

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}