user: Translate the below assembly code into C programming language:

```asm
<oauth_serialize_url_sep>:
  endbr64
  push   %r15
  mov    %r8d,%r15d
  push   %r14
  mov    %esi,%r14d
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  mov    %rcx,%rdi
  sub    $0x48,%rsp
  mov    %esi,(%rsp)
  mov    %rcx,0x38(%rsp)
  mov    %r8d,0x18(%rsp)
  call   <strlen@plt>
  mov    $0x1,%edi
  mov    %eax,0x30(%rsp)
  call   <xmalloc@plt>
  movb   $0x0,(%rax)
  mov    %rax,%r12
  cmp    %ebx,%r14d
  jge    L78
  mov    %r15d,%eax
  movslq %r14d,%rbp
  sub    $0x1,%ebx
  and    $0x1,%r15d
  sar    %eax
  sub    %r14d,%ebx
  mov    %r15d,0x1c(%rsp)
  mov    $0x1,%r15d
  and    $0x2,%eax
  mov    %eax,0x34(%rsp)
  lea    0x1(%rbp),%rax
  add    %rax,%rbx
  mov    %rbx,0x10(%rsp)
  mov    %rax,%rbx
  jmp    L154
  nopw   0x0(%rax,%rax,1)
L137:
  testb  $0x2,0x18(%rsp)
  je     L49
  mov    0x0(%r13,%rbp,8),%rdi
  mov    $0x6,%edx
  lea    D53(%rip),%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L31
L49:
  mov    %r12,%rdi
  call   <strlen@plt>
  cmp    %ebp,(%rsp)
  mov    %ebp,0x8(%rsp)
  sete   %dl
  test   %ebp,%ebp
  mov    %eax,0x4(%rsp)
  sete   %al
  and    %al,%dl
  mov    %dl,0x20(%rsp)
  je     L58
  lea    D105(%rip),%rax
  mov    0x0(%r13),%rdi
  mov    %rax,%rsi
  mov    %rax,0x28(%rsp)
  call   <strstr@plt>
  test   %rax,%rax
  jne    L121
L58:
  mov    0x0(%r13,%rbp,8),%rdi
  mov    $0x3d,%esi
  call   <strchr@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L214
  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,0x28(%rsp)
  call   <strlen@plt>
  mov    0x28(%rsp),%edx
  mov    %rbp,%rdi
  lea    0x2(%rdx,%rax,1),%esi
  add    0x34(%rsp),%esi
  call   <xrealloc@plt>
  lea    D101(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <strcat@plt>
  testb  $0x4,0x18(%rsp)
  jne    L190
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
L185:
  mov    %r14,%rdi
  call   <xfree@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  add    0x4(%rsp),%eax
L84:
  mov    0x30(%rsp),%ecx
  mov    %r12,%rdi
  lea    0x1(%rax,%rcx,1),%esi
  call   <xrealloc@plt>
  mov    0x8(%rsp),%ecx
  mov    %rax,%r12
  cmp    %ecx,(%rsp)
  je     L87
  test   %r15d,%r15d
  jne    L87
  mov    0x38(%rsp),%rsi
  mov    %rax,%rdi
  xor    %r15d,%r15d
  call   <strcat@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
L134:
  mov    %rbp,%rdi
  call   <xfree@plt>
L124:
  mov    %rbx,%rbp
  cmp    0x10(%rsp),%rbx
  je     L78
L127:
  add    $0x1,%rbx
L154:
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  je     L137
  mov    0x0(%r13,%rbp,8),%rdi
  mov    $0x6,%edx
  lea    D53(%rip),%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L124
  mov    0x0(%r13,%rbp,8),%rdi
  mov    $0x8,%edx
  lea    D121(%rip),%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L137
  mov    %rbx,%rbp
  cmp    0x10(%rsp),%rbx
  jne    L127
L78:
  add    $0x48,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L87:
  lea    D35(%rip),%rsi
  mov    %r12,%rdi
  xor    %r15d,%r15d
  call   <strcat@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  cmpb   $0x0,0x20(%rsp)
  je     L134
  lea    D105(%rip),%rax
  mov    %rax,0x28(%rsp)
L252:
  mov    0x28(%rsp),%rsi
  mov    %rbp,%rdi
  xor    %r15d,%r15d
  call   <strstr@plt>
  test   %rax,%rax
  je     L134
  lea    D109(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x1,%r15d
  call   <strcat@plt>
  jmp    L134
  nop
L214:
  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    0x4(%rsp),%eax
  jmp    L84
  nopl   0x0(%rax,%rax,1)
L190:
  lea    D9(%rip),%r8
  mov    %rbp,%rdi
  mov    %r8,%rsi
  call   <strcat@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  lea    D9(%rip),%r8
  mov    %rbp,%rdi
  mov    %r8,%rsi
  call   <strcat@plt>
  jmp    L185
  nopl   0x0(%rax)
L31:
  mov    0x0(%r13,%rbp,8),%rdi
  mov    $0x8,%edx
  lea    D121(%rip),%rsi
  call   <strncmp@plt>
  test   %ebp,%ebp
  je     L49
  test   %rax,%rax
  je     L49
  jmp    L124
  nopl   0x0(%rax)
L121:
  mov    0x0(%r13),%rdi
  call   <xstrdup@plt>
  mov    %r12,0x8(%rsp)
  mov    %rbx,0x20(%rsp)
  mov    %rax,%r12
  jmp    L152
  nopl   0x0(%rax,%rax,1)
L112:
  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>
L152:
  mov    $0x20,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  jne    L112
  mov    %r12,%rbp
  mov    0x20(%rsp),%rbx
  mov    0x8(%rsp),%r12
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    0x30(%rsp),%ecx
  add    0x4(%rsp),%eax
  mov    %r12,%rdi
  lea    0x1(%rcx,%rax,1),%esi
  call   <xrealloc@plt>
  lea    D35(%rip),%rsi
  mov    %rax,%r12
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  jmp    L252
```

tool_calls: name: disassemble_data
arguments: tag: D53
type_guessed: string
name: disassemble_data
arguments: tag: D105
type_guessed: string
name: disassemble_data
arguments: tag: D101
type_guessed: string
name: disassemble_data
arguments: tag: D121
type_guessed: string
name: disassemble_data
arguments: tag: D35
type_guessed: string
name: disassemble_data
arguments: tag: D109
type_guessed: string
name: disassemble_data
arguments: tag: D9
type_guessed: string

tool: D53: oauth_

tool: D105: :/

tool: D101: =

tool: D121: x_oauth_

tool: 

tool: D109: ?

tool: D9: "

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);
}
```