user: Please show me the C implementation that matches the assembly code listed below:

```asm
<zrati_>:
  endbr64
  push   %r15
  mov    %rcx,%r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %r9,%r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0xc8,%rsp
  mov    0x100(%rsp),%rax
  mov    %rdx,0x40(%rsp)
  mov    %rcx,0x38(%rsp)
  mov    %r8,0x50(%rsp)
  mov    %rax,0x30(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xb8(%rsp)
  xor    %eax,%eax
  call   <zabs_@plt>
  pxor   %xmm3,%xmm3
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  mov    %eax,%r8d
  cvtsd2ss (%r14),%xmm0
  cvtsi2sd %eax,%xmm3
  cvttss2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  add    (%r15),%eax
  cvtsi2ss %r8d,%xmm0
  sub    $0x1,%eax
  cvttss2si %xmm0,%edx
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  lea    0x1(%rdx),%ecx
  cvtsi2ss %ecx,%xmm1
  comiss %xmm0,%xmm1
  jb     L48
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm1,%xmm0
L119:
  movsd  D91(%rip),%xmm2
  movsd  0x0(%rbp),%xmm1
  sub    %edx,%eax
  lea    0x80(%rsp),%r15
  mov    D91(%rip),%rcx
  mov    %r15,%rsi
  lea    0x98(%rsp),%r14
  movq   $0x0,0x78(%rsp)
  divsd  %xmm3,%xmm2
  addsd  %xmm1,%xmm1
  mov    %r14,%rdi
  mov    %rcx,0x90(%rsp)
  lea    -0x1(%rax),%ecx
  xor    %eax,%eax
  test   %ecx,%ecx
  cmovle %ecx,%eax
  mov    %eax,0x4c(%rsp)
  xor    %eax,%eax
  mulsd  %xmm2,%xmm1
  movapd %xmm2,%xmm3
  xorpd  D60(%rip),%xmm3
  movsd  %xmm2,0xb0(%rsp)
  movapd %xmm1,%xmm5
  movsd  (%rbx),%xmm1
  mulsd  %xmm2,%xmm5
  addsd  %xmm1,%xmm1
  mulsd  %xmm3,%xmm1
  movsd  %xmm5,0x10(%rsp)
  movapd %xmm1,%xmm7
  movapd %xmm5,%xmm1
  mulsd  %xmm2,%xmm7
  mulsd  %xmm0,%xmm1
  mulsd  %xmm7,%xmm0
  movsd  %xmm7,0x18(%rsp)
  movapd %xmm1,%xmm2
  xorpd  D60(%rip),%xmm2
  addsd  %xmm5,%xmm1
  movsd  %xmm2,0x98(%rsp)
  movsd  %xmm1,0xa0(%rsp)
  movapd %xmm0,%xmm2
  addsd  %xmm7,%xmm0
  xorpd  D60(%rip),%xmm2
  movsd  %xmm2,0x80(%rsp)
  movsd  %xmm0,0x88(%rsp)
  call   <zabs_@plt>
  pxor   %xmm1,%xmm1
  lea    0x78(%rsp),%rsi
  cvtsi2sd %eax,%xmm1
  lea    0x90(%rsp),%rax
  mov    %rsi,0x58(%rsp)
  mov    %rax,0x60(%rsp)
  mov    %rax,%rdi
  xor    %eax,%eax
  movsd  %xmm1,0x8(%rsp)
  call   <zabs_@plt>
  pxor   %xmm2,%xmm2
  movsd  0x8(%rsp),%xmm1
  pxor   %xmm5,%xmm5
  cvtsi2sd %eax,%xmm2
  mov    0x30(%rsp),%rax
  movapd %xmm1,%xmm0
  movsd  (%rax),%xmm3
  addsd  %xmm1,%xmm0
  mulsd  %xmm2,%xmm3
  divsd  %xmm3,%xmm0
  ucomisd %xmm0,%xmm5
  ja     L209
  sqrtsd %xmm0,%xmm0
  movsd  %xmm0,0x28(%rsp)
L201:
  movsd  D91(%rip),%xmm0
  movsd  0x78(%rsp),%xmm5
  mov    $0x1,%ebp
  mov    $0x1,%r12d
  movsd  0x90(%rsp),%xmm6
  movsd  0x28(%rsp),%xmm7
  movsd  0x98(%rsp),%xmm3
  divsd  %xmm2,%xmm0
  movsd  0x80(%rsp),%xmm2
  movsd  %xmm7,0x20(%rsp)
  mulsd  %xmm0,%xmm1
  mulsd  %xmm0,%xmm6
  mulsd  %xmm0,%xmm5
  mulsd  %xmm0,%xmm3
  mulsd  %xmm0,%xmm2
  movsd  %xmm1,0x8(%rsp)
  jmp    L155
  nopl   0x0(%rax,%rax,1)
L182:
  xor    %eax,%eax
  lea    0x88(%rsp),%rsi
  lea    0xa0(%rsp),%rdi
  movsd  %xmm4,0x20(%rsp)
  call   <zabs_@plt>
  pxor   %xmm1,%xmm1
  pxor   %xmm5,%xmm5
  movsd  0x20(%rsp),%xmm4
  cvtsi2sd %eax,%xmm1
  mulsd  D130(%rip),%xmm1
  movapd %xmm1,%xmm0
  mulsd  %xmm1,%xmm0
  subsd  D91(%rip),%xmm0
  ucomisd %xmm0,%xmm5
  ja     L235
  sqrtsd %xmm0,%xmm0
L199:
  addsd  %xmm0,%xmm1
  movapd %xmm4,%xmm0
  divsd  0x8(%rsp),%xmm0
  movapd %xmm0,%xmm2
  pxor   %xmm5,%xmm5
  cmplesd %xmm1,%xmm2
  andpd  %xmm2,%xmm0
  andnpd %xmm1,%xmm2
  orpd   %xmm2,%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  subsd  D91(%rip),%xmm1
  divsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm5
  ja     L47
  sqrtsd %xmm0,%xmm0
L49:
  mulsd  0x28(%rsp),%xmm0
  mov    $0x2,%ebp
  movsd  %xmm0,0x20(%rsp)
L167:
  movsd  0x78(%rsp),%xmm5
  movsd  %xmm4,0x8(%rsp)
  mov    %ebx,%r12d
  movsd  0x98(%rsp),%xmm3
  movsd  0x80(%rsp),%xmm2
  movsd  0x90(%rsp),%xmm6
L155:
  xor    %eax,%eax
  mov    %r15,%rsi
  mov    %r14,%rdi
  movsd  %xmm2,0x78(%rsp)
  movsd  0xa0(%rsp),%xmm1
  lea    0x1(%r12),%ebx
  movsd  0x88(%rsp),%xmm0
  movsd  %xmm3,0xb0(%rsp)
  movsd  %xmm2,0xa8(%rsp)
  movapd %xmm1,%xmm4
  movapd %xmm0,%xmm7
  movsd  %xmm3,0x90(%rsp)
  mulsd  %xmm2,%xmm7
  mulsd  %xmm3,%xmm4
  subsd  %xmm7,%xmm4
  subsd  %xmm4,%xmm6
  movapd %xmm1,%xmm4
  addsd  0x10(%rsp),%xmm1
  mulsd  %xmm2,%xmm4
  movsd  %xmm6,0x98(%rsp)
  movapd %xmm0,%xmm6
  addsd  0x18(%rsp),%xmm0
  movsd  %xmm1,0xa0(%rsp)
  mulsd  %xmm3,%xmm6
  movsd  %xmm0,0x88(%rsp)
  addsd  %xmm6,%xmm4
  subsd  %xmm4,%xmm5
  movsd  %xmm5,0x80(%rsp)
  call   <zabs_@plt>
  movsd  0x20(%rsp),%xmm7
  pxor   %xmm4,%xmm4
  comisd 0x8(%rsp),%xmm7
  cvtsi2sd %eax,%xmm4
  jae    L167
  cmp    $0x2,%ebp
  jne    L182
  mov    0x38(%rsp),%rax
  lea    0x2(%r12),%edx
  pxor   %xmm6,%xmm6
  sub    0x4c(%rsp),%edx
  pxor   %xmm7,%xmm7
  cvtsi2ss %edx,%xmm6
  pxor   %xmm8,%xmm8
  add    $0x1,%edx
  movslq (%rax),%rcx
  movsd  D91(%rip),%xmm5
  movapd %xmm8,%xmm3
  movq   $0x0,0x88(%rsp)
  lea    -0x1(%rcx),%eax
  divsd  %xmm4,%xmm5
  movapd %xmm8,%xmm4
  cvtsi2ss %eax,%xmm7
  mov    0x40(%rsp),%rax
  cvtss2sd %xmm6,%xmm6
  cvtss2sd %xmm7,%xmm7
  addsd  (%rax),%xmm7
  mov    $0x1,%eax
  jmp    L5
  nop
L136:
  movapd %xmm0,%xmm3
  movapd %xmm1,%xmm5
L5:
  movapd %xmm6,%xmm0
  movapd %xmm5,%xmm1
  movapd %xmm3,%xmm9
  add    $0x1,%eax
  addsd  %xmm7,%xmm0
  movsd  0x10(%rsp),%xmm2
  subsd  D91(%rip),%xmm6
  mulsd  %xmm0,%xmm2
  mulsd  0x18(%rsp),%xmm0
  mulsd  %xmm2,%xmm1
  mulsd  %xmm0,%xmm9
  mulsd  %xmm3,%xmm2
  mulsd  %xmm5,%xmm0
  subsd  %xmm9,%xmm1
  addsd  %xmm2,%xmm0
  addsd  %xmm4,%xmm1
  movapd %xmm5,%xmm4
  addsd  %xmm8,%xmm0
  movapd %xmm3,%xmm8
  cmp    %edx,%eax
  jne    L136
  movsd  %xmm6,0xa0(%rsp)
  pxor   %xmm6,%xmm6
  ucomisd %xmm6,%xmm1
  movsd  %xmm0,0x78(%rsp)
  movsd  %xmm5,0xb0(%rsp)
  movsd  %xmm3,0xa8(%rsp)
  movsd  %xmm1,0x90(%rsp)
  movsd  %xmm5,0x98(%rsp)
  movsd  %xmm3,0x80(%rsp)
  jp     L197
  jne    L197
  ucomisd %xmm6,%xmm0
  jp     L197
  jne    L197
  mov    0x30(%rsp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,0x90(%rsp)
  movsd  %xmm0,0x78(%rsp)
L197:
  mov    0x50(%rsp),%r12
  mov    0x60(%rsp),%rdx
  mov    %r14,%rdi
  mov    %r15,%rsi
  lea    -0x8(,%rcx,8),%rax
  mov    0x58(%rsp),%rcx
  lea    0x0(%r13,%rax,1),%r9
  lea    (%r12,%rax,1),%r8
  xor    %eax,%eax
  call   <zdiv_@plt>
  mov    0x38(%rsp),%rax
  mov    (%rax),%r14d
  cmp    $0x1,%r14d
  je     L161
  lea    -0x1(%r14),%eax
  pxor   %xmm0,%xmm0
  movsd  0x10(%rsp),%xmm6
  movq   $0x0,0x88(%rsp)
  cvtsi2ss %eax,%xmm0
  mov    0x40(%rsp),%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm1,%xmm6
  cvtss2sd %xmm0,%xmm0
  movsd  %xmm0,0xa0(%rsp)
  mulsd  0x18(%rsp),%xmm1
  movsd  %xmm6,0x8(%rsp)
  movsd  %xmm1,0x20(%rsp)
  jle    L161
  lea    -0x2(%r14),%r15d
  pxor   %xmm1,%xmm1
  lea    0xa8(%rsp),%rbp
  movslq %r15d,%r15
  lea    0xb0(%rsp),%rbx
  jmp    L128
  nopl   0x0(%rax,%rax,1)
L121:
  mov    0x30(%rsp),%rax
  movsd  D138(%rip),%xmm3
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm3
  movapd %xmm0,%xmm2
  movsd  %xmm0,0xb0(%rsp)
  movsd  %xmm0,0xa8(%rsp)
L118:
  movsd  D91(%rip),%xmm1
  mov    %r14d,%eax
  divsd  %xmm3,%xmm1
  mulsd  %xmm1,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%r12,%r15,8)
  movapd %xmm1,%xmm0
  xorpd  D60(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%r13,%r15,8)
  sub    $0x1,%r15
  movsd  0xa0(%rsp),%xmm0
  subsd  D91(%rip),%xmm0
  sub    %r15d,%eax
  movsd  %xmm0,0xa0(%rsp)
  cmp    %eax,%r14d
  jl     L161
  movsd  0x88(%rsp),%xmm1
L128:
  movsd  0x10(%rsp),%xmm7
  xor    %eax,%eax
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  movsd  0x18(%rsp),%xmm6
  movapd %xmm7,%xmm2
  mulsd  %xmm0,%xmm2
  movapd %xmm6,%xmm3
  mulsd  %xmm1,%xmm3
  mulsd  %xmm6,%xmm0
  mulsd  %xmm7,%xmm1
  subsd  %xmm3,%xmm2
  addsd  0x8(%rsp),%xmm2
  addsd  0x8(%r12,%r15,8),%xmm2
  addsd  %xmm1,%xmm0
  addsd  0x20(%rsp),%xmm0
  addsd  0x8(%r13,%r15,8),%xmm0
  movsd  %xmm2,0xb0(%rsp)
  movsd  %xmm0,0xa8(%rsp)
  call   <zabs_@plt>
  test   %eax,%eax
  je     L121
  movsd  0xb0(%rsp),%xmm0
  pxor   %xmm3,%xmm3
  movsd  0xa8(%rsp),%xmm2
  cvtsi2sd %eax,%xmm3
  jmp    L118
  nopw   0x0(%rax,%rax,1)
L161:
  mov    0xb8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L108
  add    $0xc8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L48:
  cvtss2sd %xmm0,%xmm0
  jmp    L119
L47:
  movsd  %xmm4,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm4
  jmp    L49
L235:
  movsd  %xmm1,0x68(%rsp)
  movsd  %xmm4,0x20(%rsp)
  call   <sqrt@plt>
  movsd  0x68(%rsp),%xmm1
  movsd  0x20(%rsp),%xmm4
  jmp    L199
L209:
  movsd  %xmm2,0x20(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x20(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm1
  movsd  %xmm0,0x28(%rsp)
  jmp    L201
L108:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D91
type_guessed: f64
name: read_data
arguments: data_label: D60
type_guessed: f32[4]
name: read_data
arguments: data_label: D130
type_guessed: f32[2]
name: read_data
arguments: data_label: D138
type_guessed: f64

tool: D91: 1

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

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

tool: D138: 1.4142135623730951

assistant: ```c
int zrati_(double *zr, double *zi, double *fnu, int *n, double *cyr, double *cyi, double *tol) {
  static double czeror = 0.;
  static double czeroi = 0.;
  static double coner = 1.;
  static double conei = 0.;
  static double rt2 = 1.41421356237309505;
  int i__1;
  double d__1;
  int i__, k;
  double ak;
  int id, kk;
  double az, ap1, ap2, p1i, p2i, t1i, p1r, p2r, t1r, arg, rak, rho;
  int inu;
  double pti, tti, rzi, ptr, ttr, rzr, rap1, flam, dfnu, fdnu;
  int magz;
  int idnu;
  double fnup;
  double test, test1, amagz;
  int itime;
  double cdfnui, cdfnur;
  --cyi;
  --cyr;
  az = zabs_(zr, zi);
  inu = (int)((float)(*fnu));
  idnu = inu + *n - 1;
  magz = (int)((float)az);
  amagz = (double)((float)(magz + 1));
  fdnu = (double)((float)idnu);
  fnup = ((amagz) >= (fdnu) ? (amagz) : (fdnu));
  id = idnu - magz - 1;
  itime = 1;
  k = 1;
  ptr = 1. / az;
  rzr = ptr * (*zr + *zr) * ptr;
  rzi = -ptr * (*zi + *zi) * ptr;
  t1r = rzr * fnup;
  t1i = rzi * fnup;
  p2r = -t1r;
  p2i = -t1i;
  p1r = coner;
  p1i = conei;
  t1r += rzr;
  t1i += rzi;
  if (id > 0) {
    id = 0;
  }
  ap2 = zabs_(&p2r, &p2i);
  ap1 = zabs_(&p1r, &p1i);
  arg = (ap2 + ap2) / (ap1 * *tol);
  test1 = sqrt(arg);
  test = test1;
  rap1 = 1. / ap1;
  p1r *= rap1;
  p1i *= rap1;
  p2r *= rap1;
  p2i *= rap1;
  ap2 *= rap1;
L10:
  ++k;
  ap1 = ap2;
  ptr = p2r;
  pti = p2i;
  p2r = p1r - (t1r * ptr - t1i * pti);
  p2i = p1i - (t1r * pti + t1i * ptr);
  p1r = ptr;
  p1i = pti;
  t1r += rzr;
  t1i += rzi;
  ap2 = zabs_(&p2r, &p2i);
  if (ap1 <= test) {
    goto L10;
  }
  if (itime == 2) {
    goto L20;
  }
  ak = zabs_(&t1r, &t1i) * .5;
  flam = ak + sqrt(ak * ak - 1.);
  d__1 = ap2 / ap1;
  rho = ((d__1) <= (flam) ? (d__1) : (flam));
  test = test1 * sqrt(rho / (rho * rho - 1.));
  itime = 2;
  goto L10;
L20:
  kk = k + 1 - id;
  ak = (double)((float)kk);
  t1r = ak;
  t1i = czeroi;
  dfnu = *fnu + (double)((float)(*n - 1));
  p1r = 1. / ap2;
  p1i = czeroi;
  p2r = czeror;
  p2i = czeroi;
  i__1 = kk;
  for (i__ = 1; i__ <= i__1; ++i__) {
    ptr = p1r;
    pti = p1i;
    rap1 = dfnu + t1r;
    ttr = rzr * rap1;
    tti = rzi * rap1;
    p1r = ptr * ttr - pti * tti + p2r;
    p1i = ptr * tti + pti * ttr + p2i;
    p2r = ptr;
    p2i = pti;
    t1r -= coner;
  }
  if (p1r != czeror || p1i != czeroi) {
    goto L40;
  }
  p1r = *tol;
  p1i = *tol;
L40:
  zdiv_(&p2r, &p2i, &p1r, &p1i, &cyr[*n], &cyi[*n]);
  if (*n == 1) {
    return 0;
  }
  k = *n - 1;
  ak = (double)((float)k);
  t1r = ak;
  t1i = czeroi;
  cdfnur = *fnu * rzr;
  cdfnui = *fnu * rzi;
  i__1 = *n;
  for (i__ = 2; i__ <= i__1; ++i__) {
    ptr = cdfnur + (t1r * rzr - t1i * rzi) + cyr[k + 1];
    pti = cdfnui + (t1r * rzi + t1i * rzr) + cyi[k + 1];
    ak = zabs_(&ptr, &pti);
    if (ak != czeror) {
      goto L50;
    }
    ptr = *tol;
    pti = *tol;
    ak = *tol * rt2;
  L50:
    rak = coner / ak;
    cyr[k] = rak * ptr * rak;
    cyi[k] = -rak * pti * rak;
    t1r -= coner;
    --k;
  }
  return 0;
}
```