xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ e();
void a(int c, char **d) {
  char b;
  if (1 < c)
    b = (char)(long int)d[0];
  if (1 < c && b)
    e();
  while (1 < c)
    ;
}


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
cmp    -0x4(%rbp),%eax
jge    1137 <a+0x27>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %al,-0x11(%rbp)
mov    $0x1,%eax
cmp    -0x4(%rbp),%eax
jge    1159 <a+0x49>
movsbl -0x11(%rbp),%eax
cmp    $0x0,%eax
je     1159 <a+0x49>
mov    $0x0,%al
call   1030 <e@plt>
jmp    115e <a+0x4e>
mov    $0x1,%eax
cmp    -0x4(%rbp),%eax
jge    1171 <a+0x61>
jmp    115e <a+0x4e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
cmp    $0x2,%edi
jl     1132 <a+0x22>
push   %rax
cmpb   $0x0,(%rsi)
je     1122 <a+0x12>
xor    %eax,%eax
call   1030 <e@plt>
add    $0x8,%rsp
cs nopw 0x0(%rax,%rax,1)
jmp    1130 <a+0x20>
ret

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

LLVM IR (-O2):
define void @a(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = ptrtoint i8* %5 to i64
%7 = and i64 %6, 255
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %4
%10 = tail call i32 (...) @e()
br label %11
11: ; preds = %4, %9
br label %12
12: ; preds = %11, %12
br label %12
13: ; preds = %2
ret void
}
/* Variables and functions */
double fmod(int, double);
double pow(int, int);
double generateRandu(void) {
  static double xn = 1;
  double exponent = pow(2, 31);
  double value = xn;
  xn = fmod((65539 * xn), exponent);
  return value;
}


x86 assembly (clang, -O0):
<generateRandu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
mov    $0x1f,%esi
call   1040 <pow@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  0x2eec(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeaf(%rip),%xmm0
mulsd  0x2ed7(%rip),%xmm0
cvttsd2si %xmm0,%edi
movsd  -0x8(%rbp),%xmm0
call   1030 <fmod@plt>
movsd  %xmm0,0x2ec1(%rip)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generateRandu>:
push   %rax
mov    $0x2,%edi
mov    $0x1f,%esi
call   1040 <pow@plt>
movsd  0x2ef8(%rip),%xmm2
movsd  %xmm2,(%rsp)
movsd  0xebb(%rip),%xmm1
mulsd  %xmm2,%xmm1
cvttsd2si %xmm1,%edi
call   1030 <fmod@plt>
movsd  %xmm0,0x2ed6(%rip)
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@generateRandu.xn = internal global double 1.000000e+00
define double @generateRandu() {
%1 = alloca double
%2 = alloca double
%3 = call double @pow(i32 2, i32 31)
store double %3, double* %1
%4 = load double, double* @generateRandu.xn
store double %4, double* %2
%5 = load double, double* @generateRandu.xn
%6 = fmul double 6.553900e+04, %5
%7 = fptosi double %6 to i32
%8 = load double, double* %1
%9 = call double @fmod(i32 %7, double %8)
store double %9, double* @generateRandu.xn
%10 = load double, double* %2
ret double %10
}

LLVM IR (-O2):
@generateRandu.xn = internal unnamed_addr global double 1.000000e+00
define double @generateRandu() {
%1 = tail call double @pow(i32 2, i32 31)
%2 = load double, double* @generateRandu.xn
%3 = fmul double %2, 6.553900e+04
%4 = fptosi double %3 to i32
%5 = tail call double @fmod(i32 %4, double %1)
store double %5, double* @generateRandu.xn
ret double %2
}
/* Variables and functions */
int get_schoenflies(char *, double **, double **, int const *, int const,
                    double const, double);
int spg_get_schoenflies(char symbol[7], double lattice[3][3],
                        double position[][3], const int types[],
                        const int num_atom, const double symprec) {
  return get_schoenflies(symbol, lattice, position, types, num_atom, symprec,
                         -1.0);
}


x86 assembly (clang, -O0):
<spg_get_schoenflies>:
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    %r8d,-0x24(%rbp)
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
movsd  -0x30(%rbp),%xmm0
movsd  0xeae(%rip),%xmm1
call   1030 <get_schoenflies@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spg_get_schoenflies>:
movsd  0xee8(%rip),%xmm1
jmp    1030 <get_schoenflies@plt>

LLVM IR (-O0):
define i32 @spg_get_schoenflies(i8* %0, [3 x double]* %1, [3 x double]* %2, i32* %3, i32 %4, double %5) {
%7 = alloca i8*
%8 = alloca [3 x double]*
%9 = alloca [3 x double]*
%10 = alloca i32*
%11 = alloca i32
%12 = alloca double
store i8* %0, i8** %7
store [3 x double]* %1, [3 x double]** %8
store [3 x double]* %2, [3 x double]** %9
store i32* %3, i32** %10
store i32 %4, i32* %11
store double %5, double* %12
%13 = load i8*, i8** %7
%14 = load [3 x double]*, [3 x double]** %8
%15 = bitcast [3 x double]* %14 to double**
%16 = load [3 x double]*, [3 x double]** %9
%17 = bitcast [3 x double]* %16 to double**
%18 = load i32*, i32** %10
%19 = load i32, i32* %11
%20 = load double, double* %12
%21 = call i32 @get_schoenflies(i8* %13, double** %15, double** %17, i32* %18, i32 %19, double %20, double -1.000000e+00)
ret i32 %21
}

LLVM IR (-O2):
define i32 @spg_get_schoenflies(i8* %0, [3 x double]* %1, [3 x double]* %2, i32* %3, i32 %4, double %5) {
%7 = bitcast [3 x double]* %1 to double**
%8 = bitcast [3 x double]* %2 to double**
%9 = tail call i32 @get_schoenflies(i8* %0, double** %7, double** %8, i32* %3, i32 %4, double %5, double -1.000000e+00)
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int realopen64(char const *, int, int /*<<< orphan*/);
scalar_t__ strncmp(char const *, char *, int);
int open64(__const char *__file, int __oflag, mode_t __mode) {
  if (strncmp(__file, "/dev/dvb/adapter", 16) == 0)
    __oflag |= (010000 | 020000);
  return realopen64(__file, __oflag, __mode);
}


x86 assembly (clang, -O0):
<open64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec3(%rip),%rsi
mov    $0x10,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    115c <open64+0x3c>
mov    -0xc(%rbp),%eax
or     $0x3000,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <realopen64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open64>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xecd(%rip),%rsi
mov    $0x10,%edx
call   1030 <strncmp@plt>
mov    %ebp,%esi
or     $0x3000,%esi
test   %rax,%rax
cmovne %ebp,%esi
mov    %rbx,%rdi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <realopen64@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"/dev/dvb/adapter\00"
define i32 @open64(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 16)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i32, i32* %5
%12 = or i32 %11, 12288
store i32 %12, i32* %5
br label %13
13: ; preds = %10, %3
%14 = load i8*, i8** %4
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = call i32 @realopen64(i8* %14, i32 %15, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
@.str = [17 x i8] c"/dev/dvb/adapter\00"
define i32 @open64(i8* %0, i32 %1, i32 %2) {
%4 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 16)
%5 = icmp eq i64 %4, 0
%6 = or i32 %1, 12288
%7 = select i1 %5, i32 %6, i32 %1
%8 = tail call i32 @realopen64(i8* %0, i32 %7, i32 %2)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_print_top_bottom(int x) {
  ft_putchar('o');
  while (x > 2) {
    ft_putchar('-');
    x--;
  }
  if (x > 1) {
    ft_putchar('o');
  }
  ft_putchar('\n');
}


x86 assembly (clang, -O0):
<ft_print_top_bottom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x6f,%edi
call   1030 <ft_putchar@plt>
cmpl   $0x2,-0x4(%rbp)
jle    1147 <ft_print_top_bottom+0x37>
mov    $0x2d,%edi
call   1030 <ft_putchar@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1125 <ft_print_top_bottom+0x15>
cmpl   $0x1,-0x4(%rbp)
jle    115b <ft_print_top_bottom+0x4b>
mov    $0x6f,%edi
call   1030 <ft_putchar@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print_top_bottom>:
push   %rbx
mov    %edi,%ebx
mov    $0x6f,%edi
call   1030 <ft_putchar@plt>
cmp    $0x3,%ebx
jl     1144 <ft_print_top_bottom+0x34>
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x2d,%edi
call   1030 <ft_putchar@plt>
add    $0xffffffff,%ebx
cmp    $0x3,%ebx
ja     1130 <ft_print_top_bottom+0x20>
jmp    1149 <ft_print_top_bottom+0x39>
cmp    $0x2,%ebx
jne    1153 <ft_print_top_bottom+0x43>
mov    $0x6f,%edi
call   1030 <ft_putchar@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_print_top_bottom(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @ft_putchar(i8 signext 111)
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 2
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = call i32 @ft_putchar(i8 signext 45)
%9 = load i32, i32* %2
%10 = add nsw i32 %9, -1
store i32 %10, i32* %2
br label %4
11: ; preds = %4
%12 = load i32, i32* %2
%13 = icmp sgt i32 %12, 1
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @ft_putchar(i8 signext 111)
br label %16
16: ; preds = %14, %11
%17 = call i32 @ft_putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @ft_print_top_bottom(i32 %0) {
%2 = tail call i32 @ft_putchar(i8 signext 111)
%3 = icmp sgt i32 %0, 2
br i1 %3, label %4, label %9
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ %0, %1 ]
%6 = tail call i32 @ft_putchar(i8 signext 45)
%7 = add nsw i32 %5, -1
%8 = icmp ugt i32 %5, 3
br i1 %8, label %4, label %11
9: ; preds = %1
%10 = icmp eq i32 %0, 2
br i1 %10, label %11, label %13
11: ; preds = %4, %9
%12 = tail call i32 @ft_putchar(i8 signext 111)
br label %13
13: ; preds = %11, %9
%14 = tail call i32 @ft_putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bad_eof();
int getchar_update_lineno();
int getchar_no_eof(void) {
  int c;
  c = getchar_update_lineno();
  if (c == -1)
    bad_eof();
  return c;
}


x86 assembly (clang, -O0):
<getchar_no_eof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getchar_update_lineno@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    1143 <getchar_no_eof+0x23>
mov    $0x0,%al
call   1030 <bad_eof@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getchar_no_eof>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar_update_lineno@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1136 <getchar_no_eof+0x16>
xor    %eax,%eax
call   1030 <bad_eof@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @getchar_no_eof() {
%1 = tail call i32 (...) @getchar_update_lineno()
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @bad_eof()
br label %5
5: ; preds = %3, %0
ret i32 %1
}
float fqbe(float x) { return x * x * x; }


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

x86 assembly (clang, -O2):
<fqbe>:
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @fqbe(float %0) {
%2 = fmul float %0, %0
%3 = fmul float %2, %0
ret float %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
char *ultoa(unsigned int, char *, int /*<<< orphan*/);
char *utoa(unsigned a, char *buffer, uint8_t radix) {
  return ultoa((unsigned)a, buffer, radix);
}


x86 assembly (clang, -O0):
<utoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <ultoa@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utoa>:
jmp    1030 <ultoa@plt>

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

LLVM IR (-O2):
define i8* @utoa(i32 %0, i8* %1, i32 %2) {
%4 = tail call i8* @ultoa(i32 %0, i8* %1, i32 %2)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fprintf(int /*<<< orphan*/ *, char *);
int fprint_bgpfilter_help(FILE *out) {
  return fprintf(out, "BGP routes can be filtered on :\n"
                      " -prefix\n"
                      " -mask\n"
                      " -gw\n"
                      " -LOCAL_PREF, MED, weight\n"
                      " -Valid, Best\n"
                      " -AS_PATH =, <, > and # compare AS_PATH length;"
                      " to compare actual AS_PATH, use '~')\n\n"
                      "operators are :\n"
                      "- '=' (EQUALS)\n"
                      "- '#' (DIFFERENT)\n"
                      "- '<' (numerically inferior)\n"
                      "- '>' (numerically superior)\n"
                      "- '{' (is included (for prefixes))\n"
                      "- '}' (includes (for prefixes))\n"
                      "- '~' (st_scanf regular expression)\n");
}


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

x86 assembly (clang, -O2):
<fprint_bgpfilter_help>:
lea    0xee9(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [389 x i8] c"BGP routes can be filtered on :\0A -prefix\0A -mask\0A -gw\0A -LOCAL_PREF, MED, weight\0A -Valid, Best\0A -AS_PATH =, <, > and # compare AS_PATH length; to compare actual AS_PATH, use '~')\0A\0Aoperators are :\0A- '=' (EQUALS)\0A- '#' (DIFFERENT)\0A- '<' (numerically inferior)\0A- '>' (numerically superior)\0A- '{' (is included (for prefixes))\0A- '}' (includes (for prefixes))\0A- '~' (st_scanf regular expression)\0A\00"
define i32 @fprint_bgpfilter_help(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([389 x i8], [389 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [389 x i8] c"BGP routes can be filtered on :\0A -prefix\0A -mask\0A -gw\0A -LOCAL_PREF, MED, weight\0A -Valid, Best\0A -AS_PATH =, <, > and # compare AS_PATH length; to compare actual AS_PATH, use '~')\0A\0Aoperators are :\0A- '=' (EQUALS)\0A- '#' (DIFFERENT)\0A- '<' (numerically inferior)\0A- '>' (numerically superior)\0A- '{' (is included (for prefixes))\0A- '}' (includes (for prefixes))\0A- '~' (st_scanf regular expression)\0A\00"
define i32 @fprint_bgpfilter_help(i32* nocapture %0) {
%2 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([389 x i8], [389 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
double __nv_cosh(double);
double cosh(double __a) { return __nv_cosh(__a); }


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

x86 assembly (clang, -O2):
<cosh>:
jmp    1030 <__nv_cosh@plt>

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

LLVM IR (-O2):
define double @cosh(double %0) {
%2 = tail call double @__nv_cosh(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ WriteInstruction(char *);
void CR_Get(void) { WriteInstruction("call getobj"); }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"call getobj\00"
define void @CR_Get() {
%1 = tail call i32 @WriteInstruction(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
void Job_End(void) {}


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

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

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

LLVM IR (-O2):
define void @Job_End() {
ret void
}
void foo730(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo730(i32 %0) {
ret void
}
int OpenLink(Name)
char *Name;
{}


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

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

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

LLVM IR (-O2):
define i32 @OpenLink(i8* nocapture readnone %0) {
ret i32 undef
}
int fun1199() { return 1199; }


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

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

LLVM IR (-O0):
define i32 @fun1199() {
ret i32 1199
}

LLVM IR (-O2):
define i32 @fun1199() {
ret i32 1199
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int CloseFile(int fd) {
  close(fd);
  return (-1);
}


x86 assembly (clang, -O0):
<CloseFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CloseFile>:
push   %rax
call   1030 <close@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @CloseFile(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
size_t send(int, int /*<<< orphan*/ *, size_t, int /*<<< orphan*/);
size_t hw_send(int session_id, uint8_t data[], size_t data_len) {
  return send(session_id, data, data_len, 0);
}


x86 assembly (clang, -O0):
<hw_send>:
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
xor    %ecx,%ecx
call   1030 <send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hw_send>:
xor    %ecx,%ecx
jmp    1030 <send@plt>

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

LLVM IR (-O2):
define i64 @hw_send(i32 %0, i32* %1, i64 %2) {
%4 = tail call i64 @send(i32 %0, i32* %1, i64 %2, i32 0)
ret i64 %4
}
/* Variables and functions */
int LOG_CONS;
int /*<<< orphan*/ LOG_LOCAL0;
int LOG_PERROR;
int LOG_PID;
int /*<<< orphan*/ openlog(char *, int, int /*<<< orphan*/);
void initlog(void) {
  openlog("44ripd", LOG_CONS | LOG_PERROR | LOG_PID, LOG_LOCAL0);
}


x86 assembly (clang, -O0):
<initlog>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
mov    0x2ebc(%rip),%rax
or     (%rax),%esi
mov    0x2ea3(%rip),%rax
or     (%rax),%esi
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
lea    0xec1(%rip),%rdi
call   1030 <openlog@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initlog>:
mov    0x2eb1(%rip),%rax
mov    0x2ec2(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2ea7(%rip),%rax
or     (%rax),%esi
mov    0x2eb6(%rip),%rax
mov    (%rax),%edx
lea    0xec5(%rip),%rdi
jmp    1030 <openlog@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"44ripd\00"
@LOG_CONS = global i32 0
@LOG_PERROR = global i32 0
@LOG_PID = global i32 0
@LOG_LOCAL0 = global i32 0
define void @initlog() {
%1 = load i32, i32* @LOG_CONS
%2 = load i32, i32* @LOG_PERROR
%3 = or i32 %1, %2
%4 = load i32, i32* @LOG_PID
%5 = or i32 %3, %4
%6 = load i32, i32* @LOG_LOCAL0
%7 = call i32 @openlog(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"44ripd\00"
@LOG_CONS = global i32 0
@LOG_PERROR = global i32 0
@LOG_PID = global i32 0
@LOG_LOCAL0 = global i32 0
define void @initlog() {
%1 = load i32, i32* @LOG_CONS
%2 = load i32, i32* @LOG_PERROR
%3 = or i32 %2, %1
%4 = load i32, i32* @LOG_PID
%5 = or i32 %3, %4
%6 = load i32, i32* @LOG_LOCAL0
%7 = tail call i32 @openlog(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}
/* Variables and functions */
int strcmp(char const *const, char const *const);
int reverse_strcmp(const void *x, const void *y) {
  const char *const *x1 = x;
  const char *const *y1 = y;
  return strcmp(*y1, *x1);
}


x86 assembly (clang, -O0):
<reverse_strcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_strcmp>:
mov    (%rsi),%rax
mov    (%rdi),%rsi
mov    %rax,%rdi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @reverse_strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %6
%11 = load i8**, i8*** %6
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %5
%14 = load i8*, i8** %13
%15 = call i32 @strcmp(i8* %12, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @reverse_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ add_sub_butterfly(int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ *const, int);
int /*<<< orphan*/ idct32_34_8x32_quarter_1(int /*<<< orphan*/ const *const,
                                            int /*<<< orphan*/ *);
int /*<<< orphan*/ idct32_34_8x32_quarter_2(int /*<<< orphan*/ const *const,
                                            int /*<<< orphan*/ *);
void idct32_34_8x32_quarter_1_2(const __m128i *const in, __m128i *const out) {
  __m128i temp[16];
  idct32_34_8x32_quarter_1(in, temp);
  idct32_34_8x32_quarter_2(in, temp);
  add_sub_butterfly(temp, out, 16);
}


x86 assembly (clang, -O0):
<idct32_34_8x32_quarter_1_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1040 <idct32_34_8x32_quarter_1@plt>
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1050 <idct32_34_8x32_quarter_2@plt>
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x10,%edx
call   1030 <add_sub_butterfly@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idct32_34_8x32_quarter_1_2>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%r15
mov    %r15,%rsi
call   1040 <idct32_34_8x32_quarter_1@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <idct32_34_8x32_quarter_2@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x10,%edx
call   1030 <add_sub_butterfly@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @idct32_34_8x32_quarter_1_2(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [16 x i32]
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 0, i64 0
%8 = call i32 @idct32_34_8x32_quarter_1(i32* %6, i32* %7)
%9 = load i32*, i32** %3
%10 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 0, i64 0
%11 = call i32 @idct32_34_8x32_quarter_2(i32* %9, i32* %10)
%12 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 0, i64 0
%13 = load i32*, i32** %4
%14 = call i32 @add_sub_butterfly(i32* %12, i32* %13, i32 16)
ret void
}

LLVM IR (-O2):
define void @idct32_34_8x32_quarter_1_2(i32* %0, i32* %1) {
%3 = alloca [16 x i32]
%4 = bitcast [16 x i32]* %3 to i8*
%5 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 0
%6 = call i32 @idct32_34_8x32_quarter_1(i32* %0, i32* %5)
%7 = call i32 @idct32_34_8x32_quarter_2(i32* %0, i32* %5)
%8 = call i32 @add_sub_butterfly(i32* %5, i32* %1, i32 16)
ret void
}
double Power(double base, double exponent) {
  union {
    double d;
    int x[2];
  } u = {base};
  u.x[1] = (int)(exponent * (u.x[1] - 1072632447) + 1072632447);
  u.x[0] = 0;
  return u.d;
}


x86 assembly (clang, -O0):
<Power>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%eax
sub    $0x3fef127f,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xecb(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Power>:
movq   %xmm0,%rax
shr    $0x20,%rax
add    $0xc010ed81,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  %xmm1,%xmm0
addsd  0xedf(%rip),%xmm0
cvttsd2si %xmm0,%eax
shl    $0x20,%rax
movq   %rax,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { double }
define double @Power(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca %union.anon
store double %0, double* %3
store double %1, double* %4
%6 = bitcast %union.anon* %5 to double*
%7 = load double, double* %3
store double %7, double* %6
%8 = load double, double* %4
%9 = bitcast %union.anon* %5 to [2 x i32]*
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 1
%11 = load i32, i32* %10
%12 = sub nsw i32 %11, 1072632447
%13 = sitofp i32 %12 to double
%14 = call double @llvm.fmuladd.f64(double %8, double %13, double 0x41CFF7893F800000)
%15 = fptosi double %14 to i32
%16 = bitcast %union.anon* %5 to [2 x i32]*
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %16, i64 0, i64 1
store i32 %15, i32* %17
%18 = bitcast %union.anon* %5 to [2 x i32]*
%19 = getelementptr inbounds [2 x i32], [2 x i32]* %18, i64 0, i64 0
store i32 0, i32* %19
%20 = bitcast %union.anon* %5 to double*
%21 = load double, double* %20
ret double %21
}

LLVM IR (-O2):
define double @Power(double %0, double %1) {
%3 = bitcast double %0 to i64
%4 = lshr i64 %3, 32
%5 = trunc i64 %4 to i32
%6 = add nsw i32 %5, -1072632447
%7 = sitofp i32 %6 to double
%8 = tail call double @llvm.fmuladd.f64(double %1, double %7, double 0x41CFF7893F800000)
%9 = fptosi double %8 to i32
%10 = zext i32 %9 to i64
%11 = shl nuw i64 %10, 32
%12 = bitcast i64 %11 to double
ret double %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;
typedef scalar_t__ int16_t;

/* Variables and functions */
uint8_t uchar_clamp_ff(float clr) {
  uint16_t result;
  result = (uint16_t)(int16_t)(clr + 0.5);
  if (result > 255) {
    result = (clr < 0) ? 0 : 255;
  }
  return (uint8_t)result;
}


x86 assembly (clang, -O0):
<uchar_clamp_ff>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %eax,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jle    114b <uchar_clamp_ff+0x4b>
movss  -0x4(%rbp),%xmm1
xorps  %xmm0,%xmm0
mov    $0xff,%eax
xor    %ecx,%ecx
ucomiss %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uchar_clamp_ff>:
cvtss2sd %xmm0,%xmm1
addsd  0xef4(%rip),%xmm1
cvttsd2si %xmm1,%rcx
xor    %edx,%edx
xorpd  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
mov    $0xff,%eax
cmova  %edx,%eax
cmp    $0x100,%ecx
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @uchar_clamp_ff(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fadd double %5, 5.000000e-01
%7 = fptosi double %6 to i64
%8 = trunc i64 %7 to i32
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 255
br i1 %10, label %11, label %16
11: ; preds = %1
%12 = load float, float* %2
%13 = fcmp olt float %12, 0.000000e+00
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 0, i32 255
store i32 %15, i32* %3
br label %16
16: ; preds = %11, %1
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @uchar_clamp_ff(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, 5.000000e-01
%4 = fptosi double %3 to i64
%5 = trunc i64 %4 to i32
%6 = icmp sgt i32 %5, 255
%7 = fcmp olt float %0, 0.000000e+00
%8 = select i1 %7, i32 0, i32 255
%9 = select i1 %6, i32 %8, i32 %5
ret i32 %9
}
/* Type definitions */
struct sched_param {
  int dummy;
};
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int pthread_attr_setschedparam(pthread_attr_t *attr,
                               const struct sched_param *param) {
  (void)attr;
  (void)param;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.sched_param = type { i32 }
define i32 @pthread_attr_setschedparam(i32* %0, %struct.sched_param* %1) {
%3 = alloca i32*
%4 = alloca %struct.sched_param*
store i32* %0, i32** %3
store %struct.sched_param* %1, %struct.sched_param** %4
%5 = load i32*, i32** %3
%6 = load %struct.sched_param*, %struct.sched_param** %4
ret i32 0
}

LLVM IR (-O2):
%struct.sched_param = type { i32 }
define i32 @pthread_attr_setschedparam(i32* nocapture readnone %0, %struct.sched_param* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int snprintf(char *, size_t, char const *, char const *, char *, char *);
int build_path(char *buff, size_t len, const char *format, const char *home) {
  if (snprintf(buff, len, format, home, ".android", "adb_usb.ini") >=
      (signed)len) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<build_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
lea    0xec1(%rip),%r8
lea    0xec3(%rip),%r9
call   1030 <snprintf@plt>
mov    -0x18(%rbp),%rcx
cmp    %ecx,%eax
jl     1163 <build_path+0x53>
movl   $0x1,-0x4(%rbp)
jmp    116a <build_path+0x5a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_path>:
push   %rbx
mov    %rsi,%rbx
lea    0xee5(%rip),%r8
lea    0xee7(%rip),%r9
call   1030 <snprintf@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
setge  %cl
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c".android\00"
@.str.1 = [12 x i8] c"adb_usb.ini\00"
define i32 @build_path(i8* %0, i64 %1, i8* %2, i8* %3) {
%5 = tail call i32 @snprintf(i8* %0, i64 %1, i8* %2, i8* %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%6 = trunc i64 %1 to i32
%7 = icmp sge i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void free_pam2p(int **pam2p) {
  if (pam2p) {
    free(pam2p[0]);
    free(pam2p);
  }
}


x86 assembly (clang, -O0):
<free_pam2p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113c <free_pam2p+0x2c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_pam2p>:
test   %rdi,%rdi
je     112a <free_pam2p+0x1a>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @free_pam2p(i32** %0) {
%2 = icmp eq i32** %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = bitcast i32** %0 to i8**
%5 = load i8*, i8** %4
tail call void @free(i8* %5)
%6 = bitcast i32** %0 to i8*
tail call void @free(i8* %6)
br label %7
7: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
int gt_ht_finalize2_u32(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ gt_uint32_key_mul_hash(int);
uint32_t gt_uint64_key_mul_hash(uint64_t key) {
  uint32_t low = key, hi = key >> 32;
  uint32_t x = gt_ht_finalize2_u32(gt_uint32_key_mul_hash(low),
                                   gt_uint32_key_mul_hash(hi));
  return x;
}


x86 assembly (clang, -O0):
<gt_uint64_key_mul_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <gt_uint32_key_mul_hash@plt>
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <gt_uint32_key_mul_hash@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <gt_ht_finalize2_u32@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gt_uint64_key_mul_hash>:
push   %rbx
call   1030 <gt_uint32_key_mul_hash@plt>
mov    %eax,%ebx
call   1030 <gt_uint32_key_mul_hash@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <gt_ht_finalize2_u32@plt>

LLVM IR (-O0):
define i32 @gt_uint64_key_mul_hash(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = ashr i32 %7, 32
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = call i32 @gt_uint32_key_mul_hash(i32 %9)
%11 = load i32, i32* %4
%12 = call i32 @gt_uint32_key_mul_hash(i32 %11)
%13 = call i32 @gt_ht_finalize2_u32(i32 %10, i32 %12)
store i32 %13, i32* %5
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @gt_uint64_key_mul_hash(i32 %0) {
%2 = tail call i32 @gt_uint32_key_mul_hash(i32 %0)
%3 = tail call i32 @gt_uint32_key_mul_hash(i32 poison)
%4 = tail call i32 @gt_ht_finalize2_u32(i32 %2, i32 %3)
ret i32 %4
}
__attribute__((no)) char *bar(char *x, unsigned int y) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @bar(i8* nocapture readnone %0, i32 %1) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ dmem_release(void *);
void sfree(void *ptr) {
  if (ptr) {
    dmem_release(ptr);
  }
  return;
}


x86 assembly (clang, -O0):
<sfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <sfree+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <dmem_release@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @sfree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @dmem_release(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @sfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @dmem_release(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
struct user_desc {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SYS_modify_ldt;
int errno;
int syscall(int /*<<< orphan*/, int, struct user_desc *, unsigned long);
int safe_modify_ldt(int func, struct user_desc *ptr, unsigned long bytecount) {
  int ret = syscall(SYS_modify_ldt, 0x11, ptr, bytecount);
  if (ret < -1)
    errno = -ret;
  return ret;
}


x86 assembly (clang, -O0):
<safe_modify_ldt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x11,%esi
call   1030 <syscall@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jge    1159 <safe_modify_ldt+0x49>
xor    %ecx,%ecx
sub    -0x1c(%rbp),%ecx
mov    0x2e89(%rip),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_modify_ldt>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    $0x11,%esi
call   1030 <syscall@plt>
cmp    $0xfffffffe,%eax
jg     113c <safe_modify_ldt+0x2c>
mov    %eax,%ecx
neg    %ecx
mov    0x2ea6(%rip),%rdx
mov    %ecx,(%rdx)
pop    %rcx
ret

LLVM IR (-O0):
%struct.user_desc = type { i32 }
@SYS_modify_ldt = global i32 0
@errno = global i32 0
define i32 @safe_modify_ldt(i32 %0, %struct.user_desc* %1, i64 %2) {
%4 = alloca i32
%5 = alloca %struct.user_desc*
%6 = alloca i64
%7 = alloca i32
store i32 %0, i32* %4
store %struct.user_desc* %1, %struct.user_desc** %5
store i64 %2, i64* %6
%8 = load i32, i32* @SYS_modify_ldt
%9 = load %struct.user_desc*, %struct.user_desc** %5
%10 = load i64, i64* %6
%11 = call i32 @syscall(i32 %8, i32 17, %struct.user_desc* %9, i64 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp slt i32 %12, -1
br i1 %13, label %14, label %17
14: ; preds = %3
%15 = load i32, i32* %7
%16 = sub nsw i32 0, %15
store i32 %16, i32* @errno
br label %17
17: ; preds = %14, %3
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
%struct.user_desc = type { i32 }
@SYS_modify_ldt = global i32 0
@errno = global i32 0
define i32 @safe_modify_ldt(i32 %0, %struct.user_desc* %1, i64 %2) {
%4 = load i32, i32* @SYS_modify_ldt
%5 = tail call i32 @syscall(i32 %4, i32 17, %struct.user_desc* %1, i64 %2)
%6 = icmp slt i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = sub nsw i32 0, %5
store i32 %8, i32* @errno
br label %9
9: ; preds = %7, %3
ret i32 %5
}
int nxtd_usb_disconnect(struct nxtd_nxt_usb *nxt) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.nxtd_nxt_usb = type opaque
define i32 @nxtd_usb_disconnect(%struct.nxtd_nxt_usb* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ update_func(float);
void _gfks_call_update(float time_step) { update_func(time_step); }


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

x86 assembly (clang, -O2):
<_gfks_call_update>:
jmp    1030 <update_func@plt>

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

LLVM IR (-O2):
define void @_gfks_call_update(float %0) {
%2 = tail call i32 @update_func(float %0)
ret void
}
/* Variables and functions */
double __ocml_ceil_f64(double);
double ceil(double x) { return __ocml_ceil_f64(x); }


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

x86 assembly (clang, -O2):
<ceil>:
jmp    1030 <__ocml_ceil_f64@plt>

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

LLVM IR (-O2):
define double @ceil(double %0) {
%2 = tail call double @__ocml_ceil_f64(double %0)
ret double %2
}
unsigned short __atomic_fetch_sub_2(volatile void *atom, unsigned short value,
                                    int memorder) {
  unsigned short xchg;
  unsigned short cmp;
  __atomic_load((unsigned short *)atom, (unsigned short *)&cmp, 0);
  do {
    xchg = ((cmp - value));
  } while (
      !__atomic_compare_exchange((unsigned short *)atom, &cmp, &xchg, 1, 5, 5));
  return cmp;
}


x86 assembly (clang, -O0):
<__atomic_fetch_sub_2>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ax
mov    %ax,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
movzwl -0xa(%rbp),%ecx
sub    %ecx,%eax
mov    %ax,-0x12(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x14(%rbp),%ax
mov    -0x12(%rbp),%dx
lock cmpxchg %dx,(%rcx)
mov    %ax,%cx
sete   %al
mov    %al,-0x19(%rbp)
mov    %cx,-0x18(%rbp)
test   $0x1,%al
jne    1159 <__atomic_fetch_sub_2+0x59>
mov    -0x18(%rbp),%ax
mov    %ax,-0x14(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
xor    $0xff,%al
test   $0x1,%al
jne    111d <__atomic_fetch_sub_2+0x1d>
movzwl -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__atomic_fetch_sub_2>:
movzwl (%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
mov    %ecx,%edx
sub    %esi,%edx
lock cmpxchg %dx,(%rdi)
jne    1110 <__atomic_fetch_sub_2+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i16 @__atomic_fetch_sub_2(i8* %0, i16 zeroext %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i16
%6 = alloca i32
%7 = alloca i16
%8 = alloca i16
%9 = alloca i8
store i8* %0, i8** %4
store i16 %1, i16* %5
store i32 %2, i32* %6
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i16*
%12 = load atomic i16, i16* %11 monotonic
store i16 %12, i16* %8
br label %13
13: ; preds = %29, %3
%14 = load i16, i16* %8
%15 = zext i16 %14 to i32
%16 = load i16, i16* %5
%17 = zext i16 %16 to i32
%18 = sub nsw i32 %15, %17
%19 = trunc i32 %18 to i16
store i16 %19, i16* %7
br label %20
20: ; preds = %13
%21 = load i8*, i8** %4
%22 = bitcast i8* %21 to i16*
%23 = load i16, i16* %8
%24 = load i16, i16* %7
%25 = cmpxchg weak i16* %22, i16 %23, i16 %24 seq_cst seq_cst
%26 = extractvalue { i16, i1 } %25, 0
%27 = extractvalue { i16, i1 } %25, 1
br i1 %27, label %29, label %28
28: ; preds = %20
store i16 %26, i16* %8
br label %29
29: ; preds = %28, %20
%30 = zext i1 %27 to i8
store i8 %30, i8* %9
%31 = load i8, i8* %9
%32 = trunc i8 %31 to i1
%33 = xor i1 %32, true
br i1 %33, label %13, label %34
34: ; preds = %29
%35 = load i16, i16* %8
ret i16 %35
}

LLVM IR (-O2):
define zeroext i16 @__atomic_fetch_sub_2(i8* nocapture %0, i16 zeroext %1, i32 %2) {
%4 = bitcast i8* %0 to i16*
%5 = load atomic i16, i16* %4 monotonic
br label %6
6: ; preds = %6, %3
%7 = phi i16 [ %5, %3 ], [ %11, %6 ]
%8 = sub i16 %7, %1
%9 = cmpxchg weak i16* %4, i16 %7, i16 %8 seq_cst seq_cst
%10 = extractvalue { i16, i1 } %9, 1
%11 = extractvalue { i16, i1 } %9, 0
br i1 %10, label %12, label %6
12: ; preds = %6
ret i16 %7
}
/* Variables and functions */
double sla_dvdv(double *, double *);
double csla_dvdv(double va[3], double vb[3]) { return sla_dvdv(va, vb); }


x86 assembly (clang, -O0):
<csla_dvdv>:
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 <sla_dvdv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csla_dvdv>:
jmp    1030 <sla_dvdv@plt>

LLVM IR (-O0):
define double @csla_dvdv(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double*, double** %4
%7 = call double @sla_dvdv(double* %5, double* %6)
ret double %7
}

LLVM IR (-O2):
define double @csla_dvdv(double* %0, double* %1) {
%3 = tail call double @sla_dvdv(double* %0, double* %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ closelog();
void sfd_log_close(void) { closelog(); }


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

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

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

LLVM IR (-O2):
define void @sfd_log_close() {
%1 = tail call i32 (...) @closelog()
ret void
}