user: Converte this assembly snippet into its equivalent C code:

```asm
<ramd>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  movsd  D51(%rip),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  D106(%rip),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  D106(%rip),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  jmp    L12
L0:
  movsd  -0x28(%rbp),%xmm1
  movsd  D161(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x28(%rbp),%xmm2
  movsd  D161(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  movsd  D106(%rip),%xmm2
  subsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x28(%rbp),%xmm2
  movsd  D161(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  movsd  D71(%rip),%xmm2
  subsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x28(%rbp),%xmm2
  movsd  D161(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  movsd  D73(%rip),%xmm2
  subsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x28(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  mulsd  -0x28(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  -0x28(%rbp),%xmm2
  movsd  D44(%rip),%xmm0
  mulsd  %xmm0,%xmm2
  movsd  D44(%rip),%xmm0
  mulsd  %xmm0,%xmm2
  movsd  D44(%rip),%xmm0
  mulsd  %xmm0,%xmm2
  movsd  D44(%rip),%xmm0
  mulsd  %xmm0,%xmm2
  divsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x28(%rbp),%xmm1
  movsd  D5(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D51(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x18(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x20(%rbp),%xmm0
  addsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x28(%rbp),%xmm1
  movsd  D106(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
L12:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x34(%rbp),%xmm0
  comisd -0x28(%rbp),%xmm0
  ja     L0
  mov    $0x2,%edi
  call   <sqrt@plt>
  add    %eax,%eax
  movslq %eax,%rdx
  imul   $0xffffffffd5f92819,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0xd,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  -0x20(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  D106(%rip),%xmm0
  divsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  movq   %rax,%xmm0
  lea    D90(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D51
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D106
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D161
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D71
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D73
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D44
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D5
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D90
datatype: string

tool: {"D51": [0x00,0x00,0x00,0x00,0x00,0x3c,0x91,0x40]}

tool: {"D106": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: {"D161": [0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x40]}

tool: {"D71": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40]}

tool: {"D73": [0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x40]}

tool: {"D44": [0x00,0x00,0x00,0x00,0x00,0xc0,0x78,0x40]}

tool: {"D5": [0x00,0x00,0x00,0x00,0x80,0xc5,0xd9,0x40]}

tool: D90: %16g


assistant: ```c
void ramd(int times) {
  double n, pi, term, mult, tmp;
  pi = 1103;
  term = 0;
  mult = 1;
  tmp = 0;
  for (n = 1; n < times; n++) {
    tmp = ((4 * n) * (4 * n - 1) * (4 * n - 2) * (4 * n - 3)) / (n * n * n * n * 396 * 396 * 396 * 396);
    mult *= tmp;
    term = mult * (1103 + 26390 * n);
    pi += term;
  }
  pi *= (2 * sqrt(2)) / 9801;
  pi = 1 / pi;
  printf("%16g\n", pi);
}
```