ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  sub    $0x18,%rsp
  lea    D15(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <puts@plt>
  lea    D39(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D46(%rip),%rdi
  call   <scanf@plt>
  pxor   %xmm0,%xmm0
  mov    $0x1,%eax
  lea    D40(%rip),%rdi
  cvtss2sd 0x4(%rsp),%xmm0
  subsd  D55(%rip),%xmm0
  mulsd  D33(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  cvtss2sd %xmm0,%xmm0
  call   <printf@plt>
  xor    %eax,%eax
  lea    D29(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  xor    %eax,%eax
  add    $0x18,%rsp
  ret
L9:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D15
data_type: string
name: extract_symbolic_data
arguments: data_label: D39
data_type: string
name: extract_symbolic_data
arguments: data_label: D46
data_type: string
name: extract_symbolic_data
arguments: data_label: D40
data_type: string
name: extract_symbolic_data
arguments: data_label: D55
data_type: f64
name: extract_symbolic_data
arguments: data_label: D33
data_type: byte[8]
name: extract_symbolic_data
arguments: data_label: D29
data_type: string

tool: D15: 
 ** CONVERSOR DE TEMPERATURA FAHRENHEIT EM CELSIUS **

tool: D39: 
Digite a temperatura em Fahrenheit: 

tool: D46: %f

tool: D40: 
A temperatura em Celsius e: %i.


tool: D55: 32

tool: {"D33": [0x72,0x1c,0xc7,0x71,0x1c,0xc7,0xe1,0x3f]}

tool: D29: 

<< Marco_Tulio >>

assistant: ```c
main() {
  float F, C;
  printf("\n ** CONVERSOR DE TEMPERATURA FAHRENHEIT EM CELSIUS **\n");
  printf("\nDigite a temperatura em Fahrenheit: ");
  scanf("%f", &F);
  C = 5.0 / 9.0 * (F - 32.0);
  printf("\nA temperatura em Celsius e: %i.\n", C);
  printf("\n\n<< Marco_Tulio >>");
  getchar(), getchar();
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<errexit>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    $0x1,%edx
  lea    D5(%rip),%rax
  mov    %rax,%rsi
  mov    $0x2,%edi
  call   <write@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x0,%edi
  call   <getout@plt>
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D5
type_infered: string

tool: D5: 


assistant: ```c
void errexit(const char *s) {
  write(2, "\n", 1);
  perror(s);
  getout(0);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<errexit>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  mov    $0x1,%edx
  lea    D6(%rip),%rsi
  mov    $0x2,%edi
  call   <write@plt>
  mov    %rbx,%rdi
  call   <perror@plt>
  mov    $0x0,%edi
  call   <getout@plt>
  pop    %rbx
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D6
type_guessed: string

tool: D6: 


assistant: ```c
void errexit(const char *s) {
  write(2, "\n", 1);
  perror(s);
  getout(0);
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<errexit>:
  endbr64
  push   %rbp
  mov    $0x1,%edx
  mov    %rdi,%rbp
  lea    D3(%rip),%rsi
  mov    $0x2,%edi
  call   <write@plt>
  mov    %rbp,%rdi
  call   <perror@plt>
  xor    %edi,%edi
  pop    %rbp
  jmp    1070 <getout@plt>
```

tool_calls: name: parse_data
arguments: data_label: D3
data_type: string

tool: D3: 


assistant: ```c
void errexit(const char *s) {
  write(2, "\n", 1);
  perror(s);
  getout(0);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<errexit>:
  endbr64
  push   %rbp
  mov    $0x1,%edx
  mov    %rdi,%rbp
  lea    D2(%rip),%rsi
  mov    $0x2,%edi
  call   <write@plt>
  mov    %rbp,%rdi
  call   <perror@plt>
  xor    %edi,%edi
  pop    %rbp
  jmp    1070 <getout@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D2
data_type: string

tool: D2: 


assistant: ```c
void errexit(const char *s) {
  write(2, "\n", 1);
  perror(s);
  getout(0);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<test_main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x0,%eax
  call   <run_add_cte_to_per_adv_chain_tests@plt>
  mov    $0x0,%eax
  call   <run_remove_cte_to_per_adv_chain_tests@plt>
  nop
  pop    %rbp
  ret
```

assistant: ```c
void test_main(void) {
  run_add_cte_to_per_adv_chain_tests();
  run_remove_cte_to_per_adv_chain_tests();
}
```
user: Translate the below assembly code into C programming language:

```asm
<test_main>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <run_add_cte_to_per_adv_chain_tests@plt>
  mov    $0x0,%eax
  call   <run_remove_cte_to_per_adv_chain_tests@plt>
  add    $0x8,%rsp
  ret
```

assistant: ```c
void test_main(void) {
  run_add_cte_to_per_adv_chain_tests();
  run_remove_cte_to_per_adv_chain_tests();
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<test_main>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <run_add_cte_to_per_adv_chain_tests@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    1070 <run_remove_cte_to_per_adv_chain_tests@plt>
```

assistant: ```c
void test_main(void) {
  run_add_cte_to_per_adv_chain_tests();
  run_remove_cte_to_per_adv_chain_tests();
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<test_main>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <run_add_cte_to_per_adv_chain_tests@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    1070 <run_remove_cte_to_per_adv_chain_tests@plt>
```

assistant: ```c
void test_main(void) {
  run_add_cte_to_per_adv_chain_tests();
  run_remove_cte_to_per_adv_chain_tests();
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<ft_iterative_power>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jne    L19
  cmpl   $0x0,-0x18(%rbp)
  jne    L19
  mov    $0x1,%eax
  jmp    L55
L19:
  cmpl   $0x0,-0x18(%rbp)
  jns    L6
  mov    $0x0,%eax
  jmp    L55
L6:
  cmpl   $0x0,-0x18(%rbp)
  jne    L31
  mov    $0x1,%eax
  jmp    L55
L31:
  movl   $0x1,-0x4(%rbp)
  jmp    L17
L69:
  mov    -0x4(%rbp),%eax
  imul   -0x14(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  subl   $0x1,-0x18(%rbp)
L17:
  cmpl   $0x0,-0x18(%rbp)
  jg     L69
  mov    -0x4(%rbp),%eax
L55:
  pop    %rbp
  ret
```

assistant: ```c
int ft_iterative_power(int nb, int power) {
  int temp;
  if (nb == 0 && power == 0)
    return (1);
  if (power < 0)
    return (0);
  else if (power == 0)
    return (1);
  temp = 1;
  while (power > 0) {
    temp *= nb;
    power--;
  }
  return (temp);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<ft_iterative_power>:
  endbr64
  mov    $0x1,%eax
  mov    %edi,%edx
  or     %esi,%edx
  je     L22
  mov    $0x0,%eax
  test   %esi,%esi
  js     L22
  mov    $0x1,%eax
  je     L22
L5:
  imul   %edi,%eax
  sub    $0x1,%esi
  test   %esi,%esi
  jg     L5
L22:
  ret
```

assistant: ```c
int ft_iterative_power(int nb, int power) {
  int temp;
  if (nb == 0 && power == 0)
    return (1);
  if (power < 0)
    return (0);
  else if (power == 0)
    return (1);
  temp = 1;
  while (power > 0) {
    temp *= nb;
    power--;
  }
  return (temp);
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<ft_iterative_power>:
  endbr64
  mov    %edi,%edx
  mov    $0x1,%eax
  or     %esi,%edx
  je     L33
  xor    %eax,%eax
  test   %esi,%esi
  js     L33
  mov    $0x1,%eax
  je     L33
  nopl   0x0(%rax)
L15:
  imul   %edi,%eax
  sub    $0x1,%esi
  jne    L15
L33:
  ret
```

assistant: ```c
int ft_iterative_power(int nb, int power) {
  int temp;
  if (nb == 0 && power == 0)
    return (1);
  if (power < 0)
    return (0);
  else if (power == 0)
    return (1);
  temp = 1;
  while (power > 0) {
    temp *= nb;
    power--;
  }
  return (temp);
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<ft_iterative_power>:
  endbr64
  mov    %edi,%edx
  mov    $0x1,%eax
  or     %esi,%edx
  je     L8
  xor    %eax,%eax
  test   %esi,%esi
  js     L8
  mov    $0x1,%eax
  je     L8
  nopl   0x0(%rax)
L12:
  imul   %edi,%eax
  sub    $0x1,%esi
  jne    L12
L8:
  ret
```

assistant: ```c
int ft_iterative_power(int nb, int power) {
  int temp;
  if (nb == 0 && power == 0)
    return (1);
  if (power < 0)
    return (0);
  else if (power == 0)
    return (1);
  temp = 1;
  while (power > 0) {
    temp *= nb;
    power--;
  }
  return (temp);
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<TakeUint8>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  movzbl %al,%eax
  cmp    $0xfe,%eax
  jne    L18
  mov    $0xa,%eax
  jmp    L6
L18:
  mov    $0x0,%eax
L6:
  pop    %rbp
  ret
```

assistant: ```c
extern int TakeUint8(int x) {
  if ((0xFF & (unsigned int)x) == 0xFE)
    return 10;
  return 0;
}
```
user: What is the c source code of the assembly code below:

```asm
<TakeUint8>:
  endbr64
  cmp    $0xfe,%dil
  mov    $0x0,%eax
  mov    $0xa,%edx
  cmove  %edx,%eax
  ret
```

assistant: ```c
extern int TakeUint8(int x) {
  if ((0xFF & (unsigned int)x) == 0xFE)
    return 10;
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<TakeUint8>:
  endbr64
  xor    %eax,%eax
  mov    $0xa,%edx
  cmp    $0xfe,%dil
  cmove  %edx,%eax
  ret
```

assistant: ```c
extern int TakeUint8(int x) {
  if ((0xFF & (unsigned int)x) == 0xFE)
    return 10;
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<TakeUint8>:
  endbr64
  xor    %eax,%eax
  mov    $0xa,%edx
  cmp    $0xfe,%dil
  cmove  %edx,%eax
  ret
```

assistant: ```c
extern int TakeUint8(int x) {
  if ((0xFF & (unsigned int)x) == 0xFE)
    return 10;
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<__wrap_free>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    $0x0,%eax
  call   <irq_disable@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <__real_free@plt>
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <irq_restore@plt>
  nop
  leave
  ret
```

assistant: ```c
void __wrap_free(void *ptr) {
  unsigned state = irq_disable();
  __real_free(ptr);
  irq_restore(state);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<__wrap_free>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  mov    $0x0,%eax
  call   <irq_disable@plt>
  mov    %eax,%ebx
  mov    %rbp,%rdi
  call   <__real_free@plt>
  mov    %ebx,%edi
  call   <irq_restore@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
void __wrap_free(void *ptr) {
  unsigned state = irq_disable();
  __real_free(ptr);
  irq_restore(state);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<__wrap_free>:
  endbr64
  push   %r12
  xor    %eax,%eax
  mov    %rdi,%r12
  push   %rbp
  sub    $0x8,%rsp
  call   <irq_disable@plt>
  mov    %r12,%rdi
  mov    %eax,%ebp
  call   <__real_free@plt>
  add    $0x8,%rsp
  mov    %ebp,%edi
  pop    %rbp
  pop    %r12
  jmp    1070 <irq_restore@plt>
```

assistant: ```c
void __wrap_free(void *ptr) {
  unsigned state = irq_disable();
  __real_free(ptr);
  irq_restore(state);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<__wrap_free>:
  endbr64
  push   %r12
  xor    %eax,%eax
  mov    %rdi,%r12
  push   %rbp
  sub    $0x8,%rsp
  call   <irq_disable@plt>
  mov    %r12,%rdi
  mov    %eax,%ebp
  call   <__real_free@plt>
  add    $0x8,%rsp
  mov    %ebp,%edi
  pop    %rbp
  pop    %r12
  jmp    1070 <irq_restore@plt>
```

assistant: ```c
void __wrap_free(void *ptr) {
  unsigned state = irq_disable();
  __real_free(ptr);
  irq_restore(state);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<swi_cutstr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,-0x2c(%rbp)
  movl   $0x1,-0x4(%rbp)
  mov    -0x28(%rbp),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,(%rax)
  jmp    L88
L93:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L95
  mov    -0x4(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jge    L95
  mov    -0x18(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L50
L14:
  addq   $0x1,-0x18(%rbp)
L50:
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L74
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L14
L74:
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rdx
  add    $0x1,%rdx
  mov    %rdx,(%rax)
L95:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L64
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xd,%al
  jne    L39
L64:
  mov    -0x18(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L44
L39:
  addq   $0x1,-0x18(%rbp)
L88:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L93
L44:
  mov    -0x4(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jge    L8
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movq   $0x0,(%rax)
L8:
  mov    -0x4(%rbp),%eax
  leave
  ret
```

assistant: ```c
int swi_cutstr(char *s, char *cutlist, char *cpos[], int nmax) {
  int n = 1;
  cpos[0] = s;
  while (*s != '\0') {
    if ((strchr(cutlist, (int)*s) != NULL) && n < nmax) {
      *s = '\0';
      while (*(s + 1) != '\0' && strchr(cutlist, (int)*(s + 1)) != NULL)
        s++;
      cpos[n++] = s + 1;
    }
    if (*s == '\n' || *s == '\r') {
      *s = '\0';
      break;
    }
    s++;
  }
  if (n < nmax)
    cpos[n] = NULL;
  return (n);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<swi_cutstr>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbp
  mov    %rdx,%r14
  mov    %ecx,%r13d
  mov    %rdi,(%rdx)
  movzbl (%rdi),%esi
  test   %sil,%sil
  je     L49
  mov    %rdi,%rbx
  mov    $0x1,%r12d
  jmp    L21
L102:
  mov    %rbx,%rax
L63:
  movslq %r12d,%rdx
  lea    0x1(%rax),%rcx
  mov    %rcx,(%r14,%rdx,8)
  lea    0x1(%r12),%r12d
  jmp    L79
L113:
  mov    %rbx,%rax
L79:
  movzbl (%rax),%edx
  cmp    $0xa,%dl
  je     L9
  cmp    $0xd,%dl
  je     L9
  lea    0x1(%rax),%rbx
  movzbl 0x1(%rax),%esi
  test   %sil,%sil
  je     L3
L21:
  movsbl %sil,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  cmp    %r12d,%r13d
  jle    L113
  test   %rax,%rax
  je     L113
  movb   $0x0,(%rbx)
  movzbl 0x1(%rbx),%esi
  mov    %rbx,%rax
  test   %sil,%sil
  je     L63
L30:
  movsbl %sil,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L102
  add    $0x1,%rbx
  movzbl 0x1(%rbx),%esi
  test   %sil,%sil
  jne    L30
  mov    %rbx,%rax
  jmp    L63
L9:
  movb   $0x0,(%rax)
L3:
  cmp    %r13d,%r12d
  jge    L107
  movslq %r12d,%rax
  movq   $0x0,(%r14,%rax,8)
L107:
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L49:
  mov    $0x1,%r12d
  jmp    L3
```

assistant: ```c
int swi_cutstr(char *s, char *cutlist, char *cpos[], int nmax) {
  int n = 1;
  cpos[0] = s;
  while (*s != '\0') {
    if ((strchr(cutlist, (int)*s) != NULL) && n < nmax) {
      *s = '\0';
      while (*(s + 1) != '\0' && strchr(cutlist, (int)*(s + 1)) != NULL)
        s++;
      cpos[n++] = s + 1;
    }
    if (*s == '\n' || *s == '\r') {
      *s = '\0';
      break;
    }
    s++;
  }
  if (n < nmax)
    cpos[n] = NULL;
  return (n);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<swi_cutstr>:
  endbr64
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  mov    %rsi,%rbx
  mov    %rdi,(%rdx)
  movsbl (%rdi),%esi
  test   %sil,%sil
  je     L92
  mov    %rdi,%r14
  mov    $0x1,%r12d
  jmp    L63
  xchg   %ax,%ax
L21:
  mov    %r14,%rax
  movzbl (%rax),%edx
  cmp    $0xa,%dl
  je     L149
L81:
  cmp    $0xd,%dl
  je     L149
  movsbl 0x1(%rax),%esi
  lea    0x1(%rax),%r14
  test   %sil,%sil
  je     L13
L63:
  mov    %rbx,%rdi
  call   <strchr@plt>
  cmp    %r12d,%ebp
  jle    L21
  test   %rax,%rax
  je     L21
  movsbl 0x1(%r14),%esi
  movb   $0x0,(%r14)
  test   %sil,%sil
  jne    L132
  jmp    L126
  nop
L80:
  movsbl 0x1(%r14),%esi
  test   %sil,%sil
  je     L126
L132:
  mov    %rbx,%rdi
  call   <strchr@plt>
  mov    %rax,%r8
  mov    %r14,%rax
  lea    0x1(%r14),%r14
  test   %r8,%r8
  jne    L80
  movslq %r12d,%rdx
  lea    0x1(%rax),%rcx
  add    $0x1,%r12d
  mov    %rcx,0x0(%r13,%rdx,8)
L59:
  movzbl (%rax),%edx
  cmp    $0xa,%dl
  jne    L81
  nopl   0x0(%rax)
L149:
  movb   $0x0,(%rax)
L13:
  cmp    %ebp,%r12d
  jge    L18
  movslq %r12d,%rax
  movq   $0x0,0x0(%r13,%rax,8)
L18:
  pop    %rbx
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L126:
  mov    %r14,%rax
  movslq %r12d,%rdx
  add    $0x1,%r12d
  lea    0x1(%rax),%rcx
  mov    %rcx,0x0(%r13,%rdx,8)
  jmp    L59
L92:
  mov    $0x1,%r12d
  jmp    L13
```

assistant: ```c
int swi_cutstr(char *s, char *cutlist, char *cpos[], int nmax) {
  int n = 1;
  cpos[0] = s;
  while (*s != '\0') {
    if ((strchr(cutlist, (int)*s) != NULL) && n < nmax) {
      *s = '\0';
      while (*(s + 1) != '\0' && strchr(cutlist, (int)*(s + 1)) != NULL)
        s++;
      cpos[n++] = s + 1;
    }
    if (*s == '\n' || *s == '\r') {
      *s = '\0';
      break;
    }
    s++;
  }
  if (n < nmax)
    cpos[n] = NULL;
  return (n);
}
```
user: Translate the below assembly code into C programming language:

```asm
<swi_cutstr>:
  endbr64
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  mov    %rsi,%rbx
  mov    %rdi,(%rdx)
  movsbl (%rdi),%esi
  test   %sil,%sil
  je     L1
  mov    %rdi,%r14
  mov    $0x1,%r12d
  jmp    L5
  xchg   %ax,%ax
L119:
  mov    %r14,%rax
  movzbl (%rax),%edx
  cmp    $0xa,%dl
  je     L39
L108:
  cmp    $0xd,%dl
  je     L39
  movsbl 0x1(%rax),%esi
  lea    0x1(%rax),%r14
  test   %sil,%sil
  je     L32
L5:
  mov    %rbx,%rdi
  call   <strchr@plt>
  cmp    %r12d,%ebp
  jle    L119
  test   %rax,%rax
  je     L119
  movsbl 0x1(%r14),%esi
  movb   $0x0,(%r14)
  test   %sil,%sil
  jne    L91
  jmp    L38
  nop
L56:
  movsbl 0x1(%r14),%esi
  test   %sil,%sil
  je     L38
L91:
  mov    %rbx,%rdi
  call   <strchr@plt>
  mov    %rax,%r8
  mov    %r14,%rax
  lea    0x1(%r14),%r14
  test   %r8,%r8
  jne    L56
  movslq %r12d,%rdx
  lea    0x1(%rax),%rcx
  add    $0x1,%r12d
  mov    %rcx,0x0(%r13,%rdx,8)
L94:
  movzbl (%rax),%edx
  cmp    $0xa,%dl
  jne    L108
  nopl   0x0(%rax)
L39:
  movb   $0x0,(%rax)
L32:
  cmp    %ebp,%r12d
  jge    L9
  movslq %r12d,%rax
  movq   $0x0,0x0(%r13,%rax,8)
L9:
  pop    %rbx
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L38:
  mov    %r14,%rax
  movslq %r12d,%rdx
  add    $0x1,%r12d
  lea    0x1(%rax),%rcx
  mov    %rcx,0x0(%r13,%rdx,8)
  jmp    L94
L1:
  mov    $0x1,%r12d
  jmp    L32
```

assistant: ```c
int swi_cutstr(char *s, char *cutlist, char *cpos[], int nmax) {
  int n = 1;
  cpos[0] = s;
  while (*s != '\0') {
    if ((strchr(cutlist, (int)*s) != NULL) && n < nmax) {
      *s = '\0';
      while (*(s + 1) != '\0' && strchr(cutlist, (int)*(s + 1)) != NULL)
        s++;
      cpos[n++] = s + 1;
    }
    if (*s == '\n' || *s == '\r') {
      *s = '\0';
      break;
    }
    s++;
  }
  if (n < nmax)
    cpos[n] = NULL;
  return (n);
}
```
user: Translate the below assembly code into C programming language:

```asm
<junk>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x0,%eax
  call   <inbyte@plt>
  mov    %rax,%rdi
  call   <an@plt>
  test   %rax,%rax
  je     L32
  jmp    L68
L42:
  mov    $0x0,%eax
  call   <gch@plt>
L68:
  mov    $0x0,%eax
  call   <ch@plt>
  mov    %rax,%rdi
  call   <an@plt>
  test   %rax,%rax
  jne    L42
  jmp    L13
L3:
  mov    $0x0,%eax
  call   <ch@plt>
  test   %rax,%rax
  je     L31
  mov    $0x0,%eax
  call   <gch@plt>
L32:
  mov    $0x0,%eax
  call   <ch@plt>
  mov    %rax,%rdi
  call   <an@plt>
  test   %rax,%rax
  je     L3
  jmp    L13
L31:
  nop
L13:
  mov    $0x0,%eax
  call   <blanks@plt>
  nop
  pop    %rbp
  ret
```

assistant: ```c
void junk() {
  if (an(inbyte()))
    while (an(ch()))
      gch();
  else
    while (an(ch()) == 0) {
      if (ch() == 0)
        break;
      gch();
    }
  blanks();
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<junk>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <inbyte@plt>
  mov    %rax,%rdi
  call   <an@plt>
  test   %rax,%rax
  jne    L9
  jmp    L11
L13:
  mov    $0x0,%eax
  call   <gch@plt>
L9:
  mov    $0x0,%eax
  call   <ch@plt>
  mov    %rax,%rdi
  call   <an@plt>
  test   %rax,%rax
  jne    L13
L22:
  mov    $0x0,%eax
  call   <blanks@plt>
  add    $0x8,%rsp
  ret
L51:
  mov    $0x0,%eax
  call   <gch@plt>
L11:
  mov    $0x0,%eax
  call   <ch@plt>
  mov    %rax,%rdi
  call   <an@plt>
  test   %rax,%rax
  jne    L22
  mov    $0x0,%eax
  call   <ch@plt>
  test   %rax,%rax
  jne    L51
  jmp    L22
```

assistant: ```c
void junk() {
  if (an(inbyte()))
    while (an(ch()))
      gch();
  else
    while (an(ch()) == 0) {
      if (ch() == 0)
        break;
      gch();
    }
  blanks();
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<junk>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <inbyte@plt>
  mov    %rax,%rdi
  call   <an@plt>
  test   %rax,%rax
  jne    L3
  jmp    L16
  xchg   %ax,%ax
L25:
  xor    %eax,%eax
  call   <gch@plt>
L3:
  xor    %eax,%eax
  call   <ch@plt>
  mov    %rax,%rdi
  call   <an@plt>
  test   %rax,%rax
  jne    L25
L15:
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    1090 <blanks@plt>
  cs nopw 0x0(%rax,%rax,1)
L9:
  xor    %eax,%eax
  call   <ch@plt>
  test   %rax,%rax
  je     L15
  xor    %eax,%eax
  call   <gch@plt>
L16:
  xor    %eax,%eax
  call   <ch@plt>
  mov    %rax,%rdi
  call   <an@plt>
  test   %rax,%rax
  je     L9
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    1090 <blanks@plt>
```

assistant: ```c
void junk() {
  if (an(inbyte()))
    while (an(ch()))
      gch();
  else
    while (an(ch()) == 0) {
      if (ch() == 0)
        break;
      gch();
    }
  blanks();
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<junk>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <inbyte@plt>
  mov    %rax,%rdi
  call   <an@plt>
  test   %rax,%rax
  jne    L25
  jmp    L11
  xchg   %ax,%ax
L20:
  xor    %eax,%eax
  call   <gch@plt>
L25:
  xor    %eax,%eax
  call   <ch@plt>
  mov    %rax,%rdi
  call   <an@plt>
  test   %rax,%rax
  jne    L20
L44:
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    1090 <blanks@plt>
  cs nopw 0x0(%rax,%rax,1)
L13:
  xor    %eax,%eax
  call   <ch@plt>
  test   %rax,%rax
  je     L44
  xor    %eax,%eax
  call   <gch@plt>
L11:
  xor    %eax,%eax
  call   <ch@plt>
  mov    %rax,%rdi
  call   <an@plt>
  test   %rax,%rax
  je     L13
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    1090 <blanks@plt>
```

assistant: ```c
void junk() {
  if (an(inbyte()))
    while (an(ch()))
      gch();
  else
    while (an(ch()) == 0) {
      if (ch() == 0)
        break;
      gch();
    }
  blanks();
}
```