#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double sqrt(double);
void bslipss(unsigned n, double t, double *Y, double *p, double *f) {
  double l, F, Fx, Fy, Fz;
  double xr, zr;
  xr = Y[0] - p[10];
  zr = Y[2] - p[12];
  l = sqrt(xr * xr + Y[1] * Y[1] + zr * zr);
  if (p[16] == 1.) {
    F = -p[0] * (l - p[4]);
    if (F < 0.) {
      F = 0.;
    }
  } else {
    F = -p[1] * (l - p[5]);
    if (F < 0.) {
      F = 0.;
    }
  }
  Fx = xr / l * F;
  Fy = Y[1] / l * F;
  Fz = zr / l * F;
  f[0] = Y[3];
  f[1] = Y[4];
  f[2] = Y[5];
  f[3] = Fx / p[8];
  f[4] = Fy / p[8] + p[9];
  f[5] = Fz / p[8];
}


x86 assembly (clang, -O0):
<bslipss>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  0x50(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x80(%rax),%xmm0
movsd  0xe53(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    120e <bslipss+0xfe>
jp     120e <bslipss+0xfe>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x30(%rbp),%xmm1
mov    -0x20(%rbp),%rax
subsd  0x20(%rax),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    1209 <bslipss+0xf9>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1260 <bslipss+0x150>
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x30(%rbp),%xmm1
mov    -0x20(%rbp),%rax
subsd  0x28(%rax),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    125b <bslipss+0x14b>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1260 <bslipss+0x150>
movsd  -0x58(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
divsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x60(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
divsd  0x40(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x20(%rbp),%rax
divsd  0x40(%rax),%xmm0
mov    -0x20(%rbp),%rax
addsd  0x48(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x50(%rbp),%xmm0
mov    -0x20(%rbp),%rax
divsd  0x40(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x28(%rax)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bslipss>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rsi,%r15
movsd  (%rsi),%xmm5
subsd  0x50(%rdx),%xmm5
movsd  0x8(%rsi),%xmm0
movsd  0x10(%rsi),%xmm4
subsd  0x60(%rdx),%xmm4
mulsd  %xmm0,%xmm0
movapd %xmm5,%xmm1
mulsd  %xmm5,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1166 <bslipss+0x56>
sqrtsd %xmm0,%xmm0
jmp    1181 <bslipss+0x71>
movsd  %xmm4,0x8(%rsp)
movsd  %xmm5,(%rsp)
call   1030 <sqrt@plt>
movsd  (%rsp),%xmm5
movsd  0x8(%rsp),%xmm4
movsd  0x80(%rbx),%xmm1
ucomisd 0xe6f(%rip),%xmm1
jne    11ac <bslipss+0x9c>
jp     11ac <bslipss+0x9c>
movsd  (%rbx),%xmm2
xorpd  0xe6f(%rip),%xmm2
movapd %xmm0,%xmm1
subsd  0x20(%rbx),%xmm1
jmp    11c2 <bslipss+0xb2>
movsd  0x8(%rbx),%xmm2
xorpd  0xe57(%rip),%xmm2
movapd %xmm0,%xmm1
subsd  0x28(%rbx),%xmm1
mulsd  %xmm2,%xmm1
xorpd  %xmm2,%xmm2
ucomisd %xmm1,%xmm2
jbe    11d4 <bslipss+0xc4>
xorpd  %xmm1,%xmm1
divsd  %xmm0,%xmm5
mulsd  %xmm1,%xmm5
movsd  0x8(%r15),%xmm2
movsd  0x18(%r15),%xmm3
divsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm2
divsd  %xmm0,%xmm4
mulsd  %xmm1,%xmm4
movsd  %xmm3,(%r14)
movsd  0x20(%r15),%xmm0
movsd  %xmm0,0x8(%r14)
movsd  0x28(%r15),%xmm0
movsd  %xmm0,0x10(%r14)
divsd  0x40(%rbx),%xmm5
movsd  %xmm5,0x18(%r14)
divsd  0x40(%rbx),%xmm2
addsd  0x48(%rbx),%xmm2
movsd  %xmm2,0x20(%r14)
divsd  0x40(%rbx),%xmm4
movsd  %xmm4,0x28(%r14)
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @bslipss(i32 %0, double %1, double* %2, double* %3, double* %4) {
%6 = alloca i32
%7 = alloca double
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
store i32 %0, i32* %6
store double %1, double* %7
store double* %2, double** %8
store double* %3, double** %9
store double* %4, double** %10
%18 = load double*, double** %8
%19 = getelementptr inbounds double, double* %18, i64 0
%20 = load double, double* %19
%21 = load double*, double** %9
%22 = getelementptr inbounds double, double* %21, i64 10
%23 = load double, double* %22
%24 = fsub double %20, %23
store double %24, double* %16
%25 = load double*, double** %8
%26 = getelementptr inbounds double, double* %25, i64 2
%27 = load double, double* %26
%28 = load double*, double** %9
%29 = getelementptr inbounds double, double* %28, i64 12
%30 = load double, double* %29
%31 = fsub double %27, %30
store double %31, double* %17
%32 = load double, double* %16
%33 = load double, double* %16
%34 = load double*, double** %8
%35 = getelementptr inbounds double, double* %34, i64 1
%36 = load double, double* %35
%37 = load double*, double** %8
%38 = getelementptr inbounds double, double* %37, i64 1
%39 = load double, double* %38
%40 = fmul double %36, %39
%41 = call double @llvm.fmuladd.f64(double %32, double %33, double %40)
%42 = load double, double* %17
%43 = load double, double* %17
%44 = call double @llvm.fmuladd.f64(double %42, double %43, double %41)
%45 = call double @sqrt(double %44)
store double %45, double* %11
%46 = load double*, double** %9
%47 = getelementptr inbounds double, double* %46, i64 16
%48 = load double, double* %47
%49 = fcmp oeq double %48, 1.000000e+00
br i1 %49, label %50, label %65
50: ; preds = %5
%51 = load double*, double** %9
%52 = getelementptr inbounds double, double* %51, i64 0
%53 = load double, double* %52
%54 = fneg double %53
%55 = load double, double* %11
%56 = load double*, double** %9
%57 = getelementptr inbounds double, double* %56, i64 4
%58 = load double, double* %57
%59 = fsub double %55, %58
%60 = fmul double %54, %59
store double %60, double* %12
%61 = load double, double* %12
%62 = fcmp olt double %61, 0.000000e+00
br i1 %62, label %63, label %64
63: ; preds = %50
store double 0.000000e+00, double* %12
br label %64
64: ; preds = %63, %50
br label %80
65: ; preds = %5
%66 = load double*, double** %9
%67 = getelementptr inbounds double, double* %66, i64 1
%68 = load double, double* %67
%69 = fneg double %68
%70 = load double, double* %11
%71 = load double*, double** %9
%72 = getelementptr inbounds double, double* %71, i64 5
%73 = load double, double* %72
%74 = fsub double %70, %73
%75 = fmul double %69, %74
store double %75, double* %12
%76 = load double, double* %12
%77 = fcmp olt double %76, 0.000000e+00
br i1 %77, label %78, label %79
78: ; preds = %65
store double 0.000000e+00, double* %12
br label %79
79: ; preds = %78, %65
br label %80
80: ; preds = %79, %64
%81 = load double, double* %16
%82 = load double, double* %11
%83 = fdiv double %81, %82
%84 = load double, double* %12
%85 = fmul double %83, %84
store double %85, double* %13
%86 = load double*, double** %8
%87 = getelementptr inbounds double, double* %86, i64 1
%88 = load double, double* %87
%89 = load double, double* %11
%90 = fdiv double %88, %89
%91 = load double, double* %12
%92 = fmul double %90, %91
store double %92, double* %14
%93 = load double, double* %17
%94 = load double, double* %11
%95 = fdiv double %93, %94
%96 = load double, double* %12
%97 = fmul double %95, %96
store double %97, double* %15
%98 = load double*, double** %8
%99 = getelementptr inbounds double, double* %98, i64 3
%100 = load double, double* %99
%101 = load double*, double** %10
%102 = getelementptr inbounds double, double* %101, i64 0
store double %100, double* %102
%103 = load double*, double** %8
%104 = getelementptr inbounds double, double* %103, i64 4
%105 = load double, double* %104
%106 = load double*, double** %10
%107 = getelementptr inbounds double, double* %106, i64 1
store double %105, double* %107
%108 = load double*, double** %8
%109 = getelementptr inbounds double, double* %108, i64 5
%110 = load double, double* %109
%111 = load double*, double** %10
%112 = getelementptr inbounds double, double* %111, i64 2
store double %110, double* %112
%113 = load double, double* %13
%114 = load double*, double** %9
%115 = getelementptr inbounds double, double* %114, i64 8
%116 = load double, double* %115
%117 = fdiv double %113, %116
%118 = load double*, double** %10
%119 = getelementptr inbounds double, double* %118, i64 3
store double %117, double* %119
%120 = load double, double* %14
%121 = load double*, double** %9
%122 = getelementptr inbounds double, double* %121, i64 8
%123 = load double, double* %122
%124 = fdiv double %120, %123
%125 = load double*, double** %9
%126 = getelementptr inbounds double, double* %125, i64 9
%127 = load double, double* %126
%128 = fadd double %124, %127
%129 = load double*, double** %10
%130 = getelementptr inbounds double, double* %129, i64 4
store double %128, double* %130
%131 = load double, double* %15
%132 = load double*, double** %9
%133 = getelementptr inbounds double, double* %132, i64 8
%134 = load double, double* %133
%135 = fdiv double %131, %134
%136 = load double*, double** %10
%137 = getelementptr inbounds double, double* %136, i64 5
store double %135, double* %137
ret void
}

LLVM IR (-O2):
define void @bslipss(i32 %0, double %1, double* nocapture %2, double* nocapture %3, double* nocapture writeonly %4) {
%6 = load double, double* %2
%7 = getelementptr inbounds double, double* %3, i64 10
%8 = load double, double* %7
%9 = fsub double %6, %8
%10 = getelementptr inbounds double, double* %2, i64 2
%11 = load double, double* %10
%12 = getelementptr inbounds double, double* %3, i64 12
%13 = load double, double* %12
%14 = fsub double %11, %13
%15 = getelementptr inbounds double, double* %2, i64 1
%16 = load double, double* %15
%17 = fmul double %16, %16
%18 = tail call double @llvm.fmuladd.f64(double %9, double %9, double %17)
%19 = tail call double @llvm.fmuladd.f64(double %14, double %14, double %18)
%20 = tail call double @sqrt(double %19)
%21 = getelementptr inbounds double, double* %3, i64 16
%22 = load double, double* %21
%23 = fcmp oeq double %22, 1.000000e+00
br i1 %23, label %24, label %33
24: ; preds = %5
%25 = load double, double* %3
%26 = fneg double %25
%27 = getelementptr inbounds double, double* %3, i64 4
%28 = load double, double* %27
%29 = fsub double %20, %28
%30 = fmul double %29, %26
%31 = fcmp olt double %30, 0.000000e+00
br i1 %31, label %32, label %43
32: ; preds = %24
br label %43
33: ; preds = %5
%34 = getelementptr inbounds double, double* %3, i64 1
%35 = load double, double* %34
%36 = fneg double %35
%37 = getelementptr inbounds double, double* %3, i64 5
%38 = load double, double* %37
%39 = fsub double %20, %38
%40 = fmul double %39, %36
%41 = fcmp olt double %40, 0.000000e+00
br i1 %41, label %42, label %43
42: ; preds = %33
br label %43
43: ; preds = %33, %42, %24, %32
%44 = phi double [ 0.000000e+00, %32 ], [ %30, %24 ], [ 0.000000e+00, %42 ], [ %40, %33 ]
%45 = fdiv double %9, %20
%46 = fmul double %45, %44
%47 = load double, double* %15
%48 = fdiv double %47, %20
%49 = fmul double %44, %48
%50 = fdiv double %14, %20
%51 = fmul double %50, %44
%52 = getelementptr inbounds double, double* %2, i64 3
%53 = load double, double* %52
store double %53, double* %4
%54 = getelementptr inbounds double, double* %2, i64 4
%55 = load double, double* %54
%56 = getelementptr inbounds double, double* %4, i64 1
store double %55, double* %56
%57 = getelementptr inbounds double, double* %2, i64 5
%58 = load double, double* %57
%59 = getelementptr inbounds double, double* %4, i64 2
store double %58, double* %59
%60 = getelementptr inbounds double, double* %3, i64 8
%61 = load double, double* %60
%62 = fdiv double %46, %61
%63 = getelementptr inbounds double, double* %4, i64 3
store double %62, double* %63
%64 = load double, double* %60
%65 = fdiv double %49, %64
%66 = getelementptr inbounds double, double* %3, i64 9
%67 = load double, double* %66
%68 = fadd double %65, %67
%69 = getelementptr inbounds double, double* %4, i64 4
store double %68, double* %69
%70 = load double, double* %60
%71 = fdiv double %51, %70
%72 = getelementptr inbounds double, double* %4, i64 5
store double %71, double* %72
ret void
}