xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ __VERIFIER_nondet_int();
int main_test() {
  int x = 0;
  int y = 0;
  int z = 0;
  int w = 0;
  while (__VERIFIER_nondet_int()) {
    if (0) {
      x++;
      y = y + 100;
    } else if (1) {
      if (x >= 4) {
        x = x + 1;
        y = y + 1;
      }
    } else if (y > 10 * w)
      if (z >= 100 * x) {
        y = -y;
      }
    w = w + 1;
    z = z + 10;
  }
  return 1;
}


x86 assembly (clang, -O0):
<main_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%rax
je     1178 <main_test+0x68>
cmpl   $0x4,-0x4(%rbp)
jl     1161 <main_test+0x51>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <main_test+0x24>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_test>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %rax,%rax
jne    1120 <main_test+0x10>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main_test() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @__VERIFIER_nondet_int()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %1
4: ; preds = %1
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *get_next_line(int);
char *end_parsing(char *buf, int parsed, int fd) {
  if (buf == NULL)
    return (NULL);
  if (buf != NULL && parsed == 0) {
    free(buf);
    return (get_next_line(fd));
  }
  return (buf);
}


x86 assembly (clang, -O0):
<end_parsing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114a <end_parsing+0x2a>
movq   $0x0,-0x8(%rbp)
jmp    1181 <end_parsing+0x61>
cmpq   $0x0,-0x10(%rbp)
je     1179 <end_parsing+0x59>
cmpl   $0x0,-0x14(%rbp)
jne    1179 <end_parsing+0x59>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%edi
call   1040 <get_next_line@plt>
mov    %rax,-0x8(%rbp)
jmp    1181 <end_parsing+0x61>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_parsing>:
test   %rdi,%rdi
je     112d <end_parsing+0xd>
test   %esi,%esi
je     1133 <end_parsing+0x13>
mov    %rdi,%rax
ret
xor    %edi,%edi
mov    %rdi,%rax
ret
push   %rbx
mov    %edx,%ebx
call   1030 <free@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <get_next_line@plt>

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

LLVM IR (-O2):
define i8* @end_parsing(i8* %0, i32 %1, i32 %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = icmp eq i32 %1, 0
br i1 %6, label %7, label %10
7: ; preds = %5
%8 = tail call i32 @free(i8* %0)
%9 = tail call i8* @get_next_line(i32 %2)
br label %10
10: ; preds = %5, %3, %7
%11 = phi i8* [ %9, %7 ], [ null, %3 ], [ %0, %5 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printHeader() {
  printf("------------------------------------\n");
  printf("            smbusb_comm\n");
  printf("------------------------------------\n");
}


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

x86 assembly (clang, -O2):
<printHeader>:
push   %rbx
lea    0xf00(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"------------------------------------\0A\00"
@.str.1 = [25 x i8] c" smbusb_comm\0A\00"
define void @printHeader() {
%1 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str.2 = [24 x i8] c" smbusb_comm\00"
@str.3 = [37 x i8] c"------------------------------------\00"
define void @printHeader() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.3, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ destroy(int *);
void dispose_local() {
  int x = 0;
  destroy(&x);
}


x86 assembly (clang, -O0):
<dispose_local>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <destroy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dispose_local>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <destroy@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @dispose_local() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @destroy(i32* %1)
ret void
}
__attribute__((weak, section(".after_vectors"))) void
SecureFault_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<SecureFault_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <SecureFault_Handler+0x9>
jmp    1109 <SecureFault_Handler+0x9>

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

LLVM IR (-O0):
define weak void @SecureFault_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define weak void @SecureFault_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ print_array(int, char **, char);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(int argc, char *argv[]) {
  char s;
  printf("Separator: ");
  scanf("%c", &s);
  print_array(argc, argv, s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    0xeba(%rip),%rdi
lea    -0x11(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
movsbl -0x11(%rbp),%edx
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
movsbl 0x7(%rsp),%edx
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Separator: \00"
@.str.1 = [3 x i8] c"%c\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%8 = load i32, i32* %3
%9 = load i8**, i8*** %4
%10 = load i8, i8* %5
%11 = call i32 @print_array(i32 %8, i8** %9, i8 signext %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Separator: \00"
@.str.1 = [3 x i8] c"%c\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i8
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%6 = load i8, i8* %3
%7 = call i32 @print_array(i32 %0, i8** %1, i8 signext %6)
ret i32 0
}
/* Variables and functions */
int memcmp(void const *, void const *, int);
int compl_lesscomp(const void *s1, const void *s2) {
  return memcmp(s1, s2, 4096);
}


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

x86 assembly (clang, -O2):
<compl_lesscomp>:
mov    $0x1000,%edx
jmp    1030 <memcmp@plt>

LLVM IR (-O0):
define i32 @compl_lesscomp(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** %4
%7 = call i32 @memcmp(i8* %5, i8* %6, i32 4096)
ret i32 %7
}

LLVM IR (-O2):
define i32 @compl_lesscomp(i8* %0, i8* %1) {
%3 = tail call i32 @memcmp(i8* %0, i8* %1, i32 4096)
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ getpgrp();
scalar_t__ getpid();
int /*<<< orphan*/ setpgid(scalar_t__, scalar_t__);
pid_t setpgrp(void) {
  pid_t pgid = getpgrp();
  pid_t pid = getpid();
  if (pgid != pid)
    setpgid(pid, pid);
  return pid;
}


x86 assembly (clang, -O0):
<setpgrp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getpgrp@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1169 <setpgrp+0x39>
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <setpgid@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setpgrp>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getpgrp@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %rax,%rbx
cmp    %rax,%r14
je     1158 <setpgrp+0x28>
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1050 <setpgid@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @setpgrp() {
%1 = alloca i64
%2 = alloca i64
%3 = call i64 (...) @getpgrp()
store i64 %3, i64* %1
%4 = call i64 (...) @getpid()
store i64 %4, i64* %2
%5 = load i64, i64* %1
%6 = load i64, i64* %2
%7 = icmp ne i64 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %0
%9 = load i64, i64* %2
%10 = load i64, i64* %2
%11 = call i32 @setpgid(i64 %9, i64 %10)
br label %12
12: ; preds = %8, %0
%13 = load i64, i64* %2
ret i64 %13
}

LLVM IR (-O2):
define i64 @setpgrp() {
%1 = tail call i64 (...) @getpgrp()
%2 = tail call i64 (...) @getpid()
%3 = icmp eq i64 %1, %2
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @setpgid(i64 %2, i64 %2)
br label %6
6: ; preds = %4, %0
ret i64 %2
}
/* Variables and functions */
bool is_name_char(char ch) {
  return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') ||
         (ch >= '0' && ch <= '9') || ch == '_';
}


x86 assembly (clang, -O0):
<is_name_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1129 <is_name_char+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jle    1174 <is_name_char+0x74>
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1148 <is_name_char+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    1174 <is_name_char+0x74>
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1167 <is_name_char+0x67>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    1174 <is_name_char+0x74>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_name_char>:
mov    %edi,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
setb   %al
lea    -0x30(%rdi),%ecx
cmp    $0xa,%cl
setb   %cl
cmp    $0x5f,%dil
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @is_name_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %30, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 90
br i1 %17, label %30, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sge i32 %20, 48
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 57
br i1 %25, label %30, label %26
26: ; preds = %22, %18
%27 = load i8, i8* %2
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 95
br label %30
30: ; preds = %26, %22, %14, %6
%31 = phi i1 [ true, %22 ], [ true, %14 ], [ true, %6 ], [ %29, %26 ]
%32 = zext i1 %31 to i32
ret i32 %32
}

LLVM IR (-O2):
define i32 @is_name_char(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = add i8 %0, -48
%6 = icmp ult i8 %5, 10
%7 = or i1 %6, %4
%8 = icmp eq i8 %0, 95
%9 = or i1 %8, %7
%10 = zext i1 %9 to i32
ret i32 %10
}
short anterior(elem, lim)
short elem, lim;
{ return (elem == 0) ? lim : --elem; }


x86 assembly (clang, -O0):
<anterior>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%cx
mov    %si,%ax
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
jne    112b <anterior+0x2b>
movswl -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    113b <anterior+0x3b>
mov    -0x2(%rbp),%ax
add    $0xffff,%ax
mov    %ax,-0x2(%rbp)
cwtl
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<anterior>:
shl    $0x10,%esi
mov    %edi,%eax
shl    $0x10,%eax
add    $0xffff0000,%eax
test   %di,%di
cmove  %esi,%eax
shr    $0x10,%eax
ret

LLVM IR (-O0):
define signext i16 @anterior(i32 %0, i32 %1) {
%3 = alloca i16
%4 = alloca i16
%5 = trunc i32 %0 to i16
%6 = trunc i32 %1 to i16
store i16 %5, i16* %3
store i16 %6, i16* %4
%7 = load i16, i16* %3
%8 = sext i16 %7 to i32
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i16, i16* %4
%12 = sext i16 %11 to i32
br label %17
13: ; preds = %2
%14 = load i16, i16* %3
%15 = add i16 %14, -1
store i16 %15, i16* %3
%16 = sext i16 %15 to i32
br label %17
17: ; preds = %13, %10
%18 = phi i32 [ %12, %10 ], [ %16, %13 ]
%19 = trunc i32 %18 to i16
ret i16 %19
}

LLVM IR (-O2):
define signext i16 @anterior(i32 %0, i32 %1) {
%3 = and i32 %0, 65535
%4 = icmp eq i32 %3, 0
%5 = shl i32 %1, 16
%6 = shl i32 %0, 16
%7 = add i32 %6, -65536
%8 = select i1 %4, i32 %5, i32 %7
%9 = lshr exact i32 %8, 16
%10 = trunc i32 %9 to i16
ret i16 %10
}
void gtk_entry_completion_set_popup_completion() {}


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

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

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

LLVM IR (-O2):
define void @gtk_entry_completion_set_popup_completion() {
ret void
}
void NANDCommandWrite(unsigned int cmdRegAddr, unsigned int cmd) {
  (*(volatile unsigned char *)(cmdRegAddr)) = cmd;
}


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

x86 assembly (clang, -O2):
<NANDCommandWrite>:
mov    %edi,%eax
mov    %sil,(%rax)
ret

LLVM IR (-O0):
define void @NANDCommandWrite(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = trunc i32 %5 to i8
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
store volatile i8 %6, i8* %9
ret void
}

LLVM IR (-O2):
define void @NANDCommandWrite(i32 %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = zext i32 %0 to i64
%5 = inttoptr i64 %4 to i8*
store volatile i8 %3, i8* %5
ret void
}
int fun821() { return 821; }


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

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

LLVM IR (-O0):
define i32 @fun821() {
ret i32 821
}

LLVM IR (-O2):
define i32 @fun821() {
ret i32 821
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_eval(int);
void *alloca(int);
void test_12(void) {
  void *p = alloca(256);
  void *q = alloca(256);
  __analyzer_eval(p == q);
}


x86 assembly (clang, -O0):
<test_12>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x100,%edi
call   1040 <alloca@plt>
mov    %rax,-0x8(%rbp)
mov    $0x100,%edi
call   1040 <alloca@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_12>:
push   %rbx
mov    $0x100,%edi
call   1040 <alloca@plt>
mov    %rax,%rbx
mov    $0x100,%edi
call   1040 <alloca@plt>
xor    %edi,%edi
cmp    %rax,%rbx
sete   %dil
pop    %rbx
jmp    1030 <__analyzer_eval@plt>

LLVM IR (-O0):
define void @test_12() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @alloca(i32 256)
store i8* %3, i8** %1
%4 = call i8* @alloca(i32 256)
store i8* %4, i8** %2
%5 = load i8*, i8** %1
%6 = load i8*, i8** %2
%7 = icmp eq i8* %5, %6
%8 = zext i1 %7 to i32
%9 = call i32 @__analyzer_eval(i32 %8)
ret void
}

LLVM IR (-O2):
define void @test_12() {
%1 = tail call i8* @alloca(i32 256)
%2 = tail call i8* @alloca(i32 256)
%3 = icmp eq i8* %1, %2
%4 = zext i1 %3 to i32
%5 = tail call i32 @__analyzer_eval(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void *calloc(size_t, size_t);
int /*<<< orphan*/ no_space();
void *allocate(size_t n) {
  void *p;
  p = NULL;
  if (n) {
    p = (calloc((size_t)(1), (size_t)(n)));
    if (p == 0)
      no_space();
    assert(p != 0);
  }
  return (p);
}


x86 assembly (clang, -O0):
<allocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1185 <allocate+0x55>
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <allocate+0x43>
mov    $0x0,%al
call   1030 <no_space@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocate>:
push   %rbx
test   %rdi,%rdi
je     1162 <allocate+0x32>
mov    %rdi,%rsi
mov    $0x1,%edi
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1152 <allocate+0x22>
xor    %eax,%eax
call   1030 <no_space@plt>
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1050 <assert@plt>
jmp    1164 <allocate+0x34>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @allocate(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
store i8* null, i8** %3
%4 = load i64, i64* %2
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %18
6: ; preds = %1
%7 = load i64, i64* %2
%8 = call i8* @calloc(i64 1, i64 %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %6
%12 = call i32 (...) @no_space()
br label %13
13: ; preds = %11, %6
%14 = load i8*, i8** %3
%15 = icmp ne i8* %14, null
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
br label %18
18: ; preds = %13, %1
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
define noalias i8* @allocate(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = tail call i8* @calloc(i64 1, i64 %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 (...) @no_space()
br label %8
8: ; preds = %6, %3
%9 = icmp ne i8* %4, null
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
br label %12
12: ; preds = %8, %1
%13 = phi i8* [ %4, %8 ], [ null, %1 ]
ret i8* %13
}
/* Variables and functions */
int /*<<< orphan*/ emit_string(char *);
void event_acciaccatura() { emit_string("/"); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define void @event_acciaccatura() {
%1 = tail call i32 @emit_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char **str_split(char *, char *, int *);
char *extract_host(char *string) {
  int x;
  char **strings = str_split(string, ":", &x);
  return strings[0];
}


x86 assembly (clang, -O0):
<extract_host>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <str_split@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_host>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <str_split@plt>
mov    (%rax),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c":\00"
define i8* @extract_host(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i8** @str_split(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i8*, i8** %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage(char **argv) {
  fprintf(stderr, "usage: %s <image-filename>\n", argv[0]);
  fprintf(stderr, "\n");
}


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),%rax
mov    (%rax),%rdx
lea    0xecd(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
lea    0xed0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%eax
mov    (%rdi),%rdx
lea    0xedc(%rip),%rsi
mov    %eax,%edi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xee4(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"usage: %s <image-filename>\0A\00"
@.str.1 = [2 x i8] c"\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 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"usage: %s <image-filename>\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @usage(i8** nocapture %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %0
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_write(char *, int /*<<< orphan*/);
int log_warning(char *msg) { log_write(msg, 0); }


x86 assembly (clang, -O0):
<log_warning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <log_write@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_warning>:
xor    %esi,%esi
jmp    1030 <log_write@plt>

LLVM IR (-O0):
define i32 @log_warning(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @log_write(i8* %4, i32 0)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @log_warning(i8* %0) {
%2 = tail call i32 @log_write(i8* %0, i32 0)
ret i32 undef
}
void entry(void) {}


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

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

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

LLVM IR (-O2):
define void @entry() {
ret void
}
void str2pvec(cptr, iptr) char *cptr;
int *iptr;
{
  while ((*iptr++ = (0377 & *cptr++)))
    ;
  *(--iptr) = (-1);
}


x86 assembly (clang, -O0):
<str2pvec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
and    $0xff,%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %eax,(%rcx)
cmp    $0x0,%eax
je     1142 <str2pvec+0x42>
jmp    110c <str2pvec+0xc>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x10(%rbp)
movl   $0xffffffff,-0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<str2pvec>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
mov    %ecx,(%rsi,%rax,4)
add    $0x1,%rax
test   %ecx,%ecx
jne    1110 <str2pvec+0x10>
movl   $0xffffffff,-0x4(%rsi,%rax,4)
ff
ret

LLVM IR (-O0):
define void @str2pvec(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
br label %5
5: ; preds = %14, %2
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %3
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
%10 = and i32 255, %9
%11 = load i32*, i32** %4
%12 = getelementptr inbounds i32, i32* %11, i32 1
store i32* %12, i32** %4
store i32 %10, i32* %11
%13 = icmp ne i32 %10, 0
br i1 %13, label %14, label %15
14: ; preds = %5
br label %5
15: ; preds = %5
%16 = load i32*, i32** %4
%17 = getelementptr inbounds i32, i32* %16, i32 -1
store i32* %17, i32** %4
store i32 -1, i32* %17
ret void
}

LLVM IR (-O2):
define void @str2pvec(i8* nocapture %0, i32* nocapture writeonly %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %6, %3 ]
%5 = phi i32* [ %1, %2 ], [ %9, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = getelementptr inbounds i32, i32* %5, i64 1
store i32 %8, i32* %5
%10 = icmp eq i8 %7, 0
br i1 %10, label %11, label %3
11: ; preds = %3
store i32 -1, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ rotate(char *, int);
void main() {
  char str[] = "abcdef";
  rotate(str, 3);
  printf("%s\n", str);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x7(%rbp)
mov    0xecc(%rip),%ax
mov    %ax,-0x3(%rbp)
mov    0xec4(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0x7(%rbp),%rdi
mov    $0x3,%esi
call   1040 <rotate@plt>
lea    -0x7(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x666564,0xb(%rsp)
movl   $0x64636261,0x8(%rsp)
64
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <rotate@plt>
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.str = [7 x i8] c"abcdef\00"
@.str = [4 x i8] c"%s\0A\00"
define void @main() {
%1 = alloca [7 x i8]
%2 = getelementptr inbounds [7 x i8], [7 x i8]* %1, i64 0, i64 0
%3 = call i32 @rotate(i8* %2, i32 3)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
char get_x_from_position(int position) { return (position / 10); }


x86 assembly (clang, -O0):
<get_x_from_position>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_x_from_position>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x22,%rax
add    %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @get_x_from_position(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 10
%5 = trunc i32 %4 to i8
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @get_x_from_position(i32 %0) {
%2 = sdiv i32 %0, 10
%3 = trunc i32 %2 to i8
ret i8 %3
}
/* Type definitions */
struct lifo {
  int dummy;
};

/* Variables and functions */
double pop(struct lifo *);
double tanh(double);
double opr_tanh(struct lifo *stack) {
  double op = pop(stack);
  return tanh(op);
}


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

x86 assembly (clang, -O2):
<opr_tanh>:
push   %rax
call   1040 <pop@plt>
pop    %rax
jmp    1030 <tanh@plt>

LLVM IR (-O0):
%struct.lifo = type { i32 }
define double @opr_tanh(%struct.lifo* %0) {
%2 = alloca %struct.lifo*
%3 = alloca double
store %struct.lifo* %0, %struct.lifo** %2
%4 = load %struct.lifo*, %struct.lifo** %2
%5 = call double @pop(%struct.lifo* %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = call double @tanh(double %6)
ret double %7
}

LLVM IR (-O2):
%struct.lifo = type { i32 }
define double @opr_tanh(%struct.lifo* %0) {
%2 = tail call double @pop(%struct.lifo* %0)
%3 = tail call double @tanh(double %2)
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;
typedef int /*<<< orphan*/ int64_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int fseeko(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int fseek_x(FILE *fp, int64_t offset, int origin) {
  assert(sizeof(off_t) == 8);
  return fseeko(fp, offset, origin);
}


x86 assembly (clang, -O0):
<fseek_x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <fseeko@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fseek_x>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %edi,%edi
call   1030 <assert@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <fseeko@plt>

LLVM IR (-O0):
define i32 @fseek_x(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @assert(i32 0)
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @fseeko(i32* %8, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @fseek_x(i32* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @assert(i32 0)
%5 = tail call i32 @fseeko(i32* %0, i32 %1, i32 %2)
ret i32 %5
}
void outportb(unsigned short _port, unsigned char _data) {
  __asm__ __volatile__("outb %1, %0" : : "dN"(_port), "a"(_data));
}


x86 assembly (clang, -O0):
<outportb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x3(%rbp),%al
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outportb>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @outportb(i16 zeroext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i16, i16* %3
%6 = load i8, i8* %4
ret void
}

LLVM IR (-O2):
define void @outportb(i16 zeroext %0, i8 zeroext %1) {
tail call void asm sideeffect "outb $1, $0", "{dx}N,{ax},~{dirflag},~{fpsr},~{flags}"(i16 %0, i8 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t hci_event_connection_request_get_link_type(const uint8_t *event) {
  return event[11];
}


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

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

LLVM IR (-O0):
define i32 @hci_event_connection_request_get_link_type(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 11
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @hci_event_connection_request_get_link_type(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 11
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ direction_reverse(int /*<<< orphan*/);
int /*<<< orphan*/ myoutb(char, int);
void putcmd(char cmd) {
  direction_reverse(0);
  myoutb(cmd, (0x378 + 3));
}


x86 assembly (clang, -O0):
<putcmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %edi,%edi
call   1040 <direction_reverse@plt>
mov    $0x37b,%esi
movsbl -0x1(%rbp),%edi
call   1030 <myoutb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putcmd>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   1040 <direction_reverse@plt>
mov    %ebx,%edi
mov    $0x37b,%esi
pop    %rbx
jmp    1030 <myoutb@plt>

LLVM IR (-O0):
define void @putcmd(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @direction_reverse(i32 0)
%4 = load i8, i8* %2
%5 = call i32 @myoutb(i8 signext %4, i32 891)
ret void
}

LLVM IR (-O2):
define void @putcmd(i8 signext %0) {
%2 = tail call i32 @direction_reverse(i32 0)
%3 = tail call i32 @myoutb(i8 signext %0, i32 891)
ret void
}
int old_fn() { return old_fn() + 1; }


x86 assembly (clang, -O0):
<old_fn>:
push   %rbp
mov    %rsp,%rbp
call   1030 <old_fn@plt>
add    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @old_fn() {
%1 = call i32 @old_fn()
%2 = add nsw i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @old_fn() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ normalSum(int);
int /*<<< orphan*/ printf(char *, int);
int recursiveSum(int);
int main() {
  normalSum(3);
  printf("A soma (recursiva) foi: %d\n", recursiveSum(3));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
call   1050 <normalSum@plt>
mov    $0x3,%edi
call   1030 <recursiveSum@plt>
mov    %eax,%esi
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
call   1050 <normalSum@plt>
mov    $0x3,%edi
call   1030 <recursiveSum@plt>
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [28 x i8] c"A soma (recursiva) foi: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @normalSum(i32 3)
%2 = tail call i32 @recursiveSum(i32 3)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void Free(void *buffer) { free(buffer); }


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

x86 assembly (clang, -O2):
<Free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @Free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int __builtin_tabort(int);
int foo(void) { return __builtin_tabort(10); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1030 <__builtin_tabort@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    $0xa,%edi
jmp    1030 <__builtin_tabort@plt>

LLVM IR (-O0):
define i32 @foo() {
%1 = call i32 @__builtin_tabort(i32 10)
ret i32 %1
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 @__builtin_tabort(i32 10)
ret i32 %1
}
/* Variables and functions */
unsigned long ffsl(unsigned long);
unsigned long ffzl(unsigned long word) { return ffsl(~word); }


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

x86 assembly (clang, -O2):
<ffzl>:
not    %rdi
jmp    1030 <ffsl@plt>

LLVM IR (-O0):
define i64 @ffzl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = xor i64 %3, -1
%5 = call i64 @ffsl(i64 %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @ffzl(i64 %0) {
%2 = xor i64 %0, -1
%3 = tail call i64 @ffsl(i64 %2)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char **);
char **readNexusTrees(char const *, int *, int /*<<< orphan*/ *, int);
char *readNexusFirstTree(const char *infile) {
  int count = 0;
  char **trees = readNexusTrees(infile, &count, NULL, 1);
  if (count == 1) {
    char *tree = trees[0];
    free(trees);
    trees = NULL;
    return tree;
  } else {
    return NULL;
  }
}


x86 assembly (clang, -O0):
<readNexusFirstTree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x1,%ecx
call   1040 <readNexusTrees@plt>
mov    %rax,-0x20(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    1180 <readNexusFirstTree+0x60>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1188 <readNexusFirstTree+0x68>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readNexusFirstTree>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
xor    %ebx,%ebx
lea    0xc(%rsp),%rsi
xor    %edx,%edx
mov    $0x1,%ecx
call   1040 <readNexusTrees@plt>
cmpl   $0x1,0xc(%rsp)
jne    1152 <readNexusFirstTree+0x32>
mov    (%rax),%rbx
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @readNexusFirstTree(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i8** @readNexusTrees(i8* %0, i32* %2, i32* null, i32 1)
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %4
%9 = call i32 @free(i8** %4)
br label %10
10: ; preds = %1, %7
%11 = phi i8* [ %8, %7 ], [ null, %1 ]
ret i8* %11
}
int cobalt_visibility(void *param, int columns, char **data, char **column) {
  (void)param;
  (void)columns;
  (void)column;
  (void)data;
  return 0;
}


x86 assembly (clang, -O0):
<cobalt_visibility>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @cobalt_visibility(i8* nocapture readnone %0, i32 %1, i8** nocapture readnone %2, i8** nocapture readnone %3) {
ret i32 0
}
int p2x(int x) {
  int y = 1;
  int p2x[16] = {1,   2,   4,    8,    16,   32,   64,    128,
                 256, 512, 1024, 2048, 4096, 8192, 16384, 32768};
  while (x > 15) {
    x = x - 15;
    y = y * 32768;
  }
  return y * p2x[x];
}


x86 assembly (clang, -O0):
<p2x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xed3(%rip),%rsi
mov    $0x40,%edx
call   1030 <memcpy@plt>
cmpl   $0xf,-0x4(%rbp)
jle    1158 <p2x+0x48>
mov    -0x4(%rbp),%eax
sub    $0xf,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
shl    $0xf,%eax
mov    %eax,-0x8(%rbp)
jmp    1137 <p2x+0x27>
mov    -0x8(%rbp),%eax
movslq -0x4(%rbp),%rcx
imul   -0x50(%rbp,%rcx,4),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p2x>:
mov    $0x1,%eax
cmp    $0x10,%edi
jl     111f <p2x+0x1f>
mov    $0x1,%eax
nop
lea    -0xf(%rdi),%ecx
shl    $0xf,%eax
cmp    $0x1e,%edi
mov    %ecx,%edi
ja     1110 <p2x+0x10>
jmp    1121 <p2x+0x21>
mov    %edi,%ecx
movslq %ecx,%rcx
lea    0xed5(%rip),%rdx
imul   (%rdx,%rcx,4),%eax
ret

LLVM IR (-O0):
@__const.p2x.p2x = [16 x i32] [i32 1, i32 2, i32 4, i32 8, i32 16, i32 32, i32 64, i32 128, i32 256, i32 512, i32 1024, i32 2048, i32 4096, i32 8192, i32 16384, i32 32768]
define i32 @p2x(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [16 x i32]
store i32 %0, i32* %2
store i32 1, i32* %3
%5 = bitcast [16 x i32]* %4 to i8*
br label %6
6: ; preds = %9, %1
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 15
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = load i32, i32* %2
%11 = sub nsw i32 %10, 15
store i32 %11, i32* %2
%12 = load i32, i32* %3
%13 = mul nsw i32 %12, 32768
store i32 %13, i32* %3
br label %6
14: ; preds = %6
%15 = load i32, i32* %3
%16 = load i32, i32* %2
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 %17
%19 = load i32, i32* %18
%20 = mul nsw i32 %15, %19
ret i32 %20
}

LLVM IR (-O2):
@__const.p2x.p2x = [16 x i32] [i32 1, i32 2, i32 4, i32 8, i32 16, i32 32, i32 64, i32 128, i32 256, i32 512, i32 1024, i32 2048, i32 4096, i32 8192, i32 16384, i32 32768]
define i32 @p2x(i32 %0) {
%2 = icmp sgt i32 %0, 15
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 1, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = add nsw i32 %5, -15
%7 = shl nsw i32 %4, 15
%8 = icmp ugt i32 %5, 30
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ %0, %1 ], [ %6, %3 ]
%11 = phi i32 [ 1, %1 ], [ %7, %3 ]
%12 = sext i32 %10 to i64
%13 = getelementptr inbounds [16 x i32], [16 x i32]* @__const.p2x.p2x, i64 0, i64 %12
%14 = load i32, i32* %13
%15 = mul nsw i32 %14, %11
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ _mm_free(void *);
void MemoryFree(void *Array) { _mm_free(Array); }


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

x86 assembly (clang, -O2):
<MemoryFree>:
jmp    1030 <_mm_free@plt>

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

LLVM IR (-O2):
define void @MemoryFree(i8* %0) {
%2 = tail call i32 @_mm_free(i8* %0)
ret void
}
unsigned char TEN_satu8(short src) {
  if (src > 0xff)
    return 0xff;
  else if (src < 0)
    return 0;
  else
    return src;
}


x86 assembly (clang, -O0):
<TEN_satu8>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movswl -0x4(%rbp),%eax
cmp    $0xff,%eax
jle    1123 <TEN_satu8+0x23>
movb   $0xff,-0x1(%rbp)
jmp    1140 <TEN_satu8+0x40>
movswl -0x4(%rbp),%eax
cmp    $0x0,%eax
jge    1139 <TEN_satu8+0x39>
movb   $0x0,-0x1(%rbp)
jmp    1140 <TEN_satu8+0x40>
mov    -0x4(%rbp),%ax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TEN_satu8>:
xor    %ecx,%ecx
test   %di,%di
cmovns %edi,%ecx
movzwl %cx,%eax
cmp    $0xff,%eax
mov    $0xff,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @TEN_satu8(i16 signext %0) {
%2 = alloca i8
%3 = alloca i16
store i16 %0, i16* %3
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = icmp sgt i32 %5, 255
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 -1, i8* %2
br label %16
8: ; preds = %1
%9 = load i16, i16* %3
%10 = sext i16 %9 to i32
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 0, i8* %2
br label %16
13: ; preds = %8
%14 = load i16, i16* %3
%15 = trunc i16 %14 to i8
store i8 %15, i8* %2
br label %16
16: ; preds = %13, %12, %7
%17 = load i8, i8* %2
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @TEN_satu8(i16 signext %0) {
%2 = icmp sgt i16 %0, 0
%3 = select i1 %2, i16 %0, i16 0
%4 = icmp ult i16 %3, 255
%5 = select i1 %4, i16 %3, i16 255
%6 = trunc i16 %5 to i8
ret i8 %6
}