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

```asm
<cfrac>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  movsd  %xmm0,-0x48(%rbp)
  movsd  %xmm1,-0x50(%rbp)
  movsd  -0x50(%rbp),%xmm1
  movsd  D59(%rip),%xmm0
  addsd  %xmm1,%xmm0
  subsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  D61(%rip),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  D59(%rip),%xmm0
  divsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x1,-0x34(%rbp)
  jmp    L56
L48:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x34(%rbp),%xmm1
  pxor   %xmm2,%xmm2
  cvtsi2sdl -0x34(%rbp),%xmm2
  movsd  -0x48(%rbp),%xmm0
  subsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x20(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm2
  movsd  D126(%rip),%xmm0
  addsd  %xmm2,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x30(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movq   D102(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  D124(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L59
  movsd  D124(%rip),%xmm0
  movsd  %xmm0,-0x20(%rbp)
L59:
  movsd  -0x10(%rbp),%xmm0
  divsd  -0x28(%rbp),%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movq   D102(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  D124(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L5
  movsd  D124(%rip),%xmm0
  movsd  %xmm0,-0x28(%rbp)
L5:
  movsd  D59(%rip),%xmm0
  divsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  -0x18(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  D59(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movq   D102(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  D65(%rip),%xmm0
  comisd %xmm1,%xmm0
  ja     L41
  addl   $0x1,-0x34(%rbp)
L56:
  cmpl   $0x3ff,-0x34(%rbp)
  jle    L48
  jmp    L4
L41:
  nop
L4:
  movsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  pop    %rbp
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D59
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D61
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D126
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D102
datatype: qword
name: disassemble_data
arguments: data_tag: D124
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D65
datatype: byte[8]

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

tool: {"D61": [0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x49]}

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

tool: D102: 9223372036854775807

tool: {"D124": [0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x36]}

tool: {"D65": [0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x3c]}

assistant: ```c
double cfrac(double n, double x) {
  int i;
  double a, b, c, d, e, f;
  b = x + 1 - n;
  c = 1 / (2.2204460492503131e-16 * 2.2204460492503131e-16 * 2.2204460492503131e-16);
  f = d = 1 / b;
  for (i = 1; i < 1024; i++) {
    a = i * (n - i);
    d = a * d + (b += 2);
    if (fabs(d) < (2.2204460492503131e-16 * 2.2204460492503131e-16 * 2.2204460492503131e-16))
      d = (2.2204460492503131e-16 * 2.2204460492503131e-16 * 2.2204460492503131e-16);
    c = b + a / c;
    if (fabs(c) < (2.2204460492503131e-16 * 2.2204460492503131e-16 * 2.2204460492503131e-16))
      c = (2.2204460492503131e-16 * 2.2204460492503131e-16 * 2.2204460492503131e-16);
    d = 1 / d;
    f *= e = d * c;
    if (fabs(e - 1) < 2.2204460492503131e-16)
      break;
  }
  return f;
}
```