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

```asm
<traparea>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  movss  %xmm0,-0x5c(%rbp)
  movss  %xmm1,-0x60(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movss  D102(%rip),%xmm0
  movss  %xmm0,-0x48(%rbp)
  pxor   %xmm1,%xmm1
  cvtss2sd -0x60(%rbp),%xmm1
  movsd  D122(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x60(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  D68(%rip),%xmm1
  divsd  %xmm1,%xmm0
  pxor   %xmm3,%xmm3
  cvtsd2ss %xmm0,%xmm3
  pxor   %xmm0,%xmm0
  cvtss2sd -0x5c(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd -0x48(%rbp),%xmm1
  movsd  D68(%rip),%xmm2
  divsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm4,%xmm4
  cvtsd2ss %xmm0,%xmm4
  movd   %xmm4,%eax
  lea    -0x20(%rbp),%rdx
  add    $0x4,%rdx
  lea    -0x40(%rbp),%rcx
  lea    0x4(%rcx),%rsi
  mov    -0x58(%rbp),%rcx
  mov    %rcx,%rdi
  movaps %xmm3,%xmm1
  movd   %eax,%xmm0
  call   <phi2xy@plt>
  pxor   %xmm1,%xmm1
  cvtss2sd -0x60(%rbp),%xmm1
  movsd  D122(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x60(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  D68(%rip),%xmm1
  divsd  %xmm1,%xmm0
  pxor   %xmm3,%xmm3
  cvtsd2ss %xmm0,%xmm3
  pxor   %xmm1,%xmm1
  cvtss2sd -0x5c(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x48(%rbp),%xmm0
  movsd  D68(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  pxor   %xmm5,%xmm5
  cvtsd2ss %xmm0,%xmm5
  movd   %xmm5,%eax
  lea    -0x20(%rbp),%rdx
  add    $0x8,%rdx
  lea    -0x40(%rbp),%rcx
  lea    0x8(%rcx),%rsi
  mov    -0x58(%rbp),%rcx
  mov    %rcx,%rdi
  movaps %xmm3,%xmm1
  movd   %eax,%xmm0
  call   <phi2xy@plt>
  pxor   %xmm0,%xmm0
  cvtss2sd -0x60(%rbp),%xmm0
  movsd  D122(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x60(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  D68(%rip),%xmm1
  divsd  %xmm1,%xmm0
  pxor   %xmm3,%xmm3
  cvtsd2ss %xmm0,%xmm3
  pxor   %xmm1,%xmm1
  cvtss2sd -0x5c(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x48(%rbp),%xmm0
  movsd  D68(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  pxor   %xmm6,%xmm6
  cvtsd2ss %xmm0,%xmm6
  movd   %xmm6,%eax
  lea    -0x20(%rbp),%rdx
  add    $0xc,%rdx
  lea    -0x40(%rbp),%rcx
  lea    0xc(%rcx),%rsi
  mov    -0x58(%rbp),%rcx
  mov    %rcx,%rdi
  movaps %xmm3,%xmm1
  movd   %eax,%xmm0
  call   <phi2xy@plt>
  pxor   %xmm0,%xmm0
  cvtss2sd -0x60(%rbp),%xmm0
  movsd  D122(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x60(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  D68(%rip),%xmm1
  divsd  %xmm1,%xmm0
  pxor   %xmm3,%xmm3
  cvtsd2ss %xmm0,%xmm3
  pxor   %xmm0,%xmm0
  cvtss2sd -0x5c(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd -0x48(%rbp),%xmm1
  movsd  D68(%rip),%xmm2
  divsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm7,%xmm7
  cvtsd2ss %xmm0,%xmm7
  movd   %xmm7,%eax
  lea    -0x20(%rbp),%rdx
  add    $0x10,%rdx
  lea    -0x40(%rbp),%rcx
  lea    0x10(%rcx),%rsi
  mov    -0x58(%rbp),%rcx
  mov    %rcx,%rdi
  movaps %xmm3,%xmm1
  movd   %eax,%xmm0
  call   <phi2xy@plt>
  movss  -0x3c(%rbp),%xmm0
  movss  -0x38(%rbp),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  -0x14(%rbp),%xmm0
  movss  -0x18(%rbp),%xmm2
  subss  %xmm2,%xmm0
  mulss  %xmm1,%xmm0
  movss  -0x1c(%rbp),%xmm1
  movss  -0x18(%rbp),%xmm3
  movaps %xmm1,%xmm2
  subss  %xmm3,%xmm2
  movss  -0x34(%rbp),%xmm1
  movss  -0x38(%rbp),%xmm3
  subss  %xmm3,%xmm1
  mulss  %xmm2,%xmm1
  subss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,%edi
  call   <fabs@plt>
  movsd  %xmm0,-0x68(%rbp)
  movss  -0x3c(%rbp),%xmm0
  movss  -0x30(%rbp),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  -0x14(%rbp),%xmm0
  movss  -0x10(%rbp),%xmm2
  subss  %xmm2,%xmm0
  mulss  %xmm1,%xmm0
  movss  -0x1c(%rbp),%xmm1
  movss  -0x10(%rbp),%xmm3
  movaps %xmm1,%xmm2
  subss  %xmm3,%xmm2
  movss  -0x34(%rbp),%xmm1
  movss  -0x30(%rbp),%xmm3
  subss  %xmm3,%xmm1
  mulss  %xmm2,%xmm1
  subss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,%edi
  call   <fabs@plt>
  movsd  -0x68(%rbp),%xmm1
  addsd  %xmm0,%xmm1
  movsd  D118(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x44(%rbp)
  movss  -0x44(%rbp),%xmm0
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L0
  call   <__stack_chk_fail@plt>
L0:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D102
type: byte[4]
name: read_data
arguments: label: D122
type: byte[8]
name: read_data
arguments: label: D68
type: f64
name: read_data
arguments: label: D118
type: f64

tool: {"D102": [0x35,0xfa,0x8e,0x3c]}

tool: {"D122": [0x29,0x5c,0x8f,0xc2,0xf5,0x28,0xf0,0x3f]}

tool: D68: 2

tool: D118: 0.5

assistant: ```c
float traparea(float a[], float cphi, float r) {
  float phi2xy(float phi, float r, float a[], float *x, float *y);
  float x[5], y[5], area, delphi;
  delphi = 1.0 / 180. * 3.14159265352982;
  phi2xy(cphi - delphi / 2., (r * (1 + 0.01) + r) / 2., a, &x[1], &y[1]);
  phi2xy(cphi + delphi / 2., (r * (1 + 0.01) + r) / 2., a, &x[2], &y[2]);
  phi2xy(cphi + delphi / 2., (r / (1 + 0.01) + r) / 2., a, &x[3], &y[3]);
  phi2xy(cphi - delphi / 2., (r / (1 + 0.01) + r) / 2., a, &x[4], &y[4]);
  area = 0.5 * (fabs((x[1] - x[2]) * (y[3] - y[2]) - (y[1] - y[2]) * (x[3] - x[2])) + fabs((x[1] - x[4]) * (y[3] - y[4]) - (y[1] - y[4]) * (x[3] - x[4])));
  return (area);
}
```