xunge/DecIR huggingface dataset:
int strlen(s)
register char *s;
{
  register n;
  n = 0;
  while (*s++)
    n++;
  return (n);
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1135 <strlen+0x35>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
char *xserver_default_display_server();
void help_print_server() {
  const char *const server = xserver_default_display_server();
  if (server != 0) {
    printf("%s\n", server);
  } else {
    printf("n.a.");
  }
}


x86 assembly (clang, -O0):
<help_print_server>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <xserver_default_display_server@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1155 <help_print_server+0x35>
mov    -0x8(%rbp),%rsi
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1163 <help_print_server+0x43>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_print_server>:
push   %rax
xor    %eax,%eax
call   1040 <xserver_default_display_server@plt>
test   %rax,%rax
je     1146 <help_print_server+0x16>
mov    %rax,%rdi
pop    %rax
jmp    1030 <puts@plt>
lea    0xeb3(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1050 <printf@plt>

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

LLVM IR (-O2):
@.str.1 = [5 x i8] c"n.a.\00"
define void @help_print_server() {
%1 = tail call i8* (...) @xserver_default_display_server()
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @puts(i8* %1)
br label %7
5: ; preds = %0
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret void
}
/* Type definitions */
struct in6_addr {
  int dummy;
};
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ AF_INET6;
scalar_t__ inet_ntop(int /*<<< orphan*/, struct in6_addr const *, char *, int);
char *ebt_ip6_to_numeric(const struct in6_addr *addrp) {
  static char buf[50 + 1];
  return (char *)inet_ntop(AF_INET6, addrp, buf, sizeof(buf));
}


x86 assembly (clang, -O0):
<ebt_ip6_to_numeric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
lea    0x2f10(%rip),%rdx
mov    $0x33,%ecx
call   1030 <inet_ntop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ebt_ip6_to_numeric>:
mov    %rdi,%rsi
mov    0x2ece(%rip),%rax
mov    (%rax),%edi
lea    0x2f1d(%rip),%rdx
mov    $0x33,%ecx
jmp    1030 <inet_ntop@plt>

LLVM IR (-O0):
%struct.in6_addr = type { i32 }
@ebt_ip6_to_numeric.buf = internal global [51 x i8] zeroinitializer
@AF_INET6 = global i32 0
define i8* @ebt_ip6_to_numeric(%struct.in6_addr* %0) {
%2 = alloca %struct.in6_addr*
store %struct.in6_addr* %0, %struct.in6_addr** %2
%3 = load i32, i32* @AF_INET6
%4 = load %struct.in6_addr*, %struct.in6_addr** %2
%5 = call i64 @inet_ntop(i32 %3, %struct.in6_addr* %4, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @ebt_ip6_to_numeric.buf, i64 0, i64 0), i32 51)
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}

LLVM IR (-O2):
%struct.in6_addr = type { i32 }
@ebt_ip6_to_numeric.buf = internal global [51 x i8] zeroinitializer
@AF_INET6 = global i32 0
define i8* @ebt_ip6_to_numeric(%struct.in6_addr* %0) {
%2 = load i32, i32* @AF_INET6
%3 = tail call i64 @inet_ntop(i32 %2, %struct.in6_addr* %0, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @ebt_ip6_to_numeric.buf, i64 0, i64 0), i32 51)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
unsigned short linux_inw(unsigned long port) {
  return (*(volatile unsigned short *)(0xb0100000 + port));
}


x86 assembly (clang, -O0):
<linux_inw>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0xb0100000,%rax
add    -0x8(%rbp),%rax
mov    (%rax),%ax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linux_inw>:
mov    $0xb0100000,%eax
movzwl (%rdi,%rax,1),%eax
ret

LLVM IR (-O0):
define zeroext i16 @linux_inw(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 2953838592, %3
%5 = inttoptr i64 %4 to i16*
%6 = load volatile i16, i16* %5
ret i16 %6
}

LLVM IR (-O2):
define zeroext i16 @linux_inw(i64 %0) {
%2 = add i64 %0, 2953838592
%3 = inttoptr i64 %2 to i16*
%4 = load volatile i16, i16* %3
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int /*<<< orphan*/ printf(char *, char *);
void __DSVERIFIER_assert_msg(int expression, char msg[]) {
  printf("%s", msg);
  __VERIFIER_assert(expression);
}


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

x86 assembly (clang, -O2):
<__DSVERIFIER_assert_msg>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <__VERIFIER_assert@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @__DSVERIFIER_assert_msg(i32 %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @__VERIFIER_assert(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TrimAnglesSettingsHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void TrimAnglesSettingsUpdated() { UAVObjUpdated(TrimAnglesSettingsHandle()); }


x86 assembly (clang, -O0):
<TrimAnglesSettingsUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <TrimAnglesSettingsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TrimAnglesSettingsUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <TrimAnglesSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @TrimAnglesSettingsUpdated() {
%1 = call i32 (...) @TrimAnglesSettingsHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @TrimAnglesSettingsUpdated() {
%1 = tail call i32 (...) @TrimAnglesSettingsHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Type definitions */
struct confctl_var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ buf_new_from_str(char *);
struct confctl_var *cv_new(int /*<<< orphan*/ *, int /*<<< orphan*/);
struct confctl_var *cv_new_root(void) {
  struct confctl_var *cv;
  cv = cv_new(NULL, buf_new_from_str("HKEY_CLASSES_ROOT"));
  return (cv);
}


x86 assembly (clang, -O0):
<cv_new_root>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <buf_new_from_str@plt>
mov    %eax,%esi
xor    %eax,%eax
mov    %eax,%edi
call   1040 <cv_new@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cv_new_root>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <buf_new_from_str@plt>
xor    %edi,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <cv_new@plt>

LLVM IR (-O0):
%struct.confctl_var = type { i32 }
@.str = [18 x i8] c"HKEY_CLASSES_ROOT\00"
define %struct.confctl_var* @cv_new_root() {
%1 = alloca %struct.confctl_var*
%2 = call i32 @buf_new_from_str(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = call %struct.confctl_var* @cv_new(i32* null, i32 %2)
store %struct.confctl_var* %3, %struct.confctl_var** %1
%4 = load %struct.confctl_var*, %struct.confctl_var** %1
ret %struct.confctl_var* %4
}

LLVM IR (-O2):
%struct.confctl_var = type { i32 }
@.str = [18 x i8] c"HKEY_CLASSES_ROOT\00"
define %struct.confctl_var* @cv_new_root() {
%1 = tail call i32 @buf_new_from_str(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = tail call %struct.confctl_var* @cv_new(i32* null, i32 %1)
ret %struct.confctl_var* %2
}
/* Variables and functions */
int /*<<< orphan*/ vecNf_scalarMult_new(float *, float const *, float const,
                                        int);
void vec3f_scalarMult_new(float result[3], const float v[3],
                          const float scalar) {
  vecNf_scalarMult_new(result, v, scalar, 3);
}


x86 assembly (clang, -O0):
<vec3f_scalarMult_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movss  -0x14(%rbp),%xmm0
mov    $0x3,%edx
call   1030 <vecNf_scalarMult_new@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3f_scalarMult_new>:
mov    $0x3,%edx
jmp    1030 <vecNf_scalarMult_new@plt>

LLVM IR (-O0):
define void @vec3f_scalarMult_new(float* %0, float* %1, float %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float
store float* %0, float** %4
store float* %1, float** %5
store float %2, float* %6
%7 = load float*, float** %4
%8 = load float*, float** %5
%9 = load float, float* %6
%10 = call i32 @vecNf_scalarMult_new(float* %7, float* %8, float %9, i32 3)
ret void
}

LLVM IR (-O2):
define void @vec3f_scalarMult_new(float* %0, float* %1, float %2) {
%4 = tail call i32 @vecNf_scalarMult_new(float* %0, float* %1, float %2, i32 3)
ret void
}
/* Variables and functions */
scalar_t__ rename(char const *, char const *);
int /*<<< orphan*/ t_error(char *, char const *, char const *);
void xrename(const char *old, const char *new) {
  if (rename(old, new) != 0) {
    t_error("Unable to rename file %s to %s", old, new);
  }
}


x86 assembly (clang, -O0):
<xrename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <rename@plt>
cmp    $0x0,%rax
je     115b <xrename+0x3b>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeaa(%rip),%rdi
call   1040 <t_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrename>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <rename@plt>
test   %rax,%rax
je     114d <xrename+0x2d>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <t_error@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Unable to rename file %s to %s\00"
define void @xrename(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 i64 @rename(i8* %5, i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = call i32 @t_error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11)
br label %13
13: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"Unable to rename file %s to %s\00"
define void @xrename(i8* %0, i8* %1) {
%3 = tail call i64 @rename(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @t_error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
br label %7
7: ; preds = %5, %2
ret void
}
double f_fp_scalar_2(double x) { return x; }


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

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

LLVM IR (-O0):
define double @f_fp_scalar_2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
ret double %3
}

LLVM IR (-O2):
define double @f_fp_scalar_2(double returned %0) {
ret double %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_string(char *s) {
  int i;
  for (i = 0; s[i] != 0; i++)
    printf("%c", s[i]);
  printf("\n\n");
}


x86 assembly (clang, -O0):
<print_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1160 <print_string+0x50>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print_string+0x13>
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_string>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1143 <print_string+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <print_string+0x10>
lea    0xeb6(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [3 x i8] c"\0A\0A\00"
define void @print_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %20, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %23
12: ; preds = %4
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %18)
br label %20
20: ; preds = %12
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %4
23: ; preds = %4
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [2 x i8] c"\0A\00"
define void @print_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = phi i8 [ %11, %4 ], [ %2, %1 ]
%7 = sext i8 %6 to i32
%8 = tail call i32 @putchar(i32 %7)
%9 = add nuw i64 %5, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
double Sleef_trunc(double x) { return __builtin_trunc(x); }


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

x86 assembly (clang, -O2):
<Sleef_trunc>:
jmp    1030 <trunc@plt>

LLVM IR (-O0):
define double @Sleef_trunc(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.trunc.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @Sleef_trunc(double %0) {
%2 = tail call double @llvm.trunc.f64(double %0)
ret double %2
}
unsigned short array_uint16_le(const unsigned char data[]) {
  return data[0] + (data[1] << 8);
}


x86 assembly (clang, -O0):
<array_uint16_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_uint16_le>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define zeroext i16 @array_uint16_le(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = add nsw i32 %6, %11
%13 = trunc i32 %12 to i16
ret i16 %13
}

LLVM IR (-O2):
define zeroext i16 @array_uint16_le(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i16
%7 = shl nuw i16 %6, 8
%8 = or i16 %7, %3
ret i16 %8
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t mmax(uint32_t a, uint32_t b) { return (a > b) ? a : b; }


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

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

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

LLVM IR (-O2):
define i64 @mmax(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ writestr(int, char *);
void usage(void) { writestr(2, "usage: mkdir [-p] NAME ...\n"); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
lea    0xee0(%rip),%rsi
call   1030 <writestr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rsi
mov    $0x2,%edi
jmp    1030 <writestr@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"usage: mkdir [-p] NAME ...\0A\00"
define void @usage() {
%1 = call i32 @writestr(i32 2, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"usage: mkdir [-p] NAME ...\0A\00"
define void @usage() {
%1 = tail call i32 @writestr(i32 2, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}
int arg_int(int i, int j) {
  (void)j;
  return i;
}


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

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

LLVM IR (-O0):
define i32 @arg_int(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 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @arg_int(i32 returned %0, i32 %1) {
ret i32 %0
}
double dg1(double x) { return 1 - 1 / x; }


x86 assembly (clang, -O0):
<dg1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm1
divsd  -0x8(%rbp),%xmm1
movsd  0xee2(%rip),%xmm0
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dg1>:
movsd  0xef8(%rip),%xmm1
movapd %xmm1,%xmm2
divsd  %xmm0,%xmm2
subsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dg1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double 1.000000e+00, %3
%5 = fsub double 1.000000e+00, %4
ret double %5
}

LLVM IR (-O2):
define double @dg1(double %0) {
%2 = fdiv double 1.000000e+00, %0
%3 = fsub double 1.000000e+00, %2
ret double %3
}
void XUnionRectWithRegion() {}


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

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

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

LLVM IR (-O2):
define void @XUnionRectWithRegion() {
ret void
}
int test_imm_54int16_reg(short val) {
  return ((val) & (0x54 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_54int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x54,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_54int16_reg(i16 signext %0) {
%2 = and i16 %0, 84
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void PrintUsage() {
  printf("usage:\n tdbupdate [-na (don't rebuild animations)]\n");
}


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

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

LLVM IR (-O0):
@.str = [52 x i8] c"usage:\0A tdbupdate [-na (don't rebuild animations)]\0A\00"
define void @PrintUsage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [51 x i8] c"usage:\0A tdbupdate [-na (don't rebuild animations)]\00"
define void @PrintUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ fs_univ_append(int /*<<< orphan*/, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ main_time();
uint8_t fs_append(uint32_t rootinode, uint8_t sesflags, uint32_t inode,
                  uint32_t inode_src, uint32_t uid, uint32_t gids,
                  uint32_t *gid) {
  return fs_univ_append(main_time(), rootinode, sesflags, inode, inode_src, uid,
                        gids, gid);
}


x86 assembly (clang, -O0):
<fs_append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    $0x0,%al
call   1040 <main_time@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%r10d
mov    0x10(%rbp),%rax
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <fs_univ_append@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_append>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %edx,%r13d
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <main_time@plt>
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %r13d,%ecx
mov    %r12d,%r8d
mov    %r15d,%r9d
push   0x40(%rsp)
push   %r14
call   1030 <fs_univ_append@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fs_append(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32* %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32* %6, i32** %14
%15 = call i32 (...) @main_time()
%16 = load i32, i32* %8
%17 = load i32, i32* %9
%18 = load i32, i32* %10
%19 = load i32, i32* %11
%20 = load i32, i32* %12
%21 = load i32, i32* %13
%22 = load i32*, i32** %14
%23 = call i32 @fs_univ_append(i32 %15, i32 %16, i32 %17, i32 %18, i32 %19, i32 %20, i32 %21, i32* %22)
ret i32 %23
}

LLVM IR (-O2):
define i32 @fs_append(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32* %6) {
%8 = tail call i32 (...) @main_time()
%9 = tail call i32 @fs_univ_append(i32 %8, i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32* %6)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void montreerreur(char *chaine, int pos) {
  int i;
  printf("\n%s\n", chaine);
  for (i = 0; i < pos; i++) {
    printf(" ");
  }
  printf("^\n");
}


x86 assembly (clang, -O0):
<montreerreur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1160 <montreerreur+0x50>
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1138 <montreerreur+0x28>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<montreerreur>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xec3(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %ebx,%ebx
jle    115f <montreerreur+0x2f>
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1150 <montreerreur+0x20>
lea    0xe9f(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"\0A%s\0A\00"
@str = [2 x i8] c"^\00"
define void @montreerreur(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %10
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ 0, %2 ]
%7 = tail call i32 @putchar(i32 32)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, %1
br i1 %9, label %10, label %5
10: ; preds = %5, %2
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
const char *cbm_get_devfs_path(void) { return "/dev"; }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"/dev\00"
define i8* @cbm_get_devfs_path() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"/dev\00"
define i8* @cbm_get_devfs_path() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
int fn6(int x, int y) {
  int tem1 = ~(x & y);
  int tem2 = y | x;
  return tem1 & tem2;
}


x86 assembly (clang, -O0):
<fn6>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn6>:
mov    %edi,%eax
xor    %esi,%eax
ret

LLVM IR (-O0):
define i32 @fn6(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = and i32 %7, %8
%10 = xor i32 %9, -1
store i32 %10, i32* %5
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = or i32 %11, %12
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = and i32 %14, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @fn6(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
ret i32 %3
}
int checkPort(int port) {
  if (port > 0 && port <= 65535)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<checkPort>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    112a <checkPort+0x2a>
cmpl   $0xffff,-0x8(%rbp)
jg     112a <checkPort+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    1131 <checkPort+0x31>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkPort>:
add    $0xffff0000,%edi
xor    %eax,%eax
cmp    $0xffff0001,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @checkPort(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 65535
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 0, i32* %2
br label %11
10: ; preds = %6, %1
store i32 1, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @checkPort(i32 %0) {
%2 = add i32 %0, -65536
%3 = icmp ult i32 %2, -65535
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ power(long long **, long long);
int fib(long long int n) {
  long long int F[2][2] = {{1, 1}, {1, 0}};
  if (n == 0)
    return 0;
  power(F, n - 1);
  return F[0][0];
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    0xedd(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115f <fib+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    1177 <fib+0x67>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
sub    $0x1,%rsi
call   1030 <power@plt>
mov    -0x30(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
sub    $0x28,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
test   %rdi,%rdi
je     1147 <fib+0x37>
mov    %rdi,%rsi
add    $0xffffffffffffffff,%rsi
mov    %rsp,%rdi
call   1030 <power@plt>
mov    (%rsp),%eax
add    $0x28,%rsp
ret
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.fib.F = [2 x [2 x i64]] [[2 x i64] [i64 1, i64 1], [2 x i64] [i64 1, i64 0]]
define i32 @fib(i64 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca [2 x [2 x i64]]
store i64 %0, i64* %3
%5 = bitcast [2 x [2 x i64]]* %4 to i8*
%6 = load i64, i64* %3
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %19
9: ; preds = %1
%10 = getelementptr inbounds [2 x [2 x i64]], [2 x [2 x i64]]* %4, i64 0, i64 0
%11 = bitcast [2 x i64]* %10 to i64**
%12 = load i64, i64* %3
%13 = sub nsw i64 %12, 1
%14 = call i32 @power(i64** %11, i64 %13)
%15 = getelementptr inbounds [2 x [2 x i64]], [2 x [2 x i64]]* %4, i64 0, i64 0
%16 = getelementptr inbounds [2 x i64], [2 x i64]* %15, i64 0, i64 0
%17 = load i64, i64* %16
%18 = trunc i64 %17 to i32
store i32 %18, i32* %2
br label %19
19: ; preds = %9, %8
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@__const.fib.F = [2 x [2 x i64]] [[2 x i64] [i64 1, i64 1], [2 x i64] [i64 1, i64 0]]
define i32 @fib(i64 %0) {
%2 = alloca [2 x [2 x i64]]
%3 = bitcast [2 x [2 x i64]]* %2 to i8*
%4 = icmp eq i64 %0, 0
br i1 %4, label %12, label %5
5: ; preds = %1
%6 = bitcast [2 x [2 x i64]]* %2 to i64**
%7 = add nsw i64 %0, -1
%8 = call i32 @power(i64** %6, i64 %7)
%9 = getelementptr inbounds [2 x [2 x i64]], [2 x [2 x i64]]* %2, i64 0, i64 0, i64 0
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
br label %12
12: ; preds = %1, %5
%13 = phi i32 [ %11, %5 ], [ 0, %1 ]
ret i32 %13
}
void hamster_set_cookie(unsigned client_ip, const void *vdomain,
                        unsigned domain_length, const void *vpath,
                        unsigned path_length, const void *vname,
                        unsigned name_length, const void *vvalue,
                        unsigned value_length) {
  client_ip = (client_ip);
  vdomain = (vdomain);
  domain_length = (domain_length);
  vpath = (vpath);
  path_length = (path_length);
  vname = (vname);
  name_length = (name_length);
  vvalue = (vvalue);
  value_length = (value_length);
}


x86 assembly (clang, -O0):
<hamster_set_cookie>:
push   %rbp
mov    %rsp,%rbp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    0x10(%rbp),%eax
mov    %eax,0x10(%rbp)
mov    0x18(%rbp),%rax
mov    %rax,0x18(%rbp)
mov    0x20(%rbp),%eax
mov    %eax,0x20(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @hamster_set_cookie(i32 %0, i8* nocapture %1, i32 %2, i8* nocapture %3, i32 %4, i8* nocapture %5, i32 %6, i8* nocapture %7, i32 %8) {
ret void
}
void *Sys_FileMMap(void *handle) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @Sys_FileMMap(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ wait_for_thread_exit();
void initial_thread_exit_helper(void) {
  wait_for_thread_exit();
  _exit(0);
}


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

x86 assembly (clang, -O2):
<initial_thread_exit_helper>:
push   %rax
xor    %eax,%eax
call   1040 <wait_for_thread_exit@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @initial_thread_exit_helper() {
%1 = call i32 (...) @wait_for_thread_exit()
%2 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @initial_thread_exit_helper() {
%1 = tail call i32 (...) @wait_for_thread_exit()
%2 = tail call i32 @_exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void nrerror(char error_text[]) {
  fprintf(stderr, "Run-time error...\n");
  fprintf(stderr, "%s\n", error_text);
  assert(1);
}


x86 assembly (clang, -O0):
<nrerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xebc(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrerror>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
lea    0xec8(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r14),%edi
lea    0xeca(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    $0x1,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <assert@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Run-time error...\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @nrerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = tail call i32 @assert(i32 1)
ret void
}
/* Variables and functions */
float erfcore(float, int);
float erfc1(float x) {
  float y;
  y = erfcore(x, 1);
  return y;
}


x86 assembly (clang, -O0):
<erfc1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mov    $0x1,%edi
call   1030 <erfcore@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erfc1>:
mov    $0x1,%edi
jmp    1030 <erfcore@plt>

LLVM IR (-O0):
define float @erfc1(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = call float @erfcore(float %4, i32 1)
store float %5, float* %3
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
define float @erfc1(float %0) {
%2 = tail call float @erfcore(float %0, i32 1)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ cgincloc(char *, int, int);
void cgdeclw(int a) { cgincloc("sub", a, 1); }


x86 assembly (clang, -O0):
<cgdeclw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
mov    $0x1,%edx
call   1030 <cgincloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgdeclw>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
mov    $0x1,%edx
jmp    1030 <cgincloc@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"sub\00"
define void @cgdeclw(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cgincloc(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"sub\00"
define void @cgdeclw(i32 %0) {
%2 = tail call i32 @cgincloc(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
int SIGN_EXTEND_L_W(int reg) {
  addbyte(0x0f);
  addbyte(0xbf);
  addbyte(0xc0 | reg | (reg << 3));
  return reg;
}


x86 assembly (clang, -O0):
<SIGN_EXTEND_L_W>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xbf,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
or     $0xc0,%edi
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
or     %eax,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SIGN_EXTEND_L_W>:
push   %rbx
mov    %edi,%ebx
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xbf,%edi
call   1030 <addbyte@plt>
lea    0x0(,%rbx,8),%edi
or     %ebx,%edi
or     $0xc0,%edi
call   1030 <addbyte@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @SIGN_EXTEND_L_W(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @addbyte(i32 15)
%4 = call i32 @addbyte(i32 191)
%5 = load i32, i32* %2
%6 = or i32 192, %5
%7 = load i32, i32* %2
%8 = shl i32 %7, 3
%9 = or i32 %6, %8
%10 = call i32 @addbyte(i32 %9)
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @SIGN_EXTEND_L_W(i32 returned %0) {
%2 = tail call i32 @addbyte(i32 15)
%3 = tail call i32 @addbyte(i32 191)
%4 = shl i32 %0, 3
%5 = or i32 %4, %0
%6 = or i32 %5, 192
%7 = tail call i32 @addbyte(i32 %6)
ret i32 %0
}
/* Variables and functions */
int _ltoa_s(int, char *, size_t, int);
int _itoa_s(int value, char *str, size_t size, int radix) {
  return _ltoa_s(value, str, size, radix);
}


x86 assembly (clang, -O0):
<_itoa_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <_ltoa_s@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_itoa_s>:
jmp    1030 <_ltoa_s@plt>

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

LLVM IR (-O2):
define i32 @_itoa_s(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = tail call i32 @_ltoa_s(i32 %0, i8* %1, i64 %2, i32 %3)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ i2d_of_void;
typedef int /*<<< orphan*/ FILE;
typedef int /*<<< orphan*/ EC_KEY;

/* Variables and functions */
int PEM_ASN1_write(int /*<<< orphan*/ *, int /*<<< orphan*/,
                   int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   int /*<<< orphan*/, int /*<<< orphan*/ *,
                   int /*<<< orphan*/ *);
int /*<<< orphan*/ PEM_STRING_PUBLIC;
scalar_t__ i2d_EC_PUBKEY;
int PEM_write_EC_PUBKEY(FILE *fp, EC_KEY *x) {
  return PEM_ASN1_write((i2d_of_void *)i2d_EC_PUBKEY, PEM_STRING_PUBLIC, fp, x,
                        NULL, NULL, 0, NULL, NULL);
}


x86 assembly (clang, -O0):
<PEM_write_EC_PUBKEY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed1(%rip),%rax
mov    (%rax),%rdi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r9d
xor    %eax,%eax
mov    %r9,%r8
movl   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <PEM_ASN1_write@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_write_EC_PUBKEY>:
sub    $0x18,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ed7(%rip),%rax
mov    (%rax),%rdi
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
movl   $0x0,(%rsp)
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <PEM_ASN1_write@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@i2d_EC_PUBKEY = global i64 0
@PEM_STRING_PUBLIC = global i32 0
define i32 @PEM_write_EC_PUBKEY(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i64, i64* @i2d_EC_PUBKEY
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_PUBLIC
%8 = load i32*, i32** %3
%9 = load i32*, i32** %4
%10 = call i32 @PEM_ASN1_write(i32* %6, i32 %7, i32* %8, i32* %9, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %10
}

LLVM IR (-O2):
@i2d_EC_PUBKEY = global i64 0
@PEM_STRING_PUBLIC = global i32 0
define i32 @PEM_write_EC_PUBKEY(i32* %0, i32* %1) {
%3 = load i64, i64* @i2d_EC_PUBKEY
%4 = inttoptr i64 %3 to i32*
%5 = load i32, i32* @PEM_STRING_PUBLIC
%6 = tail call i32 @PEM_ASN1_write(i32* %4, i32 %5, i32* %0, i32* %1, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %6
}
int elm327_ign_hook() { return -1; }


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

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

LLVM IR (-O0):
define i32 @elm327_ign_hook() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @elm327_ign_hook() {
ret i32 -1
}
void use(int x) { __asm__ __volatile__("" : : "r"(x) : "cc", "memory"); }


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

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

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

LLVM IR (-O2):
define void @use(i32 %0) {
tail call void asm sideeffect "", "r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret void
}
char **getEnvironment() {
  extern char **environ;
  return environ;
}


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

x86 assembly (clang, -O2):
<getEnvironment>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%rax
ret

LLVM IR (-O0):
@environ = external global i8**
define i8** @getEnvironment() {
%1 = load i8**, i8*** @environ
ret i8** %1
}

LLVM IR (-O2):
@environ = external global i8**
define i8** @getEnvironment() {
%1 = load i8**, i8*** @environ
ret i8** %1
}
/* Variables and functions */
int funcB();
int funcA() { return funcB(); }


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

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

LLVM IR (-O0):
define i32 @funcA() {
%1 = call i32 (...) @funcB()
ret i32 %1
}

LLVM IR (-O2):
define i32 @funcA() {
%1 = tail call i32 (...) @funcB()
ret i32 %1
}