user: Translate the below assembly code into C programming language:

```asm
<calc_arc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xe0,%rsp
  movsd  %xmm0,-0x88(%rbp)
  movsd  %xmm1,-0x90(%rbp)
  movsd  %xmm2,-0x98(%rbp)
  movsd  %xmm3,-0xa0(%rbp)
  movsd  %xmm4,-0xa8(%rbp)
  movsd  %xmm5,-0xb0(%rbp)
  mov    %rdi,-0xb8(%rbp)
  mov    %rsi,-0xc0(%rbp)
  mov    %rdx,-0xc8(%rbp)
  mov    %rcx,-0xd0(%rbp)
  mov    %r8,-0xd8(%rbp)
  movsd  D317(%rip),%xmm0
  movsd  %xmm0,-0x70(%rbp)
  movsd  D94(%rip),%xmm0
  movsd  %xmm0,-0x68(%rbp)
  movsd  D118(%rip),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x98(%rbp),%xmm0
  subsd  -0x88(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  subsd  -0x90(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0xa8(%rbp),%xmm0
  subsd  -0x88(%rbp),%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  subsd  -0x90(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0x98(%rbp),%xmm0
  addsd  -0x88(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  addsd  -0x90(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0xa8(%rbp),%xmm0
  addsd  -0x88(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  addsd  -0x90(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x58(%rbp),%xmm0
  mulsd  -0x40(%rbp),%xmm0
  movsd  -0x50(%rbp),%xmm1
  movapd %xmm1,%xmm2
  mulsd  -0x48(%rbp),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  D6(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movq   D291(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd -0x68(%rbp),%xmm0
  jbe    L210
  movsd  -0x58(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x38(%rbp),%xmm1
  movsd  -0x50(%rbp),%xmm0
  mulsd  -0x30(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x48(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x28(%rbp),%xmm1
  movsd  -0x40(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x40(%rbp),%xmm0
  movsd  -0x8(%rbp),%xmm1
  mulsd  -0x50(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm0
  divsd  -0x18(%rbp),%xmm0
  mov    -0xc0(%rbp),%rax
  movsd  %xmm0,(%rax)
  movsd  -0x8(%rbp),%xmm0
  mulsd  -0x58(%rbp),%xmm0
  movsd  -0x10(%rbp),%xmm1
  mulsd  -0x48(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm0
  divsd  -0x18(%rbp),%xmm0
  mov    -0xc8(%rbp),%rax
  movsd  %xmm0,(%rax)
  movsd  -0x40(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x48(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movsd  %xmm0,-0xe0(%rbp)
  movsd  -0x50(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x58(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  addsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x98(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  mov    -0xc8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0xa0(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movsd  -0x98(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0xa0(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    -0xb8(%rbp),%rdx
  mov    %rax,(%rdx)
  movsd  -0x10(%rbp),%xmm0
  comisd -0x70(%rbp),%xmm0
  jbe    L320
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  divsd  -0x10(%rbp),%xmm1
  movsd  D19(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L320
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x88(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0xa8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  mov    -0xc8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x90(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  mov    -0xc8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0xb0(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x88(%rbp),%xmm0
  movq   D291(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x68(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L170
  movsd  -0x90(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L253
  movsd  D299(%rip),%xmm0
  jmp    L146
L253:
  movsd  D137(%rip),%xmm0
L146:
  mov    -0xd0(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L264
L170:
  movsd  -0x90(%rbp),%xmm0
  divsd  -0x88(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <atan@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mulsd  -0x60(%rbp),%xmm0
  mov    -0xd0(%rbp),%rax
  movsd  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  comisd -0x88(%rbp),%xmm0
  jbe    L264
  mov    -0xd0(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D201(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0xd0(%rbp),%rax
  movsd  %xmm0,(%rax)
L264:
  movsd  -0x98(%rbp),%xmm0
  movq   D291(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x68(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L367
  movsd  -0xa0(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L374
  movsd  D299(%rip),%xmm0
  jmp    L131
L374:
  movsd  D137(%rip),%xmm0
L131:
  movsd  %xmm0,-0x78(%rbp)
  jmp    L254
L367:
  movsd  -0xa0(%rbp),%xmm0
  divsd  -0x98(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <atan@plt>
  movsd  -0x60(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x98(%rbp),%xmm0
  jbe    L254
  movsd  -0x78(%rbp),%xmm1
  movsd  D201(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
L254:
  movsd  -0xa8(%rbp),%xmm0
  movq   D291(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x68(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L285
  movsd  -0xb0(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L363
  movsd  D299(%rip),%xmm0
  jmp    L343
L363:
  movsd  D137(%rip),%xmm0
L343:
  mov    -0xd8(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L218
L285:
  movsd  -0xb0(%rbp),%xmm0
  divsd  -0xa8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <atan@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mulsd  -0x60(%rbp),%xmm0
  mov    -0xd8(%rbp),%rax
  movsd  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  comisd -0xa8(%rbp),%xmm0
  jbe    L218
  mov    -0xd8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D201(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0xd8(%rbp),%rax
  movsd  %xmm0,(%rax)
L218:
  mov    -0xd0(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0xd8(%rbp),%rax
  movsd  (%rax),%xmm1
  comisd %xmm1,%xmm0
  jbe    L105
  mov    -0xd0(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd -0x78(%rbp),%xmm0
  ja     L111
  jmp    L47
L111:
  mov    -0xd8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x78(%rbp),%xmm0
  comisd %xmm1,%xmm0
  ja     L317
  jmp    L47
L317:
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm0
  movq   D165(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0xb8(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L47
L105:
  mov    -0xd8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x78(%rbp),%xmm0
  comisd %xmm1,%xmm0
  ja     L127
  mov    -0xd0(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd -0x78(%rbp),%xmm0
  ja     L127
  jmp    L47
L127:
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm0
  movq   D165(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0xb8(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L47
L210:
  movsd  -0x48(%rbp),%xmm0
  movq   D291(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x68(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L320
  movsd  -0x40(%rbp),%xmm0
  movq   D291(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x68(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L320
  movsd  -0x58(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x50(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  movsd  D94(%rip),%xmm1
  movq   %rax,%xmm0
  divsd  %xmm1,%xmm0
  mov    -0xb8(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x68(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L74
  mov    -0xb8(%rbp),%rax
  movsd  D12(%rip),%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x88(%rbp),%xmm0
  subsd  -0x68(%rbp),%xmm0
  mov    -0xc0(%rbp),%rax
  movsd  %xmm0,(%rax)
  movsd  -0x90(%rbp),%xmm0
  subsd  -0x68(%rbp),%xmm0
  mov    -0xc8(%rbp),%rax
  movsd  %xmm0,(%rax)
  movsd  -0xa8(%rbp),%xmm0
  addsd  -0x68(%rbp),%xmm0
  mov    -0xd0(%rbp),%rax
  movsd  %xmm0,(%rax)
  movsd  -0xb0(%rbp),%xmm0
  addsd  -0x68(%rbp),%xmm0
  mov    -0xd8(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L47
L74:
  movsd  -0x38(%rbp),%xmm0
  movsd  D94(%rip),%xmm1
  divsd  %xmm1,%xmm0
  mov    -0xc0(%rbp),%rax
  movsd  %xmm0,(%rax)
  movsd  -0x30(%rbp),%xmm0
  movsd  D94(%rip),%xmm1
  divsd  %xmm1,%xmm0
  mov    -0xc8(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x88(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  mov    -0xc8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x90(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x58(%rbp),%xmm0
  movq   D291(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x68(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L277
  movsd  -0x50(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L117
  movsd  D299(%rip),%xmm0
  jmp    L101
L117:
  movsd  D137(%rip),%xmm0
L101:
  mov    -0xd0(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L305
L277:
  movsd  -0x50(%rbp),%xmm0
  divsd  -0x58(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <atan@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mulsd  -0x60(%rbp),%xmm0
  mov    -0xd0(%rbp),%rax
  movsd  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  comisd -0x58(%rbp),%xmm0
  jbe    L305
  mov    -0xd0(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D201(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0xd0(%rbp),%rax
  movsd  %xmm0,(%rax)
L305:
  mov    -0xd0(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D48(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0xd8(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L47
L320:
  mov    -0xb8(%rbp),%rax
  movsd  D12(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xc0(%rbp),%rax
  movsd  -0x88(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xc8(%rbp),%rax
  movsd  -0x90(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xd0(%rbp),%rax
  movsd  -0xa8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xd8(%rbp),%rax
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,(%rax)
L47:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D317
data_type: f64
name: retrieve_data
arguments: data_label: D94
data_type: f64
name: retrieve_data
arguments: data_label: D118
data_type: f64
name: retrieve_data
arguments: data_label: D6
data_type: f64
name: retrieve_data
arguments: data_label: D291
data_type: qword
name: retrieve_data
arguments: data_label: D19
data_type: f64
name: retrieve_data
arguments: data_label: D299
data_type: f64
name: retrieve_data
arguments: data_label: D137
data_type: f32[2]
name: retrieve_data
arguments: data_label: D201
data_type: f64
name: retrieve_data
arguments: data_label: D165
data_type: f32[2]
name: retrieve_data
arguments: data_label: D12
data_type: f32[2]
name: retrieve_data
arguments: data_label: D48
data_type: f64

tool: D317: 1e-05

tool: D94: 2

tool: D118: 57.29577951308232

tool: D6: 4

tool: D291: 9223372036854775807

tool: D19: 10

tool: D299: 90

tool: {"D137": [0.0,-3.3515625]}

tool: D201: 180

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

tool: {"D12": [0.0,-7.7630157470703125]}

tool: D48: 360

assistant: ```c
void calc_arc(double Ax, double Ay, double Bx, double By, double Cx, double Cy, double *Rad, double *Ox, double *Oy, double *alpha_start, double *alpha_end) {
  const double d_seps = 0.00001;
  const double d_eps = 2.0;
  const double d_r2d = 57.29577951308232;
  double D, Bx_m_Ax = Bx - Ax, By_m_Ay = By - Ay, Cx_m_Ax = Cx - Ax, Cy_m_Ay = Cy - Ay, Bx_p_Ax = Bx + Ax, By_p_Ay = By + Ay, Cx_p_Ax = Cx + Ax, Cy_p_Ay = Cy + Ay;
  D = 4.0 * (Bx_m_Ax * Cy_m_Ay - By_m_Ay * Cx_m_Ax);
  if (fabs(D) > d_eps) {
    double tmp1 = Bx_m_Ax * Bx_p_Ax + By_m_Ay * By_p_Ay;
    double tmp2 = Cx_m_Ax * Cx_p_Ax + Cy_m_Ay * Cy_p_Ay;
    *Ox = 2.0 * (tmp1 * Cy_m_Ay - tmp2 * By_m_Ay) / D;
    *Oy = 2.0 * (tmp2 * Bx_m_Ax - tmp1 * Cx_m_Ax) / D;
    tmp1 = sqrt(Cy_m_Ay * Cy_m_Ay + Cx_m_Ax * Cx_m_Ax) + sqrt(By_m_Ay * By_m_Ay + Bx_m_Ax * Bx_m_Ax);
    Bx -= *Ox;
    By -= *Oy;
    *Rad = sqrt(Bx * Bx + By * By);
    if ((tmp1 > d_seps) && (*Rad / tmp1 < 10.0)) {
      double alpha_m;
      Ax -= *Ox;
      Cx -= *Ox;
      Ay -= *Oy;
      Cy -= *Oy;
      if (fabs(Ax) < d_eps) {
        *alpha_start = (Ay > 0.0) ? (90.0) : (-90.0);
      } else {
        *alpha_start = atan(Ay / Ax) * d_r2d;
        if (Ax < 0.0)
          *alpha_start += (180.0);
      }
      if (fabs(Bx) < d_eps) {
        alpha_m = (By > 0.0) ? (90.0) : (-90.0);
      } else {
        alpha_m = atan(By / Bx) * d_r2d;
        if (Bx < 0.0)
          alpha_m += (180.0);
      }
      if (fabs(Cx) < d_eps) {
        *alpha_end = (Cy > 0.0) ? (90.0) : (-90.0);
      } else {
        *alpha_end = atan(Cy / Cx) * d_r2d;
        if (Cx < 0.0)
          *alpha_end += (180.0);
      }
      if (*alpha_start > *alpha_end) {
        if ((alpha_m < *alpha_start) && (alpha_m > *alpha_end)) {
          *Rad = -*Rad;
        }
      } else {
        if ((alpha_m > *alpha_end) || (alpha_m < *alpha_start)) {
          *Rad = -*Rad;
        }
      }
      return;
    }
  } else {
    if ((fabs(Cx_m_Ax) < d_eps) && (fabs(Cy_m_Ay) < d_eps)) {
      *Rad = sqrt(Bx_m_Ax * Bx_m_Ax + By_m_Ay * By_m_Ay) / 2.0;
      if (*Rad < d_eps) {
        *Rad = -1E+5 - 10.0;
        *Ox = Ax - d_eps;
        *Oy = Ay - d_eps;
        *alpha_start = Cx + d_eps;
        *alpha_end = Cy + d_eps;
        return;
      }
      *Ox = Bx_p_Ax / 2.0;
      *Oy = By_p_Ay / 2.0;
      Bx_m_Ax = Ax - *Ox;
      By_m_Ay = Ay - *Oy;
      if (fabs(Bx_m_Ax) < d_eps) {
        *alpha_start = (By_m_Ay > 0.0) ? (90.0) : (-90.0);
      } else {
        *alpha_start = atan(By_m_Ay / Bx_m_Ax) * d_r2d;
        if (Bx_m_Ax < 0.0)
          *alpha_start += (180.0);
      }
      *alpha_end = *alpha_start + 360.0;
      return;
    }
  }
  *Rad = -1E+5 - 10.0;
  *Ox = Ax;
  *Oy = Ay;
  *alpha_start = Cx;
  *alpha_end = Cy;
}
```