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     L177
  movslq %edx,%rdx
  movsd  (%rdi),%xmm0
  ucomisd -0x8(%rdi,%rdx,8),%xmm0
  lea    0x0(,%rdx,8),%rsi
  jp     L109
  jne    L109
  movsd  (%r15),%xmm0
  ucomisd -0x8(%r15,%rsi,1),%xmm0
  jp     L109
  jne    L109
  nopl   0x0(%rax,%rax,1)
L177:
  mov    0xc(%rsp),%ecx
  lea    -0x1(%rcx),%edx
L120:
  test   %ax,%ax
  jne    L223
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L223
  test   %r9d,%r9d
  je     L17
  movsd  (%r14),%xmm0
  mov    $0x1,%r13d
  movsd  %xmm0,(%r12)
  movsd  (%r15),%xmm0
  movsd  %xmm0,(%rbx)
  jmp    L182
  nopl   0x0(%rax)
L223:
  xor    %r13d,%r13d
L182:
  test   %edx,%edx
  jle    L306
  lea    0x1(%rdx),%eax
  mov    $0x1,%ebp
  pxor   %xmm2,%xmm2
  mov    %rax,0x20(%rsp)
L270:
  cmp    %ebp,0xc(%rsp)
  je     L70
  lea    0x0(,%rbp,8),%rax
  lea    (%r14,%rax,1),%rsi
  add    %r15,%rax
L288:
  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    L172
  movsd  D38(%rip),%xmm0
  mov    %r9d,0x54(%rsp)
  movsd  %xmm7,0x48(%rsp)
  mulsd  %xmm5,%xmm0
  movsd  %xmm2,0x40(%rsp)
  divsd  D20(%rip),%xmm0
  mulsd  D24(%rip),%xmm0
  movsd  %xmm5,0x38(%rsp)
  movsd  %xmm4,0x58(%rsp)
  movsd  %xmm3,0x28(%rsp)
  call   <sin@plt>
  movsd  0x10(%rsp),%xmm6
  mulsd  D38(%rip),%xmm6
  divsd  D20(%rip),%xmm6
  movsd  %xmm0,0x30(%rsp)
  movapd %xmm6,%xmm0
  call   <cos@plt>
  movsd  0x18(%rsp),%xmm1
  mulsd  D38(%rip),%xmm1
  divsd  D20(%rip),%xmm1
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm1,%xmm0
  call   <cos@plt>
  movsd  0x28(%rsp),%xmm3
  movsd  D38(%rip),%xmm4
  movsd  %xmm0,0x18(%rsp)
  mulsd  %xmm3,%xmm4
  movapd %xmm4,%xmm0
  divsd  D20(%rip),%xmm0
  mulsd  D24(%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     L147
  sqrtsd %xmm0,%xmm0
L283:
  movsd  %xmm4,0x40(%rsp)
  movsd  D34(%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  D82(%rip),%xmm0
  movsd  0x18(%rsp),%xmm3
  movsd  0x28(%rsp),%xmm5
  movsd  0x30(%rsp),%xmm7
  movsd  0x40(%rsp),%xmm4
L54:
  cmpw   $0x0,0x52(%rsp)
  je     L335
L225:
  cmp    %r13d,%r9d
  je     L17
  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     L49
L8:
  mov    %edi,%r13d
L56:
  add    $0x1,%rbp
  cmp    %rbp,0x20(%rsp)
  jne    L270
L306:
  add    $0x68,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L172:
  movapd %xmm5,%xmm1
  movapd %xmm3,%xmm0
  pxor   %xmm6,%xmm6
  mulsd  %xmm5,%xmm1
  mulsd  %xmm3,%xmm0
  addsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm6
  ja     L61
  cmpw   $0x0,0x52(%rsp)
  sqrtsd %xmm0,%xmm0
  jne    L225
L335:
  addsd  %xmm0,%xmm2
  comisd %xmm4,%xmm2
  jb     L56
  subsd  %xmm4,%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  divsd  %xmm0,%xmm1
  cmp    %r13d,%r9d
  je     L17
  lea    0x1(%r13),%eax
  cltq
  jmp    L210
  nopl   0x0(%rax)
L71:
  movsd  -0x8(%r14,%rbp,8),%xmm7
  add    $0x1,%rax
L210:
  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     L56
  subsd  %xmm4,%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  divsd  %xmm0,%xmm1
  cmp    %eax,%r9d
  jne    L71
L17:
  mov    $0xffffffff,%r13d
  jmp    L306
  nopl   0x0(%rax)
L70:
  mov    %r15,%rax
  mov    %r14,%rsi
  jmp    L288
  nopl   0x0(%rax,%rax,1)
L109:
  mov    0xc(%rsp),%edx
  jmp    L120
  nopl   0x0(%rax)
L49:
  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    L8
  cmp    %edi,%r9d
  je     L17
  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)
L227:
  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     L56
  add    $0x1,%rax
  cmp    %rax,%rdi
  jne    L227
  mov    $0xffffffff,%r13d
  jmp    L306
L61:
  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    L54
L147:
  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    L283
```

tool_calls: name: parse_data
arguments: data_tag: D38
type_infered: f64
name: parse_data
arguments: data_tag: D20
type_infered: f64
name: parse_data
arguments: data_tag: D24
type_infered: f32[2]
name: parse_data
arguments: data_tag: D34
type_infered: f32[2]
name: parse_data
arguments: data_tag: D82
type_infered: f64

tool: D38: 3.141592653589793

tool: D20: 180

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

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

tool: D82: 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;
}
```