ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<getch>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbx
  mov    %rbx,%rsi
  mov    $0x0,%edi
  call   <tcgetattr@plt>
  mov    %rsp,%rbp
  mov    $0x10,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <memcpy@plt>
  mov    D5(%rip),%rax
  mov    (%rax),%eax
  mov    D28(%rip),%rdx
  or     (%rdx),%eax
  not    %eax
  and    %eax,(%rsp)
  mov    D22(%rip),%rax
  mov    (%rax),%rdx
  mov    0x8(%rsp),%rax
  movl   $0x1,(%rax,%rdx,4)
  mov    D35(%rip),%rax
  mov    (%rax),%rdx
  mov    0x8(%rsp),%rax
  movl   $0x0,(%rax,%rdx,4)
  mov    D1(%rip),%r12
  mov    %rbp,%rdx
  mov    (%r12),%esi
  mov    $0x0,%edi
  call   <tcsetattr@plt>
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    %eax,%ebp
  mov    %rbx,%rdx
  mov    (%r12),%esi
  mov    $0x0,%edi
  call   <tcsetattr@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L7
  mov    %ebp,%eax
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L7:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int getch(void) {
  struct termios term, oterm;
  int c = 0;
  tcgetattr(0, &oterm);
  memcpy(&term, &oterm, sizeof(term));
  term.c_lflag &= ~(ICANON | ECHO);
  term.c_cc[VMIN] = 1;
  term.c_cc[VTIME] = 0;
  tcsetattr(0, TCSANOW, &term);
  c = getchar();
  tcsetattr(0, TCSANOW, &oterm);
  return c;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<getch>:
  endbr64
  push   %r13
  xor    %edi,%edi
  push   %r12
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r12
  mov    %rsp,%r13
  mov    %r12,%rsi
  call   <tcgetattr@plt>
  mov    %r13,%rdi
  mov    $0x10,%edx
  mov    %r12,%rsi
  call   <memcpy@plt>
  mov    D33(%rip),%rdx
  mov    D3(%rip),%rax
  xor    %edi,%edi
  mov    D2(%rip),%rbx
  mov    (%rax),%eax
  or     (%rdx),%eax
  mov    D23(%rip),%rdx
  not    %eax
  and    %eax,(%rsp)
  mov    0x8(%rsp),%rax
  mov    (%rdx),%rdx
  movl   $0x1,(%rax,%rdx,4)
  mov    D17(%rip),%rdx
  mov    (%rdx),%rdx
  movl   $0x0,(%rax,%rdx,4)
  mov    (%rbx),%esi
  mov    %r13,%rdx
  call   <tcsetattr@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  mov    (%rbx),%esi
  xor    %edi,%edi
  mov    %r12,%rdx
  mov    %eax,%r13d
  call   <tcsetattr@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x30,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  ret
L2:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int getch(void) {
  struct termios term, oterm;
  int c = 0;
  tcgetattr(0, &oterm);
  memcpy(&term, &oterm, sizeof(term));
  term.c_lflag &= ~(ICANON | ECHO);
  term.c_cc[VMIN] = 1;
  term.c_cc[VTIME] = 0;
  tcsetattr(0, TCSANOW, &term);
  c = getchar();
  tcsetattr(0, TCSANOW, &oterm);
  return c;
}
```
user: Translate the below assembly code into C programming language:

```asm
<getch>:
  endbr64
  push   %r13
  xor    %edi,%edi
  push   %r12
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r12
  mov    %rsp,%r13
  mov    %r12,%rsi
  call   <tcgetattr@plt>
  mov    %r13,%rdi
  mov    $0x10,%edx
  mov    %r12,%rsi
  call   <memcpy@plt>
  mov    D8(%rip),%rdx
  mov    D19(%rip),%rax
  xor    %edi,%edi
  mov    D12(%rip),%rbx
  mov    (%rax),%eax
  or     (%rdx),%eax
  mov    D18(%rip),%rdx
  not    %eax
  and    %eax,(%rsp)
  mov    0x8(%rsp),%rax
  mov    (%rdx),%rdx
  movl   $0x1,(%rax,%rdx,4)
  mov    D5(%rip),%rdx
  mov    (%rdx),%rdx
  movl   $0x0,(%rax,%rdx,4)
  mov    (%rbx),%esi
  mov    %r13,%rdx
  call   <tcsetattr@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  mov    (%rbx),%esi
  xor    %edi,%edi
  mov    %r12,%rdx
  mov    %eax,%r13d
  call   <tcsetattr@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  add    $0x30,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  ret
L8:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int getch(void) {
  struct termios term, oterm;
  int c = 0;
  tcgetattr(0, &oterm);
  memcpy(&term, &oterm, sizeof(term));
  term.c_lflag &= ~(ICANON | ECHO);
  term.c_cc[VMIN] = 1;
  term.c_cc[VTIME] = 0;
  tcsetattr(0, TCSANOW, &term);
  c = getchar();
  tcsetattr(0, TCSANOW, &oterm);
  return c;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<itoa>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  movl   $0x1e,-0x4(%rbp)
  jmp    L6
L16:
  mov    -0x14(%rbp),%ecx
  movslq %ecx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  movslq %edx,%rax
  lea    D2(%rip),%rdx
  movzbl (%rax,%rdx,1),%edx
  mov    -0x4(%rbp),%eax
  cltq
  lea    D9(%rip),%rcx
  mov    %dl,(%rax,%rcx,1)
  subl   $0x1,-0x4(%rbp)
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x14(%rbp)
L6:
  cmpl   $0x0,-0x14(%rbp)
  je     L12
  cmpl   $0x0,-0x4(%rbp)
  jne    L16
L12:
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  cltq
  lea    D9(%rip),%rdx
  add    %rdx,%rax
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: data_tag: D2
datatype: string

tool: D2: 0123456789

assistant: ```c
char *itoa(int val) {
  static char buf[32] = {0};
  int i = 30;
  for (; val && i; --i, val /= 10)
    buf[i] = "0123456789"[val % 10];
  return &buf[i + 1];
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<itoa>:
  endbr64
  test   %edi,%edi
  je     L16
  mov    $0x1d,%edx
  lea    D7(%rip),%r8
  lea    D29(%rip),%rsi
L28:
  movslq %edi,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %edi,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  lea    (%rax,%rax,4),%ecx
  add    %ecx,%ecx
  sub    %ecx,%edi
  movslq %edi,%rdi
  movzbl (%rsi,%rdi,1),%ecx
  mov    %cl,(%rdx,%r8,1)
  mov    %edx,%r9d
  mov    %eax,%edi
  test   %eax,%eax
  setne  %cl
  test   %edx,%edx
  setne  %al
  sub    $0x1,%rdx
  test   %al,%cl
  jne    L28
L17:
  lea    0x1(%r9),%eax
  cltq
  lea    D13(%rip),%rdx
  add    %rdx,%rax
  ret
L16:
  mov    $0x1e,%r9d
  jmp    L17
```

tool_calls: name: disassemble_data
arguments: data_tag: D29
data_type: string

tool: D29: 0123456789

assistant: ```c
char *itoa(int val) {
  static char buf[32] = {0};
  int i = 30;
  for (; val && i; --i, val /= 10)
    buf[i] = "0123456789"[val % 10];
  return &buf[i + 1];
}
```
user: What is the c source code of the assembly code below:

```asm
<itoa>:
  endbr64
  test   %edi,%edi
  je     L21
  lea    D11(%rip),%rsi
  mov    $0x1e,%ecx
  lea    D22(%rip),%r8
  nopl   0x0(%rax,%rax,1)
L9:
  movslq %edi,%rdx
  mov    %edi,%eax
  sub    $0x1,%rsi
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%eax
  sar    $0x22,%rdx
  sub    %eax,%edx
  lea    (%rdx,%rdx,4),%eax
  add    %eax,%eax
  sub    %eax,%edi
  movslq %edi,%rdi
  movzbl (%r8,%rdi,1),%eax
  mov    %edx,%edi
  mov    %al,0x1(%rsi)
  movslq %ecx,%rax
  sub    $0x1,%ecx
  test   %edx,%edx
  je     L24
  test   %ecx,%ecx
  jne    L9
L24:
  lea    D39(%rip),%rdx
  add    %rdx,%rax
  ret
  cs nopw 0x0(%rax,%rax,1)
L21:
  lea    D39(%rip),%rdx
  mov    $0x1f,%eax
  add    %rdx,%rax
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D22
type_infered: string

tool: D22: 0123456789

assistant: ```c
char *itoa(int val) {
  static char buf[32] = {0};
  int i = 30;
  for (; val && i; --i, val /= 10)
    buf[i] = "0123456789"[val % 10];
  return &buf[i + 1];
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<itoa>:
  endbr64
  test   %edi,%edi
  je     L7
  lea    D23(%rip),%rsi
  mov    $0x1e,%ecx
  lea    D30(%rip),%r8
  nopl   0x0(%rax,%rax,1)
L25:
  movslq %edi,%rdx
  mov    %edi,%eax
  sub    $0x1,%rsi
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%eax
  sar    $0x22,%rdx
  sub    %eax,%edx
  lea    (%rdx,%rdx,4),%eax
  add    %eax,%eax
  sub    %eax,%edi
  movslq %edi,%rdi
  movzbl (%r8,%rdi,1),%eax
  mov    %edx,%edi
  mov    %al,0x1(%rsi)
  movslq %ecx,%rax
  sub    $0x1,%ecx
  test   %edx,%edx
  je     L9
  test   %ecx,%ecx
  jne    L25
L9:
  lea    D29(%rip),%rdx
  add    %rdx,%rax
  ret
  cs nopw 0x0(%rax,%rax,1)
L7:
  lea    D29(%rip),%rdx
  mov    $0x1f,%eax
  add    %rdx,%rax
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D30
data_type: string

tool: D30: 0123456789

assistant: ```c
char *itoa(int val) {
  static char buf[32] = {0};
  int i = 30;
  for (; val && i; --i, val /= 10)
    buf[i] = "0123456789"[val % 10];
  return &buf[i + 1];
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<aux_StrError>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  js     L15
  mov    -0x4(%rbp),%eax
  cmp    $0x1b,%eax
  jbe    L25
L15:
  lea    D11(%rip),%rax
  jmp    L14
L25:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  lea    D18(%rip),%rax
  mov    (%rdx,%rax,1),%rax
L14:
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D11
type_guessed: string

tool: D11: (unknown)

assistant: ```c
char *aux_StrError(int errnum) {
  static char *messages[] = {
      "(none)", "Forced exit", "Assertion failed", "Stack/heap collision (insufficient stack size)", "Array index out of bounds", "Invalid memory access", "Invalid instruction", "Stack underflow", "Heap underflow", "No (valid) native function callback", "Native function failed", "Divide by zero", "(sleep mode)", "(reserved)", "(reserved)", "(reserved)", "Out of memory", "Invalid/unsupported P-code file format", "File is for a newer version of the AMX", "File or function is not found", "Invalid index parameter (bad entry point)", "Debugger cannot run", "AMX not initialized (or doubly initialized)", "Unable to set user data field (table full)", "Cannot initialize the JIT", "Parameter error", "Domain error, expression result does not fit in range", "General error (unknown or unspecific error)",
  };
  if (errnum < 0 || errnum >= sizeof messages / sizeof messages[0])
    return "(unknown)";
  return messages[errnum];
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<aux_StrError>:
  endbr64
  lea    D12(%rip),%rax
  cmp    $0x1b,%edi
  ja     L5
  movslq %edi,%rdi
  lea    D8(%rip),%rax
  mov    (%rax,%rdi,8),%rax
L5:
  ret
```

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

tool: D12: (unknown)

assistant: ```c
char *aux_StrError(int errnum) {
  static char *messages[] = {
      "(none)", "Forced exit", "Assertion failed", "Stack/heap collision (insufficient stack size)", "Array index out of bounds", "Invalid memory access", "Invalid instruction", "Stack underflow", "Heap underflow", "No (valid) native function callback", "Native function failed", "Divide by zero", "(sleep mode)", "(reserved)", "(reserved)", "(reserved)", "Out of memory", "Invalid/unsupported P-code file format", "File is for a newer version of the AMX", "File or function is not found", "Invalid index parameter (bad entry point)", "Debugger cannot run", "AMX not initialized (or doubly initialized)", "Unable to set user data field (table full)", "Cannot initialize the JIT", "Parameter error", "Domain error, expression result does not fit in range", "General error (unknown or unspecific error)",
  };
  if (errnum < 0 || errnum >= sizeof messages / sizeof messages[0])
    return "(unknown)";
  return messages[errnum];
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<aux_StrError>:
  endbr64
  lea    D16(%rip),%rax
  cmp    $0x1b,%edi
  ja     L3
  movslq %edi,%rdi
  lea    D9(%rip),%rax
  mov    (%rax,%rdi,8),%rax
L3:
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D16
type: string

tool: D16: (unknown)

assistant: ```c
char *aux_StrError(int errnum) {
  static char *messages[] = {
      "(none)", "Forced exit", "Assertion failed", "Stack/heap collision (insufficient stack size)", "Array index out of bounds", "Invalid memory access", "Invalid instruction", "Stack underflow", "Heap underflow", "No (valid) native function callback", "Native function failed", "Divide by zero", "(sleep mode)", "(reserved)", "(reserved)", "(reserved)", "Out of memory", "Invalid/unsupported P-code file format", "File is for a newer version of the AMX", "File or function is not found", "Invalid index parameter (bad entry point)", "Debugger cannot run", "AMX not initialized (or doubly initialized)", "Unable to set user data field (table full)", "Cannot initialize the JIT", "Parameter error", "Domain error, expression result does not fit in range", "General error (unknown or unspecific error)",
  };
  if (errnum < 0 || errnum >= sizeof messages / sizeof messages[0])
    return "(unknown)";
  return messages[errnum];
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<aux_StrError>:
  endbr64
  lea    D13(%rip),%rax
  cmp    $0x1b,%edi
  ja     L3
  movslq %edi,%rdi
  lea    D14(%rip),%rax
  mov    (%rax,%rdi,8),%rax
L3:
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D13
type_infered: string

tool: D13: (unknown)

assistant: ```c
char *aux_StrError(int errnum) {
  static char *messages[] = {
      "(none)", "Forced exit", "Assertion failed", "Stack/heap collision (insufficient stack size)", "Array index out of bounds", "Invalid memory access", "Invalid instruction", "Stack underflow", "Heap underflow", "No (valid) native function callback", "Native function failed", "Divide by zero", "(sleep mode)", "(reserved)", "(reserved)", "(reserved)", "Out of memory", "Invalid/unsupported P-code file format", "File is for a newer version of the AMX", "File or function is not found", "Invalid index parameter (bad entry point)", "Debugger cannot run", "AMX not initialized (or doubly initialized)", "Unable to set user data field (table full)", "Cannot initialize the JIT", "Parameter error", "Domain error, expression result does not fit in range", "General error (unknown or unspecific error)",
  };
  if (errnum < 0 || errnum >= sizeof messages / sizeof messages[0])
    return "(unknown)";
  return messages[errnum];
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<IsPrime>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  movq   $0x2,-0x8(%rbp)
  jmp    L38
L0:
  mov    -0x18(%rbp),%rax
  cqto
  idivq  -0x8(%rbp)
  mov    %rdx,%rax
  test   %rax,%rax
  jne    L5
  mov    -0x8(%rbp),%rax
  mov    %rax,%rsi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L33
L5:
  addq   $0x1,-0x8(%rbp)
L38:
  mov    -0x8(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  jl     L0
  mov    $0x1,%eax
L33:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D6
data_type: string

tool: D6: Divisible by: %ld


assistant: ```c
bool IsPrime(long int n) {
  for (long int i = 2; i < n; i++) {
    if (n % i == 0) {
      printf("Divisible by: %ld\n", i);
      return false;
    }
  }
  return true;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<IsPrime>:
  endbr64
  cmp    $0x2,%rdi
  jle    L18
  test   $0x1,%dil
  je     L44
  mov    $0x2,%esi
L46:
  add    $0x1,%rsi
  cmp    %rsi,%rdi
  je     L33
  mov    %rdi,%rax
  cqto
  idiv   %rsi
  test   %rdx,%rdx
  jne    L46
L15:
  sub    $0x8,%rsp
  lea    D0(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  ret
L44:
  mov    $0x2,%esi
  jmp    L15
L33:
  mov    $0x1,%eax
  ret
L18:
  mov    $0x1,%eax
  ret
```

tool_calls: name: read_data
arguments: data_label: D0
datatype: string

tool: D0: Divisible by: %ld


assistant: ```c
bool IsPrime(long int n) {
  for (long int i = 2; i < n; i++) {
    if (n % i == 0) {
      printf("Divisible by: %ld\n", i);
      return false;
    }
  }
  return true;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<IsPrime>:
  endbr64
  cmp    $0x2,%rdi
  jle    L7
  mov    $0x2,%esi
  test   $0x1,%dil
  jne    L29
  jmp    L36
  nopw   0x0(%rax,%rax,1)
L45:
  mov    %rdi,%rax
  cqto
  idiv   %rsi
  test   %rdx,%rdx
  je     L36
L29:
  add    $0x1,%rsi
  cmp    %rsi,%rdi
  jne    L45
L7:
  mov    $0x1,%eax
  ret
  nopl   0x0(%rax)
L36:
  sub    $0x8,%rsp
  lea    D0(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: read_data
arguments: label: D0
type: string

tool: D0: Divisible by: %ld


assistant: ```c
bool IsPrime(long int n) {
  for (long int i = 2; i < n; i++) {
    if (n % i == 0) {
      printf("Divisible by: %ld\n", i);
      return false;
    }
  }
  return true;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<IsPrime>:
  endbr64
  cmp    $0x2,%rdi
  jle    L33
  mov    $0x2,%esi
  test   $0x1,%dil
  jne    L25
  jmp    L42
  nopw   0x0(%rax,%rax,1)
L30:
  mov    %rdi,%rax
  cqto
  idiv   %rsi
  test   %rdx,%rdx
  je     L42
L25:
  add    $0x1,%rsi
  cmp    %rsi,%rdi
  jne    L30
L33:
  mov    $0x1,%eax
  ret
  nopl   0x0(%rax)
L42:
  sub    $0x8,%rsp
  lea    D0(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: unpack_data
arguments: label: D0
data_type: string

tool: D0: Divisible by: %ld


assistant: ```c
bool IsPrime(long int n) {
  for (long int i = 2; i < n; i++) {
    if (n % i == 0) {
      printf("Divisible by: %ld\n", i);
      return false;
    }
  }
  return true;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<get_and_skip_word>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x28(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <skip_space@plt>
  mov    %rax,-0x18(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L17
L15:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x5(%rbp)
  cmpb   $0x20,-0x5(%rbp)
  je     L49
  cmpb   $0x9,-0x5(%rbp)
  je     L49
  cmpb   $0x0,-0x5(%rbp)
  je     L49
  cmpb   $0xd,-0x5(%rbp)
  je     L49
  cmpb   $0xa,-0x5(%rbp)
  jne    L52
L49:
  mov    -0x20(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x28(%rbp),%rax
  movl   $0x1,(%rax)
  mov    -0x18(%rbp),%rax
  jmp    L36
L52:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl -0x5(%rbp),%edx
  mov    %dl,(%rax)
  addq   $0x1,-0x18(%rbp)
  addl   $0x1,-0x4(%rbp)
L17:
  cmpl   $0x7,-0x4(%rbp)
  jle    L15
  mov    -0x20(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
L36:
  leave
  ret
```

assistant: ```c
unsigned char *get_and_skip_word(unsigned char *ptr, unsigned char *pword, unsigned int *presult) {
  int i;
  unsigned char c;
  *presult = 0;
  *presult = 0;
  ptr = skip_space(ptr);
  for (i = 0; i < 8; i++) {
    c = *ptr;
    if (c == ' ' || c == 9 || c == 0 || c == 0xd || c == 0xa) {
      *pword = 0;
      *presult = 1;
      return ptr;
    }
    *pword++ = c;
    ptr++;
  }
  *pword = 0;
  return ptr;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<get_and_skip_word>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rsi,%rbx
  mov    %rdx,%rbp
  movl   $0x0,(%rdx)
  call   <skip_space@plt>
  lea    0x8(%rax),%rcx
  mov    $0x2401,%esi
  jmp    L15
L4:
  add    $0x1,%rbx
  mov    %dl,-0x1(%rbx)
  add    $0x1,%rax
  cmp    %rax,%rcx
  je     L50
L15:
  movzbl (%rax),%edx
  cmp    $0x20,%dl
  je     L25
  cmp    $0x9,%dl
  je     L25
  cmp    $0xd,%dl
  ja     L4
  bt     %rdx,%rsi
  jae    L4
L25:
  movb   $0x0,(%rbx)
  movl   $0x1,0x0(%rbp)
  jmp    L56
L50:
  movb   $0x0,(%rbx)
L56:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
unsigned char *get_and_skip_word(unsigned char *ptr, unsigned char *pword, unsigned int *presult) {
  int i;
  unsigned char c;
  *presult = 0;
  *presult = 0;
  ptr = skip_space(ptr);
  for (i = 0; i < 8; i++) {
    c = *ptr;
    if (c == ' ' || c == 9 || c == 0 || c == 0xd || c == 0xa) {
      *pword = 0;
      *presult = 1;
      return ptr;
    }
    *pword++ = c;
    ptr++;
  }
  *pword = 0;
  return ptr;
}
```
user: What is the c source code of the assembly code below?

```asm
<get_and_skip_word>:
  endbr64
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x8,%rsp
  movl   $0x0,(%rdx)
  call   <skip_space@plt>
  mov    $0x2401,%edi
  lea    0x8(%rax),%rsi
  jmp    L9
  cs nopw 0x0(%rax,%rax,1)
L42:
  add    $0x1,%rax
  add    $0x1,%rbx
  mov    %cl,-0x1(%rbx)
  cmp    %rax,%rsi
  je     L3
L9:
  movzbl (%rax),%ecx
  cmp    $0x20,%cl
  je     L17
  cmp    $0x9,%cl
  je     L17
  cmp    $0xd,%cl
  ja     L42
  bt     %rcx,%rdi
  jae    L42
L17:
  movb   $0x0,(%rbx)
  movl   $0x1,0x0(%rbp)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L3:
  movb   $0x0,(%rbx)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
unsigned char *get_and_skip_word(unsigned char *ptr, unsigned char *pword, unsigned int *presult) {
  int i;
  unsigned char c;
  *presult = 0;
  *presult = 0;
  ptr = skip_space(ptr);
  for (i = 0; i < 8; i++) {
    c = *ptr;
    if (c == ' ' || c == 9 || c == 0 || c == 0xd || c == 0xa) {
      *pword = 0;
      *presult = 1;
      return ptr;
    }
    *pword++ = c;
    ptr++;
  }
  *pword = 0;
  return ptr;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<get_and_skip_word>:
  endbr64
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x8,%rsp
  movl   $0x0,(%rdx)
  call   <skip_space@plt>
  movzbl (%rax),%edx
  cmp    $0x9,%dl
  je     L133
  cmp    $0x20,%dl
  je     L133
  cmp    $0xd,%dl
  ja     L274
  mov    $0x2401,%ecx
  bt     %rdx,%rcx
  jb     L133
L274:
  mov    %dl,(%rbx)
  movzbl 0x1(%rax),%edx
  lea    0x1(%rbx),%rdi
  lea    0x1(%rax),%rsi
  cmp    $0x20,%dl
  je     L77
  cmp    $0x9,%dl
  je     L77
  cmp    $0xd,%dl
  ja     L147
  mov    $0x2401,%ecx
  bt     %rdx,%rcx
  jb     L77
L147:
  mov    %dl,0x1(%rbx)
  movzbl 0x2(%rax),%edx
  lea    0x2(%rbx),%rdi
  lea    0x2(%rax),%rsi
  cmp    $0x20,%dl
  je     L77
  cmp    $0x9,%dl
  je     L77
  cmp    $0xd,%dl
  ja     L238
  mov    $0x2401,%ecx
  bt     %rdx,%rcx
  jb     L77
L238:
  mov    %dl,0x2(%rbx)
  movzbl 0x3(%rax),%edx
  lea    0x3(%rbx),%rdi
  lea    0x3(%rax),%rsi
  cmp    $0x20,%dl
  je     L77
  cmp    $0x9,%dl
  je     L77
  cmp    $0xd,%dl
  ja     L263
  mov    $0x2401,%ecx
  bt     %rdx,%rcx
  jb     L77
L263:
  mov    %dl,0x3(%rbx)
  movzbl 0x4(%rax),%edx
  lea    0x4(%rbx),%rdi
  lea    0x4(%rax),%rsi
  cmp    $0x20,%dl
  je     L77
  cmp    $0x9,%dl
  je     L77
  cmp    $0xd,%dl
  ja     L67
  mov    $0x2401,%ecx
  bt     %rdx,%rcx
  jb     L77
L67:
  mov    %dl,0x4(%rbx)
  movzbl 0x5(%rax),%edx
  lea    0x5(%rbx),%rdi
  lea    0x5(%rax),%rsi
  cmp    $0x20,%dl
  je     L77
  cmp    $0x9,%dl
  je     L77
  cmp    $0xd,%dl
  ja     L153
  mov    $0x2401,%ecx
  bt     %rdx,%rcx
  jb     L77
L153:
  mov    %dl,0x5(%rbx)
  movzbl 0x6(%rax),%edx
  lea    0x6(%rbx),%rdi
  lea    0x6(%rax),%rsi
  cmp    $0x20,%dl
  je     L77
  cmp    $0x9,%dl
  je     L77
  cmp    $0xd,%dl
  ja     L175
  mov    $0x2401,%ecx
  bt     %rdx,%rcx
  jb     L77
L175:
  mov    %dl,0x6(%rbx)
  movzbl 0x7(%rax),%edx
  lea    0x7(%rbx),%rdi
  lea    0x7(%rax),%rsi
  cmp    $0x20,%dl
  je     L77
  cmp    $0x9,%dl
  je     L77
  cmp    $0xd,%dl
  ja     L248
  mov    $0x2401,%ecx
  bt     %rdx,%rcx
  jb     L77
L248:
  mov    %dl,0x7(%rbx)
  add    $0x8,%rax
  movb   $0x0,0x8(%rbx)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L77:
  mov    %rdi,%rbx
  mov    %rsi,%rax
L133:
  movb   $0x0,(%rbx)
  movl   $0x1,0x0(%rbp)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
unsigned char *get_and_skip_word(unsigned char *ptr, unsigned char *pword, unsigned int *presult) {
  int i;
  unsigned char c;
  *presult = 0;
  *presult = 0;
  ptr = skip_space(ptr);
  for (i = 0; i < 8; i++) {
    c = *ptr;
    if (c == ' ' || c == 9 || c == 0 || c == 0xd || c == 0xa) {
      *pword = 0;
      *presult = 1;
      return ptr;
    }
    *pword++ = c;
    ptr++;
  }
  *pword = 0;
  return ptr;
}
```