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

```asm
<escape_data>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  movl   $0x1,-0x10(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  jmp    L98
L150:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1f,-0xc(%rbp)
  jle    L152
  cmpl   $0x5c,-0xc(%rbp)
  je     L152
  cmpl   $0x74,-0xc(%rbp)
  jle    L83
L152:
  addl   $0x4,-0x10(%rbp)
  jmp    L77
L83:
  addl   $0x1,-0x10(%rbp)
L77:
  addl   $0x1,-0x18(%rbp)
L98:
  mov    -0x18(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L150
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L133
  mov    $0x0,%eax
  jmp    L38
L133:
  movl   $0x0,-0x14(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  jmp    L146
L56:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1f,-0xc(%rbp)
  jle    L36
  cmpl   $0x5c,-0xc(%rbp)
  je     L36
  cmpl   $0x7e,-0xc(%rbp)
  jle    L8
L36:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x5c,(%rax)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x78,(%rax)
  mov    -0xc(%rbp),%eax
  lea    0xf(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x4,%eax
  lea    0x30(%rax),%edx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x2(%rax),%rcx
  mov    -0x8(%rbp),%rax
  add    %rcx,%rax
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  cltd
  shr    $0x1c,%edx
  add    %edx,%eax
  and    $0xf,%eax
  sub    %edx,%eax
  lea    0x30(%rax),%edx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x3(%rax),%rcx
  mov    -0x8(%rbp),%rax
  add    %rcx,%rax
  mov    %dl,(%rax)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x2(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jle    L9
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x2(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  lea    0x27(%rax),%edx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x2(%rax),%rcx
  mov    -0x8(%rbp),%rax
  add    %rcx,%rax
  mov    %dl,(%rax)
L9:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x3(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jle    L62
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x3(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  lea    0x27(%rax),%edx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x3(%rax),%rcx
  mov    -0x8(%rbp),%rax
  add    %rcx,%rax
  mov    %dl,(%rax)
L62:
  addl   $0x4,-0x14(%rbp)
  jmp    L135
L8:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    -0xc(%rbp),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x14(%rbp)
L135:
  addl   $0x1,-0x18(%rbp)
L146:
  mov    -0x18(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L56
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
L38:
  leave
  ret
```

assistant: ```c
char *escape_data(const uint8_t *packet, uint32_t start, uint32_t end) {
  int i, o;
  uint8_t c;
  unsigned int length = 1;
  char *outstr;
  for (i = start; i < end; i++) {
    c = packet[i];
    if (c < 0x20 || c == 0x5c || c >= 0x75)
      length += 4;
    else
      length += 1;
  }
  outstr = (char *)malloc(sizeof(char) * length);
  if (outstr == 0)
    return (char *)0;
  o = 0;
  for (i = start; i < end; i++) {
    c = packet[i];
    if (c < 0x20 || c == 0x5c || c >= 0x7f) {
      outstr[o] = '\\';
      outstr[o + 1] = 'x';
      outstr[o + 2] = c / 16 + 0x30;
      outstr[o + 3] = c % 16 + 0x30;
      if (outstr[o + 2] > 0x39)
        outstr[o + 2] += 0x27;
      if (outstr[o + 3] > 0x39)
        outstr[o + 3] += 0x27;
      o += 4;
    } else {
      outstr[o] = c;
      o++;
    }
  }
  outstr[o] = 0;
  return outstr;
}
```