user: 请将以下的汇编代码转换成C语言代码：

```asm
<track1>:
  endbr64
  push   %r15
  lea    0x1(%rsi),%eax
  mov    %r8,%r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %esi,%ebp
  mov    $0x4,%esi
  add    $0x1,%r12d
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %eax,%edi
  mov    0x98(%rsp),%r13
  mov    %r9,(%rsp)
  mov    0xa0(%rsp),%rbx
  mov    %edx,0x20(%rsp)
  mov    %ecx,0x10(%rsp)
  mov    %eax,0x34(%rsp)
  call   <calloc@plt>
  mov    0x34(%rsp),%edi
  mov    %r12d,%esi
  mov    %rax,%r14
  call   <imatrix@plt>
  mov    0x10(%rsp),%r10d
  mov    (%rsp),%r9
  mov    %rax,0x8(%rsp)
  movsd  D5(%rip),%xmm0
  test   %r10d,%r10d
  jle    L532
  mov    0x88(%rsp),%r8
  lea    0x1(%r10),%edi
  mov    $0x1,%eax
L127:
  movswq -0x2(%r15,%rax,2),%rdx
  test   %dx,%dx
  jle    L142
  movswq -0x2(%r9,%rax,2),%rsi
  movl   $0x1,(%r14,%rdx,4)
  test   %si,%si
  jle    L142
  mov    0x80(%rsp),%rcx
  pxor   %xmm1,%xmm1
  cvtss2sd -0x4(%rcx,%rax,4),%xmm1
  comisd %xmm1,%xmm0
  jbe    L142
  mov    %eax,%ecx
  sub    %r10d,%ecx
  sub    $0x1,%ecx
  movslq %ecx,%rcx
  movzbl (%r8,%rcx,1),%ecx
  cmp    %cl,-0x1(%r8,%rax,1)
  jne    L142
  mov    0x8(%rsp),%rcx
  mov    (%rcx,%rdx,8),%rdx
  movl   $0x1,(%rdx,%rsi,4)
L142:
  add    $0x1,%rax
  cmp    %rdi,%rax
  jne    L127
L532:
  mov    0x34(%rsp),%edi
  mov    $0x4,%esi
  call   <calloc@plt>
  mov    %rax,0x28(%rsp)
  test   %ebp,%ebp
  jle    L544
  mov    0x8(%rsp),%rax
  lea    -0x1(%rbp),%r8d
  mov    0x20(%rsp),%r10d
  xor    %edi,%edi
  lea    0x8(,%r8,4),%r9
  mov    $0x4,%ecx
  xor    %r12d,%r12d
  lea    0x8(%rax),%rsi
L483:
  movslq 0x34(%rsp),%rax
  add    (%r14,%rcx,1),%edi
  mov    %edi,%r15d
  cmp    %r10d,%eax
  jg     L259
  mov    (%rsi),%rdx
  jmp    L397
L431:
  add    $0x1,%rax
  cmp    %eax,%r10d
  jl     L259
L397:
  cmpl   $0x1,(%rdx,%rax,4)
  jne    L431
  mov    0x18(%rsp),%rdx
  add    $0x1,%r12d
  mov    (%rdx),%rax
  add    %rcx,%rax
  addl   $0x1,(%rax)
  mov    0x28(%rsp),%rax
  movl   $0x1,(%rax,%rcx,1)
L259:
  add    $0x4,%rcx
  add    $0x8,%rsi
  cmp    %r9,%rcx
  jne    L483
  mov    %r14,%rdi
  mov    %r8,(%rsp)
  sub    %r15d,%r12d
  mov    $0x2,%r14d
  call   <free@plt>
  mov    0x8(%rsp),%rax
  mov    (%rsp),%r8
  mov    %r12d,0x30(%rsp)
  mov    0x20(%rsp),%r12d
  movq   $0x1,(%rsp)
  lea    0x10(%rax),%r15
  lea    0x3(%r8),%rax
  mov    %r13,0x98(%rsp)
  mov    0x90(%rsp),%r11
  mov    %rax,0x38(%rsp)
  mov    0x90(%rsp),%rax
  mov    %r12d,0x0(%r13)
  add    $0x8,%rax
  mov    %rbx,0xa0(%rsp)
  mov    %rax,0x10(%rsp)
L548:
  mov    (%rsp),%eax
  mov    %eax,0x24(%rsp)
  cmp    %r12d,0x34(%rsp)
  jg     L302
  mov    (%rsp),%rax
  mov    -0x8(%r15),%rbx
  lea    0x0(,%rax,4),%r13
  movslq 0x34(%rsp),%rax
  mov    %rax,%rsi
  jmp    L42
L271:
  add    $0x1,%rax
  cmp    %r10d,%r12d
  je     L302
L42:
  mov    %esi,%r10d
  add    $0x1,%esi
  cmpl   $0x1,(%rbx,%rax,4)
  lea    0x0(,%rax,4),%r9
  jne    L271
  cmp    %esi,%r12d
  jl     L351
  mov    %r12d,%ecx
  mov    0x10(%rsp),%rdi
  movslq %esi,%rdx
  sub    %esi,%ecx
  lea    (%r11,%rdx,4),%rdx
  add    %rax,%rcx
  lea    (%rdi,%rcx,4),%rdi
  cs nopw 0x0(%rax,%rax,1)
L521:
  mov    (%rdx),%ecx
  cmp    (%r11,%rax,4),%ecx
  jle    L363
  sub    $0x1,%ecx
  mov    %ecx,(%rdx)
L363:
  add    $0x4,%rdx
  cmp    %rdx,%rdi
  jne    L521
L351:
  mov    0x24(%rsp),%edi
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %edi,(%r11,%rax,4)
  cmp    %r14d,%ebp
  jl     L89
  nopl   0x0(%rax)
L288:
  mov    (%rcx),%r8
  lea    (%r8,%r9,1),%rdi
  cmpl   $0x1,(%rdi)
  jne    L425
  movl   $0x1,(%r8,%r13,1)
  movl   $0x1,(%rbx,%rdx,4)
  movl   $0x0,(%rdi)
L425:
  add    $0x1,%rdx
  add    $0x8,%rcx
  cmp    %edx,%ebp
  jge    L288
L89:
  mov    0x98(%rsp),%rdi
  add    $0x1,%rax
  subl   $0x1,(%rdi)
  cmp    %r10d,%r12d
  jne    L42
L302:
  addq   $0x1,(%rsp)
  add    $0x1,%r14
  add    $0x8,%r15
  cmp    0x38(%rsp),%r14
  jne    L548
  mov    0x98(%rsp),%r13
  mov    0xa0(%rsp),%rbx
  mov    0x0(%r13),%eax
  lea    0x1(%rax),%r12d
L70:
  mov    0x18(%rsp),%r14
  lea    0x0(,%r12,4),%esi
  mov    (%r14),%rdi
  call   <realloc@plt>
  mov    %rax,(%r14)
  mov    %rax,%r12
  mov    0x34(%rsp),%eax
  cmp    0x0(%r13),%eax
  jg     L159
  movslq 0x34(%rsp),%rax
  lea    (%r12,%rax,4),%rdx
L500:
  movl   $0x1,(%rdx)
  add    $0x1,%eax
  add    $0x4,%rdx
  cmp    %eax,0x0(%r13)
  jge    L500
L159:
  mov    0x20(%rsp),%eax
  mov    0x10(%rsp),%rsi
  mov    %ebp,(%rbx)
  sub    $0x1,%eax
  lea    (%rsi,%rax,4),%r14
  mov    %r14,%rax
  mov    %r12,%r14
  mov    %rax,%r12
L332:
  cmp    $0x1,%ebp
  jle    L369
  mov    $0x1,%r10d
  xor    %eax,%eax
  mov    $0x1,%r15d
  nopl   0x0(%rax,%rax,1)
L468:
  mov    %r15d,0x18(%rsp)
  add    $0x1,%r15d
  cmp    %ebp,%r15d
  jg     L39
  mov    0x8(%rsp),%rsi
  mov    %r15d,0x24(%rsp)
  mov    %r15d,%ecx
  mov    (%rsi,%r10,8),%r11
  lea    0x0(,%r10,4),%rsi
  lea    (%rsi,%r14,1),%rdi
  mov    %rsi,0x10(%rsp)
  movslq %r15d,%rsi
  mov    %rdi,%r15
  jmp    L228
  nopl   0x0(%rax)
L211:
  mov    (%rbx),%ebp
  add    $0x1,%rsi
  cmp    %ecx,%ebp
  jl     L494
L228:
  add    $0x1,%ecx
  cmpl   $0x1,(%r11,%rsi,4)
  jne    L211
  mov    0x90(%rsp),%rax
  mov    0x20(%rsp),%edx
  subl   $0x1,0x30(%rsp)
  mov    0x18(%rsp),%edi
  add    $0x4,%rax
  test   %edx,%edx
  jg     L536
  jmp    L69
  nopw   0x0(%rax,%rax,1)
L148:
  jle    L196
  sub    $0x1,%edx
  mov    %edx,(%rax)
L196:
  add    $0x4,%rax
  cmp    %rax,%r12
  je     L69
L536:
  mov    (%rax),%edx
  cmp    %esi,%edx
  jne    L148
  mov    %edi,(%rax)
  add    $0x4,%rax
  cmp    %rax,%r12
  jne    L536
L69:
  mov    (%r15),%eax
  mov    (%r14,%rsi,4),%edx
  cmp    %edx,%eax
  cmovl  %edx,%eax
  mov    %eax,(%r15)
  cmp    %ecx,0x0(%r13)
  jl     L3
  movslq %ecx,%rax
  mov    %ecx,%edx
  lea    (%r14,%rax,4),%rax
  nop
L295:
  mov    (%rax),%edi
  add    $0x1,%edx
  add    $0x4,%rax
  mov    %edi,-0x8(%rax)
  cmp    %edx,0x0(%r13)
  jge    L295
L3:
  mov    (%rbx),%r9d
  mov    %r9d,%eax
  test   %r9d,%r9d
  jle    L213
  mov    0x8(%rsp),%rax
  mov    $0x1,%edx
  lea    0x8(%rax),%rdi
  lea    (%rax,%rsi,8),%rbp
  mov    %rdi,%r8
  cs nopw 0x0(%rax,%rax,1)
L263:
  cmp    %r10d,%edx
  je     L144
  cmp    %esi,%edx
  je     L144
  mov    0x0(%rbp),%rax
  cmpl   $0x1,(%rax,%rdx,4)
  jne    L144
  mov    (%r8),%rax
  mov    0x10(%rsp),%r9
  movl   $0x1,(%rax,%r9,1)
  movl   $0x1,(%r11,%rdx,4)
  mov    (%rbx),%r9d
  xchg   %ax,%ax
L144:
  add    $0x1,%rdx
  mov    %r9d,%eax
  add    $0x8,%r8
  cmp    %edx,%r9d
  jge    L263
  test   %r9d,%r9d
  jle    L213
  mov    $0x1,%r9d
  nopl   0x0(%rax,%rax,1)
L366:
  cmp    %ecx,%eax
  jl     L389
  mov    (%rdi),%r8
  movslq %ecx,%rdx
  nopw   0x0(%rax,%rax,1)
L84:
  mov    (%r8,%rdx,4),%eax
  mov    %eax,-0x4(%r8,%rdx,4)
  mov    (%rbx),%eax
  add    $0x1,%rdx
  cmp    %edx,%eax
  jge    L84
L389:
  add    $0x1,%r9d
  add    $0x8,%rdi
  cmp    %eax,%r9d
  jle    L366
L213:
  cmp    %ecx,%eax
  jl     L100
  mov    0x8(%rsp),%r9
  mov    0x28(%rsp),%rdi
  movslq %ecx,%rdx
  lea    (%r9,%rdx,8),%r8
  lea    (%rdi,%rdx,4),%rdi
  mov    %ecx,%r9d
  nopl   0x0(%rax)
L479:
  cmp    $0x1,%eax
  jle    L137
  mov    (%r8),%rbp
  mov    -0x8(%r8),%rdx
  mov    %ecx,(%rsp)
  mov    $0x1,%eax
  nopl   0x0(%rax)
L258:
  mov    0x0(%rbp,%rax,4),%ecx
  mov    %ecx,(%rdx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,(%rbx)
  jg     L258
  mov    (%rsp),%ecx
L137:
  mov    (%rdi),%eax
  add    $0x1,%r9d
  add    $0x4,%rdi
  add    $0x8,%r8
  mov    %eax,-0x8(%rdi)
  mov    (%rbx),%eax
  cmp    %r9d,%eax
  jge    L479
L100:
  sub    $0x1,%eax
  add    $0x1,%rsi
  mov    %eax,(%rbx)
  mov    $0x1,%eax
  subl   $0x1,0x0(%r13)
  mov    (%rbx),%ebp
  cmp    %ecx,%ebp
  jge    L228
L494:
  mov    0x24(%rsp),%r15d
L39:
  add    $0x1,%r10
  cmp    %ebp,%r15d
  jl     L468
  cmp    $0x1,%eax
  je     L332
L369:
  mov    0x28(%rsp),%rdi
  call   <free@plt>
  mov    0x34(%rsp),%esi
  mov    0x8(%rsp),%rdi
  call   <free_imatrix@plt>
  mov    0x30(%rsp),%eax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L544:
  mov    %r14,%rdi
  call   <free@plt>
  mov    0x20(%rsp),%eax
  movl   $0x0,0x30(%rsp)
  mov    %eax,0x0(%r13)
  mov    0x90(%rsp),%rax
  add    $0x8,%rax
  mov    %rax,0x10(%rsp)
  jmp    L70
```

tool_calls: name: retrieve_data
arguments: tag: D5
type_infered: f64

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