xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ f(int);
int main() {
  int i, x = 0;
  for (i = 0; i < 5; ++i) {
    x += f(i) + i;
  }
#pragma omp taskwait
  assert(x == 25);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1171 <main+0x51>
mov    -0x8(%rbp),%edi
call   1030 <f@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rax,%rcx
movslq -0xc(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <main+0x1d>
cmpl   $0x19,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %edi,%edi
call   1030 <f@plt>
mov    %rax,%r14
mov    $0x1,%edi
call   1030 <f@plt>
mov    %rax,%rbx
add    %r14d,%ebx
mov    $0x2,%edi
call   1030 <f@plt>
mov    %rax,%r14
add    %ebx,%r14d
mov    $0x3,%edi
call   1030 <f@plt>
mov    %rax,%rbx
add    %r14d,%ebx
mov    $0x4,%edi
call   1030 <f@plt>
add    %ebx,%eax
xor    %edi,%edi
cmp    $0xf,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @f(i32 0)
%2 = trunc i64 %1 to i32
%3 = tail call i64 @f(i32 1)
%4 = trunc i64 %3 to i32
%5 = add i32 %2, 1
%6 = add i32 %5, %4
%7 = tail call i64 @f(i32 2)
%8 = trunc i64 %7 to i32
%9 = add i32 %6, 2
%10 = add i32 %9, %8
%11 = tail call i64 @f(i32 3)
%12 = trunc i64 %11 to i32
%13 = add i32 %10, 3
%14 = add i32 %13, %12
%15 = tail call i64 @f(i32 4)
%16 = trunc i64 %15 to i32
%17 = add i32 %14, 4
%18 = add i32 %17, %16
%19 = icmp eq i32 %18, 25
%20 = zext i1 %19 to i32
%21 = tail call i32 @assert(i32 %20)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void destroy_screen(void) { endwin(); }


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

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

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

LLVM IR (-O2):
define void @destroy_screen() {
%1 = tail call i32 (...) @endwin()
ret void
}
lighting(b) int b;
{
  if (b)
    lmbind(1200, 1);
  else
    lmbind(1200, 0);
}


x86 assembly (clang, -O0):
<lighting>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     113b <lighting+0x2b>
mov    $0x4b0,%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <lmbind@plt>
jmp    1149 <lighting+0x39>
mov    $0x4b0,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <lmbind@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lighting>:
xor    %esi,%esi
test   %edi,%edi
setne  %sil
mov    $0x4b0,%edi
xor    %eax,%eax
jmp    1030 <lmbind@plt>

LLVM IR (-O0):
define i32 @lighting(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (i32, i32, ...) bitcast (i32 (...)* @lmbind to i32 (i32, i32, ...)*)(i32 1200, i32 1)
br label %10
8: ; preds = %1
%9 = call i32 (i32, i32, ...) bitcast (i32 (...)* @lmbind to i32 (i32, i32, ...)*)(i32 1200, i32 0)
br label %10
10: ; preds = %8, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @lighting(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @lmbind to i32 (i32, i32, ...)*)(i32 1200, i32 %3)
ret i32 undef
}
/* Variables and functions */
scalar_t__ strchr(char const *, char);
char *CMUTIL_StrSkipSpaces(char *line, const char *spaces) {
  register char *p = line;
  while (*p && strchr(spaces, *p))
    p++;
  return p;
}


x86 assembly (clang, -O0):
<CMUTIL_StrSkipSpaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     1157 <CMUTIL_StrSkipSpaces+0x47>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
movsbl (%rax),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1167 <CMUTIL_StrSkipSpaces+0x57>
jmp    1178 <CMUTIL_StrSkipSpaces+0x68>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <CMUTIL_StrSkipSpaces+0x18>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CMUTIL_StrSkipSpaces>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     113c <CMUTIL_StrSkipSpaces+0x2c>
mov    %rsi,%r14
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <strchr@plt>
test   %rax,%rax
je     113c <CMUTIL_StrSkipSpaces+0x2c>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <CMUTIL_StrSkipSpaces+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @CMUTIL_StrSkipSpaces(i8* %0, i8* %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %10
%6 = phi i8 [ %12, %10 ], [ %3, %2 ]
%7 = phi i8* [ %11, %10 ], [ %0, %2 ]
%8 = tail call i64 @strchr(i8* %1, i8 signext %6)
%9 = icmp eq i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %10, %2
%15 = phi i8* [ %0, %2 ], [ %11, %10 ], [ %7, %5 ]
ret i8* %15
}
void ndisc_snoop_deinit(struct hostapd_data *hapd) {}


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

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

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

LLVM IR (-O2):
%struct.hostapd_data = type opaque
define void @ndisc_snoop_deinit(%struct.hostapd_data* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void verify(bool condition) {
  if (condition) {
    printf(" PASS\n");
  } else {
    printf(" FAIL!\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<verify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1146 <verify+0x26>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
jmp    115c <verify+0x3c>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify>:
test   %edi,%edi
je     1130 <verify+0x10>
lea    0xedc(%rip),%rdi
jmp    1030 <puts@plt>
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@str = [7 x i8] c" FAIL!\00"
@str.2 = [6 x i8] c" PASS\00"
define void @verify(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.2, i64 0, i64 0))
ret void
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int strlen(char *str) {
  if (!str) {
    return 0;
  }
  char *ptr = str;
  while (*str) {
    ++str;
  }
  return str - ptr;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <strlen+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1153 <strlen+0x53>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <strlen+0x45>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1127 <strlen+0x27>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
test   %rdi,%rdi
je     111d <strlen+0x1d>
mov    $0xffffffff,%eax
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %7, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = ptrtoint i8* %4 to i64
%10 = ptrtoint i8* %0 to i64
%11 = sub i64 %9, %10
%12 = trunc i64 %11 to i32
br label %13
13: ; preds = %1, %8
%14 = phi i32 [ %12, %8 ], [ 0, %1 ]
ret i32 %14
}
const char *test_1_get_description(void) {
  return "Create a directory named test_1_test_dir_pid, where "
         "pid is the process id.  Within that directory, "
         "create a big file (approx. half the file system in size), "
         "open it, and unlink it. "
         "Create many smaller files until the file system is full. "
         "Check the big file is ok. "
         "Delete all the smaller files. "
         "Check the big file again. "
         "Finally delete the big file and directory.";
}


x86 assembly (clang, -O0):
<test_1_get_description>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_1_get_description>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [363 x i8] c"Create a directory named test_1_test_dir_pid, where pid is the process id. Within that directory, create a big file (approx. half the file system in size), open it, and unlink it. Create many smaller files until the file system is full. Check the big file is ok. Delete all the smaller files. Check the big file again. Finally delete the big file and directory.\00"
define i8* @test_1_get_description() {
ret i8* getelementptr inbounds ([363 x i8], [363 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [363 x i8] c"Create a directory named test_1_test_dir_pid, where pid is the process id. Within that directory, create a big file (approx. half the file system in size), open it, and unlink it. Create many smaller files until the file system is full. Check the big file is ok. Delete all the smaller files. Check the big file again. Finally delete the big file and directory.\00"
define i8* @test_1_get_description() {
ret i8* getelementptr inbounds ([363 x i8], [363 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main(int argc, char *argv[]) {
  int res, res2 = 0;
#pragma acc parallel num_gangs(GANGS) copy(res2)
  {
#pragma acc atomic
    res2 += 5;
  }
  res = 256 * 5;
  assert(res == res2);
  res = res2 = 1;
#pragma acc parallel num_gangs(GANGS) copy(res2)
  {
#pragma acc atomic
    res2 *= 5;
  }
  for (int i = 0; i < 8; ++i)
    res *= 5;
  assert(res == res2);
  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)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x18(%rbp)
movl   $0x500,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x1,-0x18(%rbp)
movl   $0x1,-0x14(%rbp)
imul   $0x5,-0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x8,-0x1c(%rbp)
jge    118b <main+0x7b>
imul   $0x5,-0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    116c <main+0x5c>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @assert(i32 0)
%4 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_length_current_multprec_solution_string(int *cursor, int *n) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(528, cursor, n, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<solcon_length_current_multprec_solution_string>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x210,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @solcon_length_current_multprec_solution_string(i32* %0, i32* %1) {
%3 = tail call i32 @_ada_use_c2phc4c(i32 528, i32* %0, i32* %1, double* undef, i32 0)
ret i32 %3
}
int foo() { return 10; }


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

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

LLVM IR (-O0):
define i32 @foo() {
ret i32 10
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 10
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void sys_panic(const char *plaint) {
  fprintf(stderr, "%s: %s\n", plaint, strerror(errno));
  exit(1);
}


x86 assembly (clang, -O0):
<sys_panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %rax,%rcx
lea    0xe91(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sys_panic>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%ebp
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xeac(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@errno = global i32 0
define void @sys_panic(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @errno
%4 = tail call i8* @strerror(i32 %3)
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %4)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ funcA(int);
int /*<<< orphan*/ funcB(int);
int /*<<< orphan*/ funcD(int /*<<< orphan*/);
int func(int a, int b, int c) {
  funcD(funcA(a + b));
  funcB(b);
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%edi
add    -0xc(%rbp),%edi
call   1030 <funcA@plt>
mov    %eax,%edi
call   1050 <funcD@plt>
mov    -0xc(%rbp),%edi
call   1040 <funcB@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
push   %rbx
mov    %esi,%ebx
add    %esi,%edi
call   1030 <funcA@plt>
mov    %eax,%edi
call   1050 <funcD@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <funcB@plt>

LLVM IR (-O0):
define i32 @func(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = add nsw i32 %8, %9
%11 = call i32 @funcA(i32 %10)
%12 = call i32 @funcD(i32 %11)
%13 = load i32, i32* %6
%14 = call i32 @funcB(i32 %13)
%15 = load i32, i32* %4
ret i32 %15
}

LLVM IR (-O2):
define i32 @func(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = tail call i32 @funcA(i32 %4)
%6 = tail call i32 @funcD(i32 %5)
%7 = tail call i32 @funcB(i32 %1)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("\nC Virtual Machine - By Eudis Duran (Spring 2011 Semester Project)\n"
         "\nUsage: cvm <program-file>\n\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 = [96 x i8] c"\0AC Virtual Machine - By Eudis Duran (Spring 2011 Semester Project)\0A\0AUsage: cvm <program-file>\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [95 x i8] c"\0AC Virtual Machine - By Eudis Duran (Spring 2011 Semester Project)\0A\0AUsage: cvm <program-file>\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main() {
  volatile float x = 1e-20;
  volatile float y = (-x);
  volatile float z = 5.0;
  float w = (y + z) - z;
  printf("%e\n", w);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xee4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xebc(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x1e3ce508,0x14(%rsp)
1e
movss  0x14(%rsp),%xmm0
xorps  0xed7(%rip),%xmm0
movss  %xmm0,0x10(%rsp)
movl   $0x40a00000,0xc(%rsp)
40
movss  0x10(%rsp),%xmm0
addss  0xc(%rsp),%xmm0
subss  0xc(%rsp),%xmm0
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%e\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
store volatile float 0x3BC79CA100000000, float* %1
%5 = load volatile float, float* %1
%6 = fneg float %5
store volatile float %6, float* %2
store volatile float 5.000000e+00, float* %3
%7 = load volatile float, float* %2
%8 = load volatile float, float* %3
%9 = fadd float %7, %8
%10 = load volatile float, float* %3
%11 = fsub float %9, %10
store float %11, float* %4
%12 = load float, float* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%e\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
store volatile float 0x3BC79CA100000000, float* %1
%5 = bitcast float* %2 to i8*
%6 = load volatile float, float* %1
%7 = fneg float %6
store volatile float %7, float* %2
%8 = bitcast float* %3 to i8*
store volatile float 5.000000e+00, float* %3
%9 = load volatile float, float* %2
%10 = load volatile float, float* %3
%11 = fadd float %9, %10
%12 = load volatile float, float* %3
%13 = fsub float %11, %12
%14 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LedsP__Leds__led1Toggle();
void DummyNotificationReceiverP__Leds__led1Toggle(void) {
  LedsP__Leds__led1Toggle();
}


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

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

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

LLVM IR (-O2):
define void @DummyNotificationReceiverP__Leds__led1Toggle() {
%1 = tail call i32 (...) @LedsP__Leds__led1Toggle()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ TIOCSPGRP;
int __ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/ *);
int tcsetpgrp(int fd, pid_t pgrp_id) {
  return __ioctl(fd, TIOCSPGRP, &pgrp_id);
}


x86 assembly (clang, -O0):
<tcsetpgrp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <__ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcsetpgrp>:
push   %rax
mov    %esi,0x4(%rsp)
mov    0x2ec4(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <__ioctl@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
@TIOCSPGRP = global i32 0
define i32 @tcsetpgrp(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = load i32, i32* @TIOCSPGRP
%5 = call i32 @__ioctl(i32 %0, i32 %4, i32* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 963;
  int b = 369;
  int c;
  c = a - b;
  printf("%d", c);
  return 0;
}


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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 594)
ret i32 0
}
int guac_terminal_fit_to_range(int value, int min, int max) {
  if (value < min)
    return min;
  if (value > max)
    return max;
  return value;
}


x86 assembly (clang, -O0):
<guac_terminal_fit_to_range>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1124 <guac_terminal_fit_to_range+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <guac_terminal_fit_to_range+0x41>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    113b <guac_terminal_fit_to_range+0x3b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <guac_terminal_fit_to_range+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<guac_terminal_fit_to_range>:
mov    %edx,%eax
cmp    %edx,%edi
cmovle %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @guac_terminal_fit_to_range(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
void networkSendCommand(int major, int minor) {}


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

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

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

LLVM IR (-O2):
define void @networkSendCommand(i32 %0, i32 %1) {
ret void
}
int fun798() { return 798; }


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

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

LLVM IR (-O0):
define i32 @fun798() {
ret i32 798
}

LLVM IR (-O2):
define i32 @fun798() {
ret i32 798
}
/* Type definitions */
struct cras_expr_value {
  int dummy;
};
struct cras_expr_env {
  int dummy;
};

/* Variables and functions */
struct cras_expr_value *find_or_insert_value(struct cras_expr_env *,
                                             char const *);
int /*<<< orphan*/ value_set_boolean(struct cras_expr_value *, char);
void cras_expr_env_set_variable_boolean(struct cras_expr_env *env,
                                        const char *name, char boolean) {
  struct cras_expr_value *value = find_or_insert_value(env, name);
  value_set_boolean(value, boolean);
}


x86 assembly (clang, -O0):
<cras_expr_env_set_variable_boolean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <find_or_insert_value@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
movsbl -0x11(%rbp),%esi
call   1030 <value_set_boolean@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cras_expr_env_set_variable_boolean>:
push   %rbx
mov    %edx,%ebx
call   1040 <find_or_insert_value@plt>
mov    %rax,%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <value_set_boolean@plt>

LLVM IR (-O0):
%struct.cras_expr_env = type { i32 }
%struct.cras_expr_value = type { i32 }
define void @cras_expr_env_set_variable_boolean(%struct.cras_expr_env* %0, i8* %1, i8 signext %2) {
%4 = alloca %struct.cras_expr_env*
%5 = alloca i8*
%6 = alloca i8
%7 = alloca %struct.cras_expr_value*
store %struct.cras_expr_env* %0, %struct.cras_expr_env** %4
store i8* %1, i8** %5
store i8 %2, i8* %6
%8 = load %struct.cras_expr_env*, %struct.cras_expr_env** %4
%9 = load i8*, i8** %5
%10 = call %struct.cras_expr_value* @find_or_insert_value(%struct.cras_expr_env* %8, i8* %9)
store %struct.cras_expr_value* %10, %struct.cras_expr_value** %7
%11 = load %struct.cras_expr_value*, %struct.cras_expr_value** %7
%12 = load i8, i8* %6
%13 = call i32 @value_set_boolean(%struct.cras_expr_value* %11, i8 signext %12)
ret void
}

LLVM IR (-O2):
%struct.cras_expr_env = type { i32 }
%struct.cras_expr_value = type { i32 }
define void @cras_expr_env_set_variable_boolean(%struct.cras_expr_env* %0, i8* %1, i8 signext %2) {
%4 = tail call %struct.cras_expr_value* @find_or_insert_value(%struct.cras_expr_env* %0, i8* %1)
%5 = tail call i32 @value_set_boolean(%struct.cras_expr_value* %4, i8 signext %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(char *, int, int /*<<< orphan*/,
                          int /*<<< orphan*/ *);
int /*<<< orphan*/ strlen(char *);
void KAPI_save_as_header_name(FILE *fp, char *pch) {
  FILE *fpTmp = fp;
  fwrite(pch, sizeof(char), strlen(pch), fp);
}


x86 assembly (clang, -O0):
<KAPI_save_as_header_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%edx
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KAPI_save_as_header_name>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %eax,%edx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
define void @KAPI_save_as_header_name(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32*
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i32*, i32** %3
store i32* %6, i32** %5
%7 = load i8*, i8** %4
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
%10 = load i32*, i32** %3
%11 = call i32 @fwrite(i8* %7, i32 1, i32 %9, i32* %10)
ret void
}

LLVM IR (-O2):
define void @KAPI_save_as_header_name(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @fwrite(i8* %1, i32 1, i32 %3, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ find_config();
int /*<<< orphan*/ handle_opts(int, char **);
int /*<<< orphan*/ open_url();
int /*<<< orphan*/ parse(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  parse(find_config());
  handle_opts(argc, argv);
  open_url();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1050 <find_config@plt>
mov    %eax,%edi
call   1060 <parse@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <handle_opts@plt>
xor    %eax,%eax
call   1040 <open_url@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @find_config()
%7 = call i32 @parse(i32 %6)
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @handle_opts(i32 %8, i8** %9)
%11 = call i32 (...) @open_url()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @find_config()
%4 = tail call i32 @parse(i32 %3)
%5 = tail call i32 @handle_opts(i32 %0, i8** %1)
%6 = tail call i32 (...) @open_url()
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int);
int main(void) {
  unsigned int num = 0;
  num = (num & ~0x0070) | 0x0050;
  printf("(dec.) %d - (hex) %#x\n", num, num);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffffff8f,%eax
or     $0x50,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x50,%esi
mov    $0x50,%edx
call   1030 <printf@plt>
mov    0x2eb2(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"(dec.) %d - (hex) %#x\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -113
%5 = or i32 %4, 80
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}

LLVM IR (-O2):
@.str = [23 x i8] c"(dec.) %d - (hex) %#x\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 80, i32 80)
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test_kni(void) {
  printf("The KNI library is not included in this build\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [47 x i8] c"The KNI library is not included in this build\0A\00"
define i32 @test_kni() {
%1 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [46 x i8] c"The KNI library is not included in this build\00"
define i32 @test_kni() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ log_end();
void test_ok() {
  log_end();
  exit(0);
}


x86 assembly (clang, -O0):
<test_ok>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <log_end@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
define void @test_ok() {
%1 = call i32 (...) @log_end()
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @test_ok() {
%1 = tail call i32 (...) @log_end()
%2 = tail call i32 @exit(i32 0)
unreachable
}
void fflt(float *x) { printf("%s(%f)\n", __func__, *x); }


x86 assembly (clang, -O0):
<fflt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xed1(%rip),%rdi
lea    0xed2(%rip),%rsi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fflt>:
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xee1(%rip),%rdi
lea    0xee2(%rip),%rsi
mov    $0x1,%al
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%s(%f)\0A\00"
@__func__.fflt = [5 x i8] c"fflt\00"
define void @fflt(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float, float* %3
%5 = fpext float %4 to double
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.fflt, i64 0, i64 0), double %5)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s(%f)\0A\00"
@__func__.fflt = [5 x i8] c"fflt\00"
define void @fflt(float* nocapture %0) {
%2 = load float, float* %0
%3 = fpext float %2 to double
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.fflt, i64 0, i64 0), double %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *prog) {
  fprintf(stderr,
          "Usage: %s [options] command [arg [arg...]]\n\n"
          "This program tries to run a command and, if the timeout is\n"
          "reached before the command exits, kills that process.\n"
          "Otherwise the errorcode of the command is returned.\n"
          "\noptions:\n"
          " -t timeout  time in seconds to wait before process is killed\n"
          " -d   send log messages to stderr as well as syslog.\n"
          " -h   print this help\n",
          prog);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [357 x i8] c"Usage: %s [options] command [arg [arg...]]\0A\0AThis program tries to run a command and, if the timeout is\0Areached before the command exits, kills that process.\0AOtherwise the errorcode of the command is returned.\0A\0Aoptions:\0A -t timeout time in seconds to wait before process is killed\0A -d send log messages to stderr as well as syslog.\0A -h print this help\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([357 x i8], [357 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [357 x i8] c"Usage: %s [options] command [arg [arg...]]\0A\0AThis program tries to run a command and, if the timeout is\0Areached before the command exits, kills that process.\0AOtherwise the errorcode of the command is returned.\0A\0Aoptions:\0A -t timeout time in seconds to wait before process is killed\0A -d send log messages to stderr as well as syslog.\0A -h print this help\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([357 x i8], [357 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void glutAttachMenu(int button) {}


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

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

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

LLVM IR (-O2):
define void @glutAttachMenu(i32 %0) {
ret void
}
void branch_exit(void *node, void *object, struct node_operations *ops) {}


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

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

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

LLVM IR (-O2):
%struct.node_operations = type opaque
define void @branch_exit(i8* nocapture %0, i8* nocapture %1, %struct.node_operations* nocapture %2) {
ret void
}
void INT_Excep_IRQ13(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_IRQ13() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_settings();
int /*<<< orphan*/ process_command_line(int, char **);
int main(int argc, char *argv[]) {
  process_command_line(argc, argv);
  print_settings();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @process_command_line(i32 %0, i8** %1)
%4 = tail call i32 (...) @print_settings()
ret i32 0
}
/* Type definitions */
typedef scalar_t__ int8_t;

/* Variables and functions */
int8_t max8(int8_t a, int8_t b) { return ((a) < (b) ? (a) : (b)); }


x86 assembly (clang, -O0):
<max8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <max8+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <max8+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max8>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @max8(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @max8(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void demmt_nv_mmiotrace_mark(struct mmt_nvidia_mmiotrace_mark *mark,
                             void *state) {}


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

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

LLVM IR (-O0):
%struct.mmt_nvidia_mmiotrace_mark = type opaque
define void @demmt_nv_mmiotrace_mark(%struct.mmt_nvidia_mmiotrace_mark* %0, i8* %1) {
%3 = alloca %struct.mmt_nvidia_mmiotrace_mark*
%4 = alloca i8*
store %struct.mmt_nvidia_mmiotrace_mark* %0, %struct.mmt_nvidia_mmiotrace_mark** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.mmt_nvidia_mmiotrace_mark = type opaque
define void @demmt_nv_mmiotrace_mark(%struct.mmt_nvidia_mmiotrace_mark* nocapture %0, i8* nocapture %1) {
ret void
}