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

```asm
<XfDrawCircle>:
  endbr64
  push   %r15
  pxor   %xmm7,%xmm7
  push   %r14
  push   %r13
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  mov    %r9d,%ebp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,0x20(%rsp)
  mov    %esi,0x28(%rsp)
  mov    %edx,0x2c(%rsp)
  mov    %r8d,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  ucomiss D23(%rip),%xmm7
  jp     L80
  jne    L80
  movl   $0x42652ee1,D23(%rip)
L80:
  mov    0x90(%rsp),%eax
  mov    0x18(%rsp),%esi
  xor    %ebx,%ebx
  xor    %r14d,%r14d
  movd   %r12d,%xmm1
  mov    $0x5a00,%r15d
  xor    %r13d,%r13d
  sub    %r12d,%eax
  movd   %esi,%xmm7
  movd   %eax,%xmm0
  mov    0x98(%rsp),%eax
  punpckldq %xmm7,%xmm0
  sub    %esi,%eax
  movd   %eax,%xmm6
  lea    0x0(%rbp,%rbp,1),%eax
  punpckldq %xmm6,%xmm1
  pxor   %xmm6,%xmm6
  mov    %eax,0x1c(%rsp)
  mov    %r12d,%eax
  cvtsi2ss %ebp,%xmm6
  punpcklqdq %xmm1,%xmm0
  movaps %xmm0,0x30(%rsp)
  movss  %xmm6,0xc(%rsp)
  test   %eax,%eax
  js     L21
  nopl   0x0(%rax,%rax,1)
L176:
  lea    0x1(%r14),%edx
  pxor   %xmm4,%xmm4
  pxor   %xmm1,%xmm1
  mov    %edx,%eax
  and    $0x3,%eax
  cvtsi2ssl 0x30(%rsp,%rax,4),%xmm4
  lea    0x3(%r14),%eax
  and    $0x3,%eax
  mov    0x30(%rsp,%rax,4),%eax
  test   %eax,%eax
  js     L81
L6:
  pxor   %xmm6,%xmm6
  pxor   %xmm3,%xmm3
  mulss  %xmm6,%xmm6
  cvtsi2ssl 0x30(%rsp,%r14,4),%xmm3
  movss  %xmm6,0x8(%rsp)
L175:
  movaps %xmm4,%xmm2
  movaps %xmm3,%xmm0
  movss  %xmm1,0x4(%rsp)
  mulss  %xmm4,%xmm2
  movss  %xmm4,0x14(%rsp)
  mulss  %xmm3,%xmm0
  movss  %xmm3,0x10(%rsp)
  addss  %xmm2,%xmm0
  call   <sqrt@plt>
  movss  0x4(%rsp),%xmm1
  movss  %xmm0,(%rsp)
  movss  0x8(%rsp),%xmm0
  mulss  %xmm1,%xmm1
  addss  %xmm1,%xmm0
  call   <sqrt@plt>
  movss  0xc(%rsp),%xmm5
  movss  (%rsp),%xmm2
  comiss %xmm5,%xmm2
  jbe    L83
  comiss %xmm0,%xmm5
  jbe    L83
  movss  0x10(%rsp),%xmm3
  pxor   %xmm7,%xmm7
  comiss %xmm7,%xmm3
  jbe    L83
  movss  0x14(%rsp),%xmm4
  comiss %xmm7,%xmm4
  jbe    L83
  comiss %xmm3,%xmm5
  ja     L47
L152:
  movss  0xc(%rsp),%xmm3
  comiss %xmm4,%xmm3
  ja     L139
L223:
  imul   $0xa4fa4fa5,%r15d,%eax
  add    $0x2d82d80,%eax
  ror    $0x7,%eax
  cmp    $0xb60b6,%eax
  ja     L163
  cmp    $0x3,%r14d
  jne    L8
L163:
  sub    $0x8,%rsp
  mov    %r12d,%ecx
  add    $0x1,%r14
  add    $0x5a,%ebx
  push   %r15
  sub    %ebp,%ecx
  mov    $0x5a00,%r15d
  push   %r13
  mov    0x34(%rsp),%eax
  push   %rax
  mov    0x38(%rsp),%r8d
  mov    %eax,%r9d
  mov    0x4c(%rsp),%edx
  mov    0x48(%rsp),%esi
  mov    0x40(%rsp),%rdi
  sub    %ebp,%r8d
  call   <XDrawArc@plt>
  add    $0x20,%rsp
  cmp    $0x4,%r14
  jne    L203
  nopl   0x0(%rax,%rax,1)
L109:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L71
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L83:
  mov    %ebx,%r13d
  shl    $0x6,%r13d
L8:
  add    $0x1,%r14
  add    $0x5a,%ebx
  cmp    $0x4,%r14
  je     L109
L203:
  lea    0x2(%r14),%eax
  and    $0x3,%eax
  mov    0x30(%rsp,%rax,4),%eax
  test   %eax,%eax
  jns    L176
L21:
  cmp    %ebp,0x30(%rsp,%r14,4)
  jle    L176
  mov    %eax,%edx
  neg    %edx
  cmp    %ebp,%edx
  jg     L109
  pxor   %xmm1,%xmm1
  movss  0xc(%rsp),%xmm7
  cvtsi2ss %eax,%xmm1
  movaps %xmm7,%xmm0
  mulss  %xmm7,%xmm0
  movaps %xmm1,%xmm2
  movss  %xmm1,(%rsp)
  mulss  %xmm1,%xmm2
  subss  %xmm2,%xmm0
  call   <sqrt@plt>
  lea    0x3(%r14),%eax
  movss  (%rsp),%xmm1
  lea    0x1(%r14),%edx
  and    $0x3,%eax
  movaps %xmm0,%xmm4
  mov    0x30(%rsp,%rax,4),%eax
  test   %eax,%eax
  jns    L6
  nopl   0x0(%rax,%rax,1)
L81:
  and    $0x3,%edx
  cmp    %ebp,0x30(%rsp,%rdx,4)
  jle    L6
  mov    %eax,%edx
  movss  %xmm1,0x4(%rsp)
  neg    %edx
  movss  %xmm4,(%rsp)
  cmp    %ebp,%edx
  jg     L109
  pxor   %xmm0,%xmm0
  movss  0xc(%rsp),%xmm7
  cvtsi2ss %eax,%xmm0
  movaps %xmm0,%xmm6
  mulss  %xmm0,%xmm6
  movaps %xmm7,%xmm0
  mulss  %xmm7,%xmm0
  movss  %xmm6,0x8(%rsp)
  subss  %xmm6,%xmm0
  call   <sqrt@plt>
  movss  (%rsp),%xmm4
  movss  0x4(%rsp),%xmm1
  movaps %xmm0,%xmm3
  jmp    L175
  nopw   0x0(%rax,%rax,1)
L139:
  divss  %xmm3,%xmm4
  movaps %xmm4,%xmm0
  call   <asin@plt>
  mulss  D23(%rip),%xmm0
  cvttss2si %xmm0,%r15d
  add    %ebx,%r15d
  shl    $0x6,%r15d
  sub    $0x20,%r15d
  jmp    L223
  nopl   0x0(%rax)
L47:
  divss  %xmm5,%xmm3
  movss  %xmm4,(%rsp)
  movaps %xmm3,%xmm0
  call   <acos@plt>
  mulss  D23(%rip),%xmm0
  movss  (%rsp),%xmm4
  cvttss2si %xmm0,%r13d
  add    %ebx,%r13d
  shl    $0x6,%r13d
  add    $0x20,%r13d
  jmp    L152
L71:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void XfDrawCircle(Display *display, Window window, GC gc, int xcen, int ycen, int radius, int npix, int nrast) {
  int i;
  int phi1 = 0, phi2 = 23040;
  int d[4];
  float dx, dy, ddx, ddy, r, diag, dmin;
  static float rtod;
  if (rtod == 0.0)
    rtod = 45.0 / atan(1.0);
  d[0] = npix - xcen;
  d[1] = ycen;
  d[2] = xcen;
  d[3] = nrast - ycen;
  r = (float)radius;
  for (i = 0; i < 4; i++) {
    if (d[((i + 2) % 4)] < 0 && radius < d[i]) {
      if (radius < abs(d[((i + 2) % 4)]))
        return;
      ddx = (float)d[((i + 2) % 4)];
      dy = sqrt(r * r - ddx * ddx);
    } else {
      ddx = 0.0;
      dy = (float)d[((i + 1) % 4)];
    }
    if (d[((i + 3) % 4)] < 0 && radius < d[((i + 1) % 4)]) {
      if (radius < abs(d[((i + 3) % 4)]))
        return;
      ddy = (float)d[((i + 3) % 4)];
      dx = sqrt(r * r - ddy * ddy);
    } else {
      ddy = 0.0;
      dx = (float)d[i];
    }
    diag = sqrt(dx * dx + dy * dy);
    dmin = sqrt(ddx * ddx + ddy * ddy);
    if ((diag > r) && (r > dmin) && (dx > 0.0) && (dy > 0.0)) {
      if (r > dx)
        phi1 = 64 * (90 * i + (int)(acos(dx / r) * rtod)) + 32;
      if (r > dy)
        phi2 = 64 * (90 * i + (int)(asin(dy / r) * rtod)) - 32;
      if (((phi2 % 5760) != 0) || (i == 3)) {
        XDrawArc(display, window, gc, (xcen - radius), (ycen - radius), (2 * radius), (2 * radius), phi1, phi2);
        phi2 = 23040;
      }
    } else
      phi1 = 5760 * i;
  }
  return;
}
```