#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 */
int /*<<< orphan*/ _to_cart(long double *, long double *);
int /*<<< orphan*/ _to_sphere(long double *, long double *);
long double angle_betw_0pi(long double *, long double *);
long double cosl(long double);
int sinl(long double);
int coord(long double vel, long double *pa, long double *pb, long double *p,
          long double t) {
  long double A[3], B[3], P[3];
  _to_cart(pa, A);
  _to_cart(pb, B);
  long double AB = angle_betw_0pi(A, B);
  long double AP = (vel * t) / 6371000.;
  long double cos_ap = cosl(AP);
  long double sin_rap = sinl(AP) / (sinl(AB) * 6371000. * 6371000.);
  P[0] = A[0] * cos_ap + (+A[1] * A[1] * B[0] + A[2] * A[2] * B[0] -
                          A[0] * A[1] * B[1] - A[0] * A[2] * B[2]) *
                             sin_rap;
  P[1] = A[1] * cos_ap + (-A[0] * A[1] * B[0] + A[0] * A[0] * B[1] +
                          A[2] * A[2] * B[1] - A[1] * A[2] * B[2]) *
                             sin_rap;
  P[2] = A[2] * cos_ap + (-A[0] * A[2] * B[0] - A[1] * A[2] * B[1] +
                          A[0] * A[0] * B[2] + A[1] * A[1] * B[2]) *
                             sin_rap;
  _to_sphere(P, p);
  return 1;
}


x86 assembly (clang, -O0):
<coord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
fstpt  -0x40(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    %rsi,-0x140(%rbp)
call   1070 <_to_cart@plt>
mov    -0x20(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
mov    %rsi,-0x138(%rbp)
call   1070 <_to_cart@plt>
mov    -0x140(%rbp),%rdi
mov    -0x138(%rbp),%rsi
call   1040 <angle_betw_0pi@plt>
fstpt  -0xe0(%rbp)
fldt   -0x10(%rbp)
fldt   -0x40(%rbp)
fmulp  %st,%st(1)
flds   0xe3b(%rip)
fdivrp %st,%st(1)
fstpt  -0xf0(%rbp)
fldt   -0xf0(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1050 <cosl@plt>
fstpt  -0x100(%rbp)
fldt   -0xf0(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <sinl@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
fldt   -0xe0(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <sinl@plt>
movsd  -0x130(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
movsd  0xde5(%rip),%xmm2
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
fldl   -0x118(%rbp)
fstpt  -0x110(%rbp)
fldt   -0x70(%rbp)
fldt   -0x100(%rbp)
fldt   -0x60(%rbp)
fld    %st(0)
fmul   %st(1),%st
fldt   -0xa0(%rbp)
fldt   -0x50(%rbp)
fld    %st(0)
fmul   %st(1),%st
fmul   %st(2),%st
fxch   %st(3)
fmulp  %st,%st(2)
fxch   %st(1)
faddp  %st,%st(2)
fxch   %st(2)
fmul   %st(4),%st
fldt   -0x90(%rbp)
fmulp  %st,%st(1)
fsubrp %st,%st(1)
fxch   %st(1)
fmul   %st(3),%st
fldt   -0x80(%rbp)
fmulp  %st,%st(1)
fsubrp %st,%st(1)
fldt   -0x110(%rbp)
fmulp  %st,%st(1)
fxch   %st(2)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fstpt  -0xd0(%rbp)
fldt   -0x60(%rbp)
fldt   -0x100(%rbp)
fldt   -0x70(%rbp)
fld    %st(0)
fmul   %st(3),%st
fldt   -0xa0(%rbp)
fxch   %st(2)
fmul   %st,%st(0)
fldt   -0x90(%rbp)
fmul   %st,%st(1)
fxch   %st(2)
fmulp  %st,%st(3)
fsubp  %st,%st(2)
fldt   -0x50(%rbp)
fld    %st(0)
fmul   %st(1),%st
fmulp  %st,%st(2)
fxch   %st(1)
faddp  %st,%st(2)
fmul   %st(3),%st
fldt   -0x80(%rbp)
fmulp  %st,%st(1)
fsubrp %st,%st(1)
fldt   -0x110(%rbp)
fmulp  %st,%st(1)
fxch   %st(2)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fstpt  -0xc0(%rbp)
fldt   -0x50(%rbp)
fld    %st(0)
fstpt  -0x124(%rbp)
fldt   -0x100(%rbp)
fldt   -0x70(%rbp)
fld    %st(0)
fchs
fmul   %st(3),%st
fldt   -0xa0(%rbp)
fldt   -0x60(%rbp)
fmul   %st,%st(5)
fldt   -0x90(%rbp)
fmulp  %st,%st(6)
fldt   -0x124(%rbp)
fxch   %st(3)
fmulp  %st,%st(2)
fxch   %st(1)
fsubp  %st,%st(5)
fxch   %st(2)
fmul   %st,%st(0)
fldt   -0x80(%rbp)
fmul   %st,%st(1)
fxch   %st(1)
faddp  %st,%st(5)
fxch   %st(2)
fmul   %st,%st(0)
fmulp  %st,%st(2)
fxch   %st(1)
faddp  %st,%st(3)
fldt   -0x110(%rbp)
fmulp  %st,%st(3)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fstpt  -0xb0(%rbp)
lea    -0xd0(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1060 <_to_sphere@plt>
mov    $0x1,%eax
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coord>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x128,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
fldt   0x160(%rsp)
fldt   0x150(%rsp)
fmulp  %st,%st(1)
fstpt  0x18(%rsp)
lea    0xf0(%rsp),%r15
mov    %r15,%rsi
call   1070 <_to_cart@plt>
lea    0xc0(%rsp),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
call   1070 <_to_cart@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <angle_betw_0pi@plt>
fstpt  0x24(%rsp)
fldt   0x18(%rsp)
fdivs  0xe4c(%rip)
fld    %st(0)
fstpt  0x18(%rsp)
fstpt  (%rsp)
call   1050 <cosl@plt>
fstpt  0x84(%rsp)
fldt   0x18(%rsp)
fstpt  (%rsp)
call   1030 <sinl@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x18(%rsp)
fldt   0x24(%rsp)
fstpt  (%rsp)
call   1030 <sinl@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xe0e(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x18(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x48(%rsp)
fldt   0x100(%rsp)
fld    %st(0)
fmul   %st(1),%st
fld    %st(0)
fstpt  0x78(%rsp)
fldt   0xc0(%rsp)
fld    %st(0)
fstpt  0x18(%rsp)
fldt   0x110(%rsp)
fld    %st(0)
fmul   %st(1),%st
fld    %st(0)
fstpt  0x6c(%rsp)
fld    %st(1)
fstpt  0x24(%rsp)
fmul   %st(2),%st
fxch   %st(3)
fmulp  %st,%st(2)
fxch   %st(1)
faddp  %st,%st(2)
fxch   %st(1)
fstpt  0x30(%rsp)
fldt   0xf0(%rsp)
fldt   0xd0(%rsp)
fld    %st(0)
fstpt  0x3c(%rsp)
fld    %st(1)
fchs
fld    %st(4)
fmul   %st(1),%st
fld    %st(0)
fstpt  0x54(%rsp)
fmulp  %st,%st(2)
fldt   0x30(%rsp)
faddp  %st,%st(2)
fmulp  %st,%st(3)
fld    %st(2)
fstpt  0x30(%rsp)
fldt   0xe0(%rsp)
fmul   %st,%st(3)
fxch   %st(3)
faddp  %st,%st(1)
fldl   0x48(%rsp)
fmul   %st,%st(1)
fldt   0x84(%rsp)
fld    %st(3)
fmul   %st(1),%st
faddp  %st,%st(3)
fxch   %st(2)
fstpt  0x90(%rsp)
fxch   %st(2)
fmul   %st,%st(0)
fld    %st(0)
fstpt  0x60(%rsp)
fldt   0x18(%rsp)
fldt   0x54(%rsp)
fmulp  %st,%st(1)
fldt   0x3c(%rsp)
fmul   %st,%st(2)
fxch   %st(1)
faddp  %st,%st(2)
fldt   0x6c(%rsp)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fld    %st(4)
fchs
fldt   0x24(%rsp)
fmulp  %st,%st(1)
fld    %st(0)
fmul   %st(5),%st
faddp  %st,%st(2)
fxch   %st(1)
fmul   %st(3),%st
fxch   %st(5)
fmul   %st(2),%st
faddp  %st,%st(5)
fxch   %st(4)
fstpt  0xa0(%rsp)
fldt   0x3c(%rsp)
fmulp  %st,%st(4)
fldt   0x18(%rsp)
fldt   0x30(%rsp)
fmulp  %st,%st(1)
faddp  %st,%st(4)
fldt   0x60(%rsp)
fmul   %st(3),%st
faddp  %st,%st(4)
fldt   0x78(%rsp)
fmulp  %st,%st(3)
fxch   %st(2)
faddp  %st,%st(3)
fmulp  %st,%st(2)
fldt   0x24(%rsp)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fstpt  0xb0(%rsp)
lea    0x90(%rsp),%rdi
mov    %r14,%rsi
call   1060 <_to_sphere@plt>
mov    $0x1,%eax
add    $0x128,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @coord(x86_fp80 %0, x86_fp80* %1, x86_fp80* %2, x86_fp80* %3, x86_fp80 %4) {
%6 = alloca x86_fp80
%7 = alloca x86_fp80*
%8 = alloca x86_fp80*
%9 = alloca x86_fp80*
%10 = alloca x86_fp80
%11 = alloca [3 x x86_fp80]
%12 = alloca [3 x x86_fp80]
%13 = alloca [3 x x86_fp80]
%14 = alloca x86_fp80
%15 = alloca x86_fp80
%16 = alloca x86_fp80
%17 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %6
store x86_fp80* %1, x86_fp80** %7
store x86_fp80* %2, x86_fp80** %8
store x86_fp80* %3, x86_fp80** %9
store x86_fp80 %4, x86_fp80* %10
%18 = load x86_fp80*, x86_fp80** %7
%19 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 0
%20 = call i32 @_to_cart(x86_fp80* %18, x86_fp80* %19)
%21 = load x86_fp80*, x86_fp80** %8
%22 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %12, i64 0, i64 0
%23 = call i32 @_to_cart(x86_fp80* %21, x86_fp80* %22)
%24 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 0
%25 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %12, i64 0, i64 0
%26 = call x86_fp80 @angle_betw_0pi(x86_fp80* %24, x86_fp80* %25)
store x86_fp80 %26, x86_fp80* %14
%27 = load x86_fp80, x86_fp80* %6
%28 = load x86_fp80, x86_fp80* %10
%29 = fmul x86_fp80 %27, %28
%30 = fdiv x86_fp80 %29, 0xK4015C26D700000000000
store x86_fp80 %30, x86_fp80* %15
%31 = load x86_fp80, x86_fp80* %15
%32 = call x86_fp80 @cosl(x86_fp80 %31)
store x86_fp80 %32, x86_fp80* %16
%33 = load x86_fp80, x86_fp80* %15
%34 = call i32 @sinl(x86_fp80 %33)
%35 = sitofp i32 %34 to double
%36 = load x86_fp80, x86_fp80* %14
%37 = call i32 @sinl(x86_fp80 %36)
%38 = sitofp i32 %37 to double
%39 = fmul double %38, 6.371000e+06
%40 = fmul double %39, 6.371000e+06
%41 = fdiv double %35, %40
%42 = fpext double %41 to x86_fp80
store x86_fp80 %42, x86_fp80* %17
%43 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 0
%44 = load x86_fp80, x86_fp80* %43
%45 = load x86_fp80, x86_fp80* %16
%46 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 1
%47 = load x86_fp80, x86_fp80* %46
%48 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 1
%49 = load x86_fp80, x86_fp80* %48
%50 = fmul x86_fp80 %47, %49
%51 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %12, i64 0, i64 0
%52 = load x86_fp80, x86_fp80* %51
%53 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 2
%54 = load x86_fp80, x86_fp80* %53
%55 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 2
%56 = load x86_fp80, x86_fp80* %55
%57 = fmul x86_fp80 %54, %56
%58 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %12, i64 0, i64 0
%59 = load x86_fp80, x86_fp80* %58
%60 = fmul x86_fp80 %57, %59
%61 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %50, x86_fp80 %52, x86_fp80 %60)
%62 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 0
%63 = load x86_fp80, x86_fp80* %62
%64 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 1
%65 = load x86_fp80, x86_fp80* %64
%66 = fmul x86_fp80 %63, %65
%67 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %12, i64 0, i64 1
%68 = load x86_fp80, x86_fp80* %67
%69 = fneg x86_fp80 %66
%70 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %69, x86_fp80 %68, x86_fp80 %61)
%71 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 0
%72 = load x86_fp80, x86_fp80* %71
%73 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 2
%74 = load x86_fp80, x86_fp80* %73
%75 = fmul x86_fp80 %72, %74
%76 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %12, i64 0, i64 2
%77 = load x86_fp80, x86_fp80* %76
%78 = fneg x86_fp80 %75
%79 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %78, x86_fp80 %77, x86_fp80 %70)
%80 = load x86_fp80, x86_fp80* %17
%81 = fmul x86_fp80 %79, %80
%82 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %44, x86_fp80 %45, x86_fp80 %81)
%83 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %13, i64 0, i64 0
store x86_fp80 %82, x86_fp80* %83
%84 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 1
%85 = load x86_fp80, x86_fp80* %84
%86 = load x86_fp80, x86_fp80* %16
%87 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 0
%88 = load x86_fp80, x86_fp80* %87
%89 = fneg x86_fp80 %88
%90 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 1
%91 = load x86_fp80, x86_fp80* %90
%92 = fmul x86_fp80 %89, %91
%93 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %12, i64 0, i64 0
%94 = load x86_fp80, x86_fp80* %93
%95 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 0
%96 = load x86_fp80, x86_fp80* %95
%97 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 0
%98 = load x86_fp80, x86_fp80* %97
%99 = fmul x86_fp80 %96, %98
%100 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %12, i64 0, i64 1
%101 = load x86_fp80, x86_fp80* %100
%102 = fmul x86_fp80 %99, %101
%103 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %92, x86_fp80 %94, x86_fp80 %102)
%104 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 2
%105 = load x86_fp80, x86_fp80* %104
%106 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 2
%107 = load x86_fp80, x86_fp80* %106
%108 = fmul x86_fp80 %105, %107
%109 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %12, i64 0, i64 1
%110 = load x86_fp80, x86_fp80* %109
%111 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %108, x86_fp80 %110, x86_fp80 %103)
%112 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 1
%113 = load x86_fp80, x86_fp80* %112
%114 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 2
%115 = load x86_fp80, x86_fp80* %114
%116 = fmul x86_fp80 %113, %115
%117 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %12, i64 0, i64 2
%118 = load x86_fp80, x86_fp80* %117
%119 = fneg x86_fp80 %116
%120 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %119, x86_fp80 %118, x86_fp80 %111)
%121 = load x86_fp80, x86_fp80* %17
%122 = fmul x86_fp80 %120, %121
%123 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %85, x86_fp80 %86, x86_fp80 %122)
%124 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %13, i64 0, i64 1
store x86_fp80 %123, x86_fp80* %124
%125 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 2
%126 = load x86_fp80, x86_fp80* %125
%127 = load x86_fp80, x86_fp80* %16
%128 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 0
%129 = load x86_fp80, x86_fp80* %128
%130 = fneg x86_fp80 %129
%131 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 2
%132 = load x86_fp80, x86_fp80* %131
%133 = fmul x86_fp80 %130, %132
%134 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %12, i64 0, i64 0
%135 = load x86_fp80, x86_fp80* %134
%136 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 1
%137 = load x86_fp80, x86_fp80* %136
%138 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 2
%139 = load x86_fp80, x86_fp80* %138
%140 = fmul x86_fp80 %137, %139
%141 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %12, i64 0, i64 1
%142 = load x86_fp80, x86_fp80* %141
%143 = fmul x86_fp80 %140, %142
%144 = fneg x86_fp80 %143
%145 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %133, x86_fp80 %135, x86_fp80 %144)
%146 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 0
%147 = load x86_fp80, x86_fp80* %146
%148 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 0
%149 = load x86_fp80, x86_fp80* %148
%150 = fmul x86_fp80 %147, %149
%151 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %12, i64 0, i64 2
%152 = load x86_fp80, x86_fp80* %151
%153 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %150, x86_fp80 %152, x86_fp80 %145)
%154 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 1
%155 = load x86_fp80, x86_fp80* %154
%156 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %11, i64 0, i64 1
%157 = load x86_fp80, x86_fp80* %156
%158 = fmul x86_fp80 %155, %157
%159 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %12, i64 0, i64 2
%160 = load x86_fp80, x86_fp80* %159
%161 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %158, x86_fp80 %160, x86_fp80 %153)
%162 = load x86_fp80, x86_fp80* %17
%163 = fmul x86_fp80 %161, %162
%164 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %126, x86_fp80 %127, x86_fp80 %163)
%165 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %13, i64 0, i64 2
store x86_fp80 %164, x86_fp80* %165
%166 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %13, i64 0, i64 0
%167 = load x86_fp80*, x86_fp80** %9
%168 = call i32 @_to_sphere(x86_fp80* %166, x86_fp80* %167)
ret i32 1
}

LLVM IR (-O2):
define i32 @coord(x86_fp80 %0, x86_fp80* %1, x86_fp80* %2, x86_fp80* %3, x86_fp80 %4) {
%6 = alloca [3 x x86_fp80]
%7 = alloca [3 x x86_fp80]
%8 = alloca [3 x x86_fp80]
%9 = bitcast [3 x x86_fp80]* %6 to i8*
%10 = bitcast [3 x x86_fp80]* %7 to i8*
%11 = bitcast [3 x x86_fp80]* %8 to i8*
%12 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %6, i64 0, i64 0
%13 = call i32 @_to_cart(x86_fp80* %1, x86_fp80* %12)
%14 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %7, i64 0, i64 0
%15 = call i32 @_to_cart(x86_fp80* %2, x86_fp80* %14)
%16 = call x86_fp80 @angle_betw_0pi(x86_fp80* %12, x86_fp80* %14)
%17 = fmul x86_fp80 %0, %4
%18 = fdiv x86_fp80 %17, 0xK4015C26D700000000000
%19 = call x86_fp80 @cosl(x86_fp80 %18)
%20 = call i32 @sinl(x86_fp80 %18)
%21 = sitofp i32 %20 to double
%22 = call i32 @sinl(x86_fp80 %16)
%23 = sitofp i32 %22 to double
%24 = fmul double %23, 6.371000e+06
%25 = fmul double %24, 6.371000e+06
%26 = fdiv double %21, %25
%27 = fpext double %26 to x86_fp80
%28 = load x86_fp80, x86_fp80* %12
%29 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %6, i64 0, i64 1
%30 = load x86_fp80, x86_fp80* %29
%31 = fmul x86_fp80 %30, %30
%32 = load x86_fp80, x86_fp80* %14
%33 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %6, i64 0, i64 2
%34 = load x86_fp80, x86_fp80* %33
%35 = fmul x86_fp80 %34, %34
%36 = fmul x86_fp80 %32, %35
%37 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %31, x86_fp80 %32, x86_fp80 %36)
%38 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %7, i64 0, i64 1
%39 = load x86_fp80, x86_fp80* %38
%40 = fneg x86_fp80 %28
%41 = fmul x86_fp80 %30, %40
%42 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %41, x86_fp80 %39, x86_fp80 %37)
%43 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %7, i64 0, i64 2
%44 = load x86_fp80, x86_fp80* %43
%45 = fmul x86_fp80 %34, %40
%46 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %45, x86_fp80 %44, x86_fp80 %42)
%47 = fmul x86_fp80 %46, %27
%48 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %28, x86_fp80 %19, x86_fp80 %47)
%49 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %8, i64 0, i64 0
store x86_fp80 %48, x86_fp80* %49
%50 = fmul x86_fp80 %28, %28
%51 = fmul x86_fp80 %50, %39
%52 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %41, x86_fp80 %32, x86_fp80 %51)
%53 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %35, x86_fp80 %39, x86_fp80 %52)
%54 = fneg x86_fp80 %30
%55 = fmul x86_fp80 %34, %54
%56 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %55, x86_fp80 %44, x86_fp80 %53)
%57 = fmul x86_fp80 %56, %27
%58 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %30, x86_fp80 %19, x86_fp80 %57)
%59 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %8, i64 0, i64 1
store x86_fp80 %58, x86_fp80* %59
%60 = fmul x86_fp80 %55, %39
%61 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %45, x86_fp80 %32, x86_fp80 %60)
%62 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %50, x86_fp80 %44, x86_fp80 %61)
%63 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %31, x86_fp80 %44, x86_fp80 %62)
%64 = fmul x86_fp80 %63, %27
%65 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %34, x86_fp80 %19, x86_fp80 %64)
%66 = getelementptr inbounds [3 x x86_fp80], [3 x x86_fp80]* %8, i64 0, i64 2
store x86_fp80 %65, x86_fp80* %66
%67 = call i32 @_to_sphere(x86_fp80* %49, x86_fp80* %3)
ret i32 1
}