xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ cgsynth(char *);
void cgsynxor(void) { cgsynth("xorq"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"xorq\00"
define void @cgsynxor() {
%1 = call i32 @cgsynth(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"xorq\00"
define void @cgsynxor() {
%1 = tail call i32 @cgsynth(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_7Dint8_mem(signed char *val) {
  return ((*val) & (0x7D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_7Dint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0x7d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_7Dint8_mem>:
testb  $0x7d,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_7Dint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 125
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_7Dint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 125
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fillArray(int *, int);
float getTimeForQuickSort(int *, int, int);
int /*<<< orphan*/ printf(char *, float);
void generateQuickSort(int low, int high) {
  int arr[2500];
  float time;
  fillArray(arr, high);
  time = getTimeForQuickSort(arr, low, high);
  printf("%-10.3f", time);
}


x86 assembly (clang, -O0):
<generateQuickSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2730,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x2720(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1050 <fillArray@plt>
lea    -0x2720(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <getTimeForQuickSort@plt>
movss  %xmm0,-0x2724(%rbp)
ff
movss  -0x2724(%rbp),%xmm0
ff
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
add    $0x2730,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generateQuickSort>:
push   %rbp
push   %r14
push   %rbx
sub    $0x2710,%rsp
mov    %esi,%ebx
mov    %edi,%ebp
mov    %rsp,%r14
mov    %r14,%rdi
call   1050 <fillArray@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <getTimeForQuickSort@plt>
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
add    $0x2710,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%-10.3f\00"
define void @generateQuickSort(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [2500 x i32]
%6 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = getelementptr inbounds [2500 x i32], [2500 x i32]* %5, i64 0, i64 0
%8 = load i32, i32* %4
%9 = call i32 @fillArray(i32* %7, i32 %8)
%10 = getelementptr inbounds [2500 x i32], [2500 x i32]* %5, i64 0, i64 0
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call float @getTimeForQuickSort(i32* %10, i32 %11, i32 %12)
store float %13, float* %6
%14 = load float, float* %6
%15 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float %14)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%-10.3f\00"
define void @generateQuickSort(i32 %0, i32 %1) {
%3 = alloca [2500 x i32]
%4 = bitcast [2500 x i32]* %3 to i8*
%5 = getelementptr inbounds [2500 x i32], [2500 x i32]* %3, i64 0, i64 0
%6 = call i32 @fillArray(i32* %5, i32 %1)
%7 = call float @getTimeForQuickSort(i32* %5, i32 %0, i32 %1)
%8 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float %7)
ret void
}
/* Variables and functions */
long lrand48();
extern __attribute__((gnu_)) long random(void) { return lrand48(); }


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

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

LLVM IR (-O0):
define i64 @random() {
%1 = call i64 (...) @lrand48()
ret i64 %1
}

LLVM IR (-O2):
define i64 @random() {
%1 = tail call i64 (...) @lrand48()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void del_flow_usage(void) {
  printf("flow dev del_flow handle <num> table <id>\n");
}


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

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

LLVM IR (-O0):
@.str = [43 x i8] c"flow dev del_flow handle <num> table <id>\0A\00"
define void @del_flow_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [42 x i8] c"flow dev del_flow handle <num> table <id>\00"
define void @del_flow_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret void
}
int winsockInit(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @winsockInit() {
ret i32 0
}

LLVM IR (-O2):
define i32 @winsockInit() {
ret i32 0
}
void fd231(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  a : {
    typedef int(*h)[n];
  P025A:
    goto P025A;
    0;
  };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  p026A:
    goto p026A;
    goto a;
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd231>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd231+0x7>

x86 assembly (clang, -O2):
<fd231>:
jmp    1100 <fd231>

LLVM IR (-O0):
define void @fd231(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; No predecessors!
%32 = load i32, i32* %2
%33 = zext i32 %32 to i64
br label %34
34: ; preds = %34, %31
br label %34
35: ; preds = %35
br label %35
36: ; No predecessors!
%37 = load i32, i32* %2
%38 = zext i32 %37 to i64
br label %39
39: ; preds = %39, %36
br label %39
40: ; preds = %40
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd231(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
void _ht_int_swap(size_t *first, size_t *second) {
  size_t temp = *first;
  *first = *second;
  *second = temp;
}


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

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

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

LLVM IR (-O2):
define void @_ht_int_swap(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %0
%4 = load i64, i64* %1
store i64 %4, i64* %0
store i64 %3, i64* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
int main(void) {
  write(1, "Hello, World!", 12);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
lea    0xed5(%rip),%rsi
mov    $0xc,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
mov    $0xc,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, World!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @write(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 12)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, World!\00"
define i32 @main() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 12)
ret i32 0
}
/* Variables and functions */
scalar_t__ VIM_HIF_GetReg8(int);
unsigned long VIM_JPEG_GetJpegBlockCount(void) {
  unsigned long value32 = 0;
  value32 = (unsigned long)VIM_HIF_GetReg8((0x0000 + 0x049));
  value32 |= (unsigned long)VIM_HIF_GetReg8((0x0000 + 0x048)) << 8;
  return value32;
}


x86 assembly (clang, -O0):
<VIM_JPEG_GetJpegBlockCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    $0x49,%edi
call   1030 <VIM_HIF_GetReg8@plt>
mov    %rax,-0x8(%rbp)
mov    $0x48,%edi
call   1030 <VIM_HIF_GetReg8@plt>
shl    $0x8,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_JPEG_GetJpegBlockCount>:
push   %rbx
mov    $0x49,%edi
call   1030 <VIM_HIF_GetReg8@plt>
mov    %rax,%rbx
mov    $0x48,%edi
call   1030 <VIM_HIF_GetReg8@plt>
shl    $0x8,%rax
or     %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @VIM_JPEG_GetJpegBlockCount() {
%1 = alloca i64
store i64 0, i64* %1
%2 = call i64 @VIM_HIF_GetReg8(i32 73)
store i64 %2, i64* %1
%3 = call i64 @VIM_HIF_GetReg8(i32 72)
%4 = shl i64 %3, 8
%5 = load i64, i64* %1
%6 = or i64 %5, %4
store i64 %6, i64* %1
%7 = load i64, i64* %1
ret i64 %7
}

LLVM IR (-O2):
define i64 @VIM_JPEG_GetJpegBlockCount() {
%1 = tail call i64 @VIM_HIF_GetReg8(i32 73)
%2 = tail call i64 @VIM_HIF_GetReg8(i32 72)
%3 = shl i64 %2, 8
%4 = or i64 %3, %1
ret i64 %4
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
int strlen(char const *);
char *strdup(const char *s) {
  char *sdup;
  size_t len = strlen(s) + 1;
  sdup = malloc(len);
  if (sdup != NULL) {
    memcpy(sdup, s, len);
  }
  return sdup;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1177 <strdup+0x47>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1161 <strdup+0x31>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 1
%8 = sext i32 %7 to i64
store i64 %8, i64* %4
%9 = load i64, i64* %4
%10 = call i8* @malloc(i64 %9)
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %18
13: ; preds = %1
%14 = load i8*, i8** %3
%15 = load i8*, i8** %2
%16 = load i64, i64* %4
%17 = call i32 @memcpy(i8* %14, i8* %15, i64 %16)
br label %18
18: ; preds = %13, %1
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %4)
br label %9
9: ; preds = %7, %1
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: baconian [-d]\n");
  exit(1);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"usage: baconian [-d]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"usage: baconian [-d]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void RTVfsParsePathA(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ m68k_read_memory_8(int /*<<< orphan*/);
void m68k_read_to_8(uint32_t address, uint8_t *dest) {
  *dest = m68k_read_memory_8(address);
}


x86 assembly (clang, -O0):
<m68k_read_to_8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <m68k_read_memory_8@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_read_to_8>:
push   %rbx
mov    %rsi,%rbx
call   1030 <m68k_read_memory_8@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @m68k_read_to_8(i32 %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @m68k_read_memory_8(i32 %0)
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
double cos(double);
double sin(double);
void dcnids_sine_cosine(double theta_deg, double *sin_theta,
                        double *cos_theta) {
  double theta;
  theta = theta_deg * 0.0174;
  *sin_theta = sin(theta);
  *cos_theta = cos(theta);
}


x86 assembly (clang, -O0):
<dcnids_sine_cosine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  0xec3(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <sin@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x20(%rbp),%xmm0
call   1040 <cos@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcnids_sine_cosine>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mulsd  0xece(%rip),%xmm0
movsd  %xmm0,(%rsp)
call   1030 <sin@plt>
movsd  %xmm0,(%rbx)
movsd  (%rsp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @dcnids_sine_cosine(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%8 = load double, double* %4
%9 = fmul double %8, 1.740000e-02
store double %9, double* %7
%10 = load double, double* %7
%11 = call double @sin(double %10)
%12 = load double*, double** %5
store double %11, double* %12
%13 = load double, double* %7
%14 = call double @cos(double %13)
%15 = load double*, double** %6
store double %14, double* %15
ret void
}

LLVM IR (-O2):
define void @dcnids_sine_cosine(double %0, double* nocapture writeonly %1, double* nocapture writeonly %2) {
%4 = fmul double %0, 1.740000e-02
%5 = tail call double @sin(double %4)
store double %5, double* %1
%6 = tail call double @cos(double %4)
store double %6, double* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Usage() {
  printf("\nMatt version "
         "1.00"
         " "
         "Single Threaded"
         " build.\n"
         "See http://matt.csail.mit.edu for more information.\n\n"
         "Usage: Matt -o outprefix [-c cutoff] [-t threads] [-[rslbdvp][01]]*\n"
         "            [-f <extension list>] [-L listfile]* [file[:<chain "
         "list>]]*\n");
}


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

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

LLVM IR (-O0):
@.str = [236 x i8] c"\0AMatt version 1.00 Single Threaded build.\0ASee http://matt.csail.mit.edu for more information.\0A\0AUsage: Matt -o outprefix [-c cutoff] [-t threads] [-[rslbdvp][01]]*\0A [-f <extension list>] [-L listfile]* [file[:<chain list>]]*\0A\00"
define void @Usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([236 x i8], [236 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [235 x i8] c"\0AMatt version 1.00 Single Threaded build.\0ASee http://matt.csail.mit.edu for more information.\0A\0AUsage: Matt -o outprefix [-c cutoff] [-t threads] [-[rslbdvp][01]]*\0A [-f <extension list>] [-L listfile]* [file[:<chain list>]]*\00"
define void @Usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([235 x i8], [235 x i8]* @str, i64 0, i64 0))
ret void
}
int DefMock_fcntl(int fildes, int cmd, ...) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @DefMock_fcntl(i32 %0, i32 %1, ...) {
ret i32 0
}
void Nop() {}


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

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

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

LLVM IR (-O2):
define void @Nop() {
ret void
}
char *parseParentPath(const char *path, char *parsed) {
  strcpy(parsed, path);
  if (strrchr(parsed, '/') == strchr(parsed, 0) - 1) {
    *(strrchr(parsed, '/')) = 0;
  }
  *(strrchr(parsed, '/')) = 0;
  return parsed;
}


x86 assembly (clang, -O0):
<parseParentPath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1050 <strrchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1040 <strchr@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rcx
cmp    %rcx,%rax
jne    118f <parseParentPath+0x5f>
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1050 <strrchr@plt>
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1050 <strrchr@plt>
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseParentPath>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1050 <strrchr@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1040 <strlen@plt>
add    %rbx,%rax
add    $0xffffffffffffffff,%rax
cmp    %rax,%r14
jne    116a <parseParentPath+0x3a>
movb   $0x0,(%r14)
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1050 <strrchr@plt>
movb   $0x0,(%rax)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @parseParentPath(i8* nocapture %0, i8* returned %1) {
%3 = tail call i8* @strcpy(i8* dereferenceable(1) %1, i8* dereferenceable(1) %0)
%4 = tail call i8* @strrchr(i8* dereferenceable(1) %1, i32 47)
%5 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%6 = getelementptr i8, i8* %1, i64 %5
%7 = getelementptr inbounds i8, i8* %6, i64 -1
%8 = icmp eq i8* %4, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i8 0, i8* %4
br label %10
10: ; preds = %9, %2
%11 = tail call i8* @strrchr(i8* dereferenceable(1) %1, i32 47)
store i8 0, i8* %11
ret i8* %1
}
void RTRandAdvS64Ex(void) {}


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

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

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

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

/* Variables and functions */
void debug64_deflabel(char *name, int32_t segment, int64_t offset,
                      int is_global, char *special) {
  (void)name;
  (void)segment;
  (void)offset;
  (void)is_global;
  (void)special;
}


x86 assembly (clang, -O0):
<debug64_deflabel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @debug64_deflabel(i8* nocapture %0, i32 %1, i32 %2, i32 %3, i8* nocapture %4) {
ret void
}
void wifi_rsp_hardware_io_port_config_open_drain(
    const struct wifi_msg_hardware_io_port_config_open_drain_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_hardware_io_port_config_open_drain_rsp_t = type opaque
define void @wifi_rsp_hardware_io_port_config_open_drain(%struct.wifi_msg_hardware_io_port_config_open_drain_rsp_t* nocapture %0) {
ret void
}
/* Variables and functions */
int longestValidParentheses2(char *);
int /*<<< orphan*/ printf(char *, int);
void longestValidParenthesesMain(void) {
  char s[] =
      "(()()(()(()))()((()))((()(()())()(()))())))()(()()))())))))))()()()()))("
      "((()())((()()(((())))()(()()(())((()))))))(()(()))(((()())()))(()))((((("
      ")(()()()())()()(()))(()()(())()((()()())))(())()())()(";
  printf("%d\n", longestValidParentheses2(s));
}


x86 assembly (clang, -O0):
<longestValidParenthesesMain>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
lea    -0xd0(%rbp),%rdi
lea    0xeb7(%rip),%rsi
mov    $0xc7,%edx
call   1050 <memcpy@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <longestValidParentheses2@plt>
mov    %eax,%esi
lea    0xf5f(%rip),%rdi
call   1040 <printf@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<longestValidParenthesesMain>:
push   %rbx
sub    $0xd0,%rsp
lea    0xec1(%rip),%rsi
mov    %rsp,%rbx
mov    $0xc7,%edx
mov    %rbx,%rdi
call   1050 <memcpy@plt>
mov    %rbx,%rdi
call   1030 <longestValidParentheses2@plt>
lea    0xf69(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.longestValidParenthesesMain.s = [199 x i8] c"(()()(()(()))()((()))((()(()())()(()))())))()(()()))())))))))()()()()))(((()())((()()(((())))()(()()(())((()))))))(()(()))(((()())()))(()))((((()(()()()())()()(()))(()()(())()((()()())))(())()())()(\00"
@.str = [4 x i8] c"%d\0A\00"
define void @longestValidParenthesesMain() {
%1 = alloca [199 x i8]
%2 = bitcast [199 x i8]* %1 to i8*
%3 = getelementptr inbounds [199 x i8], [199 x i8]* %1, i64 0, i64 0
%4 = call i32 @longestValidParentheses2(i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@__const.longestValidParenthesesMain.s = [199 x i8] c"(()()(()(()))()((()))((()(()())()(()))())))()(()()))())))))))()()()()))(((()())((()()(((())))()(()()(())((()))))))(()(()))(((()())()))(()))((((()(()()()())()()(()))(()()(())()((()()())))(())()())()(\00"
@.str = [4 x i8] c"%d\0A\00"
define void @longestValidParenthesesMain() {
%1 = alloca [199 x i8]
%2 = getelementptr inbounds [199 x i8], [199 x i8]* %1, i64 0, i64 0
%3 = call i32 @longestValidParentheses2(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stic_simple_test_result(int, char *, char const *,
                                           char const *, unsigned int);
void stic_assert_success(int test, const char function[], const char file[],
                         unsigned int line) {
  stic_simple_test_result(test == 0, "Should have been success (zero)",
                          function, file, line);
}


x86 assembly (clang, -O0):
<stic_assert_success>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
lea    0xebb(%rip),%rsi
call   1030 <stic_simple_test_result@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stic_assert_success>:
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %rsi,%rdx
xor    %eax,%eax
test   %edi,%edi
sete   %al
lea    0xed9(%rip),%rsi
mov    %eax,%edi
jmp    1030 <stic_simple_test_result@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Should have been success (zero)\00"
define void @stic_assert_success(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
%12 = load i8*, i8** %6
%13 = load i8*, i8** %7
%14 = load i32, i32* %8
%15 = call i32 @stic_simple_test_result(i32 %11, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %13, i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Should have been success (zero)\00"
define void @stic_assert_success(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = icmp eq i32 %0, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 @stic_simple_test_result(i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i32 %3)
ret void
}
unsigned int sec_firmware_used_jobring_offset(void) { return 0x40000; }


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

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

LLVM IR (-O0):
define i32 @sec_firmware_used_jobring_offset() {
ret i32 262144
}

LLVM IR (-O2):
define i32 @sec_firmware_used_jobring_offset() {
ret i32 262144
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
void usage(void) {
  puts("drcomd, daemon part of the drcomc-drcomcd client-daemon programs\n\n"
       "	usage: drcomd [ -n | --nodaemon ]\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [102 x i8] c"drcomd, daemon part of the drcomc-drcomcd client-daemon programs\0A\0A\09usage: drcomd [ -n | --nodaemon ]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@.str = [102 x i8] c"drcomd, daemon part of the drcomc-drcomcd client-daemon programs\0A\0A\09usage: drcomd [ -n | --nodaemon ]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([102 x i8], [102 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
unsigned int average(unsigned int, unsigned int);
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int, unsigned int);
int main() {
  unsigned bytes1 = 1000 * 1024 * 1024;
  unsigned bytes2 = 2000 * 1024 * 1024;
  unsigned avgbytes = average(bytes1, bytes2);
  printf("average(%d, %d) = %d\n", bytes1, bytes2, avgbytes);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3e800000,-0x8(%rbp)
movl   $0x7d000000,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <average@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3e800000,%edi
mov    $0x7d000000,%esi
call   1040 <average@plt>
lea    0xec9(%rip),%rdi
mov    $0x3e800000,%esi
mov    $0x7d000000,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"average(%d, %d) = %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 1048576000, i32* %2
store i32 2097152000, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 @average(i32 %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"average(%d, %d) = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @average(i32 1048576000, i32 2097152000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1048576000, i32 2097152000, i32 %1)
ret i32 0
}
int workout_get_recording_interval(unsigned char b) {
  int ri = 0;
  switch (b & 0x0f) {
  case 0:
    ri = 5;
    break;
  case 1:
    ri = 15;
    break;
  case 2:
    ri = 60;
    break;
  default:
    break;
  }
  return ri;
}


x86 assembly (clang, -O0):
<workout_get_recording_interval>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0xc(%rbp)
je     1148 <workout_get_recording_interval+0x48>
jmp    1126 <workout_get_recording_interval+0x26>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     1154 <workout_get_recording_interval+0x54>
jmp    1137 <workout_get_recording_interval+0x37>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     1160 <workout_get_recording_interval+0x60>
jmp    116c <workout_get_recording_interval+0x6c>
movl   $0x5,-0x8(%rbp)
jmp    1171 <workout_get_recording_interval+0x71>
movl   $0xf,-0x8(%rbp)
jmp    1171 <workout_get_recording_interval+0x71>
movl   $0x3c,-0x8(%rbp)
jmp    1171 <workout_get_recording_interval+0x71>
jmp    1171 <workout_get_recording_interval+0x71>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<workout_get_recording_interval>:
and    $0xf,%dil
xor    %eax,%eax
cmp    $0x2,%dil
ja     111a <workout_get_recording_interval+0x1a>
movzbl %dil,%eax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @workout_get_recording_interval(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = and i32 %5, 15
switch i32 %6, label %10 [
i32 0, label %7
i32 1, label %8
i32 2, label %9
]
7: ; preds = %1
store i32 5, i32* %3
br label %11
8: ; preds = %1
store i32 15, i32* %3
br label %11
9: ; preds = %1
store i32 60, i32* %3
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %9, %8, %7
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@switch.table.workout_get_recording_interval = [3 x i32] [i32 5, i32 15, i32 60]
define i32 @workout_get_recording_interval(i8 zeroext %0) {
%2 = and i8 %0, 15
%3 = icmp ult i8 %2, 3
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = zext i8 %2 to i64
%6 = getelementptr inbounds [3 x i32], [3 x i32]* @switch.table.workout_get_recording_interval, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
void flush_and_invalidate(void) {
  *((volatile unsigned int *)(0x01845004)) = 1;
  ;
  while (*((volatile unsigned int *)(0x01845004)))
    ;
}


x86 assembly (clang, -O0):
<flush_and_invalidate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1845004,%eax
movl   $0x1,(%rax)
mov    $0x1845004,%eax
mov    (%rax),%eax
cmp    $0x0,%eax
je     1124 <flush_and_invalidate+0x24>
jmp    110f <flush_and_invalidate+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<flush_and_invalidate>:
movl   $0x1,0x1845004
nopl   0x0(%rax,%rax,1)
cmpl   $0x0,0x1845004
jne    1110 <flush_and_invalidate+0x10>
ret

LLVM IR (-O0):
define void @flush_and_invalidate() {
store volatile i32 1, i32* inttoptr (i64 25448452 to i32*)
br label %1
1: ; preds = %4, %0
%2 = load volatile i32, i32* inttoptr (i64 25448452 to i32*)
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
br label %1
5: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @flush_and_invalidate() {
store volatile i32 1, i32* inttoptr (i64 25448452 to i32*)
br label %1
1: ; preds = %1, %0
%2 = load volatile i32, i32* inttoptr (i64 25448452 to i32*)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
/* Variables and functions */
int run_euclid_tests();
int run_list_tests();
int main(int argc, char *argv[]) {
  int rval = run_euclid_tests();
  if (rval) {
    return rval;
  }
  rval = run_list_tests();
  if (rval) {
    return rval;
  }
  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)
mov    $0x0,%al
call   1030 <run_euclid_tests@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1155 <main+0x35>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117b <main+0x5b>
mov    $0x0,%al
call   1040 <run_list_tests@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1174 <main+0x54>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117b <main+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <run_euclid_tests@plt>
test   %eax,%eax
je     112e <main+0xe>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <run_list_tests@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @run_euclid_tests()
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @run_list_tests()
br label %7
7: ; preds = %5, %2
%8 = phi i32 [ %3, %2 ], [ %6, %5 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ indirect1(char *);
void main(void) { indirect1("hello"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
define void @main() {
%1 = tail call i32 @indirect1(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
void XShapeOffsetShape() {}


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

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

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

LLVM IR (-O2):
define void @XShapeOffsetShape() {
ret void
}
/* Variables and functions */
int helper(char *, int /*<<< orphan*/, int);
int strlen(char *);
int romanToInt(char *s) {
  int n = strlen(s);
  return helper(s, 0, n - 1);
}


x86 assembly (clang, -O0):
<romanToInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1040 <helper@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<romanToInt>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    -0x1(%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1040 <helper@plt>

LLVM IR (-O0):
define i32 @romanToInt(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
store i32 %5, i32* %3
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = sub nsw i32 %7, 1
%9 = call i32 @helper(i8* %6, i32 0, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @romanToInt(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -1
%4 = tail call i32 @helper(i8* %0, i32 0, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ OPENSSL_cpuid_setup();
int /*<<< orphan*/ OpenSSL_add_all_ciphers();
int /*<<< orphan*/ OpenSSL_add_all_digests();
void OPENSSL_add_all_algorithms_noconf(void) {
  OPENSSL_cpuid_setup();
  OpenSSL_add_all_ciphers();
  OpenSSL_add_all_digests();
}


x86 assembly (clang, -O0):
<OPENSSL_add_all_algorithms_noconf>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <OPENSSL_cpuid_setup@plt>
mov    $0x0,%al
call   1050 <OpenSSL_add_all_ciphers@plt>
mov    $0x0,%al
call   1040 <OpenSSL_add_all_digests@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OPENSSL_add_all_algorithms_noconf>:
push   %rax
xor    %eax,%eax
call   1030 <OPENSSL_cpuid_setup@plt>
xor    %eax,%eax
call   1050 <OpenSSL_add_all_ciphers@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <OpenSSL_add_all_digests@plt>

LLVM IR (-O0):
define void @OPENSSL_add_all_algorithms_noconf() {
%1 = call i32 (...) @OPENSSL_cpuid_setup()
%2 = call i32 (...) @OpenSSL_add_all_ciphers()
%3 = call i32 (...) @OpenSSL_add_all_digests()
ret void
}

LLVM IR (-O2):
define void @OPENSSL_add_all_algorithms_noconf() {
%1 = tail call i32 (...) @OPENSSL_cpuid_setup()
%2 = tail call i32 (...) @OpenSSL_add_all_ciphers()
%3 = tail call i32 (...) @OpenSSL_add_all_digests()
ret void
}
/* Type definitions */
typedef int time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int mktime(struct tm *);
time_t date_mktime(struct tm *tm, int utc_offset) {
  time_t return_value;
  return_value = mktime(tm);
  return_value += ((60 * 60) * utc_offset);
  return return_value;
}


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

x86 assembly (clang, -O2):
<date_mktime>:
push   %rbx
mov    %esi,%ebx
call   1030 <mktime@plt>
imul   $0xe10,%ebx,%ecx
add    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @date_mktime(%struct.tm* %0, i32 %1) {
%3 = alloca %struct.tm*
%4 = alloca i32
%5 = alloca i32
store %struct.tm* %0, %struct.tm** %3
store i32 %1, i32* %4
%6 = load %struct.tm*, %struct.tm** %3
%7 = call i32 @mktime(%struct.tm* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %4
%9 = mul nsw i32 3600, %8
%10 = load i32, i32* %5
%11 = add nsw i32 %10, %9
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @date_mktime(%struct.tm* nocapture %0, i32 %1) {
%3 = tail call i32 @mktime(%struct.tm* %0)
%4 = mul nsw i32 %1, 3600
%5 = add nsw i32 %3, %4
ret i32 %5
}
float _Complex mul_float_rc(float a, float _Complex b) { return a * b; }


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

x86 assembly (clang, -O2):
<mul_float_rc>:
shufps $0x0,%xmm0,%xmm0
mulps  %xmm1,%xmm0
ret

LLVM IR (-O0):
define <2 x float> @mul_float_rc(float %0, <2 x float> %1) {
%3 = alloca { float, float }
%4 = alloca { float, float }
%5 = alloca float
%6 = bitcast { float, float }* %4 to <2 x float>*
store <2 x float> %1, <2 x float>* %6
store float %0, float* %5
%7 = load float, float* %5
%8 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%9 = load float, float* %8
%10 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
%11 = load float, float* %10
%12 = fmul float %7, %9
%13 = fmul float %7, %11
%14 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%15 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
store float %12, float* %14
store float %13, float* %15
%16 = bitcast { float, float }* %3 to <2 x float>*
%17 = load <2 x float>, <2 x float>* %16
ret <2 x float> %17
}

LLVM IR (-O2):
define <2 x float> @mul_float_rc(float %0, <2 x float> %1) {
%3 = insertelement <2 x float> poison, float %0, i64 0
%4 = shufflevector <2 x float> %3, <2 x float> poison, <2 x i32> zeroinitializer
%5 = fmul <2 x float> %4, %1
ret <2 x float> %5
}
void vec3_copy(float *dst, float *a) {
  dst[0] = a[0];
  dst[1] = a[1];
  dst[2] = a[2];
}


x86 assembly (clang, -O0):
<vec3_copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3_copy>:
movss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x8(%rsi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @vec3_copy(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %3
%9 = getelementptr inbounds float, float* %8, i64 0
store float %7, float* %9
%10 = load float*, float** %4
%11 = getelementptr inbounds float, float* %10, i64 1
%12 = load float, float* %11
%13 = load float*, float** %3
%14 = getelementptr inbounds float, float* %13, i64 1
store float %12, float* %14
%15 = load float*, float** %4
%16 = getelementptr inbounds float, float* %15, i64 2
%17 = load float, float* %16
%18 = load float*, float** %3
%19 = getelementptr inbounds float, float* %18, i64 2
store float %17, float* %19
ret void
}

LLVM IR (-O2):
define void @vec3_copy(float* nocapture writeonly %0, float* nocapture %1) {
%3 = load float, float* %1
store float %3, float* %0
%4 = getelementptr inbounds float, float* %1, i64 1
%5 = load float, float* %4
%6 = getelementptr inbounds float, float* %0, i64 1
store float %5, float* %6
%7 = getelementptr inbounds float, float* %1, i64 2
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %0, i64 2
store float %8, float* %9
ret void
}