ylfeng/ReF-Decompile-dataset huggingface dataset:
user: What would the C source look like for the assembly code provided here?

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  cmp    $0x2,%edi
  je     L55
L5:
  lea    D49(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L55:
  mov    0x8(%rsi),%rdi
  mov    $0x0,%eax
  call   <atol@plt>
  movslq %eax,%rbp
  cmp    $0x1,%eax
  jle    L5
  mov    $0x0,%r12d
  lea    D27(%rip),%r13
  cmp    $0x2,%rbp
  jne    L19
  lea    D34(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L2:
  mov    %rbp,%rsi
  lea    D8(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L36
L0:
  mov    %rbx,%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbp,%rax
  cqto
  idiv   %rbx
  mov    %rax,%rbp
  mov    $0x1,%r12d
L19:
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <first@plt>
  movslq %eax,%rbx
  test   %rbx,%rbx
  jne    L0
  test   %r12,%r12
  jne    L2
  mov    %rbp,%rsi
  lea    D44(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L36:
  mov    $0x0,%edi
  call   <exit@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D49
datatype: string
name: parse_data
arguments: data_tag: D27
datatype: string
name: parse_data
arguments: data_tag: D34
datatype: string
name: parse_data
arguments: data_tag: D8
datatype: string
name: parse_data
arguments: data_tag: D44
datatype: string

tool: D49: Usage: factor n   (2 <= n < 2**31)

tool: D27: %ld 

tool: D34: 2 is a prime

tool: D8: %ld


tool: D44: %ld is a prime


assistant: ```c
int main(argc, argv)
int argc;
char *argv[];
{
  long i, n, flag = 0;
  if (argc != 2 || (n = atol(argv[1])) < 2) {
    printf("Usage: factor n   (2 <= n < 2**31)\n");
    exit(1);
  }
  if (n == 2) {
    printf("2 is a prime\n");
    exit(0);
  }
  while (1) {
    i = first(n);
    if (i == 0) {
      if (flag == 0)
        printf("%ld is a prime\n", n);
      else
        printf("%ld\n", n);
      exit(0);
    }
    printf("%ld ", i);
    n = n / i;
    flag = 1;
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  cmp    $0x2,%edi
  je     L42
L24:
  lea    D24(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L42:
  mov    0x8(%rsi),%rdi
  xor    %eax,%eax
  call   <atol@plt>
  movslq %eax,%r12
  sub    $0x1,%eax
  jle    L24
  xor    %ebp,%ebp
  lea    D4(%rip),%r13
  cmp    $0x2,%r12
  jne    L13
  lea    D10(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  xchg   %ax,%ax
L8:
  mov    %rbx,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  mov    $0x1,%ebp
  call   <printf@plt>
  mov    %r12,%rax
  cqto
  idiv   %rbx
  mov    %rax,%r12
L13:
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <first@plt>
  movslq %eax,%rbx
  test   %rbx,%rbx
  jne    L8
  mov    %r12,%rsi
  test   %rbp,%rbp
  jne    L38
  lea    D12(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L0:
  xor    %edi,%edi
  call   <exit@plt>
L38:
  lea    D14(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L0
```

tool_calls: name: disassemble_data
arguments: data_tag: D24
type: string
name: disassemble_data
arguments: data_tag: D4
type: string
name: disassemble_data
arguments: data_tag: D10
type: string
name: disassemble_data
arguments: data_tag: D12
type: string
name: disassemble_data
arguments: data_tag: D14
type: string

tool: D24: Usage: factor n   (2 <= n < 2**31)

tool: D4: %ld 

tool: D10: 2 is a prime

tool: D12: %ld is a prime


tool: D14: %ld


assistant: ```c
int main(argc, argv)
int argc;
char *argv[];
{
  long i, n, flag = 0;
  if (argc != 2 || (n = atol(argv[1])) < 2) {
    printf("Usage: factor n   (2 <= n < 2**31)\n");
    exit(1);
  }
  if (n == 2) {
    printf("2 is a prime\n");
    exit(0);
  }
  while (1) {
    i = first(n);
    if (i == 0) {
      if (flag == 0)
        printf("%ld is a prime\n", n);
      else
        printf("%ld\n", n);
      exit(0);
    }
    printf("%ld ", i);
    n = n / i;
    flag = 1;
  }
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  cmp    $0x2,%edi
  je     L18
L55:
  lea    D46(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L18:
  mov    0x8(%rsi),%rdi
  xor    %eax,%eax
  call   <atol@plt>
  movslq %eax,%r12
  sub    $0x1,%eax
  jle    L55
  xor    %ebp,%ebp
  lea    D4(%rip),%r13
  cmp    $0x2,%r12
  jne    L15
  lea    D36(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  xchg   %ax,%ax
L20:
  mov    %rbx,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  mov    $0x1,%ebp
  call   <printf@plt>
  mov    %r12,%rax
  cqto
  idiv   %rbx
  mov    %rax,%r12
L15:
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <first@plt>
  movslq %eax,%rbx
  test   %rbx,%rbx
  jne    L20
  mov    %r12,%rsi
  test   %rbp,%rbp
  jne    L39
  lea    D12(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L34:
  xor    %edi,%edi
  call   <exit@plt>
L39:
  lea    D37(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L34
```

tool_calls: name: unpack_data
arguments: label: D46
type: string
name: unpack_data
arguments: label: D4
type: string
name: unpack_data
arguments: label: D36
type: string
name: unpack_data
arguments: label: D12
type: string
name: unpack_data
arguments: label: D37
type: string

tool: D46: Usage: factor n   (2 <= n < 2**31)

tool: D4: %ld 

tool: D36: 2 is a prime

tool: D12: %ld is a prime


tool: D37: %ld


assistant: ```c
int main(argc, argv)
int argc;
char *argv[];
{
  long i, n, flag = 0;
  if (argc != 2 || (n = atol(argv[1])) < 2) {
    printf("Usage: factor n   (2 <= n < 2**31)\n");
    exit(1);
  }
  if (n == 2) {
    printf("2 is a prime\n");
    exit(0);
  }
  while (1) {
    i = first(n);
    if (i == 0) {
      if (flag == 0)
        printf("%ld is a prime\n", n);
      else
        printf("%ld\n", n);
      exit(0);
    }
    printf("%ld ", i);
    n = n / i;
    flag = 1;
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<irc_message_split_privmsg_notice>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x248,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r12
  mov    %rdx,%r13
  mov    %rcx,%r14
  mov    %r8,%r15
  mov    %r9,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x238(%rsp)
  xor    %eax,%eax
  movb   $0x0,0x30(%rsp)
  movb   $0x0,0x2e(%rsp)
  mov    %r9,%rdi
  call   <strlen@plt>
  cmpb   $0x1,(%rbx)
  je     L56
L2:
  cmpb   $0x0,0x30(%rsp)
  je     L42
L10:
  mov    0x280(%rsp),%eax
  push   %rax
  push   $0x20
  lea    0x3e(%rsp),%rax
  push   %rax
  push   %rbx
  lea    0x50(%rsp),%r9
  mov    %r15,%r8
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <irc_message_split_string@plt>
  add    $0x20,%rsp
  mov    0x238(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L25
  add    $0x248,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L56:
  cltq
  lea    -0x1(%rbx,%rax,1),%rax
  mov    %rax,(%rsp)
  cmpb   $0x1,(%rax)
  jne    L2
  mov    $0x20,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L2
  lea    0x1(%rax),%rcx
  mov    %rcx,0x10(%rsp)
  movzbl 0x1(%rax),%esi
  mov    %sil,0x1f(%rsp)
  mov    %rax,0x8(%rsp)
  movb   $0x0,0x1(%rax)
  lea    0x30(%rsp),%rdi
  mov    %rbx,%rcx
  lea    D7(%rip),%rdx
  mov    $0x200,%esi
  call   <snprintf@plt>
  mov    0x8(%rsp),%rax
  movzbl 0x1f(%rsp),%esi
  mov    %sil,0x1(%rax)
  mov    (%rsp),%rax
  movb   $0x0,(%rax)
  movb   $0x1,0x2e(%rsp)
  movb   $0x0,0x2f(%rsp)
  mov    0x10(%rsp),%rbx
  jmp    L2
L42:
  lea    0x30(%rsp),%rdi
  lea    D14(%rip),%rsi
  call   <strcpy@plt>
  jmp    L10
L25:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D7
type: string
name: unpack_data
arguments: data_label: D14
type: string

tool: D7: :%s

tool: D14: :

assistant: ```c
int irc_message_split_privmsg_notice(struct t_hashtable *hashtable, char *tags, char *host, char *command, char *target, char *arguments, int max_length_host) {
  char prefix[512], suffix[2], *pos, saved_char;
  int length, rc;
  prefix[0] = '\0';
  suffix[0] = '\0';
  length = strlen(arguments);
  if ((arguments[0] == '\01') && (arguments[length - 1] == '\01')) {
    pos = strchr(arguments, ' ');
    if (pos) {
      pos++;
      saved_char = pos[0];
      pos[0] = '\0';
      snprintf(prefix, sizeof(prefix), ":%s", arguments);
      pos[0] = saved_char;
      arguments[length - 1] = '\0';
      arguments = pos;
      suffix[0] = '\01';
      suffix[1] = '\0';
    }
  }
  if (!prefix[0])
    strcpy(prefix, ":");
  rc = irc_message_split_string(hashtable, tags, host, command, target, prefix, arguments, suffix, ' ', max_length_host);
  return rc;
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<irc_message_split_privmsg_notice>:
  endbr64
  push   %r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  mov    %r9,%rdi
  push   %rbx
  mov    %r8,%rbx
  sub    $0x248,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x238(%rsp)
  xor    %eax,%eax
  mov    %r9,(%rsp)
  lea    0x30(%rsp),%r15
  movb   $0x0,0x30(%rsp)
  movb   $0x0,0x2e(%rsp)
  call   <strlen@plt>
  mov    (%rsp),%r9
  cmpb   $0x1,(%r9)
  je     L46
L41:
  cmpb   $0x0,0x30(%rsp)
  je     L25
L28:
  mov    0x280(%rsp),%eax
  mov    %rbx,%r8
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  push   %rax
  push   $0x20
  lea    0x3e(%rsp),%rax
  push   %rax
  push   %r9
  mov    %r15,%r9
  call   <irc_message_split_string@plt>
  add    $0x20,%rsp
  mov    0x238(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L11
  add    $0x248,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L46:
  cltq
  lea    0x30(%rsp),%r15
  lea    -0x1(%r9,%rax,1),%r8
  cmpb   $0x1,(%r8)
  jne    L41
  mov    %r9,%rdi
  mov    $0x20,%esi
  mov    %r9,(%rsp)
  mov    %r8,0x8(%rsp)
  call   <strchr@plt>
  mov    (%rsp),%r9
  test   %rax,%rax
  mov    %rax,%r10
  je     L41
  movzbl 0x1(%r10),%r11d
  movb   $0x0,0x1(%r10)
  mov    %r9,%rcx
  mov    %r15,%rdi
  lea    0x1(%rax),%rax
  mov    $0x200,%esi
  mov    %r10,0x10(%rsp)
  lea    D9(%rip),%rdx
  mov    %r11b,0x1f(%rsp)
  mov    %rax,(%rsp)
  call   <snprintf@plt>
  mov    0x10(%rsp),%r10
  movzbl 0x1f(%rsp),%r11d
  mov    $0x1,%eax
  mov    0x8(%rsp),%r8
  mov    (%rsp),%r9
  mov    %r11b,0x1(%r10)
  movb   $0x0,(%r8)
  mov    %ax,0x2e(%rsp)
  jmp    L41
  cs nopw 0x0(%rax,%rax,1)
L25:
  lea    D14(%rip),%rsi
  mov    %r15,%rdi
  mov    %r9,(%rsp)
  call   <strcpy@plt>
  mov    (%rsp),%r9
  jmp    L28
L11:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D9
type_infered: string
name: disassemble_data
arguments: label: D14
type_infered: string

tool: D9: :%s

tool: D14: :

assistant: ```c
int irc_message_split_privmsg_notice(struct t_hashtable *hashtable, char *tags, char *host, char *command, char *target, char *arguments, int max_length_host) {
  char prefix[512], suffix[2], *pos, saved_char;
  int length, rc;
  prefix[0] = '\0';
  suffix[0] = '\0';
  length = strlen(arguments);
  if ((arguments[0] == '\01') && (arguments[length - 1] == '\01')) {
    pos = strchr(arguments, ' ');
    if (pos) {
      pos++;
      saved_char = pos[0];
      pos[0] = '\0';
      snprintf(prefix, sizeof(prefix), ":%s", arguments);
      pos[0] = saved_char;
      arguments[length - 1] = '\0';
      arguments = pos;
      suffix[0] = '\01';
      suffix[1] = '\0';
    }
  }
  if (!prefix[0])
    strcpy(prefix, ":");
  rc = irc_message_split_string(hashtable, tags, host, command, target, prefix, arguments, suffix, ' ', max_length_host);
  return rc;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<irc_message_split_privmsg_notice>:
  endbr64
  push   %r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  mov    %r9,%rdi
  push   %rbx
  mov    %r8,%rbx
  sub    $0x248,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x238(%rsp)
  xor    %eax,%eax
  mov    %r9,(%rsp)
  lea    0x30(%rsp),%r15
  movb   $0x0,0x30(%rsp)
  movb   $0x0,0x2e(%rsp)
  call   <strlen@plt>
  mov    (%rsp),%r9
  cmpb   $0x1,(%r9)
  je     L52
L44:
  cmpb   $0x0,0x30(%rsp)
  je     L21
L13:
  mov    0x280(%rsp),%eax
  mov    %rbx,%r8
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  push   %rax
  push   $0x20
  lea    0x3e(%rsp),%rax
  push   %rax
  push   %r9
  mov    %r15,%r9
  call   <irc_message_split_string@plt>
  add    $0x20,%rsp
  mov    0x238(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L41
  add    $0x248,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L52:
  cltq
  lea    0x30(%rsp),%r15
  lea    -0x1(%r9,%rax,1),%r8
  cmpb   $0x1,(%r8)
  jne    L44
  mov    %r9,%rdi
  mov    $0x20,%esi
  mov    %r9,(%rsp)
  mov    %r8,0x8(%rsp)
  call   <strchr@plt>
  mov    (%rsp),%r9
  test   %rax,%rax
  mov    %rax,%r10
  je     L44
  movzbl 0x1(%r10),%r11d
  movb   $0x0,0x1(%r10)
  mov    %r9,%rcx
  mov    %r15,%rdi
  lea    0x1(%rax),%rax
  mov    $0x200,%esi
  mov    %r10,0x10(%rsp)
  lea    D11(%rip),%rdx
  mov    %r11b,0x1f(%rsp)
  mov    %rax,(%rsp)
  call   <snprintf@plt>
  mov    0x10(%rsp),%r10
  movzbl 0x1f(%rsp),%r11d
  mov    $0x1,%eax
  mov    0x8(%rsp),%r8
  mov    (%rsp),%r9
  mov    %r11b,0x1(%r10)
  movb   $0x0,(%r8)
  mov    %ax,0x2e(%rsp)
  jmp    L44
  cs nopw 0x0(%rax,%rax,1)
L21:
  lea    D19(%rip),%rsi
  mov    %r15,%rdi
  mov    %r9,(%rsp)
  call   <strcpy@plt>
  mov    (%rsp),%r9
  jmp    L13
L41:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D11
type_infered: string
name: extract_symbolic_data
arguments: data_label: D19
type_infered: string

tool: D11: :%s

tool: D19: :

assistant: ```c
int irc_message_split_privmsg_notice(struct t_hashtable *hashtable, char *tags, char *host, char *command, char *target, char *arguments, int max_length_host) {
  char prefix[512], suffix[2], *pos, saved_char;
  int length, rc;
  prefix[0] = '\0';
  suffix[0] = '\0';
  length = strlen(arguments);
  if ((arguments[0] == '\01') && (arguments[length - 1] == '\01')) {
    pos = strchr(arguments, ' ');
    if (pos) {
      pos++;
      saved_char = pos[0];
      pos[0] = '\0';
      snprintf(prefix, sizeof(prefix), ":%s", arguments);
      pos[0] = saved_char;
      arguments[length - 1] = '\0';
      arguments = pos;
      suffix[0] = '\01';
      suffix[1] = '\0';
    }
  }
  if (!prefix[0])
    strcpy(prefix, ":");
  rc = irc_message_split_string(hashtable, tags, host, command, target, prefix, arguments, suffix, ' ', max_length_host);
  return rc;
}
```
user: What is the c source code of the assembly code below?

```asm
<mbssep>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x30(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  jne    L0
  mov    $0x0,%eax
  jmp    L88
L0:
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x20(%rbp)
L80:
  mov    D7(%rip),%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%rsi
  lea    -0x38(%rbp),%rax
  mov    $0x0,%ecx
  mov    %rax,%rdi
  call   <mbrtowc@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0xffffffffffffffff,-0x18(%rbp)
  je     L62
  cmpq   $0xfffffffffffffffe,-0x18(%rbp)
  jne    L64
L62:
  mov    D9(%rip),%rax
  mov    (%rax),%eax
  mov    $0x0,%edx
  mov    %eax,%esi
  mov    $0x1,%edi
  call   <errc@plt>
L64:
  mov    -0x18(%rbp),%rax
  add    %rax,-0x30(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,-0x28(%rbp)
L103:
  mov    -0x28(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  cmp    %rax,-0x10(%rbp)
  jne    L5
  mov    -0x38(%rbp),%rax
  test   %rax,%rax
  jne    L96
  movq   $0x0,-0x30(%rbp)
  jmp    L84
L96:
  mov    -0x18(%rbp),%rax
  neg    %rax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
L84:
  mov    -0x48(%rbp),%rax
  mov    -0x30(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x20(%rbp),%rax
  jmp    L88
L5:
  cmpq   $0x0,-0x10(%rbp)
  jne    L103
  jmp    L80
L88:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L8
  call   <__stack_chk_fail@plt>
L8:
  leave
  ret
```

assistant: ```c
char *mbssep(char **stringp, const wchar_t *delim) {
  char *s, *tok;
  const wchar_t *spanp;
  wchar_t c, sc;
  size_t n;
  if ((s = *stringp) == NULL)
    return (NULL);
  for (tok = s;;) {
    n = mbrtowc(&c, s, MB_LEN_MAX, NULL);
    if (n == (size_t)-1 || n == (size_t)-2)
      errc(1, EILSEQ, NULL);
    s += n;
    spanp = delim;
    do {
      if ((sc = *spanp++) == c) {
        if (c == 0)
          s = NULL;
        else
          s[-n] = '\0';
        *stringp = s;
        return (tok);
      }
    } while (sc != 0);
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<mbssep>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    (%rdi),%r13
  test   %r13,%r13
  je     L31
  mov    %rdi,%rbp
  mov    %rsi,%r12
  mov    %r13,%rbx
  mov    D8(%rip),%r14
L62:
  mov    %rsp,%rdi
  mov    $0x0,%ecx
  mov    (%r14),%edx
  mov    %rbx,%rsi
  call   <mbrtowc@plt>
  mov    %rax,%r15
  cmp    $0xfffffffffffffffd,%rax
  ja     L61
L63:
  add    %rbx,%r15
  mov    (%rsp),%rcx
  mov    %r12,%rax
L1:
  add    $0x8,%rax
  mov    -0x8(%rax),%rdx
  cmp    %rdx,%rcx
  je     L44
  test   %rdx,%rdx
  jne    L1
  mov    %r15,%rbx
  jmp    L62
L61:
  mov    $0x0,%edx
  mov    D18(%rip),%rax
  mov    (%rax),%esi
  mov    $0x1,%edi
  call   <errc@plt>
  jmp    L63
L44:
  test   %rcx,%rcx
  je     L73
  movb   $0x0,(%rbx)
L54:
  mov    %r15,0x0(%rbp)
L31:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L40
  mov    %r13,%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L73:
  mov    $0x0,%r15d
  jmp    L54
L40:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *mbssep(char **stringp, const wchar_t *delim) {
  char *s, *tok;
  const wchar_t *spanp;
  wchar_t c, sc;
  size_t n;
  if ((s = *stringp) == NULL)
    return (NULL);
  for (tok = s;;) {
    n = mbrtowc(&c, s, MB_LEN_MAX, NULL);
    if (n == (size_t)-1 || n == (size_t)-2)
      errc(1, EILSEQ, NULL);
    s += n;
    spanp = delim;
    do {
      if ((sc = *spanp++) == c) {
        if (c == 0)
          s = NULL;
        else
          s[-n] = '\0';
        *stringp = s;
        return (tok);
      }
    } while (sc != 0);
  }
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<mbssep>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    (%rdi),%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  test   %r12,%r12
  je     L14
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    %r12,%r14
  mov    %rsp,%r13
L27:
  mov    D7(%rip),%rax
  xor    %ecx,%ecx
  mov    %r14,%rsi
  mov    %r13,%rdi
  mov    (%rax),%edx
  call   <mbrtowc@plt>
  mov    %rax,%r15
  cmp    $0xfffffffffffffffd,%rax
  ja     L90
L43:
  mov    (%rsp),%rsi
  add    %r14,%r15
  mov    %rbp,%rdx
  jmp    L78
  nopl   0x0(%rax)
L12:
  test   %rcx,%rcx
  je     L24
L78:
  mov    (%rdx),%rcx
  add    $0x8,%rdx
  cmp    %rcx,%rsi
  jne    L12
  test   %rsi,%rsi
  je     L58
  movb   $0x0,(%r14)
L25:
  mov    %r15,(%rbx)
L14:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L11
  add    $0x18,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L24:
  mov    %r15,%r14
  jmp    L27
  nopl   (%rax)
L90:
  mov    D5(%rip),%rax
  xor    %edx,%edx
  mov    $0x1,%edi
  mov    (%rax),%esi
  call   <errc@plt>
  jmp    L43
  nop
L58:
  xor    %r15d,%r15d
  jmp    L25
L11:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *mbssep(char **stringp, const wchar_t *delim) {
  char *s, *tok;
  const wchar_t *spanp;
  wchar_t c, sc;
  size_t n;
  if ((s = *stringp) == NULL)
    return (NULL);
  for (tok = s;;) {
    n = mbrtowc(&c, s, MB_LEN_MAX, NULL);
    if (n == (size_t)-1 || n == (size_t)-2)
      errc(1, EILSEQ, NULL);
    s += n;
    spanp = delim;
    do {
      if ((sc = *spanp++) == c) {
        if (c == 0)
          s = NULL;
        else
          s[-n] = '\0';
        *stringp = s;
        return (tok);
      }
    } while (sc != 0);
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<mbssep>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    (%rdi),%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  test   %r12,%r12
  je     L63
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    %r12,%r14
  mov    %rsp,%r13
L31:
  mov    D1(%rip),%rax
  xor    %ecx,%ecx
  mov    %r14,%rsi
  mov    %r13,%rdi
  mov    (%rax),%edx
  call   <mbrtowc@plt>
  mov    %rax,%r15
  cmp    $0xfffffffffffffffd,%rax
  ja     L92
L90:
  mov    (%rsp),%rsi
  add    %r14,%r15
  mov    %rbp,%rdx
  jmp    L58
  nopl   0x0(%rax)
L46:
  test   %rcx,%rcx
  je     L60
L58:
  mov    (%rdx),%rcx
  add    $0x8,%rdx
  cmp    %rcx,%rsi
  jne    L46
  test   %rsi,%rsi
  je     L39
  movb   $0x0,(%r14)
L2:
  mov    %r15,(%rbx)
L63:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L66
  add    $0x18,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L60:
  mov    %r15,%r14
  jmp    L31
  nopl   (%rax)
L92:
  mov    D2(%rip),%rax
  xor    %edx,%edx
  mov    $0x1,%edi
  mov    (%rax),%esi
  call   <errc@plt>
  jmp    L90
  nop
L39:
  xor    %r15d,%r15d
  jmp    L2
L66:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *mbssep(char **stringp, const wchar_t *delim) {
  char *s, *tok;
  const wchar_t *spanp;
  wchar_t c, sc;
  size_t n;
  if ((s = *stringp) == NULL)
    return (NULL);
  for (tok = s;;) {
    n = mbrtowc(&c, s, MB_LEN_MAX, NULL);
    if (n == (size_t)-1 || n == (size_t)-2)
      errc(1, EILSEQ, NULL);
    s += n;
    spanp = delim;
    do {
      if ((sc = *spanp++) == c) {
        if (c == 0)
          s = NULL;
        else
          s[-n] = '\0';
        *stringp = s;
        return (tok);
      }
    } while (sc != 0);
  }
}
```