user: 请从给定的汇编指令推导出C源代码：

```asm
<track1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,%rbp
  mov    %esi,%r15d
  mov    %edx,0x34(%rsp)
  mov    %ecx,0x8(%rsp)
  mov    %r8,%r14
  mov    %r9,%r12
  mov    0xb0(%rsp),%rbx
  lea    0x1(%rsi),%eax
  mov    $0x4,%esi
  mov    %eax,0x44(%rsp)
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,%r13
  mov    0x34(%rsp),%esi
  add    $0x1,%esi
  mov    0x44(%rsp),%edi
  call   <imatrix@plt>
  mov    %rax,0x20(%rsp)
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jle    L588
  lea    0x1(%rax),%ecx
  mov    $0x1,%eax
  movsd  D2(%rip),%xmm1
  mov    0x90(%rsp),%rdi
  mov    0x98(%rsp),%r8
  jmp    L565
L264:
  add    $0x1,%rax
  cmp    %rcx,%rax
  je     L588
L565:
  movzwl -0x2(%r14,%rax,2),%edx
  test   %dx,%dx
  jle    L264
  movswq %dx,%rdx
  movl   $0x1,0x0(%r13,%rdx,4)
  movzwl -0x2(%r12,%rax,2),%edx
  test   %dx,%dx
  jle    L264
  pxor   %xmm0,%xmm0
  cvtss2sd -0x4(%rdi,%rax,4),%xmm0
  comisd %xmm0,%xmm1
  jbe    L264
  mov    %eax,%esi
  sub    0x8(%rsp),%esi
  sub    $0x1,%esi
  movslq %esi,%rsi
  movzbl (%r8,%rsi,1),%esi
  cmp    %sil,-0x1(%r8,%rax,1)
  jne    L264
  movswq -0x2(%r14,%rax,2),%rsi
  movswq %dx,%rdx
  mov    0x20(%rsp),%r11
  mov    (%r11,%rsi,8),%rsi
  movl   $0x1,(%rsi,%rdx,4)
  jmp    L264
L588:
  mov    $0x4,%esi
  mov    0x44(%rsp),%edi
  call   <calloc@plt>
  mov    %rax,0x38(%rsp)
  test   %r15d,%r15d
  jle    L419
  mov    0x20(%rsp),%rsi
  lea    0x8(%rsi),%r14
  lea    -0x1(%r15),%esi
  mov    %rsi,0x10(%rsp)
  lea    0x8(,%rsi,4),%rdi
  mov    %r14,%rsi
  mov    $0x4,%ecx
  mov    $0x0,%r12d
  mov    $0x0,%r10d
  mov    0x44(%rsp),%r9d
  mov    %rax,%r11
  mov    0x34(%rsp),%r8d
  jmp    L566
L187:
  mov    %rcx,%rax
  add    0x0(%rbp),%rax
  addl   $0x1,(%rax)
  add    $0x1,%r10d
  movl   $0x1,(%r11,%rcx,1)
L27:
  add    $0x4,%rcx
  add    $0x8,%rsi
  cmp    %rdi,%rcx
  je     L98
L566:
  add    0x0(%r13,%rcx,1),%r12d
  cmp    %r8d,%r9d
  jg     L27
  mov    (%rsi),%rdx
  movslq %r9d,%rax
L42:
  cmpl   $0x1,(%rdx,%rax,4)
  je     L187
  add    $0x1,%rax
  cmp    %eax,%r8d
  jge    L42
  jmp    L27
L98:
  mov    %r10d,0x8(%rsp)
  mov    %r13,%rdi
  call   <free@plt>
  mov    0x8(%rsp),%eax
  sub    %r12d,%eax
  mov    %eax,0x40(%rsp)
  mov    0xa8(%rsp),%rax
  mov    0x34(%rsp),%r11d
  mov    %r11d,(%rax)
  mov    0x10(%rsp),%rax
  add    $0x3,%rax
  mov    %rax,0x18(%rsp)
  lea    0x1(%r15),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,0x28(%rsp)
  mov    $0x1,%r13d
  mov    $0x2,%r12d
  lea    0x2(%r11),%r10d
  mov    %rbp,0x48(%rsp)
  mov    0xa0(%rsp),%rsi
  mov    %rbx,0xb0(%rsp)
  jmp    L616
L550:
  add    $0x1,%rdx
  cmp    %edx,%r11d
  jl     L415
L185:
  mov    (%rsi,%rdx,4),%ecx
  cmp    (%rsi,%rax,1),%ecx
  jle    L550
  sub    $0x1,%ecx
  mov    %ecx,(%rsi,%rdx,4)
  jmp    L550
L415:
  mov    0x8(%rsp),%edx
  mov    %edx,(%rsi,%rax,1)
  cmp    %r12d,%r15d
  jl     L148
  lea    0x8(%r14),%rcx
  mov    0x10(%rsp),%rdx
  jmp    L484
L138:
  add    $0x8,%rcx
  add    $0x4,%rdx
  cmp    %r9,%rdx
  je     L148
L484:
  mov    (%rcx),%r8
  cmpl   $0x1,(%r8,%rax,1)
  jne    L138
  movl   $0x1,(%r8,%rbp,1)
  mov    (%rbx),%r8
  movl   $0x1,(%r8,%rdx,1)
  mov    (%rcx),%r8
  movl   $0x0,(%r8,%rax,1)
  jmp    L138
L148:
  mov    0xa8(%rsp),%rdx
  subl   $0x1,(%rdx)
L46:
  add    $0x4,%rax
  add    $0x1,%edi
  cmp    %r10d,%edi
  je     L492
L372:
  mov    (%rbx),%rdx
  cmpl   $0x1,(%rdx,%rax,1)
  jne    L46
  cmp    %edi,%r11d
  jl     L415
  movslq %edi,%rdx
  jmp    L185
L492:
  add    $0x1,%r12
  add    $0x1,%r13
  add    $0x8,%r14
  cmp    0x18(%rsp),%r12
  je     L24
L616:
  mov    %r13d,0x8(%rsp)
  cmp    %r11d,0x44(%rsp)
  jg     L492
  mov    %r14,%rbx
  lea    0x0(,%r13,4),%rbp
  lea    0x2(%r15),%edi
  lea    0x0(,%r12,4),%rax
  mov    %rax,0x10(%rsp)
  mov    %r15d,%eax
  sub    %r12d,%eax
  lea    0x2(%r13,%rax,1),%r9
  shl    $0x2,%r9
  mov    0x28(%rsp),%rax
  jmp    L372
L24:
  mov    0x48(%rsp),%rbp
  mov    0xb0(%rsp),%rbx
L86:
  mov    0xa8(%rsp),%rax
  mov    (%rax),%eax
  lea    0x4(,%rax,4),%esi
  mov    0x0(%rbp),%rdi
  call   <realloc@plt>
  mov    %rax,0x0(%rbp)
  mov    0xa8(%rsp),%rax
  mov    0x44(%rsp),%edx
  cmp    (%rax),%edx
  jg     L99
  movslq %edx,%rax
  shl    $0x2,%rax
  mov    0xa8(%rsp),%rsi
L320:
  mov    0x0(%rbp),%rcx
  movl   $0x1,(%rcx,%rax,1)
  add    $0x1,%edx
  add    $0x4,%rax
  cmp    %edx,(%rsi)
  jge    L320
L99:
  mov    %r15d,(%rbx)
  mov    0x34(%rsp),%eax
  lea    -0x1(%rax),%eax
  mov    0xa0(%rsp),%rdi
  lea    0x8(%rdi,%rax,4),%rax
  mov    %rax,0x48(%rsp)
L660:
  cmpl   $0x1,(%rbx)
  jle    L446
  movq   $0x1,0x10(%rsp)
  mov    $0x0,%edx
  jmp    L205
L399:
  mov    %r12d,(%rax)
L77:
  add    $0x4,%rax
  cmp    %r8,%rax
  je     L102
L574:
  mov    (%rax),%edx
  cmp    %edi,%edx
  je     L399
  jle    L77
  sub    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L77
L102:
  mov    0x0(%rbp),%rcx
  mov    0x18(%rsp),%rax
  lea    (%rcx,%rax,1),%rdx
  mov    (%rdx),%eax
  mov    (%rcx,%rsi,1),%ecx
  cmp    %ecx,%eax
  cmovl  %ecx,%eax
  mov    %eax,(%rdx)
  mov    %r10d,%r8d
  mov    %r10d,%r15d
  mov    0xa8(%rsp),%rax
  cmp    %r10d,(%rax)
  jl     L250
  movslq %r10d,%rax
  shl    $0x2,%rax
  mov    %r10d,%edx
  mov    0xa8(%rsp),%r12
L395:
  mov    0x0(%rbp),%rcx
  mov    (%rcx,%rax,1),%esi
  mov    %esi,-0x4(%rcx,%rax,1)
  add    $0x1,%edx
  add    $0x4,%rax
  cmp    %edx,(%r12)
  jge    L395
L250:
  cmpl   $0x0,(%rbx)
  jle    L525
  mov    0x20(%rsp),%rax
  lea    (%rax,%rdi,8),%rsi
  lea    0x8(%rax),%r12
  mov    %r12,%rdx
  mov    $0x1,%eax
  mov    0x10(%rsp),%r13
  jmp    L163
L363:
  mov    (%rbx),%ecx
  add    $0x1,%rax
  add    $0x8,%rdx
  cmp    %eax,%ecx
  jl     L341
L163:
  cmp    %r13d,%eax
  je     L363
  cmp    %edi,%eax
  je     L363
  mov    (%rsi),%rcx
  cmpl   $0x1,(%rcx,%rax,4)
  jne    L363
  mov    (%rdx),%rcx
  mov    0x18(%rsp),%r14
  movl   $0x1,(%rcx,%r14,1)
  mov    (%r11),%rcx
  movl   $0x1,(%rcx,%rax,4)
  jmp    L363
L341:
  test   %ecx,%ecx
  jle    L525
  movslq %r8d,%r14
  shl    $0x2,%r14
  mov    %r9d,%r13d
  jmp    L247
L534:
  mov    %rdi,0x8(%rsp)
L236:
  mov    (%rsi),%rcx
  mov    (%rcx,%rax,1),%edi
  mov    %edi,-0x4(%rcx,%rax,1)
  add    $0x1,%edx
  add    $0x4,%rax
  cmp    %edx,(%rbx)
  jge    L236
  mov    0x8(%rsp),%rdi
L49:
  add    $0x1,%r13d
  add    $0x8,%r12
  cmp    %r13d,(%rbx)
  jl     L525
L247:
  mov    %r12,%rsi
  mov    %r14,%rax
  mov    %r8d,%edx
  cmp    %r15d,(%rbx)
  jge    L534
  jmp    L49
L525:
  mov    (%rbx),%eax
  cmp    %r15d,%eax
  jl     L111
  movslq %r8d,%rax
  mov    0x38(%rsp),%rsi
  lea    (%rsi,%rax,4),%r14
  mov    0x20(%rsp),%rsi
  lea    (%rsi,%rax,8),%r15
  jmp    L601
L458:
  mov    %r15,%r13
  lea    -0x8(%r15),%r12
  mov    %r9d,%edx
  mov    $0x4,%eax
L190:
  mov    0x0(%r13),%rcx
  mov    (%rcx,%rax,1),%esi
  mov    (%r12),%rcx
  mov    %esi,(%rcx,%rax,1)
  add    $0x1,%edx
  add    $0x4,%rax
  cmp    %edx,(%rbx)
  jg     L190
L600:
  mov    (%r14),%eax
  mov    %eax,-0x4(%r14)
  add    $0x1,%r8d
  mov    (%rbx),%eax
  add    $0x4,%r14
  add    $0x8,%r15
  cmp    %r8d,%eax
  jl     L111
L601:
  cmpl   $0x1,(%rbx)
  jg     L458
  jmp    L600
L111:
  sub    $0x1,%eax
  mov    %eax,(%rbx)
  mov    0xa8(%rsp),%rax
  subl   $0x1,(%rax)
  mov    %r9d,%edx
L280:
  add    $0x1,%r10
  add    $0x1,%rdi
  cmp    %edi,(%rbx)
  jl     L101
L650:
  lea    0x0(,%rdi,4),%rsi
  mov    (%r11),%rax
  mov    (%rax,%rdi,4),%r9d
  cmp    $0x1,%r9d
  jne    L280
  subl   $0x1,0x40(%rsp)
  cmpl   $0x0,0x34(%rsp)
  jle    L102
  mov    0xa0(%rsp),%rax
  add    $0x4,%rax
  mov    0x48(%rsp),%r8
  mov    0x28(%rsp),%r12d
  jmp    L574
L101:
  addq   $0x1,0x10(%rsp)
  mov    0x10(%rsp),%rax
  cmp    %eax,(%rbx)
  jle    L282
L205:
  mov    0x10(%rsp),%rax
  mov    %eax,%edi
  mov    %eax,0x28(%rsp)
  add    $0x1,%edi
  cmp    %edi,(%rbx)
  jl     L101
  mov    0x20(%rsp),%rsi
  lea    (%rsi,%rax,8),%r11
  lea    0x0(,%rax,4),%rsi
  mov    %rsi,0x18(%rsp)
  lea    0x2(%rax),%r10d
  movslq %r10d,%r10
  movslq %edi,%rdi
  jmp    L650
L282:
  cmp    $0x1,%edx
  je     L660
L446:
  mov    0x38(%rsp),%rdi
  call   <free@plt>
  mov    0x44(%rsp),%esi
  mov    0x20(%rsp),%rdi
  call   <free_imatrix@plt>
  mov    0x40(%rsp),%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L419:
  mov    %r13,%rdi
  call   <free@plt>
  mov    0xa8(%rsp),%rax
  mov    0x34(%rsp),%edi
  mov    %edi,(%rax)
  movl   $0x0,0x40(%rsp)
  jmp    L86
```

tool_calls: name: retrieve_data
arguments: label: D2
datatype: f64

tool: D2: 0.2

assistant: ```c
int track1(int **tracklen, int TR, int TR2, int imgsize, short *rmap1, short *rmap2, float *JT, unsigned char *rmap0, int *convert, int *TR1, int *newTR) {
  int **neigh, i, j, k, l, l1, m, TR4, *appear, Tappear, *tracked;
  appear = (int *)calloc(TR + 1, sizeof(int));
  neigh = (int **)imatrix(TR + 1, TR2 + 1);
  for (l = 0; l < imgsize; l++) {
    l1 = l - imgsize;
    if (rmap1[l] > 0) {
      appear[rmap1[l]] = 1;
      if (rmap2[l] > 0 && JT[l] < 0.2) {
        if (rmap0[l] == rmap0[l1])
          neigh[rmap1[l]][rmap2[l]] = 1;
      }
    }
  }
  tracked = (int *)calloc(TR + 1, sizeof(int));
  TR4 = 0;
  Tappear = 0;
  for (i = 1; i <= TR; i++) {
    Tappear += appear[i];
    for (j = TR + 1; j <= TR2; j++) {
      if (neigh[i][j] == 1) {
        (*tracklen)[i]++;
        TR4++;
        tracked[i] = 1;
        break;
      }
    }
  }
  free(appear);
  TR4 = TR4 - Tappear;
  *TR1 = TR2;
  for (i = 1; i <= TR; i++) {
    for (j = TR + 1; j <= TR2; j++) {
      if (neigh[i][j] == 1) {
        for (k = j + 1; k <= TR2; k++) {
          if (convert[k] > convert[j])
            convert[k]--;
        }
        convert[j] = i;
        for (k = i + 1; k <= TR; k++) {
          if (neigh[k][j] == 1) {
            neigh[i][k] = neigh[k][i] = 1;
            neigh[k][j] = 0;
          }
        }
        (*TR1)--;
      }
    }
  }
  *tracklen = (int *)realloc(*tracklen, ((*TR1) + 1) * sizeof(int));
  for (i = TR + 1; i <= (*TR1); i++)
    (*tracklen)[i] = 1;
  *newTR = TR;
  do {
    m = 0;
    for (i = 1; i < (*newTR); i++) {
      for (j = i + 1; j <= (*newTR); j++) {
        if (neigh[i][j] == 1) {
          TR4--;
          for (k = 1; k <= TR2; k++) {
            if (convert[k] == j)
              convert[k] = i;
            else if (convert[k] > j)
              convert[k]--;
          }
          (*tracklen)[i] = ((((*tracklen)[i]) > ((*tracklen)[j])) ? ((*tracklen)[i]) : ((*tracklen)[j]));
          for (k = j + 1; k <= (*TR1); k++)
            (*tracklen)[k - 1] = (*tracklen)[k];
          for (k = 1; k <= (*newTR); k++) {
            if (k != i && k != j) {
              if (neigh[j][k] == 1) {
                neigh[i][k] = neigh[k][i] = 1;
              }
            }
          }
          for (k = 1; k <= (*newTR); k++)
            for (l = j + 1; l <= (*newTR); l++)
              neigh[k][l - 1] = neigh[k][l];
          for (k = j + 1; k <= (*newTR); k++) {
            for (l = 1; l <= (*newTR) - 1; l++)
              neigh[k - 1][l] = neigh[k][l];
            tracked[k - 1] = tracked[k];
          }
          (*newTR)--;
          (*TR1)--;
          m = 1;
        }
      }
    }
  } while (m == 1);
  free(tracked);
  free_imatrix(neigh, TR + 1);
  return TR4;
}
```