user: 这段汇编代码用C语言表示是什么样的?

```asm
<msn_urlencode>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  movq   $0x0,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    $0x1,%eax
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L34
  lea    D3(%rip),%rax
  jmp    L64
L24:
  mov    -0x14(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x14(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x10(%rbp)
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  movzbl (%rcx),%eax
  mov    %al,(%rdx)
L14:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isalnum@plt>
  test   %rax,%rax
  jne    L24
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  je     L24
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5f,%al
  je     L24
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L11
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    -0x10(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x8(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rdi
  mov    %eax,%ecx
  lea    D14(%rip),%rax
  mov    %rax,%rdx
  mov    $0x4,%esi
  call   <snprintf@plt>
  addl   $0x3,-0x10(%rbp)
  addl   $0x1,-0x14(%rbp)
L34:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L14
  jmp    L58
L11:
  nop
L58:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
L64:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D3
data_type: string
name: read_data
arguments: data_tag: D14
data_type: string

tool: 

tool: D14: %%%.2x

assistant: ```c
char *msn_urlencode(const char *in) {
  int ipos = 0, bpos = 0;
  char *str = NULL;
  int len = strlen(in);
  if (!(str = ((char *)calloc(3 * len + 1, sizeof(char)))))
    return "";
  while (in[ipos]) {
    while (isalnum(in[ipos]) || in[ipos] == '-' || in[ipos] == '_')
      str[bpos++] = in[ipos++];
    if (!in[ipos])
      break;
    snprintf(&str[bpos], 4, "%%%.2x", in[ipos]);
    bpos += 3;
    ipos++;
  }
  str[bpos] = '\0';
  len = strlen(str);
  str = ((char *)realloc(str, sizeof(char) * len + 1));
  return (str);
}
```