#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*/ arb_rotation(double *, double, double **);
double cos(double);
int /*<<< orphan*/ cross(double *, double *, double *);
double ddiff(double, int);
double deg2rad(double);
double **dmatrix(int, int, int, int);
int /*<<< orphan*/ free_dmatrix(double **, int, int, int, int);
double magang(double *, double *);
int /*<<< orphan*/ multi_matrix(double **, int, int, double **, int, int,
                                double **);
double sin(double);
double vec_ang(double *, double *, double *);
int /*<<< orphan*/ vec_norm(double *);
void bpstep_par(double **rot1, double *org1, double **rot2, double *org2,
                double *pars, double **mst_orien, double *mst_org) {
  double phi, rolltilt;
  double hinge[4], mstx[4], msty[4], mstz[4], t1[4], t2[4];
  double **para_bp1, **para_bp2, **temp;
  long i, j;
  for (i = 1; i <= 3; i++) {
    t1[i] = rot1[i][3];
    t2[i] = rot2[i][3];
  }
  cross(t1, t2, hinge);
  rolltilt = magang(t1, t2);
  para_bp1 = dmatrix(1, 3, 1, 3);
  para_bp2 = dmatrix(1, 3, 1, 3);
  temp = dmatrix(1, 3, 1, 3);
  arb_rotation(hinge, -0.5 * rolltilt, temp);
  multi_matrix(temp, 3, 3, rot2, 3, 3, para_bp2);
  arb_rotation(hinge, 0.5 * rolltilt, temp);
  multi_matrix(temp, 3, 3, rot1, 3, 3, para_bp1);
  for (i = 1; i <= 3; i++) {
    mstz[i] = para_bp2[i][3];
    t1[i] = para_bp1[i][2];
    t2[i] = para_bp2[i][2];
  }
  pars[6] = vec_ang(t1, t2, mstz);
  if (ddiff(pars[6], 180) < 1.0e-7)
    for (i = 1; i <= 3; i++)
      msty[i] = para_bp2[i][1];
  else if (ddiff(pars[6], -180) < 1.0e-7)
    for (i = 1; i <= 3; i++)
      msty[i] = -para_bp2[i][1];
  else {
    for (i = 1; i <= 3; i++)
      msty[i] = t1[i] + t2[i];
    vec_norm(msty);
  }
  cross(msty, mstz, mstx);
  for (i = 1; i <= 3; i++) {
    mst_org[i] = 0.5 * (org1[i] + org2[i]);
    t1[i] = org2[i] - org1[i];
    mst_orien[i][1] = mstx[i];
    mst_orien[i][2] = msty[i];
    mst_orien[i][3] = mstz[i];
  }
  for (i = 1; i <= 3; i++) {
    pars[i] = 0.0;
    for (j = 1; j <= 3; j++)
      pars[i] += t1[j] * mst_orien[j][i];
  }
  phi = deg2rad(vec_ang(hinge, msty, mstz));
  pars[5] = rolltilt * cos(phi);
  pars[4] = rolltilt * sin(phi);
  free_dmatrix(para_bp1, 1, 3, 1, 3);
  free_dmatrix(para_bp2, 1, 3, 1, 3);
  free_dmatrix(temp, 1, 3, 1, 3);
}


x86 assembly (clang, -O0):
<bpstep_par>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movq   $0x1,-0x120(%rbp)
cmpq   $0x3,-0x120(%rbp)
03
jg     125f <bpstep_par+0x9f>
mov    -0x8(%rbp),%rax
mov    -0x120(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  0x18(%rax),%xmm0
mov    -0x120(%rbp),%rax
movsd  %xmm0,-0xe0(%rbp,%rax,8)
ff ff
mov    -0x18(%rbp),%rax
mov    -0x120(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  0x18(%rax),%xmm0
mov    -0x120(%rbp),%rax
movsd  %xmm0,-0x100(%rbp,%rax,8)
ff ff
mov    -0x120(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x120(%rbp)
jmp    11f2 <bpstep_par+0x32>
lea    -0xe0(%rbp),%rdi
lea    -0x100(%rbp),%rsi
lea    -0x60(%rbp),%rdx
call   10d0 <cross@plt>
lea    -0xe0(%rbp),%rdi
lea    -0x100(%rbp),%rsi
call   1070 <magang@plt>
movsd  %xmm0,-0x40(%rbp)
mov    $0x1,%edx
mov    $0x3,%ecx
mov    %edx,%edi
mov    %ecx,%esi
call   1090 <dmatrix@plt>
mov    %rax,-0x108(%rbp)
mov    $0x1,%edx
mov    $0x3,%ecx
mov    %edx,%edi
mov    %ecx,%esi
call   1090 <dmatrix@plt>
mov    %rax,-0x110(%rbp)
mov    $0x1,%edx
mov    $0x3,%ecx
mov    %edx,%edi
mov    %ecx,%esi
call   1090 <dmatrix@plt>
mov    %rax,-0x118(%rbp)
lea    -0x60(%rbp),%rdi
movsd  0xd20(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mov    -0x118(%rbp),%rsi
call   1030 <arb_rotation@plt>
mov    -0x118(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    -0x110(%rbp),%rax
mov    $0x3,%r9d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%r8d
mov    %rax,(%rsp)
call   1040 <multi_matrix@plt>
lea    -0x60(%rbp),%rdi
movsd  0xcd1(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mov    -0x118(%rbp),%rsi
call   1030 <arb_rotation@plt>
mov    -0x118(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    -0x108(%rbp),%rax
mov    $0x3,%r9d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%r8d
mov    %rax,(%rsp)
call   1040 <multi_matrix@plt>
movq   $0x1,-0x120(%rbp)
cmpq   $0x3,-0x120(%rbp)
03
jg     140f <bpstep_par+0x24f>
mov    -0x110(%rbp),%rax
mov    -0x120(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  0x18(%rax),%xmm0
mov    -0x120(%rbp),%rax
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
mov    -0x108(%rbp),%rax
mov    -0x120(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  0x10(%rax),%xmm0
mov    -0x120(%rbp),%rax
movsd  %xmm0,-0xe0(%rbp,%rax,8)
ff ff
mov    -0x110(%rbp),%rax
mov    -0x120(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  0x10(%rax),%xmm0
mov    -0x120(%rbp),%rax
movsd  %xmm0,-0x100(%rbp,%rax,8)
ff ff
mov    -0x120(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x120(%rbp)
jmp    1375 <bpstep_par+0x1b5>
lea    -0xe0(%rbp),%rdi
lea    -0x100(%rbp),%rsi
lea    -0xc0(%rbp),%rdx
call   1050 <vec_ang@plt>
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x30(%rax)
mov    -0x28(%rbp),%rax
movsd  0x30(%rax),%xmm0
mov    $0xb4,%edi
call   10e0 <ddiff@plt>
movaps %xmm0,%xmm1
movsd  0xbc0(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    14b6 <bpstep_par+0x2f6>
movq   $0x1,-0x120(%rbp)
cmpq   $0x3,-0x120(%rbp)
03
jg     14b1 <bpstep_par+0x2f1>
mov    -0x110(%rbp),%rax
mov    -0x120(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  0x8(%rax),%xmm0
mov    -0x120(%rbp),%rax
movsd  %xmm0,-0xa0(%rbp,%rax,8)
ff ff
mov    -0x120(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x120(%rbp)
jmp    1465 <bpstep_par+0x2a5>
jmp    15c2 <bpstep_par+0x402>
mov    -0x28(%rbp),%rax
movsd  0x30(%rax),%xmm0
mov    $0xffffff4c,%edi
call   10e0 <ddiff@plt>
movaps %xmm0,%xmm1
movsd  0xb3c(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1551 <bpstep_par+0x391>
movq   $0x1,-0x120(%rbp)
cmpq   $0x3,-0x120(%rbp)
03
jg     154c <bpstep_par+0x38c>
mov    -0x110(%rbp),%rax
mov    -0x120(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x120(%rbp),%rax
movsd  %xmm0,-0xa0(%rbp,%rax,8)
ff ff
mov    -0x120(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x120(%rbp)
jmp    14e9 <bpstep_par+0x329>
jmp    15bd <bpstep_par+0x3fd>
movq   $0x1,-0x120(%rbp)
cmpq   $0x3,-0x120(%rbp)
03
jg     15b1 <bpstep_par+0x3f1>
mov    -0x120(%rbp),%rax
movsd  -0xe0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x120(%rbp),%rax
addsd  -0x100(%rbp,%rax,8),%xmm0
ff ff
mov    -0x120(%rbp),%rax
movsd  %xmm0,-0xa0(%rbp,%rax,8)
ff ff
mov    -0x120(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x120(%rbp)
jmp    155c <bpstep_par+0x39c>
lea    -0xa0(%rbp),%rdi
call   1060 <vec_norm@plt>
jmp    15c2 <bpstep_par+0x402>
lea    -0xa0(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
lea    -0x80(%rbp),%rdx
call   10d0 <cross@plt>
movq   $0x1,-0x120(%rbp)
cmpq   $0x3,-0x120(%rbp)
03
jg     16de <bpstep_par+0x51e>
mov    -0x10(%rbp),%rax
mov    -0x120(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
mov    -0x120(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm1
movsd  0x9e6(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
mov    -0x120(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
mov    -0x120(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x120(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x120(%rbp),%rax
movsd  %xmm0,-0xe0(%rbp,%rax,8)
ff ff
mov    -0x120(%rbp),%rax
movsd  -0x80(%rbp,%rax,8),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x120(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x120(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x30(%rbp),%rax
mov    -0x120(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x120(%rbp),%rax
movsd  -0xc0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x30(%rbp),%rax
mov    -0x120(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x120(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x120(%rbp)
jmp    15e4 <bpstep_par+0x424>
movq   $0x1,-0x120(%rbp)
cmpq   $0x3,-0x120(%rbp)
03
jg     179e <bpstep_par+0x5de>
mov    -0x28(%rbp),%rax
mov    -0x120(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movq   $0x1,-0x128(%rbp)
cmpq   $0x3,-0x128(%rbp)
03
jg     1782 <bpstep_par+0x5c2>
mov    -0x128(%rbp),%rax
movsd  -0xe0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x30(%rbp),%rax
mov    -0x128(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x120(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x28(%rbp),%rax
mov    -0x120(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x128(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x128(%rbp)
jmp    1715 <bpstep_par+0x555>
jmp    1787 <bpstep_par+0x5c7>
mov    -0x120(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x120(%rbp)
jmp    16e9 <bpstep_par+0x529>
lea    -0x60(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
lea    -0xc0(%rbp),%rdx
call   1050 <vec_ang@plt>
call   1080 <deg2rad@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   10b0 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x138(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   10a0 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x130(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x108(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x3,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   10c0 <free_dmatrix@plt>
mov    -0x110(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x3,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   10c0 <free_dmatrix@plt>
mov    -0x118(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x3,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   10c0 <free_dmatrix@plt>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpstep_par>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
mov    %r9,0x38(%rsp)
mov    %r8,%r15
mov    %rcx,0xa0(%rsp)
mov    %rdx,%r13
mov    %rsi,0xa8(%rsp)
mov    %rdi,%r14
mov    0x8(%rdi),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    0x8(%rdx),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,0x68(%rsp)
mov    0x10(%rdi),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,0x20(%rsp)
mov    0x10(%rdx),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,0x70(%rsp)
mov    0x18(%rdi),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,0x28(%rsp)
mov    0x18(%rdx),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,0x78(%rsp)
lea    0x10(%rsp),%rbp
lea    0x60(%rsp),%rbx
lea    0xd0(%rsp),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
call   10d0 <cross@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1070 <magang@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%edi
mov    $0x3,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
call   1090 <dmatrix@plt>
mov    %rax,%rbx
mov    $0x1,%edi
mov    $0x3,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
call   1090 <dmatrix@plt>
mov    %rax,%rbp
mov    $0x1,%edi
mov    $0x3,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
call   1090 <dmatrix@plt>
mov    %rax,%r12
movsd  0xd2d(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
lea    0xd0(%rsp),%rdi
mov    %rax,%rsi
call   1030 <arb_rotation@plt>
mov    %rbp,(%rsp)
mov    %r12,%rdi
mov    $0x3,%esi
mov    $0x3,%edx
mov    %r13,%rcx
mov    $0x3,%r8d
mov    $0x3,%r9d
call   1040 <multi_matrix@plt>
movsd  0xcf2(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
lea    0xd0(%rsp),%rdi
mov    %r12,%rsi
call   1030 <arb_rotation@plt>
mov    %rbx,(%rsp)
mov    %r12,%rdi
mov    $0x3,%esi
mov    $0x3,%edx
mov    %r14,%rcx
mov    %rbx,%r14
mov    %rbp,%rbx
mov    $0x3,%r8d
mov    $0x3,%r9d
call   1040 <multi_matrix@plt>
mov    0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,0x88(%rsp)
mov    0x8(%r14),%rcx
movsd  0x10(%rcx),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x10(%rax),%xmm0
movsd  %xmm0,0x68(%rsp)
mov    0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,0x90(%rsp)
mov    0x10(%r14),%rcx
movsd  0x10(%rcx),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x10(%rax),%xmm0
movsd  %xmm0,0x70(%rsp)
mov    0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,0x98(%rsp)
mov    0x18(%r14),%rcx
movsd  0x10(%rcx),%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  0x10(%rax),%xmm0
movsd  %xmm0,0x78(%rsp)
lea    0x80(%rsp),%rdx
lea    0x10(%rsp),%rdi
lea    0x60(%rsp),%rsi
call   1050 <vec_ang@plt>
movsd  %xmm0,0x30(%r15)
mov    $0xb4,%edi
call   10e0 <ddiff@plt>
movsd  0xc06(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1442 <bpstep_par+0x282>
mov    0x8(%rbx),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,0x48(%rsp)
mov    0x10(%rbx),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,0x50(%rsp)
mov    0x18(%rbx),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,0x58(%rsp)
jmp    14d5 <bpstep_par+0x315>
movsd  0x30(%r15),%xmm0
mov    $0xffffff4c,%edi
call   10e0 <ddiff@plt>
movsd  0xbb6(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    14a3 <bpstep_par+0x2e3>
mov    0x8(%rbx),%rax
movsd  0x8(%rax),%xmm0
movapd 0xbaf(%rip),%xmm1
xorpd  %xmm1,%xmm0
movlpd %xmm0,0x48(%rsp)
mov    0x10(%rbx),%rax
movsd  0x8(%rax),%xmm0
xorpd  %xmm1,%xmm0
movlpd %xmm0,0x50(%rsp)
mov    0x18(%rbx),%rax
movsd  0x8(%rax),%xmm0
xorpd  %xmm1,%xmm0
movlpd %xmm0,0x58(%rsp)
jmp    14d5 <bpstep_par+0x315>
movupd 0x18(%rsp),%xmm0
movupd 0x68(%rsp),%xmm1
addpd  %xmm0,%xmm1
movupd %xmm1,0x48(%rsp)
movsd  0x28(%rsp),%xmm0
addsd  0x78(%rsp),%xmm0
movsd  %xmm0,0x58(%rsp)
lea    0x40(%rsp),%rdi
call   1060 <vec_norm@plt>
lea    0x40(%rsp),%r13
lea    0x80(%rsp),%rsi
lea    0xb0(%rsp),%rdx
mov    %r13,%rdi
call   10d0 <cross@plt>
mov    0xa8(%rsp),%rsi
movsd  0x8(%rsi),%xmm1
mov    0xa0(%rsp),%rdi
addsd  0x8(%rdi),%xmm1
movsd  0xaf4(%rip),%xmm0
mulsd  %xmm0,%xmm1
mov    0x130(%rsp),%rbp
movsd  %xmm1,0x8(%rbp)
movsd  0x8(%rdi),%xmm1
subsd  0x8(%rsi),%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0xb8(%rsp),%xmm1
mov    0x38(%rsp),%rdx
mov    0x8(%rdx),%rax
movsd  %xmm1,0x8(%rax)
movsd  0x48(%rsp),%xmm1
movsd  %xmm1,0x10(%rax)
movsd  0x88(%rsp),%xmm1
movsd  %xmm1,0x18(%rax)
movsd  0x10(%rsi),%xmm1
addsd  0x10(%rdi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rbp)
movsd  0x10(%rdi),%xmm1
subsd  0x10(%rsi),%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0xc0(%rsp),%xmm1
mov    0x10(%rdx),%rcx
movsd  %xmm1,0x8(%rcx)
movsd  0x50(%rsp),%xmm1
movsd  %xmm1,0x10(%rcx)
movsd  0x90(%rsp),%xmm1
movsd  %xmm1,0x18(%rcx)
movsd  0x18(%rsi),%xmm1
addsd  0x18(%rdi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rbp)
movsd  0x18(%rdi),%xmm0
subsd  0x18(%rsi),%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  0xc8(%rsp),%xmm0
mov    0x18(%rdx),%rdx
movsd  %xmm0,0x8(%rdx)
movsd  0x58(%rsp),%xmm0
movsd  %xmm0,0x10(%rdx)
movsd  0x98(%rsp),%xmm0
movsd  %xmm0,0x18(%rdx)
movq   $0x0,0x8(%r15)
movsd  0x18(%rsp),%xmm0
movsd  0x8(%rax),%xmm3
mulsd  %xmm0,%xmm3
xorpd  %xmm2,%xmm2
addsd  %xmm2,%xmm3
movsd  %xmm3,0x8(%r15)
movsd  0x20(%rsp),%xmm1
movsd  0x8(%rcx),%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
movsd  %xmm4,0x8(%r15)
movsd  0x28(%rsp),%xmm3
movsd  0x8(%rdx),%xmm5
mulsd  %xmm3,%xmm5
addsd  %xmm4,%xmm5
movsd  %xmm5,0x8(%r15)
movq   $0x0,0x10(%r15)
movsd  0x10(%rax),%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm2,%xmm4
movsd  %xmm4,0x10(%r15)
movsd  0x10(%rcx),%xmm5
mulsd  %xmm1,%xmm5
addsd  %xmm4,%xmm5
movsd  %xmm5,0x10(%r15)
movsd  0x10(%rdx),%xmm4
mulsd  %xmm3,%xmm4
addsd  %xmm5,%xmm4
movsd  %xmm4,0x10(%r15)
movq   $0x0,0x18(%r15)
mulsd  0x18(%rax),%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,0x18(%r15)
mulsd  0x18(%rcx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%r15)
mulsd  0x18(%rdx),%xmm3
addsd  %xmm1,%xmm3
movsd  %xmm3,0x18(%r15)
lea    0xd0(%rsp),%rdi
mov    %r13,%rsi
lea    0x80(%rsp),%rdx
call   1050 <vec_ang@plt>
call   1080 <deg2rad@plt>
movsd  %xmm0,0x38(%rsp)
call   10b0 <cos@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x28(%r15)
movsd  0x38(%rsp),%xmm0
call   10a0 <sin@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x20(%r15)
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
mov    $0x3,%r8d
call   10c0 <free_dmatrix@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
mov    $0x3,%r8d
call   10c0 <free_dmatrix@plt>
mov    %r12,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
mov    $0x3,%r8d
call   10c0 <free_dmatrix@plt>
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @bpstep_par(double** %0, double* %1, double** %2, double* %3, double* %4, double** %5, double* %6) {
%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 [4 x double]
%18 = alloca [4 x double]
%19 = alloca [4 x double]
%20 = alloca [4 x double]
%21 = alloca [4 x double]
%22 = alloca [4 x double]
%23 = alloca double**
%24 = alloca double**
%25 = alloca double**
%26 = alloca i64
%27 = alloca i64
store double** %0, double*** %8
store double* %1, double** %9
store double** %2, double*** %10
store double* %3, double** %11
store double* %4, double** %12
store double** %5, double*** %13
store double* %6, double** %14
store i64 1, i64* %26
br label %28
28: ; preds = %48, %7
%29 = load i64, i64* %26
%30 = icmp sle i64 %29, 3
br i1 %30, label %31, label %51
31: ; preds = %28
%32 = load double**, double*** %8
%33 = load i64, i64* %26
%34 = getelementptr inbounds double*, double** %32, i64 %33
%35 = load double*, double** %34
%36 = getelementptr inbounds double, double* %35, i64 3
%37 = load double, double* %36
%38 = load i64, i64* %26
%39 = getelementptr inbounds [4 x double], [4 x double]* %21, i64 0, i64 %38
store double %37, double* %39
%40 = load double**, double*** %10
%41 = load i64, i64* %26
%42 = getelementptr inbounds double*, double** %40, i64 %41
%43 = load double*, double** %42
%44 = getelementptr inbounds double, double* %43, i64 3
%45 = load double, double* %44
%46 = load i64, i64* %26
%47 = getelementptr inbounds [4 x double], [4 x double]* %22, i64 0, i64 %46
store double %45, double* %47
br label %48
48: ; preds = %31
%49 = load i64, i64* %26
%50 = add nsw i64 %49, 1
store i64 %50, i64* %26
br label %28
51: ; preds = %28
%52 = getelementptr inbounds [4 x double], [4 x double]* %21, i64 0, i64 0
%53 = getelementptr inbounds [4 x double], [4 x double]* %22, i64 0, i64 0
%54 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 0
%55 = call i32 @cross(double* %52, double* %53, double* %54)
%56 = getelementptr inbounds [4 x double], [4 x double]* %21, i64 0, i64 0
%57 = getelementptr inbounds [4 x double], [4 x double]* %22, i64 0, i64 0
%58 = call double @magang(double* %56, double* %57)
store double %58, double* %16
%59 = call double** @dmatrix(i32 1, i32 3, i32 1, i32 3)
store double** %59, double*** %23
%60 = call double** @dmatrix(i32 1, i32 3, i32 1, i32 3)
store double** %60, double*** %24
%61 = call double** @dmatrix(i32 1, i32 3, i32 1, i32 3)
store double** %61, double*** %25
%62 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 0
%63 = load double, double* %16
%64 = fmul double -5.000000e-01, %63
%65 = load double**, double*** %25
%66 = call i32 @arb_rotation(double* %62, double %64, double** %65)
%67 = load double**, double*** %25
%68 = load double**, double*** %10
%69 = load double**, double*** %24
%70 = call i32 @multi_matrix(double** %67, i32 3, i32 3, double** %68, i32 3, i32 3, double** %69)
%71 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 0
%72 = load double, double* %16
%73 = fmul double 5.000000e-01, %72
%74 = load double**, double*** %25
%75 = call i32 @arb_rotation(double* %71, double %73, double** %74)
%76 = load double**, double*** %25
%77 = load double**, double*** %8
%78 = load double**, double*** %23
%79 = call i32 @multi_matrix(double** %76, i32 3, i32 3, double** %77, i32 3, i32 3, double** %78)
store i64 1, i64* %26
br label %80
80: ; preds = %108, %51
%81 = load i64, i64* %26
%82 = icmp sle i64 %81, 3
br i1 %82, label %83, label %111
83: ; preds = %80
%84 = load double**, double*** %24
%85 = load i64, i64* %26
%86 = getelementptr inbounds double*, double** %84, i64 %85
%87 = load double*, double** %86
%88 = getelementptr inbounds double, double* %87, i64 3
%89 = load double, double* %88
%90 = load i64, i64* %26
%91 = getelementptr inbounds [4 x double], [4 x double]* %20, i64 0, i64 %90
store double %89, double* %91
%92 = load double**, double*** %23
%93 = load i64, i64* %26
%94 = getelementptr inbounds double*, double** %92, i64 %93
%95 = load double*, double** %94
%96 = getelementptr inbounds double, double* %95, i64 2
%97 = load double, double* %96
%98 = load i64, i64* %26
%99 = getelementptr inbounds [4 x double], [4 x double]* %21, i64 0, i64 %98
store double %97, double* %99
%100 = load double**, double*** %24
%101 = load i64, i64* %26
%102 = getelementptr inbounds double*, double** %100, i64 %101
%103 = load double*, double** %102
%104 = getelementptr inbounds double, double* %103, i64 2
%105 = load double, double* %104
%106 = load i64, i64* %26
%107 = getelementptr inbounds [4 x double], [4 x double]* %22, i64 0, i64 %106
store double %105, double* %107
br label %108
108: ; preds = %83
%109 = load i64, i64* %26
%110 = add nsw i64 %109, 1
store i64 %110, i64* %26
br label %80
111: ; preds = %80
%112 = getelementptr inbounds [4 x double], [4 x double]* %21, i64 0, i64 0
%113 = getelementptr inbounds [4 x double], [4 x double]* %22, i64 0, i64 0
%114 = getelementptr inbounds [4 x double], [4 x double]* %20, i64 0, i64 0
%115 = call double @vec_ang(double* %112, double* %113, double* %114)
%116 = load double*, double** %12
%117 = getelementptr inbounds double, double* %116, i64 6
store double %115, double* %117
%118 = load double*, double** %12
%119 = getelementptr inbounds double, double* %118, i64 6
%120 = load double, double* %119
%121 = call double @ddiff(double %120, i32 180)
%122 = fcmp olt double %121, 0x3E7AD7F29ABCAF48
br i1 %122, label %123, label %140
123: ; preds = %111
store i64 1, i64* %26
br label %124
124: ; preds = %136, %123
%125 = load i64, i64* %26
%126 = icmp sle i64 %125, 3
br i1 %126, label %127, label %139
127: ; preds = %124
%128 = load double**, double*** %24
%129 = load i64, i64* %26
%130 = getelementptr inbounds double*, double** %128, i64 %129
%131 = load double*, double** %130
%132 = getelementptr inbounds double, double* %131, i64 1
%133 = load double, double* %132
%134 = load i64, i64* %26
%135 = getelementptr inbounds [4 x double], [4 x double]* %19, i64 0, i64 %134
store double %133, double* %135
br label %136
136: ; preds = %127
%137 = load i64, i64* %26
%138 = add nsw i64 %137, 1
store i64 %138, i64* %26
br label %124
139: ; preds = %124
br label %185
140: ; preds = %111
%141 = load double*, double** %12
%142 = getelementptr inbounds double, double* %141, i64 6
%143 = load double, double* %142
%144 = call double @ddiff(double %143, i32 -180)
%145 = fcmp olt double %144, 0x3E7AD7F29ABCAF48
br i1 %145, label %146, label %164
146: ; preds = %140
store i64 1, i64* %26
br label %147
147: ; preds = %160, %146
%148 = load i64, i64* %26
%149 = icmp sle i64 %148, 3
br i1 %149, label %150, label %163
150: ; preds = %147
%151 = load double**, double*** %24
%152 = load i64, i64* %26
%153 = getelementptr inbounds double*, double** %151, i64 %152
%154 = load double*, double** %153
%155 = getelementptr inbounds double, double* %154, i64 1
%156 = load double, double* %155
%157 = fneg double %156
%158 = load i64, i64* %26
%159 = getelementptr inbounds [4 x double], [4 x double]* %19, i64 0, i64 %158
store double %157, double* %159
br label %160
160: ; preds = %150
%161 = load i64, i64* %26
%162 = add nsw i64 %161, 1
store i64 %162, i64* %26
br label %147
163: ; preds = %147
br label %184
164: ; preds = %140
store i64 1, i64* %26
br label %165
165: ; preds = %178, %164
%166 = load i64, i64* %26
%167 = icmp sle i64 %166, 3
br i1 %167, label %168, label %181
168: ; preds = %165
%169 = load i64, i64* %26
%170 = getelementptr inbounds [4 x double], [4 x double]* %21, i64 0, i64 %169
%171 = load double, double* %170
%172 = load i64, i64* %26
%173 = getelementptr inbounds [4 x double], [4 x double]* %22, i64 0, i64 %172
%174 = load double, double* %173
%175 = fadd double %171, %174
%176 = load i64, i64* %26
%177 = getelementptr inbounds [4 x double], [4 x double]* %19, i64 0, i64 %176
store double %175, double* %177
br label %178
178: ; preds = %168
%179 = load i64, i64* %26
%180 = add nsw i64 %179, 1
store i64 %180, i64* %26
br label %165
181: ; preds = %165
%182 = getelementptr inbounds [4 x double], [4 x double]* %19, i64 0, i64 0
%183 = call i32 @vec_norm(double* %182)
br label %184
184: ; preds = %181, %163
br label %185
185: ; preds = %184, %139
%186 = getelementptr inbounds [4 x double], [4 x double]* %19, i64 0, i64 0
%187 = getelementptr inbounds [4 x double], [4 x double]* %20, i64 0, i64 0
%188 = getelementptr inbounds [4 x double], [4 x double]* %18, i64 0, i64 0
%189 = call i32 @cross(double* %186, double* %187, double* %188)
store i64 1, i64* %26
br label %190
190: ; preds = %242, %185
%191 = load i64, i64* %26
%192 = icmp sle i64 %191, 3
br i1 %192, label %193, label %245
193: ; preds = %190
%194 = load double*, double** %9
%195 = load i64, i64* %26
%196 = getelementptr inbounds double, double* %194, i64 %195
%197 = load double, double* %196
%198 = load double*, double** %11
%199 = load i64, i64* %26
%200 = getelementptr inbounds double, double* %198, i64 %199
%201 = load double, double* %200
%202 = fadd double %197, %201
%203 = fmul double 5.000000e-01, %202
%204 = load double*, double** %14
%205 = load i64, i64* %26
%206 = getelementptr inbounds double, double* %204, i64 %205
store double %203, double* %206
%207 = load double*, double** %11
%208 = load i64, i64* %26
%209 = getelementptr inbounds double, double* %207, i64 %208
%210 = load double, double* %209
%211 = load double*, double** %9
%212 = load i64, i64* %26
%213 = getelementptr inbounds double, double* %211, i64 %212
%214 = load double, double* %213
%215 = fsub double %210, %214
%216 = load i64, i64* %26
%217 = getelementptr inbounds [4 x double], [4 x double]* %21, i64 0, i64 %216
store double %215, double* %217
%218 = load i64, i64* %26
%219 = getelementptr inbounds [4 x double], [4 x double]* %18, i64 0, i64 %218
%220 = load double, double* %219
%221 = load double**, double*** %13
%222 = load i64, i64* %26
%223 = getelementptr inbounds double*, double** %221, i64 %222
%224 = load double*, double** %223
%225 = getelementptr inbounds double, double* %224, i64 1
store double %220, double* %225
%226 = load i64, i64* %26
%227 = getelementptr inbounds [4 x double], [4 x double]* %19, i64 0, i64 %226
%228 = load double, double* %227
%229 = load double**, double*** %13
%230 = load i64, i64* %26
%231 = getelementptr inbounds double*, double** %229, i64 %230
%232 = load double*, double** %231
%233 = getelementptr inbounds double, double* %232, i64 2
store double %228, double* %233
%234 = load i64, i64* %26
%235 = getelementptr inbounds [4 x double], [4 x double]* %20, i64 0, i64 %234
%236 = load double, double* %235
%237 = load double**, double*** %13
%238 = load i64, i64* %26
%239 = getelementptr inbounds double*, double** %237, i64 %238
%240 = load double*, double** %239
%241 = getelementptr inbounds double, double* %240, i64 3
store double %236, double* %241
br label %242
242: ; preds = %193
%243 = load i64, i64* %26
%244 = add nsw i64 %243, 1
store i64 %244, i64* %26
br label %190
245: ; preds = %190
store i64 1, i64* %26
br label %246
246: ; preds = %276, %245
%247 = load i64, i64* %26
%248 = icmp sle i64 %247, 3
br i1 %248, label %249, label %279
249: ; preds = %246
%250 = load double*, double** %12
%251 = load i64, i64* %26
%252 = getelementptr inbounds double, double* %250, i64 %251
store double 0.000000e+00, double* %252
store i64 1, i64* %27
br label %253
253: ; preds = %272, %249
%254 = load i64, i64* %27
%255 = icmp sle i64 %254, 3
br i1 %255, label %256, label %275
256: ; preds = %253
%257 = load i64, i64* %27
%258 = getelementptr inbounds [4 x double], [4 x double]* %21, i64 0, i64 %257
%259 = load double, double* %258
%260 = load double**, double*** %13
%261 = load i64, i64* %27
%262 = getelementptr inbounds double*, double** %260, i64 %261
%263 = load double*, double** %262
%264 = load i64, i64* %26
%265 = getelementptr inbounds double, double* %263, i64 %264
%266 = load double, double* %265
%267 = load double*, double** %12
%268 = load i64, i64* %26
%269 = getelementptr inbounds double, double* %267, i64 %268
%270 = load double, double* %269
%271 = call double @llvm.fmuladd.f64(double %259, double %266, double %270)
store double %271, double* %269
br label %272
272: ; preds = %256
%273 = load i64, i64* %27
%274 = add nsw i64 %273, 1
store i64 %274, i64* %27
br label %253
275: ; preds = %253
br label %276
276: ; preds = %275
%277 = load i64, i64* %26
%278 = add nsw i64 %277, 1
store i64 %278, i64* %26
br label %246
279: ; preds = %246
%280 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 0
%281 = getelementptr inbounds [4 x double], [4 x double]* %19, i64 0, i64 0
%282 = getelementptr inbounds [4 x double], [4 x double]* %20, i64 0, i64 0
%283 = call double @vec_ang(double* %280, double* %281, double* %282)
%284 = call double @deg2rad(double %283)
store double %284, double* %15
%285 = load double, double* %16
%286 = load double, double* %15
%287 = call double @cos(double %286)
%288 = fmul double %285, %287
%289 = load double*, double** %12
%290 = getelementptr inbounds double, double* %289, i64 5
store double %288, double* %290
%291 = load double, double* %16
%292 = load double, double* %15
%293 = call double @sin(double %292)
%294 = fmul double %291, %293
%295 = load double*, double** %12
%296 = getelementptr inbounds double, double* %295, i64 4
store double %294, double* %296
%297 = load double**, double*** %23
%298 = call i32 @free_dmatrix(double** %297, i32 1, i32 3, i32 1, i32 3)
%299 = load double**, double*** %24
%300 = call i32 @free_dmatrix(double** %299, i32 1, i32 3, i32 1, i32 3)
%301 = load double**, double*** %25
%302 = call i32 @free_dmatrix(double** %301, i32 1, i32 3, i32 1, i32 3)
ret void
}

LLVM IR (-O2):
define void @bpstep_par(double** %0, double* nocapture %1, double** %2, double* nocapture %3, double* nocapture %4, double** nocapture %5, double* nocapture writeonly %6) {
%8 = alloca [4 x double]
%9 = alloca [4 x double]
%10 = alloca [4 x double]
%11 = alloca [4 x double]
%12 = alloca [4 x double]
%13 = alloca [4 x double]
%14 = bitcast [4 x double]* %8 to i8*
%15 = bitcast [4 x double]* %9 to i8*
%16 = bitcast [4 x double]* %10 to i8*
%17 = bitcast [4 x double]* %11 to i8*
%18 = bitcast [4 x double]* %12 to i8*
%19 = bitcast [4 x double]* %13 to i8*
%20 = getelementptr inbounds double*, double** %0, i64 1
%21 = load double*, double** %20
%22 = getelementptr inbounds double, double* %21, i64 3
%23 = load double, double* %22
%24 = getelementptr inbounds [4 x double], [4 x double]* %12, i64 0, i64 1
store double %23, double* %24
%25 = getelementptr inbounds double*, double** %2, i64 1
%26 = load double*, double** %25
%27 = getelementptr inbounds double, double* %26, i64 3
%28 = load double, double* %27
%29 = getelementptr inbounds [4 x double], [4 x double]* %13, i64 0, i64 1
store double %28, double* %29
%30 = getelementptr inbounds double*, double** %0, i64 2
%31 = load double*, double** %30
%32 = getelementptr inbounds double, double* %31, i64 3
%33 = load double, double* %32
%34 = getelementptr inbounds [4 x double], [4 x double]* %12, i64 0, i64 2
store double %33, double* %34
%35 = getelementptr inbounds double*, double** %2, i64 2
%36 = load double*, double** %35
%37 = getelementptr inbounds double, double* %36, i64 3
%38 = load double, double* %37
%39 = getelementptr inbounds [4 x double], [4 x double]* %13, i64 0, i64 2
store double %38, double* %39
%40 = getelementptr inbounds double*, double** %0, i64 3
%41 = load double*, double** %40
%42 = getelementptr inbounds double, double* %41, i64 3
%43 = load double, double* %42
%44 = getelementptr inbounds [4 x double], [4 x double]* %12, i64 0, i64 3
store double %43, double* %44
%45 = getelementptr inbounds double*, double** %2, i64 3
%46 = load double*, double** %45
%47 = getelementptr inbounds double, double* %46, i64 3
%48 = load double, double* %47
%49 = getelementptr inbounds [4 x double], [4 x double]* %13, i64 0, i64 3
store double %48, double* %49
%50 = getelementptr inbounds [4 x double], [4 x double]* %12, i64 0, i64 0
%51 = getelementptr inbounds [4 x double], [4 x double]* %13, i64 0, i64 0
%52 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 0
%53 = call i32 @cross(double* %50, double* %51, double* %52)
%54 = call double @magang(double* %50, double* %51)
%55 = call double** @dmatrix(i32 1, i32 3, i32 1, i32 3)
%56 = call double** @dmatrix(i32 1, i32 3, i32 1, i32 3)
%57 = call double** @dmatrix(i32 1, i32 3, i32 1, i32 3)
%58 = fmul double %54, -5.000000e-01
%59 = call i32 @arb_rotation(double* %52, double %58, double** %57)
%60 = call i32 @multi_matrix(double** %57, i32 3, i32 3, double** %2, i32 3, i32 3, double** %56)
%61 = fmul double %54, 5.000000e-01
%62 = call i32 @arb_rotation(double* %52, double %61, double** %57)
%63 = call i32 @multi_matrix(double** %57, i32 3, i32 3, double** %0, i32 3, i32 3, double** %55)
%64 = getelementptr inbounds double*, double** %56, i64 1
%65 = load double*, double** %64
%66 = getelementptr inbounds double, double* %65, i64 3
%67 = load double, double* %66
%68 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 1
store double %67, double* %68
%69 = getelementptr inbounds double*, double** %55, i64 1
%70 = load double*, double** %69
%71 = getelementptr inbounds double, double* %70, i64 2
%72 = load double, double* %71
store double %72, double* %24
%73 = getelementptr inbounds double, double* %65, i64 2
%74 = load double, double* %73
store double %74, double* %29
%75 = getelementptr inbounds double*, double** %56, i64 2
%76 = load double*, double** %75
%77 = getelementptr inbounds double, double* %76, i64 3
%78 = load double, double* %77
%79 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 2
store double %78, double* %79
%80 = getelementptr inbounds double*, double** %55, i64 2
%81 = load double*, double** %80
%82 = getelementptr inbounds double, double* %81, i64 2
%83 = load double, double* %82
store double %83, double* %34
%84 = getelementptr inbounds double, double* %76, i64 2
%85 = load double, double* %84
store double %85, double* %39
%86 = getelementptr inbounds double*, double** %56, i64 3
%87 = load double*, double** %86
%88 = getelementptr inbounds double, double* %87, i64 3
%89 = load double, double* %88
%90 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 3
store double %89, double* %90
%91 = getelementptr inbounds double*, double** %55, i64 3
%92 = load double*, double** %91
%93 = getelementptr inbounds double, double* %92, i64 2
%94 = load double, double* %93
store double %94, double* %44
%95 = getelementptr inbounds double, double* %87, i64 2
%96 = load double, double* %95
store double %96, double* %49
%97 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 0
%98 = call double @vec_ang(double* %50, double* %51, double* %97)
%99 = getelementptr inbounds double, double* %4, i64 6
store double %98, double* %99
%100 = call double @ddiff(double %98, i32 180)
%101 = fcmp olt double %100, 0x3E7AD7F29ABCAF48
br i1 %101, label %102, label %115
102: ; preds = %7
%103 = load double*, double** %64
%104 = getelementptr inbounds double, double* %103, i64 1
%105 = load double, double* %104
%106 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 1
store double %105, double* %106
%107 = load double*, double** %75
%108 = getelementptr inbounds double, double* %107, i64 1
%109 = load double, double* %108
%110 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 2
store double %109, double* %110
%111 = load double*, double** %86
%112 = getelementptr inbounds double, double* %111, i64 1
%113 = load double, double* %112
%114 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 3
store double %113, double* %114
br label %149
115: ; preds = %7
%116 = load double, double* %99
%117 = call double @ddiff(double %116, i32 -180)
%118 = fcmp olt double %117, 0x3E7AD7F29ABCAF48
br i1 %118, label %133, label %119
119: ; preds = %115
%120 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 1
%121 = bitcast double* %24 to <2 x double>*
%122 = load <2 x double>, <2 x double>* %121
%123 = bitcast double* %29 to <2 x double>*
%124 = load <2 x double>, <2 x double>* %123
%125 = fadd <2 x double> %122, %124
%126 = bitcast double* %120 to <2 x double>*
store <2 x double> %125, <2 x double>* %126
%127 = load double, double* %44
%128 = load double, double* %49
%129 = fadd double %127, %128
%130 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 3
store double %129, double* %130
%131 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 0
%132 = call i32 @vec_norm(double* %131)
br label %149
133: ; preds = %115
%134 = load double*, double** %64
%135 = getelementptr inbounds double, double* %134, i64 1
%136 = load double, double* %135
%137 = fneg double %136
%138 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 1
store double %137, double* %138
%139 = load double*, double** %75
%140 = getelementptr inbounds double, double* %139, i64 1
%141 = load double, double* %140
%142 = fneg double %141
%143 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 2
store double %142, double* %143
%144 = load double*, double** %86
%145 = getelementptr inbounds double, double* %144, i64 1
%146 = load double, double* %145
%147 = fneg double %146
%148 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 3
store double %147, double* %148
br label %149
149: ; preds = %133, %102, %119
%150 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 0
%151 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 0
%152 = call i32 @cross(double* %150, double* %97, double* %151)
%153 = getelementptr inbounds double, double* %1, i64 1
%154 = load double, double* %153
%155 = getelementptr inbounds double, double* %3, i64 1
%156 = load double, double* %155
%157 = fadd double %154, %156
%158 = fmul double %157, 5.000000e-01
%159 = getelementptr inbounds double, double* %6, i64 1
store double %158, double* %159
%160 = load double, double* %155
%161 = load double, double* %153
%162 = fsub double %160, %161
store double %162, double* %24
%163 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 1
%164 = load double, double* %163
%165 = getelementptr inbounds double*, double** %5, i64 1
%166 = load double*, double** %165
%167 = getelementptr inbounds double, double* %166, i64 1
store double %164, double* %167
%168 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 1
%169 = load double, double* %168
%170 = getelementptr inbounds double, double* %166, i64 2
store double %169, double* %170
%171 = load double, double* %68
%172 = getelementptr inbounds double, double* %166, i64 3
store double %171, double* %172
%173 = getelementptr inbounds double, double* %1, i64 2
%174 = load double, double* %173
%175 = getelementptr inbounds double, double* %3, i64 2
%176 = load double, double* %175
%177 = fadd double %174, %176
%178 = fmul double %177, 5.000000e-01
%179 = getelementptr inbounds double, double* %6, i64 2
store double %178, double* %179
%180 = load double, double* %175
%181 = load double, double* %173
%182 = fsub double %180, %181
store double %182, double* %34
%183 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 2
%184 = load double, double* %183
%185 = getelementptr inbounds double*, double** %5, i64 2
%186 = load double*, double** %185
%187 = getelementptr inbounds double, double* %186, i64 1
store double %184, double* %187
%188 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 2
%189 = load double, double* %188
%190 = getelementptr inbounds double, double* %186, i64 2
store double %189, double* %190
%191 = load double, double* %79
%192 = getelementptr inbounds double, double* %186, i64 3
store double %191, double* %192
%193 = getelementptr inbounds double, double* %1, i64 3
%194 = load double, double* %193
%195 = getelementptr inbounds double, double* %3, i64 3
%196 = load double, double* %195
%197 = fadd double %194, %196
%198 = fmul double %197, 5.000000e-01
%199 = getelementptr inbounds double, double* %6, i64 3
store double %198, double* %199
%200 = load double, double* %195
%201 = load double, double* %193
%202 = fsub double %200, %201
store double %202, double* %44
%203 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 3
%204 = load double, double* %203
%205 = getelementptr inbounds double*, double** %5, i64 3
%206 = load double*, double** %205
%207 = getelementptr inbounds double, double* %206, i64 1
store double %204, double* %207
%208 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 3
%209 = load double, double* %208
%210 = getelementptr inbounds double, double* %206, i64 2
store double %209, double* %210
%211 = load double, double* %90
%212 = getelementptr inbounds double, double* %206, i64 3
store double %211, double* %212
%213 = getelementptr inbounds double, double* %4, i64 1
store double 0.000000e+00, double* %213
%214 = load double, double* %24
%215 = load double, double* %167
%216 = call double @llvm.fmuladd.f64(double %214, double %215, double 0.000000e+00)
store double %216, double* %213
%217 = load double, double* %34
%218 = load double, double* %187
%219 = call double @llvm.fmuladd.f64(double %217, double %218, double %216)
store double %219, double* %213
%220 = load double, double* %44
%221 = load double, double* %207
%222 = call double @llvm.fmuladd.f64(double %220, double %221, double %219)
store double %222, double* %213
%223 = getelementptr inbounds double, double* %4, i64 2
store double 0.000000e+00, double* %223
%224 = load double, double* %170
%225 = call double @llvm.fmuladd.f64(double %214, double %224, double 0.000000e+00)
store double %225, double* %223
%226 = load double, double* %190
%227 = call double @llvm.fmuladd.f64(double %217, double %226, double %225)
store double %227, double* %223
%228 = load double, double* %210
%229 = call double @llvm.fmuladd.f64(double %220, double %228, double %227)
store double %229, double* %223
%230 = getelementptr inbounds double, double* %4, i64 3
store double 0.000000e+00, double* %230
%231 = load double, double* %172
%232 = call double @llvm.fmuladd.f64(double %214, double %231, double 0.000000e+00)
store double %232, double* %230
%233 = load double, double* %192
%234 = call double @llvm.fmuladd.f64(double %217, double %233, double %232)
store double %234, double* %230
%235 = load double, double* %212
%236 = call double @llvm.fmuladd.f64(double %220, double %235, double %234)
store double %236, double* %230
%237 = call double @vec_ang(double* %52, double* %150, double* %97)
%238 = call double @deg2rad(double %237)
%239 = call double @cos(double %238)
%240 = fmul double %54, %239
%241 = getelementptr inbounds double, double* %4, i64 5
store double %240, double* %241
%242 = call double @sin(double %238)
%243 = fmul double %54, %242
%244 = getelementptr inbounds double, double* %4, i64 4
store double %243, double* %244
%245 = call i32 @free_dmatrix(double** %55, i32 1, i32 3, i32 1, i32 3)
%246 = call i32 @free_dmatrix(double** %56, i32 1, i32 3, i32 1, i32 3)
%247 = call i32 @free_dmatrix(double** %57, i32 1, i32 3, i32 1, i32 3)
ret void
}