ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Demonstrate the C code that generates the assembly output below:

```asm
<next_c_matches>:
  endbr64
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  call   <next_c@plt>
  mov    %rbp,%rsi
  movsbl %al,%edi
  mov    %edi,%ebx
  call   <ungetc@plt>
  xor    %eax,%eax
  cmp    %r12b,%bl
  pop    %rbx
  sete   %al
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
bool next_c_matches(FILE *scene_file, char c) {
  ((void)0);
  char d = next_c(scene_file);
  ungetc(d, scene_file);
  if (c == d)
    return true;
  else
    return false;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<next_c_matches>:
  endbr64
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  call   <next_c@plt>
  mov    %rbp,%rsi
  movsbl %al,%edi
  mov    %edi,%ebx
  call   <ungetc@plt>
  xor    %eax,%eax
  cmp    %r12b,%bl
  pop    %rbx
  sete   %al
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
bool next_c_matches(FILE *scene_file, char c) {
  ((void)0);
  char d = next_c(scene_file);
  ungetc(d, scene_file);
  if (c == d)
    return true;
  else
    return false;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<psycho_1_fft>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <fht@plt>
  mov    -0x28(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x28(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  movl   $0x1,-0x18(%rbp)
  mov    -0x34(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L17
L2:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x8(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  D3(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x18(%rbp)
  subl   $0x1,-0x14(%rbp)
L17:
  mov    -0x34(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0x18(%rbp)
  jl     L2
  mov    -0x34(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x34(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x34(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D3
data_type: f64

tool: D3: 2

assistant: ```c
void psycho_1_fft(double *x_real, double *energy, int N) {
  double a, b;
  int i, j;
  fht(x_real);
  energy[0] = x_real[0] * x_real[0];
  for (i = 1, j = N - 1; i < N / 2; i++, j--) {
    a = x_real[i];
    b = x_real[j];
    energy[i] = (a * a + b * b) / 2.0;
  }
  energy[N / 2] = x_real[N / 2] * x_real[N / 2];
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<psycho_1_fft>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    %edx,%r12d
  call   <fht@plt>
  movsd  (%rbx),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,0x0(%rbp)
  mov    %r12d,%ecx
  shr    $0x1f,%ecx
  add    %r12d,%ecx
  sar    %ecx
  cmp    $0x3,%r12d
  jle    L10
  lea    -0x1(%r12),%eax
  cltq
  lea    (%rbx,%rax,8),%rdx
  mov    $0x1,%eax
  movsd  D6(%rip),%xmm2
L3:
  movsd  (%rbx,%rax,8),%xmm0
  movsd  (%rdx),%xmm1
  mulsd  %xmm0,%xmm0
  mulsd  %xmm1,%xmm1
  addsd  %xmm1,%xmm0
  mulsd  %xmm2,%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  sub    $0x8,%rdx
  cmp    %eax,%ecx
  jg     L3
L10:
  movslq %ecx,%rcx
  movsd  (%rbx,%rcx,8),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,0x0(%rbp,%rcx,8)
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: parse_data
arguments: data_label: D6
type: byte[8]

tool: {"D6": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

assistant: ```c
void psycho_1_fft(double *x_real, double *energy, int N) {
  double a, b;
  int i, j;
  fht(x_real);
  energy[0] = x_real[0] * x_real[0];
  for (i = 1, j = N - 1; i < N / 2; i++, j--) {
    a = x_real[i];
    b = x_real[j];
    energy[i] = (a * a + b * b) / 2.0;
  }
  energy[N / 2] = x_real[N / 2] * x_real[N / 2];
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<psycho_1_fft>:
  endbr64
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  call   <fht@plt>
  movsd  (%rbx),%xmm0
  mov    %r12d,%ecx
  shr    $0x1f,%ecx
  mulsd  %xmm0,%xmm0
  add    %r12d,%ecx
  sar    %ecx
  movsd  %xmm0,0x0(%rbp)
  cmp    $0x3,%r12d
  jle    L3
  lea    -0x1(%r12),%eax
  movsd  D2(%rip),%xmm2
  cltq
  lea    (%rbx,%rax,8),%rdx
  mov    $0x1,%eax
  nopl   0x0(%rax)
L13:
  movsd  (%rbx,%rax,8),%xmm0
  movsd  (%rdx),%xmm1
  sub    $0x8,%rdx
  mulsd  %xmm0,%xmm0
  mulsd  %xmm1,%xmm1
  addsd  %xmm1,%xmm0
  mulsd  %xmm2,%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%ecx
  jg     L13
L3:
  movslq %ecx,%rcx
  movsd  (%rbx,%rcx,8),%xmm0
  pop    %rbx
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,0x0(%rbp,%rcx,8)
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D2
data_type: byte[8]

tool: {"D2": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

assistant: ```c
void psycho_1_fft(double *x_real, double *energy, int N) {
  double a, b;
  int i, j;
  fht(x_real);
  energy[0] = x_real[0] * x_real[0];
  for (i = 1, j = N - 1; i < N / 2; i++, j--) {
    a = x_real[i];
    b = x_real[j];
    energy[i] = (a * a + b * b) / 2.0;
  }
  energy[N / 2] = x_real[N / 2] * x_real[N / 2];
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<psycho_1_fft>:
  endbr64
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  call   <fht@plt>
  movsd  (%rbx),%xmm0
  mov    %r12d,%ecx
  shr    $0x1f,%ecx
  mulsd  %xmm0,%xmm0
  add    %r12d,%ecx
  sar    %ecx
  movsd  %xmm0,0x0(%rbp)
  cmp    $0x3,%r12d
  jle    L23
  lea    -0x1(%rcx),%edi
  movslq %r12d,%rax
  lea    0x8(%rbp),%r8
  mov    %rdi,%rsi
  shl    $0x3,%rax
  mov    %rdi,%r9
  lea    0x8(%rbp,%rdi,8),%rdi
  neg    %rsi
  lea    -0x1(%r12),%edx
  lea    (%rax,%rsi,8),%rsi
  add    %rbx,%rsi
  cmp    %rdi,%rsi
  lea    (%rbx,%rax,1),%rdi
  setae  %sil
  cmp    %rdi,%r8
  setae  %dil
  or     %dil,%sil
  je     L40
  lea    0x10(%rbx),%rsi
  cmp    %rsi,%r8
  setne  %dil
  cmp    $0x5,%r12d
  setg   %sil
  test   %sil,%dil
  je     L40
  lea    -0x10(%rbx,%rax,1),%r8
  mov    %r9d,%eax
  movapd D18(%rip),%xmm2
  shr    %eax
  lea    -0x1(%rax),%edi
  mov    $0x8,%eax
  shl    $0x4,%rdi
  add    $0x18,%rdi
  nopl   0x0(%rax)
L28:
  mov    %rax,%rsi
  movupd (%rbx,%rax,1),%xmm0
  neg    %rsi
  movupd 0x8(%r8,%rsi,1),%xmm1
  mulpd  %xmm0,%xmm0
  shufpd $0x1,%xmm1,%xmm1
  mulpd  %xmm1,%xmm1
  addpd  %xmm1,%xmm0
  mulpd  %xmm2,%xmm0
  movups %xmm0,0x0(%rbp,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdi
  jne    L28
  mov    %r9d,%esi
  mov    %r9d,%eax
  and    $0xfffffffe,%esi
  or     $0x1,%eax
  sub    %esi,%edx
  cmp    %esi,%r9d
  je     L23
  cltq
  movslq %edx,%rdx
  movsd  (%rbx,%rax,8),%xmm0
  movsd  (%rbx,%rdx,8),%xmm1
  mulsd  %xmm0,%xmm0
  mulsd  %xmm1,%xmm1
  addsd  %xmm1,%xmm0
  mulsd  D18(%rip),%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
L23:
  movslq %ecx,%rcx
  movsd  (%rbx,%rcx,8),%xmm0
  pop    %rbx
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,0x0(%rbp,%rcx,8)
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L40:
  movslq %edx,%rdx
  movsd  D18(%rip),%xmm2
  mov    $0x1,%eax
  lea    (%rbx,%rdx,8),%rdx
  nopl   0x0(%rax)
L55:
  movsd  (%rbx,%rax,8),%xmm0
  movsd  (%rdx),%xmm1
  sub    $0x8,%rdx
  mulsd  %xmm0,%xmm0
  mulsd  %xmm1,%xmm1
  addsd  %xmm1,%xmm0
  mulsd  %xmm2,%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%ecx
  jg     L55
  jmp    L23
```

tool_calls: name: disassemble_data
arguments: label: D18
datatype: byte[16]

tool: {"D18": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

assistant: ```c
void psycho_1_fft(double *x_real, double *energy, int N) {
  double a, b;
  int i, j;
  fht(x_real);
  energy[0] = x_real[0] * x_real[0];
  for (i = 1, j = N - 1; i < N / 2; i++, j--) {
    a = x_real[i];
    b = x_real[j];
    energy[i] = (a * a + b * b) / 2.0;
  }
  energy[N / 2] = x_real[N / 2] * x_real[N / 2];
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  movl   $0x0,-0x4(%rbp)
  mov    $0x0,%eax
  call   <_ctype@plt>
  or     %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  jne    L18
  mov    $0x0,%eax
  jmp    L9
L18:
  mov    $0x2,%eax
L9:
  leave
  ret
```

assistant: ```c
int main(int argc, char *argv[]) {
  int ret = 0;
  (void)argc;
  ret |= _ctype();
  return (ret == 0) ? 0 : 2;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <_ctype@plt>
  test   %eax,%eax
  setne  %al
  movzbl %al,%eax
  add    %eax,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int main(int argc, char *argv[]) {
  int ret = 0;
  (void)argc;
  ret |= _ctype();
  return (ret == 0) ? 0 : 2;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <_ctype@plt>
  test   %eax,%eax
  setne  %al
  add    $0x8,%rsp
  movzbl %al,%eax
  add    %eax,%eax
  ret
```

assistant: ```c
int main(int argc, char *argv[]) {
  int ret = 0;
  (void)argc;
  ret |= _ctype();
  return (ret == 0) ? 0 : 2;
}
```
user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <_ctype@plt>
  test   %eax,%eax
  setne  %al
  add    $0x8,%rsp
  movzbl %al,%eax
  add    %eax,%eax
  ret
```

assistant: ```c
int main(int argc, char *argv[]) {
  int ret = 0;
  (void)argc;
  ret |= _ctype();
  return (ret == 0) ? 0 : 2;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<uninitvar_fprintf>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x10(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x34(%rbp),%edx
  mov    -0x30(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x34(%rbp),%edx
  mov    -0x8(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x1c(%rbp),%edx
  mov    -0x30(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x34(%rbp),%edx
  mov    -0x30(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  nop
  leave
  ret
```

assistant: ```c
void uninitvar_fprintf(FILE *Stream, char *Format, int Argument) {
  FILE *stream;
  char *format1, *format2;
  int argument1, argument2;
  (void)fprintf(stream, format1, argument1);
  (void)fprintf(stream, Format, Argument);
  (void)fprintf(Stream, format2, Argument);
  (void)fprintf(Stream, Format, argument2);
  (void)fprintf(Stream, Format, Argument);
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<uninitvar_fprintf>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    %edx,%r12d
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x0,%r13d
  mov    %r13,%rdi
  call   <fprintf@plt>
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <fprintf@plt>
  mov    %r12d,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <fprintf@plt>
  mov    $0x0,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <fprintf@plt>
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <fprintf@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
void uninitvar_fprintf(FILE *Stream, char *Format, int Argument) {
  FILE *stream;
  char *format1, *format2;
  int argument1, argument2;
  (void)fprintf(stream, format1, argument1);
  (void)fprintf(stream, Format, Argument);
  (void)fprintf(Stream, format2, Argument);
  (void)fprintf(Stream, Format, argument2);
  (void)fprintf(Stream, Format, Argument);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<uninitvar_fprintf>:
  endbr64
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  mov    %edx,%r13d
  xor    %edx,%edx
  push   %r12
  mov    %rsi,%r12
  xor    %esi,%esi
  push   %rbp
  mov    %rdi,%rbp
  mov    %r14,%rdi
  sub    $0x8,%rsp
  call   <fprintf@plt>
  mov    %r13d,%edx
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <fprintf@plt>
  mov    %r13d,%edx
  mov    %rbp,%rdi
  xor    %esi,%esi
  call   <fprintf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  xor    %edx,%edx
  call   <fprintf@plt>
  add    $0x8,%rsp
  mov    %r13d,%edx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1050 <fprintf@plt>
```

assistant: ```c
void uninitvar_fprintf(FILE *Stream, char *Format, int Argument) {
  FILE *stream;
  char *format1, *format2;
  int argument1, argument2;
  (void)fprintf(stream, format1, argument1);
  (void)fprintf(stream, Format, Argument);
  (void)fprintf(Stream, format2, Argument);
  (void)fprintf(Stream, Format, argument2);
  (void)fprintf(Stream, Format, Argument);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<uninitvar_fprintf>:
  endbr64
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  mov    %edx,%r13d
  xor    %edx,%edx
  push   %r12
  mov    %rsi,%r12
  xor    %esi,%esi
  push   %rbp
  mov    %rdi,%rbp
  mov    %r14,%rdi
  sub    $0x8,%rsp
  call   <fprintf@plt>
  mov    %r13d,%edx
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <fprintf@plt>
  mov    %r13d,%edx
  mov    %rbp,%rdi
  xor    %esi,%esi
  call   <fprintf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  xor    %edx,%edx
  call   <fprintf@plt>
  add    $0x8,%rsp
  mov    %r13d,%edx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1050 <fprintf@plt>
```

assistant: ```c
void uninitvar_fprintf(FILE *Stream, char *Format, int Argument) {
  FILE *stream;
  char *format1, *format2;
  int argument1, argument2;
  (void)fprintf(stream, format1, argument1);
  (void)fprintf(stream, Format, Argument);
  (void)fprintf(Stream, format2, Argument);
  (void)fprintf(Stream, Format, argument2);
  (void)fprintf(Stream, Format, Argument);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<get_token_from_string>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%eax
  mov    %al,-0x2c(%rbp)
  mov    -0x28(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x5(%rbp)
  cmpb   $0x0,-0x5(%rbp)
  jne    L147
  mov    $0x0,%eax
  jmp    L118
L147:
  movzbl -0x5(%rbp),%eax
  cmp    -0x2c(%rbp),%al
  jne    L0
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
  jmp    L118
L2:
  cmpb   $0x0,-0x5(%rbp)
  jne    L43
  mov    $0x0,%eax
  jmp    L118
L43:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x5(%rbp)
L0:
  cmpb   $0xa,-0x5(%rbp)
  je     L2
  cmpb   $0xd,-0x5(%rbp)
  je     L2
  cmpb   $0x9,-0x5(%rbp)
  je     L2
  movl   $0x0,-0x4(%rbp)
  jmp    L26
L108:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x5(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x5(%rbp)
  addl   $0x1,-0x4(%rbp)
L26:
  movzbl -0x5(%rbp),%eax
  cmp    -0x2c(%rbp),%al
  je     L95
  cmpb   $0xa,-0x5(%rbp)
  je     L95
  cmpb   $0xd,-0x5(%rbp)
  je     L95
  cmpb   $0x9,-0x5(%rbp)
  je     L95
  cmpb   $0x0,-0x5(%rbp)
  jne    L108
L95:
  movzbl -0x5(%rbp),%eax
  cmp    -0x2c(%rbp),%al
  jne    L134
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,(%rax)
L134:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x4(%rbp),%eax
L118:
  pop    %rbp
  ret
```

assistant: ```c
int get_token_from_string(char *str, int *index, char *buff, char d) {
  char c;
  int i;
  buff[0] = '\0';
  c = str[(*index)];
  if (c == '\0')
    return 0;
  if (c == d) {
    (*index)++;
    return 0;
  }
  while (c == '\n' || c == '\r' || c == '\t') {
    if (c == '\0')
      return 0;
    c = str[++(*index)];
  }
  for (i = 0; c != d && c != '\n' && c != '\r' && c != '\t' && c != '\0'; i++) {
    buff[i] = c;
    c = str[++(*index)];
  }
  if (c == d)
    (*index)++;
  buff[i] = '\0';
  return i;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<get_token_from_string>:
  endbr64
  mov    %rdx,%r8
  mov    %ecx,%r11d
  movb   $0x0,(%rdx)
  mov    (%rsi),%edx
  movslq %edx,%rax
  movzbl (%rdi,%rax,1),%eax
  mov    $0x0,%r9d
  test   %al,%al
  je     L130
  cmp    %cl,%al
  je     L196
  lea    -0x9(%rax),%edx
  cmp    $0x1,%dl
  jbe    L142
  cmp    $0xd,%al
  je     L142
  jmp    L139
L196:
  add    $0x1,%edx
  mov    %edx,(%rsi)
  mov    $0x0,%r9d
  jmp    L130
L10:
  test   %al,%al
  je     L159
L142:
  mov    (%rsi),%eax
  add    $0x1,%eax
  mov    %eax,(%rsi)
  cltq
  movzbl (%rdi,%rax,1),%eax
  lea    -0x9(%rax),%edx
  cmp    $0x1,%dl
  jbe    L10
  cmp    $0xd,%al
  je     L10
  cmp    %al,%cl
  je     L50
L139:
  mov    %eax,%edx
  and    $0xfffffffb,%edx
  cmp    $0x9,%dl
  je     L96
  test   %al,%al
  je     L96
  mov    $0x1,%edx
L59:
  mov    %al,-0x1(%r8,%rdx,1)
  mov    (%rsi),%eax
  add    $0x1,%eax
  mov    %eax,(%rsi)
  cltq
  movzbl (%rdi,%rax,1),%eax
  mov    %edx,%r9d
  cmp    %al,%r11b
  je     L61
  cmp    $0xa,%al
  je     L61
  add    $0x1,%rdx
  mov    %eax,%r10d
  and    $0xfffffffb,%r10d
  cmp    $0x9,%r10b
  je     L188
  test   %al,%al
  jne    L59
  jmp    L188
L50:
  mov    $0x0,%r9d
L61:
  cmp    %al,%cl
  jne    L188
  addl   $0x1,(%rsi)
L188:
  movslq %r9d,%rax
  movb   $0x0,(%r8,%rax,1)
  jmp    L130
L159:
  mov    $0x0,%r9d
L130:
  mov    %r9d,%eax
  ret
L96:
  mov    $0x0,%r9d
  jmp    L188
```

assistant: ```c
int get_token_from_string(char *str, int *index, char *buff, char d) {
  char c;
  int i;
  buff[0] = '\0';
  c = str[(*index)];
  if (c == '\0')
    return 0;
  if (c == d) {
    (*index)++;
    return 0;
  }
  while (c == '\n' || c == '\r' || c == '\t') {
    if (c == '\0')
      return 0;
    c = str[++(*index)];
  }
  for (i = 0; c != d && c != '\n' && c != '\r' && c != '\t' && c != '\0'; i++) {
    buff[i] = c;
    c = str[++(*index)];
  }
  if (c == d)
    (*index)++;
  buff[i] = '\0';
  return i;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<get_token_from_string>:
  endbr64
  movb   $0x0,(%rdx)
  movslq (%rsi),%rax
  mov    %rdx,%r8
  mov    %ecx,%r10d
  mov    %ecx,%r11d
  xor    %r9d,%r9d
  mov    %rax,%rdx
  movzbl (%rdi,%rax,1),%eax
  test   %al,%al
  je     L76
  cmp    %cl,%al
  je     L118
  lea    -0x9(%rax),%ecx
  cmp    $0x1,%cl
  jbe    L20
  cmp    $0xd,%al
  jne    L116
L20:
  add    $0x1,%edx
  movslq %edx,%rdx
  nopl   0x0(%rax,%rax,1)
L39:
  mov    %edx,(%rsi)
  movzbl (%rdi,%rdx,1),%eax
  add    $0x1,%rdx
  lea    -0x9(%rax),%ecx
  cmp    $0x1,%cl
  jbe    L39
  cmp    $0xd,%al
  je     L39
  xor    %r9d,%r9d
  cmp    %al,%r10b
  je     L50
  test   %al,%al
  je     L14
L72:
  mov    $0x1,%edx
  jmp    L164
  nopl   (%rax)
L49:
  add    $0x1,%rdx
  test   %al,%al
  je     L140
L164:
  mov    %al,-0x1(%r8,%rdx,1)
  mov    (%rsi),%eax
  mov    %edx,%r9d
  add    $0x1,%eax
  mov    %eax,(%rsi)
  cltq
  movzbl (%rdi,%rax,1),%eax
  cmp    %al,%r11b
  je     L140
  cmp    $0xa,%al
  je     L140
  mov    %eax,%ecx
  and    $0xfffffffb,%ecx
  cmp    $0x9,%cl
  jne    L49
  movslq %edx,%rax
  add    %rax,%r8
L38:
  movb   $0x0,(%r8)
L76:
  mov    %r9d,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L140:
  movslq %r9d,%rdx
  add    %rdx,%r8
L128:
  cmp    %r10b,%al
  jne    L38
L50:
  addl   $0x1,(%rsi)
  movb   $0x0,(%r8)
  jmp    L76
  nopl   0x0(%rax)
L118:
  add    $0x1,%edx
  mov    %r9d,%eax
  mov    %edx,(%rsi)
  ret
L116:
  mov    %eax,%edx
  and    $0xfffffffb,%edx
  cmp    $0x9,%dl
  je     L38
  jmp    L72
L14:
  xor    %r9d,%r9d
  jmp    L128
```

assistant: ```c
int get_token_from_string(char *str, int *index, char *buff, char d) {
  char c;
  int i;
  buff[0] = '\0';
  c = str[(*index)];
  if (c == '\0')
    return 0;
  if (c == d) {
    (*index)++;
    return 0;
  }
  while (c == '\n' || c == '\r' || c == '\t') {
    if (c == '\0')
      return 0;
    c = str[++(*index)];
  }
  for (i = 0; c != d && c != '\n' && c != '\r' && c != '\t' && c != '\0'; i++) {
    buff[i] = c;
    c = str[++(*index)];
  }
  if (c == d)
    (*index)++;
  buff[i] = '\0';
  return i;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<get_token_from_string>:
  endbr64
  movb   $0x0,(%rdx)
  movslq (%rsi),%rax
  mov    %rdx,%r9
  xor    %r10d,%r10d
  mov    %rax,%rdx
  movzbl (%rdi,%rax,1),%eax
  test   %al,%al
  je     L95
  mov    %ecx,%r11d
  cmp    %cl,%al
  je     L100
  push   %rbx
  mov    %ecx,%ebx
  lea    -0x9(%rax),%ecx
  mov    %rdi,%r8
  cmp    $0x1,%cl
  jbe    L140
  cmp    $0xd,%al
  jne    L14
L140:
  add    $0x1,%edx
  movslq %edx,%rdx
  cs nopw 0x0(%rax,%rax,1)
L157:
  mov    %edx,(%rsi)
  movzbl (%r8,%rdx,1),%eax
  mov    %edx,%ecx
  add    $0x1,%rdx
  lea    -0x9(%rax),%edi
  cmp    $0x1,%dil
  jbe    L157
  cmp    $0xd,%al
  je     L157
  xor    %r10d,%r10d
  cmp    %al,%r11b
  je     L48
  test   %al,%al
  je     L155
L108:
  mov    $0x1,%edx
  jmp    L80
  nopl   0x0(%rax)
L162:
  add    $0x1,%rdx
  test   %al,%al
  je     L12
L80:
  mov    %al,-0x1(%r9,%rdx,1)
  mov    (%rsi),%eax
  mov    %edx,%r10d
  lea    0x1(%rax),%ecx
  movslq %ecx,%rax
  mov    %ecx,(%rsi)
  movzbl (%r8,%rax,1),%eax
  cmp    %al,%bl
  je     L12
  cmp    $0xa,%al
  je     L12
  mov    %eax,%edi
  and    $0xfffffffb,%edi
  cmp    $0x9,%dil
  jne    L162
  movslq %edx,%rax
  add    %rax,%r9
L105:
  mov    %r10d,%eax
  movb   $0x0,(%r9)
  pop    %rbx
  ret
  nopl   0x0(%rax)
L12:
  movslq %r10d,%rdx
  add    %rdx,%r9
L37:
  cmp    %r11b,%al
  jne    L105
L48:
  add    $0x1,%ecx
  mov    %r10d,%eax
  pop    %rbx
  mov    %ecx,(%rsi)
  movb   $0x0,(%r9)
  ret
  nopl   0x0(%rax)
L100:
  add    $0x1,%edx
  mov    %edx,(%rsi)
L95:
  mov    %r10d,%eax
  ret
L14:
  mov    %eax,%edx
  and    $0xfffffffb,%edx
  cmp    $0x9,%dl
  je     L105
  jmp    L108
L155:
  xor    %r10d,%r10d
  jmp    L37
```

assistant: ```c
int get_token_from_string(char *str, int *index, char *buff, char d) {
  char c;
  int i;
  buff[0] = '\0';
  c = str[(*index)];
  if (c == '\0')
    return 0;
  if (c == d) {
    (*index)++;
    return 0;
  }
  while (c == '\n' || c == '\r' || c == '\t') {
    if (c == '\0')
      return 0;
    c = str[++(*index)];
  }
  for (i = 0; c != d && c != '\n' && c != '\r' && c != '\t' && c != '\0'; i++) {
    buff[i] = c;
    c = str[++(*index)];
  }
  if (c == d)
    (*index)++;
  buff[i] = '\0';
  return i;
}
```