user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<narrowbandUnitCostDistanceNoEndPenaltySeq2LowMemUsesPointers>:
  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
  jle    L186
  mov    $0xffffffff,%eax
  jmp    L203
L186:
  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    L155
L303:
  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,-0x58(%rbp)
  cmpl   $0x0,-0x60(%rbp)
  jg     L221
  movl   $0x0,-0x60(%rbp)
  jmp    L117
L221:
  movl   $0x1,-0x58(%rbp)
L117:
  movl   $0x0,-0x54(%rbp)
  mov    -0x5c(%rbp),%eax
  cmp    -0x88(%rbp),%eax
  jl     L95
  mov    -0x88(%rbp),%eax
  mov    %eax,-0x5c(%rbp)
  jmp    L82
L95:
  movl   $0x1,-0x54(%rbp)
L82:
  mov    -0x5c(%rbp),%eax
  sub    -0x60(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x58(%rbp),%edx
  mov    -0x4c(%rbp),%eax
  add    %eax,%edx
  mov    -0x54(%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)
L155:
  mov    -0x68(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jle    L303
  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,-0x58(%rbp)
  cmpl   $0x0,-0x60(%rbp)
  jg     L389
  movl   $0x0,-0x60(%rbp)
  jmp    L202
L389:
  movl   $0x1,-0x58(%rbp)
L202:
  movl   $0x0,-0x54(%rbp)
  mov    -0x5c(%rbp),%eax
  cmp    -0x88(%rbp),%eax
  jl     L129
  mov    -0x88(%rbp),%eax
  mov    %eax,-0x5c(%rbp)
  jmp    L94
L129:
  movl   $0x1,-0x54(%rbp)
L94:
  mov    -0x5c(%rbp),%eax
  sub    -0x60(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x4c(%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,-0x58(%rbp)
  je     L246
  mov    -0x38(%rbp),%rax
  movl   $0x3e8,(%rax)
L246:
  mov    -0x58(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x38(%rbp)
  mov    -0x58(%rbp),%eax
  mov    %eax,-0x64(%rbp)
  jmp    L153
L99:
  mov    -0x38(%rbp),%rax
  mov    -0x64(%rbp),%edx
  mov    %edx,(%rax)
  addq   $0x4,-0x38(%rbp)
  addl   $0x1,-0x64(%rbp)
L153:
  mov    -0x58(%rbp),%edx
  mov    -0x4c(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x64(%rbp)
  jl     L99
  cmpl   $0x0,-0x54(%rbp)
  je     L6
  mov    -0x38(%rbp),%rax
  movl   $0x3e8,(%rax)
L6:
  mov    -0x58(%rbp),%eax
  mov    %eax,-0x50(%rbp)
  movl   $0x1,-0x68(%rbp)
  jmp    L89
L142:
  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,-0x58(%rbp)
  cmpl   $0x0,-0x60(%rbp)
  jg     L71
  movl   $0x0,-0x60(%rbp)
  jmp    L146
L71:
  movl   $0x1,-0x58(%rbp)
L146:
  movl   $0x0,-0x54(%rbp)
  mov    -0x5c(%rbp),%eax
  cmp    -0x88(%rbp),%eax
  jl     L17
  mov    -0x88(%rbp),%eax
  mov    %eax,-0x5c(%rbp)
  jmp    L196
L17:
  movl   $0x1,-0x54(%rbp)
L196:
  mov    -0x5c(%rbp),%eax
  sub    -0x60(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x4c(%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    -0x50(%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,-0x58(%rbp)
  je     L354
  mov    -0x38(%rbp),%rax
  movl   $0x3e8,(%rax)
L354:
  mov    -0x58(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x38(%rbp)
  mov    -0x58(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x30(%rbp)
  mov    -0x58(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x28(%rbp)
  mov    -0x58(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x20(%rbp)
  mov    -0x58(%rbp),%eax
  mov    %eax,-0x64(%rbp)
  jmp    L12
L16:
  cmpl   $0x0,-0x64(%rbp)
  jne    L299
  mov    -0x38(%rbp),%rax
  mov    -0x68(%rbp),%edx
  mov    %edx,(%rax)
  jmp    L361
L299:
  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    -0x58(%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     L167
  mov    -0x3c(%rbp),%edx
  mov    -0x44(%rbp),%eax
  cmp    %eax,%edx
  cmovle %edx,%eax
  jmp    L296
L167:
  mov    -0x40(%rbp),%edx
  mov    -0x44(%rbp),%eax
  cmp    %eax,%edx
  cmovle %edx,%eax
L296:
  mov    -0x38(%rbp),%rdx
  mov    %eax,(%rdx)
L361:
  addq   $0x4,-0x38(%rbp)
  addq   $0x4,-0x30(%rbp)
  addq   $0x4,-0x28(%rbp)
  addq   $0x4,-0x20(%rbp)
  addl   $0x1,-0x64(%rbp)
L12:
  mov    -0x58(%rbp),%edx
  mov    -0x4c(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x64(%rbp)
  jl     L16
  cmpl   $0x0,-0x54(%rbp)
  je     L57
  mov    -0x38(%rbp),%rax
  movl   $0x3e8,(%rax)
L57:
  mov    -0x58(%rbp),%eax
  mov    %eax,-0x50(%rbp)
  addl   $0x1,-0x68(%rbp)
L89:
  mov    -0x68(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jle    L142
  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,-0x58(%rbp)
  cmpl   $0x0,-0x60(%rbp)
  jg     L113
  movl   $0x0,-0x60(%rbp)
  jmp    L362
L113:
  movl   $0x1,-0x58(%rbp)
L362:
  movl   $0x0,-0x54(%rbp)
  mov    -0x5c(%rbp),%eax
  cmp    -0x88(%rbp),%eax
  jl     L274
  mov    -0x88(%rbp),%eax
  mov    %eax,-0x5c(%rbp)
  jmp    L283
L274:
  movl   $0x1,-0x54(%rbp)
L283:
  mov    -0x5c(%rbp),%eax
  sub    -0x60(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x4c(%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    L292
L161:
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x6c(%rbp)
  jle    L150
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x6c(%rbp)
L150:
  addq   $0x4,-0x38(%rbp)
  addl   $0x1,-0x64(%rbp)
L292:
  mov    -0x58(%rbp),%edx
  mov    -0x4c(%rbp),%eax
  add    %eax,%edx
  mov    -0x54(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x64(%rbp)
  jl     L161
  movl   $0x0,-0x68(%rbp)
  jmp    L166
L19:
  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)
L166:
  mov    -0x68(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jle    L19
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x6c(%rbp),%eax
L203:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int narrowbandUnitCostDistanceNoEndPenaltySeq2LowMemUsesPointers(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++;
  }
  for (row = 0; row <= len1; row++) {
    free(S[row]);
  }
  free(S);
  return (score);
}
```