xunge/DecIR huggingface dataset:
double Ftrgen(double x, double xa, double xb, double ya, double yb) {
  double Ftr(double x);
  double res;
  res = ya + (yb - ya) * Ftr((x - xa) / (xb - xa));
  return (res);
}


x86 assembly (clang, -O0):
<Ftrgen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <Ftr@plt>
movsd  -0x40(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ftrgen>:
sub    $0x18,%rsp
movsd  %xmm3,0x10(%rsp)
subsd  %xmm3,%xmm4
movsd  %xmm4,0x8(%rsp)
subsd  %xmm1,%xmm0
subsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
call   1030 <Ftr@plt>
mulsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @Ftrgen(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%12 = load double, double* %9
%13 = load double, double* %10
%14 = load double, double* %9
%15 = fsub double %13, %14
%16 = load double, double* %6
%17 = load double, double* %7
%18 = fsub double %16, %17
%19 = load double, double* %8
%20 = load double, double* %7
%21 = fsub double %19, %20
%22 = fdiv double %18, %21
%23 = call double @Ftr(double %22)
%24 = call double @llvm.fmuladd.f64(double %15, double %23, double %12)
store double %24, double* %11
%25 = load double, double* %11
ret double %25
}

LLVM IR (-O2):
define double @Ftrgen(double %0, double %1, double %2, double %3, double %4) {
%6 = fsub double %4, %3
%7 = fsub double %0, %1
%8 = fsub double %2, %1
%9 = fdiv double %7, %8
%10 = tail call double @Ftr(double %9)
%11 = tail call double @llvm.fmuladd.f64(double %6, double %10, double %3)
ret double %11
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_sqrt_pd(int /*<<< orphan*/);
int /*<<< orphan*/ _mm_xor_pd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d t4(__m128d a, __m128d b) {
  a = _mm_sqrt_pd(a);
  b = _mm_sqrt_pd(b);
  return _mm_xor_pd(a, b);
}


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

x86 assembly (clang, -O2):
<t4>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1030 <_mm_sqrt_pd@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <_mm_sqrt_pd@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <_mm_xor_pd@plt>

LLVM IR (-O0):
define i32 @t4(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 @_mm_sqrt_pd(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @_mm_sqrt_pd(i32 %7)
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @_mm_xor_pd(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @t4(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_sqrt_pd(i32 %0)
%4 = tail call i32 @_mm_sqrt_pd(i32 %1)
%5 = tail call i32 @_mm_xor_pd(i32 %3, i32 %4)
ret i32 %5
}
void *test_anti_range_98(signed char n) {
  extern void *alloc_anti_range_98(signed char) __attribute__((alloc_size(1)));
  if (0 <= n && n <= 2)
    n = 0 - 1;
  return alloc_anti_range_98(n);
}


x86 assembly (clang, -O0):
<test_anti_range_98>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jg     113d <test_anti_range_98+0x2d>
movsbl -0x1(%rbp),%eax
cmp    $0x2,%eax
jg     113d <test_anti_range_98+0x2d>
movb   $0xff,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <alloc_anti_range_98@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_98>:
cmp    $0x3,%dil
mov    $0xff,%eax
cmovae %edi,%eax
movsbl %al,%edi
jmp    1030 <alloc_anti_range_98@plt>

LLVM IR (-O0):
define i8* @test_anti_range_98(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 0, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 2
br i1 %9, label %10, label %11
10: ; preds = %6
store i8 -1, i8* %2
br label %11
11: ; preds = %10, %6, %1
%12 = load i8, i8* %2
%13 = call i8* @alloc_anti_range_98(i8 signext %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @test_anti_range_98(i8 signext %0) {
%2 = icmp ult i8 %0, 3
%3 = select i1 %2, i8 -1, i8 %0
%4 = tail call i8* @alloc_anti_range_98(i8 signext %3)
ret i8* %4
}
int test_imm_C5uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xC5 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_C5uint64_highword_reg>:
movabs $0xc500000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_C5uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 197
%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_C5uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 846108557312
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void do_help() {
  printf("      help : display help info\n");
  printf("      quit : exit\n");
  printf("      list : get file list from server\n");
  printf("get <file> : download <file> from server\n");
  printf("put <file> : upload <file> to server\n");
  return;
}


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

x86 assembly (clang, -O2):
<do_help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefb(%rip),%rdi
call   1030 <puts@plt>
lea    0xf01(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf39(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [32 x i8] c" help : display help info\0A\00"
@.str.1 = [19 x i8] c" quit : exit\0A\00"
@.str.2 = [40 x i8] c" list : get file list from server\0A\00"
@.str.3 = [42 x i8] c"get <file> : download <file> from server\0A\00"
@.str.4 = [38 x i8] c"put <file> : upload <file> to server\0A\00"
define void @do_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [31 x i8] c" help : display help info\00"
@str.5 = [18 x i8] c" quit : exit\00"
@str.6 = [39 x i8] c" list : get file list from server\00"
@str.7 = [41 x i8] c"get <file> : download <file> from server\00"
@str.8 = [37 x i8] c"put <file> : upload <file> to server\00"
define void @do_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.8, i64 0, i64 0))
ret void
}
double __complex__ f_ret_doublecomplex() { return 1.0; }


x86 assembly (clang, -O0):
<f_ret_doublecomplex>:
push   %rbp
mov    %rsp,%rbp
movabs $0x3ff0000000000000,%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_ret_doublecomplex>:
movsd  0xef8(%rip),%xmm0
xorps  %xmm1,%xmm1
ret

LLVM IR (-O0):
define { double, double } @f_ret_doublecomplex() {
%1 = alloca { double, double }
%2 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 0
%3 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 1
store double 1.000000e+00, double* %2
store double 0.000000e+00, double* %3
%4 = load { double, double }, { double, double }* %1
ret { double, double } %4
}

LLVM IR (-O2):
define { double, double } @f_ret_doublecomplex() {
ret { double, double } { double 1.000000e+00, double 0.000000e+00 }
}
/* Variables and functions */
int /*<<< orphan*/ cdecl_func__optarg(int /*<<< orphan*/);
int /*<<< orphan*/ optarg;
void cdecl_expr__optarg() { cdecl_func__optarg(optarg); }


x86 assembly (clang, -O0):
<cdecl_expr__optarg>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%edi
call   1030 <cdecl_func__optarg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdecl_expr__optarg>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <cdecl_func__optarg@plt>

LLVM IR (-O0):
@optarg = global i32 0
define void @cdecl_expr__optarg() {
%1 = load i32, i32* @optarg
%2 = call i32 @cdecl_func__optarg(i32 %1)
ret void
}

LLVM IR (-O2):
@optarg = global i32 0
define void @cdecl_expr__optarg() {
%1 = load i32, i32* @optarg
%2 = tail call i32 @cdecl_func__optarg(i32 %1)
ret void
}
void PushIntegerArgumentSyntaxMapping(long p_value) {}


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

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

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

LLVM IR (-O2):
define void @PushIntegerArgumentSyntaxMapping(i64 %0) {
ret void
}
/* Type definitions */
typedef int GLint;

/* Variables and functions */
int /*<<< orphan*/ Circle_draw(int, int, int);
int /*<<< orphan*/ GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ glPointSize(double);
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT);
  glColor3f(1.0, 0.0, 0.0);
  glPointSize(2.0);
  GLint xc = 100, yc = 100, r = 50;
  Circle_draw(xc, yc, r);
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
movsd  0xe9a(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1050 <glColor3f@plt>
movsd  0xe7f(%rip),%xmm0
call   1070 <glPointSize@plt>
movl   $0x64,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
movl   $0x32,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <Circle_draw@plt>
mov    $0x0,%al
call   1060 <glFlush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
movsd  0xe99(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1050 <glColor3f@plt>
movsd  0xe8e(%rip),%xmm0
call   1070 <glPointSize@plt>
mov    $0x64,%edi
mov    $0x64,%esi
mov    $0x32,%edx
call   1040 <Circle_draw@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <glFlush@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @display() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = load i32, i32* @GL_COLOR_BUFFER_BIT
%5 = call i32 @glClear(i32 %4)
%6 = call i32 @glColor3f(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%7 = call i32 @glPointSize(double 2.000000e+00)
store i32 100, i32* %1
store i32 100, i32* %2
store i32 50, i32* %3
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @Circle_draw(i32 %8, i32 %9, i32 %10)
%12 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = tail call i32 @glClear(i32 %1)
%3 = tail call i32 @glColor3f(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%4 = tail call i32 @glPointSize(double 2.000000e+00)
%5 = tail call i32 @Circle_draw(i32 100, i32 100, i32 50)
%6 = tail call i32 (...) @glFlush()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SendToReceiver(int);
void SendNoteOff(int note) { SendToReceiver(note); }


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

x86 assembly (clang, -O2):
<SendNoteOff>:
jmp    1030 <SendToReceiver@plt>

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

LLVM IR (-O2):
define void @SendNoteOff(i32 %0) {
%2 = tail call i32 @SendToReceiver(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ArgItem();
int IsRoom(int /*<<< orphan*/);
int Cnd_IsRoom(void) { return (IsRoom(ArgItem())); }


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

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

LLVM IR (-O0):
define i32 @Cnd_IsRoom() {
%1 = call i32 (...) @ArgItem()
%2 = call i32 @IsRoom(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @Cnd_IsRoom() {
%1 = tail call i32 (...) @ArgItem()
%2 = tail call i32 @IsRoom(i32 %1)
ret i32 %2
}
char *strcat(char *dst, const char *src) {
  char *p = dst;
  while (*p)
    p++;
  while ((*p++ = *src++))
    ;
  return dst;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1132 <strcat+0x32>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <strcat+0x14>
jmp    1137 <strcat+0x37>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1166 <strcat+0x66>
jmp    1137 <strcat+0x37>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <strcat+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <strcat+0x20>
ret

LLVM IR (-O0):
define i8* @strcat(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
store i8* %6, i8** %5
br label %7
7: ; preds = %11, %2
%8 = load i8*, i8** %5
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %5
br label %7
14: ; preds = %7
br label %15
15: ; preds = %22, %14
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %4
%18 = load i8, i8* %16
%19 = load i8*, i8** %5
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %5
store i8 %18, i8* %19
%21 = icmp ne i8 %18, 0
br i1 %21, label %22, label %23
22: ; preds = %15
br label %15
23: ; preds = %15
%24 = load i8*, i8** %3
ret i8* %24
}

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %1, %3 ]
%10 = phi i8* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %0
}
unsigned char calcX(unsigned char *Z, const unsigned char *C) {
  return ~(*Z ^ *C);
}


x86 assembly (clang, -O0):
<calcX>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
xor    $0xffffffff,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcX>:
mov    (%rdi),%al
xor    (%rsi),%al
not    %al
ret

LLVM IR (-O0):
define zeroext i8 @calcX(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = xor i32 %7, %10
%12 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @calcX(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = xor i8 %3, %4
%6 = xor i8 %5, -1
ret i8 %6
}
void erratum_a15_798181_init(void) {}


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

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

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

LLVM IR (-O2):
define void @erratum_a15_798181_init() {
ret void
}
/* Variables and functions */
unsigned int *env_get_u32s(char *);
unsigned env_get_u32(char *name, unsigned value) {
  unsigned *values = env_get_u32s(name);
  if (values) {
    value = *values;
  }
  return value;
}


x86 assembly (clang, -O0):
<env_get_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <env_get_u32s@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1140 <env_get_u32+0x30>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<env_get_u32>:
push   %rbx
mov    %esi,%ebx
call   1030 <env_get_u32s@plt>
test   %rax,%rax
je     111f <env_get_u32+0xf>
mov    (%rax),%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @env_get_u32(i8* %0, i32 %1) {
%3 = tail call i32* @env_get_u32s(i8* %0)
%4 = icmp eq i32* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = load i32, i32* %3
br label %7
7: ; preds = %5, %2
%8 = phi i32 [ %6, %5 ], [ %1, %2 ]
ret i32 %8
}
int main() {
  char buf[40];
  buf[39] = 42;
  return 0xb100d;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x2a,-0x9(%rbp)
mov    $0xb100d,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [40 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 39
store i8 42, i8* %3
ret i32 725005
}

LLVM IR (-O2):
define i32 @main() {
ret i32 725005
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void safe_free(void *mem) { free(mem); }


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

x86 assembly (clang, -O2):
<safe_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @safe_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int RAND_MAX;
int rand();
int random_between(int low, int high) {
  return (low + rand() / ((RAND_MAX / (high - low)) + 1));
}


x86 assembly (clang, -O0):
<random_between>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x10(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    $0x1,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_between>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,%ecx
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
sub    %ebp,%ebx
cltd
idiv   %ebx
mov    %eax,%esi
add    $0x1,%esi
mov    %ecx,%eax
cltd
idiv   %esi
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@RAND_MAX = global i32 0
define i32 @random_between(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 (...) @rand()
%7 = load i32, i32* @RAND_MAX
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = sub nsw i32 %8, %9
%11 = sdiv i32 %7, %10
%12 = add nsw i32 %11, 1
%13 = sdiv i32 %6, %12
%14 = add nsw i32 %5, %13
ret i32 %14
}

LLVM IR (-O2):
@RAND_MAX = global i32 0
define i32 @random_between(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = load i32, i32* @RAND_MAX
%5 = sub nsw i32 %1, %0
%6 = sdiv i32 %4, %5
%7 = add nsw i32 %6, 1
%8 = sdiv i32 %3, %7
%9 = add nsw i32 %8, %0
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int age;
  double seconds;
  printf("Input your age:");
  scanf("%d", &age);
  seconds = age * 3.156e7;
  printf("You have past about %e seconds in your life!\n", seconds);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xea6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xeac(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cvtsi2sdl 0x4(%rsp),%xmm0
mulsd  0xeb2(%rip),%xmm0
lea    0xec6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Input your age:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [46 x i8] c"You have past about %e seconds in your life!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = sitofp i32 %6 to double
%8 = fmul double %7, 3.156000e+07
store double %8, double* %3
%9 = load double, double* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Input your age:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [46 x i8] c"You have past about %e seconds in your life!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = sitofp i32 %5 to double
%7 = fmul double %6, 3.156000e+07
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}
int dev_redir_deinit(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dev_redir_deinit() {
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
char *stringStore(const char *src, int len) {
  char *s = (char *)malloc(len + 1);
  memcpy(s, src, len);
  s[len] = 0;
  return s;
}


x86 assembly (clang, -O0):
<stringStore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringStore>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    0x1(%r15),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1030 <memcpy@plt>
movslq %r15d,%rax
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @stringStore(i8* %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @memcpy(i8* %5, i8* %0, i32 %1)
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
store i8 0, i8* %8
ret i8* %5
}
int test_imm_DAuint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xDA << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_DAuint64_highword_mem>:
testb  $0xda,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_DAuint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 936302870528
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int test_unpriv_remount(char *, int /*<<< orphan*/ *, int, int,
                        int /*<<< orphan*/);
bool test_unpriv_remount_simple(int mount_flags) {
  return test_unpriv_remount("ramfs", NULL, mount_flags, mount_flags, 0);
}


x86 assembly (clang, -O0):
<test_unpriv_remount_simple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x4(%rbp),%ecx
lea    0xed8(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %r8d,%r8d
call   1030 <test_unpriv_remount@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_unpriv_remount_simple>:
mov    %edi,%ecx
lea    0xee7(%rip),%rdi
xor    %esi,%esi
mov    %ecx,%edx
xor    %r8d,%r8d
jmp    1030 <test_unpriv_remount@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"ramfs\00"
define i32 @test_unpriv_remount_simple(i32 %0) {
%2 = tail call i32 @test_unpriv_remount(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* null, i32 %0, i32 %0, i32 0)
ret i32 %2
}
/* Variables and functions */
double log(float);
float ran3(long *);
double expdev(long *idum) {
  float dum;
  do {
    dum = ran3(idum);
  } while (dum == 0.0);
  return -log(dum);
}


x86 assembly (clang, -O0):
<expdev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ran3@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    115b <expdev+0x3b>
jp     115b <expdev+0x3b>
jmp    112c <expdev+0xc>
movss  -0xc(%rbp),%xmm0
call   1040 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expdev>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <ran3@plt>
ucomiss 0xed1(%rip),%xmm0
jne    1143 <expdev+0x23>
jnp    1130 <expdev+0x10>
call   1040 <log@plt>
xorps  0xeb1(%rip),%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define double @expdev(i64* %0) {
%2 = alloca i64*
%3 = alloca float
store i64* %0, i64** %2
br label %4
4: ; preds = %7, %1
%5 = load i64*, i64** %2
%6 = call float @ran3(i64* %5)
store float %6, float* %3
br label %7
7: ; preds = %4
%8 = load float, float* %3
%9 = fpext float %8 to double
%10 = fcmp oeq double %9, 0.000000e+00
br i1 %10, label %4, label %11
11: ; preds = %7
%12 = load float, float* %3
%13 = call double @log(float %12)
%14 = fneg double %13
ret double %14
}

LLVM IR (-O2):
define double @expdev(i64* %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call float @ran3(i64* %0)
%4 = fcmp oeq float %3, 0.000000e+00
br i1 %4, label %2, label %5
5: ; preds = %2
%6 = tail call double @log(float %3)
%7 = fneg double %6
ret double %7
}
/* Variables and functions */
char *redirect_path_full(char const *, int, int /*<<< orphan*/);
char *redirect_path_target(const char *pathname) {
  return redirect_path_full(pathname, 1, 0);
}


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

x86 assembly (clang, -O2):
<redirect_path_target>:
mov    $0x1,%esi
xor    %edx,%edx
jmp    1030 <redirect_path_full@plt>

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

LLVM IR (-O2):
define i8* @redirect_path_target(i8* %0) {
%2 = tail call i8* @redirect_path_full(i8* %0, i32 1, i32 0)
ret i8* %2
}
int qsort_asc_dvector(const void *a, const void *b) {
  const double *aa = a;
  const double *bb = b;
  if (*aa > *bb)
    return 1;
  else if (*aa == *bb)
    return 0;
  return -1;
}


x86 assembly (clang, -O0):
<qsort_asc_dvector>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    113e <qsort_asc_dvector+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1172 <qsort_asc_dvector+0x72>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomisd (%rax),%xmm0
jne    1166 <qsort_asc_dvector+0x66>
jp     1166 <qsort_asc_dvector+0x66>
movl   $0x0,-0x4(%rbp)
jmp    1172 <qsort_asc_dvector+0x72>
jmp    116b <qsort_asc_dvector+0x6b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort_asc_dvector>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
ucomisd %xmm1,%xmm0
cmpneqsd %xmm1,%xmm0
movq   %xmm0,%rcx
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @qsort_asc_dvector(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double*
%7 = alloca double*
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
store double* %9, double** %6
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to double*
store double* %11, double** %7
%12 = load double*, double** %6
%13 = load double, double* %12
%14 = load double*, double** %7
%15 = load double, double* %14
%16 = fcmp ogt double %13, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %3
br label %27
18: ; preds = %2
%19 = load double*, double** %6
%20 = load double, double* %19
%21 = load double*, double** %7
%22 = load double, double* %21
%23 = fcmp oeq double %20, %22
br i1 %23, label %24, label %25
24: ; preds = %18
store i32 0, i32* %3
br label %27
25: ; preds = %18
br label %26
26: ; preds = %25
store i32 -1, i32* %3
br label %27
27: ; preds = %26, %24, %17
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @qsort_asc_dvector(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = bitcast i8* %1 to double*
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
%8 = fcmp une double %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ MAIN__();
int zblat3_() {
  MAIN__();
  return 0;
}


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

x86 assembly (clang, -O2):
<zblat3_>:
push   %rax
xor    %eax,%eax
call   1030 <MAIN__@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @zblat3_() {
%1 = call i32 (...) @MAIN__()
ret i32 0
}

LLVM IR (-O2):
define i32 @zblat3_() {
%1 = tail call i32 (...) @MAIN__()
ret i32 0
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int fdd_bps_valid(uint16_t bps) {
  int i;
  for (i = 0; i <= 8; i++) {
    if (bps == (128 << i)) {
      return 1;
    }
  }
  return (0);
}


x86 assembly (clang, -O0):
<fdd_bps_valid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jg     114e <fdd_bps_valid+0x4e>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0x80,%edx
shl    %cl,%edx
mov    %edx,%ecx
cmp    %ecx,%eax
jne    113b <fdd_bps_valid+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1155 <fdd_bps_valid+0x55>
jmp    1140 <fdd_bps_valid+0x40>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <fdd_bps_valid+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdd_bps_valid>:
mov    $0x1,%eax
cmp    $0x7ff,%edi
jle    112e <fdd_bps_valid+0x2e>
cmp    $0x1fff,%edi
jle    1148 <fdd_bps_valid+0x48>
cmp    $0x2000,%edi
je     112d <fdd_bps_valid+0x2d>
cmp    $0x4000,%edi
je     112d <fdd_bps_valid+0x2d>
cmp    $0x8000,%edi
jne    116a <fdd_bps_valid+0x6a>
ret
cmp    $0x1ff,%edi
jg     115a <fdd_bps_valid+0x5a>
cmp    $0x80,%edi
je     112d <fdd_bps_valid+0x2d>
cmp    $0x100,%edi
je     112d <fdd_bps_valid+0x2d>
jmp    116a <fdd_bps_valid+0x6a>
cmp    $0x800,%edi
je     112d <fdd_bps_valid+0x2d>
cmp    $0x1000,%edi
je     112d <fdd_bps_valid+0x2d>
jmp    116a <fdd_bps_valid+0x6a>
cmp    $0x200,%edi
je     112d <fdd_bps_valid+0x2d>
cmp    $0x400,%edi
je     112d <fdd_bps_valid+0x2d>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @fdd_bps_valid(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %15, %1
%6 = load i32, i32* %4
%7 = icmp sle i32 %6, 8
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = shl i32 128, %10
%12 = icmp eq i32 %9, %11
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 1, i32* %2
br label %19
14: ; preds = %8
br label %15
15: ; preds = %14
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
br label %5
18: ; preds = %5
store i32 0, i32* %2
br label %19
19: ; preds = %18, %13
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @fdd_bps_valid(i32 %0) {
switch i32 %0, label %2 [
i32 128, label %3
i32 256, label %3
i32 512, label %3
i32 1024, label %3
i32 2048, label %3
i32 4096, label %3
i32 8192, label %3
i32 16384, label %3
i32 32768, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 1, %1 ], [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
unsigned int __VERIFIER_nondet_uint();
int main(void) {
  unsigned int a = __VERIFIER_nondet_uint();
  __VERIFIER_assert(a < 10);
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_uint@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_uint@plt>
mov    %eax,%ebx
xor    %edi,%edi
cmp    $0xa,%eax
setb   %dil
call   1030 <__VERIFIER_assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_uint()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ult i32 %4, 10
%6 = zext i1 %5 to i32
%7 = call i32 @__VERIFIER_assert(i32 %6)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_uint()
%2 = icmp ult i32 %1, 10
%3 = zext i1 %2 to i32
%4 = tail call i32 @__VERIFIER_assert(i32 %3)
ret i32 %1
}
int f(int x) { return 0 <= (x > 0 ? x : -x); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    111c <f+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <f+0x24>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 1
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int create_dobldobl_homotopy_with_given_gamma(double gamma_re, double gamma_im,
                                              int pwt) {
  int *b, fail;
  double c[2];
  c[0] = gamma_re;
  c[1] = gamma_im;
  fail = _ada_use_c2phc(173, &pwt, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<create_dobldobl_homotopy_with_given_gamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x20(%rbp),%rdx
lea    -0x40(%rbp),%rcx
mov    $0xad,%edi
lea    -0x14(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_dobldobl_homotopy_with_given_gamma>:
sub    $0x28,%rsp
mov    %edi,0xc(%rsp)
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x18(%rsp)
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rcx
mov    $0xad,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @create_dobldobl_homotopy_with_given_gamma(double %0, double %1, i32 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
%9 = alloca [2 x double]
store double %0, double* %4
store double %1, double* %5
store i32 %2, i32* %6
%10 = load double, double* %4
%11 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 0
store double %10, double* %11
%12 = load double, double* %5
%13 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 1
store double %12, double* %13
%14 = load i32*, i32** %7
%15 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 0
%16 = call i32 @_ada_use_c2phc(i32 173, i32* %6, i32* %14, double* %15, i32 0)
store i32 %16, i32* %8
%17 = load i32, i32* %8
ret i32 %17
}

LLVM IR (-O2):
define i32 @create_dobldobl_homotopy_with_given_gamma(double %0, double %1, i32 %2) {
%4 = alloca i32
%5 = alloca [2 x double]
store i32 %2, i32* %4
%6 = bitcast [2 x double]* %5 to i8*
%7 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 0
store double %0, double* %7
%8 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 1
store double %1, double* %8
%9 = call i32 @_ada_use_c2phc(i32 173, i32* %4, i32* undef, double* %7, i32 0)
ret i32 %9
}
double f4_sum_pre_int_int_int_int_int_int_float(int v0, int v1, int v2, int v3,
                                                int v4, int v5, float v) {
  return (double)v0 + (double)v1 + (double)v2 + (double)v3 + (double)v4 +
         (double)v5 + ((double)(v));
}


x86 assembly (clang, -O0):
<f4_sum_pre_int_int_int_int_int_int_float>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
movss  %xmm0,-0x1c(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x18(%rbp),%xmm1
addsd  %xmm1,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_sum_pre_int_int_int_int_int_int_float>:
cvtsi2sd %edi,%xmm1
cvtsi2sd %esi,%xmm2
addsd  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
addsd  %xmm2,%xmm1
xorps  %xmm2,%xmm2
cvtsi2sd %ecx,%xmm2
addsd  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtsi2sd %r8d,%xmm1
cvtsi2sd %r9d,%xmm3
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm3
cvtss2sd %xmm0,%xmm0
addsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @f4_sum_pre_int_int_int_int_int_int_float(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, float %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca float
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store float %6, float* %14
%15 = load i32, i32* %8
%16 = sitofp i32 %15 to double
%17 = load i32, i32* %9
%18 = sitofp i32 %17 to double
%19 = fadd double %16, %18
%20 = load i32, i32* %10
%21 = sitofp i32 %20 to double
%22 = fadd double %19, %21
%23 = load i32, i32* %11
%24 = sitofp i32 %23 to double
%25 = fadd double %22, %24
%26 = load i32, i32* %12
%27 = sitofp i32 %26 to double
%28 = fadd double %25, %27
%29 = load i32, i32* %13
%30 = sitofp i32 %29 to double
%31 = fadd double %28, %30
%32 = load float, float* %14
%33 = fpext float %32 to double
%34 = fadd double %31, %33
ret double %34
}

LLVM IR (-O2):
define double @f4_sum_pre_int_int_int_int_int_int_float(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, float %6) {
%8 = sitofp i32 %0 to double
%9 = sitofp i32 %1 to double
%10 = fadd double %8, %9
%11 = sitofp i32 %2 to double
%12 = fadd double %10, %11
%13 = sitofp i32 %3 to double
%14 = fadd double %12, %13
%15 = sitofp i32 %4 to double
%16 = fadd double %14, %15
%17 = sitofp i32 %5 to double
%18 = fadd double %16, %17
%19 = fpext float %6 to double
%20 = fadd double %18, %19
ret double %20
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ pread(int, void *, size_t, int /*<<< orphan*/);
ssize_t exfat_read(int fd, void *buf, size_t size, off_t offset) {
  return pread(fd, buf, size, offset);
}


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

x86 assembly (clang, -O2):
<exfat_read>:
jmp    1030 <pread@plt>

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

LLVM IR (-O2):
define i32 @exfat_read(i32 %0, i8* nocapture %1, i64 %2, i32 %3) {
%5 = tail call i32 @pread(i32 %0, i8* %1, i64 %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int clear_dobldobl_homotopy(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(174, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<clear_dobldobl_homotopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xae,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_dobldobl_homotopy>:
mov    $0xae,%edi
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @clear_dobldobl_homotopy() {
%1 = tail call i32 @_ada_use_c2phc(i32 174, i32* undef, i32* undef, double* undef)
ret i32 %1
}