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

```asm
<narrowbandUnitCostDistanceSameLengthBestScoreLastRowColumnLowMemUsesPointers>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %rdi,-0x78(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    %edx,-0x84(%rbp)
  mov    %ecx,-0x88(%rbp)
  mov    %r8d,-0x8c(%rbp)
  mov    -0x84(%rbp),%eax
  cmp    -0x88(%rbp),%eax
  je     L317
  mov    $0xffffffff,%eax
  jmp    L121
L317:
  mov    -0x84(%rbp),%eax
  add    $0x1,%eax
  cltq
  mov    $0x8,%esi
  mov    %rax,%rdi
  call   <calloc@plt>
  mov    %rax,-0x18(%rbp)
  movl   $0x0,-0x68(%rbp)
  jmp    L308
L102:
  mov    -0x68(%rbp),%eax
  sub    -0x8c(%rbp),%eax
  mov    %eax,-0x60(%rbp)
  mov    -0x68(%rbp),%edx
  mov    -0x8c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x5c(%rbp)
  movl   $0x0,-0x54(%rbp)
  cmpl   $0x0,-0x60(%rbp)
  jg     L148
  movl   $0x0,-0x60(%rbp)
  jmp    L153
L148:
  movl   $0x1,-0x54(%rbp)
L153:
  movl   $0x0,-0x50(%rbp)
  mov    -0x5c(%rbp),%eax
  cmp    -0x88(%rbp),%eax
  jl     L130
  mov    -0x88(%rbp),%eax
  mov    %eax,-0x5c(%rbp)
  jmp    L433
L130:
  movl   $0x1,-0x50(%rbp)
L433:
  mov    -0x5c(%rbp),%eax
  sub    -0x60(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x58(%rbp)
  mov    -0x54(%rbp),%edx
  mov    -0x58(%rbp),%eax
  add    %eax,%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  cltq
  mov    -0x68(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x18(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  mov    $0x4,%esi
  mov    %rax,%rdi
  call   <calloc@plt>
  mov    %rax,(%rbx)
  addl   $0x1,-0x68(%rbp)
L308:
  mov    -0x68(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jle    L102
  movl   $0x0,-0x68(%rbp)
  mov    -0x68(%rbp),%eax
  sub    -0x8c(%rbp),%eax
  mov    %eax,-0x60(%rbp)
  mov    -0x68(%rbp),%edx
  mov    -0x8c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x5c(%rbp)
  movl   $0x0,-0x54(%rbp)
  cmpl   $0x0,-0x60(%rbp)
  jg     L79
  movl   $0x0,-0x60(%rbp)
  jmp    L183
L79:
  movl   $0x1,-0x54(%rbp)
L183:
  movl   $0x0,-0x50(%rbp)
  mov    -0x5c(%rbp),%eax
  cmp    -0x88(%rbp),%eax
  jl     L123
  mov    -0x88(%rbp),%eax
  mov    %eax,-0x5c(%rbp)
  jmp    L334
L123:
  movl   $0x1,-0x50(%rbp)
L334:
  mov    -0x5c(%rbp),%eax
  sub    -0x60(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x58(%rbp)
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x38(%rbp)
  cmpl   $0x0,-0x54(%rbp)
  je     L155
  mov    -0x38(%rbp),%rax
  movl   $0x3e8,(%rax)
L155:
  mov    -0x54(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x38(%rbp)
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x64(%rbp)
  jmp    L395
L419:
  mov    -0x38(%rbp),%rax
  mov    -0x64(%rbp),%edx
  mov    %edx,(%rax)
  addq   $0x4,-0x38(%rbp)
  addl   $0x1,-0x64(%rbp)
L395:
  mov    -0x54(%rbp),%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x64(%rbp)
  jl     L419
  cmpl   $0x0,-0x50(%rbp)
  je     L223
  mov    -0x38(%rbp),%rax
  movl   $0x3e8,(%rax)
L223:
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
  movl   $0x1,-0x68(%rbp)
  jmp    L280
L320:
  mov    -0x68(%rbp),%eax
  sub    -0x8c(%rbp),%eax
  mov    %eax,-0x60(%rbp)
  mov    -0x68(%rbp),%edx
  mov    -0x8c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x5c(%rbp)
  movl   $0x0,-0x54(%rbp)
  cmpl   $0x0,-0x60(%rbp)
  jg     L205
  movl   $0x0,-0x60(%rbp)
  jmp    L66
L205:
  movl   $0x1,-0x54(%rbp)
L66:
  movl   $0x0,-0x50(%rbp)
  mov    -0x5c(%rbp),%eax
  cmp    -0x88(%rbp),%eax
  jl     L512
  mov    -0x88(%rbp),%eax
  mov    %eax,-0x5c(%rbp)
  jmp    L491
L512:
  movl   $0x1,-0x50(%rbp)
L491:
  mov    -0x5c(%rbp),%eax
  sub    -0x60(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x58(%rbp)
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x68(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x4c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x38(%rbp),%rax
  sub    $0x4,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x30(%rbp),%rax
  sub    $0x4,%rax
  mov    %rax,-0x20(%rbp)
  cmpl   $0x0,-0x54(%rbp)
  je     L307
  mov    -0x38(%rbp),%rax
  movl   $0x3e8,(%rax)
L307:
  mov    -0x54(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x38(%rbp)
  mov    -0x54(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x30(%rbp)
  mov    -0x54(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x28(%rbp)
  mov    -0x54(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x20(%rbp)
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x64(%rbp)
  jmp    L211
L509:
  cmpl   $0x0,-0x64(%rbp)
  jne    L341
  mov    -0x38(%rbp),%rax
  mov    -0x68(%rbp),%edx
  mov    %edx,(%rax)
  jmp    L77
L341:
  mov    -0x68(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x60(%rbp),%ecx
  mov    -0x64(%rbp),%eax
  add    %ecx,%eax
  sub    -0x54(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rcx
  mov    -0x80(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  setne  %al
  movzbl %al,%eax
  mov    %eax,-0x48(%rbp)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  mov    %eax,-0x44(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x3c(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jg     L249
  mov    -0x3c(%rbp),%edx
  mov    -0x44(%rbp),%eax
  cmp    %eax,%edx
  cmovle %edx,%eax
  jmp    L42
L249:
  mov    -0x40(%rbp),%edx
  mov    -0x44(%rbp),%eax
  cmp    %eax,%edx
  cmovle %edx,%eax
L42:
  mov    -0x38(%rbp),%rdx
  mov    %eax,(%rdx)
L77:
  addq   $0x4,-0x38(%rbp)
  addq   $0x4,-0x30(%rbp)
  addq   $0x4,-0x28(%rbp)
  addq   $0x4,-0x20(%rbp)
  addl   $0x1,-0x64(%rbp)
L211:
  mov    -0x54(%rbp),%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x64(%rbp)
  jl     L509
  cmpl   $0x0,-0x50(%rbp)
  je     L372
  mov    -0x38(%rbp),%rax
  movl   $0x3e8,(%rax)
L372:
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
  addl   $0x1,-0x68(%rbp)
L280:
  mov    -0x68(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jle    L320
  mov    -0x84(%rbp),%eax
  mov    %eax,-0x68(%rbp)
  mov    -0x68(%rbp),%eax
  sub    -0x8c(%rbp),%eax
  mov    %eax,-0x60(%rbp)
  mov    -0x68(%rbp),%edx
  mov    -0x8c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x5c(%rbp)
  movl   $0x0,-0x54(%rbp)
  cmpl   $0x0,-0x60(%rbp)
  jg     L236
  movl   $0x0,-0x60(%rbp)
  jmp    L220
L236:
  movl   $0x1,-0x54(%rbp)
L220:
  movl   $0x0,-0x50(%rbp)
  mov    -0x5c(%rbp),%eax
  cmp    -0x88(%rbp),%eax
  jl     L329
  mov    -0x88(%rbp),%eax
  mov    %eax,-0x5c(%rbp)
  jmp    L70
L329:
  movl   $0x1,-0x50(%rbp)
L70:
  mov    -0x5c(%rbp),%eax
  sub    -0x60(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x58(%rbp)
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x6c(%rbp)
  addq   $0x4,-0x38(%rbp)
  movl   $0x1,-0x64(%rbp)
  jmp    L47
L238:
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x6c(%rbp)
  jle    L339
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x6c(%rbp)
L339:
  addq   $0x4,-0x38(%rbp)
  addl   $0x1,-0x64(%rbp)
L47:
  mov    -0x54(%rbp),%edx
  mov    -0x58(%rbp),%eax
  add    %eax,%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x64(%rbp)
  jl     L238
  mov    -0x84(%rbp),%eax
  mov    %eax,-0x68(%rbp)
  mov    -0x68(%rbp),%eax
  sub    -0x8c(%rbp),%eax
  mov    %eax,-0x60(%rbp)
  mov    -0x68(%rbp),%edx
  mov    -0x8c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x5c(%rbp)
  movl   $0x0,-0x54(%rbp)
  cmpl   $0x0,-0x60(%rbp)
  jg     L293
  movl   $0x0,-0x60(%rbp)
  jmp    L396
L293:
  movl   $0x1,-0x54(%rbp)
L396:
  movl   $0x0,-0x50(%rbp)
  mov    -0x5c(%rbp),%eax
  cmp    -0x88(%rbp),%eax
  jl     L449
  mov    -0x88(%rbp),%eax
  mov    %eax,-0x5c(%rbp)
  jmp    L415
L449:
  movl   $0x1,-0x50(%rbp)
L415:
  mov    -0x5c(%rbp),%eax
  sub    -0x60(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x58(%rbp)
  jmp    L273
L362:
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x54(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x58(%rbp),%eax
  cltq
  add    %rax,%rcx
  mov    -0x50(%rbp),%eax
  cltq
  add    %rcx,%rax
  shl    $0x2,%rax
  sub    $0x4,%rax
  add    %rdx,%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x6c(%rbp)
  jle    L246
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x6c(%rbp)
L246:
  subl   $0x1,-0x68(%rbp)
  cmpl   $0x0,-0x68(%rbp)
  js     L273
  mov    -0x68(%rbp),%eax
  sub    -0x8c(%rbp),%eax
  mov    %eax,-0x60(%rbp)
  mov    -0x68(%rbp),%edx
  mov    -0x8c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x5c(%rbp)
  movl   $0x0,-0x54(%rbp)
  cmpl   $0x0,-0x60(%rbp)
  jg     L327
  movl   $0x0,-0x60(%rbp)
  jmp    L158
L327:
  movl   $0x1,-0x54(%rbp)
L158:
  movl   $0x0,-0x50(%rbp)
  mov    -0x5c(%rbp),%eax
  cmp    -0x88(%rbp),%eax
  jl     L374
  mov    -0x88(%rbp),%eax
  mov    %eax,-0x5c(%rbp)
  jmp    L302
L374:
  movl   $0x1,-0x50(%rbp)
L302:
  mov    -0x5c(%rbp),%eax
  sub    -0x60(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x58(%rbp)
L273:
  cmpl   $0x0,-0x68(%rbp)
  js     L237
  mov    -0x5c(%rbp),%eax
  cmp    -0x88(%rbp),%eax
  je     L362
L237:
  movl   $0x0,-0x68(%rbp)
  jmp    L100
L344:
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <free@plt>
  addl   $0x1,-0x68(%rbp)
L100:
  mov    -0x68(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jle    L344
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x6c(%rbp),%eax
L121:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

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);
}
```