user: 请从给定的汇编指令推导出C源代码：

```asm
<primtoU_g>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r12
  mov    %rsi,%rbp
  mov    %rdx,%r13
  movsd  %xmm0,(%rsp)
  mov    %rcx,%rbx
  movsd  (%rdx),%xmm1
  movapd %xmm1,%xmm0
  xorpd  D196(%rip),%xmm0
  ucomisd D196(%rip),%xmm1
  ja     L31
  sqrtsd %xmm0,%xmm0
L42:
  movsd  D156(%rip),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x10(%rsp)
  lea    D189(%rip),%r14
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <ucon_calc_g@plt>
  lea    D152(%rip),%rdx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <lower_g@plt>
  lea    D155(%rip),%r15
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <ncov_calc@plt>
  movsd  D155(%rip),%xmm0
  xorpd  D196(%rip),%xmm0
  mulsd  D189(%rip),%xmm0
  movsd  %xmm0,0x18(%rsp)
  lea    D124(%rip),%r8
  mov    %r15,%rcx
  lea    D152(%rip),%rdx
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <bcon_calc_g@plt>
  lea    D50(%rip),%rdx
  mov    %rbp,%rsi
  lea    D124(%rip),%rdi
  call   <lower_g@plt>
  mov    $0x0,%eax
  mov    D88(%rip),%r13
  mov    %r15,%rcx
  lea    D124(%rip),%rdx
L40:
  movsd  (%rcx,%rax,1),%xmm0
  mulsd  (%rdx,%rax,1),%xmm0
  movq   %r13,%xmm4
  addsd  %xmm0,%xmm4
  movq   %xmm4,%r13
  add    $0x8,%rax
  cmp    $0x20,%rax
  jne    L40
  mov    $0x0,%eax
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x8(%rsp)
  lea    D50(%rip),%rcx
  lea    D124(%rip),%rdx
L13:
  movsd  (%rcx,%rax,1),%xmm0
  mulsd  (%rdx,%rax,1),%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  add    $0x8,%rax
  cmp    $0x20,%rax
  jne    L13
  mov    (%r12),%r14
  mov    0x8(%r12),%r15
  movq   %r15,%xmm1
  movq   %r14,%xmm0
  call   <pressure_rho0_u@plt>
  movapd %xmm0,%xmm2
  movq   %r14,%xmm0
  mulsd  D189(%rip),%xmm0
  movsd  %xmm0,(%rbx)
  movq   %r14,%xmm1
  movq   %r15,%xmm5
  addsd  %xmm5,%xmm1
  addsd  %xmm2,%xmm1
  movsd  0x8(%rsp),%xmm7
  addsd  %xmm7,%xmm1
  mulsd  0x18(%rsp),%xmm1
  mulsd  D27(%rip),%xmm7
  movapd %xmm7,%xmm0
  addsd  %xmm2,%xmm0
  mov    $0x0,%eax
  lea    D152(%rip),%rsi
  lea    D155(%rip),%rcx
  lea    D50(%rip),%rdx
L45:
  movapd %xmm1,%xmm2
  mulsd  (%rsi,%rax,1),%xmm2
  movapd %xmm0,%xmm3
  mulsd  (%rcx,%rax,1),%xmm3
  subsd  %xmm3,%xmm2
  movq   %r13,%xmm3
  mulsd  (%rdx,%rax,1),%xmm3
  addsd  %xmm3,%xmm2
  divsd  0x10(%rsp),%xmm2
  movsd  %xmm2,0x8(%rbx,%rax,1)
  add    $0x8,%rax
  cmp    $0x20,%rax
  jne    L45
  movsd  0x8(%rbx),%xmm0
  addsd  (%rbx),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  0x28(%r12),%xmm0
  movsd  %xmm0,0x28(%rbx)
  movsd  0x30(%r12),%xmm0
  movsd  %xmm0,0x30(%rbx)
  movsd  0x38(%r12),%xmm0
  movsd  %xmm0,0x38(%rbx)
  mov    %rbx,%rax
  add    $0x48,%rbx
L27:
  movsd  (%rsp),%xmm0
  mulsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %rbx,%rax
  jne    L27
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L31:
  call   <sqrt@plt>
  jmp    L42
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D196
type: f32[4]
name: extract_symbolic_data
arguments: data_label: D156
type: f64
name: extract_symbolic_data
arguments: data_label: D88
type: f32[2]
name: extract_symbolic_data
arguments: data_label: D27
type: f32[2]

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

tool: D156: 1

tool: {"D88": [0.0,0.0]}

tool: {"D27": [0.0,1.75]}

assistant: ```c
void primtoU_g(double prim[(9)], double gcov[(4)][(4)], double gcon[(4)][(4)], double gdet, double U[(9)]) {
  int i, j;
  double rho0;
  static double ucon[(4)], ucov[(4)], bcon[(4)], bcov[(4)], ncov[(4)];
  double gamma, n_dot_b, bsq, u, p, w, alpha;
  alpha = 1.0 / sqrt(-gcon[0][0]);
  ucon_calc_g(prim, gcov, gcon, ucon);
  lower_g(ucon, gcov, ucov);
  ncov_calc(gcon, ncov);
  gamma = -ncov[0] * ucon[0];
  bcon_calc_g(prim, ucon, ucov, ncov, bcon);
  lower_g(bcon, gcov, bcov);
  n_dot_b = 0.;
  for (i = 0; i < 4; i++)
    n_dot_b += ncov[i] * bcon[i];
  bsq = 0.;
  for (i = 0; i < 4; i++)
    bsq += bcov[i] * bcon[i];
  rho0 = prim[(0)];
  u = prim[(1)];
  p = pressure_rho0_u(rho0, u);
  w = rho0 + u + p;
  U[(0)] = ucon[0] * rho0;
  for (i = 0; i < 4; i++) {
    U[1 + i] = gamma * (w + bsq) * ucov[i] - (p + bsq / 2.) * ncov[i] + n_dot_b * bcov[i];
    U[1 + i] /= alpha;
  }
  U[1] = U[1] + U[(0)];
  U[5] = prim[5];
  U[6] = prim[6];
  U[7] = prim[7];
  for (i = 0; i < (9); i++) {
    U[i] *= gdet;
  }
  return;
}
```