ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Translate the below assembly code into C programming language:

```asm
<get_pm_page_spec>:
  endbr64
  push   %r13
  push   %r12
  mov    %rdx,%r12
  xor    %edx,%edx
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r13
  mov    %r13,%rsi
  call   <strtoul@plt>
  mov    (%rsp),%rdi
  cmp    %rbx,%rdi
  je     L47
  cmpb   $0x78,(%rdi)
  mov    %eax,%edx
  je     L1
L10:
  movl   $0xffffffff,(%r12)
L23:
  shl    $0xa,%edx
  mov    %edx,0x0(%rbp)
  movsbl (%rdi),%eax
L6:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L56
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L1:
  cmpb   $0x0,0x1(%rdi)
  je     L10
  mov    %eax,(%r12)
  add    $0x1,%rdi
  xor    %edx,%edx
  mov    %r13,%rsi
  call   <strtoul@plt>
  mov    (%rsp),%rdi
  mov    %eax,%edx
  jmp    L23
L47:
  mov    $0xffffffff,%eax
  jmp    L6
L56:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int get_pm_page_spec(const char *s, unsigned int *page_size, unsigned int *num_pages) {
  char *p;
  unsigned long val;
  val = strtoul(s, &p, 0);
  if (p == s)
    return -1;
  if (*p == 'x' && p[1]) {
    *num_pages = val;
    *page_size = strtoul(p + 1, &p, 0);
  } else {
    *num_pages = -1;
    *page_size = val;
  }
  *page_size <<= 10;
  return *p;
}
```
user: Translate the below assembly code into C programming language:

```asm
<get_pm_page_spec>:
  endbr64
  push   %r13
  push   %r12
  mov    %rdx,%r12
  xor    %edx,%edx
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r13
  mov    %r13,%rsi
  call   <strtoul@plt>
  mov    (%rsp),%rdi
  cmp    %rbx,%rdi
  je     L5
  cmpb   $0x78,(%rdi)
  mov    %eax,%edx
  je     L48
L46:
  movl   $0xffffffff,(%r12)
L10:
  shl    $0xa,%edx
  mov    %edx,0x0(%rbp)
  movsbl (%rdi),%eax
L15:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L35
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L48:
  cmpb   $0x0,0x1(%rdi)
  je     L46
  mov    %eax,(%r12)
  add    $0x1,%rdi
  xor    %edx,%edx
  mov    %r13,%rsi
  call   <strtoul@plt>
  mov    (%rsp),%rdi
  mov    %eax,%edx
  jmp    L10
L5:
  mov    $0xffffffff,%eax
  jmp    L15
L35:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int get_pm_page_spec(const char *s, unsigned int *page_size, unsigned int *num_pages) {
  char *p;
  unsigned long val;
  val = strtoul(s, &p, 0);
  if (p == s)
    return -1;
  if (*p == 'x' && p[1]) {
    *num_pages = val;
    *page_size = strtoul(p + 1, &p, 0);
  } else {
    *num_pages = -1;
    *page_size = val;
  }
  *page_size <<= 10;
  return *p;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  lea    -0x28(%rbp),%rax
  mov    %rax,%rsi
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movl   $0x0,-0x1c(%rbp)
  jmp    L12
L13:
  lea    -0x20(%rbp),%rdx
  lea    -0x24(%rbp),%rax
  mov    %rax,%rsi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <invert@plt>
  mov    %eax,%ebx
  mov    -0x20(%rbp),%eax
  mov    %eax,%edi
  call   <invert@plt>
  add    %ebx,%eax
  mov    %eax,%edi
  call   <invert@plt>
  mov    %eax,%esi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  addl   $0x1,-0x1c(%rbp)
L12:
  mov    -0x28(%rbp),%eax
  cmp    %eax,-0x1c(%rbp)
  jl     L13
  mov    $0x0,%eax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L6
  call   <__stack_chk_fail@plt>
L6:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D19
type_guessed: string
name: unpack_data
arguments: data_label: D27
type_guessed: string
name: unpack_data
arguments: data_label: D24
type_guessed: string

tool: D19: %d

tool: D27: %d %d

tool: D24: %d


assistant: ```c
int main() {
  int i, n, a, b;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d %d", &a, &b);
    printf("%d\n", invert(invert(a) + invert(b)));
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rsi
  lea    D22(%rip),%rdi
  call   <scanf@plt>
  cmpl   $0x0,0xc(%rsp)
  jle    L6
  mov    $0x0,%ebp
  lea    0x14(%rsp),%r15
  lea    0x10(%rsp),%r14
  lea    D19(%rip),%r13
  lea    D18(%rip),%r12
L7:
  mov    %r15,%rdx
  mov    %r14,%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    0x10(%rsp),%edi
  call   <invert@plt>
  mov    %eax,%ebx
  mov    0x14(%rsp),%edi
  call   <invert@plt>
  lea    (%rbx,%rax,1),%edi
  call   <invert@plt>
  mov    %eax,%esi
  mov    %r12,%rdi
  call   <printf@plt>
  add    $0x1,%ebp
  cmp    %ebp,0xc(%rsp)
  jg     L7
L6:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L13
  mov    $0x0,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L13:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D22
type: string
name: retrieve_data
arguments: data_label: D19
type: string
name: retrieve_data
arguments: data_label: D18
type: string

tool: D22: %d

tool: D19: %d %d

tool: D18: %d


assistant: ```c
int main() {
  int i, n, a, b;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d %d", &a, &b);
    printf("%d\n", invert(invert(a) + invert(b)));
  }
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<main>:
  endbr64
  push   %r15
  lea    D16(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rsi
  call   <scanf@plt>
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L6
  xor    %r15d,%r15d
  lea    0x14(%rsp),%r14
  lea    0x10(%rsp),%r13
  lea    D12(%rip),%r12
  lea    D20(%rip),%rbp
  cs nopw 0x0(%rax,%rax,1)
L7:
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x10(%rsp),%edi
  add    $0x1,%r15d
  call   <invert@plt>
  mov    0x14(%rsp),%edi
  mov    %eax,%ebx
  call   <invert@plt>
  lea    (%rbx,%rax,1),%edi
  call   <invert@plt>
  mov    %rbp,%rdi
  mov    %eax,%esi
  call   <printf@plt>
  cmp    %r15d,0xc(%rsp)
  jg     L7
L6:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L21
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L21:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D16
type_infered: string
name: parse_data
arguments: data_tag: D12
type_infered: string
name: parse_data
arguments: data_tag: D20
type_infered: string

tool: D16: %d

tool: D12: %d %d

tool: D20: %d


assistant: ```c
int main() {
  int i, n, a, b;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d %d", &a, &b);
    printf("%d\n", invert(invert(a) + invert(b)));
  }
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  push   %r15
  lea    D10(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rsi
  call   <scanf@plt>
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L8
  xor    %r15d,%r15d
  lea    0x14(%rsp),%r14
  lea    0x10(%rsp),%r13
  lea    D21(%rip),%r12
  lea    D8(%rip),%rbp
  cs nopw 0x0(%rax,%rax,1)
L1:
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x10(%rsp),%edi
  add    $0x1,%r15d
  call   <invert@plt>
  mov    0x14(%rsp),%edi
  mov    %eax,%ebx
  call   <invert@plt>
  lea    (%rbx,%rax,1),%edi
  call   <invert@plt>
  mov    %rbp,%rdi
  mov    %eax,%esi
  call   <printf@plt>
  cmp    %r15d,0xc(%rsp)
  jg     L1
L8:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L23
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L23:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D10
type: string
name: disassemble_data
arguments: tag: D21
type: string
name: disassemble_data
arguments: tag: D8
type: string

tool: D10: %d

tool: D21: %d %d

tool: D8: %d


assistant: ```c
int main() {
  int i, n, a, b;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d %d", &a, &b);
    printf("%d\n", invert(invert(a) + invert(b)));
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<LZ4_decompress_fast_usingDict>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %edx,-0x14(%rbp)
  mov    %rcx,-0x20(%rbp)
  mov    %r8d,-0x18(%rbp)
  cmpl   $0x0,-0x18(%rbp)
  je     L10
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x10(%rbp)
  jne    L14
L10:
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <LZ4_decompress_fast@plt>
  jmp    L23
L14:
  mov    -0x18(%rbp),%edi
  mov    -0x20(%rbp),%rcx
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%rsi
  mov    -0x8(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <LZ4_decompress_fast_extDict@plt>
L23:
  leave
  ret
```

assistant: ```c
int LZ4_decompress_fast_usingDict(const char *source, char *dest, int originalSize, const char *dictStart, int dictSize) {
  if (dictSize == 0 || dictStart + dictSize == dest)
    return LZ4_decompress_fast(source, dest, originalSize);
  return LZ4_decompress_fast_extDict(source, dest, originalSize, dictStart, dictSize);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<LZ4_decompress_fast_usingDict>:
  endbr64
  sub    $0x8,%rsp
  test   %r8d,%r8d
  je     L28
  movslq %r8d,%rax
  add    %rcx,%rax
  cmp    %rax,%rsi
  je     L28
  call   <LZ4_decompress_fast_extDict@plt>
L18:
  add    $0x8,%rsp
  ret
L28:
  call   <LZ4_decompress_fast@plt>
  jmp    L18
```

assistant: ```c
int LZ4_decompress_fast_usingDict(const char *source, char *dest, int originalSize, const char *dictStart, int dictSize) {
  if (dictSize == 0 || dictStart + dictSize == dest)
    return LZ4_decompress_fast(source, dest, originalSize);
  return LZ4_decompress_fast_extDict(source, dest, originalSize, dictStart, dictSize);
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<LZ4_decompress_fast_usingDict>:
  endbr64
  test   %r8d,%r8d
  je     L19
  movslq %r8d,%rax
  add    %rcx,%rax
  cmp    %rax,%rsi
  je     L19
  jmp    1070 <LZ4_decompress_fast_extDict@plt>
  nopl   0x0(%rax)
L19:
  jmp    1060 <LZ4_decompress_fast@plt>
```

assistant: ```c
int LZ4_decompress_fast_usingDict(const char *source, char *dest, int originalSize, const char *dictStart, int dictSize) {
  if (dictSize == 0 || dictStart + dictSize == dest)
    return LZ4_decompress_fast(source, dest, originalSize);
  return LZ4_decompress_fast_extDict(source, dest, originalSize, dictStart, dictSize);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<LZ4_decompress_fast_usingDict>:
  endbr64
  test   %r8d,%r8d
  je     L19
  movslq %r8d,%rax
  add    %rcx,%rax
  cmp    %rax,%rsi
  je     L19
  jmp    1070 <LZ4_decompress_fast_extDict@plt>
  nopl   0x0(%rax)
L19:
  jmp    1060 <LZ4_decompress_fast@plt>
```

assistant: ```c
int LZ4_decompress_fast_usingDict(const char *source, char *dest, int originalSize, const char *dictStart, int dictSize) {
  if (dictSize == 0 || dictStart + dictSize == dest)
    return LZ4_decompress_fast(source, dest, originalSize);
  return LZ4_decompress_fast_extDict(source, dest, originalSize, dictStart, dictSize);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x2,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cmp    $0x2,%eax
  je     L10
  mov    $0x1,%eax
  jmp    L23
L10:
  mov    $0x0,%eax
L23:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L22
  call   <__stack_chk_fail@plt>
L22:
  leave
  ret
```

assistant: ```c
int main() {
  int arr[2];
  arr[1] = 2;
  if (arr[1] != 2)
    return 1;
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  mov    $0x0,%eax
  ret
```

assistant: ```c
int main() {
  int arr[2];
  arr[1] = 2;
  if (arr[1] != 2)
    return 1;
  return 0;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  xor    %eax,%eax
  ret
```

assistant: ```c
int main() {
  int arr[2];
  arr[1] = 2;
  if (arr[1] != 2)
    return 1;
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  xor    %eax,%eax
  ret
```

assistant: ```c
int main() {
  int arr[2];
  arr[1] = 2;
  if (arr[1] != 2)
    return 1;
  return 0;
}
```
user: What is the c source code of the assembly code below?

```asm
<parse_cmdline>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x128,%rsp
  mov    %rdi,%r14
  mov    %rsi,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x118(%rsp)
  xor    %eax,%eax
  mov    (%rdi),%rax
  mov    %rax,0x8(%rsp)
  lea    0x10(%rsp),%rbx
  lea    0x8(%rsp),%rdi
  mov    $0x100,%edx
  mov    %rbx,%rsi
  call   <dup_next_word_b@plt>
  mov    %rbx,%rdi
  call   <create_cnfnode@plt>
  mov    %rax,%r13
  mov    0x8(%rsp),%rbx
  cmpb   $0x0,(%rbx)
  je     L100
  lea    0x8(%rsp),%rbp
  jmp    L50
L128:
  mov    %r12,%rbx
L85:
  test   %al,%al
  je     L100
  lea    0x10(%rsp),%rdi
  call   <create_cnfnode@plt>
  mov    %rax,%r15
  mov    %rbp,%rdi
  call   <skip_spaces@plt>
  cmpb   $0x3a,0x1(%rbx)
  je     L151
L42:
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <append_node@plt>
  mov    0x8(%rsp),%rbx
  cmpb   $0x0,(%rbx)
  je     L100
L50:
  mov    %rbp,%rdi
  call   <skip_spaces@plt>
  lea    0x10(%rsp),%rsi
  mov    $0x100,%edx
  mov    %rbp,%rdi
  call   <dup_next_word_b@plt>
  cmpb   $0x2d,0x10(%rsp)
  jne    L7
  movzbl 0x11(%rsp),%edx
  movzbl (%r12),%eax
  cmp    %al,%dl
  je     L128
  test   %al,%al
  je     L128
  mov    %r12,%rbx
L152:
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  cmp    %al,%dl
  je     L85
  test   %al,%al
  jne    L152
  jmp    L85
L151:
  mov    0x8(%rsp),%rax
  movzbl (%rax),%ecx
  cmp    $0x22,%cl
  je     L61
  cmp    $0x27,%cl
  je     L61
  lea    0x10(%rsp),%rsi
  mov    $0x100,%edx
  mov    %rbp,%rdi
  call   <dup_next_word_b@plt>
L118:
  lea    0x10(%rsp),%rsi
  mov    %r15,%rdi
  call   <cnfnode_setval@plt>
  jmp    L42
L61:
  movsbl %cl,%ecx
  lea    0x10(%rsp),%rsi
  mov    $0x100,%edx
  mov    %rbp,%rdi
  call   <dup_next_quoted_b@plt>
  jmp    L118
L7:
  mov    %rbx,0x8(%rsp)
L100:
  mov    0x8(%rsp),%rax
  mov    %rax,(%r14)
  mov    0x118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L113
  mov    %r13,%rax
  add    $0x128,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L113:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
struct cnfnode *parse_cmdline(const char **pp, const char *optstring) {
  struct cnfnode *cn_top, *cn_opt;
  const char *p, *po;
  char buf[256];
  p = *pp;
  dup_next_word_b(&p, buf, sizeof(buf));
  cn_top = create_cnfnode(buf);
  while (*p) {
    const char *p0;
    p0 = p;
    skip_spaces(&p);
    dup_next_word_b(&p, buf, sizeof(buf));
    if (buf[0] == '-') {
      int c = buf[1];
      po = optstring;
      while (*po && *po != c)
        po++;
      if (*po) {
        cn_opt = create_cnfnode(buf);
        skip_spaces(&p);
        po++;
        if (*po == ':') {
          if (*p != '\"' && *p != '\'')
            dup_next_word_b(&p, buf, sizeof(buf));
          else
            dup_next_quoted_b(&p, buf, sizeof(buf), *p);
          cnfnode_setval(cn_opt, buf);
        }
        append_node(cn_top, cn_opt);
      } else
        break;
    } else {
      p = p0;
      break;
    }
  }
  *pp = p;
  return cn_top;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<parse_cmdline>:
  endbr64
  push   %r15
  mov    $0x100,%edx
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  sub    $0x138,%rsp
  mov    %rdi,0x8(%rsp)
  lea    0x20(%rsp),%rbp
  lea    0x18(%rsp),%rbx
  mov    %rbp,%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x128(%rsp)
  mov    (%rdi),%rax
  mov    %rbx,%rdi
  mov    %rax,0x18(%rsp)
  call   <dup_next_word_b@plt>
  mov    %rbp,%rdi
  call   <create_cnfnode@plt>
  mov    0x18(%rsp),%r15
  mov    %rax,%r13
  cmpb   $0x0,(%r15)
  je     L111
  nopw   0x0(%rax,%rax,1)
L89:
  mov    %rbx,%rdi
  call   <skip_spaces@plt>
  mov    $0x100,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <dup_next_word_b@plt>
  cmpb   $0x2d,0x20(%rsp)
  jne    L111
  movzbl (%r12),%eax
  movzbl 0x21(%rsp),%ecx
  test   %al,%al
  je     L33
  mov    %r12,%r14
  jmp    L19
  cs nopw 0x0(%rax,%rax,1)
L49:
  movzbl 0x1(%r14),%eax
  add    $0x1,%r14
  test   %al,%al
  je     L33
L19:
  cmp    %al,%cl
  jne    L49
  mov    %rbp,%rdi
  call   <create_cnfnode@plt>
  mov    %rbx,%rdi
  mov    %rax,%r15
  call   <skip_spaces@plt>
  cmpb   $0x3a,0x1(%r14)
  je     L125
L113:
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <append_node@plt>
  mov    0x18(%rsp),%r15
  cmpb   $0x0,(%r15)
  jne    L89
  nopl   (%rax)
L111:
  mov    0x8(%rsp),%rax
  mov    %r15,(%rax)
  mov    0x128(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L120
  add    $0x138,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L33:
  mov    0x18(%rsp),%r15
  jmp    L111
  nopw   0x0(%rax,%rax,1)
L125:
  mov    0x18(%rsp),%rax
  mov    $0x100,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  movsbl (%rax),%ecx
  cmp    $0x22,%cl
  je     L43
  cmp    $0x27,%cl
  je     L43
  call   <dup_next_word_b@plt>
L107:
  mov    %rbp,%rsi
  mov    %r15,%rdi
  call   <cnfnode_setval@plt>
  jmp    L113
  nopw   0x0(%rax,%rax,1)
L43:
  call   <dup_next_quoted_b@plt>
  jmp    L107
L120:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
struct cnfnode *parse_cmdline(const char **pp, const char *optstring) {
  struct cnfnode *cn_top, *cn_opt;
  const char *p, *po;
  char buf[256];
  p = *pp;
  dup_next_word_b(&p, buf, sizeof(buf));
  cn_top = create_cnfnode(buf);
  while (*p) {
    const char *p0;
    p0 = p;
    skip_spaces(&p);
    dup_next_word_b(&p, buf, sizeof(buf));
    if (buf[0] == '-') {
      int c = buf[1];
      po = optstring;
      while (*po && *po != c)
        po++;
      if (*po) {
        cn_opt = create_cnfnode(buf);
        skip_spaces(&p);
        po++;
        if (*po == ':') {
          if (*p != '\"' && *p != '\'')
            dup_next_word_b(&p, buf, sizeof(buf));
          else
            dup_next_quoted_b(&p, buf, sizeof(buf), *p);
          cnfnode_setval(cn_opt, buf);
        }
        append_node(cn_top, cn_opt);
      } else
        break;
    } else {
      p = p0;
      break;
    }
  }
  *pp = p;
  return cn_top;
}
```
user: Translate the below assembly code into C programming language:

```asm
<parse_cmdline>:
  endbr64
  push   %r15
  mov    $0x100,%edx
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  sub    $0x138,%rsp
  mov    %rdi,0x8(%rsp)
  lea    0x20(%rsp),%rbp
  lea    0x18(%rsp),%rbx
  mov    %rbp,%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x128(%rsp)
  mov    (%rdi),%rax
  mov    %rbx,%rdi
  mov    %rax,0x18(%rsp)
  call   <dup_next_word_b@plt>
  mov    %rbp,%rdi
  call   <create_cnfnode@plt>
  mov    0x18(%rsp),%r15
  mov    %rax,%r13
  cmpb   $0x0,(%r15)
  je     L44
  nopw   0x0(%rax,%rax,1)
L114:
  mov    %rbx,%rdi
  call   <skip_spaces@plt>
  mov    $0x100,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <dup_next_word_b@plt>
  cmpb   $0x2d,0x20(%rsp)
  jne    L44
  movzbl (%r12),%eax
  movzbl 0x21(%rsp),%ecx
  test   %al,%al
  je     L3
  mov    %r12,%r14
  jmp    L100
  cs nopw 0x0(%rax,%rax,1)
L113:
  movzbl 0x1(%r14),%eax
  add    $0x1,%r14
  test   %al,%al
  je     L3
L100:
  cmp    %al,%cl
  jne    L113
  mov    %rbp,%rdi
  call   <create_cnfnode@plt>
  mov    %rbx,%rdi
  mov    %rax,%r15
  call   <skip_spaces@plt>
  cmpb   $0x3a,0x1(%r14)
  je     L25
L61:
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <append_node@plt>
  mov    0x18(%rsp),%r15
  cmpb   $0x0,(%r15)
  jne    L114
  nopl   (%rax)
L44:
  mov    0x8(%rsp),%rax
  mov    %r15,(%rax)
  mov    0x128(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L126
  add    $0x138,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L3:
  mov    0x18(%rsp),%r15
  jmp    L44
  nopw   0x0(%rax,%rax,1)
L25:
  mov    0x18(%rsp),%rax
  mov    $0x100,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  movsbl (%rax),%ecx
  cmp    $0x22,%cl
  je     L134
  cmp    $0x27,%cl
  je     L134
  call   <dup_next_word_b@plt>
L35:
  mov    %rbp,%rsi
  mov    %r15,%rdi
  call   <cnfnode_setval@plt>
  jmp    L61
  nopw   0x0(%rax,%rax,1)
L134:
  call   <dup_next_quoted_b@plt>
  jmp    L35
L126:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
struct cnfnode *parse_cmdline(const char **pp, const char *optstring) {
  struct cnfnode *cn_top, *cn_opt;
  const char *p, *po;
  char buf[256];
  p = *pp;
  dup_next_word_b(&p, buf, sizeof(buf));
  cn_top = create_cnfnode(buf);
  while (*p) {
    const char *p0;
    p0 = p;
    skip_spaces(&p);
    dup_next_word_b(&p, buf, sizeof(buf));
    if (buf[0] == '-') {
      int c = buf[1];
      po = optstring;
      while (*po && *po != c)
        po++;
      if (*po) {
        cn_opt = create_cnfnode(buf);
        skip_spaces(&p);
        po++;
        if (*po == ':') {
          if (*p != '\"' && *p != '\'')
            dup_next_word_b(&p, buf, sizeof(buf));
          else
            dup_next_quoted_b(&p, buf, sizeof(buf), *p);
          cnfnode_setval(cn_opt, buf);
        }
        append_node(cn_top, cn_opt);
      } else
        break;
    } else {
      p = p0;
      break;
    }
  }
  *pp = p;
  return cn_top;
}
```