user: Translate the below assembly code into C programming language:

```asm
<primtoU_g>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  movsd  %xmm0,-0x70(%rbp)
  mov    %rcx,-0x78(%rbp)
  mov    -0x68(%rbp),%rax
  movsd  (%rax),%xmm0
  movq   D115(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  movsd  D78(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x68(%rbp),%rdx
  mov    -0x60(%rbp),%rsi
  mov    -0x58(%rbp),%rax
  lea    D24(%rip),%rcx
  mov    %rax,%rdi
  call   <ucon_calc_g@plt>
  mov    -0x60(%rbp),%rax
  lea    D48(%rip),%rdx
  mov    %rax,%rsi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  call   <lower_g@plt>
  mov    -0x68(%rbp),%rax
  lea    D88(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <ncov_calc@plt>
  movsd  D88(%rip),%xmm0
  movq   D115(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  movsd  D24(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x58(%rbp),%rax
  lea    D130(%rip),%r8
  lea    D88(%rip),%rdx
  mov    %rdx,%rcx
  lea    D48(%rip),%rdx
  lea    D24(%rip),%rsi
  mov    %rax,%rdi
  call   <bcon_calc_g@plt>
  mov    -0x60(%rbp),%rax
  lea    D143(%rip),%rdx
  mov    %rax,%rsi
  lea    D130(%rip),%rax
  mov    %rax,%rdi
  call   <lower_g@plt>
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movl   $0x0,-0x44(%rbp)
  jmp    L37
L25:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D88(%rip),%rax
  movsd  (%rdx,%rax,1),%xmm1
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D130(%rip),%rax
  movsd  (%rdx,%rax,1),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x40(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  addl   $0x1,-0x44(%rbp)
L37:
  cmpl   $0x3,-0x44(%rbp)
  jle    L25
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movl   $0x0,-0x44(%rbp)
  jmp    L65
L10:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D143(%rip),%rax
  movsd  (%rdx,%rax,1),%xmm1
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D130(%rip),%rax
  movsd  (%rdx,%rax,1),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  addl   $0x1,-0x44(%rbp)
L65:
  cmpl   $0x3,-0x44(%rbp)
  jle    L10
  mov    -0x58(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x58(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mov    -0x20(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pressure_rho0_u@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x10(%rbp)
  movsd  -0x20(%rbp),%xmm0
  addsd  -0x18(%rbp),%xmm0
  movsd  -0x10(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  D24(%rip),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  mov    -0x78(%rbp),%rax
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x44(%rbp)
  jmp    L57
L3:
  movsd  -0x8(%rbp),%xmm0
  addsd  -0x38(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x28(%rbp),%xmm1
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D48(%rip),%rax
  movsd  (%rdx,%rax,1),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x38(%rbp),%xmm1
  movsd  D198(%rip),%xmm2
  divsd  %xmm2,%xmm1
  movapd %xmm1,%xmm2
  addsd  -0x10(%rbp),%xmm2
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D88(%rip),%rax
  movsd  (%rdx,%rax,1),%xmm1
  mulsd  %xmm1,%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D143(%rip),%rax
  movsd  (%rdx,%rax,1),%xmm0
  mulsd  -0x40(%rbp),%xmm0
  mov    -0x44(%rbp),%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x44(%rbp),%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x44(%rbp),%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  divsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x44(%rbp)
L57:
  cmpl   $0x3,-0x44(%rbp)
  jle    L3
  mov    -0x78(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm1
  mov    -0x78(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x78(%rbp),%rax
  add    $0x8,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x78(%rbp),%rax
  lea    0x28(%rax),%rdx
  mov    -0x58(%rbp),%rax
  movsd  0x28(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x78(%rbp),%rax
  lea    0x30(%rax),%rdx
  mov    -0x58(%rbp),%rax
  movsd  0x30(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x78(%rbp),%rax
  lea    0x38(%rax),%rdx
  mov    -0x58(%rbp),%rax
  movsd  0x38(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  movl   $0x0,-0x44(%rbp)
  jmp    L33
L54:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x70(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x44(%rbp)
L33:
  cmpl   $0x8,-0x44(%rbp)
  jle    L54
  nop
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D115
type: f32[2]
name: extract_symbolic_data
arguments: label: D78
type: f64
name: extract_symbolic_data
arguments: label: D198
type: f64

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

tool: D78: 1

tool: D198: 2

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;
}
```