#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*/ Riemann_solver_exact(double *, double *, double, double,
                                        double, double, double, double, double,
                                        int *, double, int);
double pow(double, double);
double sqrt(double);
void linear_GRP_solver_LAG(double *direvative, double *mid, double rho_L,
                           double rho_R, double s_rho_L, double s_rho_R,
                           double u_L, double u_R, double s_u_L, double s_u_R,
                           double p_L, double p_R, double s_p_L, double s_p_R,
                           double gamma, double eps) {
  double dist;
  int CRW[2];
  double c_L, c_R, g_L, g_R;
  double rho_star, u_star, p_star, rho_star_L, rho_star_R, c_star_L, c_star_R,
      g_star_L, g_star_R, beta_star;
  double a_L, b_L, d_L, a_R, b_R, d_R, L_rho, L_u, L_p, sigma;
  double zeta = (gamma - 1.0) / (gamma + 1.0);
  c_L = sqrt(gamma * p_L / rho_L);
  c_R = sqrt(gamma * p_R / rho_R);
  g_L = rho_L * c_L;
  g_R = rho_R * c_R;
  Riemann_solver_exact(&u_star, &p_star, gamma, u_L, u_R, p_L, p_R, c_L, c_R,
                       CRW, eps, 500);
  if (p_star > p_L)
    rho_star_L = rho_L * (p_star + zeta * p_L) / (p_L + zeta * p_star);
  else
    rho_star_L = rho_L * pow(p_star / p_L, 1.0 / gamma);
  if (p_star > p_R)
    rho_star_R = rho_R * (p_star + zeta * p_R) / (p_R + zeta * p_star);
  else
    rho_star_R = rho_R * pow(p_star / p_R, 1.0 / gamma);
  mid[1] = u_star;
  mid[2] = p_star;
  mid[0] = rho_star_L;
  mid[3] = rho_star_R;
  c_star_L = sqrt(gamma * p_star / rho_star_L);
  c_star_R = sqrt(gamma * p_star / rho_star_R);
  g_star_R = rho_star_R * c_star_R;
  g_star_L = rho_star_L * c_star_L;
  beta_star = g_star_L / g_L;
  dist = sqrt((u_L - u_R) * (u_L - u_R) + (p_L - p_R) * (p_L - p_R));
  if ((dist < eps * 1000)) {
    a_L = 1.0;
    b_L = 1.0 / g_star_L;
    d_L = -1.0 / g_star_L * g_L * (g_L * s_u_L + s_p_L);
    a_R = -1.0;
    b_R = 1.0 / g_star_R;
    d_R = -1.0 / g_star_R * g_R * (g_R * s_u_R - s_p_R);
  } else {
    a_L = 1.0;
    b_L = 1.0 / g_star_L;
    d_L = (s_u_L + s_p_L / g_L) +
          1.0 / g_L / (3.0 * gamma - 1.0) * (c_L * c_L * s_rho_L - s_p_L) *
              (pow(beta_star, (3.0 * gamma - 1.0) / 2.0 / (gamma + 1.0)) - 1.0);
    d_L = (-1.0) * sqrt(g_L * g_star_L) * d_L;
    sigma = (p_star - p_R) / (u_star - u_R);
    a_R = 2.0 - 0.5 * (p_star - p_R) / (p_star + zeta * p_R);
    b_R = -1.0 * sigma / g_star_R / g_star_R - (a_R - 1) / sigma;
    L_rho = -1.0 * (p_star - p_R) / 2.0 / rho_R;
    L_u = sigma + rho_R * (u_star - u_R) / 2.0 +
          g_R * g_R / sigma *
              (1.0 + zeta * (p_star - p_R) / 2.0 / (p_star + zeta * p_R));
    L_p = -1.0 * (2 + zeta / 2.0 * (p_star - p_R) / (p_star + zeta * p_R));
    d_R = L_u * s_u_R + L_p * s_p_R + L_rho * s_rho_R;
  }
  direvative[1] = (d_L * b_R - d_R * b_L) / (a_L * b_R - a_R * b_L);
  direvative[2] = (d_L * a_R - d_R * a_L) / (b_L * a_R - b_R * a_L);
  direvative[0] = 1.0 / c_star_L / c_star_L * direvative[2];
  direvative[3] = 1.0 / c_star_R / c_star_R * direvative[2];
}


x86 assembly (clang, -O0):
<linear_GRP_solver_LAG>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
movsd  0x38(%rbp),%xmm8
movsd  0x30(%rbp),%xmm8
movsd  0x28(%rbp),%xmm8
movsd  0x20(%rbp),%xmm8
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
movsd  %xmm4,-0x38(%rbp)
movsd  %xmm5,-0x40(%rbp)
movsd  %xmm6,-0x48(%rbp)
movsd  %xmm7,-0x50(%rbp)
movsd  0x30(%rbp),%xmm0
movsd  0xe64(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe58(%rip),%xmm1
addsd  0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  0x30(%rbp),%xmm0
mulsd  0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  0x30(%rbp),%xmm0
mulsd  0x18(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
movsd  0x10(%rbp),%xmm3
movsd  0x18(%rbp),%xmm4
movsd  -0x68(%rbp),%xmm5
movsd  -0x70(%rbp),%xmm6
lea    -0x60(%rbp),%rdx
movsd  0x38(%rbp),%xmm7
lea    -0x90(%rbp),%rdi
lea    -0x98(%rbp),%rsi
mov    $0x1f4,%ecx
call   1030 <Riemann_solver_exact@plt>
movsd  -0x98(%rbp),%xmm0
ff
ucomisd 0x10(%rbp),%xmm0
jbe    12b4 <linear_GRP_solver_LAG+0x184>
movsd  -0x18(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0x128(%rbp),%xmm1
ff
movsd  0x10(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x10(%rbp),%xmm2
movsd  -0x128(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm3
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    12f7 <linear_GRP_solver_LAG+0x1c7>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
divsd  0x10(%rbp),%xmm0
movsd  0xd2a(%rip),%xmm1
divsd  0x30(%rbp),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x130(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
ucomisd 0x18(%rbp),%xmm0
jbe    135e <linear_GRP_solver_LAG+0x22e>
movsd  -0x20(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0x128(%rbp),%xmm1
ff
movsd  0x18(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x18(%rbp),%xmm2
movsd  -0x128(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm3
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    13a1 <linear_GRP_solver_LAG+0x271>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
divsd  0x18(%rbp),%xmm0
movsd  0xc80(%rip),%xmm1
divsd  0x30(%rbp),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x138(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  0x30(%rbp),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
divsd  -0xa0(%rbp),%xmm0
ff
call   1050 <sqrt@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0x30(%rbp),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
divsd  -0xa8(%rbp),%xmm0
ff
call   1050 <sqrt@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
divsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
subsd  -0x40(%rbp),%xmm2
movsd  0x10(%rbp),%xmm1
subsd  0x18(%rbp),%xmm1
movsd  0x10(%rbp),%xmm3
subsd  0x18(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  0xb50(%rip),%xmm0
mulsd  0x38(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    15a3 <linear_GRP_solver_LAG+0x473>
movsd  0xb31(%rip),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  0xb21(%rip),%xmm0
divsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  0xb19(%rip),%xmm0
divsd  -0xc0(%rbp),%xmm0
ff
mulsd  -0x78(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm3
movsd  0x20(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  0xae1(%rip),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0xac1(%rip),%xmm0
divsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  0xab9(%rip),%xmm0
divsd  -0xc8(%rbp),%xmm0
ff
mulsd  -0x80(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm3
movsd  0x28(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
jmp    192f <linear_GRP_solver_LAG+0x7ff>
movsd  0xa55(%rip),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  0xa45(%rip),%xmm0
divsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  0x20(%rbp),%xmm1
divsd  -0x78(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
movsd  0xa12(%rip),%xmm0
divsd  -0x78(%rbp),%xmm0
movsd  0x30(%rbp),%xmm1
movsd  0xa28(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xa04(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm3
movsd  0x20(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
movsd  0x30(%rbp),%xmm1
movsd  0x9c0(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0x99c(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  0x998(%rip),%xmm2
divsd  %xmm2,%xmm1
movsd  0x974(%rip),%xmm2
addsd  0x30(%rbp),%xmm2
divsd  %xmm2,%xmm1
call   1040 <pow@plt>
movsd  -0x148(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x140(%rbp),%xmm0
ff
movsd  0x94b(%rip),%xmm3
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0x92a(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
subsd  0x18(%rbp),%xmm0
movsd  -0x90(%rbp),%xmm1
ff
subsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
subsd  0x18(%rbp),%xmm0
movsd  0x8eb(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0x128(%rbp),%xmm0
ff
movsd  0x18(%rbp),%xmm3
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
movsd  0x8b6(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0x89a(%rip),%xmm0
mulsd  -0x120(%rbp),%xmm0
ff
divsd  -0xc8(%rbp),%xmm0
ff
divsd  -0xc8(%rbp),%xmm0
ff
movsd  -0xf0(%rbp),%xmm1
ff
movsd  0x862(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  -0x120(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x98(%rbp),%xmm1
ff
subsd  0x18(%rbp),%xmm1
movsd  0x845(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0x841(%rip),%xmm1
divsd  %xmm1,%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x120(%rbp),%xmm1
ff
movsd  -0x20(%rbp),%xmm0
movsd  -0x90(%rbp),%xmm2
ff
subsd  -0x40(%rbp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0x80a(%rip),%xmm2
divsd  %xmm2,%xmm0
addsd  %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
divsd  -0x120(%rbp),%xmm0
ff
movsd  -0x128(%rbp),%xmm3
ff
movsd  -0x98(%rbp),%xmm2
ff
subsd  0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm3
movsd  0x7cf(%rip),%xmm2
divsd  %xmm2,%xmm3
movsd  -0x98(%rbp),%xmm4
ff
movsd  -0x128(%rbp),%xmm2
ff
movsd  0x18(%rbp),%xmm5
mulsd  %xmm5,%xmm2
addsd  %xmm4,%xmm2
divsd  %xmm2,%xmm3
movsd  0x78a(%rip),%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x128(%rbp),%xmm0
ff
movsd  0x77e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x98(%rbp),%xmm1
ff
subsd  0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0x128(%rbp),%xmm1
ff
movsd  0x18(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  0x740(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0x72c(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x110(%rbp),%xmm1
ff
movsd  -0x50(%rbp),%xmm2
movsd  -0x118(%rbp),%xmm0
ff
mulsd  0x28(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x108(%rbp),%xmm0
ff
movsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xf8(%rbp),%xmm2
ff
movsd  -0x100(%rbp),%xmm1
ff
mulsd  -0xe0(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0xd8(%rbp),%xmm1
ff
movsd  -0xf8(%rbp),%xmm3
ff
movsd  -0xf0(%rbp),%xmm2
ff
mulsd  -0xe0(%rbp),%xmm2
ff
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xf0(%rbp),%xmm2
ff
movsd  -0x100(%rbp),%xmm1
ff
mulsd  -0xd8(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0xe0(%rbp),%xmm1
movsd  -0xf0(%rbp),%xmm3
ff
movsd  -0xf8(%rbp),%xmm2
ff
mulsd  -0xd8(%rbp),%xmm2
ff
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  0x5b3(%rip),%xmm0
divsd  -0xb0(%rbp),%xmm0
ff
divsd  -0xb0(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
mulsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0x58a(%rip),%xmm0
divsd  -0xb8(%rbp),%xmm0
ff
divsd  -0xb8(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
mulsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x18(%rax)
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linear_GRP_solver_LAG>:
push   %r14
push   %rbx
sub    $0xe8,%rsp
movaps %xmm7,0xd0(%rsp)
movsd  %xmm5,0x48(%rsp)
movsd  %xmm4,0x10(%rsp)
movsd  %xmm3,0xc8(%rsp)
movsd  %xmm2,0xc0(%rsp)
movaps %xmm1,0x60(%rsp)
movapd %xmm0,%xmm1
mov    %rsi,%rbx
mov    %rdi,%r14
movsd  0x120(%rsp),%xmm2
movsd  0x108(%rsp),%xmm4
movsd  0x100(%rsp),%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm1,0x30(%rsp)
divsd  %xmm1,%xmm0
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm0
movaps %xmm6,0xa0(%rsp)
jb     11b0 <linear_GRP_solver_LAG+0x80>
sqrtsd %xmm0,%xmm0
jmp    11cb <linear_GRP_solver_LAG+0x9b>
call   1050 <sqrt@plt>
xorpd  %xmm3,%xmm3
movsd  0x120(%rsp),%xmm2
movsd  0x108(%rsp),%xmm4
movapd %xmm0,0x50(%rsp)
movsd  0xe27(%rip),%xmm1
addsd  %xmm2,%xmm1
movsd  0xe23(%rip),%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,0x70(%rsp)
movapd %xmm4,%xmm0
mulsd  %xmm2,%xmm0
divsd  0x60(%rsp),%xmm0
ucomisd %xmm3,%xmm0
jb     120c <linear_GRP_solver_LAG+0xdc>
xorps  %xmm6,%xmm6
sqrtsd %xmm0,%xmm6
jmp    1231 <linear_GRP_solver_LAG+0x101>
movsd  %xmm1,(%rsp)
call   1050 <sqrt@plt>
movsd  0x120(%rsp),%xmm2
movsd  (%rsp),%xmm1
movsd  0x108(%rsp),%xmm4
movapd %xmm0,%xmm6
divsd  0x70(%rsp),%xmm1
movsd  %xmm1,(%rsp)
lea    0x78(%rsp),%rdi
lea    0x8(%rsp),%rsi
lea    0xe0(%rsp),%rdx
movapd %xmm2,%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x48(%rsp),%xmm2
movsd  0x100(%rsp),%xmm3
movaps 0x50(%rsp),%xmm5
movapd %xmm6,0x90(%rsp)
movsd  0x128(%rsp),%xmm7
mov    $0x1f4,%ecx
call   1030 <Riemann_solver_exact@plt>
movsd  (%rsp),%xmm1
movsd  0x100(%rsp),%xmm2
movsd  0x8(%rsp),%xmm0
ucomisd %xmm2,%xmm0
jbe    12c2 <linear_GRP_solver_LAG+0x192>
movapd %xmm1,%xmm3
mulsd  %xmm2,%xmm3
addsd  %xmm0,%xmm3
mulsd  0x30(%rsp),%xmm3
mulsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm3
jmp    12ec <linear_GRP_solver_LAG+0x1bc>
divsd  %xmm2,%xmm0
movsd  0xd3a(%rip),%xmm1
divsd  0x120(%rsp),%xmm1
call   1040 <pow@plt>
movapd %xmm0,%xmm3
mulsd  0x30(%rsp),%xmm3
movsd  0x8(%rsp),%xmm0
movsd  0x108(%rsp),%xmm2
ucomisd %xmm2,%xmm0
movapd %xmm3,0x20(%rsp)
jbe    132f <linear_GRP_solver_LAG+0x1ff>
movsd  (%rsp),%xmm1
movapd %xmm1,%xmm4
mulsd  %xmm2,%xmm4
addsd  %xmm0,%xmm4
mulsd  0x60(%rsp),%xmm4
mulsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm4
movsd  0x120(%rsp),%xmm2
jmp    136c <linear_GRP_solver_LAG+0x23c>
divsd  %xmm2,%xmm0
movsd  0xccd(%rip),%xmm1
movsd  0x120(%rsp),%xmm2
divsd  %xmm2,%xmm1
call   1040 <pow@plt>
movsd  0x120(%rsp),%xmm2
movapd 0x20(%rsp),%xmm3
movapd %xmm0,%xmm4
mulsd  0x60(%rsp),%xmm4
movsd  0x8(%rsp),%xmm0
movsd  0x78(%rsp),%xmm1
movsd  %xmm1,0x8(%rbx)
movsd  %xmm0,0x10(%rbx)
movsd  %xmm3,(%rbx)
movsd  %xmm4,0x18(%rbx)
mulsd  %xmm2,%xmm0
divsd  %xmm3,%xmm0
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm0
movapd %xmm4,0x80(%rsp)
jb     13aa <linear_GRP_solver_LAG+0x27a>
movapd %xmm2,%xmm1
sqrtsd %xmm0,%xmm0
jmp    13c5 <linear_GRP_solver_LAG+0x295>
call   1050 <sqrt@plt>
xorpd  %xmm3,%xmm3
movapd 0x80(%rsp),%xmm4
movsd  0x120(%rsp),%xmm1
movapd %xmm0,0xb0(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
divsd  %xmm4,%xmm0
ucomisd %xmm3,%xmm0
jb     13eb <linear_GRP_solver_LAG+0x2bb>
xorps  %xmm1,%xmm1
sqrtsd %xmm0,%xmm1
jmp    13fd <linear_GRP_solver_LAG+0x2cd>
call   1050 <sqrt@plt>
movapd 0x80(%rsp),%xmm4
movapd %xmm0,%xmm1
movsd  0x108(%rsp),%xmm3
movapd 0x20(%rsp),%xmm13
movsd  0x10(%rsp),%xmm0
movapd 0x90(%rsp),%xmm2
movapd 0x50(%rsp),%xmm5
unpcklpd %xmm2,%xmm5
movaps 0x30(%rsp),%xmm2
unpcklpd 0x60(%rsp),%xmm2
movaps %xmm2,0x30(%rsp)
unpcklpd %xmm4,%xmm13
movapd 0xb0(%rsp),%xmm6
unpcklpd %xmm1,%xmm6
subsd  0x48(%rsp),%xmm0
movsd  0x100(%rsp),%xmm2
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm2
mulsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
movapd %xmm1,0x90(%rsp)
jb     1480 <linear_GRP_solver_LAG+0x350>
sqrtsd %xmm0,%xmm0
jmp    14b1 <linear_GRP_solver_LAG+0x381>
movapd %xmm13,0x20(%rsp)
movapd %xmm5,0x10(%rsp)
movapd %xmm6,0x80(%rsp)
call   1050 <sqrt@plt>
movapd 0x80(%rsp),%xmm6
movapd 0x10(%rsp),%xmm5
movapd 0x20(%rsp),%xmm13
movapd 0xa0(%rsp),%xmm7
movsd  0x118(%rsp),%xmm2
movsd  0x110(%rsp),%xmm4
mulpd  0x30(%rsp),%xmm5
mulpd  %xmm6,%xmm13
movsd  0x128(%rsp),%xmm1
mulsd  0xb28(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1544 <linear_GRP_solver_LAG+0x414>
movapd %xmm13,%xmm0
unpckhpd %xmm13,%xmm0
movsd  0xb08(%rip),%xmm3
divsd  %xmm0,%xmm3
movapd 0xb44(%rip),%xmm0
divpd  %xmm13,%xmm0
xorpd  0xb27(%rip),%xmm2
mulpd  %xmm5,%xmm0
unpcklpd 0xd0(%rsp),%xmm7
unpcklpd %xmm2,%xmm4
mulpd  %xmm5,%xmm7
addpd  %xmm4,%xmm7
mulpd  %xmm0,%xmm7
shufpd $0x2,0xb21(%rip),%xmm3
jmp    1776 <linear_GRP_solver_LAG+0x646>
movapd %xmm13,%xmm0
divsd  %xmm5,%xmm0
movapd %xmm4,%xmm1
divsd  %xmm5,%xmm1
addsd  %xmm7,%xmm1
movapd %xmm1,0x30(%rsp)
movsd  0xaa1(%rip),%xmm2
divsd  %xmm5,%xmm2
movsd  0x120(%rsp),%xmm1
mulsd  0xa9c(%rip),%xmm1
addsd  0xa7c(%rip),%xmm1
divsd  %xmm1,%xmm2
movapd 0x50(%rsp),%xmm3
mulsd  %xmm3,%xmm3
mulsd  0xc0(%rsp),%xmm3
subsd  %xmm4,%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm3,0x50(%rsp)
mulsd  0xa6f(%rip),%xmm1
divsd  0x70(%rsp),%xmm1
movapd %xmm13,0x20(%rsp)
movapd %xmm5,0x10(%rsp)
call   1040 <pow@plt>
movapd 0x10(%rsp),%xmm14
movapd 0x20(%rsp),%xmm13
movapd %xmm0,%xmm7
addsd  0xa1d(%rip),%xmm7
mulsd  0x50(%rsp),%xmm7
addsd  0x30(%rsp),%xmm7
movapd %xmm14,%xmm0
mulsd  %xmm13,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1609 <linear_GRP_solver_LAG+0x4d9>
sqrtsd %xmm0,%xmm0
jmp    162e <linear_GRP_solver_LAG+0x4fe>
movapd %xmm7,0xa0(%rsp)
call   1050 <sqrt@plt>
movapd 0x10(%rsp),%xmm14
movapd 0x20(%rsp),%xmm13
movapd 0xa0(%rsp),%xmm7
movapd 0xa0a(%rip),%xmm1
xorpd  %xmm1,%xmm0
mulsd  %xmm0,%xmm7
movsd  0x8(%rsp),%xmm3
movapd %xmm3,%xmm4
movsd  0x108(%rsp),%xmm11
subsd  %xmm11,%xmm4
movsd  0x78(%rsp),%xmm10
subsd  0x48(%rsp),%xmm10
movsd  (%rsp),%xmm0
mulsd  %xmm0,%xmm11
movsd  0x9b0(%rip),%xmm12
mulsd  %xmm4,%xmm12
movsd  0x99a(%rip),%xmm8
movapd %xmm0,%xmm6
mulsd  %xmm4,%xmm6
mulsd  %xmm8,%xmm0
mulsd  %xmm4,%xmm0
divsd  %xmm10,%xmm4
addsd  %xmm3,%xmm11
movapd %xmm12,%xmm2
divsd  %xmm11,%xmm2
movsd  0x97c(%rip),%xmm9
addsd  %xmm9,%xmm2
xorpd  %xmm4,%xmm1
movsd  0x93b(%rip),%xmm3
addsd  %xmm2,%xmm3
unpcklpd %xmm3,%xmm1
movapd %xmm13,%xmm3
shufpd $0x1,%xmm4,%xmm3
divpd  %xmm3,%xmm1
movapd %xmm13,%xmm5
unpckhpd %xmm13,%xmm5
movapd %xmm1,%xmm3
divsd  %xmm5,%xmm3
unpckhpd %xmm1,%xmm1
subsd  %xmm1,%xmm3
movapd 0x60(%rsp),%xmm1
divsd  %xmm1,%xmm12
mulsd  %xmm1,%xmm10
mulsd  %xmm8,%xmm10
mulsd  %xmm8,%xmm6
addsd  %xmm4,%xmm10
mulpd  %xmm14,%xmm14
unpckhpd %xmm14,%xmm14
divsd  %xmm11,%xmm6
addsd  0x8dd(%rip),%xmm6
divsd  %xmm4,%xmm14
mulsd  %xmm14,%xmm6
addsd  %xmm10,%xmm6
divsd  %xmm11,%xmm0
addsd  %xmm9,%xmm0
movsd  0x118(%rsp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  0xd0(%rsp),%xmm6
subsd  %xmm0,%xmm6
mulsd  0xc8(%rsp),%xmm12
addsd  %xmm6,%xmm12
unpcklpd %xmm12,%xmm7
unpcklpd %xmm2,%xmm3
movsd  0x88a(%rip),%xmm0
movapd %xmm0,%xmm1
divsd  %xmm13,%xmm1
movapd %xmm7,%xmm2
unpckhpd %xmm7,%xmm2
xorpd  0x8a9(%rip),%xmm2
movapd %xmm3,%xmm4
unpckhpd %xmm3,%xmm4
mulsd  %xmm1,%xmm4
mulsd  %xmm2,%xmm1
movapd %xmm3,%xmm5
subsd  %xmm4,%xmm5
unpcklpd %xmm7,%xmm7
unpcklpd %xmm2,%xmm1
mulpd  %xmm3,%xmm7
addpd  %xmm1,%xmm7
subsd  %xmm3,%xmm4
unpcklpd %xmm4,%xmm5
divpd  %xmm5,%xmm7
movupd %xmm7,0x8(%r14)
movapd %xmm0,%xmm1
movapd 0xb0(%rsp),%xmm2
divsd  %xmm2,%xmm1
divsd  %xmm2,%xmm1
unpckhpd %xmm7,%xmm7
mulsd  %xmm7,%xmm1
movsd  %xmm1,(%r14)
movapd 0x90(%rsp),%xmm1
divsd  %xmm1,%xmm0
divsd  %xmm1,%xmm0
mulsd  %xmm7,%xmm0
movsd  %xmm0,0x18(%r14)
add    $0xe8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @linear_GRP_solver_LAG(double* %0, double* %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10, double %11, double %12, double %13, double %14, double %15) {
%17 = alloca double*
%18 = alloca double*
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca [2 x i32]
%35 = alloca double
%36 = alloca double
%37 = alloca double
%38 = alloca double
%39 = alloca double
%40 = alloca double
%41 = alloca double
%42 = alloca double
%43 = alloca double
%44 = alloca double
%45 = alloca double
%46 = alloca double
%47 = alloca double
%48 = alloca double
%49 = alloca double
%50 = alloca double
%51 = alloca double
%52 = alloca double
%53 = alloca double
%54 = alloca double
%55 = alloca double
%56 = alloca double
%57 = alloca double
%58 = alloca double
%59 = alloca double
store double* %0, double** %17
store double* %1, double** %18
store double %2, double* %19
store double %3, double* %20
store double %4, double* %21
store double %5, double* %22
store double %6, double* %23
store double %7, double* %24
store double %8, double* %25
store double %9, double* %26
store double %10, double* %27
store double %11, double* %28
store double %12, double* %29
store double %13, double* %30
store double %14, double* %31
store double %15, double* %32
%60 = load double, double* %31
%61 = fsub double %60, 1.000000e+00
%62 = load double, double* %31
%63 = fadd double %62, 1.000000e+00
%64 = fdiv double %61, %63
store double %64, double* %59
%65 = load double, double* %31
%66 = load double, double* %27
%67 = fmul double %65, %66
%68 = load double, double* %19
%69 = fdiv double %67, %68
%70 = call double @sqrt(double %69)
store double %70, double* %35
%71 = load double, double* %31
%72 = load double, double* %28
%73 = fmul double %71, %72
%74 = load double, double* %20
%75 = fdiv double %73, %74
%76 = call double @sqrt(double %75)
store double %76, double* %36
%77 = load double, double* %19
%78 = load double, double* %35
%79 = fmul double %77, %78
store double %79, double* %37
%80 = load double, double* %20
%81 = load double, double* %36
%82 = fmul double %80, %81
store double %82, double* %38
%83 = load double, double* %31
%84 = load double, double* %23
%85 = load double, double* %24
%86 = load double, double* %27
%87 = load double, double* %28
%88 = load double, double* %35
%89 = load double, double* %36
%90 = getelementptr inbounds [2 x i32], [2 x i32]* %34, i64 0, i64 0
%91 = load double, double* %32
%92 = call i32 @Riemann_solver_exact(double* %40, double* %41, double %83, double %84, double %85, double %86, double %87, double %88, double %89, i32* %90, double %91, i32 500)
%93 = load double, double* %41
%94 = load double, double* %27
%95 = fcmp ogt double %93, %94
br i1 %95, label %96, label %108
96: ; preds = %16
%97 = load double, double* %19
%98 = load double, double* %41
%99 = load double, double* %59
%100 = load double, double* %27
%101 = call double @llvm.fmuladd.f64(double %99, double %100, double %98)
%102 = fmul double %97, %101
%103 = load double, double* %27
%104 = load double, double* %59
%105 = load double, double* %41
%106 = call double @llvm.fmuladd.f64(double %104, double %105, double %103)
%107 = fdiv double %102, %106
store double %107, double* %42
br label %117
108: ; preds = %16
%109 = load double, double* %19
%110 = load double, double* %41
%111 = load double, double* %27
%112 = fdiv double %110, %111
%113 = load double, double* %31
%114 = fdiv double 1.000000e+00, %113
%115 = call double @pow(double %112, double %114)
%116 = fmul double %109, %115
store double %116, double* %42
br label %117
117: ; preds = %108, %96
%118 = load double, double* %41
%119 = load double, double* %28
%120 = fcmp ogt double %118, %119
br i1 %120, label %121, label %133
121: ; preds = %117
%122 = load double, double* %20
%123 = load double, double* %41
%124 = load double, double* %59
%125 = load double, double* %28
%126 = call double @llvm.fmuladd.f64(double %124, double %125, double %123)
%127 = fmul double %122, %126
%128 = load double, double* %28
%129 = load double, double* %59
%130 = load double, double* %41
%131 = call double @llvm.fmuladd.f64(double %129, double %130, double %128)
%132 = fdiv double %127, %131
store double %132, double* %43
br label %142
133: ; preds = %117
%134 = load double, double* %20
%135 = load double, double* %41
%136 = load double, double* %28
%137 = fdiv double %135, %136
%138 = load double, double* %31
%139 = fdiv double 1.000000e+00, %138
%140 = call double @pow(double %137, double %139)
%141 = fmul double %134, %140
store double %141, double* %43
br label %142
142: ; preds = %133, %121
%143 = load double, double* %40
%144 = load double*, double** %18
%145 = getelementptr inbounds double, double* %144, i64 1
store double %143, double* %145
%146 = load double, double* %41
%147 = load double*, double** %18
%148 = getelementptr inbounds double, double* %147, i64 2
store double %146, double* %148
%149 = load double, double* %42
%150 = load double*, double** %18
%151 = getelementptr inbounds double, double* %150, i64 0
store double %149, double* %151
%152 = load double, double* %43
%153 = load double*, double** %18
%154 = getelementptr inbounds double, double* %153, i64 3
store double %152, double* %154
%155 = load double, double* %31
%156 = load double, double* %41
%157 = fmul double %155, %156
%158 = load double, double* %42
%159 = fdiv double %157, %158
%160 = call double @sqrt(double %159)
store double %160, double* %44
%161 = load double, double* %31
%162 = load double, double* %41
%163 = fmul double %161, %162
%164 = load double, double* %43
%165 = fdiv double %163, %164
%166 = call double @sqrt(double %165)
store double %166, double* %45
%167 = load double, double* %43
%168 = load double, double* %45
%169 = fmul double %167, %168
store double %169, double* %47
%170 = load double, double* %42
%171 = load double, double* %44
%172 = fmul double %170, %171
store double %172, double* %46
%173 = load double, double* %46
%174 = load double, double* %37
%175 = fdiv double %173, %174
store double %175, double* %48
%176 = load double, double* %23
%177 = load double, double* %24
%178 = fsub double %176, %177
%179 = load double, double* %23
%180 = load double, double* %24
%181 = fsub double %179, %180
%182 = load double, double* %27
%183 = load double, double* %28
%184 = fsub double %182, %183
%185 = load double, double* %27
%186 = load double, double* %28
%187 = fsub double %185, %186
%188 = fmul double %184, %187
%189 = call double @llvm.fmuladd.f64(double %178, double %181, double %188)
%190 = call double @sqrt(double %189)
store double %190, double* %33
%191 = load double, double* %33
%192 = load double, double* %32
%193 = fmul double %192, 1.000000e+03
%194 = fcmp olt double %191, %193
br i1 %194, label %195, label %219
195: ; preds = %142
store double 1.000000e+00, double* %49
%196 = load double, double* %46
%197 = fdiv double 1.000000e+00, %196
store double %197, double* %50
%198 = load double, double* %46
%199 = fdiv double -1.000000e+00, %198
%200 = load double, double* %37
%201 = fmul double %199, %200
%202 = load double, double* %37
%203 = load double, double* %25
%204 = load double, double* %29
%205 = call double @llvm.fmuladd.f64(double %202, double %203, double %204)
%206 = fmul double %201, %205
store double %206, double* %51
store double -1.000000e+00, double* %52
%207 = load double, double* %47
%208 = fdiv double 1.000000e+00, %207
store double %208, double* %53
%209 = load double, double* %47
%210 = fdiv double -1.000000e+00, %209
%211 = load double, double* %38
%212 = fmul double %210, %211
%213 = load double, double* %38
%214 = load double, double* %26
%215 = load double, double* %30
%216 = fneg double %215
%217 = call double @llvm.fmuladd.f64(double %213, double %214, double %216)
%218 = fmul double %212, %217
store double %218, double* %54
br label %340
219: ; preds = %142
store double 1.000000e+00, double* %49
%220 = load double, double* %46
%221 = fdiv double 1.000000e+00, %220
store double %221, double* %50
%222 = load double, double* %25
%223 = load double, double* %29
%224 = load double, double* %37
%225 = fdiv double %223, %224
%226 = fadd double %222, %225
%227 = load double, double* %37
%228 = fdiv double 1.000000e+00, %227
%229 = load double, double* %31
%230 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %229, double -1.000000e+00)
%231 = fdiv double %228, %230
%232 = load double, double* %35
%233 = load double, double* %35
%234 = fmul double %232, %233
%235 = load double, double* %21
%236 = load double, double* %29
%237 = fneg double %236
%238 = call double @llvm.fmuladd.f64(double %234, double %235, double %237)
%239 = fmul double %231, %238
%240 = load double, double* %48
%241 = load double, double* %31
%242 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %241, double -1.000000e+00)
%243 = fdiv double %242, 2.000000e+00
%244 = load double, double* %31
%245 = fadd double %244, 1.000000e+00
%246 = fdiv double %243, %245
%247 = call double @pow(double %240, double %246)
%248 = fsub double %247, 1.000000e+00
%249 = call double @llvm.fmuladd.f64(double %239, double %248, double %226)
store double %249, double* %51
%250 = load double, double* %37
%251 = load double, double* %46
%252 = fmul double %250, %251
%253 = call double @sqrt(double %252)
%254 = fmul double -1.000000e+00, %253
%255 = load double, double* %51
%256 = fmul double %254, %255
store double %256, double* %51
%257 = load double, double* %41
%258 = load double, double* %28
%259 = fsub double %257, %258
%260 = load double, double* %40
%261 = load double, double* %24
%262 = fsub double %260, %261
%263 = fdiv double %259, %262
store double %263, double* %58
%264 = load double, double* %41
%265 = load double, double* %28
%266 = fsub double %264, %265
%267 = fmul double 5.000000e-01, %266
%268 = load double, double* %41
%269 = load double, double* %59
%270 = load double, double* %28
%271 = call double @llvm.fmuladd.f64(double %269, double %270, double %268)
%272 = fdiv double %267, %271
%273 = fsub double 2.000000e+00, %272
store double %273, double* %52
%274 = load double, double* %58
%275 = fmul double -1.000000e+00, %274
%276 = load double, double* %47
%277 = fdiv double %275, %276
%278 = load double, double* %47
%279 = fdiv double %277, %278
%280 = load double, double* %52
%281 = fsub double %280, 1.000000e+00
%282 = load double, double* %58
%283 = fdiv double %281, %282
%284 = fsub double %279, %283
store double %284, double* %53
%285 = load double, double* %41
%286 = load double, double* %28
%287 = fsub double %285, %286
%288 = fmul double -1.000000e+00, %287
%289 = fdiv double %288, 2.000000e+00
%290 = load double, double* %20
%291 = fdiv double %289, %290
store double %291, double* %55
%292 = load double, double* %58
%293 = load double, double* %20
%294 = load double, double* %40
%295 = load double, double* %24
%296 = fsub double %294, %295
%297 = fmul double %293, %296
%298 = fdiv double %297, 2.000000e+00
%299 = fadd double %292, %298
%300 = load double, double* %38
%301 = load double, double* %38
%302 = fmul double %300, %301
%303 = load double, double* %58
%304 = fdiv double %302, %303
%305 = load double, double* %59
%306 = load double, double* %41
%307 = load double, double* %28
%308 = fsub double %306, %307
%309 = fmul double %305, %308
%310 = fdiv double %309, 2.000000e+00
%311 = load double, double* %41
%312 = load double, double* %59
%313 = load double, double* %28
%314 = call double @llvm.fmuladd.f64(double %312, double %313, double %311)
%315 = fdiv double %310, %314
%316 = fadd double 1.000000e+00, %315
%317 = call double @llvm.fmuladd.f64(double %304, double %316, double %299)
store double %317, double* %56
%318 = load double, double* %59
%319 = fdiv double %318, 2.000000e+00
%320 = load double, double* %41
%321 = load double, double* %28
%322 = fsub double %320, %321
%323 = fmul double %319, %322
%324 = load double, double* %41
%325 = load double, double* %59
%326 = load double, double* %28
%327 = call double @llvm.fmuladd.f64(double %325, double %326, double %324)
%328 = fdiv double %323, %327
%329 = fadd double 2.000000e+00, %328
%330 = fmul double -1.000000e+00, %329
store double %330, double* %57
%331 = load double, double* %56
%332 = load double, double* %26
%333 = load double, double* %57
%334 = load double, double* %30
%335 = fmul double %333, %334
%336 = call double @llvm.fmuladd.f64(double %331, double %332, double %335)
%337 = load double, double* %55
%338 = load double, double* %22
%339 = call double @llvm.fmuladd.f64(double %337, double %338, double %336)
store double %339, double* %54
br label %340
340: ; preds = %219, %195
%341 = load double, double* %51
%342 = load double, double* %53
%343 = load double, double* %54
%344 = load double, double* %50
%345 = fmul double %343, %344
%346 = fneg double %345
%347 = call double @llvm.fmuladd.f64(double %341, double %342, double %346)
%348 = load double, double* %49
%349 = load double, double* %53
%350 = load double, double* %52
%351 = load double, double* %50
%352 = fmul double %350, %351
%353 = fneg double %352
%354 = call double @llvm.fmuladd.f64(double %348, double %349, double %353)
%355 = fdiv double %347, %354
%356 = load double*, double** %17
%357 = getelementptr inbounds double, double* %356, i64 1
store double %355, double* %357
%358 = load double, double* %51
%359 = load double, double* %52
%360 = load double, double* %54
%361 = load double, double* %49
%362 = fmul double %360, %361
%363 = fneg double %362
%364 = call double @llvm.fmuladd.f64(double %358, double %359, double %363)
%365 = load double, double* %50
%366 = load double, double* %52
%367 = load double, double* %53
%368 = load double, double* %49
%369 = fmul double %367, %368
%370 = fneg double %369
%371 = call double @llvm.fmuladd.f64(double %365, double %366, double %370)
%372 = fdiv double %364, %371
%373 = load double*, double** %17
%374 = getelementptr inbounds double, double* %373, i64 2
store double %372, double* %374
%375 = load double, double* %44
%376 = fdiv double 1.000000e+00, %375
%377 = load double, double* %44
%378 = fdiv double %376, %377
%379 = load double*, double** %17
%380 = getelementptr inbounds double, double* %379, i64 2
%381 = load double, double* %380
%382 = fmul double %378, %381
%383 = load double*, double** %17
%384 = getelementptr inbounds double, double* %383, i64 0
store double %382, double* %384
%385 = load double, double* %45
%386 = fdiv double 1.000000e+00, %385
%387 = load double, double* %45
%388 = fdiv double %386, %387
%389 = load double*, double** %17
%390 = getelementptr inbounds double, double* %389, i64 2
%391 = load double, double* %390
%392 = fmul double %388, %391
%393 = load double*, double** %17
%394 = getelementptr inbounds double, double* %393, i64 3
store double %392, double* %394
ret void
}

LLVM IR (-O2):
define void @linear_GRP_solver_LAG(double* nocapture %0, double* nocapture writeonly %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10, double %11, double %12, double %13, double %14, double %15) {
%17 = alloca [2 x i32]
%18 = alloca double
%19 = alloca double
%20 = bitcast [2 x i32]* %17 to i8*
%21 = bitcast double* %18 to i8*
%22 = bitcast double* %19 to i8*
%23 = fadd double %14, -1.000000e+00
%24 = fadd double %14, 1.000000e+00
%25 = fdiv double %23, %24
%26 = fmul double %10, %14
%27 = fdiv double %26, %2
%28 = tail call double @sqrt(double %27)
%29 = fmul double %11, %14
%30 = fdiv double %29, %3
%31 = tail call double @sqrt(double %30)
%32 = insertelement <2 x double> poison, double %28, i64 0
%33 = insertelement <2 x double> %32, double %31, i64 1
%34 = insertelement <2 x double> poison, double %2, i64 0
%35 = insertelement <2 x double> %34, double %3, i64 1
%36 = fmul <2 x double> %33, %35
%37 = getelementptr inbounds [2 x i32], [2 x i32]* %17, i64 0, i64 0
%38 = call i32 @Riemann_solver_exact(double* %18, double* %19, double %14, double %6, double %7, double %10, double %11, double %28, double %31, i32* %37, double %15, i32 500)
%39 = load double, double* %19
%40 = fcmp ogt double %39, %10
br i1 %40, label %41, label %46
41: ; preds = %16
%42 = call double @llvm.fmuladd.f64(double %25, double %10, double %39)
%43 = fmul double %42, %2
%44 = call double @llvm.fmuladd.f64(double %25, double %39, double %10)
%45 = fdiv double %43, %44
br label %52
46: ; preds = %16
%47 = fdiv double %39, %10
%48 = fdiv double 1.000000e+00, %14
%49 = call double @pow(double %47, double %48)
%50 = fmul double %49, %2
%51 = load double, double* %19
br label %52
52: ; preds = %46, %41
%53 = phi double [ %39, %41 ], [ %51, %46 ]
%54 = phi double [ %45, %41 ], [ %50, %46 ]
%55 = fcmp ogt double %53, %11
br i1 %55, label %56, label %61
56: ; preds = %52
%57 = call double @llvm.fmuladd.f64(double %25, double %11, double %53)
%58 = fmul double %57, %3
%59 = call double @llvm.fmuladd.f64(double %25, double %53, double %11)
%60 = fdiv double %58, %59
br label %67
61: ; preds = %52
%62 = fdiv double %53, %11
%63 = fdiv double 1.000000e+00, %14
%64 = call double @pow(double %62, double %63)
%65 = fmul double %64, %3
%66 = load double, double* %19
br label %67
67: ; preds = %61, %56
%68 = phi double [ %53, %56 ], [ %66, %61 ]
%69 = phi double [ %60, %56 ], [ %65, %61 ]
%70 = load double, double* %18
%71 = getelementptr inbounds double, double* %1, i64 1
store double %70, double* %71
%72 = getelementptr inbounds double, double* %1, i64 2
store double %68, double* %72
store double %54, double* %1
%73 = getelementptr inbounds double, double* %1, i64 3
store double %69, double* %73
%74 = fmul double %68, %14
%75 = fdiv double %74, %54
%76 = call double @sqrt(double %75)
%77 = load double, double* %19
%78 = fmul double %77, %14
%79 = fdiv double %78, %69
%80 = call double @sqrt(double %79)
%81 = insertelement <2 x double> poison, double %54, i64 0
%82 = insertelement <2 x double> %81, double %69, i64 1
%83 = insertelement <2 x double> poison, double %76, i64 0
%84 = insertelement <2 x double> %83, double %80, i64 1
%85 = fmul <2 x double> %82, %84
%86 = fsub double %6, %7
%87 = fsub double %10, %11
%88 = fmul double %87, %87
%89 = call double @llvm.fmuladd.f64(double %86, double %86, double %88)
%90 = call double @sqrt(double %89)
%91 = fmul double %15, 1.000000e+03
%92 = fcmp olt double %90, %91
br i1 %92, label %93, label %106
93: ; preds = %67
%94 = extractelement <2 x double> %85, i64 1
%95 = fdiv double 1.000000e+00, %94
%96 = fdiv <2 x double> <double -1.000000e+00, double -1.000000e+00>, %85
%97 = fmul <2 x double> %36, %96
%98 = fneg double %13
%99 = insertelement <2 x double> poison, double %8, i64 0
%100 = insertelement <2 x double> %99, double %9, i64 1
%101 = insertelement <2 x double> poison, double %12, i64 0
%102 = insertelement <2 x double> %101, double %98, i64 1
%103 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %36, <2 x double> %100, <2 x double> %102)
%104 = fmul <2 x double> %103, %97
%105 = insertelement <2 x double> <double poison, double -1.000000e+00>, double %95, i64 0
br label %175
106: ; preds = %67
%107 = extractelement <2 x double> %36, i64 0
%108 = extractelement <2 x double> %85, i64 0
%109 = fdiv double %108, %107
%110 = fdiv double %12, %107
%111 = fadd double %110, %8
%112 = fdiv double 1.000000e+00, %107
%113 = call double @llvm.fmuladd.f64(double %14, double 3.000000e+00, double -1.000000e+00)
%114 = fdiv double %112, %113
%115 = fmul double %28, %28
%116 = fneg double %12
%117 = call double @llvm.fmuladd.f64(double %115, double %4, double %116)
%118 = fmul double %117, %114
%119 = fmul double %113, 5.000000e-01
%120 = fdiv double %119, %24
%121 = call double @pow(double %109, double %120)
%122 = fadd double %121, -1.000000e+00
%123 = call double @llvm.fmuladd.f64(double %118, double %122, double %111)
%124 = fmul <2 x double> %36, %85
%125 = extractelement <2 x double> %124, i64 0
%126 = call double @sqrt(double %125)
%127 = fneg double %126
%128 = fmul double %123, %127
%129 = load double, double* %19
%130 = fsub double %129, %11
%131 = load double, double* %18
%132 = fsub double %131, %7
%133 = fdiv double %130, %132
%134 = fmul double %130, 5.000000e-01
%135 = call double @llvm.fmuladd.f64(double %25, double %11, double %129)
%136 = fdiv double %134, %135
%137 = fsub double 2.000000e+00, %136
%138 = fneg double %133
%139 = extractelement <2 x double> %85, i64 1
%140 = fadd double %137, -1.000000e+00
%141 = insertelement <2 x double> poison, double %138, i64 0
%142 = insertelement <2 x double> %141, double %140, i64 1
%143 = insertelement <2 x double> poison, double %139, i64 0
%144 = insertelement <2 x double> %143, double %133, i64 1
%145 = fdiv <2 x double> %142, %144
%146 = extractelement <2 x double> %145, i64 0
%147 = fdiv double %146, %139
%148 = extractelement <2 x double> %145, i64 1
%149 = fsub double %147, %148
%150 = fmul double %130, -5.000000e-01
%151 = fdiv double %150, %3
%152 = fmul double %132, %3
%153 = fmul double %152, 5.000000e-01
%154 = fadd double %133, %153
%155 = fmul <2 x double> %36, %36
%156 = extractelement <2 x double> %155, i64 1
%157 = fdiv double %156, %133
%158 = fmul double %25, %130
%159 = fmul double %158, 5.000000e-01
%160 = fdiv double %159, %135
%161 = fadd double %160, 1.000000e+00
%162 = call double @llvm.fmuladd.f64(double %157, double %161, double %154)
%163 = fmul double %25, 5.000000e-01
%164 = fmul double %163, %130
%165 = fdiv double %164, %135
%166 = fadd double %165, 2.000000e+00
%167 = fneg double %166
%168 = fmul double %167, %13
%169 = call double @llvm.fmuladd.f64(double %162, double %9, double %168)
%170 = call double @llvm.fmuladd.f64(double %151, double %5, double %169)
%171 = insertelement <2 x double> poison, double %149, i64 0
%172 = insertelement <2 x double> %171, double %137, i64 1
%173 = insertelement <2 x double> poison, double %128, i64 0
%174 = insertelement <2 x double> %173, double %170, i64 1
br label %175
175: ; preds = %106, %93
%176 = phi <2 x double> [ %105, %93 ], [ %172, %106 ]
%177 = phi <2 x double> [ %104, %93 ], [ %174, %106 ]
%178 = extractelement <2 x double> %85, i64 0
%179 = fdiv double 1.000000e+00, %178
%180 = extractelement <2 x double> %177, i64 1
%181 = fneg double %180
%182 = fmul double %179, %181
%183 = extractelement <2 x double> %176, i64 1
%184 = fmul double %179, %183
%185 = extractelement <2 x double> %176, i64 0
%186 = fsub double %185, %184
%187 = getelementptr inbounds double, double* %0, i64 1
%188 = shufflevector <2 x double> %177, <2 x double> undef, <2 x i32> zeroinitializer
%189 = insertelement <2 x double> poison, double %182, i64 0
%190 = insertelement <2 x double> %189, double %181, i64 1
%191 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %188, <2 x double> %176, <2 x double> %190)
%192 = fneg double %185
%193 = call double @llvm.fmuladd.f64(double %179, double %183, double %192)
%194 = insertelement <2 x double> poison, double %186, i64 0
%195 = insertelement <2 x double> %194, double %193, i64 1
%196 = fdiv <2 x double> %191, %195
%197 = bitcast double* %187 to <2 x double>*
store <2 x double> %196, <2 x double>* %197
%198 = fdiv double 1.000000e+00, %76
%199 = fdiv double %198, %76
%200 = extractelement <2 x double> %196, i64 1
%201 = fmul double %199, %200
store double %201, double* %0
%202 = fdiv double 1.000000e+00, %80
%203 = fdiv double %202, %80
%204 = fmul double %203, %200
%205 = getelementptr inbounds double, double* %0, i64 3
store double %204, double* %205
ret void
}