xunge/DecIR huggingface dataset:
int ft_fibonacci(int index) {
  if (index < 0)
    return (-1);
  else if (index > 1)
    return (ft_fibonacci(index - 1) + ft_fibonacci(index - 2));
  else if (index == 1)
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1131 <ft_fibonacci+0x21>
movl   $0xffffffff,-0x4(%rbp)
jmp    1180 <ft_fibonacci+0x70>
cmpl   $0x1,-0x8(%rbp)
jle    1163 <ft_fibonacci+0x53>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <ft_fibonacci@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <ft_fibonacci@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1180 <ft_fibonacci+0x70>
cmpl   $0x1,-0x8(%rbp)
jne    1179 <ft_fibonacci+0x69>
movl   $0x1,-0x4(%rbp)
jmp    1180 <ft_fibonacci+0x70>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_fibonacci>:
test   %edi,%edi
js     1153 <ft_fibonacci+0x43>
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jb     1142 <ft_fibonacci+0x32>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <ft_fibonacci@plt>
add    $0xfffffffe,%ebx
add    %eax,%ebp
cmp    $0x1,%ebx
ja     1130 <ft_fibonacci+0x20>
xor    %eax,%eax
cmp    $0x1,%ebx
sete   %al
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_fibonacci(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %19, label %3
3: ; preds = %1
%4 = icmp ugt i32 %0, 1
br i1 %4, label %5, label %13
5: ; preds = %3, %5
%6 = phi i32 [ %11, %5 ], [ 0, %3 ]
%7 = phi i32 [ %10, %5 ], [ %0, %3 ]
%8 = add nsw i32 %7, -1
%9 = tail call i32 @ft_fibonacci(i32 %8)
%10 = add nsw i32 %7, -2
%11 = add nsw i32 %9, %6
%12 = icmp ugt i32 %10, 1
br i1 %12, label %5, label %13
13: ; preds = %5, %3
%14 = phi i32 [ %0, %3 ], [ %10, %5 ]
%15 = phi i32 [ 0, %3 ], [ %11, %5 ]
%16 = icmp eq i32 %14, 1
%17 = zext i1 %16 to i32
%18 = add nsw i32 %15, %17
br label %19
19: ; preds = %1, %13
%20 = phi i32 [ %18, %13 ], [ -1, %1 ]
ret i32 %20
}
/* Variables and functions */
int /*<<< orphan*/ set_rc_def();
int /*<<< orphan*/ set_rt_def();
int /*<<< orphan*/ set_sys_def();
void init_values() {
  set_sys_def();
  set_rc_def();
  set_rt_def();
}


x86 assembly (clang, -O0):
<init_values>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <set_sys_def@plt>
mov    $0x0,%al
call   1050 <set_rc_def@plt>
mov    $0x0,%al
call   1030 <set_rt_def@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_values>:
push   %rax
xor    %eax,%eax
call   1040 <set_sys_def@plt>
xor    %eax,%eax
call   1050 <set_rc_def@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <set_rt_def@plt>

LLVM IR (-O0):
define void @init_values() {
%1 = call i32 (...) @set_sys_def()
%2 = call i32 (...) @set_rc_def()
%3 = call i32 (...) @set_rt_def()
ret void
}

LLVM IR (-O2):
define void @init_values() {
%1 = tail call i32 (...) @set_sys_def()
%2 = tail call i32 (...) @set_rc_def()
%3 = tail call i32 (...) @set_rt_def()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
void dec2str(int val, char *str) {
  if (val == -1)
    strcpy(str, "*");
  else
    sprintf(str, "%d", val);
}


x86 assembly (clang, -O0):
<dec2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    114e <dec2str+0x2e>
mov    -0x10(%rbp),%rdi
lea    0xebc(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1161 <dec2str+0x41>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xea6(%rip),%rsi
call   1040 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dec2str>:
mov    %rsi,%rax
cmp    $0xffffffff,%edi
je     1139 <dec2str+0x19>
mov    %edi,%edx
lea    0xed1(%rip),%rsi
mov    %rax,%rdi
jmp    1040 <sprintf@plt>
lea    0xec0(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"*\00"
@.str.1 = [3 x i8] c"%d\00"
define void @dec2str(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, -1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %2
%7 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %0)
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
int crypto_secretbox_aes256gcm_open(unsigned char *, unsigned char *,
                                    unsigned long long, unsigned char *,
                                    unsigned char *);
int crypto_box_nistp256aes256gcm_open_afternm(unsigned char *m,
                                              unsigned char *c,
                                              unsigned long long clen,
                                              unsigned char *n,
                                              unsigned char *k) {
  return crypto_secretbox_aes256gcm_open(m, c, clen, n, k);
}


x86 assembly (clang, -O0):
<crypto_box_nistp256aes256gcm_open_afternm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <crypto_secretbox_aes256gcm_open@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_box_nistp256aes256gcm_open_afternm>:
jmp    1030 <crypto_secretbox_aes256gcm_open@plt>

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

LLVM IR (-O2):
define i32 @crypto_box_nistp256aes256gcm_open_afternm(i8* %0, i8* %1, i64 %2, i8* %3, i8* %4) {
%6 = tail call i32 @crypto_secretbox_aes256gcm_open(i8* %0, i8* %1, i64 %2, i8* %3, i8* %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main_help(int argc, char **argv) {
  (void)argc, (void)argv;
  printf("dhcpctl leases [-db FILE] [-if IF] show [ID]...\n"
         "dhcpctl leases [-db FILE] [-if IF] add HWADDR IPADDR [router "
         "IPADDR]...\n"
         "\t[namserver IPADDR]... [leasetime INT] [prefix INT]\n"
         "dhcpctl leases [-db FILE] [-if IF] remove ID...\n"
         "dhcpctl start [nodaemon] [binary FILE] [pidfile FILE] [config FILE] "
         "[-- [ARG]...]\n"
         "dhcpctl stop [pidfile FILE]\n"
         "dhcpctl restart [nodaemon] [binary FILE] [pidfile FILE] [config "
         "FILE] [-- [ARG]...]\n"
         "dhcpctl flush [pidfile FILE]\n"
         "dhcpctl mkdb [interface IF|file FILE]\n"
         "dhcpctl help\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [495 x i8] c"dhcpctl leases [-db FILE] [-if IF] show [ID]...\0Adhcpctl leases [-db FILE] [-if IF] add HWADDR IPADDR [router IPADDR]...\0A\09[namserver IPADDR]... [leasetime INT] [prefix INT]\0Adhcpctl leases [-db FILE] [-if IF] remove ID...\0Adhcpctl start [nodaemon] [binary FILE] [pidfile FILE] [config FILE] [-- [ARG]...]\0Adhcpctl stop [pidfile FILE]\0Adhcpctl restart [nodaemon] [binary FILE] [pidfile FILE] [config FILE] [-- [ARG]...]\0Adhcpctl flush [pidfile FILE]\0Adhcpctl mkdb [interface IF|file FILE]\0Adhcpctl help\0A\00"
define i32 @main_help(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([495 x i8], [495 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [494 x i8] c"dhcpctl leases [-db FILE] [-if IF] show [ID]...\0Adhcpctl leases [-db FILE] [-if IF] add HWADDR IPADDR [router IPADDR]...\0A\09[namserver IPADDR]... [leasetime INT] [prefix INT]\0Adhcpctl leases [-db FILE] [-if IF] remove ID...\0Adhcpctl start [nodaemon] [binary FILE] [pidfile FILE] [config FILE] [-- [ARG]...]\0Adhcpctl stop [pidfile FILE]\0Adhcpctl restart [nodaemon] [binary FILE] [pidfile FILE] [config FILE] [-- [ARG]...]\0Adhcpctl flush [pidfile FILE]\0Adhcpctl mkdb [interface IF|file FILE]\0Adhcpctl help\00"
define i32 @main_help(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([494 x i8], [494 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ free(void *);
int win_read_destroy(void *addr, size_t length) {
  if (NULL == addr) {
    errno = EINVAL;
    return -1;
  }
  free(addr);
  return 0;
}


x86 assembly (clang, -O0):
<win_read_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    114a <win_read_destroy+0x3a>
mov    0x2ea5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea4(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <win_read_destroy+0x4a>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<win_read_destroy>:
push   %rax
test   %rdi,%rdi
je     111f <win_read_destroy+0xf>
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2eb2(%rip),%rax
mov    (%rax),%eax
mov    0x2eb1(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @win_read_destroy(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = load i32, i32* @EINVAL
store i32 %5, i32* @errno
br label %8
6: ; preds = %2
%7 = tail call i32 @free(i8* %0)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ -1, %4 ], [ 0, %6 ]
ret i32 %9
}
/* Type definitions */
struct ao_hex_record {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ao_hex_record *);
void ao_hex_free(struct ao_hex_record *record) {
  if (!record)
    return;
  free(record);
}


x86 assembly (clang, -O0):
<ao_hex_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <ao_hex_free+0x1c>
jmp    1135 <ao_hex_free+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ao_hex_free>:
test   %rdi,%rdi
je     111a <ao_hex_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.ao_hex_record = type { i32 }
define void @ao_hex_free(%struct.ao_hex_record* %0) {
%2 = alloca %struct.ao_hex_record*
store %struct.ao_hex_record* %0, %struct.ao_hex_record** %2
%3 = load %struct.ao_hex_record*, %struct.ao_hex_record** %2
%4 = icmp ne %struct.ao_hex_record* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load %struct.ao_hex_record*, %struct.ao_hex_record** %2
%8 = call i32 @free(%struct.ao_hex_record* %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.ao_hex_record = type { i32 }
define void @ao_hex_free(%struct.ao_hex_record* %0) {
%2 = icmp eq %struct.ao_hex_record* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.ao_hex_record* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
double M_PI;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int main(void) {
  double radius, area;
  printf("Enter the radius\n");
  scanf("%lf", &radius);
  area = M_PI * radius * radius;
  printf("The area is %f\n", area);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2e9b(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xeaa(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
mov    0x2e95(%rip),%rax
movsd  (%rsp),%xmm1
movsd  (%rax),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
lea    0xe99(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Enter the radius\0A\00"
@.str.1 = [4 x i8] c"%lf\00"
@M_PI = global double 0.000000e+00
@.str.2 = [16 x i8] c"The area is %f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* @M_PI
%6 = load double, double* %1
%7 = fmul double %5, %6
%8 = load double, double* %1
%9 = fmul double %7, %8
store double %9, double* %2
%10 = load double, double* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%lf\00"
@M_PI = global double 0.000000e+00
@.str.2 = [16 x i8] c"The area is %f\0A\00"
@str = [17 x i8] c"Enter the radius\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* @M_PI
%6 = load double, double* %1
%7 = fmul double %5, %6
%8 = fmul double %6, %7
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), double %8)
ret i32 0
}
void vcopy(const double *v1, double *v2) {
  register int i;
  for (i = 0; i < 3; i++)
    v2[i] = v1[i];
}


x86 assembly (clang, -O0):
<vcopy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    1145 <vcopy+0x45>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <vcopy+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vcopy>:
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rsi)
movsd  0x8(%rdi),%xmm0
movsd  %xmm0,0x8(%rsi)
movsd  0x10(%rdi),%xmm0
movsd  %xmm0,0x10(%rsi)
ret

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

LLVM IR (-O2):
define void @vcopy(double* nocapture %0, double* nocapture writeonly %1) {
%3 = load double, double* %0
store double %3, double* %1
%4 = getelementptr inbounds double, double* %0, i64 1
%5 = load double, double* %4
%6 = getelementptr inbounds double, double* %1, i64 1
store double %5, double* %6
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %1, i64 2
store double %8, double* %9
ret void
}
/* Type definitions */
struct sched_param {
  int dummy;
};
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int ENOSYS;
int pthread_setschedparam(pthread_t thread, int foo,
                          const struct sched_param *param) {
  return -ENOSYS;
}


x86 assembly (clang, -O0):
<pthread_setschedparam>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ed1(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_setschedparam>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
%struct.sched_param = type { i32 }
@ENOSYS = global i32 0
define i32 @pthread_setschedparam(i32 %0, i32 %1, %struct.sched_param* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.sched_param*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.sched_param* %2, %struct.sched_param** %6
%7 = load i32, i32* @ENOSYS
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
%struct.sched_param = type { i32 }
@ENOSYS = global i32 0
define i32 @pthread_setschedparam(i32 %0, i32 %1, %struct.sched_param* nocapture readnone %2) {
%4 = load i32, i32* @ENOSYS
%5 = sub nsw i32 0, %4
ret i32 %5
}
const char *Lock_Definition(void) {
  return "struct Lock {\n"
         "  void (*lock)(var);\n"
         "  void (*unlock)(var);\n"
         "  bool (*lock_try)(var);\n"
         "};\n";
}


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

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

LLVM IR (-O0):
@.str = [87 x i8] c"struct Lock {\0A void (*lock)(var);\0A void (*unlock)(var);\0A bool (*lock_try)(var);\0A};\0A\00"
define i8* @Lock_Definition() {
ret i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [87 x i8] c"struct Lock {\0A void (*lock)(var);\0A void (*unlock)(var);\0A bool (*lock_try)(var);\0A};\0A\00"
define i8* @Lock_Definition() {
ret i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0)
}
void __clear_bit(int n, unsigned long *bitmap) { *bitmap &= ~(1UL << n); }


x86 assembly (clang, -O0):
<__clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,%rcx
xor    $0xffffffffffffffff,%rcx
mov    -0x10(%rbp),%rax
and    (%rax),%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__clear_bit>:
mov    %edi,%ecx
mov    $0xfffffffffffffffe,%rax
rol    %cl,%rax
and    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @__clear_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i32, i32* %3
%6 = zext i32 %5 to i64
%7 = shl i64 1, %6
%8 = xor i64 %7, -1
%9 = load i64*, i64** %4
%10 = load i64, i64* %9
%11 = and i64 %10, %8
store i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @__clear_bit(i32 %0, i64* nocapture %1) {
%3 = zext i32 %0 to i64
%4 = shl nuw i64 1, %3
%5 = xor i64 %4, -1
%6 = load i64, i64* %1
%7 = and i64 %6, %5
store i64 %7, i64* %1
ret void
}
char *dtostre(double val, char *s, unsigned char prec, unsigned char flags) {
  s[0] = '_';
  s[1] = '_';
  s[2] = '_';
  s[3] = '\0';
  return s;
}


x86 assembly (clang, -O0):
<dtostre>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %cl,-0x11(%rbp)
mov    %al,-0x12(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x5f,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x5f,0x1(%rax)
mov    -0x10(%rbp),%rax
movb   $0x5f,0x2(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,0x3(%rax)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtostre>:
mov    %rdi,%rax
movl   $0x5f5f5f,(%rdi)
ret

LLVM IR (-O0):
define i8* @dtostre(double %0, i8* %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca double
%6 = alloca i8*
%7 = alloca i8
%8 = alloca i8
store double %0, double* %5
store i8* %1, i8** %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%9 = load i8*, i8** %6
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 95, i8* %10
%11 = load i8*, i8** %6
%12 = getelementptr inbounds i8, i8* %11, i64 1
store i8 95, i8* %12
%13 = load i8*, i8** %6
%14 = getelementptr inbounds i8, i8* %13, i64 2
store i8 95, i8* %14
%15 = load i8*, i8** %6
%16 = getelementptr inbounds i8, i8* %15, i64 3
store i8 0, i8* %16
%17 = load i8*, i8** %6
ret i8* %17
}

LLVM IR (-O2):
define i8* @dtostre(double %0, i8* returned writeonly %1, i8 zeroext %2, i8 zeroext %3) {
store i8 95, i8* %1
%5 = getelementptr inbounds i8, i8* %1, i64 1
store i8 95, i8* %5
%6 = getelementptr inbounds i8, i8* %1, i64 2
store i8 95, i8* %6
%7 = getelementptr inbounds i8, i8* %1, i64 3
store i8 0, i8* %7
ret i8* %1
}
void CB(void) {}


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

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

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

LLVM IR (-O2):
define void @CB() {
ret void
}
/* Variables and functions */
scalar_t__ FoundAllLabels();
int FIC_DEC_FoundAllLabels(void) {
  if (FoundAllLabels())
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<FIC_DEC_FoundAllLabels>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <FoundAllLabels@plt>
cmp    $0x0,%rax
je     1135 <FIC_DEC_FoundAllLabels+0x25>
movl   $0x1,-0x4(%rbp)
jmp    113c <FIC_DEC_FoundAllLabels+0x2c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FIC_DEC_FoundAllLabels>:
push   %rax
xor    %eax,%eax
call   1030 <FoundAllLabels@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @FIC_DEC_FoundAllLabels() {
%1 = alloca i32
%2 = call i64 (...) @FoundAllLabels()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 1, i32* %1
br label %6
5: ; preds = %0
store i32 0, i32* %1
br label %6
6: ; preds = %5, %4
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @FIC_DEC_FoundAllLabels() {
%1 = tail call i64 (...) @FoundAllLabels()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
int castling_from_char(const char c) {
  switch (c) {
  case 'K':
    return 1;
  case 'Q':
    return 2;
  case 'k':
    return 4;
  case 'q':
    return 8;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<castling_from_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffb5,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x26,%eax
ja     1164 <castling_from_char+0x64>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    116b <castling_from_char+0x6b>
movl   $0x2,-0x4(%rbp)
jmp    116b <castling_from_char+0x6b>
movl   $0x4,-0x4(%rbp)
jmp    116b <castling_from_char+0x6b>
movl   $0x8,-0x4(%rbp)
jmp    116b <castling_from_char+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<castling_from_char>:
add    $0xffffffb5,%edi
cmp    $0x26,%edi
ja     1123 <castling_from_char+0x23>
mov    $0x1,%eax
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x2,%eax
ret
xor    %eax,%eax
ret
mov    $0x4,%eax
ret
mov    $0x8,%eax
ret

LLVM IR (-O0):
define i32 @castling_from_char(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %10 [
i32 75, label %6
i32 81, label %7
i32 107, label %8
i32 113, label %9
]
6: ; preds = %1
store i32 1, i32* %2
br label %11
7: ; preds = %1
store i32 2, i32* %2
br label %11
8: ; preds = %1
store i32 4, i32* %2
br label %11
9: ; preds = %1
store i32 8, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9, %8, %7, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @castling_from_char(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %6 [
i32 75, label %7
i32 81, label %3
i32 107, label %4
i32 113, label %5
]
3: ; preds = %1
br label %7
4: ; preds = %1
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %5, %4, %3
%8 = phi i32 [ 0, %6 ], [ 8, %5 ], [ 4, %4 ], [ 2, %3 ], [ 1, %1 ]
ret i32 %8
}
/* Variables and functions */
int call_cpp_add(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", call_cpp_add(2, 4));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @call_cpp_add(i32 2, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void null(void *p) {
  void **pp = (void **)p;
  free(*pp);
  *pp = NULL;
}


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

x86 assembly (clang, -O2):
<null>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @null(i8* %0) {
%2 = alloca i8*
%3 = alloca i8**
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i8**
store i8** %5, i8*** %3
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = call i32 @free(i8* %7)
%9 = load i8**, i8*** %3
store i8* null, i8** %9
ret void
}

LLVM IR (-O2):
define void @null(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
store i8* null, i8** %2
ret void
}
char add_c(char a, char b) { return a + b; }


x86 assembly (clang, -O0):
<add_c>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
add    %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_c>:
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
define signext i8 @add_c(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = add nsw i32 %6, %8
%10 = trunc i32 %9 to i8
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @add_c(i8 signext %0, i8 signext %1) {
%3 = add i8 %1, %0
ret i8 %3
}
/* Variables and functions */
int ipmi_tsol_command(void *, char *, int, int);
int ipmi_tsol_stop(void *intf, char *recvip, int port) {
  return ipmi_tsol_command(intf, recvip, port, 0x02);
}


x86 assembly (clang, -O0):
<ipmi_tsol_stop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x2,%ecx
call   1030 <ipmi_tsol_command@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipmi_tsol_stop>:
mov    $0x2,%ecx
jmp    1030 <ipmi_tsol_command@plt>

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

LLVM IR (-O2):
define i32 @ipmi_tsol_stop(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @ipmi_tsol_command(i8* %0, i8* %1, i32 %2, i32 2)
ret i32 %4
}
void graph_write_dword(unsigned char *p, unsigned int v) {
  p[0] = (unsigned char)((v >> 24) & 0xFF);
  p[1] = (unsigned char)((v >> 16) & 0xFF);
  p[2] = (unsigned char)((v >> 8) & 0xFF);
  p[3] = (unsigned char)(v & 0xFF);
}


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

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

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

LLVM IR (-O2):
define void @graph_write_dword(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = trunc i32 %3 to i8
store i8 %4, i8* %0
%5 = lshr i32 %1, 16
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = lshr i32 %1, 8
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %9, i8* %10
%11 = trunc i32 %1 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gmx_spol(int, char **);
int main(int argc, char *argv[]) {
  gmx_spol(argc, argv);
  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   1030 <gmx_spol@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <gmx_spol@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 @gmx_spol(i32 %6, i8** %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_spol(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int execvp(const char *file, char *const argv[]) {
  fprintf(stderr, "ERROR: execvp is unsupported!\n");
  fprintf(stderr, "Tried to execute '%s' with arg0 '%s'\n", file, *argv);
  abort();
}


x86 assembly (clang, -O0):
<execvp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
lea    0xec0(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
lea    0xebd(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<execvp>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    0x2eae(%rip),%r15
mov    (%r15),%edi
lea    0xec4(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r15),%edi
mov    (%rbx),%rcx
lea    0xecf(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"ERROR: execvp is unsupported!\0A\00"
@.str.1 = [38 x i8] c"Tried to execute '%s' with arg0 '%s'\0A\00"
define i32 @execvp(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i32, i32* @stderr
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %3
%9 = load i8**, i8*** %4
%10 = load i8*, i8** %9
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %8, i8* %10)
%12 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"ERROR: execvp is unsupported!\0A\00"
@.str.1 = [38 x i8] c"Tried to execute '%s' with arg0 '%s'\0A\00"
define i32 @execvp(i8* %0, i8** nocapture %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %6)
%8 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ XSelectionEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XSelectionEvent(void *_p) {
  if (_p == NULL)
    abort();
  free((XSelectionEvent *)_p);
}


x86 assembly (clang, -O0):
<free_XSelectionEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XSelectionEvent+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XSelectionEvent>:
test   %rdi,%rdi
je     112a <free_XSelectionEvent+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XSelectionEvent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XSelectionEvent(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
/* Variables and functions */
scalar_t__ chdir(char const *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void set_working_dir(const char *dir) {
  if (chdir(dir) < 0) {
    perror(dir);
    exit(2);
  }
}


x86 assembly (clang, -O0):
<set_working_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <chdir@plt>
cmp    $0x0,%rax
jge    1162 <set_working_dir+0x32>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x2,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_working_dir>:
push   %rbx
mov    %rdi,%rbx
call   1030 <chdir@plt>
test   %rax,%rax
js     1140 <set_working_dir+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @set_working_dir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @chdir(i8* %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @perror(i8* %7)
%9 = call i32 @exit(i32 2)
unreachable
10: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @set_working_dir(i8* %0) {
%2 = tail call i64 @chdir(i8* %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* %0)
%6 = tail call i32 @exit(i32 2)
unreachable
7: ; preds = %1
ret void
}
void av_image_fill_black() {}


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

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

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

LLVM IR (-O2):
define void @av_image_fill_black() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vgatv_get_vga_totals(int *, int *);
int FS460_get_vga_totals_actual(int *p_htotal, int *p_vtotal) {
  if (!p_htotal || !p_vtotal)
    return 0x1000;
  vgatv_get_vga_totals(p_htotal, p_vtotal);
  return 0;
}


x86 assembly (clang, -O0):
<FS460_get_vga_totals_actual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <FS460_get_vga_totals_actual+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <FS460_get_vga_totals_actual+0x32>
movl   $0x1000,-0x4(%rbp)
jmp    1156 <FS460_get_vga_totals_actual+0x46>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <vgatv_get_vga_totals@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FS460_get_vga_totals_actual>:
mov    $0x1000,%eax
test   %rdi,%rdi
je     112b <FS460_get_vga_totals_actual+0x1b>
test   %rsi,%rsi
je     112b <FS460_get_vga_totals_actual+0x1b>
push   %rax
call   1030 <vgatv_get_vga_totals@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @FS460_get_vga_totals_actual(i32* %0, i32* %1) {
%3 = icmp ne i32* %0, null
%4 = icmp ne i32* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @vgatv_get_vga_totals(i32* %0, i32* %1)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ 0, %6 ], [ 4096, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ fail_file();
int /*<<< orphan*/ perror(char *);
size_t read(int const, void *const, size_t const);
size_t uread(int const fd, void *const buf, size_t const count) {
  size_t const n = read(fd, buf, count);
  if (n != count) {
    perror("read");
    fail_file();
  }
  return n;
}


x86 assembly (clang, -O0):
<uread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <read@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     1178 <uread+0x48>
lea    0xe94(%rip),%rdi
call   1050 <perror@plt>
mov    $0x0,%al
call   1030 <fail_file@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uread>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
call   1040 <read@plt>
mov    %rax,%r14
cmp    %rbx,%rax
jne    114f <uread+0x1f>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xeaa(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <fail_file@plt>
jmp    1144 <uread+0x14>

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

LLVM IR (-O2):
@.str = [5 x i8] c"read\00"
define i64 @uread(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i64 @read(i32 %0, i8* %1, i64 %2)
%5 = icmp eq i64 %4, %2
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @fail_file()
br label %9
9: ; preds = %6, %3
ret i64 %4
}
/* Variables and functions */
scalar_t__ isspace(char);
char *str_spc_skip(char *s) {
  for (; isspace(*s); s++)
    ;
  return s;
}


x86 assembly (clang, -O0):
<str_spc_skip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1148 <str_spc_skip+0x38>
jmp    1137 <str_spc_skip+0x27>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <str_spc_skip+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_spc_skip>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <str_spc_skip+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @str_spc_skip(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %9, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i64 @isspace(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %3
br label %9
9: ; preds = %8
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %2
br label %3
12: ; preds = %3
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
define i8* @str_spc_skip(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
void ZSTD_copy4(void *dst, const void *src) {
  __builtin_memcpy((dst), (src), (4));
}


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

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

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

LLVM IR (-O2):
define void @ZSTD_copy4(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %3
store i32 %5, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long, unsigned char);
unsigned char getreg8(unsigned long int addr) {
  unsigned char res = *((volatile unsigned char *)addr);
  printf("Read byte at 0x%08lx = 0x%02x.\n", addr, res);
  return res;
}


x86 assembly (clang, -O0):
<getreg8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed0(%rip),%rdi
movzbl -0x9(%rbp),%edx
call   1030 <printf@plt>
movzbl -0x9(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getreg8>:
push   %rbx
mov    %rdi,%rsi
mov    (%rdi),%al
movzbl %al,%ebx
lea    0xee0(%rip),%rdi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Read byte at 0x%08lx = 0x%02x.\0A\00"
define zeroext i8 @getreg8(i64 %0) {
%2 = alloca i64
%3 = alloca i8
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = inttoptr i64 %4 to i8*
%6 = load volatile i8, i8* %5
store i8 %6, i8* %3
%7 = load i64, i64* %2
%8 = load i8, i8* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 %7, i8 zeroext %8)
%10 = load i8, i8* %3
ret i8 %10
}

LLVM IR (-O2):
@.str = [32 x i8] c"Read byte at 0x%08lx = 0x%02x.\0A\00"
define zeroext i8 @getreg8(i64 %0) {
%2 = inttoptr i64 %0 to i8*
%3 = load volatile i8, i8* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 %0, i8 zeroext %3)
ret i8 %3
}