user: 下面的汇编指令对应的C源代码是什么:

```asm
<Riemann_solver_exact>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %rdi,%r13
  mov    %rsi,%r14
  movapd %xmm0,%xmm8
  movsd  %xmm0,0x18(%rsp)
  movq   %xmm1,%r15
  movsd  %xmm2,0x50(%rsp)
  movsd  %xmm3,(%rsp)
  movsd  %xmm4,0x8(%rsp)
  movsd  %xmm5,0x30(%rsp)
  movsd  %xmm6,0x38(%rsp)
  mov    %rdx,%rbx
  movsd  %xmm7,0x68(%rsp)
  mov    %ecx,%r12d
  movsd  D69(%rip),%xmm0
  movapd %xmm8,%xmm2
  subsd  %xmm0,%xmm2
  movsd  %xmm2,0x60(%rsp)
  movapd %xmm8,%xmm1
  addsd  %xmm8,%xmm1
  divsd  %xmm1,%xmm2
  movsd  %xmm2,0x58(%rsp)
  addsd  %xmm8,%xmm0
  movapd %xmm0,%xmm5
  divsd  %xmm1,%xmm5
  movsd  %xmm5,0x10(%rsp)
  comisd %xmm3,%xmm4
  jbe    L161
  subsd  %xmm3,%xmm4
  movsd  %xmm4,0x20(%rsp)
  mulsd  %xmm4,%xmm5
  movapd %xmm5,%xmm0
  divsd  %xmm3,%xmm0
  addsd  D69(%rip),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L39
  sqrtsd %xmm0,%xmm0
L188:
  movsd  0x20(%rsp),%xmm1
  mulsd  0x30(%rsp),%xmm1
  divsd  0x18(%rsp),%xmm1
  divsd  (%rsp),%xmm1
  divsd  %xmm0,%xmm1
  movq   %r15,%xmm6
  subsd  %xmm1,%xmm6
  movq   %xmm6,%rbp
L49:
  movsd  (%rsp),%xmm7
  movsd  0x8(%rsp),%xmm3
  comisd %xmm3,%xmm7
  jbe    L351
  subsd  %xmm3,%xmm7
  movsd  %xmm7,0x20(%rsp)
  movsd  0x10(%rsp),%xmm0
  mulsd  %xmm7,%xmm0
  divsd  %xmm3,%xmm0
  addsd  D69(%rip),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L199
  movapd %xmm0,%xmm1
  sqrtsd %xmm1,%xmm1
L85:
  movsd  0x20(%rsp),%xmm0
  mulsd  0x38(%rsp),%xmm0
  divsd  0x18(%rsp),%xmm0
  divsd  0x8(%rsp),%xmm0
  divsd  %xmm1,%xmm0
  addsd  0x50(%rsp),%xmm0
L34:
  movsd  0x50(%rsp),%xmm3
  movapd %xmm3,%xmm1
  movsd  0x68(%rsp),%xmm6
  addsd  %xmm6,%xmm1
  movq   %rbp,%xmm2
  comisd %xmm1,%xmm2
  setbe  %al
  movzbl %al,%eax
  mov    %eax,0x4(%rbx)
  movq   %r15,%xmm4
  movq   %r15,%xmm1
  subsd  %xmm6,%xmm1
  comisd %xmm1,%xmm0
  seta   %al
  movzbl %al,%eax
  mov    %eax,(%rbx)
  movsd  0x30(%rsp),%xmm0
  xorpd  D257(%rip),%xmm0
  movsd  (%rsp),%xmm5
  divsd  %xmm5,%xmm0
  movapd %xmm0,%xmm6
  movsd  0x18(%rsp),%xmm1
  divsd  %xmm1,%xmm6
  movsd  %xmm6,0x40(%rsp)
  movsd  0x38(%rsp),%xmm0
  movsd  0x8(%rsp),%xmm7
  divsd  %xmm7,%xmm0
  movapd %xmm0,%xmm2
  divsd  %xmm1,%xmm2
  movsd  %xmm2,0x48(%rsp)
  movapd %xmm5,%xmm0
  mulsd  %xmm6,%xmm0
  movapd %xmm7,%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  subsd  %xmm4,%xmm0
  addsd  %xmm3,%xmm0
  subsd  %xmm2,%xmm6
  divsd  %xmm6,%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm0,%xmm1
  ja     L4
L129:
  mulsd  D71(%rip),%xmm0
  movq   %xmm0,%rbx
  movsd  (%rsp),%xmm7
  comisd %xmm7,%xmm0
  jbe    L29
  movapd %xmm0,%xmm3
  subsd  %xmm7,%xmm3
  movsd  %xmm3,0x20(%rsp)
  movsd  0x10(%rsp),%xmm0
  mulsd  %xmm3,%xmm0
  divsd  %xmm7,%xmm0
  addsd  D69(%rip),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L45
  sqrtsd %xmm0,%xmm0
L350:
  movsd  0x20(%rsp),%xmm1
  mulsd  0x30(%rsp),%xmm1
  divsd  0x18(%rsp),%xmm1
  divsd  (%rsp),%xmm1
  divsd  %xmm0,%xmm1
  movq   %r15,%xmm7
  subsd  %xmm1,%xmm7
  movsd  %xmm7,0x20(%rsp)
L268:
  movq   %rbx,%xmm2
  movsd  0x8(%rsp),%xmm6
  comisd %xmm6,%xmm2
  jbe    L372
  movq   %rbx,%xmm4
  subsd  %xmm6,%xmm4
  movsd  %xmm4,0x28(%rsp)
  movsd  0x10(%rsp),%xmm0
  mulsd  %xmm4,%xmm0
  divsd  %xmm6,%xmm0
  addsd  D69(%rip),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L36
  sqrtsd %xmm0,%xmm0
L246:
  movsd  0x28(%rsp),%xmm1
  mulsd  0x38(%rsp),%xmm1
  divsd  0x18(%rsp),%xmm1
  divsd  0x8(%rsp),%xmm1
  divsd  %xmm0,%xmm1
  addsd  0x50(%rsp),%xmm1
  movsd  %xmm1,0x28(%rsp)
L134:
  movsd  0x20(%rsp),%xmm0
  subsd  0x28(%rsp),%xmm0
  andpd  D44(%rip),%xmm0
  test   %r12d,%r12d
  je     L37
  comisd 0x68(%rsp),%xmm0
  jbe    L37
  mov    $0x0,%ebp
  jmp    L185
L39:
  call   <sqrt@plt>
  jmp    L188
L161:
  movsd  0x58(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm0
  divsd  (%rsp),%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm1
  subsd  D69(%rip),%xmm1
  movsd  0x30(%rsp),%xmm5
  movapd %xmm5,%xmm0
  addsd  %xmm5,%xmm0
  mulsd  %xmm1,%xmm0
  divsd  0x60(%rsp),%xmm0
  movq   %r15,%xmm2
  subsd  %xmm0,%xmm2
  movq   %xmm2,%rbp
  jmp    L49
L199:
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  jmp    L85
L351:
  movsd  0x58(%rsp),%xmm1
  movsd  (%rsp),%xmm0
  divsd  0x8(%rsp),%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm1
  subsd  D69(%rip),%xmm1
  movsd  0x38(%rsp),%xmm2
  movapd %xmm2,%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  divsd  0x60(%rsp),%xmm0
  addsd  0x50(%rsp),%xmm0
  jmp    L34
L4:
  minsd  %xmm7,%xmm5
  movapd %xmm5,%xmm0
  jmp    L129
L45:
  call   <sqrt@plt>
  jmp    L350
L29:
  movsd  0x58(%rsp),%xmm1
  divsd  (%rsp),%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm1
  subsd  D69(%rip),%xmm1
  movsd  0x30(%rsp),%xmm7
  movapd %xmm7,%xmm0
  addsd  %xmm7,%xmm0
  mulsd  %xmm1,%xmm0
  divsd  0x60(%rsp),%xmm0
  movq   %r15,%xmm5
  subsd  %xmm0,%xmm5
  movsd  %xmm5,0x20(%rsp)
  jmp    L268
L36:
  call   <sqrt@plt>
  jmp    L246
L372:
  movsd  0x58(%rsp),%xmm1
  movq   %rbx,%xmm3
  divsd  0x8(%rsp),%xmm3
  movq   %xmm3,%rbp
  movapd %xmm3,%xmm0
  call   <pow@plt>
  movsd  0x58(%rsp),%xmm1
  movq   %rbp,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm1
  subsd  D69(%rip),%xmm1
  movsd  0x38(%rsp),%xmm5
  movapd %xmm5,%xmm0
  addsd  %xmm5,%xmm0
  mulsd  %xmm1,%xmm0
  divsd  0x60(%rsp),%xmm0
  addsd  0x50(%rsp),%xmm0
  movsd  %xmm0,0x28(%rsp)
  jmp    L134
L384:
  call   <sqrt@plt>
  jmp    L64
L149:
  movsd  0x10(%rsp),%xmm1
  movq   %rbx,%xmm0
  divsd  (%rsp),%xmm0
  call   <pow@plt>
  movsd  D69(%rip),%xmm1
  divsd  %xmm0,%xmm1
  xorpd  D257(%rip),%xmm1
  movsd  0x30(%rsp),%xmm0
  divsd  0x18(%rsp),%xmm0
  divsd  (%rsp),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x40(%rsp)
  jmp    L219
L239:
  call   <sqrt@plt>
  jmp    L101
L59:
  movsd  0x10(%rsp),%xmm1
  movq   %rbx,%xmm0
  divsd  0x8(%rsp),%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm2
  movsd  0x38(%rsp),%xmm1
  divsd  0x18(%rsp),%xmm1
  divsd  0x8(%rsp),%xmm1
  movsd  D69(%rip),%xmm0
  divsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x48(%rsp)
  jmp    L358
L244:
  mulsd  D71(%rip),%xmm5
  movq   %xmm5,%rbx
  jmp    L398
L404:
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  jmp    L194
L387:
  movsd  0x58(%rsp),%xmm1
  movq   %rbx,%xmm0
  divsd  (%rsp),%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm1
  subsd  D69(%rip),%xmm1
  movsd  0x30(%rsp),%xmm2
  movapd %xmm2,%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  divsd  0x60(%rsp),%xmm0
  movq   %r15,%xmm7
  subsd  %xmm0,%xmm7
  movsd  %xmm7,0x20(%rsp)
  jmp    L283
L187:
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
L130:
  movsd  0x28(%rsp),%xmm0
  mulsd  0x38(%rsp),%xmm0
  divsd  0x18(%rsp),%xmm0
  divsd  0x8(%rsp),%xmm0
  divsd  %xmm1,%xmm0
  addsd  0x50(%rsp),%xmm0
  movsd  %xmm0,0x28(%rsp)
L27:
  movsd  0x20(%rsp),%xmm0
  subsd  0x28(%rsp),%xmm0
  andpd  D44(%rip),%xmm0
  cmp    %ebp,%r12d
  je     L37
  comisd 0x68(%rsp),%xmm0
  jbe    L37
L185:
  movq   %rbx,%xmm2
  movsd  (%rsp),%xmm3
  comisd %xmm3,%xmm2
  jbe    L149
  movq   %rbx,%xmm7
  subsd  %xmm3,%xmm7
  movsd  %xmm7,0x40(%rsp)
  movsd  0x10(%rsp),%xmm0
  mulsd  %xmm7,%xmm0
  divsd  %xmm3,%xmm0
  addsd  D69(%rip),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L384
  sqrtsd %xmm0,%xmm0
L64:
  movsd  D69(%rip),%xmm1
  movapd %xmm1,%xmm7
  divsd  %xmm0,%xmm7
  movsd  0x30(%rsp),%xmm0
  divsd  0x18(%rsp),%xmm0
  divsd  (%rsp),%xmm0
  movsd  %xmm0,0x70(%rsp)
  movsd  D201(%rip),%xmm1
  movsd  %xmm7,0x48(%rsp)
  movapd %xmm7,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm1
  movsd  0x70(%rsp),%xmm2
  movapd %xmm2,%xmm3
  mulsd  D71(%rip),%xmm3
  movapd %xmm3,%xmm0
  mulsd  0x10(%rsp),%xmm0
  divsd  (%rsp),%xmm0
  mulsd  0x40(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  0x48(%rsp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0x40(%rsp)
L219:
  movq   %rbx,%xmm2
  movsd  0x8(%rsp),%xmm4
  comisd %xmm4,%xmm2
  jbe    L59
  movq   %rbx,%xmm5
  subsd  %xmm4,%xmm5
  movsd  %xmm5,0x48(%rsp)
  movsd  0x10(%rsp),%xmm0
  mulsd  %xmm5,%xmm0
  divsd  %xmm4,%xmm0
  addsd  D69(%rip),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L239
  sqrtsd %xmm0,%xmm0
L101:
  movsd  D69(%rip),%xmm1
  movapd %xmm1,%xmm4
  divsd  %xmm0,%xmm4
  movsd  %xmm4,0x70(%rsp)
  movsd  0x38(%rsp),%xmm0
  divsd  0x18(%rsp),%xmm0
  movapd %xmm0,%xmm7
  divsd  0x8(%rsp),%xmm7
  movsd  %xmm7,0x78(%rsp)
  movsd  D201(%rip),%xmm1
  movapd %xmm4,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm2
  movsd  0x70(%rsp),%xmm1
  movsd  0x78(%rsp),%xmm7
  mulsd  %xmm7,%xmm1
  mulsd  D71(%rip),%xmm7
  movapd %xmm7,%xmm0
  mulsd  0x10(%rsp),%xmm0
  divsd  0x8(%rsp),%xmm0
  mulsd  0x48(%rsp),%xmm0
  mulsd  %xmm2,%xmm0
  subsd  %xmm0,%xmm1
  movsd  %xmm1,0x48(%rsp)
L358:
  movsd  0x28(%rsp),%xmm0
  subsd  0x20(%rsp),%xmm0
  movsd  0x40(%rsp),%xmm1
  subsd  0x48(%rsp),%xmm1
  divsd  %xmm1,%xmm0
  movq   %rbx,%xmm5
  addsd  %xmm5,%xmm0
  pxor   %xmm1,%xmm1
  movq   %xmm0,%rbx
  comisd %xmm0,%xmm1
  ja     L244
L398:
  add    $0x1,%ebp
  movq   %rbx,%xmm6
  movsd  (%rsp),%xmm5
  comisd %xmm5,%xmm6
  jbe    L387
  subsd  %xmm5,%xmm6
  movsd  %xmm6,0x20(%rsp)
  movsd  0x10(%rsp),%xmm0
  mulsd  %xmm6,%xmm0
  divsd  %xmm5,%xmm0
  addsd  D69(%rip),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L404
  movapd %xmm0,%xmm1
  sqrtsd %xmm1,%xmm1
L194:
  movsd  0x20(%rsp),%xmm0
  mulsd  0x30(%rsp),%xmm0
  divsd  0x18(%rsp),%xmm0
  divsd  (%rsp),%xmm0
  divsd  %xmm1,%xmm0
  movq   %r15,%xmm4
  subsd  %xmm0,%xmm4
  movsd  %xmm4,0x20(%rsp)
L283:
  movq   %rbx,%xmm2
  movsd  0x8(%rsp),%xmm6
  comisd %xmm6,%xmm2
  jbe    L241
  movq   %rbx,%xmm3
  subsd  %xmm6,%xmm3
  movsd  %xmm3,0x28(%rsp)
  movsd  0x10(%rsp),%xmm0
  mulsd  %xmm3,%xmm0
  divsd  %xmm6,%xmm0
  addsd  D69(%rip),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L187
  movapd %xmm0,%xmm1
  sqrtsd %xmm1,%xmm1
  jmp    L130
L241:
  movsd  0x58(%rsp),%xmm1
  movq   %rbx,%xmm0
  divsd  0x8(%rsp),%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm1
  subsd  D69(%rip),%xmm1
  movsd  0x38(%rsp),%xmm4
  movapd %xmm4,%xmm0
  addsd  %xmm4,%xmm0
  mulsd  %xmm1,%xmm0
  divsd  0x60(%rsp),%xmm0
  addsd  0x50(%rsp),%xmm0
  movsd  %xmm0,0x28(%rsp)
  jmp    L27
L37:
  mov    %rbx,(%r14)
  movsd  0x28(%rsp),%xmm1
  movsd  0x20(%rsp),%xmm5
  subsd  %xmm5,%xmm1
  movsd  0x40(%rsp),%xmm2
  mulsd  %xmm2,%xmm1
  subsd  0x48(%rsp),%xmm2
  divsd  %xmm2,%xmm1
  addsd  %xmm5,%xmm1
  movsd  %xmm1,0x0(%r13)
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D69
type_infered: f64
name: retrieve_data
arguments: data_tag: D257
type_infered: f32[4]
name: retrieve_data
arguments: data_tag: D71
type_infered: f64
name: retrieve_data
arguments: data_tag: D44
type_infered: qword[2]
name: retrieve_data
arguments: data_tag: D201
type_infered: f64

tool: D69: 1

tool: {"D257": [0.0,-0.0,0.0,0.0]}

tool: D71: 0.5

tool: {"D44": [0x7fffffffffffffff,0x0000000000000000]}

tool: D201: 3

assistant: ```c
double Riemann_solver_exact(double *U_star, double *P_star, double gamma, double u_L, double u_R, double p_L, double p_R, double c_L, double c_R, int *CRW, double tol, int N) {
  double mu, nu, sigma;
  double delta_p, u_LR, u_RL;
  double k1, k3, p_INT, p_INT0, u_INT;
  double rho_star_l, rho_star_r;
  double v_L, v_R, gap;
  double temp1, temp2, temp3;
  double dbg = 2;
  int n = 0;
  mu = (gamma - 1.0) / (2.0 * gamma);
  nu = (gamma + 1.0) / (2.0 * gamma);
  sigma = (gamma - 1.0) / (gamma + 1.0);
  if (p_R > p_L) {
    delta_p = p_R - p_L;
    u_LR = sqrt(1.0 + nu * delta_p / p_L);
    u_LR = delta_p * c_L / gamma / p_L / u_LR;
    u_LR = u_L - u_LR;
  } else {
    u_LR = pow(p_R / p_L, mu) - 1.0;
    u_LR = 2.0 * c_L * u_LR / (gamma - 1.0);
    u_LR = u_L - u_LR;
  }
  if (p_L > p_R) {
    delta_p = p_L - p_R;
    u_RL = sqrt(1.0 + nu * delta_p / p_R);
    u_RL = delta_p * c_R / gamma / p_R / u_RL;
    u_RL = u_R + u_RL;
  } else {
    u_RL = pow(p_L / p_R, mu) - 1.0;
    u_RL = 2.0 * c_R * u_RL / (gamma - 1.0);
    u_RL = u_R + u_RL;
  }
  if (u_LR > u_R + tol)
    CRW[1] = 0;
  else
    CRW[1] = 1;
  if (u_RL > u_L - tol)
    CRW[0] = 1;
  else
    CRW[0] = 0;
  k1 = -c_L / p_L / gamma;
  k3 = c_R / p_R / gamma;
  p_INT = (k1 * p_L - k3 * p_R - u_L + u_R) / (k1 - k3);
  if (p_INT < 0)
    p_INT = (p_L < p_R) ? p_L : p_R;
  p_INT = 0.5 * p_INT;
  if (p_INT > p_L) {
    delta_p = p_INT - p_L;
    v_L = sqrt(1.0 + nu * delta_p / p_L);
    v_L = delta_p * c_L / gamma / p_L / v_L;
    v_L = u_L - v_L;
  } else {
    v_L = pow(p_INT / p_L, mu) - 1.0;
    v_L = 2.0 * c_L * v_L / (gamma - 1.0);
    v_L = u_L - v_L;
  }
  if (p_INT > p_R) {
    delta_p = p_INT - p_R;
    v_R = sqrt(1.0 + nu * delta_p / p_R);
    v_R = delta_p * c_R / gamma / p_R / v_R;
    v_R = u_R + v_R;
  } else {
    dbg = pow(p_INT / p_R, mu);
    v_R = pow(p_INT / p_R, mu) - 1.0;
    v_R = 2.0 * c_R * v_R / (gamma - 1.0);
    v_R = u_R + v_R;
  }
  gap = fabs(v_L - v_R);
  while ((gap > tol) && (n != N)) {
    if (p_INT > p_L) {
      delta_p = p_INT - p_L;
      temp1 = 1.0 / sqrt(1.0 + nu * delta_p / p_L);
      temp2 = c_L / gamma / p_L;
      temp3 = 0.5 * temp2 * nu / p_L;
      k1 = temp3 * delta_p * pow(temp1, 3.0) - temp2 * temp1;
    } else {
      temp2 = c_L / gamma / p_L;
      temp1 = 1.0 / pow(p_INT / p_L, nu);
      k1 = -temp1 * temp2;
    }
    if (p_INT > p_R) {
      delta_p = p_INT - p_R;
      temp1 = 1.0 / sqrt(1.0 + nu * delta_p / p_R);
      temp2 = c_R / gamma / p_R;
      temp3 = 0.5 * temp2 * nu / p_R;
      k3 = temp2 * temp1 - temp3 * delta_p * pow(temp1, 3.0);
    } else {
      temp2 = c_R / gamma / p_R;
      temp1 = 1.0 / pow(p_INT / p_R, nu);
      k3 = temp1 * temp2;
    }
    p_INT0 = p_INT + (v_R - v_L) / (k1 - k3);
    if (p_INT0 < 0.0)
      p_INT = 0.5 * p_INT;
    else
      p_INT = p_INT0;
    ++n;
    if (p_INT > p_L) {
      delta_p = p_INT - p_L;
      v_L = sqrt(1.0 + nu * delta_p / p_L);
      v_L = delta_p * c_L / gamma / p_L / v_L;
      v_L = u_L - v_L;
    } else {
      v_L = pow(p_INT / p_L, mu) - 1.0;
      v_L = 2.0 * c_L * v_L / (gamma - 1.0);
      v_L = u_L - v_L;
    }
    if (p_INT > p_R) {
      delta_p = p_INT - p_R;
      v_R = sqrt(1.0 + nu * delta_p / p_R);
      v_R = delta_p * c_R / gamma / p_R / v_R;
      v_R = u_R + v_R;
    } else {
      v_R = pow(p_INT / p_R, mu) - 1.0;
      v_R = 2.0 * c_R * v_R / (gamma - 1.0);
      v_R = u_R + v_R;
    }
    gap = fabs(v_L - v_R);
  }
  u_INT = k1 * (v_R - v_L) / (k1 - k3) + v_L;
  *P_star = p_INT;
  *U_star = u_INT;
  return gap;
}
```