xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ msg;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ write(int, char *, int);
void _Unwind_RaiseException() {
  char msg[] = "Aborting: "
               "_Unwind_RaiseException"
               " called "
               "(C++ exception handling is disabled)\n";
  write(2, msg, sizeof(msg) - 1);
  abort();
}


x86 assembly (clang, -O0):
<_Unwind_RaiseException>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x4e,%edx
call   1050 <memcpy@plt>
lea    -0x50(%rbp),%rsi
mov    $0x2,%edi
mov    $0x4d,%edx
call   1040 <write@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<_Unwind_RaiseException>:
sub    $0x58,%rsp
movups 0xf13(%rip),%xmm0
movups %xmm0,0x3e(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x2,%edi
mov    $0x4d,%edx
call   1040 <write@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@__const._Unwind_RaiseException.msg = [78 x i8] c"Aborting: _Unwind_RaiseException called (C++ exception handling is disabled)\0A\00"
define void @_Unwind_RaiseException() {
%1 = alloca [78 x i8]
%2 = bitcast [78 x i8]* %1 to i8*
%3 = getelementptr inbounds [78 x i8], [78 x i8]* %1, i64 0, i64 0
%4 = call i32 @write(i32 2, i8* %3, i32 77)
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@__const._Unwind_RaiseException.msg = [78 x i8] c"Aborting: _Unwind_RaiseException called (C++ exception handling is disabled)\0A\00"
define void @_Unwind_RaiseException() {
%1 = alloca [78 x i8]
%2 = getelementptr inbounds [78 x i8], [78 x i8]* %1, i64 0, i64 0
%3 = call i32 @write(i32 2, i8* %2, i32 77)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Your test code goes here.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Your test code goes here.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [26 x i8] c"Your test code goes here.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void imprimeVetor(float dadosImp[]) {
  int posicao;
  for (posicao = 0; posicao < 32; posicao++) {
    printf("%2.2f ", dadosImp[posicao]);
  }
  printf("\n\n");
}


x86 assembly (clang, -O0):
<imprimeVetor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    115a <imprimeVetor+0x4a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xebb(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <imprimeVetor+0x13>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimeVetor>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
xor    %ebx,%ebx
lea    0xecf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movss  (%r15,%rbx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    1140 <imprimeVetor+0x20>
lea    0xea2(%rip),%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%2.2f \00"
@.str.1 = [3 x i8] c"\0A\0A\00"
define void @imprimeVetor(float* %0) {
%2 = alloca float*
%3 = alloca i32
store float* %0, float** %2
store i32 0, i32* %3
br label %4
4: ; preds = %15, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 32
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load float*, float** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds float, float* %8, i64 %10
%12 = load float, float* %11
%13 = fpext float %12 to double
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %13)
br label %15
15: ; preds = %7
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %4
18: ; preds = %4
%19 = 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 = [7 x i8] c"%2.2f \00"
@str = [2 x i8] c"\0A\00"
define void @imprimeVetor(float* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %8, %2 ]
%4 = getelementptr inbounds float, float* %0, i64 %3
%5 = load float, float* %4
%6 = fpext float %5 to double
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %6)
%8 = add nuw nsw i64 %3, 1
%9 = icmp eq i64 %8, 32
br i1 %9, label %10, label %2
10: ; preds = %2
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ om_html_entities(int /*<<< orphan*/ *, char *);
void om_html_print_subtitle(FILE *fp, char *subtitle) {
  fprintf(fp, "<tr><td align=\"center\" class=\"subtitle\" colspan=\"3\">");
  om_html_entities(fp, subtitle);
  fprintf(fp, "</td></tr>\n");
}


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

x86 assembly (clang, -O2):
<om_html_print_subtitle>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
mov    $0x34,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <om_html_entities@plt>
lea    0xee0(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
@.str = [53 x i8] c"<tr><td align=\22center\22 class=\22subtitle\22 colspan=\223\22>\00"
@.str.1 = [12 x i8] c"</td></tr>\0A\00"
define void @om_html_print_subtitle(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%7 = load i32*, i32** %3
%8 = load i8*, i8** %4
%9 = call i32 @om_html_entities(i32* %7, i8* %8)
%10 = load i32*, i32** %3
%11 = call i32 @fprintf(i32* %10, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [53 x i8] c"<tr><td align=\22center\22 class=\22subtitle\22 colspan=\223\22>\00"
@.str.1 = [12 x i8] c"</td></tr>\0A\00"
define void @om_html_print_subtitle(i32* %0, i8* %1) {
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i64 52, i64 1, i32* %0)
%4 = tail call i32 @om_html_entities(i32* %0, i8* %1)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i64 11, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int u8isbasesigni(int /*<<< orphan*/);
int /*<<< orphan*/ u8tointc(char *);
int u8isbasesignc(char *c) { return u8isbasesigni(u8tointc(c)); }


x86 assembly (clang, -O0):
<u8isbasesignc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <u8tointc@plt>
mov    %eax,%edi
call   1040 <u8isbasesigni@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8isbasesignc>:
push   %rax
call   1030 <u8tointc@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <u8isbasesigni@plt>

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

LLVM IR (-O2):
define i32 @u8isbasesignc(i8* %0) {
%2 = tail call i32 @u8tointc(i8* %0)
%3 = tail call i32 @u8isbasesigni(i32 %2)
ret i32 %3
}
/* Variables and functions */
unsigned char *ecdh_compute_shared_key(unsigned char *, unsigned char const *,
                                       size_t, unsigned char const *, size_t);
unsigned char *ke_ecdh_shared(unsigned char *shared, const unsigned char *pub,
                              size_t pub_size, const unsigned char *priv,
                              size_t priv_size) {
  return ecdh_compute_shared_key(shared, pub, pub_size, priv, priv_size);
}


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

x86 assembly (clang, -O2):
<ke_ecdh_shared>:
jmp    1030 <ecdh_compute_shared_key@plt>

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

LLVM IR (-O2):
define i8* @ke_ecdh_shared(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = tail call i8* @ecdh_compute_shared_key(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4)
ret i8* %6
}
int abs(int n) {
  if (n < 0) {
    return -n;
  } else {
    return n;
  }
}


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <abs+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void SHAMD5DMAEnable(uint32_t ui32Base) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000110))) |= 0x00000080 | 0x00000008;
}


x86 assembly (clang, -O0):
<SHAMD5DMAEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x110,%eax
cltq
mov    (%rax),%ecx
or     $0x88,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAMD5DMAEnable>:
movslq %edi,%rax
orl    $0x88,0x110(%rax)
ret

LLVM IR (-O0):
define void @SHAMD5DMAEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 272
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = or i32 %7, 136
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @SHAMD5DMAEnable(i32 %0) {
%2 = add nsw i32 %0, 272
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = or i32 %5, 136
store volatile i32 %6, i32* %4
ret void
}
/* Type definitions */
struct obj {
  int dummy;
};

/* Variables and functions */
scalar_t__ literal_type(struct obj *);
scalar_t__ object(struct obj *);
int type(struct obj *obj) { return literal_type(obj) || object(obj); }


x86 assembly (clang, -O0):
<type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <literal_type@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    115a <type+0x3a>
mov    -0x8(%rbp),%rdi
call   1040 <object@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<type>:
push   %rbx
mov    %rdi,%rbx
call   1030 <literal_type@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1138 <type+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <object@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
%struct.obj = type { i32 }
define i32 @type(%struct.obj* %0) {
%2 = alloca %struct.obj*
store %struct.obj* %0, %struct.obj** %2
%3 = load %struct.obj*, %struct.obj** %2
%4 = call i64 @literal_type(%struct.obj* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load %struct.obj*, %struct.obj** %2
%8 = call i64 @object(%struct.obj* %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
%struct.obj = type { i32 }
define i32 @type(%struct.obj* %0) {
%2 = tail call i64 @literal_type(%struct.obj* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @object(%struct.obj* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
typedef float uint32_t;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, float);
void ironlake_debug_panel_fitting_4(char *result, int len, int reg,
                                    uint32_t val, uint32_t devid) {
  snprintf(result, len, "hscale %f", val / (float)(1 << 15));
}


x86 assembly (clang, -O0):
<ironlake_debug_panel_fitting_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movss  %xmm1,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movss  -0x14(%rbp),%xmm0
movss  0xec0(%rip),%xmm1
divss  %xmm1,%xmm0
lea    0xeb9(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ironlake_debug_panel_fitting_4>:
mulss  0xee8(%rip),%xmm0
lea    0xee5(%rip),%rdx
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"hscale %f\00"
define void @ironlake_debug_panel_fitting_4(i8* %0, i32 %1, i32 %2, float %3, float %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca float
%10 = alloca float
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store float %3, float* %9
store float %4, float* %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load float, float* %9
%14 = fdiv float %13, 3.276800e+04
%15 = call i32 @snprintf(i8* %11, i32 %12, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float %14)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"hscale %f\00"
define void @ironlake_debug_panel_fitting_4(i8* %0, i32 %1, i32 %2, float %3, float %4) {
%6 = fmul float %3, 0x3F00000000000000
%7 = tail call i32 @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float %6)
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EACCES;
int /*<<< orphan*/ errno;
int _stat(char *file, struct stat *st) {
  errno = EACCES;
  return -1;
}


x86 assembly (clang, -O0):
<_stat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_stat>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@EACCES = global i32 0
@errno = global i32 0
define i32 @_stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i32, i32* @EACCES
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@EACCES = global i32 0
@errno = global i32 0
define i32 @_stat(i8* nocapture readnone %0, %struct.stat* nocapture readnone %1) {
%3 = load i32, i32* @EACCES
store i32 %3, i32* @errno
ret i32 -1
}
void gtk_button_new_with_label() {}


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

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

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

LLVM IR (-O2):
define void @gtk_button_new_with_label() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ wcsncpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, size_t);
void uninivar_wcsncpy(void) {
  wchar_t *cs;
  wchar_t *ct;
  size_t n;
  (void)wcsncpy(cs, ct, n);
}


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

x86 assembly (clang, -O2):
<uninivar_wcsncpy>:
jmp    1030 <wcsncpy@plt>

LLVM IR (-O0):
define void @uninivar_wcsncpy() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i64
%4 = load i32*, i32** %1
%5 = load i32*, i32** %2
%6 = load i64, i64* %3
%7 = call i32 @wcsncpy(i32* %4, i32* %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @uninivar_wcsncpy() {
%1 = tail call i32 @wcsncpy(i32* undef, i32* undef, i64 undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_usage() {
  fprintf(stderr, "usage: mkrootramfs [options] in-dir\n");
  fprintf(stderr, "options:\n");
  fprintf(stderr, "    -o outfile\t\tSpecifies the path of the output file.\n "
                  "\t\t\tDefaults to \"rootramfs\".\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xeec(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xee1(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef6(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef2(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"usage: mkrootramfs [options] in-dir\0A\00"
@.str.1 = [10 x i8] c"options:\0A\00"
@.str.2 = [85 x i8] c" -o outfile\09\09Specifies the path of the output file.\0A \09\09\09Defaults to \22rootramfs\22.\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"usage: mkrootramfs [options] in-dir\0A\00"
@.str.1 = [10 x i8] c"options:\0A\00"
@.str.2 = [85 x i8] c" -o outfile\09\09Specifies the path of the output file.\0A \09\09\09Defaults to \22rootramfs\22.\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int kill(int, int);
int stop_process(int pid) { return kill(pid, 15); }


x86 assembly (clang, -O0):
<stop_process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xf,%esi
call   1030 <kill@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop_process>:
mov    $0xf,%esi
jmp    1030 <kill@plt>

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

LLVM IR (-O2):
define i32 @stop_process(i32 %0) {
%2 = tail call i32 @kill(i32 %0, i32 15)
ret i32 %2
}
void retro_deinit() {}


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

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

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

LLVM IR (-O2):
define void @retro_deinit() {
ret void
}
int get_nrating(int p0, double *ratp) {
  (void)(p0);
  (void)(ratp);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @get_nrating(i32 %0, double* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ENOMEM;
void *decibel_brk(void *);
int /*<<< orphan*/ errno;
int brk(void *addr) {
  void *curbrk = decibel_brk((void *)0);
  void *newbrk = decibel_brk(addr);
  if (newbrk != curbrk)
    return 0;
  else {
    errno = ENOMEM;
    return -1;
  }
}


x86 assembly (clang, -O0):
<brk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <decibel_brk@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <decibel_brk@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     1150 <brk+0x40>
movl   $0x0,-0x4(%rbp)
jmp    1169 <brk+0x59>
mov    0x2e89(%rip),%rax
mov    (%rax),%ecx
mov    0x2e78(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brk>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
xor    %r14d,%r14d
xor    %edi,%edi
call   1030 <decibel_brk@plt>
mov    %rax,%rbx
mov    %r15,%rdi
call   1030 <decibel_brk@plt>
cmp    %rbx,%rax
jne    114a <brk+0x3a>
mov    0x2ea7(%rip),%rax
mov    (%rax),%eax
mov    0x2e96(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@ENOMEM = global i32 0
@errno = global i32 0
define i32 @brk(i8* %0) {
%2 = tail call i8* @decibel_brk(i8* null)
%3 = tail call i8* @decibel_brk(i8* %0)
%4 = icmp eq i8* %3, %2
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* @ENOMEM
store i32 %6, i32* @errno
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ -1, %5 ], [ 0, %1 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_condattr_t;
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ *malloc(int);
int pthread_cond_init(int /*<<< orphan*/ *, int /*<<< orphan*/ const *);
int my_pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr) {
  pthread_cond_t *realcond = malloc(sizeof(pthread_cond_t));
  *((int *)cond) = (int)realcond;
  return pthread_cond_init(realcond, attr);
}


x86 assembly (clang, -O0):
<my_pthread_cond_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <pthread_cond_init@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_pthread_cond_init>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %eax,(%rbx)
mov    %rax,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <pthread_cond_init@plt>

LLVM IR (-O0):
define i32 @my_pthread_cond_init(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = call i32* @malloc(i32 4)
store i32* %6, i32** %5
%7 = load i32*, i32** %5
%8 = ptrtoint i32* %7 to i32
%9 = load i32*, i32** %3
store i32 %8, i32* %9
%10 = load i32*, i32** %5
%11 = load i32*, i32** %4
%12 = call i32 @pthread_cond_init(i32* %10, i32* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @my_pthread_cond_init(i32* nocapture writeonly %0, i32* %1) {
%3 = tail call i32* @malloc(i32 4)
%4 = ptrtoint i32* %3 to i64
%5 = trunc i64 %4 to i32
store i32 %5, i32* %0
%6 = tail call i32 @pthread_cond_init(i32* %3, i32* %1)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
int /*<<< orphan*/ VelocityActualHandle();
void VelocityActualRequestUpdate() {
  UAVObjRequestUpdate(VelocityActualHandle());
}


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

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

LLVM IR (-O0):
define void @VelocityActualRequestUpdate() {
%1 = call i32 (...) @VelocityActualHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @VelocityActualRequestUpdate() {
%1 = tail call i32 (...) @VelocityActualHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
const char *rcsid(const char *p) {
  return rcsid(
      p = "@(#)$File: softmagic.c,v 1.120 2008/07/28 17:25:21 christos Exp $");
}


x86 assembly (clang, -O0):
<rcsid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <rcsid@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [66 x i8] c"@(#)$File: softmagic.c,v 1.120 2008/07/28 17:25:21 christos Exp $\00"
define i8* @rcsid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i8* @rcsid(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}

LLVM IR (-O2):
define noalias i8* @rcsid(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ finish();
GS_SEND() { finish(); }


x86 assembly (clang, -O0):
<GS_SEND>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <finish@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @GS_SEND() {
%1 = alloca i32
%2 = call i32 (...) @finish()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @GS_SEND() {
%1 = tail call i32 (...) @finish()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ LDD(int, int);
int /*<<< orphan*/ T_WAIT_UNTIL(int);
void op_ED_0xa8(void) {
  LDD(4, 7);
  T_WAIT_UNTIL(12);
  return;
}


x86 assembly (clang, -O0):
<op_ED_0xa8>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
mov    $0x7,%esi
call   1030 <LDD@plt>
mov    $0xc,%edi
call   1040 <T_WAIT_UNTIL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_ED_0xa8>:
push   %rax
mov    $0x4,%edi
mov    $0x7,%esi
call   1030 <LDD@plt>
mov    $0xc,%edi
pop    %rax
jmp    1040 <T_WAIT_UNTIL@plt>

LLVM IR (-O0):
define void @op_ED_0xa8() {
%1 = call i32 @LDD(i32 4, i32 7)
%2 = call i32 @T_WAIT_UNTIL(i32 12)
ret void
}

LLVM IR (-O2):
define void @op_ED_0xa8() {
%1 = tail call i32 @LDD(i32 4, i32 7)
%2 = tail call i32 @T_WAIT_UNTIL(i32 12)
ret void
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(char);
int main() {
  char c;
  printf("Enter character: ");
  c = getchar();
  printf("Character entered: ");
  putchar(c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
movsbl %bl,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Enter character: \00"
@.str.1 = [20 x i8] c"Character entered: \00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = call signext i8 (...) @getchar()
store i8 %3, i8* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%5 = load i8, i8* %1
%6 = call i32 @putchar(i8 signext %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Enter character: \00"
@.str.1 = [20 x i8] c"Character entered: \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = tail call signext i8 (...) @getchar()
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @putchar(i8 signext %2)
ret i32 0
}
extern __attribute__((__gnu___)) double __attribute__((__const__))
creal(double _Complex _Z) {
  return __real__ _Z;
}


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

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

LLVM IR (-O0):
define double @creal(double %0, double %1) {
%3 = alloca { double, double }
%4 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
store double %0, double* %4
%5 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %1, double* %5
%6 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%7 = load double, double* %6
ret double %7
}

LLVM IR (-O2):
define double @creal(double returned %0, double %1) {
ret double %0
}
/* Variables and functions */
int /*<<< orphan*/ shutdown(int, int);
void close_tcp_connection(int sfd) { shutdown(sfd, 2); }


x86 assembly (clang, -O0):
<close_tcp_connection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1030 <shutdown@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_tcp_connection>:
mov    $0x2,%esi
jmp    1030 <shutdown@plt>

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

LLVM IR (-O2):
define void @close_tcp_connection(i32 %0) {
%2 = tail call i32 @shutdown(i32 %0, i32 2)
ret void
}
fatal(s1, s2) char *s1, *s2;
{
  error(s1, s2);
  exit((1));
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rax
xor    %eax,%eax
call   1030 <error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @fatal(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, i8*, ...)*)(i8* %5, i8* %6)
unreachable
}

LLVM IR (-O2):
define i32 @fatal(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, i8*, ...)*)(i8* %0, i8* %1)
tail call void @exit(i32 1)
unreachable
}
unsigned int skipBytes(const unsigned char c) {
  unsigned char num = 7;
  unsigned char testBit = 1;
  unsigned int numSkip = 0;
  while (1) {
    if (c & (testBit << num)) {
      numSkip++;
      num--;
    } else {
      break;
    }
  }
  return numSkip - 1;
}


x86 assembly (clang, -O0):
<skipBytes>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x7,-0x2(%rbp)
movb   $0x1,-0x3(%rbp)
movl   $0x0,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x3(%rbp),%edx
movzbl -0x2(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     114a <skipBytes+0x4a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x2(%rbp),%al
add    $0xff,%al
mov    %al,-0x2(%rbp)
jmp    114f <skipBytes+0x4f>
jmp    1154 <skipBytes+0x54>
jmp    1119 <skipBytes+0x19>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipBytes>:
mov    $0xffffffff,%eax
test   $0x80,%dil
je     1120 <skipBytes+0x20>
mov    $0x1,%eax
lea    0x5(%rax),%ecx
movzbl %cl,%ecx
add    $0xffffffff,%eax
bt     %ecx,%edi
jb     1110 <skipBytes+0x10>
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @skipBytes(i8 zeroext %0) {
%2 = zext i8 %0 to i32
%3 = and i32 %2, 128
%4 = icmp eq i32 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %1, %5
%6 = phi i32 [ %8, %5 ], [ 0, %1 ]
%7 = phi i8 [ %9, %5 ], [ 7, %1 ]
%8 = add i32 %6, 1
%9 = add i8 %7, -1
%10 = zext i8 %9 to i32
%11 = shl nuw i32 1, %10
%12 = and i32 %11, %2
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %1
%15 = phi i32 [ -1, %1 ], [ %6, %5 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ dcopy(int const *, double const *, int const *, double *,
                         int const *);
void c_dcopy(const int N, const double *X, const int strideX, double *Y,
             const int strideY) {
  dcopy(&N, X, &strideX, Y, &strideY);
}


x86 assembly (clang, -O0):
<c_dcopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    -0x4(%rbp),%rdi
lea    -0x14(%rbp),%rdx
lea    -0x24(%rbp),%r8
call   1030 <dcopy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_dcopy>:
sub    $0x18,%rsp
mov    %edi,0x14(%rsp)
mov    %edx,0x10(%rsp)
mov    %r8d,0xc(%rsp)
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%r8
call   1030 <dcopy@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @c_dcopy(i32 %0, double* %1, i32 %2, double* %3, i32 %4) {
%6 = alloca i32
%7 = alloca double*
%8 = alloca i32
%9 = alloca double*
%10 = alloca i32
store i32 %0, i32* %6
store double* %1, double** %7
store i32 %2, i32* %8
store double* %3, double** %9
store i32 %4, i32* %10
%11 = load double*, double** %7
%12 = load double*, double** %9
%13 = call i32 @dcopy(i32* %6, double* %11, i32* %8, double* %12, i32* %10)
ret void
}

LLVM IR (-O2):
define void @c_dcopy(i32 %0, double* %1, i32 %2, double* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %6
store i32 %2, i32* %7
store i32 %4, i32* %8
%9 = call i32 @dcopy(i32* %6, double* %1, i32* %7, double* %3, i32* %8)
ret void
}
/* Variables and functions */
int erf(double);
double normInt(double X, double Y) { return (erf(0.7 * Y) - erf(0.7 * X)) / 2; }


x86 assembly (clang, -O0):
<normInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xed6(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <erf@plt>
mov    %eax,-0x14(%rbp)
movsd  0xec1(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <erf@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normInt>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mulsd  0xedd(%rip),%xmm1
movapd %xmm1,%xmm0
call   1030 <erf@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
mulsd  0xec4(%rip),%xmm0
call   1030 <erf@plt>
sub    %eax,%ebx
mov    %ebx,%eax
shr    $0x1f,%eax
add    %ebx,%eax
sar    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @normInt(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fmul double 0x3FE6666666666666, %5
%7 = call i32 @erf(double %6)
%8 = load double, double* %3
%9 = fmul double 0x3FE6666666666666, %8
%10 = call i32 @erf(double %9)
%11 = sub nsw i32 %7, %10
%12 = sdiv i32 %11, 2
%13 = sitofp i32 %12 to double
ret double %13
}

LLVM IR (-O2):
define double @normInt(double %0, double %1) {
%3 = fmul double %1, 0x3FE6666666666666
%4 = tail call i32 @erf(double %3)
%5 = fmul double %0, 0x3FE6666666666666
%6 = tail call i32 @erf(double %5)
%7 = sub nsw i32 %4, %6
%8 = sdiv i32 %7, 2
%9 = sitofp i32 %8 to double
ret double %9
}
void update_subcore_sibling_mask(void) {}


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

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

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

LLVM IR (-O2):
define void @update_subcore_sibling_mask() {
ret void
}
/* Variables and functions */
char *p_dngettext(char const *, char const *, char const *, unsigned long);
int /*<<< orphan*/ setup();
char *g_libintl_dngettext(const char *domainname, const char *msgid1,
                          const char *msgid2, unsigned long int n) {
  setup();
  return p_dngettext(domainname, msgid1, msgid2, n);
}


x86 assembly (clang, -O0):
<g_libintl_dngettext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x0,%al
call   1040 <setup@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <p_dngettext@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_libintl_dngettext>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <setup@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <p_dngettext@plt>

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

LLVM IR (-O2):
define i8* @g_libintl_dngettext(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = tail call i32 (...) @setup()
%6 = tail call i8* @p_dngettext(i8* %0, i8* %1, i8* %2, i64 %3)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ waitpid(int, int *, int /*<<< orphan*/);
void reapchild(int exitstat) {
  int status;
  waitpid(-1, &status, 0);
}


x86 assembly (clang, -O0):
<reapchild>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xffffffff,%edi
lea    -0x8(%rbp),%rsi
xor    %edx,%edx
call   1030 <waitpid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reapchild>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0xffffffff,%edi
xor    %edx,%edx
call   1030 <waitpid@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @reapchild(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @waitpid(i32 -1, i32* %2, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ Nvm_Update();
int /*<<< orphan*/ Nvm_Write(unsigned int, int /*<<< orphan*/ *, int);
void Settings_StoreBuildInfo(char *line) {
  Nvm_Write(942U, (uint8_t *)line, 80);
  Nvm_Update();
}


x86 assembly (clang, -O0):
<Settings_StoreBuildInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x3ae,%edi
mov    $0x50,%edx
call   1030 <Nvm_Write@plt>
mov    $0x0,%al
call   1040 <Nvm_Update@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Settings_StoreBuildInfo>:
push   %rax
mov    %rdi,%rsi
mov    $0x3ae,%edi
mov    $0x50,%edx
call   1030 <Nvm_Write@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <Nvm_Update@plt>

LLVM IR (-O0):
define void @Settings_StoreBuildInfo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = call i32 @Nvm_Write(i32 942, i32* %4, i32 80)
%6 = call i32 (...) @Nvm_Update()
ret void
}

LLVM IR (-O2):
define void @Settings_StoreBuildInfo(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @Nvm_Write(i32 942, i32* %2, i32 80)
%4 = tail call i32 (...) @Nvm_Update()
ret void
}
int fastceil(float x) {
  int ix = (int)x;
  return ix + (ix < x);
}


x86 assembly (clang, -O0):
<fastceil>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cvtsi2ssl -0x8(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
ucomiss %xmm1,%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastceil>:
cvttss2si %xmm0,%ecx
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
seta   %al
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fastceil(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = load float, float* %2
%5 = fptosi float %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to float
%9 = load float, float* %2
%10 = fcmp olt float %8, %9
%11 = zext i1 %10 to i32
%12 = add nsw i32 %6, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @fastceil(float %0) {
%2 = fptosi float %0 to i32
%3 = sitofp i32 %2 to float
%4 = fcmp olt float %3, %0
%5 = zext i1 %4 to i32
%6 = add nsw i32 %5, %2
ret i32 %6
}
/* Type definitions */
typedef size_t ssize_t;
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
size_t sendfile(int, int, int /*<<< orphan*/ *, size_t);
ssize_t xsendfile(int out_fd, int in_fd, off_t *offset, size_t count) {
  ssize_t ret = sendfile(out_fd, in_fd, offset, count);
  if (count != ret) {
    ;
  }
  return ret;
}


x86 assembly (clang, -O0):
<xsendfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <sendfile@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
je     1150 <xsendfile+0x40>
jmp    1150 <xsendfile+0x40>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xsendfile>:
jmp    1030 <sendfile@plt>

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

LLVM IR (-O2):
define i64 @xsendfile(i32 %0, i32 %1, i32* %2, i64 %3) {
%5 = tail call i64 @sendfile(i32 %0, i32 %1, i32* %2, i64 %3)
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
int iswupper(int /*<<< orphan*/);
int __iswupper_l(wint_t c, locale_t l) { return iswupper(c); }


x86 assembly (clang, -O0):
<__iswupper_l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <iswupper@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__iswupper_l>:
jmp    1030 <iswupper@plt>

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

LLVM IR (-O2):
define i32 @__iswupper_l(i32 %0, i32 %1) {
%3 = tail call i32 @iswupper(i32 %0)
ret i32 %3
}