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

```asm
<thickenPoly>:
  endbr64
  push   %r15
  movapd %xmm0,%xmm4
  mov    %rsi,%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  push   %rbx
  mov    %r8,%rbx
  sub    $0x68,%rsp
  mov    0xa8(%rsp),%eax
  movzwl 0xa0(%rsp),%ecx
  mov    %edx,0xc(%rsp)
  cmpw   $0x0,0xb0(%rsp)
  mov    %cx,0x50(%rsp)
  mov    %ax,0x52(%rsp)
  je     L253
  movslq %edx,%rdx
  movsd  (%rdi),%xmm0
  ucomisd -0x8(%rdi,%rdx,8),%xmm0
  lea    0x0(,%rdx,8),%rsi
  jp     L207
  jne    L207
  movsd  (%r15),%xmm0
  ucomisd -0x8(%r15,%rsi,1),%xmm0
  jp     L207
  jne    L207
  nopl   0x0(%rax,%rax,1)
L253:
  mov    0xc(%rsp),%ecx
  lea    -0x1(%rcx),%edx
L46:
  test   %ax,%ax
  jne    L123
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L123
  test   %r9d,%r9d
  je     L283
  movsd  (%r14),%xmm0
  mov    $0x1,%r13d
  movsd  %xmm0,(%r12)
  movsd  (%r15),%xmm0
  movsd  %xmm0,(%rbx)
  jmp    L270
  nopl   0x0(%rax)
L123:
  xor    %r13d,%r13d
L270:
  test   %edx,%edx
  jle    L334
  lea    0x1(%rdx),%eax
  mov    $0x1,%ebp
  pxor   %xmm2,%xmm2
  mov    %rax,0x20(%rsp)
L230:
  cmp    %ebp,0xc(%rsp)
  je     L202
  lea    0x0(,%rbp,8),%rax
  lea    (%r14,%rax,1),%rsi
  add    %r15,%rax
L169:
  movsd  (%rax),%xmm1
  movsd  -0x8(%r15,%rbp,8),%xmm6
  movsd  -0x8(%r14,%rbp,8),%xmm7
  movsd  (%rsi),%xmm3
  movapd %xmm1,%xmm5
  cmpw   $0x0,0x50(%rsp)
  movsd  %xmm1,0x18(%rsp)
  subsd  %xmm7,%xmm3
  subsd  %xmm6,%xmm5
  movsd  %xmm6,0x10(%rsp)
  jne    L163
  movsd  D37(%rip),%xmm0
  mov    %r9d,0x54(%rsp)
  movsd  %xmm7,0x48(%rsp)
  mulsd  %xmm5,%xmm0
  movsd  %xmm2,0x40(%rsp)
  divsd  D92(%rip),%xmm0
  mulsd  D1(%rip),%xmm0
  movsd  %xmm5,0x38(%rsp)
  movsd  %xmm4,0x58(%rsp)
  movsd  %xmm3,0x28(%rsp)
  call   <sin@plt>
  movsd  0x10(%rsp),%xmm6
  mulsd  D37(%rip),%xmm6
  divsd  D92(%rip),%xmm6
  movsd  %xmm0,0x30(%rsp)
  movapd %xmm6,%xmm0
  call   <cos@plt>
  movsd  0x18(%rsp),%xmm1
  mulsd  D37(%rip),%xmm1
  divsd  D92(%rip),%xmm1
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm1,%xmm0
  call   <cos@plt>
  movsd  0x28(%rsp),%xmm3
  movsd  D37(%rip),%xmm4
  movsd  %xmm0,0x18(%rsp)
  mulsd  %xmm3,%xmm4
  movapd %xmm4,%xmm0
  divsd  D92(%rip),%xmm0
  mulsd  D1(%rip),%xmm0
  call   <sin@plt>
  movsd  0x10(%rsp),%xmm7
  mov    0x54(%rsp),%r9d
  mulsd  0x18(%rsp),%xmm7
  movapd %xmm0,%xmm1
  movsd  0x30(%rsp),%xmm8
  movsd  0x28(%rsp),%xmm3
  movsd  0x38(%rsp),%xmm5
  mulsd  %xmm8,%xmm8
  movsd  0x40(%rsp),%xmm2
  movsd  0x58(%rsp),%xmm4
  movapd %xmm7,%xmm0
  pxor   %xmm7,%xmm7
  mulsd  %xmm1,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  %xmm8,%xmm0
  ucomisd %xmm0,%xmm7
  movsd  0x48(%rsp),%xmm7
  ja     L89
  sqrtsd %xmm0,%xmm0
L34:
  movsd  %xmm4,0x40(%rsp)
  movsd  D53(%rip),%xmm4
  mov    %r9d,0x38(%rsp)
  minsd  %xmm0,%xmm4
  movsd  %xmm7,0x30(%rsp)
  movsd  %xmm5,0x28(%rsp)
  movsd  %xmm3,0x18(%rsp)
  movapd %xmm4,%xmm0
  movsd  %xmm2,0x10(%rsp)
  call   <asin@plt>
  movsd  0x10(%rsp),%xmm2
  mov    0x38(%rsp),%r9d
  addsd  %xmm0,%xmm0
  mulsd  D13(%rip),%xmm0
  movsd  0x18(%rsp),%xmm3
  movsd  0x28(%rsp),%xmm5
  movsd  0x30(%rsp),%xmm7
  movsd  0x40(%rsp),%xmm4
L124:
  cmpw   $0x0,0x52(%rsp)
  je     L213
L144:
  cmp    %r13d,%r9d
  je     L283
  movslq %r13d,%rsi
  comisd %xmm4,%xmm0
  lea    0x1(%r13),%edi
  movsd  %xmm7,(%r12,%rsi,8)
  movsd  -0x8(%r15,%rbp,8),%xmm1
  movsd  %xmm1,(%rbx,%rsi,8)
  ja     L296
L217:
  mov    %edi,%r13d
L162:
  add    $0x1,%rbp
  cmp    %rbp,0x20(%rsp)
  jne    L230
L334:
  add    $0x68,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L163:
  movapd %xmm5,%xmm1
  movapd %xmm3,%xmm0
  pxor   %xmm6,%xmm6
  mulsd  %xmm5,%xmm1
  mulsd  %xmm3,%xmm0
  addsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm6
  ja     L192
  cmpw   $0x0,0x52(%rsp)
  sqrtsd %xmm0,%xmm0
  jne    L144
L213:
  addsd  %xmm0,%xmm2
  comisd %xmm4,%xmm2
  jb     L162
  subsd  %xmm4,%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  divsd  %xmm0,%xmm1
  cmp    %r13d,%r9d
  je     L283
  lea    0x1(%r13),%eax
  cltq
  jmp    L228
  nopl   0x0(%rax)
L278:
  movsd  -0x8(%r14,%rbp,8),%xmm7
  add    $0x1,%rax
L228:
  movapd %xmm3,%xmm6
  comisd %xmm4,%xmm2
  mov    %eax,%r13d
  mulsd  %xmm1,%xmm6
  mulsd  %xmm5,%xmm1
  addsd  %xmm7,%xmm6
  movsd  %xmm6,-0x8(%r12,%rax,8)
  addsd  -0x8(%r15,%rbp,8),%xmm1
  movsd  %xmm1,-0x8(%rbx,%rax,8)
  jb     L162
  subsd  %xmm4,%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  divsd  %xmm0,%xmm1
  cmp    %eax,%r9d
  jne    L278
L283:
  mov    $0xffffffff,%r13d
  jmp    L334
  nopl   0x0(%rax)
L202:
  mov    %r15,%rax
  mov    %r14,%rsi
  jmp    L169
  nopl   0x0(%rax,%rax,1)
L207:
  mov    0xc(%rsp),%edx
  jmp    L46
  nopl   0x0(%rax)
L296:
  divsd  %xmm4,%xmm0
  mov    %r9d,0x30(%rsp)
  mov    %edi,0x28(%rsp)
  movsd  %xmm2,0x18(%rsp)
  movsd  %xmm4,0x10(%rsp)
  mov    %rsi,0x38(%rsp)
  movsd  %xmm5,0x48(%rsp)
  movsd  %xmm3,0x40(%rsp)
  call   <ceil@plt>
  movsd  0x10(%rsp),%xmm4
  movsd  0x18(%rsp),%xmm2
  cmp    $0x1,%eax
  mov    0x28(%rsp),%edi
  mov    0x30(%rsp),%r9d
  mov    %eax,%r11d
  jle    L217
  cmp    %edi,%r9d
  je     L283
  mov    0x38(%rsp),%rsi
  pxor   %xmm6,%xmm6
  lea    -0x2(%r9),%edi
  movsd  0x40(%rsp),%xmm3
  cvtsi2sd %eax,%xmm6
  sub    %r13d,%edi
  lea    0x2(%r13),%eax
  movsd  0x48(%rsp),%xmm5
  lea    0x3(%rsi,%rdi,1),%rdi
  cltq
  mov    $0x1,%esi
  nopl   0x0(%rax)
L100:
  pxor   %xmm0,%xmm0
  mov    %eax,%r13d
  cvtsi2sd %esi,%xmm0
  add    $0x1,%esi
  divsd  %xmm6,%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm3,%xmm1
  addsd  -0x8(%r14,%rbp,8),%xmm1
  mulsd  %xmm5,%xmm0
  movsd  %xmm1,-0x8(%r12,%rax,8)
  addsd  -0x8(%r15,%rbp,8),%xmm0
  movsd  %xmm0,-0x8(%rbx,%rax,8)
  cmp    %esi,%r11d
  je     L162
  add    $0x1,%rax
  cmp    %rax,%rdi
  jne    L100
  mov    $0xffffffff,%r13d
  jmp    L334
L192:
  mov    %r9d,0x38(%rsp)
  movsd  %xmm4,0x40(%rsp)
  movsd  %xmm7,0x30(%rsp)
  movsd  %xmm5,0x28(%rsp)
  movsd  %xmm3,0x18(%rsp)
  movsd  %xmm2,0x10(%rsp)
  call   <sqrt@plt>
  movsd  0x40(%rsp),%xmm4
  mov    0x38(%rsp),%r9d
  movsd  0x30(%rsp),%xmm7
  movsd  0x28(%rsp),%xmm5
  movsd  0x18(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm2
  jmp    L124
L89:
  mov    %r9d,0x38(%rsp)
  movsd  %xmm4,0x40(%rsp)
  movsd  %xmm7,0x30(%rsp)
  movsd  %xmm5,0x28(%rsp)
  movsd  %xmm3,0x18(%rsp)
  movsd  %xmm2,0x10(%rsp)
  call   <sqrt@plt>
  movsd  0x40(%rsp),%xmm4
  mov    0x38(%rsp),%r9d
  movsd  0x30(%rsp),%xmm7
  movsd  0x28(%rsp),%xmm5
  movsd  0x18(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm2
  jmp    L34
```

tool_calls: name: unpack_data
arguments: tag: D37
datatype: f64
name: unpack_data
arguments: tag: D92
datatype: f64
name: unpack_data
arguments: tag: D1
datatype: f32[2]
name: unpack_data
arguments: tag: D53
datatype: f32[2]
name: unpack_data
arguments: tag: D13
datatype: f64

tool: D37: 3.141592653589793

tool: D92: 180

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

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

tool: D13: 6371.3

assistant: ```c
int thickenPoly(double *inX, double *inY, int inN, double *outX, double *outY, int outN, double tol, short units, short keepOrig, short close) {
  const short LL = 0;
  double accDist = 0.0;
  int allocatedSpace = outN;
  int i;
  int ptLast;
  outN = 0;
  if ((close) && ((inX[0] != inX[inN - 1]) || (inY[0] != inY[inN - 1])))
    ptLast = inN;
  else
    ptLast = inN - 1;
  if (!keepOrig && (inN > 0)) {
    if (outN == allocatedSpace)
      return -1;
    outX[outN] = inX[0];
    outY[outN] = inY[0];
    outN++;
  }
  for (i = 0; i < ptLast; i++) {
    int ptCurr = i;
    int ptNext = ((i + 1) == inN) ? 0 : (i + 1);
    double dX = inX[ptNext] - inX[ptCurr];
    double dY = inY[ptNext] - inY[ptCurr];
    double dist;
    if (units == LL) {
      double dlon = (inX[ptNext] - inX[ptCurr]) * 3.14159265358979323846 / 180;
      double dlat = (inY[ptNext] - inY[ptCurr]) * 3.14159265358979323846 / 180;
      double a = (sin(dlat / 2)) * (sin(dlat / 2)) + cos(inY[ptCurr] * 3.14159265358979323846 / 180) * cos(inY[ptNext] * 3.14159265358979323846 / 180) * (sin(dlon / 2)) * (sin(dlon / 2));
      a = sqrt(a);
      if (a > 1)
        a = 1;
      dist = 6371.3 * (2.0 * asin(a));
    } else {
      dist = sqrt((dX * dX) + (dY * dY));
    }
    if (keepOrig) {
      if (outN == allocatedSpace)
        return -1;
      outX[outN] = inX[ptCurr];
      outY[outN] = inY[ptCurr];
      outN++;
      if (dist > tol) {
        int segments = ceil(dist / tol);
        int j;
        for (j = 1; j < segments; j++) {
          if (outN == allocatedSpace)
            return -1;
          outX[outN] = inX[ptCurr] + (dX * ((double)j / segments));
          outY[outN] = inY[ptCurr] + (dY * ((double)j / segments));
          outN++;
        }
      }
    } else {
      accDist += dist;
      while (accDist >= tol) {
        double frac;
        accDist -= tol;
        frac = ((dist - accDist) / dist);
        if (outN == allocatedSpace)
          return -1;
        outX[outN] = inX[ptCurr] + (dX * frac);
        outY[outN] = inY[ptCurr] + (dY * frac);
        outN++;
      }
    }
  }
  return outN;
}
```