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

```asm
<backslash_eliminate>:
  endbr64
  push   %r15
  push   %r14
  mov    %esi,%r14d
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x28,%rsp
  cmp    $0x1,%esi
  je     L636
L638:
  movzbl (%rbx),%eax
  test   %al,%al
  je     L599
  xor    %r8d,%r8d
  xor    %edx,%edx
  xor    %ebp,%ebp
  xor    %ecx,%ecx
  mov    $0x64,%esi
  lea    D8(%rip),%r13
  nopl   0x0(%rax)
L655:
  test   %edx,%edx
  je     L397
  lea    -0x2d(%rax),%edx
  cmp    $0x50,%dl
  ja     L473
  movzbl %dl,%edx
  movslq 0x0(%r13,%rdx,4),%rdx
  add    %r13,%rdx
  notrack jmp *%rdx
  cs nopw 0x0(%rax,%rax,1)
L473:
  mov    %ebp,%eax
  test   %r14d,%r14d
  jne    L101
  movslq %ebp,%rbp
  add    $0x1,%eax
  movb   $0x5c,(%r12,%rbp,1)
L101:
  lea    0x1(%rax),%ebp
L560:
  movzbl (%rbx),%edx
  cltq
  add    $0x1,%rbx
  mov    %dl,(%r12,%rax,1)
  xor    %edx,%edx
  nopl   0x0(%rax)
L305:
  movzbl (%rbx),%eax
  test   %al,%al
  jne    L655
  movslq %ebp,%rax
  add    %r12,%rax
  test   %edx,%edx
  je     L563
  movb   $0x5c,(%rax)
  lea    0x1(%rbp),%eax
  cltq
  add    %r12,%rax
L563:
  movb   $0x0,(%rax)
L0:
  add    $0x28,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
  lea    -0x30(%rax),%r9d
  movzbl 0x1(%rbx),%edx
  cmp    $0x3,%r9b
  ja     L381
  lea    -0x30(%rdx),%r10d
  cmp    $0x7,%r10b
  jbe    L25
  cmp    $0x30,%al
  jne    L381
  mov    %edx,%edi
  and    $0xffffffdf,%edi
  cmp    $0x58,%dil
  jne    L299
  movsbl 0x2(%rbx),%edi
  mov    %esi,0x14(%rsp)
  mov    %r8d,0x10(%rsp)
  mov    %ecx,0xc(%rsp)
  mov    %edi,%r15d
  mov    %r9b,0x8(%rsp)
  mov    %edi,0x18(%rsp)
  call   <isxdigit@plt>
  movzbl 0x8(%rsp),%r9d
  mov    0xc(%rsp),%ecx
  test   %eax,%eax
  mov    0x10(%rsp),%r8d
  mov    0x14(%rsp),%esi
  je     L181
  mov    0x18(%rsp),%edi
  lea    -0x30(%rdi),%eax
  cmp    $0x9,%eax
  ja     L129
  sub    $0x30,%r15d
  mov    %r15d,%r9d
L588:
  movsbl 0x3(%rbx),%edi
  mov    %esi,0x14(%rsp)
  mov    %r9b,0x10(%rsp)
  mov    %r8d,0xc(%rsp)
  mov    %ecx,0x8(%rsp)
  mov    %dil,0x1f(%rsp)
  mov    %edi,0x18(%rsp)
  call   <isxdigit@plt>
  mov    0x8(%rsp),%ecx
  mov    0xc(%rsp),%r8d
  test   %eax,%eax
  movzbl 0x10(%rsp),%r9d
  mov    0x14(%rsp),%esi
  je     L415
  mov    0x18(%rsp),%edi
  shl    $0x4,%r15d
  movzbl 0x1f(%rsp),%edx
  lea    -0x30(%rdi),%eax
  cmp    $0x9,%eax
  jbe    L61
  mov    %esi,0x14(%rsp)
  mov    %r8d,0x10(%rsp)
  mov    %ecx,0xc(%rsp)
  mov    %dl,0x8(%rsp)
  call   <islower@plt>
  movzbl 0x8(%rsp),%edx
  mov    0x14(%rsp),%esi
  mov    %eax,%r9d
  mov    0x10(%rsp),%r8d
  mov    0xc(%rsp),%ecx
  lea    -0x57(%rdx),%eax
  sub    $0x37,%edx
  test   %r9d,%r9d
  cmovne %eax,%edx
L68:
  lea    (%r15,%rdx,1),%r9d
  add    $0x4,%rbx
  jmp    L144
  nopw   0x0(%rax,%rax,1)
  mov    %ebp,%eax
  test   %ecx,%ecx
  je     L301
  movslq %ebp,%rbp
  add    $0x1,%eax
  movb   $0x5c,(%r12,%rbp,1)
L301:
  lea    0x1(%rax),%ebp
  cltq
  add    $0x1,%rbx
  xor    %edx,%edx
  movb   $0x7d,(%r12,%rax,1)
  jmp    L305
  add    $0x1,%rbx
  xor    %edx,%edx
  jmp    L305
  movslq %ebp,%rax
  add    $0x1,%rbx
  add    $0x1,%ebp
  xor    %edx,%edx
  movb   $0xb,(%r12,%rax,1)
  jmp    L305
  movslq %ebp,%rax
  add    $0x1,%rbx
  add    $0x1,%ebp
  xor    %edx,%edx
  movb   $0x9,(%r12,%rax,1)
  jmp    L305
  movslq %ebp,%rax
  add    $0x1,%rbx
  add    $0x1,%ebp
  xor    %edx,%edx
  movb   $0x20,(%r12,%rax,1)
  jmp    L305
  movslq %ebp,%rax
  add    $0x1,%rbx
  add    $0x1,%ebp
  xor    %edx,%edx
  movb   $0xd,(%r12,%rax,1)
  jmp    L305
  movslq %ebp,%rax
  add    $0x1,%rbx
  add    $0x1,%ebp
  xor    %edx,%edx
  movb   $0xa,(%r12,%rax,1)
  jmp    L305
  movslq %ebp,%rax
  add    $0x1,%rbx
  add    $0x1,%ebp
  xor    %edx,%edx
  movb   $0xc,(%r12,%rax,1)
  jmp    L305
  movslq %ebp,%rax
  add    $0x1,%rbx
  add    $0x1,%ebp
  xor    %edx,%edx
  movb   $0x8,(%r12,%rax,1)
  jmp    L305
  movslq %ebp,%rax
  add    $0x1,%rbx
  add    $0x1,%ebp
  xor    %edx,%edx
  movb   $0x5c,(%r12,%rax,1)
  jmp    L305
  mov    %ebp,%eax
  test   %ecx,%ecx
  je     L500
  movslq %ebp,%rbp
  add    $0x1,%eax
  movb   $0x5c,(%r12,%rbp,1)
L500:
  lea    0x1(%rax),%ebp
  cltq
  add    $0x1,%rbx
  xor    %edx,%edx
  movb   $0x2d,(%r12,%rax,1)
  jmp    L305
  nopw   0x0(%rax,%rax,1)
L381:
  movsbl %dl,%edi
  sub    $0x30,%edi
  cmp    $0x9,%edi
  ja     L29
L687:
  movzbl 0x2(%rbx),%edi
L452:
  lea    0x10(%rax,%rax,4),%eax
  lea    -0x30(%rdx,%rax,2),%eax
  movsbl %dil,%edx
  sub    $0x30,%edx
  cmp    $0x9,%edx
  ja     L392
  lea    (%rax,%rax,4),%eax
  add    $0x3,%rbx
  lea    -0x30(%rdi,%rax,2),%eax
L586:
  test   %al,%al
  je     L64
  movslq %ebp,%rdx
  add    $0x1,%ebp
  mov    %al,(%r12,%rdx,1)
  xor    %edx,%edx
  jmp    L305
  nop
L397:
  cmp    $0x5c,%al
  je     L516
  cmp    $0x1,%r14d
  je     L243
L161:
  movslq %ebp,%rdi
  add    $0x1,%rbx
  add    $0x1,%ebp
  mov    %al,(%r12,%rdi,1)
  jmp    L305
  nopl   (%rax)
L516:
  add    $0x1,%rbx
  mov    $0x1,%edx
  jmp    L305
  xchg   %ax,%ax
L243:
  cmp    $0x7d,%al
  je     L662
  cmp    $0x7b,%al
  jne    L161
  test   %ecx,%ecx
  jne    L161
  cmp    $0x1,%ebp
  jle    L58
  movslq %ebp,%rax
  cmpb   $0x5c,-0x2(%r12,%rax,1)
  je     L145
L58:
  sub    $0x2,%esi
  js     L64
  lea    0x1(%rbp),%eax
  movslq %ebp,%rcx
  add    $0x2,%ebp
  cltq
  movb   $0x5c,(%r12,%rcx,1)
  movb   $0x30,(%r12,%rax,1)
  movslq %ebp,%rax
L495:
  movzbl (%rbx),%ecx
  add    $0x1,%ebp
  mov    $0x1,%r8d
  add    $0x1,%rbx
  mov    %cl,(%r12,%rax,1)
  mov    $0x1,%ecx
  jmp    L305
  nop
L662:
  movslq %ebp,%rax
  lea    0x1(%rbp),%edi
  add    %r12,%rax
  cmpb   $0x7b,0x1(%rbx)
  jne    L247
  test   %r8d,%r8d
  jne    L23
L247:
  movb   $0x7d,(%rax)
  add    $0x1,%rbx
  mov    %edi,%ebp
  xor    %ecx,%ecx
  jmp    L305
L299:
  movsbl %dl,%edi
  sub    $0x30,%edi
  cmp    $0x9,%edi
  jbe    L687
L181:
  test   %r14d,%r14d
  je     L64
L29:
  cmp    $0x2,%r14d
  je     L175
  movslq %ebp,%rdx
  lea    0x1(%rbp),%eax
  add    $0x2,%ebp
  movb   $0x5c,(%r12,%rdx,1)
  jmp    L560
L392:
  add    $0x2,%rbx
  jmp    L586
L175:
  test   %r9b,%r9b
  je     L64
  movslq %ebp,%rax
  add    $0x1,%rbx
  add    $0x1,%ebp
  xor    %edx,%edx
  mov    %r9b,(%r12,%rax,1)
  jmp    L305
L145:
  movzbl -0x1(%r12,%rax,1),%ecx
  sub    $0x30,%ecx
  cmp    $0x9,%cl
  jbe    L495
  jmp    L58
L23:
  movb   $0x7d,(%rax)
  movzbl 0x1(%rbx),%eax
  movslq %edi,%rdi
  add    $0x2,%ebp
  xor    %r8d,%r8d
  add    $0x2,%rbx
  mov    %al,(%r12,%rdi,1)
  jmp    L305
L25:
  movzbl 0x2(%rbx),%edi
  lea    -0x30(%rdi),%r11d
  cmp    $0x7,%r11b
  ja     L452
  mov    %r9d,%eax
  shl    $0x6,%eax
  add    %r11d,%eax
  lea    (%rax,%r10,8),%r10d
  test   %r10b,%r10b
  je     L64
  movslq %ebp,%rax
  add    $0x3,%rbx
  add    $0x1,%ebp
  xor    %edx,%edx
  mov    %r10b,(%r12,%rax,1)
  jmp    L305
L636:
  mov    %edx,%ebp
  call   <strlen@plt>
  mov    %ebp,%edi
  lea    0x65(%rax),%rsi
  xor    %eax,%eax
  call   <mem@plt>
  movslq %eax,%r12
  test   %eax,%eax
  jne    L638
L64:
  xor    %r12d,%r12d
  jmp    L0
L415:
  add    $0x3,%rbx
L144:
  test   %r9b,%r9b
  je     L64
  movslq %ebp,%rax
  xor    %edx,%edx
  add    $0x1,%ebp
  mov    %r9b,(%r12,%rax,1)
  jmp    L305
L129:
  mov    %esi,0x10(%rsp)
  mov    %r8d,0xc(%rsp)
  mov    %ecx,0x8(%rsp)
  call   <islower@plt>
  mov    0x8(%rsp),%ecx
  mov    0xc(%rsp),%r8d
  test   %eax,%eax
  mov    0x10(%rsp),%esi
  je     L421
  sub    $0x57,%r15d
  mov    %r15d,%r9d
  jmp    L588
L421:
  sub    $0x37,%r15d
  mov    %r15d,%r9d
  jmp    L588
L61:
  sub    $0x30,%edx
  jmp    L68
L599:
  mov    %r12,%rax
  jmp    L563
```

assistant: ```c
char *backslash_eliminate(str, type, who)
char *str;
int type;
int who;
{
  char *new_str;
  int extra = 100;
  int seenlb = 0;
  register int i = 0;
  register int seenbs = 0;
  int first_half = 0;
  if (type == 1) {
    if (!(new_str = mem(who, strlen(str) + 1 + extra))) {
      return 0;
    }
  } else {
    new_str = str;
  }
  while (*str) {
    if (seenbs) {
      seenbs = 0;
      switch (*str) {
      case '\\': {
        new_str[i++] = '\\';
        str++;
        break;
      }
      case '-': {
        if (seenlb) {
          new_str[i++] = '\\';
        }
        new_str[i++] = '-';
        str++;
        break;
      }
      case '}': {
        if (seenlb) {
          new_str[i++] = '\\';
        }
        new_str[i++] = '}';
        str++;
        break;
      }
      case 'n': {
        new_str[i++] = '\n';
        str++;
        break;
      }
      case 't': {
        new_str[i++] = '\t';
        str++;
        break;
      }
      case 's': {
        new_str[i++] = ' ';
        str++;
        break;
      }
      case 'r': {
        new_str[i++] = '\r';
        str++;
        break;
      }
      case 'f': {
        new_str[i++] = '\f';
        str++;
        break;
      }
      case 'b': {
        new_str[i++] = '\b';
        str++;
        break;
      }
      case 'v': {
        new_str[i++] = '\13';
        str++;
        break;
      }
      case 'z': {
        str++;
        break;
      }
      case '0':
      case '1':
      case '2':
      case '3':
      case '4':
      case '5':
      case '6':
      case '7':
      case '8':
      case '9': {
        char val;
        if (*str >= '0' && *str <= '3' && *(str + 1) >= '0' && *(str + 1) <= '7' && *(str + 2) >= '0' && *(str + 2) <= '7') {
          val = ((isdigit(*str) ? (*str) - '0' : islower(*str) ? (*str) + 10 - 'a' : (*str) + 10 - 'A') << 6) + ((isdigit(*(str + 1)) ? (*(str + 1)) - '0' : islower(*(str + 1)) ? (*(str + 1)) + 10 - 'a' : (*(str + 1)) + 10 - 'A') << 3) + (isdigit(*(str + 2)) ? (*(str + 2)) - '0' : islower(*(str + 2)) ? (*(str + 2)) + 10 - 'a' : (*(str + 2)) + 10 - 'A');
          if (!val) {
            return 0;
          }
          new_str[i++] = val;
          str += 3;
          break;
        }
        if (*str == '0' && (*(str + 1) == 'x' || *(str + 1) == 'X') && isxdigit(*(str + 2))) {
          val = (isdigit(*(str + 2)) ? (*(str + 2)) - '0' : islower(*(str + 2)) ? (*(str + 2)) + 10 - 'a' : (*(str + 2)) + 10 - 'A');
          if (isxdigit(*(str + 3))) {
            val = (val << 4) + (isdigit(*(str + 3)) ? (*(str + 3)) - '0' : islower(*(str + 3)) ? (*(str + 3)) + 10 - 'a' : (*(str + 3)) + 10 - 'A');
            str += 4;
          } else {
            str += 3;
          }
          if (!val) {
            return 0;
          }
          new_str[i++] = val;
          break;
        }
        if (isdigit(*(str + 1))) {
          val = (isdigit(*str) ? (*str) - '0' : islower(*str) ? (*str) + 10 - 'a' : (*str) + 10 - 'A') * 10 + (isdigit(*(str + 1)) ? (*(str + 1)) - '0' : islower(*(str + 1)) ? (*(str + 1)) + 10 - 'a' : (*(str + 1)) + 10 - 'A');
          if (isdigit(*(str + 2))) {
            val = 10 * val + (isdigit(*(str + 2)) ? (*(str + 2)) - '0' : islower(*(str + 2)) ? (*(str + 2)) + 10 - 'a' : (*(str + 2)) + 10 - 'A');
            str += 3;
          } else {
            str += 2;
          }
          if (!val) {
            return 0;
          }
          new_str[i++] = val;
          break;
        }
        if (*str == '0' && type == 0) {
          return 0;
        }
        if (type == 2) {
          if (!(val = (isdigit(*str) ? (*str) - '0' : islower(*str) ? (*str) + 10 - 'a' : (*str) + 10 - 'A'))) {
            return 0;
          }
          new_str[i++] = val;
          str++;
        } else {
          new_str[i++] = '\\';
          new_str[i++] = *str++;
        }
        break;
      }
      default: {
        if (type == 0) {
          new_str[i++] = '\\';
        }
        new_str[i++] = *str++;
        break;
      }
      }
    } else {
      if (*str == '\\') {
        seenbs = 1;
        str++;
      } else if (type == 1 && *str == '}') {
        if (*(str + 1) == '{' && first_half) {
          new_str[i++] = *str++;
          new_str[i++] = *str++;
          first_half = 0;
        } else {
          seenlb = 0;
          new_str[i++] = *str++;
        }
      } else if (type == 1 && !seenlb && *str == '{') {
        seenlb = 1;
        first_half = 1;
        if (i < 2 || new_str[i - 2] != '\\' || !(new_str[i - 1] >= '0' && new_str[i - 1] <= '9')) {
          if ((extra -= 2) < 0) {
            return 0;
          }
          new_str[i++] = '\\';
          new_str[i++] = '0';
        }
        new_str[i++] = *str++;
      } else {
        new_str[i++] = *str++;
      }
    }
  }
  if (seenbs) {
    new_str[i++] = '\\';
  }
  new_str[i] = '\0';
  return new_str;
}
```