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

```asm
<narrowbandUnitCostDistanceSameLengthBestScoreLastRowColumnLowMemUsesPointers>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,(%rsp)
  mov    %rsi,0x8(%rsp)
  mov    %edx,0x48(%rsp)
  mov    %ecx,0x1c(%rsp)
  mov    %r8d,0x44(%rsp)
  cmp    %ecx,%edx
  jne    L439
  lea    0x1(%rdx),%edi
  mov    $0x8,%esi
  mov    %edx,%ebx
  movslq %edi,%rdi
  call   <calloc@plt>
  mov    %rax,%r15
  test   %ebx,%ebx
  js     L198
  mov    0x44(%rsp),%eax
  mov    0x48(%rsp),%ebx
  mov    %r15,%r14
  sub    %eax,%ebx
  mov    %eax,%r12d
  mov    %eax,%r13d
  lea    0x1(%rbx),%ebp
  neg    %r12d
  xor    %ebx,%ebx
  jmp    L321
  cs nopw 0x0(%rax,%rax,1)
L353:
  mov    %r13d,%ecx
  sub    %edx,%ecx
  lea    0x2(%rax,%rcx,1),%edi
L418:
  movslq %edi,%rdi
  mov    $0x4,%esi
  add    $0x1,%r12d
  add    $0x1,%r13d
  call   <calloc@plt>
  add    $0x8,%r14
  mov    %rax,-0x8(%r14)
  cmp    %ebp,%r12d
  je     L198
L321:
  xor    %eax,%eax
  mov    %ebx,%edx
  test   %r12d,%r12d
  cmovg  %r12d,%edx
  setg   %al
  cmp    %r13d,0x1c(%rsp)
  jg     L353
  mov    0x1c(%rsp),%ecx
  sub    %edx,%ecx
  lea    0x1(%rax,%rcx,1),%edi
  jmp    L418
  nopl   0x0(%rax)
L198:
  mov    0x44(%rsp),%esi
  mov    (%r15),%r11
  test   %esi,%esi
  js     L268
  mov    0x44(%rsp),%ebx
  cmp    %ebx,0x1c(%rsp)
  jg     L54
  mov    0x1c(%rsp),%eax
  xor    %esi,%esi
  xor    %r14d,%r14d
  lea    0x1(%rax),%edx
  test   %edx,%edx
  jg     L305
  jmp    L429
L54:
  lea    0x1(%rbx),%edx
  mov    $0x1,%esi
L305:
  lea    -0x1(%rdx),%eax
  cmp    $0x2,%eax
  jbe    L169
  mov    %edx,%ecx
  movdqa D2(%rip),%xmm0
  movdqa D14(%rip),%xmm2
  mov    %r11,%rax
  shr    $0x2,%ecx
  sub    $0x1,%ecx
  shl    $0x4,%rcx
  lea    0x10(%r11,%rcx,1),%rcx
  cs nopw 0x0(%rax,%rax,1)
L222:
  movdqa %xmm0,%xmm1
  add    $0x10,%rax
  paddd  %xmm2,%xmm0
  movups %xmm1,-0x10(%rax)
  cmp    %rax,%rcx
  jne    L222
  mov    %edx,%eax
  and    $0xfffffffc,%eax
  mov    %eax,%ecx
  lea    (%r11,%rcx,4),%rcx
  cmp    %edx,%eax
  je     L114
L242:
  lea    0x1(%rax),%edi
  mov    %eax,(%rcx)
  cmp    %edx,%edi
  jge    L114
  add    $0x2,%eax
  mov    %edi,0x4(%rcx)
  cmp    %edx,%eax
  jge    L114
  mov    %eax,0x8(%rcx)
L114:
  lea    (%r11,%rdx,4),%rax
  xor    %r14d,%r14d
L26:
  test   %esi,%esi
  je     L429
  movl   $0x3e8,(%rax)
L429:
  mov    0x48(%rsp),%ecx
  test   %ecx,%ecx
  jle    L454
  mov    0x44(%rsp),%ebx
  mov    $0x1,%eax
  mov    %r15,0x38(%rsp)
  mov    %r11,%r15
  mov    $0x1,%r13d
  sub    %ebx,%eax
  mov    %eax,0x24(%rsp)
  lea    0x1(%rbx),%eax
  movslq 0x48(%rsp),%rbx
  mov    %eax,0x28(%rsp)
  add    0x1c(%rsp),%eax
  mov    %rbx,0x30(%rsp)
  mov    %eax,0x4c(%rsp)
  nopl   (%rax)
L478:
  mov    0x24(%rsp),%eax
  mov    0x38(%rsp),%rdi
  lea    (%r15,%r14,4),%r8
  mov    %r13d,%ebx
  mov    (%rdi,%r13,8),%r15
  mov    %eax,%r12d
  test   %eax,%eax
  jle    L8
  mov    0x28(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  jle    L428
  sub    0x24(%rsp),%eax
  movl   $0x1,0x2c(%rsp)
  add    $0x1,%eax
  mov    %eax,0x20(%rsp)
L61:
  movl   $0x3e8,(%r15)
  mov    %r8,%r10
  mov    %r15,%r9
  mov    $0x4,%eax
  mov    $0x1,%r14d
L177:
  lea    (%r15,%rax,1),%rcx
  add    %rax,%r8
  mov    0x20(%rsp),%eax
  mov    %rcx,0x10(%rsp)
  lea    (%r14,%rax,1),%r11d
  cmp    %r14d,%r11d
  jle    L313
  mov    %r14d,0x40(%rsp)
  mov    %r14d,%edx
  sub    %r14d,%r12d
L488:
  mov    %ebx,%eax
  test   %edx,%edx
  je     L83
  mov    0x8(%rsp),%rbp
  mov    (%r8),%eax
  lea    (%r12,%rdx,1),%esi
  mov    (%r9),%edi
  mov    (%rsp),%r14
  movslq %esi,%rsi
  add    $0x1,%eax
  add    $0x1,%edi
  movzbl -0x1(%r14,%r13,1),%r14d
  cmp    %r14b,-0x1(%rbp,%rsi,1)
  setne  %sil
  movzbl %sil,%esi
  add    (%r10),%esi
  cmp    %esi,%eax
  mov    %esi,%ebp
  cmovle %eax,%ebp
  cmp    %edi,%eax
  cmovg  %edi,%eax
  cmp    %esi,%edi
  cmovge %ebp,%eax
L83:
  add    $0x1,%edx
  mov    %eax,(%rcx)
  add    $0x4,%r8
  add    $0x4,%rcx
  add    $0x4,%r9
  add    $0x4,%r10
  cmp    %r11d,%edx
  jne    L488
  mov    0x20(%rsp),%eax
  mov    0x10(%rsp),%rbx
  movslq 0x40(%rsp),%r14
  sub    $0x1,%eax
  lea    0x4(%rbx,%rax,4),%rax
  mov    %rax,0x10(%rsp)
L313:
  mov    0x2c(%rsp),%edx
  test   %edx,%edx
  je     L60
  mov    0x10(%rsp),%rax
  movl   $0x3e8,(%rax)
L60:
  addl   $0x1,0x24(%rsp)
  addl   $0x1,0x28(%rsp)
  cmp    %r13,0x30(%rsp)
  je     L50
  add    $0x1,%r13
  jmp    L478
  nopl   0x0(%rax,%rax,1)
L8:
  mov    0x1c(%rsp),%edi
  mov    0x28(%rsp),%eax
  xor    %ecx,%ecx
  lea    -0x4(%r15),%r9
  lea    -0x4(%r8),%r10
  cmp    %eax,%edi
  cmovle %edi,%eax
  setg   %cl
  xor    %r14d,%r14d
  xor    %r12d,%r12d
  mov    %ecx,0x2c(%rsp)
  add    $0x1,%eax
  mov    %eax,0x20(%rsp)
  xor    %eax,%eax
  jmp    L177
  nopw   0x0(%rax,%rax,1)
L428:
  mov    0x4c(%rsp),%eax
  movl   $0x0,0x2c(%rsp)
  sub    %ebx,%eax
  mov    %eax,0x20(%rsp)
  jmp    L61
  nop
L50:
  mov    0x38(%rsp),%r15
L274:
  mov    0x48(%rsp),%eax
  mov    0x44(%rsp),%ebx
  mov    %eax,%edx
  add    %ebx,%eax
  sub    %ebx,%edx
  mov    %eax,%r9d
  mov    $0x1,%eax
  test   %edx,%edx
  jg     L82
  xor    %eax,%eax
  xor    %edx,%edx
L82:
  cmp    %r9d,0x1c(%rsp)
  jle    L132
  xor    %r8d,%r8d
  mov    $0x1,%ecx
L447:
  mov    0x30(%rsp),%rbx
  sub    %edx,%r9d
  add    $0x1,%r9d
  mov    (%r15,%rbx,8),%rdi
  lea    (%rax,%r9,1),%esi
  add    %ecx,%esi
  mov    (%rdi),%r12d
  lea    0x4(%rdi),%r10
  cmp    $0x1,%esi
  jle    L5
  lea    -0x2(%rsi),%edx
  lea    -0x1(%rsi),%r11d
  cmp    $0x2,%edx
  jbe    L338
  mov    %r11d,%ebx
  movd   %r12d,%xmm4
  mov    %r10,%rdx
  shr    $0x2,%ebx
  pshufd $0x0,%xmm4,%xmm0
  sub    $0x1,%ebx
  shl    $0x4,%rbx
  lea    0x14(%rdi,%rbx,1),%rdi
  nopl   0x0(%rax,%rax,1)
L232:
  movdqu (%rdx),%xmm1
  movdqu (%rdx),%xmm3
  add    $0x10,%rdx
  pcmpgtd %xmm0,%xmm1
  pand   %xmm1,%xmm0
  pandn  %xmm3,%xmm1
  por    %xmm1,%xmm0
  cmp    %rdx,%rdi
  jne    L232
  movdqa %xmm0,%xmm2
  mov    %r11d,%edi
  psrldq $0x8,%xmm2
  and    $0xfffffffc,%edi
  movdqa %xmm2,%xmm1
  mov    %edi,%ebx
  lea    0x1(%rdi),%edx
  pcmpgtd %xmm0,%xmm1
  lea    (%r10,%rbx,4),%r10
  pand   %xmm1,%xmm0
  pandn  %xmm2,%xmm1
  por    %xmm1,%xmm0
  movdqa %xmm0,%xmm2
  psrldq $0x4,%xmm2
  movdqa %xmm2,%xmm1
  pcmpgtd %xmm0,%xmm1
  pand   %xmm1,%xmm0
  pandn  %xmm2,%xmm1
  por    %xmm0,%xmm1
  movd   %xmm1,%r12d
  cmp    %r11d,%edi
  je     L5
L413:
  mov    (%r10),%edi
  cmp    %edi,%r12d
  cmovg  %edi,%r12d
  lea    0x1(%rdx),%edi
  cmp    %edi,%esi
  jle    L5
  mov    0x4(%r10),%edi
  cmp    %edi,%r12d
  cmovg  %edi,%r12d
  add    $0x2,%edx
  cmp    %edx,%esi
  jle    L5
  mov    0x8(%r10),%edx
  cmp    %edx,%r12d
  cmovg  %edx,%r12d
L5:
  mov    0x48(%rsp),%ebx
  test   %ebx,%ebx
  js     L468
  test   %r8b,%r8b
  je     L410
  lea    -0x1(%rbx),%esi
  mov    0x44(%rsp),%ebx
  mov    0x1c(%rsp),%r10d
  xor    %r8d,%r8d
  movslq %esi,%rdx
  lea    (%rbx,%rsi,1),%edi
  sub    %ebx,%esi
  nopw   0x0(%rax,%rax,1)
L210:
  movslq %r9d,%r9
  mov    %edx,%r11d
  add    %r9,%rax
  add    %rcx,%rax
  mov    0x8(%r15,%rdx,8),%rcx
  mov    -0x4(%rcx,%rax,4),%eax
  cmp    %eax,%r12d
  cmovg  %eax,%r12d
  cmp    $0xffffffff,%edx
  je     L110
  xor    %eax,%eax
  mov    %r8d,%ecx
  test   %esi,%esi
  cmovg  %esi,%ecx
  setg   %al
  cmp    %edi,%r10d
  jle    L220
L110:
  mov    0x48(%rsp),%ebp
  xor    %ebx,%ebx
  nopl   0x0(%rax)
L417:
  mov    (%r15,%rbx,8),%rdi
  add    $0x1,%rbx
  call   <free@plt>
  cmp    %ebx,%ebp
  jge    L417
L468:
  mov    %r15,%rdi
  call   <free@plt>
L209:
  add    $0x58,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L220:
  mov    %r10d,%r9d
  sub    $0x1,%rdx
  sub    $0x1,%edi
  sub    $0x1,%esi
  sub    %ecx,%r9d
  xor    %ecx,%ecx
  add    $0x1,%r9d
  test   %r11d,%r11d
  jns    L210
  jmp    L110
  nopl   0x0(%rax)
L132:
  mov    0x1c(%rsp),%r9d
  mov    $0x1,%r8d
  xor    %ecx,%ecx
  jmp    L447
L268:
  xor    %esi,%esi
  mov    0x44(%rsp),%ebx
  mov    %r11,%rax
  cmp    %ebx,0x1c(%rsp)
  setg   %sil
  mov    $0x1,%r14d
  add    $0x4,%rax
  movl   $0x3e8,(%r11)
  jmp    L26
L454:
  movslq 0x48(%rsp),%rax
  mov    %rax,0x30(%rsp)
  jmp    L274
L169:
  mov    %r11,%rcx
  xor    %eax,%eax
  jmp    L242
L338:
  mov    $0x1,%edx
  jmp    L413
L410:
  mov    0x48(%rsp),%eax
  test   %eax,%eax
  js     L468
  jmp    L110
  nopl   (%rax)
L439:
  mov    $0xffffffff,%r12d
  jmp    L209
```

tool_calls: name: extract_symbolic_data
arguments: label: D2
type: byte[16]
name: extract_symbolic_data
arguments: label: D14
type: byte[16]

tool: {"D2": [0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00]}

tool: {"D14": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

assistant: ```c
int narrowbandUnitCostDistanceSameLengthBestScoreLastRowColumnLowMemUsesPointers(char *seq1, char *seq2, int len1, int len2, int maxerr) {
  int **S;
  int score;
  int row, col;
  int match;
  int left, up, diagonal;
  int from, to;
  int rowlength;
  int leftboundary, rightboundary;
  int previousleftboundary;
  int *Sp, *Spu, *Spl, *Spd;
  if (len1 != len2) {
    return (-1);
  }
  S = (int **)calloc((len1 + 1), sizeof(int *));
  for (row = 0; row <= len1; row++) {
    from = row - maxerr;
    to = row + maxerr;
    leftboundary = 0;
    if (from <= 0)
      from = 0;
    else
      leftboundary = 1;
    rightboundary = 0;
    if (to >= len2)
      to = len2;
    else
      rightboundary = 1;
    rowlength = to - from + 1;
    S[row] = (int *)calloc(leftboundary + rowlength + rightboundary, sizeof(int));
  }
  row = 0;
  from = row - maxerr;
  to = row + maxerr;
  leftboundary = 0;
  if (from <= 0)
    from = 0;
  else
    leftboundary = 1;
  rightboundary = 0;
  if (to >= len2)
    to = len2;
  else
    rightboundary = 1;
  rowlength = to - from + 1;
  Sp = S[row];
  if (leftboundary) {
    (*Sp) = 1000;
  }
  Sp += leftboundary;
  for (col = leftboundary; col <= leftboundary + rowlength - 1; col++) {
    (*Sp) = col;
    Sp++;
  }
  if (rightboundary) {
    (*Sp) = 1000;
  }
  previousleftboundary = leftboundary;
  for (row = 1; row <= len1; row++) {
    from = row - maxerr;
    to = row + maxerr;
    leftboundary = 0;
    if (from <= 0)
      from = 0;
    else
      leftboundary = 1;
    rightboundary = 0;
    if (to >= len2)
      to = len2;
    else
      rightboundary = 1;
    rowlength = to - from + 1;
    Sp = S[row];
    Spu = S[row - 1] + previousleftboundary;
    Spl = Sp - 1;
    Spd = Spu - 1;
    if (leftboundary) {
      (*Sp) = 1000;
    }
    Sp += leftboundary;
    Spu += leftboundary;
    Spl += leftboundary;
    Spd += leftboundary;
    for (col = leftboundary; col <= leftboundary + rowlength - 1; col++) {
      if (col == 0)
        (*Sp) = row;
      else {
        match = (seq1[row - 1] == seq2[from + col - leftboundary - 1]) ? 0 : 1;
        up = (*Spu) + 1;
        left = (*Spl) + 1;
        diagonal = (*Spd) + match;
        (*Sp) = ((diagonal <= left) ? ((diagonal <= up) ? diagonal : up) : ((left <= up) ? left : up));
      }
      Sp++;
      Spu++;
      Spl++;
      Spd++;
    }
    if (rightboundary) {
      (*Sp) = 1000;
    }
    previousleftboundary = leftboundary;
  }
  row = len1;
  from = row - maxerr;
  to = row + maxerr;
  leftboundary = 0;
  if (from <= 0)
    from = 0;
  else
    leftboundary = 1;
  rightboundary = 0;
  if (to >= len2)
    to = len2;
  else
    rightboundary = 1;
  rowlength = to - from + 1;
  Sp = S[row];
  score = (*Sp);
  Sp++;
  for (col = 1; col <= leftboundary + rowlength + rightboundary - 1; col++) {
    if ((*Sp) < score) {
      score = (*Sp);
    }
    Sp++;
  }
  row = len1;
  from = row - maxerr;
  to = row + maxerr;
  leftboundary = 0;
  if (from <= 0)
    from = 0;
  else
    leftboundary = 1;
  rightboundary = 0;
  if (to >= len2)
    to = len2;
  else
    rightboundary = 1;
  rowlength = to - from + 1;
  while ((row >= 0) && (to == len2)) {
    Sp = S[row] + leftboundary + rowlength + rightboundary - 1;
    if ((*Sp) < score) {
      score = (*Sp);
    }
    row--;
    if (row >= 0) {
      from = row - maxerr;
      to = row + maxerr;
      leftboundary = 0;
      if (from <= 0)
        from = 0;
      else
        leftboundary = 1;
      rightboundary = 0;
      if (to >= len2)
        to = len2;
      else
        rightboundary = 1;
      rowlength = to - from + 1;
    }
  }
  for (row = 0; row <= len1; row++) {
    free(S[row]);
  }
  free(S);
  return (score);
}
```