user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<write_svg_circle>:
  endbr64
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x30,%rsp
  movsd  (%rdx),%xmm2
  movsd  0x8(%rdx),%xmm1
  mov    0x4(%rcx),%eax
  mov    (%rcx),%edx
  test   %r8d,%r8d
  je     L58
  movsd  D114(%rip),%xmm0
  movsd  0x10(%rbx),%xmm3
  mulsd  %xmm0,%xmm3
  mulsd  %xmm0,%xmm2
  mulsd  %xmm0,%xmm1
  movsd  %xmm3,0x10(%rbx)
  movsd  0x18(%rbx),%xmm3
  movsd  %xmm2,(%rbx)
  mulsd  %xmm0,%xmm3
  movsd  %xmm1,0x8(%rbx)
  movsd  %xmm3,0x18(%rbx)
  pxor   %xmm3,%xmm3
  cvtsi2sd %edx,%xmm3
  mulsd  %xmm0,%xmm3
  cvttsd2si %xmm3,%edx
  pxor   %xmm3,%xmm3
  cvtsi2sd %eax,%xmm3
  mov    %edx,(%rcx)
  mulsd  %xmm0,%xmm3
  cvttsd2si %xmm3,%eax
  pxor   %xmm3,%xmm3
  cvtsi2sdl 0x8(%rcx),%xmm3
  mov    %eax,0x4(%rcx)
  mulsd  %xmm0,%xmm3
  cvttsd2si %xmm3,%ecx
  pxor   %xmm3,%xmm3
  cvtsi2sdl 0xc(%rbp),%xmm3
  mov    %ecx,0x8(%rbp)
  mulsd  %xmm0,%xmm3
  cvttsd2si %xmm3,%ecx
  mov    %ecx,0xc(%rbp)
L58:
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  subsd  %xmm2,%xmm0
  cvttsd2si %xmm0,%esi
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%edi
  call   <atan2@plt>
  movsd  %xmm0,(%rsp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x8(%rbp),%xmm0
  subsd  (%rbx),%xmm0
  cvttsd2si %xmm0,%esi
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0xc(%rbp),%xmm0
  subsd  0x8(%rbx),%xmm0
  cvttsd2si %xmm0,%edi
  call   <atan2@plt>
  movsd  D97(%rip),%xmm4
  mulsd  0x10(%rbx),%xmm4
  movapd %xmm0,%xmm1
  movsd  %xmm0,0x10(%rsp)
  movsd  (%rsp),%xmm0
  movsd  %xmm4,0x8(%rsp)
  call   <angle_diff@plt>
  movsd  0x10(%rsp),%xmm7
  movapd %xmm0,%xmm1
  movsd  D90(%rip),%xmm0
  divsd  0x8(%rsp),%xmm0
  comisd %xmm1,%xmm0
  ja     L44
L78:
  lea    0x28(%rsp),%rbp
  lea    0x20(%rsp),%r14
  movapd %xmm7,%xmm0
  movsd  %xmm7,0x18(%rsp)
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <sincos@plt>
  movsd  (%rsp),%xmm0
  mov    %r14,%rsi
  mov    %rbp,%rdi
  movsd  0x20(%rsp),%xmm5
  movsd  0x28(%rsp),%xmm6
  movsd  %xmm5,0x10(%rsp)
  movsd  %xmm6,0x8(%rsp)
  call   <sincos@plt>
  movsd  0x10(%rbx),%xmm2
  movsd  (%rbx),%xmm4
  movsd  0x20(%rsp),%xmm5
  movsd  0x28(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm6
  movsd  0x8(%rbx),%xmm3
  mulsd  %xmm2,%xmm5
  movsd  0x18(%rsp),%xmm7
  mulsd  %xmm2,%xmm1
  mulsd  %xmm2,%xmm6
  movapd %xmm5,%xmm0
  movsd  0x10(%rsp),%xmm5
  addsd  %xmm4,%xmm0
  addsd  %xmm3,%xmm1
  mulsd  %xmm2,%xmm5
  addsd  %xmm3,%xmm6
  pxor   %xmm3,%xmm3
  addsd  %xmm4,%xmm5
  movsd  (%rsp),%xmm4
  comisd %xmm4,%xmm3
  jbe    L55
  movsd  D97(%rip),%xmm8
  addsd  %xmm4,%xmm8
  movsd  %xmm8,(%rsp)
L55:
  comisd %xmm7,%xmm3
  jbe    L76
  addsd  D97(%rip),%xmm7
L76:
  movsd  (%rsp),%xmm4
  comisd %xmm7,%xmm4
  ja     L2
L20:
  movapd %xmm7,%xmm3
  xor    %edx,%edx
  subsd  (%rsp),%xmm3
  mov    $0x1,%ecx
  comisd D4(%rip),%xmm3
  pxor   %xmm4,%xmm4
  movapd %xmm2,%xmm3
  mov    %r12,%rdi
  lea    D24(%rip),%rsi
  mov    $0x7,%eax
  movsd  %xmm7,0x8(%rsp)
  seta   %dl
  call   <fprintf@plt>
  movsd  D31(%rip),%xmm0
  mov    %r12,%rdi
  lea    D69(%rip),%rsi
  mov    $0x1,%eax
  call   <fprintf@plt>
  movsd  0x8(%rsp),%xmm7
L6:
  movsd  0x20(%rbx),%xmm4
  movsd  (%rbx),%xmm0
  mov    %r13,%rdi
  movapd %xmm7,%xmm6
  movsd  0x18(%rbx),%xmm3
  movsd  0x10(%rbx),%xmm2
  lea    D21(%rip),%rsi
  mov    $0x7,%eax
  movsd  0x8(%rbx),%xmm1
  movsd  (%rsp),%xmm5
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    10b0 <fprintf@plt>
  nopw   0x0(%rax,%rax,1)
L2:
  addsd  D97(%rip),%xmm7
  jmp    L20
  nopl   (%rax)
L44:
  movsd  (%rsp),%xmm0
  movapd %xmm7,%xmm1
  movsd  %xmm7,0x8(%rsp)
  call   <angle_diff_signed@plt>
  movsd  0x8(%rsp),%xmm7
  test   %rax,%rax
  jle    L78
  movsd  0x18(%rbx),%xmm3
  movsd  (%rbx),%xmm0
  mov    $0x1,%edx
  mov    %r12,%rdi
  movsd  0x10(%rbx),%xmm2
  movsd  0x8(%rbx),%xmm1
  mov    $0x4,%eax
  lea    D103(%rip),%rsi
  call   <fprintf@plt>
  movsd  0x8(%rsp),%xmm7
  jmp    L6
```

tool_calls: name: read_data
arguments: tag: D114
type: f64
name: read_data
arguments: tag: D97
type: f64
name: read_data
arguments: tag: D90
type: byte[8]
name: read_data
arguments: tag: D4
type: f64[2]
name: read_data
arguments: tag: D24
type: string
name: read_data
arguments: tag: D31
type: f32[2]
name: read_data
arguments: tag: D69
type: string
name: read_data
arguments: tag: D21
type: string
name: read_data
arguments: tag: D103
type: string

tool: D114: 1.25

tool: D97: 6.28318530718

tool: {"D90": [0x2d,0x64,0xdd,0x1a,0x83,0xc5,0x21,0x40]}

tool: {"D4": [3.141592653589793,1.0]}

tool: D24: <path d="M %f,%f A%f,%f %f %d,%d %f,%f"

tool: {"D31": [0.0,1.875]}

tool: D69:  fill="none" stroke ="blue" stroke-width="%d" />


tool: D21: %f %f %f %f %f %f %f


tool: D103: <ellipse cx="%f" cy="%f" rx="%f" ry="%f" stroke="blue" stroke-width="%d" fill="none" /> 


assistant: ```c
void write_svg_circle(FILE *fe, FILE *svg, double *param, int *pext, int smooth) {
  int fa = 0, fs = 1;
  double ang_start, ang_end;
  if (smooth) {
    param[0] *= 1.25;
    param[1] *= 1.25;
    param[2] *= 1.25;
    param[3] *= 1.25;
    pext[0] *= 1.25;
    pext[1] *= 1.25;
    pext[2] *= 1.25;
    pext[3] *= 1.25;
  }
  ang_start = atan2(pext[1] - param[1], pext[0] - param[0]);
  ang_end = atan2(pext[3] - param[1], pext[2] - param[0]);
  double C = 6.28318530718 * param[2];
  if (angle_diff(ang_start, ang_end) < 6.28318530718 * 1.414213562373095 / C && angle_diff_signed(ang_start, ang_end) > 0) {
    fprintf(svg, "<ellipse cx=\"%f\" cy=\"%f\" rx=\"%f\" ry=\"%f\" stroke=\"blue\" stroke-width=\"%d\" fill=\"none\" /> \n", param[0], param[1], param[2], param[3], 1);
  } else {
    double x1, y1, x2, y2;
    x1 = param[2] * cos(ang_start) + param[0];
    y1 = param[2] * sin(ang_start) + param[1];
    x2 = param[2] * cos(ang_end) + param[0];
    y2 = param[2] * sin(ang_end) + param[1];
    if (ang_start < 0)
      ang_start += 6.28318530718;
    if (ang_end < 0)
      ang_end += 6.28318530718;
    if (ang_end < ang_start)
      ang_end += 6.28318530718;
    if ((ang_end - ang_start) > 3.14159265358979323846)
      fa = 1;
    fprintf(svg, "<path d=\"M %f,%f A%f,%f %f %d,%d %f,%f\"", x1, y1, param[2], param[2], 0.0, fa, fs, x2, y2);
    fprintf(svg, " fill=\"none\" stroke =\"blue\" stroke-width=\"%d\" />\n", 1);
  }
  fprintf(fe, "%f %f %f %f %f %f %f\n", param[0], param[1], param[2], param[3], param[4], ang_start, ang_end);
}
```