xunge/DecIR huggingface dataset:
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int nl = 0, c;
  while ((c = getchar()) != EOF)
    if (c == '\n')
      ++nl;
  printf("%d\n", nl);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0xc(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     1167 <main+0x47>
cmpl   $0xa,-0xc(%rbp)
jne    1162 <main+0x42>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    -0x8(%rbp),%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb4(%rip),%r14
cmp    (%r14),%eax
je     1156 <main+0x36>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %ecx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
jne    1140 <main+0x20>
lea    0xea3(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ %1, %0 ]
%6 = phi i32 [ %9, %4 ], [ 0, %0 ]
%7 = icmp eq i32 %5, 10
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %6, %8
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %0
%14 = phi i32 [ 0, %0 ], [ %9, %4 ]
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void yyerror(const char *s) {
  fprintf(stderr, "parse error: %s\n", s);
  exit(2);
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<yyerror>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"parse error: %s\0A\00"
define void @yyerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"parse error: %s\0A\00"
define void @yyerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char l, m;
  scanf("%c", &l);
  m = 'a' + 'z' - l;
  printf("%c", m);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%ecx
mov    $0xdb,%eax
sub    %ecx,%eax
mov    %al,-0x6(%rbp)
lea    0xeac(%rip),%rdi
movsbl -0x6(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xf(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    $0xdb,%al
sub    0xf(%rsp),%al
movsbl %al,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sub i8 -37, %3
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %4)
ret i32 0
}
/* Variables and functions */
int PAPI_destroy_eventset(int *);
void papif_destroy_eventset__(int *EventSet, int *check) {
  *check = PAPI_destroy_eventset(EventSet);
}


x86 assembly (clang, -O0):
<papif_destroy_eventset__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <PAPI_destroy_eventset@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<papif_destroy_eventset__>:
push   %rbx
mov    %rsi,%rbx
call   1030 <PAPI_destroy_eventset@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @papif_destroy_eventset__(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 @PAPI_destroy_eventset(i32* %5)
%7 = load i32*, i32** %4
store i32 %6, i32* %7
ret void
}

LLVM IR (-O2):
define void @papif_destroy_eventset__(i32* %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @PAPI_destroy_eventset(i32* %0)
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int dbar(double, double);
int dv(double, double);
int sb(double, double);
int ubar(double, double);
double F2_cc_anu_n(double xx, double Q2) {
  return 2 * (dv(xx, Q2) + sb(xx, Q2) + ubar(xx, Q2) + dbar(xx, Q2));
}


x86 assembly (clang, -O0):
<F2_cc_anu_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1050 <dv@plt>
mov    %eax,-0x1c(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <sb@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <ubar@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1060 <dbar@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<F2_cc_anu_n>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1050 <dv@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1030 <sb@plt>
mov    %eax,%ebp
add    %ebx,%ebp
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1040 <ubar@plt>
mov    %eax,%ebx
add    %ebp,%ebx
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1060 <dbar@plt>
add    %ebx,%eax
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @F2_cc_anu_n(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 i32 @dv(double %5, double %6)
%8 = load double, double* %3
%9 = load double, double* %4
%10 = call i32 @sb(double %8, double %9)
%11 = add nsw i32 %7, %10
%12 = load double, double* %3
%13 = load double, double* %4
%14 = call i32 @ubar(double %12, double %13)
%15 = add nsw i32 %11, %14
%16 = load double, double* %3
%17 = load double, double* %4
%18 = call i32 @dbar(double %16, double %17)
%19 = add nsw i32 %15, %18
%20 = mul nsw i32 2, %19
%21 = sitofp i32 %20 to double
ret double %21
}

LLVM IR (-O2):
define double @F2_cc_anu_n(double %0, double %1) {
%3 = tail call i32 @dv(double %0, double %1)
%4 = tail call i32 @sb(double %0, double %1)
%5 = add nsw i32 %4, %3
%6 = tail call i32 @ubar(double %0, double %1)
%7 = add nsw i32 %5, %6
%8 = tail call i32 @dbar(double %0, double %1)
%9 = add nsw i32 %7, %8
%10 = shl nsw i32 %9, 1
%11 = sitofp i32 %10 to double
ret double %11
}
/* Variables and functions */
void *memset(int /*<<< orphan*/, int /*<<< orphan*/, size_t);
int /*<<< orphan*/ xmalloc(size_t);
void *xzalloc(size_t size) { return memset(xmalloc(size), 0, size); }


x86 assembly (clang, -O0):
<xzalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <xmalloc@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xzalloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <xmalloc@plt>
mov    %eax,%edi
xor    %esi,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define i8* @xzalloc(i64 %0) {
%2 = tail call i32 @xmalloc(i64 %0)
%3 = tail call i8* @memset(i32 %2, i32 0, i64 %0)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *gmtime_r(int /*<<< orphan*/ *, struct tm *);
void test(void) {
  time_t time;
  struct tm *timestruct_pointer;
  struct tm timestruct;
  timestruct_pointer = gmtime_r(&time, &timestruct);
}


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

x86 assembly (clang, -O2):
<test>:
push   %rax
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <gmtime_r@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define void @test() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = alloca %struct.tm
%4 = call %struct.tm* @gmtime_r(i32* %1, %struct.tm* %3)
store %struct.tm* %4, %struct.tm** %2
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define void @test() {
%1 = alloca i32
%2 = alloca %struct.tm
%3 = bitcast i32* %1 to i8*
%4 = bitcast %struct.tm* %2 to i8*
%5 = call %struct.tm* @gmtime_r(i32* %1, %struct.tm* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void __attribute__((noreturn)) __die_hard(void) { exit(EXIT_FAILURE); }


x86 assembly (clang, -O0):
<__die_hard>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<__die_hard>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @__die_hard() {
%1 = load i32, i32* @EXIT_FAILURE
%2 = call i32 @exit(i32 %1)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @__die_hard() {
%1 = load i32, i32* @EXIT_FAILURE
%2 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ emit_token(char *);
int /*<<< orphan*/ resolve_backward(int);
void emit_until(void) {
  emit_token("b?branch");
  resolve_backward(0xC57be916);
}


x86 assembly (clang, -O0):
<emit_until>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <emit_token@plt>
mov    $0xc57be916,%edi
call   1030 <resolve_backward@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_until>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <emit_token@plt>
mov    $0xc57be916,%edi
pop    %rax
jmp    1030 <resolve_backward@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"b?branch\00"
define void @emit_until() {
%1 = call i32 @emit_token(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @resolve_backward(i32 -981735146)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"b?branch\00"
define void @emit_until() {
%1 = tail call i32 @emit_token(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @resolve_backward(i32 -981735146)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
int semctl(int, int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int sem_destroy(int sem) {
  if (semctl(sem, 0, IPC_RMID, 0) == -1) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<sem_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edx
xor    %ecx,%ecx
mov    %ecx,%esi
call   1030 <semctl@plt>
cmp    $0xffffffff,%eax
jne    1145 <sem_destroy+0x35>
movl   $0xffffffff,-0x4(%rbp)
jmp    114c <sem_destroy+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sem_destroy>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
xor    %ecx,%ecx
call   1030 <semctl@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
sete   %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@IPC_RMID = global i32 0
define i32 @sem_destroy(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* @IPC_RMID
%6 = call i32 @semctl(i32 %4, i32 0, i32 %5, i32 0)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@IPC_RMID = global i32 0
define i32 @sem_destroy(i32 %0) {
%2 = load i32, i32* @IPC_RMID
%3 = tail call i32 @semctl(i32 %0, i32 0, i32 %2, i32 0)
%4 = icmp eq i32 %3, -1
%5 = sext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
char *xmlMemStrdupLoc(char const *, char *, int /*<<< orphan*/);
char *xmlMemoryStrdup(const char *str) {
  return (xmlMemStrdupLoc(str, "none", 0));
}


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

x86 assembly (clang, -O2):
<xmlMemoryStrdup>:
lea    0xee9(%rip),%rsi
xor    %edx,%edx
jmp    1030 <xmlMemStrdupLoc@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"none\00"
define i8* @xmlMemoryStrdup(i8* %0) {
%2 = tail call i8* @xmlMemStrdupLoc(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
__attribute__((noreturn)) void abort(void) { _exit(-1); }


x86 assembly (clang, -O0):
<abort>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<abort>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @abort() {
%1 = call i32 @_exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define void @abort() {
%1 = tail call i32 @_exit(i32 -1)
unreachable
}
/* Variables and functions */
double exp(double);
double f4(double x) { return exp(-(x - 0.5) * (x - 0.5)) - x * x; }


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
subsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xeae(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
push   %rax
movsd  %xmm0,(%rsp)
movsd  0xee2(%rip),%xmm1
addsd  %xmm0,%xmm1
movapd 0xee6(%rip),%xmm0
xorpd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f4(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 5.000000e-01
%5 = fneg double %4
%6 = load double, double* %2
%7 = fsub double %6, 5.000000e-01
%8 = fmul double %5, %7
%9 = call double @exp(double %8)
%10 = load double, double* %2
%11 = load double, double* %2
%12 = fneg double %10
%13 = call double @llvm.fmuladd.f64(double %12, double %11, double %9)
ret double %13
}

LLVM IR (-O2):
define double @f4(double %0) {
%2 = fadd double %0, -5.000000e-01
%3 = fneg double %2
%4 = fmul double %2, %3
%5 = tail call double @exp(double %4)
%6 = fneg double %0
%7 = tail call double @llvm.fmuladd.f64(double %6, double %0, double %5)
ret double %7
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

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


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

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

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

LLVM IR (-O2):
define i32 @hci_event_extended_inquiry_response_get_rssi(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 16
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_write;
scalar_t__ remote_syscall(int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/, int /*<<< orphan*/);
int remote_write(pid_t pid, int fd, const void *buf, size_t count) {
  return (int)remote_syscall(pid, SYS_write, (uint64_t)fd, (uint64_t)buf,
                             (uint64_t)count, (uint64_t)NULL, (uint64_t)NULL,
                             (uint64_t)NULL);
}


x86 assembly (clang, -O0):
<remote_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %eax,%r8d
xor    %r9d,%r9d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <remote_syscall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remote_write>:
push   %rax
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %esi,%edx
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1030 <remote_syscall@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
@SYS_write = global i32 0
define i32 @remote_write(i32 %0, i32 %1, i8* %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i32, i32* %5
%10 = load i32, i32* @SYS_write
%11 = load i32, i32* %6
%12 = load i8*, i8** %7
%13 = ptrtoint i8* %12 to i32
%14 = load i64, i64* %8
%15 = trunc i64 %14 to i32
%16 = call i64 @remote_syscall(i32 %9, i32 %10, i32 %11, i32 %13, i32 %15, i32 0, i32 0, i32 0)
%17 = trunc i64 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
@SYS_write = global i32 0
define i32 @remote_write(i32 %0, i32 %1, i8* %2, i64 %3) {
%5 = load i32, i32* @SYS_write
%6 = ptrtoint i8* %2 to i64
%7 = trunc i64 %6 to i32
%8 = trunc i64 %3 to i32
%9 = tail call i64 @remote_syscall(i32 %0, i32 %5, i32 %1, i32 %7, i32 %8, i32 0, i32 0, i32 0)
%10 = trunc i64 %9 to i32
ret i32 %10
}
unsigned xrop3_38_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = T & S;
  stk2 = D | stk3;
  stk1 = S ^ stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_38_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_38_0_0>:
mov    %edi,%eax
shl    $0x8,%eax
lea    (%rdi,%rax,1),%ecx
shl    $0x8,%esi
and    %esi,%eax
or     $0xff,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_38_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = load i32, i32* %6
%25 = and i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %5
%27 = load i32, i32* %10
%28 = or i32 %26, %27
store i32 %28, i32* %9
%29 = load i32, i32* %6
%30 = load i32, i32* %9
%31 = xor i32 %29, %30
store i32 %31, i32* %8
%32 = load i32, i32* %8
ret i32 %32
}

LLVM IR (-O2):
define i32 @xrop3_38_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = or i32 %4, %3
%6 = zext i8 %1 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = and i32 %7, %4
%9 = or i32 %8, 255
%10 = xor i32 %9, %5
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
typedef int /*<<< orphan*/ ASN1_UTCTIME;

/* Variables and functions */
int /*<<< orphan*/ *ASN1_UTCTIME_adj(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                     int /*<<< orphan*/, int /*<<< orphan*/);
ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) {
  return ASN1_UTCTIME_adj(s, t, 0, 0);
}


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

x86 assembly (clang, -O2):
<ASN1_UTCTIME_set>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <ASN1_UTCTIME_adj@plt>

LLVM IR (-O0):
define i32* @ASN1_UTCTIME_set(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 = load i32, i32* %4
%7 = call i32* @ASN1_UTCTIME_adj(i32* %5, i32 %6, i32 0, i32 0)
ret i32* %7
}

LLVM IR (-O2):
define i32* @ASN1_UTCTIME_set(i32* %0, i32 %1) {
%3 = tail call i32* @ASN1_UTCTIME_adj(i32* %0, i32 %1, i32 0, i32 0)
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ record_linux_param_description(char *, char *, char *);
void module_param_desc_tcp_max_burst(void) {
  record_linux_param_description("tcp_linux.c", "tcp_max_burst",
                                 "the maximum burst size of a TCP");
}


x86 assembly (clang, -O0):
<module_param_desc_tcp_max_burst>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeea(%rip),%rsi
lea    0xef1(%rip),%rdx
call   1030 <record_linux_param_description@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_param_desc_tcp_max_burst>:
lea    0xee9(%rip),%rdi
lea    0xeee(%rip),%rsi
lea    0xef5(%rip),%rdx
jmp    1030 <record_linux_param_description@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"tcp_linux.c\00"
@.str.1 = [14 x i8] c"tcp_max_burst\00"
@.str.2 = [32 x i8] c"the maximum burst size of a TCP\00"
define void @module_param_desc_tcp_max_burst() {
%1 = call i32 @record_linux_param_description(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"tcp_linux.c\00"
@.str.1 = [14 x i8] c"tcp_max_burst\00"
@.str.2 = [32 x i8] c"the maximum burst size of a TCP\00"
define void @module_param_desc_tcp_max_burst() {
%1 = tail call i32 @record_linux_param_description(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int code_convert(char const *, char const *, char *, int, char *, int);
int u2g(char *inbuf, int inlen, char *outbuf, int outlen) {
  const char *from = "utf-8";
  const char *to = "gb2312";
  return code_convert(from, to, inbuf, inlen, outbuf, outlen);
}


x86 assembly (clang, -O0):
<u2g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    0xed3(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xece(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
call   1030 <code_convert@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u2g>:
mov    %ecx,%r9d
mov    %rdx,%r8
mov    %esi,%ecx
mov    %rdi,%rdx
lea    0xede(%rip),%rdi
lea    0xedd(%rip),%rsi
jmp    1030 <code_convert@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"utf-8\00"
@.str.1 = [7 x i8] c"gb2312\00"
define i32 @u2g(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %9
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %10
%11 = load i8*, i8** %9
%12 = load i8*, i8** %10
%13 = load i8*, i8** %5
%14 = load i32, i32* %6
%15 = load i8*, i8** %7
%16 = load i32, i32* %8
%17 = call i32 @code_convert(i8* %11, i8* %12, i8* %13, i32 %14, i8* %15, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
@.str = [6 x i8] c"utf-8\00"
@.str.1 = [7 x i8] c"gb2312\00"
define i32 @u2g(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @code_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0, i32 %1, i8* %2, i32 %3)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ ieee_infinity;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
double __infinity(void) {
  static unsigned char ieee_infinity[] = {0x00, 0x00, 0x00, 0x00,
                                          0x00, 0x00, 0xf0, 0x7f};
  assert(sizeof(double) == sizeof(ieee_infinity));
  return *(double *)ieee_infinity;
}


x86 assembly (clang, -O0):
<__infinity>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <assert@plt>
movsd  0x2f02(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__infinity>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
movsd  0xedd(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@__infinity.ieee_infinity = internal global [8 x i8] c"\00\00\00\00\00\00\F0\7F"
define double @__infinity() {
%1 = call i32 @assert(i32 1)
%2 = load double, double* bitcast ([8 x i8]* @__infinity.ieee_infinity to double*)
ret double %2
}

LLVM IR (-O2):
define double @__infinity() {
%1 = tail call i32 @assert(i32 1)
ret double 0x7FF0000000000000
}
void timeConvert(int time) { int timeMS = time * 1000; }


x86 assembly (clang, -O0):
<timeConvert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x3e8,-0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @timeConvert(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %4, 1000
store i32 %5, i32* %3
ret void
}

LLVM IR (-O2):
define void @timeConvert(i32 %0) {
ret void
}
/* Variables and functions */
char *strchr(const char *s, int c) {
  while (*s && *s != c)
    ++s;
  return (*s == c) ? (char *)s : NULL;
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
je     1130 <strchr+0x30>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1140 <strchr+0x40>
jmp    1151 <strchr+0x51>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110b <strchr+0xb>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
jne    116e <strchr+0x6e>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1179 <strchr+0x79>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    1179 <strchr+0x79>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
add    $0xffffffffffffffff,%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl 0x1(%rdi),%ecx
add    $0x1,%rdi
test   %ecx,%ecx
je     1120 <strchr+0x20>
cmp    %esi,%ecx
jne    1110 <strchr+0x10>
xor    %eax,%eax
cmp    %esi,%ecx
cmove  %rdi,%rax
ret

LLVM IR (-O0):
define i8* @strchr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %18, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = load i32, i32* %4
%15 = icmp ne i32 %13, %14
br label %16
16: ; preds = %10, %5
%17 = phi i1 [ false, %5 ], [ %15, %10 ]
br i1 %17, label %18, label %21
18: ; preds = %16
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
br label %5
21: ; preds = %16
%22 = load i8*, i8** %3
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = load i32, i32* %4
%26 = icmp eq i32 %24, %25
br i1 %26, label %27, label %29
27: ; preds = %21
%28 = load i8*, i8** %3
br label %30
29: ; preds = %21
br label %30
30: ; preds = %29, %27
%31 = phi i8* [ %28, %27 ], [ null, %29 ]
ret i8* %31
}

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %10, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = sext i8 %5 to i32
%8 = icmp eq i32 %7, %1
%9 = or i1 %6, %8
%10 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %9, label %11, label %3
11: ; preds = %3
%12 = select i1 %8, i8* %4, i8* null
ret i8* %12
}
long double test_cabsl(_Complex long double x) { return __builtin_cabsl(x); }


x86 assembly (clang, -O0):
<test_cabsl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    0x10(%rbp),%rax
fldt   (%rax)
fldt   0x10(%rax)
fxch   %st(1)
fstpt  -0x20(%rbp)
fstpt  -0x10(%rbp)
movaps -0x20(%rbp),%xmm0
movaps -0x10(%rbp),%xmm1
mov    %rsp,%rax
movaps %xmm1,0x10(%rax)
movaps %xmm0,(%rax)
call   1030 <cabsl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cabsl>:
sub    $0x48,%rsp
fldt   0x50(%rsp)
fldt   0x60(%rsp)
fxch   %st(1)
fstpt  0x20(%rsp)
fstpt  0x30(%rsp)
movaps 0x20(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
call   1030 <cabsl@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @test_cabsl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 0
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 1
store x86_fp80 %4, x86_fp80* %7
store x86_fp80 %6, x86_fp80* %8
%9 = call x86_fp80 @cabsl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %2)
ret x86_fp80 %9
}

LLVM IR (-O2):
define x86_fp80 @test_cabsl({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 0
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 1
store x86_fp80 %4, x86_fp80* %7
store x86_fp80 %6, x86_fp80* %8
%9 = tail call x86_fp80 @cabsl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %2)
ret x86_fp80 %9
}
void EnableSPI() {}


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

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

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

LLVM IR (-O2):
define void @EnableSPI() {
ret void
}
/* Type definitions */
struct snd_pcm_hw_params {
  int dummy;
};
struct snd_interval {
  unsigned int min;
};

/* Variables and functions */
scalar_t__ param_is_interval(int);
struct snd_interval *param_to_interval(struct snd_pcm_hw_params *, int);
void param_set_min(struct snd_pcm_hw_params *p, int n, unsigned int val) {
  if (param_is_interval(n)) {
    struct snd_interval *i = param_to_interval(p, n);
    i->min = val;
  }
}


x86 assembly (clang, -O0):
<param_set_min>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <param_is_interval@plt>
cmp    $0x0,%rax
je     115d <param_set_min+0x3d>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <param_to_interval@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<param_set_min>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <param_is_interval@plt>
test   %rax,%rax
je     1145 <param_set_min+0x25>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <param_to_interval@plt>
mov    %r14d,(%rax)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.snd_pcm_hw_params = type { i32 }
%struct.snd_interval = type { i32 }
define void @param_set_min(%struct.snd_pcm_hw_params* %0, i32 %1, i32 %2) {
%4 = alloca %struct.snd_pcm_hw_params*
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.snd_interval*
store %struct.snd_pcm_hw_params* %0, %struct.snd_pcm_hw_params** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = call i64 @param_is_interval(i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %3
%12 = load %struct.snd_pcm_hw_params*, %struct.snd_pcm_hw_params** %4
%13 = load i32, i32* %5
%14 = call %struct.snd_interval* @param_to_interval(%struct.snd_pcm_hw_params* %12, i32 %13)
store %struct.snd_interval* %14, %struct.snd_interval** %7
%15 = load i32, i32* %6
%16 = load %struct.snd_interval*, %struct.snd_interval** %7
%17 = getelementptr inbounds %struct.snd_interval, %struct.snd_interval* %16, i32 0, i32 0
store i32 %15, i32* %17
br label %18
18: ; preds = %11, %3
ret void
}

LLVM IR (-O2):
%struct.snd_pcm_hw_params = type { i32 }
%struct.snd_interval = type { i32 }
define void @param_set_min(%struct.snd_pcm_hw_params* %0, i32 %1, i32 %2) {
%4 = tail call i64 @param_is_interval(i32 %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call %struct.snd_interval* @param_to_interval(%struct.snd_pcm_hw_params* %0, i32 %1)
%8 = getelementptr inbounds %struct.snd_interval, %struct.snd_interval* %7, i64 0, i32 0
store i32 %2, i32* %8
br label %9
9: ; preds = %6, %3
ret void
}
/* Variables and functions */
long double powl(long double, long double);
long double sinl(long double);
long double g_bonus(long double x) { return powl(x - 4.0L, 3.0L) * sinl(x); }


x86 assembly (clang, -O0):
<g_bonus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xec9(%rip)
faddp  %st,%st(1)
mov    %rsp,%rax
flds   0xec2(%rip)
fstpt  0x10(%rax)
fstpt  (%rax)
call   1040 <powl@plt>
fstpt  -0x1c(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <sinl@plt>
fldt   -0x1c(%rbp)
fmulp  %st,%st(1)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_bonus>:
sub    $0x38,%rsp
fldt   0x40(%rsp)
fld    %st(0)
fstpt  0x2c(%rsp)
fadds  0xecc(%rip)
flds   0xeca(%rip)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1040 <powl@plt>
fstpt  0x20(%rsp)
fldt   0x2c(%rsp)
fstpt  (%rsp)
call   1030 <sinl@plt>
fldt   0x20(%rsp)
fmulp  %st,%st(1)
add    $0x38,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @g_bonus(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fsub x86_fp80 %3, 0xK40018000000000000000
%5 = call x86_fp80 @powl(x86_fp80 %4, x86_fp80 0xK4000C000000000000000)
%6 = load x86_fp80, x86_fp80* %2
%7 = call x86_fp80 @sinl(x86_fp80 %6)
%8 = fmul x86_fp80 %5, %7
ret x86_fp80 %8
}

LLVM IR (-O2):
define x86_fp80 @g_bonus(x86_fp80 %0) {
%2 = fadd x86_fp80 %0, 0xKC0018000000000000000
%3 = tail call x86_fp80 @powl(x86_fp80 %2, x86_fp80 0xK4000C000000000000000)
%4 = tail call x86_fp80 @sinl(x86_fp80 %0)
%5 = fmul x86_fp80 %3, %4
ret x86_fp80 %5
}
/* Variables and functions */
int /*<<< orphan*/ snd_pcm8(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ snd_stop();
void chip8_shutdown(void) {
  snd_stop();
  snd_pcm8(NULL, 0);
}


x86 assembly (clang, -O0):
<chip8_shutdown>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <snd_stop@plt>
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1030 <snd_pcm8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<chip8_shutdown>:
push   %rax
xor    %eax,%eax
call   1040 <snd_stop@plt>
xor    %edi,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <snd_pcm8@plt>

LLVM IR (-O0):
define void @chip8_shutdown() {
%1 = call i32 (...) @snd_stop()
%2 = call i32 @snd_pcm8(i32* null, i32 0)
ret void
}

LLVM IR (-O2):
define void @chip8_shutdown() {
%1 = tail call i32 (...) @snd_stop()
%2 = tail call i32 @snd_pcm8(i32* null, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int sesc_future_epoch(void) {
  fprintf(stderr, "TLS simulator needed for sesc_future_epoch\n");
  exit(-1);
  return 0;
}


x86 assembly (clang, -O0):
<sesc_future_epoch>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sesc_future_epoch>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"TLS simulator needed for sesc_future_epoch\0A\00"
define i32 @sesc_future_epoch() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"TLS simulator needed for sesc_future_epoch\0A\00"
define i32 @sesc_future_epoch() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
void INT_TM05(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_TM05() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getcwd(char *, int);
char *mc_getcwd(char *workdir, int size) {
  getcwd(workdir, size);
  return workdir;
}


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

x86 assembly (clang, -O2):
<mc_getcwd>:
push   %rbx
mov    %rdi,%rbx
call   1030 <getcwd@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @mc_getcwd(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @getcwd(i8* %5, i32 %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @mc_getcwd(i8* returned %0, i32 %1) {
%3 = tail call i32 @getcwd(i8* %0, i32 %1)
ret i8* %0
}
/* Variables and functions */
scalar_t__ __fbufsize(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fileno(int /*<<< orphan*/);
int /*<<< orphan*/ fsync(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void flushWrite(void) {
  if (__fbufsize(stdout) > 0) {
    fflush(stdout);
  }
  fsync(fileno(stdout));
}


x86 assembly (clang, -O0):
<flushWrite>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1060 <__fbufsize@plt>
cmp    $0x0,%rax
jle    116a <flushWrite+0x2a>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
call   1030 <fileno@plt>
mov    %eax,%edi
call   1050 <fsync@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<flushWrite>:
push   %rbx
mov    0x2e98(%rip),%rbx
mov    (%rbx),%edi
call   1060 <__fbufsize@plt>
test   %rax,%rax
jle    115b <flushWrite+0x1b>
mov    (%rbx),%edi
call   1040 <fflush@plt>
mov    (%rbx),%edi
call   1030 <fileno@plt>
mov    %eax,%edi
pop    %rbx
jmp    1050 <fsync@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @flushWrite() {
%1 = load i32, i32* @stdout
%2 = call i64 @__fbufsize(i32 %1)
%3 = icmp sgt i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
br label %7
7: ; preds = %4, %0
%8 = load i32, i32* @stdout
%9 = call i32 @fileno(i32 %8)
%10 = call i32 @fsync(i32 %9)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @flushWrite() {
%1 = load i32, i32* @stdout
%2 = tail call i64 @__fbufsize(i32 %1)
%3 = icmp sgt i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
br label %7
7: ; preds = %4, %0
%8 = load i32, i32* @stdout
%9 = tail call i32 @fileno(i32 %8)
%10 = tail call i32 @fsync(i32 %9)
ret void
}
void ff_hevc_put_hevc_bi_w_epel_v4_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_v4_8_sse4() {
ret void
}
void b43legacy_rfkill_exit(struct b43legacy_wldev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.b43legacy_wldev = type opaque
define void @b43legacy_rfkill_exit(%struct.b43legacy_wldev* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int mkdir(char *, int);
int /*<<< orphan*/ printf(char *, char *);
char *strerror(int /*<<< orphan*/);
void mkdir_source() {
  int ret = mkdir("source", 0755);
  if (ret != 0) {
    printf("mkdir failed: %s\n", strerror(errno));
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<mkdir_source>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
mov    $0x1ed,%esi
call   1030 <mkdir@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1191 <mkdir_source+0x51>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
mov    %rax,%rsi
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e4e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkdir_source>:
push   %rax
lea    0xeb8(%rip),%rdi
mov    $0x1ed,%esi
call   1030 <mkdir@plt>
test   %eax,%eax
jne    1158 <mkdir_source+0x18>
pop    %rax
ret
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
lea    0xe9a(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"source\00"
@.str.1 = [18 x i8] c"mkdir failed: %s\0A\00"
@errno = global i32 0
@EXIT_FAILURE = global i32 0
define void @mkdir_source() {
%1 = alloca i32
%2 = call i32 @mkdir(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 493)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %0
%6 = load i32, i32* @errno
%7 = call i8* @strerror(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %0
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"source\00"
@.str.1 = [18 x i8] c"mkdir failed: %s\0A\00"
@errno = global i32 0
@EXIT_FAILURE = global i32 0
define void @mkdir_source() {
%1 = tail call i32 @mkdir(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 493)
%2 = icmp eq i32 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = load i32, i32* @errno
%5 = tail call i8* @strerror(i32 %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %0
ret void
}