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

```asm
<oauth_serialize_url_sep>:
  endbr64
  push   %r15
  mov    %esi,%r15d
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  mov    %r8d,%ebp
  push   %rbx
  mov    %edi,%ebx
  mov    %rcx,%rdi
  sub    $0x58,%rsp
  mov    %esi,0xc(%rsp)
  mov    %rcx,0x48(%rsp)
  call   <strlen@plt>
  mov    $0x1,%edi
  mov    %eax,0x3c(%rsp)
  call   <xmalloc@plt>
  movb   $0x0,(%rax)
  mov    %rax,%r12
  cmp    %ebx,%r15d
  jge    L186
  mov    %ebp,%eax
  sub    $0x1,%ebx
  and    $0x1,%eax
  sub    %r15d,%ebx
  mov    %eax,0x1c(%rsp)
  mov    %ebp,%eax
  and    $0x2,%eax
  mov    %eax,0x38(%rsp)
  mov    %ebp,%eax
  and    $0x4,%ebp
  sar    %eax
  mov    %ebp,0x44(%rsp)
  movslq %r15d,%rbp
  mov    $0x1,%r15d
  and    $0x2,%eax
  mov    %eax,0x40(%rsp)
  lea    0x1(%rbp),%rax
  add    %rax,%rbx
  mov    %rbx,0x20(%rsp)
  mov    %rax,%rbx
  jmp    L123
  nopw   0x0(%rax,%rax,1)
L112:
  mov    0x38(%rsp),%edx
  test   %edx,%edx
  je     L198
  mov    0x0(%r13,%rbp,8),%rdi
  mov    $0x6,%edx
  lea    D55(%rip),%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L34
L198:
  mov    %r12,%rdi
  call   <strlen@plt>
  cmp    %ebp,0xc(%rsp)
  mov    %ebp,0x10(%rsp)
  sete   %dl
  test   %ebp,%ebp
  mov    %eax,0x18(%rsp)
  sete   %al
  and    %al,%dl
  mov    %dl,0x28(%rsp)
  je     L89
  lea    D115(%rip),%rax
  mov    0x0(%r13),%rdi
  mov    %rax,%rsi
  mov    %rax,0x30(%rsp)
  call   <strstr@plt>
  test   %rax,%rax
  jne    L2
L89:
  mov    0x0(%r13,%rbp,8),%rdi
  mov    $0x3d,%esi
  call   <strchr@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L58
  movb   $0x0,(%rax)
  mov    0x0(%r13,%rbp,8),%rdi
  call   <oauth_url_escape@plt>
  movb   $0x3d,(%r14)
  lea    0x1(%r14),%rdi
  mov    %rax,%rbp
  call   <oauth_url_escape@plt>
  mov    %rbp,%rdi
  mov    %rax,%r14
  call   <strlen@plt>
  mov    %r14,%rdi
  mov    %eax,0x30(%rsp)
  call   <strlen@plt>
  mov    0x30(%rsp),%edx
  mov    %rbp,%rdi
  lea    0x2(%rdx,%rax,1),%esi
  add    0x40(%rsp),%esi
  call   <xrealloc@plt>
  lea    D101(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <strcat@plt>
  mov    0x44(%rsp),%eax
  test   %eax,%eax
  jne    L162
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
L35:
  mov    %r14,%rdi
  call   <xfree@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  add    0x18(%rsp),%eax
L100:
  mov    0x3c(%rsp),%ecx
  mov    %r12,%rdi
  lea    0x1(%rax,%rcx,1),%esi
  call   <xrealloc@plt>
  mov    0x10(%rsp),%ecx
  mov    %rax,%r12
  cmp    %ecx,0xc(%rsp)
  je     L234
  test   %r15d,%r15d
  jne    L234
  mov    0x48(%rsp),%rsi
  mov    %rax,%rdi
  xor    %r15d,%r15d
  call   <strcat@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
L11:
  mov    %rbp,%rdi
  call   <xfree@plt>
L151:
  mov    %rbx,%rbp
  cmp    0x20(%rsp),%rbx
  je     L186
L135:
  add    $0x1,%rbx
L123:
  mov    0x1c(%rsp),%ecx
  test   %ecx,%ecx
  je     L112
  mov    0x0(%r13,%rbp,8),%rdi
  mov    $0x6,%edx
  lea    D55(%rip),%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L151
  mov    0x0(%r13,%rbp,8),%rdi
  mov    $0x8,%edx
  lea    D67(%rip),%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L112
  mov    %rbx,%rbp
  cmp    0x20(%rsp),%rbx
  jne    L135
L186:
  add    $0x58,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L234:
  lea    D51(%rip),%rsi
  mov    %r12,%rdi
  xor    %r15d,%r15d
  call   <strcat@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  cmpb   $0x0,0x28(%rsp)
  je     L11
  lea    D115(%rip),%rax
  mov    %rax,0x30(%rsp)
  mov    %rax,%rsi
L139:
  mov    %rbp,%rdi
  xor    %r15d,%r15d
  call   <strstr@plt>
  test   %rax,%rax
  je     L11
  lea    D128(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x1,%r15d
  call   <strcat@plt>
  jmp    L11
  nopl   (%rax)
L58:
  mov    0x0(%r13,%rbp,8),%rdi
  call   <xstrdup@plt>
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <strlen@plt>
  mov    %rbp,%rdi
  lea    0x2(%rax),%esi
  call   <xrealloc@plt>
  lea    D101(%rip),%rsi
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  add    0x18(%rsp),%eax
  jmp    L100
  nopl   0x0(%rax,%rax,1)
L162:
  lea    D124(%rip),%r8
  mov    %rbp,%rdi
  mov    %r8,%rsi
  call   <strcat@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  lea    D124(%rip),%r8
  mov    %rbp,%rdi
  mov    %r8,%rsi
  call   <strcat@plt>
  jmp    L35
  nopl   0x0(%rax)
L34:
  mov    0x0(%r13,%rbp,8),%rdi
  mov    $0x8,%edx
  lea    D67(%rip),%rsi
  call   <strncmp@plt>
  test   %ebp,%ebp
  je     L198
  test   %rax,%rax
  je     L198
  jmp    L151
  nopl   0x0(%rax)
L2:
  mov    0x0(%r13),%rdi
  call   <xstrdup@plt>
  mov    %r12,0x10(%rsp)
  mov    %rbx,0x28(%rsp)
  mov    %rax,%r12
  jmp    L229
  nopl   0x0(%rax,%rax,1)
L88:
  mov    %r12,%rdi
  mov    %rbp,%r15
  call   <strlen@plt>
  sub    %r12,%r15
  lea    0x3(%rax),%edi
  call   <xmalloc@plt>
  mov    %r12,%rsi
  mov    %rax,%r14
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    0x2(%r14,%r15,1),%rbx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  movb   $0x25,(%r14,%r15,1)
  mov    %r12,%rdi
  mov    %r14,%r12
  movb   $0x32,0x1(%r14,%r15,1)
  movb   $0x30,(%rbx)
  call   <xfree@plt>
L229:
  mov    $0x20,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  jne    L88
  mov    %r12,%rbp
  mov    0x28(%rsp),%rbx
  mov    0x10(%rsp),%r12
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    0x3c(%rsp),%ecx
  add    0x18(%rsp),%eax
  mov    %r12,%rdi
  lea    0x1(%rcx,%rax,1),%esi
  call   <xrealloc@plt>
  lea    D51(%rip),%rsi
  mov    %rax,%r12
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  mov    0x30(%rsp),%rsi
  jmp    L139
```

tool_calls: name: disassemble_data
arguments: label: D55
type_infered: string
name: disassemble_data
arguments: label: D115
type_infered: string
name: disassemble_data
arguments: label: D101
type_infered: string
name: disassemble_data
arguments: label: D67
type_infered: string
name: disassemble_data
arguments: label: D51
type_infered: string
name: disassemble_data
arguments: label: D128
type_infered: string
name: disassemble_data
arguments: label: D124
type_infered: string

tool: D55: oauth_

tool: D115: :/

tool: D101: =

tool: D67: x_oauth_

tool: 

tool: D128: ?

tool: D124: "

assistant: ```c
char *oauth_serialize_url_sep(int argc, int start, char **argv, char *sep, int mod) {
  char *tmp, *t1;
  int i;
  int first = 1;
  int seplen = strlen(sep);
  char *query = (char *)xmalloc(sizeof(char));
  *query = '\0';
  for (i = start; i < argc; i++) {
    int len = 0;
    if ((mod & 1) == 1 && (strncmp(argv[i], "oauth_", 6) == 0 || strncmp(argv[i], "x_oauth_", 8) == 0))
      continue;
    if ((mod & 2) == 2 && (strncmp(argv[i], "oauth_", 6) != 0 && strncmp(argv[i], "x_oauth_", 8) != 0) && i != 0)
      continue;
    len += strlen(query);
    if (i == start && i == 0 && strstr(argv[i], ":/")) {
      tmp = xstrdup(argv[i]);
      while ((t1 = strchr(tmp, ' '))) {
        size_t off = t1 - tmp;
        char *t2 = (char *)xmalloc(sizeof(char) * (3 + strlen(tmp)));
        strcpy(t2, tmp);
        strcpy(t2 + off + 2, tmp + off);
        *(t2 + off) = '%';
        *(t2 + off + 1) = '2';
        *(t2 + off + 2) = '0';
        xfree(tmp);
        tmp = t2;
      }
      len += strlen(tmp);
    } else if (!(t1 = strchr(argv[i], '='))) {
      tmp = xstrdup(argv[i]);
      tmp = (char *)xrealloc(tmp, (strlen(tmp) + 2) * sizeof(char));
      strcat(tmp, "=");
      len += strlen(tmp);
    } else {
      *t1 = 0;
      tmp = oauth_url_escape(argv[i]);
      *t1 = '=';
      t1 = oauth_url_escape((t1 + 1));
      tmp = (char *)xrealloc(tmp, (strlen(tmp) + strlen(t1) + 2 + (mod & 4 ? 2 : 0)) * sizeof(char));
      strcat(tmp, "=");
      if (mod & 4)
        strcat(tmp, "\"");
      strcat(tmp, t1);
      if (mod & 4)
        strcat(tmp, "\"");
      xfree(t1);
      len += strlen(tmp);
    }
    len += seplen + 1;
    query = (char *)xrealloc(query, len * sizeof(char));
    strcat(query, ((i == start || first) ? "" : sep));
    first = 0;
    strcat(query, tmp);
    if (i == start && i == 0 && strstr(tmp, ":/")) {
      strcat(query, "?");
      first = 1;
    }
    xfree(tmp);
  }
  return (query);
}
```