xunge/DecIR huggingface dataset:
int test_imm_42uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x42 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_42uint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0x42,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_42uint64_midword_reg>:
test   $0x420000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_42uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 4325376
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void proc51() {}


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

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

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

LLVM IR (-O2):
define void @proc51() {
ret void
}
/* Type definitions */
typedef enum boolean { ____Placeholder_boolean } boolean;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  enum boolean { YES };
  enum boolean x = YES;
  enum boolean y = 3;
  printf("%d %d\n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xec6(%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
xor    %esi,%esi
mov    $0x3,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 0, i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i;
  for (i = 0; i < 255; i++) {
    printf("%c%d\n", i, i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jge    1153 <main+0x43>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define void @av_gettime_relative_is_monotonic() {
ret void
}
void add_metadata_to_list() {}


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

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

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

LLVM IR (-O2):
define void @add_metadata_to_list() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *strdup(char *);
void linenoiseHistoryCacheSearchBuf(char **cache, char *buf_data) {
  if (*cache)
    free(*cache);
  *cache = strdup(buf_data);
}


x86 assembly (clang, -O0):
<linenoiseHistoryCacheSearchBuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     114a <linenoiseHistoryCacheSearchBuf+0x2a>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linenoiseHistoryCacheSearchBuf>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1137 <linenoiseHistoryCacheSearchBuf+0x17>
call   1030 <free@plt>
mov    %r14,%rdi
call   1040 <strdup@plt>
mov    %rax,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @linenoiseHistoryCacheSearchBuf(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8**, i8*** %3
%10 = load i8*, i8** %9
%11 = call i32 @free(i8* %10)
br label %12
12: ; preds = %8, %2
%13 = load i8*, i8** %4
%14 = call i8* @strdup(i8* %13)
%15 = load i8**, i8*** %3
store i8* %14, i8** %15
ret void
}

LLVM IR (-O2):
define void @linenoiseHistoryCacheSearchBuf(i8** nocapture %0, i8* nocapture %1) {
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @free(i8* %3)
br label %7
7: ; preds = %5, %2
%8 = tail call i8* @strdup(i8* %1)
store i8* %8, i8** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addone(int **);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int *i;
  *i = 1;
  addone(&i);
  printf("%d\n", *i);
  return 0;
}


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

x86 assembly (clang, -O2):
LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = load i32*, i32** %2
store i32 1, i32* %3
%4 = call i32 @addone(i32** %2)
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ sync();
int sync_main(int argc, char **argv) {
  sync();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @sync_main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @sync()
ret i32 0
}
int main() {
  char s[] = "asdf";
  char s2[] = "asdf";
  s[0] = 'X';
  return s[0] == s2[0];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0xeef(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xeea(%rip),%al
mov    %al,-0x5(%rbp)
mov    0xedd(%rip),%eax
mov    %eax,-0xe(%rbp)
mov    0xed8(%rip),%al
mov    %al,-0xa(%rbp)
movb   $0x58,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
movsbl -0xe(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.s = [5 x i8] c"asdf\00"
@__const.main.s2 = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca [5 x i8]
store i32 0, i32* %1
%4 = bitcast [5 x i8]* %2 to i8*
%5 = bitcast [5 x i8]* %3 to i8*
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
store i8 88, i8* %6
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pr_inf(char *, char const *);
int stress_apparmor_supported(const char *name) {
  pr_inf("%s: stressor will be skipped, "
         "AppArmor is not available\n",
         name);
  return -1;
}


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

x86 assembly (clang, -O2):
<stress_apparmor_supported>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <pr_inf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [57 x i8] c"%s: stressor will be skipped, AppArmor is not available\0A\00"
define i32 @stress_apparmor_supported(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @pr_inf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 -1
}

LLVM IR (-O2):
@.str = [57 x i8] c"%s: stressor will be skipped, AppArmor is not available\0A\00"
define i32 @stress_apparmor_supported(i8* %0) {
%2 = tail call i32 @pr_inf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 -1
}
int system(const char *command) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  delay(100000000);
  (void)(command);
  return -1;
}


x86 assembly (clang, -O0):
<system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
mov    $0x0,%al
call   1040 <delay@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<system>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
xor    %eax,%eax
call   1040 <delay@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.system = [7 x i8] c"system\00"
@.str.1 = [4 x i8] c"()\0A\00"
define i32 @system(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__FUNCTION__.system, i64 0, i64 0))
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
%7 = load i8*, i8** %2
ret i32 -1
}

LLVM IR (-O2):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.system = [7 x i8] c"system\00"
@.str.1 = [4 x i8] c"()\0A\00"
define i32 @system(i8* nocapture readnone %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__FUNCTION__.system, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret i32 -1
}
int startsWith(const char *start, const char *string) {
  char c;
  int i;
  for (i = 0;; i += 1) {
    if ((c = start[i]) == 0)
      return 1;
    if (string[i] != c)
      return 0;
  }
}


x86 assembly (clang, -O0):
<startsWith>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x19(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
jne    1139 <startsWith+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1170 <startsWith+0x70>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x19(%rbp),%ecx
cmp    %ecx,%eax
je     115d <startsWith+0x5d>
movl   $0x0,-0x4(%rbp)
jmp    1170 <startsWith+0x70>
jmp    1162 <startsWith+0x62>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1113 <startsWith+0x13>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<startsWith>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1122 <startsWith+0x22>
xor    %edx,%edx
nopl   (%rax)
cmp    %cl,(%rsi,%rdx,1)
jne    1123 <startsWith+0x23>
movzbl 0x1(%rdi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <startsWith+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @startsWith(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %9
5: ; preds = %9
%6 = getelementptr inbounds i8, i8* %0, i64 %15
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %2, %5
%10 = phi i64 [ %15, %5 ], [ 0, %2 ]
%11 = phi i8 [ %7, %5 ], [ %3, %2 ]
%12 = getelementptr inbounds i8, i8* %1, i64 %10
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, %11
%15 = add nuw i64 %10, 1
br i1 %14, label %5, label %16
16: ; preds = %5, %9, %2
%17 = phi i32 [ 1, %2 ], [ 0, %9 ], [ 1, %5 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ e_mulrr(int, int);
int /*<<< orphan*/ ra_mchange(int, int);
int ra_mgetv(int);
void co_mul(int ra, int rb, int rc) {
  int mab, mc;
  mab = ra_mgetv(rb);
  mc = ra_mgetv(rc);
  ra_mchange(mab, ra);
  e_mulrr(mab, mc);
}


x86 assembly (clang, -O0):
<co_mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <ra_mgetv@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <ra_mgetv@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1050 <ra_mchange@plt>
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1030 <e_mulrr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<co_mul>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %edi,%r14d
mov    %esi,%edi
call   1040 <ra_mgetv@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <ra_mgetv@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    %r14d,%esi
call   1050 <ra_mchange@plt>
mov    %ebp,%edi
mov    %ebx,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <e_mulrr@plt>

LLVM IR (-O0):
define void @co_mul(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %5
%10 = call i32 @ra_mgetv(i32 %9)
store i32 %10, i32* %7
%11 = load i32, i32* %6
%12 = call i32 @ra_mgetv(i32 %11)
store i32 %12, i32* %8
%13 = load i32, i32* %7
%14 = load i32, i32* %4
%15 = call i32 @ra_mchange(i32 %13, i32 %14)
%16 = load i32, i32* %7
%17 = load i32, i32* %8
%18 = call i32 @e_mulrr(i32 %16, i32 %17)
ret void
}

LLVM IR (-O2):
define void @co_mul(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @ra_mgetv(i32 %1)
%5 = tail call i32 @ra_mgetv(i32 %2)
%6 = tail call i32 @ra_mchange(i32 %4, i32 %0)
%7 = tail call i32 @e_mulrr(i32 %4, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_xmalloc() {
  printf("NOT IMPLEMENTED:"
         "pa_xmalloc"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"NOT IMPLEMENTED:pa_xmalloc\0A\00"
define i32 @pa_xmalloc() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [27 x i8] c"NOT IMPLEMENTED:pa_xmalloc\00"
define i32 @pa_xmalloc() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int armPortOpen(void **ptrPort) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @armPortOpen(i8** nocapture readnone %0) {
ret i32 0
}
void gtk_text_buffer_delete_interactive() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_delete_interactive() {
ret void
}
int test_imm_67int8_reg(signed char val) {
  return ((val) & (-0x67 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_67int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff99,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_67int8_reg>:
test   $0x99,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_67int8_reg(i8 signext %0) {
%2 = and i8 %0, -103
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct chunk {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ data_chunk(struct chunk *);
int /*<<< orphan*/ free(int /*<<< orphan*/);
void data_free(struct chunk *chunk) { free(data_chunk(chunk)); }


x86 assembly (clang, -O0):
<data_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <data_chunk@plt>
mov    %eax,%edi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<data_free>:
push   %rax
call   1040 <data_chunk@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.chunk = type { i32 }
define void @data_free(%struct.chunk* %0) {
%2 = tail call i32 @data_chunk(%struct.chunk* %0)
%3 = tail call i32 @free(i32 %2)
ret void
}
float CompDegreesToRadians(float degrees) { return degrees * 0.0174532f; }


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

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

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

LLVM IR (-O2):
define float @CompDegreesToRadians(float %0) {
%2 = fmul float %0, 0x3F91DF4060000000
ret float %2
}
unsigned char *llib_led_edit_next_set(unsigned char *set) {
  while (*set && *set != ':')
    ++set;
  if (*set == ':')
    ++set;
  return set;
}


x86 assembly (clang, -O0):
<llib_led_edit_next_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     112d <llib_led_edit_next_set+0x2d>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x3a,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <llib_led_edit_next_set+0x3d>
jmp    114e <llib_led_edit_next_set+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <llib_led_edit_next_set+0x8>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x3a,%eax
jne    116a <llib_led_edit_next_set+0x6a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<llib_led_edit_next_set>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax),%ecx
test   %cl,%cl
je     1122 <llib_led_edit_next_set+0x22>
cmp    $0x3a,%cl
je     1122 <llib_led_edit_next_set+0x22>
add    $0x1,%rax
jmp    1110 <llib_led_edit_next_set+0x10>
xor    %edx,%edx
cmp    $0x3a,%cl
sete   %dl
add    %rdx,%rax
ret

LLVM IR (-O0):
define i8* @llib_led_edit_next_set(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = icmp ne i32 %11, 58
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = icmp eq i32 %21, 58
br i1 %22, label %23, label %26
23: ; preds = %18
%24 = load i8*, i8** %2
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %2
br label %26
26: ; preds = %23, %18
%27 = load i8*, i8** %2
ret i8* %27
}

LLVM IR (-O2):
define i8* @llib_led_edit_next_set(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 58, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
%8 = icmp eq i8 %4, 58
%9 = zext i1 %8 to i64
%10 = getelementptr i8, i8* %3, i64 %9
ret i8* %10
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void handler(int signal_number, siginfo_t *info, void *p) {
  (void)signal_number;
  (void)info;
  (void)p;
  exit(0);
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<handler>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @handler(i32 %0, i32* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = load i8*, i8** %6
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @handler(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t bsd_ntohs(uint16_t a) {
  return (((uint16_t)(((((((uint16_t)a) >> 8) & 0xff))) |
                      ((((uint16_t)a) & 0xff) << 8))));
}


x86 assembly (clang, -O0):
<bsd_ntohs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bsd_ntohs>:
rol    $0x8,%di
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @bsd_ntohs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = and i32 %4, 255
%6 = load i32, i32* %2
%7 = and i32 %6, 255
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @bsd_ntohs(i32 %0) {
%2 = trunc i32 %0 to i16
%3 = tail call i16 @llvm.bswap.i16(i16 %2)
%4 = zext i16 %3 to i32
ret i32 %4
}
int checkFileExists(char *path) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @checkFileExists(i8* nocapture readnone %0) {
ret i32 0
}
int kgsl_ptpool_init(struct kgsl_ptpool *pool, int ptsize, int entries) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.kgsl_ptpool = type opaque
define i32 @kgsl_ptpool_init(%struct.kgsl_ptpool* %0, i32 %1, i32 %2) {
%4 = alloca %struct.kgsl_ptpool*
%5 = alloca i32
%6 = alloca i32
store %struct.kgsl_ptpool* %0, %struct.kgsl_ptpool** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.kgsl_ptpool = type opaque
define i32 @kgsl_ptpool_init(%struct.kgsl_ptpool* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f(char, int, float, int *, float **, float *);
int main() {
  int a;
  float *b;
  f('z', a, *b, &a, &b, b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%r8
mov    $0x7a,%edi
lea    -0x4(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1030 <f@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xc(%rsp),%rdx
lea    0x10(%rsp),%rcx
mov    $0x7a,%edi
call   1030 <f@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float*
%3 = load i32, i32* %1
%4 = load float*, float** %2
%5 = load float, float* %4
%6 = load float*, float** %2
%7 = call i32 @f(i8 signext 122, i32 %3, float %5, i32* %1, float** %2, float* %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca float*
%3 = bitcast i32* %1 to i8*
%4 = bitcast float** %2 to i8*
%5 = call i32 @f(i8 signext 122, i32 undef, float undef, i32* %1, float** %2, float* undef)
ret i32 0
}
int doubleEquials(double a, double b) {
  double precision = 1e-10;
  if (((a - precision) < b) && ((a + precision) > b)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<doubleEquials>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  0xeea(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1155 <doubleEquials+0x55>
movsd  -0x10(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1155 <doubleEquials+0x55>
movl   $0x1,-0x4(%rbp)
jmp    115c <doubleEquials+0x5c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<doubleEquials>:
movsd  0xef8(%rip),%xmm2
addsd  %xmm0,%xmm2
ucomisd %xmm2,%xmm1
seta   %al
addsd  0xeed(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @doubleEquials(double %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double 1.000000e-10, double* %6
%7 = load double, double* %4
%8 = load double, double* %6
%9 = fsub double %7, %8
%10 = load double, double* %5
%11 = fcmp olt double %9, %10
br i1 %11, label %12, label %19
12: ; preds = %2
%13 = load double, double* %4
%14 = load double, double* %6
%15 = fadd double %13, %14
%16 = load double, double* %5
%17 = fcmp ogt double %15, %16
br i1 %17, label %18, label %19
18: ; preds = %12
store i32 1, i32* %3
br label %20
19: ; preds = %12, %2
store i32 0, i32* %3
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @doubleEquials(double %0, double %1) {
%3 = fadd double %0, -1.000000e-10
%4 = fcmp olt double %3, %1
%5 = fadd double %0, 1.000000e-10
%6 = fcmp ogt double %5, %1
%7 = and i1 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void begin_constraints() {}


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

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

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

LLVM IR (-O2):
define void @begin_constraints() {
ret void
}
int DefaultParamsOverload(int a, int b) { return 2; }


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

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

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

LLVM IR (-O2):
define i32 @DefaultParamsOverload(i32 %0, i32 %1) {
ret i32 2
}
float lerp(float a, float b, float t) { return a + (b - a) * t; }


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

x86 assembly (clang, -O2):
<lerp>:
subss  %xmm0,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @lerp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %4
%10 = fsub float %8, %9
%11 = load float, float* %6
%12 = call float @llvm.fmuladd.f32(float %10, float %11, float %7)
ret float %12
}

LLVM IR (-O2):
define float @lerp(float %0, float %1, float %2) {
%4 = fsub float %1, %0
%5 = tail call float @llvm.fmuladd.f32(float %4, float %2, float %0)
ret float %5
}
/* Variables and functions */
void setup_arg(char *arg, char **ret) {
  size_t *iarg;
  char ***retarg;
  iarg = (size_t *)arg;
  retarg = (char ***)(arg + sizeof(size_t));
  *iarg = 0;
  *retarg = ret;
}


x86 assembly (clang, -O0):
<setup_arg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_arg>:
movq   $0x0,(%rdi)
mov    %rsi,0x8(%rdi)
ret

LLVM IR (-O0):
define void @setup_arg(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
%5 = alloca i64*
%6 = alloca i8***
store i8* %0, i8** %3
store i8** %1, i8*** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
store i64* %8, i64** %5
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 8
%11 = bitcast i8* %10 to i8***
store i8*** %11, i8**** %6
%12 = load i64*, i64** %5
store i64 0, i64* %12
%13 = load i8**, i8*** %4
%14 = load i8***, i8**** %6
store i8** %13, i8*** %14
ret void
}

LLVM IR (-O2):
define void @setup_arg(i8* nocapture writeonly %0, i8** %1) {
%3 = bitcast i8* %0 to i64*
%4 = getelementptr inbounds i8, i8* %0, i64 8
%5 = bitcast i8* %4 to i8***
store i64 0, i64* %3
store i8** %1, i8*** %5
ret void
}
/* Type definitions */
struct nfa_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ kleene_closure_aux(char *, int /*<<< orphan*/,
                                      struct nfa_node *);
int /*<<< orphan*/ nfa_prepare_visit();
void kleene_closure(struct nfa_node *node, char *out) {
  nfa_prepare_visit();
  kleene_closure_aux(out, 0, node);
}


x86 assembly (clang, -O0):
<kleene_closure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <nfa_prepare_visit@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <kleene_closure_aux@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kleene_closure>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %eax,%eax
call   1040 <nfa_prepare_visit@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <kleene_closure_aux@plt>

LLVM IR (-O0):
%struct.nfa_node = type { i32 }
define void @kleene_closure(%struct.nfa_node* %0, i8* %1) {
%3 = alloca %struct.nfa_node*
%4 = alloca i8*
store %struct.nfa_node* %0, %struct.nfa_node** %3
store i8* %1, i8** %4
%5 = call i32 (...) @nfa_prepare_visit()
%6 = load i8*, i8** %4
%7 = load %struct.nfa_node*, %struct.nfa_node** %3
%8 = call i32 @kleene_closure_aux(i8* %6, i32 0, %struct.nfa_node* %7)
ret void
}

LLVM IR (-O2):
%struct.nfa_node = type { i32 }
define void @kleene_closure(%struct.nfa_node* %0, i8* %1) {
%3 = tail call i32 (...) @nfa_prepare_visit()
%4 = tail call i32 @kleene_closure_aux(i8* %1, i32 0, %struct.nfa_node* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ make_filename(long, char *, char *);
long umfpack_zi_load_numeric(void **, char *);
void umf4zlnum_(void **Numeric, long *filenum, long *status) {
  char filename[200];
  make_filename(*filenum, "n", filename);
  *status = umfpack_zi_load_numeric(Numeric, filename);
}


x86 assembly (clang, -O0):
<umf4zlnum_>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    -0xe0(%rbp),%rdx
lea    0xeb4(%rip),%rsi
call   1030 <make_filename@plt>
mov    -0x8(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1040 <umfpack_zi_load_numeric@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umf4zlnum_>:
push   %r15
push   %r14
push   %rbx
sub    $0xd0,%rsp
mov    %rdx,%r14
mov    %rdi,%rbx
mov    (%rsi),%rdi
lea    0xec4(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdx
call   1030 <make_filename@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <umfpack_zi_load_numeric@plt>
mov    %rax,(%r14)
add    $0xd0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"n\00"
define void @umf4zlnum_(i8** %0, i64* %1, i64* %2) {
%4 = alloca i8**
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca [200 x i8]
store i8** %0, i8*** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%8 = load i64*, i64** %5
%9 = load i64, i64* %8
%10 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%11 = call i32 @make_filename(i64 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i8**, i8*** %4
%13 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%14 = call i64 @umfpack_zi_load_numeric(i8** %12, i8* %13)
%15 = load i64*, i64** %6
store i64 %14, i64* %15
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"n\00"
define void @umf4zlnum_(i8** %0, i64* nocapture %1, i64* nocapture writeonly %2) {
%4 = alloca [200 x i8]
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%6 = load i64, i64* %1
%7 = call i32 @make_filename(i64 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %5)
%8 = call i64 @umfpack_zi_load_numeric(i8** %0, i8* %5)
store i64 %8, i64* %2
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t OffsetDiv8(int32_t Offset) {
  if (Offset >= 0) {
    return Offset / 8;
  } else {
    return (Offset - 7) / 8;
  }
}


x86 assembly (clang, -O0):
<OffsetDiv8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1124 <OffsetDiv8+0x24>
mov    -0x8(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1135 <OffsetDiv8+0x35>
mov    -0x8(%rbp),%eax
sub    $0x7,%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<OffsetDiv8>:
lea    -0x7(%rdi),%ecx
test   %edi,%edi
cmovns %edi,%ecx
lea    0x7(%rcx),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0x3,%eax
ret

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

LLVM IR (-O2):
define i32 @OffsetDiv8(i32 %0) {
%2 = icmp sgt i32 %0, -1
%3 = add nsw i32 %0, -7
%4 = select i1 %2, i32 %0, i32 %3
%5 = sdiv i32 %4, 8
ret i32 %5
}
void PyDTrace_FUNCTION_ENTRY(const char *arg0, const char *arg1, int arg2) {}


x86 assembly (clang, -O0):
<PyDTrace_FUNCTION_ENTRY>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @PyDTrace_FUNCTION_ENTRY(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
ret void
}

LLVM IR (-O2):
define void @PyDTrace_FUNCTION_ENTRY(i8* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ COLOR_BLACK;
int /*<<< orphan*/ COLOR_RED;
int /*<<< orphan*/ COLOR_WHITE;
scalar_t__ can_change_color();
int /*<<< orphan*/ init_pair(int, int /*<<< orphan*/, int /*<<< orphan*/);
void init_color_pairs() {
  if (can_change_color()) {
  }
  init_pair(1, COLOR_WHITE, COLOR_BLACK);
  init_pair(2, COLOR_WHITE, COLOR_RED);
}


x86 assembly (clang, -O0):
<init_color_pairs>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <can_change_color@plt>
cmp    $0x0,%rax
je     113a <init_color_pairs+0x1a>
jmp    113a <init_color_pairs+0x1a>
mov    0x2e97(%rip),%rax
mov    (%rax),%esi
mov    0x2e9e(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1030 <init_pair@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%esi
mov    0x2e6a(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%edi
call   1030 <init_pair@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_color_pairs>:
push   %rbx
xor    %eax,%eax
call   1040 <can_change_color@plt>
mov    0x2ea9(%rip),%rbx
mov    (%rbx),%esi
mov    0x2eb0(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1030 <init_pair@plt>
mov    (%rbx),%esi
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%edi
pop    %rbx
jmp    1030 <init_pair@plt>

LLVM IR (-O0):
@COLOR_WHITE = global i32 0
@COLOR_BLACK = global i32 0
@COLOR_RED = global i32 0
define void @init_color_pairs() {
%1 = call i64 (...) @can_change_color()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %4
3: ; preds = %0
br label %4
4: ; preds = %3, %0
%5 = load i32, i32* @COLOR_WHITE
%6 = load i32, i32* @COLOR_BLACK
%7 = call i32 @init_pair(i32 1, i32 %5, i32 %6)
%8 = load i32, i32* @COLOR_WHITE
%9 = load i32, i32* @COLOR_RED
%10 = call i32 @init_pair(i32 2, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@COLOR_WHITE = global i32 0
@COLOR_BLACK = global i32 0
@COLOR_RED = global i32 0
define void @init_color_pairs() {
%1 = tail call i64 (...) @can_change_color()
%2 = load i32, i32* @COLOR_WHITE
%3 = load i32, i32* @COLOR_BLACK
%4 = tail call i32 @init_pair(i32 1, i32 %2, i32 %3)
%5 = load i32, i32* @COLOR_WHITE
%6 = load i32, i32* @COLOR_RED
%7 = tail call i32 @init_pair(i32 2, i32 %5, i32 %6)
ret void
}
/* Type definitions */
struct json_object {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ json_object_new_string(char *);
int /*<<< orphan*/ json_object_object_add(struct json_object *, char *,
                                          int /*<<< orphan*/);
void controller_get_devices(struct json_object *request,
                            struct json_object *response) {
  json_object_object_add(response, "result",
                         json_object_new_string("controller_get_devices"));
}


x86 assembly (clang, -O0):
<controller_get_devices>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    0xec8(%rip),%rdi
call   1030 <json_object_new_string@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
lea    0xeaf(%rip),%rsi
call   1040 <json_object_object_add@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<controller_get_devices>:
push   %rbx
mov    %rsi,%rbx
lea    0xedc(%rip),%rdi
call   1030 <json_object_new_string@plt>
lea    0xec9(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
pop    %rbx
jmp    1040 <json_object_object_add@plt>

LLVM IR (-O0):
%struct.json_object = type { i32 }
@.str = [7 x i8] c"result\00"
@.str.1 = [23 x i8] c"controller_get_devices\00"
define void @controller_get_devices(%struct.json_object* %0, %struct.json_object* %1) {
%3 = alloca %struct.json_object*
%4 = alloca %struct.json_object*
store %struct.json_object* %0, %struct.json_object** %3
store %struct.json_object* %1, %struct.json_object** %4
%5 = load %struct.json_object*, %struct.json_object** %4
%6 = call i32 @json_object_new_string(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @json_object_object_add(%struct.json_object* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
%struct.json_object = type { i32 }
@.str = [7 x i8] c"result\00"
@.str.1 = [23 x i8] c"controller_get_devices\00"
define void @controller_get_devices(%struct.json_object* nocapture readnone %0, %struct.json_object* %1) {
%3 = tail call i32 @json_object_new_string(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @json_object_object_add(%struct.json_object* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int getpid();
int getppid();
int /*<<< orphan*/ printf(char *, int, int, unsigned int);
int /*<<< orphan*/ sleep(int);
int main() {
  unsigned int slot = 0;
  while (1) {
    printf("I am process %d from process %d, Now it's %d.\n", getpid(),
           getppid(), slot);
    slot++;
    sleep(10);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <getppid@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
mov    -0x8(%rbp),%ecx
lea    0xe8a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    %eax,-0x8(%rbp)
mov    $0xa,%edi
call   1060 <sleep@plt>
jmp    1156 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
lea    0xeb5(%rip),%r14
xor    %ebp,%ebp
nopl   (%rax)
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <getppid@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
mov    %ebp,%ecx
call   1040 <printf@plt>
add    $0x1,%ebp
mov    $0xa,%edi
call   1060 <sleep@plt>
jmp    1150 <main+0x10>

LLVM IR (-O0):
@.str = [47 x i8] c"I am process %d from process %d, Now it's %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %0, %3
%4 = call i32 (...) @getpid()
%5 = call i32 (...) @getppid()
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i32 %6)
%8 = load i32, i32* %2
%9 = add i32 %8, 1
store i32 %9, i32* %2
%10 = call i32 @sleep(i32 10)
br label %3
}

LLVM IR (-O2):
@.str = [47 x i8] c"I am process %d from process %d, Now it's %d.\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i32 (...) @getpid()
%4 = tail call i32 (...) @getppid()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4, i32 %2)
%6 = add i32 %2, 1
%7 = tail call i32 @sleep(i32 10)
br label %1
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void greenLEDToggle(void) { (*((volatile uint32_t *)0x40025020)) ^= 0x08; }


x86 assembly (clang, -O0):
<greenLEDToggle>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40025020,%eax
mov    (%rax),%ecx
xor    $0x8,%ecx
mov    $0x40025020,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<greenLEDToggle>:
xorl   $0x8,0x40025020
08
ret

LLVM IR (-O0):
define void @greenLEDToggle() {
%1 = load volatile i32, i32* inttoptr (i64 1073893408 to i32*)
%2 = xor i32 %1, 8
store volatile i32 %2, i32* inttoptr (i64 1073893408 to i32*)
ret void
}

LLVM IR (-O2):
define void @greenLEDToggle() {
%1 = load volatile i32, i32* inttoptr (i64 1073893408 to i32*)
%2 = xor i32 %1, 8
store volatile i32 %2, i32* inttoptr (i64 1073893408 to i32*)
ret void
}
/* Variables and functions */
int rand();
int get_data_for(int id) { return rand(); }


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

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

LLVM IR (-O0):
define i32 @get_data_for(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
ret i32 %3
}

LLVM IR (-O2):
define i32 @get_data_for(i32 %0) {
%2 = tail call i32 (...) @rand()
ret i32 %2
}