xunge/DecIR huggingface dataset:
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solve_quaddobl_system(int *root_count, int nbtasks) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(702, root_count, &nbtasks, c);
  return fail;
}


x86 assembly (clang, -O0):
<solve_quaddobl_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    $0x2be,%edi
lea    -0xc(%rbp),%rdx
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_quaddobl_system>:
push   %rax
mov    %rdi,%rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    $0x2be,%edi
mov    %rax,%rsi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solve_quaddobl_system(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca double*
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32*, i32** %3
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc(i32 702, i32* %7, i32* %4, double* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @solve_quaddobl_system(i32* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 702, i32* %0, i32* %3, double* undef)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __cxa_finalize(int /*<<< orphan*/);
int /*<<< orphan*/ _fini();
int /*<<< orphan*/ _init();
int main(int, char **);
int _start(int argc, char *argv[]) {
  _init();
  int ret = main(argc, argv);
  __cxa_finalize(0);
  _fini();
  return ret;
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1000 <_init>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <main@plt>
mov    %eax,-0x14(%rbp)
xor    %edi,%edi
call   1040 <__cxa_finalize@plt>
mov    $0x0,%al
call   114c <_fini>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_start>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1000 <_init>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <main@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1040 <__cxa_finalize@plt>
xor    %eax,%eax
call   1144 <_fini>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @_start(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = call i32 (...) @_init()
%7 = load i32, i32* %3
%8 = load i8**, i8*** %4
%9 = call i32 @main(i32 %7, i8** %8)
store i32 %9, i32* %5
%10 = call i32 @__cxa_finalize(i32 0)
%11 = call i32 (...) @_fini()
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @_start(i32 %0, i8** %1) {
%3 = tail call i32 (...) @_init()
%4 = tail call i32 @main(i32 %0, i8** %1)
%5 = tail call i32 @__cxa_finalize(i32 0)
%6 = tail call i32 (...) @_fini()
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ imprimirAno(int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int casos, ano;
  scanf("%d", &casos);
  while (casos-- > 0) {
    scanf("%d", &ano);
    imprimirAno(ano);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jle    1170 <main+0x50>
lea    0xea6(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%edi
call   1030 <imprimirAno@plt>
jmp    113f <main+0x1f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,(%rsp)
test   %eax,%eax
jle    1171 <main+0x51>
lea    0xeb9(%rip),%r14
lea    0x4(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <imprimirAno@plt>
mov    (%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,(%rsp)
test   %eax,%eax
jg     1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, -1
store i32 %7, i32* %1
%8 = icmp sgt i32 %6, 0
br i1 %8, label %9, label %16
9: ; preds = %0, %9
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%11 = load i32, i32* %2
%12 = call i32 @imprimirAno(i32 %11)
%13 = load i32, i32* %1
%14 = add nsw i32 %13, -1
store i32 %14, i32* %1
%15 = icmp sgt i32 %13, 0
br i1 %15, label %9, label %16
16: ; preds = %9, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ logerror(char *);
int /*<<< orphan*/ mame_schedule_soft_reset();
void watchdog_callback(int param) {
  logerror("reset caused by the (time) watchdog\n");
  mame_schedule_soft_reset();
}


x86 assembly (clang, -O0):
<watchdog_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <logerror@plt>
mov    $0x0,%al
call   1040 <mame_schedule_soft_reset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<watchdog_callback>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <logerror@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <mame_schedule_soft_reset@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"reset caused by the (time) watchdog\0A\00"
define void @watchdog_callback(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @logerror(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @mame_schedule_soft_reset()
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"reset caused by the (time) watchdog\0A\00"
define void @watchdog_callback(i32 %0) {
%2 = tail call i32 @logerror(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @mame_schedule_soft_reset()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void stream_readlines(FILE *stream) {}


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

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

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

LLVM IR (-O2):
define void @stream_readlines(i32* nocapture %0) {
ret void
}
int main(int argc, char *argv[]) {
  unsigned long i;
  while (1)
    ++i;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    %rax,-0x18(%rbp)
jmp    1112 <main+0x12>

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %2, %7
%8 = load i64, i64* %6
%9 = add i64 %8, 1
store i64 %9, i64* %6
br label %7
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
br label %3
}
int xfuse_init(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @xfuse_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @xfuse_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int print_usage(void) {
  printf("Correct usage: ./print_sensible [OPTION]\nwhere OPTION is: -o for "
         "octal or -x for hexadecimal\n");
  return -1;
}


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

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

LLVM IR (-O0):
@.str = [94 x i8] c"Correct usage: ./print_sensible [OPTION]\0Awhere OPTION is: -o for octal or -x for hexadecimal\0A\00"
define i32 @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@str = [93 x i8] c"Correct usage: ./print_sensible [OPTION]\0Awhere OPTION is: -o for octal or -x for hexadecimal\00"
define i32 @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([93 x i8], [93 x i8]* @str, i64 0, i64 0))
ret i32 -1
}
int is_list_empty(int *list) { return (list[0] == 0); }


x86 assembly (clang, -O0):
<is_list_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_list_empty>:
xor    %eax,%eax
cmpl   $0x0,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @is_list_empty(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @is_list_empty(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ mc_swap64(int /*<<< orphan*/);
uint64_t htonll(uint64_t val) { return mc_swap64(val); }


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

x86 assembly (clang, -O2):
<htonll>:
jmp    1030 <mc_swap64@plt>

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

LLVM IR (-O2):
define i32 @htonll(i32 %0) {
%2 = tail call i32 @mc_swap64(i32 %0)
ret i32 %2
}
/* Variables and functions */
int baz(int);
int main() { return baz(baz(0)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1030 <baz@plt>
mov    %eax,%edi
call   1030 <baz@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @baz(i32 0)
%2 = tail call i32 @baz(i32 %1)
ret i32 %2
}
/* Type definitions */
struct timespec {
  double tv_sec;
  double tv_nsec;
};

/* Variables and functions */
double ts_to_double(const struct timespec ts) {
  return ts.tv_sec + ts.tv_nsec / 1000000000.0;
}


x86 assembly (clang, -O0):
<ts_to_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xee0(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts_to_double>:
divsd  0xef8(%rip),%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
%struct.timespec = type { double, double }
define double @ts_to_double(double %0, double %1) {
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %3 to { double, double }*
%5 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
store double %0, double* %5
%6 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
store double %1, double* %6
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%8 = load double, double* %7
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
%10 = load double, double* %9
%11 = fdiv double %10, 1.000000e+09
%12 = fadd double %8, %11
ret double %12
}

LLVM IR (-O2):
define double @ts_to_double(double %0, double %1) {
%3 = fdiv double %1, 1.000000e+09
%4 = fadd double %3, %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ _scanf_getl(char *, int *, int, int, int);
int /*<<< orphan*/ safe_gets(char *, int);
int getdec() {
  char buf[80];
  safe_gets(buf, 80);
  int i = 0;
  _scanf_getl(buf, &i, 10, 80, 1);
  return i;
}


x86 assembly (clang, -O0):
<getdec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x50(%rbp),%rdi
mov    $0x50,%esi
call   1040 <safe_gets@plt>
movl   $0x0,-0x54(%rbp)
lea    -0x50(%rbp),%rdi
lea    -0x54(%rbp),%rsi
mov    $0xa,%edx
mov    $0x50,%ecx
mov    $0x1,%r8d
call   1030 <_scanf_getl@plt>
mov    -0x54(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getdec>:
push   %rbx
sub    $0x60,%rsp
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1040 <safe_gets@plt>
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
mov    $0x50,%ecx
mov    $0x1,%r8d
call   1030 <_scanf_getl@plt>
mov    0xc(%rsp),%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getdec() {
%1 = alloca [80 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%4 = call i32 @safe_gets(i8* %3, i32 80)
store i32 0, i32* %2
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%6 = call i32 @_scanf_getl(i8* %5, i32* %2, i32 10, i32 80, i32 1)
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
define i32 @getdec() {
%1 = alloca [80 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%4 = call i32 @safe_gets(i8* %3, i32 80)
%5 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%6 = call i32 @_scanf_getl(i8* %3, i32* %2, i32 10, i32 80, i32 1)
%7 = load i32, i32* %2
ret i32 %7
}
/* Variables and functions */
scalar_t__ isspace(char);
char *is_valid(char *p) {
  while (isspace(*p))
    ++p;
  if (*p == '#')
    return NULL;
  return p;
}


x86 assembly (clang, -O0):
<is_valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <is_valid+0x33>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <is_valid+0xc>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1160 <is_valid+0x50>
movq   $0x0,-0x8(%rbp)
jmp    1168 <is_valid+0x58>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @is_valid(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %9, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = call i64 @isspace(i8 signext %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
br label %4
12: ; preds = %4
%13 = load i8*, i8** %3
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 35
br i1 %16, label %17, label %18
17: ; preds = %12
store i8* null, i8** %2
br label %20
18: ; preds = %12
%19 = load i8*, i8** %3
store i8* %19, i8** %2
br label %20
20: ; preds = %18, %17
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
define i8* @is_valid(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = load i8, i8* %3
%10 = icmp eq i8 %9, 35
%11 = select i1 %10, i8* null, i8* %3
ret i8* %11
}
double clo2(void *context, double a, double b) {
  if (context)
    return *((double *)context) + a + b;
  return a + b;
}


x86 assembly (clang, -O0):
<clo2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1139 <clo2+0x39>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
addsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1148 <clo2+0x48>
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clo2>:
test   %rdi,%rdi
je     1109 <clo2+0x9>
addsd  (%rdi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @clo2(i8* %0, double %1, double %2) {
%4 = alloca double
%5 = alloca i8*
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %5
store double %1, double* %6
store double %2, double* %7
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %18
10: ; preds = %3
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to double*
%13 = load double, double* %12
%14 = load double, double* %6
%15 = fadd double %13, %14
%16 = load double, double* %7
%17 = fadd double %15, %16
store double %17, double* %4
br label %22
18: ; preds = %3
%19 = load double, double* %6
%20 = load double, double* %7
%21 = fadd double %19, %20
store double %21, double* %4
br label %22
22: ; preds = %18, %10
%23 = load double, double* %4
ret double %23
}

LLVM IR (-O2):
define double @clo2(i8* %0, double %1, double %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = bitcast i8* %0 to double*
%7 = load double, double* %6
%8 = fadd double %7, %1
br label %9
9: ; preds = %3, %5
%10 = phi double [ %8, %5 ], [ %1, %3 ]
%11 = fadd double %10, %2
ret double %11
}
/* Variables and functions */
scalar_t__ fabs(float);
float magmax(float a, float b) {
  if (fabs(a) > fabs(b))
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<magmax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %rax,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jle    1159 <magmax+0x49>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1163 <magmax+0x53>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<magmax>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0x8(%rsp)
movss  %xmm0,0xc(%rsp)
call   1030 <fabs@plt>
mov    %rax,%rbx
movss  0x8(%rsp),%xmm0
call   1030 <fabs@plt>
movss  0xc(%rsp),%xmm0
cmp    %rax,%rbx
jg     1145 <magmax+0x35>
movss  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float @magmax(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = call i64 @fabs(float %6)
%8 = load float, float* %5
%9 = call i64 @fabs(float %8)
%10 = icmp sgt i64 %7, %9
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load float, float* %4
store float %12, float* %3
br label %15
13: ; preds = %2
%14 = load float, float* %5
store float %14, float* %3
br label %15
15: ; preds = %13, %11
%16 = load float, float* %3
ret float %16
}

LLVM IR (-O2):
define float @magmax(float %0, float %1) {
%3 = tail call i64 @fabs(float %0)
%4 = tail call i64 @fabs(float %1)
%5 = icmp sgt i64 %3, %4
%6 = select i1 %5, float %0, float %1
ret float %6
}
void swap(char *a, char *b) {
  char temp;
  temp = *a;
  *a = *b;
  *b = temp;
  return;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%al
mov    (%rsi),%cl
mov    %cl,(%rdi)
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @swap(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
store i8 %7, i8* %5
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
store i8 %9, i8* %10
%11 = load i8, i8* %5
%12 = load i8*, i8** %4
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
int maximoR3(int n, int v[]) {
  if (n == 1)
    return v[0];
  if ((maximoR3(n - 1, v)) < v[n - 1])
    return v[n - 1];
  else
    return maximoR3(n - 1, v);
}


x86 assembly (clang, -O0):
<maximoR3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1137 <maximoR3+0x27>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1186 <maximoR3+0x76>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
call   1030 <maximoR3@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jge    1174 <maximoR3+0x64>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4(%rbp)
jmp    1186 <maximoR3+0x76>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
call   1030 <maximoR3@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<maximoR3>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
cmp    $0x1,%edi
jne    1121 <maximoR3+0x11>
mov    (%r14),%eax
jmp    113b <maximoR3+0x2b>
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
mov    %r14,%rsi
call   1030 <maximoR3@plt>
movslq %ebx,%rcx
mov    -0x4(%r14,%rcx,4),%ecx
cmp    %ecx,%eax
cmovl  %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @maximoR3(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32*, i32** %5
%10 = getelementptr inbounds i32, i32* %9, i64 0
%11 = load i32, i32* %10
store i32 %11, i32* %3
br label %36
12: ; preds = %2
%13 = load i32, i32* %4
%14 = sub nsw i32 %13, 1
%15 = load i32*, i32** %5
%16 = call i32 @maximoR3(i32 %14, i32* %15)
%17 = load i32*, i32** %5
%18 = load i32, i32* %4
%19 = sub nsw i32 %18, 1
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %17, i64 %20
%22 = load i32, i32* %21
%23 = icmp slt i32 %16, %22
br i1 %23, label %24, label %31
24: ; preds = %12
%25 = load i32*, i32** %5
%26 = load i32, i32* %4
%27 = sub nsw i32 %26, 1
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i32, i32* %25, i64 %28
%30 = load i32, i32* %29
store i32 %30, i32* %3
br label %36
31: ; preds = %12
%32 = load i32, i32* %4
%33 = sub nsw i32 %32, 1
%34 = load i32*, i32** %5
%35 = call i32 @maximoR3(i32 %33, i32* %34)
store i32 %35, i32* %3
br label %36
36: ; preds = %31, %24, %8
%37 = load i32, i32* %3
ret i32 %37
}

LLVM IR (-O2):
define i32 @maximoR3(i32 %0, i32* %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* %1
br label %6
6: ; preds = %4, %8
%7 = phi i32 [ %15, %8 ], [ %5, %4 ]
ret i32 %7
8: ; preds = %2
%9 = add nsw i32 %0, -1
%10 = tail call i32 @maximoR3(i32 %9, i32* %1)
%11 = sext i32 %9 to i64
%12 = getelementptr inbounds i32, i32* %1, i64 %11
%13 = load i32, i32* %12
%14 = icmp slt i32 %10, %13
%15 = select i1 %14, i32 %13, i32 %10
br label %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ is_pow2(int /*<<< orphan*/);
int log_2_floor(int /*<<< orphan*/);
int log_2_ceil(uint64_t n) { return log_2_floor(n) + !is_pow2(n); }


x86 assembly (clang, -O0):
<log_2_ceil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <log_2_floor@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <is_pow2@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_2_ceil>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <log_2_floor@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <is_pow2@plt>
cmp    $0x1,%eax
adc    $0x0,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @log_2_ceil(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @log_2_floor(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @is_pow2(i32 %5)
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
%10 = add nsw i32 %4, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @log_2_ceil(i32 %0) {
%2 = tail call i32 @log_2_floor(i32 %0)
%3 = tail call i32 @is_pow2(i32 %0)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = add nsw i32 %2, %5
ret i32 %6
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void config_ddr_data_x_1(void) {
  *(uint32_t *)(0x44E1216C) = (uint32_t)(0x00000038);
  *(uint32_t *)(0x44E12180) = (uint32_t)(0x00000044);
  *(uint32_t *)(0x44E12194) = (uint32_t)(0x00000000);
  *(uint32_t *)(0x44E121A0) = (uint32_t)(0x00000000);
  *(uint32_t *)(0x44E121AC) = (uint32_t)(0x00000094);
  *(uint32_t *)(0x44E121C4) = (uint32_t)(0x0000007D);
  *(uint32_t *)(0x44E121D8) = (uint32_t)(0x00000000);
  *(uint32_t *)(0x44E121DC) = (uint32_t)(0x00000000);
}


x86 assembly (clang, -O0):
<config_ddr_data_x_1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x44e1216c,%eax
movq   $0x38,(%rax)
mov    $0x44e12180,%eax
movq   $0x44,(%rax)
mov    $0x44e12194,%eax
movq   $0x0,(%rax)
mov    $0x44e121a0,%eax
movq   $0x0,(%rax)
mov    $0x44e121ac,%eax
movq   $0x94,(%rax)
mov    $0x44e121c4,%eax
movq   $0x7d,(%rax)
mov    $0x44e121d8,%eax
movq   $0x0,(%rax)
mov    $0x44e121dc,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_ddr_data_x_1>:
movq   $0x38,0x44e1216c
movq   $0x44,0x44e12180
movq   $0x0,0x44e12194
movq   $0x0,0x44e121a0
movq   $0x94,0x44e121ac
movq   $0x7d,0x44e121c4
movq   $0x0,0x44e121d8
movq   $0x0,0x44e121dc
ret

LLVM IR (-O0):
define void @config_ddr_data_x_1() {
store i64 56, i64* inttoptr (i64 1155604844 to i64*)
store i64 68, i64* inttoptr (i64 1155604864 to i64*)
store i64 0, i64* inttoptr (i64 1155604884 to i64*)
store i64 0, i64* inttoptr (i64 1155604896 to i64*)
store i64 148, i64* inttoptr (i64 1155604908 to i64*)
store i64 125, i64* inttoptr (i64 1155604932 to i64*)
store i64 0, i64* inttoptr (i64 1155604952 to i64*)
store i64 0, i64* inttoptr (i64 1155604956 to i64*)
ret void
}

LLVM IR (-O2):
define void @config_ddr_data_x_1() {
store i64 56, i64* inttoptr (i64 1155604844 to i64*)
store i64 68, i64* inttoptr (i64 1155604864 to i64*)
store i64 0, i64* inttoptr (i64 1155604884 to i64*)
store i64 0, i64* inttoptr (i64 1155604896 to i64*)
store i64 148, i64* inttoptr (i64 1155604908 to i64*)
store i64 125, i64* inttoptr (i64 1155604932 to i64*)
store i64 0, i64* inttoptr (i64 1155604952 to i64*)
store i64 0, i64* inttoptr (i64 1155604956 to i64*)
ret void
}
/* Variables and functions */
char *strchr(char const *, char);
char *strSeparator(const char *s) { return strchr(s, '/'); }


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

x86 assembly (clang, -O2):
<strSeparator>:
mov    $0x2f,%esi
jmp    1030 <strchr@plt>

LLVM IR (-O0):
define i8* @strSeparator(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strchr(i8* %3, i8 signext 47)
ret i8* %4
}

LLVM IR (-O2):
define i8* @strSeparator(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 47)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void g_free(void *ptr) {
  if (ptr != NULL)
    free(ptr);
}


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

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

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

LLVM IR (-O2):
define void @g_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void delline() { printf("\r\033[K\r"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"\0D\1B[K\0D\00"
define void @delline() {
%1 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\0D\1B[K\0D\00"
define void @delline() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_AEuint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0xAE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_AEuint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0xae,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_AEuint64_midword_reg>:
test   $0xae0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_AEuint64_midword_reg(i64 %0) {
%2 = and i64 %0, 11403264
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int PAPI_set_cmp_domain(int, int);
void PAPIF_SET_CMP_DOMAIN(int *domain, int *cidx, int *check) {
  *check = PAPI_set_cmp_domain(*domain, *cidx);
}


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

x86 assembly (clang, -O2):
<PAPIF_SET_CMP_DOMAIN>:
push   %rbx
mov    %rdx,%rbx
mov    (%rdi),%edi
mov    (%rsi),%esi
call   1030 <PAPI_set_cmp_domain@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @PAPIF_SET_CMP_DOMAIN(i32* nocapture %0, i32* nocapture %1, i32* nocapture writeonly %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = tail call i32 @PAPI_set_cmp_domain(i32 %4, i32 %5)
store i32 %6, i32* %2
ret void
}
/* Variables and functions */
char **bsdconv_modules_list(int);
char **bsdconv_codecs_list(int phase_type) {
  return bsdconv_modules_list(phase_type);
}


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

x86 assembly (clang, -O2):
<bsdconv_codecs_list>:
jmp    1030 <bsdconv_modules_list@plt>

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

LLVM IR (-O2):
define i8** @bsdconv_codecs_list(i32 %0) {
%2 = tail call i8** @bsdconv_modules_list(i32 %0)
ret i8** %2
}
unsigned int msf2sec(char *msf) {
  return ((msf[0] * 60 + msf[1]) * 75) + msf[2];
}


x86 assembly (clang, -O0):
<msf2sec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
imul   $0x3c,%eax,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
add    %ecx,%eax
imul   $0x4b,%eax,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<msf2sec>:
movsbl (%rdi),%eax
imul   $0x3c,%eax,%eax
movsbl 0x1(%rdi),%ecx
add    %eax,%ecx
imul   $0x4b,%ecx,%ecx
movsbl 0x2(%rdi),%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @msf2sec(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = mul nsw i32 %6, 60
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = add nsw i32 %7, %11
%13 = mul nsw i32 %12, 75
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = add nsw i32 %13, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @msf2sec(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = mul nsw i32 %3, 60
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = add nsw i32 %4, %7
%9 = mul nsw i32 %8, 75
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = add nsw i32 %9, %12
ret i32 %13
}
long msf_msf_to_frame(int minutes, int seconds, int frames) {
  return ((minutes * 60 + seconds) * 75 + frames);
}


x86 assembly (clang, -O0):
<msf_msf_to_frame>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
imul   $0x3c,-0x4(%rbp),%eax
add    -0x8(%rbp),%eax
imul   $0x4b,%eax,%eax
add    -0xc(%rbp),%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<msf_msf_to_frame>:
imul   $0x3c,%edi,%eax
add    %esi,%eax
imul   $0x4b,%eax,%eax
add    %edx,%eax
cltq
ret

LLVM IR (-O0):
define i64 @msf_msf_to_frame(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = mul nsw i32 %7, 60
%9 = load i32, i32* %5
%10 = add nsw i32 %8, %9
%11 = mul nsw i32 %10, 75
%12 = load i32, i32* %6
%13 = add nsw i32 %11, %12
%14 = sext i32 %13 to i64
ret i64 %14
}

LLVM IR (-O2):
define i64 @msf_msf_to_frame(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %0, 60
%5 = add nsw i32 %4, %1
%6 = mul nsw i32 %5, 75
%7 = add nsw i32 %6, %2
%8 = sext i32 %7 to i64
ret i64 %8
}
/* Variables and functions */
float sinf(float);
float gb_sin(float radians) { return sinf(radians); }


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

x86 assembly (clang, -O2):
<gb_sin>:
jmp    1030 <sinf@plt>

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

LLVM IR (-O2):
define float @gb_sin(float %0) {
%2 = tail call float @sinf(float %0)
ret float %2
}
const char *pathconN_nm3_name_in(int i) {
  switch (i) {
  case 0:
    return "i0";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<pathconN_nm3_name_in>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
test   %eax,%eax
jne    1127 <pathconN_nm3_name_in+0x27>
jmp    1117 <pathconN_nm3_name_in+0x17>
lea    0xee2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <pathconN_nm3_name_in+0x2f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathconN_nm3_name_in>:
xor    %eax,%eax
test   %edi,%edi
lea    0xef5(%rip),%rcx
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"i0\00"
define i8* @pathconN_nm3_name_in(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 0, label %5
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %7
6: ; preds = %1
store i8* null, i8** %2
br label %7
7: ; preds = %6, %5
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"i0\00"
define i8* @pathconN_nm3_name_in(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* null
ret i8* %3
}
void nullpo_final(void) {}


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

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

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

LLVM IR (-O2):
define void @nullpo_final() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void exit_with_diagnostic(char *diagnostic_message) {
  fprintf(stderr, diagnostic_message);
  exit(EXIT_FAILURE);
}


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

x86 assembly (clang, -O2):
<exit_with_diagnostic>:
push   %rax
mov    %rdi,%rsi
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1030 <fprintf@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@EXIT_FAILURE = global i32 0
define void @exit_with_diagnostic(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* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@EXIT_FAILURE = global i32 0
define void @exit_with_diagnostic(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_unlock(int /*<<< orphan*/ *);
int Thread_unlock_mutex(pthread_mutex_t *mutex) {
  int rc = -1;
  if ((rc = pthread_mutex_unlock(mutex)) == 0)
    rc = 0;
  return rc;
}


x86 assembly (clang, -O0):
<Thread_unlock_mutex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pthread_mutex_unlock@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jne    113f <Thread_unlock_mutex+0x2f>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Thread_unlock_mutex>:
jmp    1030 <pthread_mutex_unlock@plt>

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

LLVM IR (-O2):
define i32 @Thread_unlock_mutex(i32* %0) {
%2 = tail call i32 @pthread_mutex_unlock(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ applyMultiProtocolRtlsPatch();
void rf_patch_cpe_multi_protocol_rtls(void) { applyMultiProtocolRtlsPatch(); }


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

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

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

LLVM IR (-O2):
define void @rf_patch_cpe_multi_protocol_rtls() {
%1 = tail call i32 (...) @applyMultiProtocolRtlsPatch()
ret void
}
void f(int x) {
  while (x < 3) {
    switch (x) {
    case 1:
      break;
    case 2:
      break;
    case 3:
      break;
    }
    while (x > 2) {
      if (3 > 4) {
        break;
      } else {
        break;
      }
    }
  }
  while (x < 2) {
    x++;
    break;
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jge    116f <f+0x6f>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x1,%eax
je     1147 <f+0x47>
jmp    1125 <f+0x25>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     114c <f+0x4c>
jmp    1136 <f+0x36>
mov    -0x8(%rbp),%eax
sub    $0x3,%eax
je     1151 <f+0x51>
jmp    1156 <f+0x56>
jmp    1156 <f+0x56>
jmp    1156 <f+0x56>
jmp    1156 <f+0x56>
jmp    115b <f+0x5b>
cmpl   $0x2,-0x4(%rbp)
jle    116a <f+0x6a>
jmp    116a <f+0x6a>
jmp    1107 <f+0x7>
jmp    1174 <f+0x74>
cmpl   $0x2,-0x4(%rbp)
jge    1187 <f+0x87>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
cmp    $0x2,%edi
jg     1112 <f+0x12>
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1110 <f+0x10>
ret

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

LLVM IR (-O2):
define void @f(i32 %0) {
%2 = icmp slt i32 %0, 3
br i1 %2, label %3, label %4
3: ; preds = %1, %3
br label %3
4: ; preds = %1
ret void
}
/* Variables and functions */
double exp(double);
double pow(double const, double);
double HO_0(const double L, const double x) {
  double retval = 0.7511255444e0 * pow(L, -0.1e1 / 0.2e1) *
                  exp(-0.5000000000e0 * x * x * pow(L, -0.2e1));
  return retval;
}


x86 assembly (clang, -O0):
<HO_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xec9(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xec1(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xea8(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xe84(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HO_0>:
sub    $0x18,%rsp
movsd  %xmm1,(%rsp)
movsd  %xmm0,0x8(%rsp)
movsd  0xec9(%rip),%xmm1
call   1040 <pow@plt>
mulsd  0xec4(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xeae(%rip),%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
movsd  0xea4(%rip),%xmm1
movsd  0x8(%rsp),%xmm0
call   1040 <pow@plt>
mulsd  (%rsp),%xmm0
call   1030 <exp@plt>
mulsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @HO_0(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = call double @pow(double %6, double -5.000000e-01)
%8 = fmul double 0x3FE80938700C6C1A, %7
%9 = load double, double* %4
%10 = fmul double -5.000000e-01, %9
%11 = load double, double* %4
%12 = fmul double %10, %11
%13 = load double, double* %3
%14 = call double @pow(double %13, double -2.000000e+00)
%15 = fmul double %12, %14
%16 = call double @exp(double %15)
%17 = fmul double %8, %16
store double %17, double* %5
%18 = load double, double* %5
ret double %18
}

LLVM IR (-O2):
define double @HO_0(double %0, double %1) {
%3 = tail call double @pow(double %0, double -5.000000e-01)
%4 = fmul double %3, 0x3FE80938700C6C1A
%5 = fmul double %1, -5.000000e-01
%6 = fmul double %5, %1
%7 = tail call double @pow(double %0, double -2.000000e+00)
%8 = fmul double %6, %7
%9 = tail call double @exp(double %8)
%10 = fmul double %4, %9
ret double %10
}
/* Type definitions */
typedef int /*<<< orphan*/ SXNETID;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ SXNETID_it;
int i2d_SXNETID(SXNETID *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &SXNETID_it);
}


x86 assembly (clang, -O0):
<i2d_SXNETID>:
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    0x2ea9(%rip),%rdx
call   1030 <ASN1_item_i2d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2d_SXNETID>:
mov    0x2ec1(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

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

LLVM IR (-O2):
@SXNETID_it = global i32 0
define i32 @i2d_SXNETID(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @SXNETID_it)
ret i32 %3
}
void my_fini(void) {}


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

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

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

LLVM IR (-O2):
define void @my_fini() {
ret void
}