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

```asm
<Sys_FreeFileList>:
  endbr64
  test   %rdi,%rdi
  je     L25
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    (%rdi),%rdi
  test   %rdi,%rdi
  je     L12
  lea    0x8(%rbp),%rbx
  xchg   %ax,%ax
L20:
  xor    %eax,%eax
  add    $0x8,%rbx
  call   <Z_Free@plt>
  mov    -0x8(%rbx),%rdi
  test   %rdi,%rdi
  jne    L20
L12:
  add    $0x8,%rsp
  mov    %rbp,%rdi
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  jmp    1050 <Z_Free@plt>
  nopl   0x0(%rax)
L25:
  ret
```

assistant: ```c
void Sys_FreeFileList(char **list) {
  int i;
  if (!list) {
    return;
  }
  for (i = 0; list[i]; i++) {
    Z_Free(list[i]);
  }
  Z_Free(list);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<canopen_decode_uint>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  movq   $0x0,-0x8(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L12
  mov    -0x8(%rbp),%rax
  jmp    L35
L12:
  movq   $0x0,-0x10(%rbp)
  jmp    L34
L19:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%rax
  shl    $0x3,%eax
  mov    %eax,%ecx
  shl    %cl,%rdx
  mov    %rdx,%rax
  add    %rax,-0x8(%rbp)
  addq   $0x1,-0x10(%rbp)
L34:
  mov    -0x10(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jb     L19
  mov    -0x8(%rbp),%rax
L35:
  pop    %rbp
  ret
```

assistant: ```c
uint32_t canopen_decode_uint(uint8_t *data, uint8_t len) {
  uint8_t n;
  uint32_t value = 0;
  if (data == NULL)
    return value;
  for (n = 0; n < len; n++)
    value += data[n] << (8 * n);
  return value;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<canopen_decode_uint>:
  endbr64
  test   %rdi,%rdi
  je     L42
  test   %rsi,%rsi
  je     L11
  mov    $0x0,%r8d
  mov    $0x0,%eax
L25:
  lea    0x0(,%rax,8),%ecx
  mov    (%rdi,%rax,8),%rdx
  shl    %cl,%rdx
  add    %rdx,%r8
  add    $0x1,%rax
  cmp    %rax,%rsi
  jne    L25
L8:
  mov    %r8,%rax
  ret
L42:
  mov    $0x0,%r8d
  jmp    L8
L11:
  mov    %rsi,%r8
  jmp    L8
```

assistant: ```c
uint32_t canopen_decode_uint(uint8_t *data, uint8_t len) {
  uint8_t n;
  uint32_t value = 0;
  if (data == NULL)
    return value;
  for (n = 0; n < len; n++)
    value += data[n] << (8 * n);
  return value;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<canopen_decode_uint>:
  endbr64
  xor    %r8d,%r8d
  test   %rdi,%rdi
  je     L2
  test   %rsi,%rsi
  je     L2
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L17:
  mov    (%rdi,%rax,8),%rdx
  lea    0x0(,%rax,8),%ecx
  add    $0x1,%rax
  shl    %cl,%rdx
  add    %rdx,%r8
  cmp    %rax,%rsi
  jne    L17
L2:
  mov    %r8,%rax
  ret
```

assistant: ```c
uint32_t canopen_decode_uint(uint8_t *data, uint8_t len) {
  uint8_t n;
  uint32_t value = 0;
  if (data == NULL)
    return value;
  for (n = 0; n < len; n++)
    value += data[n] << (8 * n);
  return value;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<canopen_decode_uint>:
  endbr64
  xor    %r8d,%r8d
  test   %rdi,%rdi
  je     L14
  test   %rsi,%rsi
  je     L14
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L23:
  mov    (%rdi,%rax,8),%rdx
  lea    0x0(,%rax,8),%ecx
  add    $0x1,%rax
  shl    %cl,%rdx
  add    %rdx,%r8
  cmp    %rax,%rsi
  jne    L23
L14:
  mov    %r8,%rax
  ret
```

assistant: ```c
uint32_t canopen_decode_uint(uint8_t *data, uint8_t len) {
  uint8_t n;
  uint32_t value = 0;
  if (data == NULL)
    return value;
  for (n = 0; n < len; n++)
    value += data[n] << (8 * n);
  return value;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movl   $0xa,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <foobar@plt>
  mov    -0x4(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  mov    %eax,%edi
  call   <foobar@plt>
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <foobar@plt>
  mov    $0x0,%eax
  leave
  ret
```

assistant: ```c
int main() {
  int a = 10;
  foobar(a);
  foobar(a--);
  foobar(a);
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  mov    $0xa,%edi
  call   <foobar@plt>
  mov    $0xa,%edi
  call   <foobar@plt>
  mov    $0x9,%edi
  call   <foobar@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int main() {
  int a = 10;
  foobar(a);
  foobar(a--);
  foobar(a);
  return 0;
}
```
user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  mov    $0xa,%edi
  call   <foobar@plt>
  mov    $0xa,%edi
  call   <foobar@plt>
  mov    $0x9,%edi
  call   <foobar@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int main() {
  int a = 10;
  foobar(a);
  foobar(a--);
  foobar(a);
  return 0;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  mov    $0xa,%edi
  call   <foobar@plt>
  mov    $0xa,%edi
  call   <foobar@plt>
  mov    $0x9,%edi
  call   <foobar@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int main() {
  int a = 10;
  foobar(a);
  foobar(a--);
  foobar(a);
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x68(%rbp),%rax
  mov    %rax,%rsi
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x68(%rbp),%rax
  lea    -0x60(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <convertidor@plt>
  mov    -0x68(%rbp),%rax
  lea    -0x60(%rbp),%rdx
  mov    %rax,%rsi
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x68(%rbp),%rax
  not    %rax
  mov    %rax,%rdx
  lea    -0x60(%rbp),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <convertidor@plt>
  lea    -0x60(%rbp),%rax
  mov    %rax,%rsi
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L3
  call   <__stack_chk_fail@plt>
L3:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D37
type_guessed: string
name: parse_data
arguments: data_label: D30
type_guessed: string
name: parse_data
arguments: data_label: D12
type_guessed: string
name: parse_data
arguments: data_label: D28
type_guessed: string

tool: D37: 

 Ingrese el numero a convertir : 

tool: D30: %ld

tool: D12: 
 El numero en Binario de: %ld es %s 


tool: D28: 
Su complemento a1 es: %s 

assistant: ```c
int main() {
  long Dec;
  char Bin[80];
  printf("\n\n Ingrese el numero a convertir : ");
  scanf("%ld", &Dec);
  convertidor(Dec, Bin);
  printf("\n El numero en Binario de: %ld es %s \n", Dec, Bin);
  convertidor(~Dec, Bin);
  printf("\nSu complemento a1 es: %s ", Bin);
  getchar();
  getchar();
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %rbx
  sub    $0x70,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  lea    D39(%rip),%rdi
  call   <printf@plt>
  lea    0x8(%rsp),%rsi
  lea    D19(%rip),%rdi
  call   <scanf@plt>
  lea    0x10(%rsp),%rbx
  mov    %rbx,%rsi
  mov    0x8(%rsp),%rdi
  call   <convertidor@plt>
  mov    %rbx,%rdx
  mov    0x8(%rsp),%rsi
  lea    D30(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%rdi
  not    %rdi
  mov    %rbx,%rsi
  call   <convertidor@plt>
  mov    %rbx,%rsi
  lea    D33(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  mov    $0x0,%eax
  add    $0x70,%rsp
  pop    %rbx
  ret
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D39
type: string
name: extract_symbolic_data
arguments: tag: D19
type: string
name: extract_symbolic_data
arguments: tag: D30
type: string
name: extract_symbolic_data
arguments: tag: D33
type: string

tool: D39: 

 Ingrese el numero a convertir : 

tool: D19: %ld

tool: D30: 
 El numero en Binario de: %ld es %s 


tool: D33: 
Su complemento a1 es: %s 

assistant: ```c
int main() {
  long Dec;
  char Bin[80];
  printf("\n\n Ingrese el numero a convertir : ");
  scanf("%ld", &Dec);
  convertidor(Dec, Bin);
  printf("\n El numero en Binario de: %ld es %s \n", Dec, Bin);
  convertidor(~Dec, Bin);
  printf("\nSu complemento a1 es: %s ", Bin);
  getchar();
  getchar();
  return 0;
}
```
user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  push   %rbp
  lea    D24(%rip),%rdi
  sub    $0x70,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbp
  call   <printf@plt>
  lea    0x8(%rsp),%rsi
  lea    D16(%rip),%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%rdi
  mov    %rbp,%rsi
  call   <convertidor@plt>
  mov    0x8(%rsp),%rsi
  mov    %rbp,%rdx
  xor    %eax,%eax
  lea    D14(%rip),%rdi
  call   <printf@plt>
  mov    0x8(%rsp),%rdi
  mov    %rbp,%rsi
  not    %rdi
  call   <convertidor@plt>
  mov    %rbp,%rsi
  lea    D35(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  add    $0x70,%rsp
  xor    %eax,%eax
  pop    %rbp
  ret
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D24
type: string
name: unpack_data
arguments: data_tag: D16
type: string
name: unpack_data
arguments: data_tag: D14
type: string
name: unpack_data
arguments: data_tag: D35
type: string

tool: D24: 

 Ingrese el numero a convertir : 

tool: D16: %ld

tool: D14: 
 El numero en Binario de: %ld es %s 


tool: D35: 
Su complemento a1 es: %s 

assistant: ```c
int main() {
  long Dec;
  char Bin[80];
  printf("\n\n Ingrese el numero a convertir : ");
  scanf("%ld", &Dec);
  convertidor(Dec, Bin);
  printf("\n El numero en Binario de: %ld es %s \n", Dec, Bin);
  convertidor(~Dec, Bin);
  printf("\nSu complemento a1 es: %s ", Bin);
  getchar();
  getchar();
  return 0;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %rbp
  lea    D6(%rip),%rdi
  sub    $0x70,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbp
  call   <printf@plt>
  lea    0x8(%rsp),%rsi
  lea    D10(%rip),%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%rdi
  mov    %rbp,%rsi
  call   <convertidor@plt>
  mov    0x8(%rsp),%rsi
  mov    %rbp,%rdx
  xor    %eax,%eax
  lea    D26(%rip),%rdi
  call   <printf@plt>
  mov    0x8(%rsp),%rdi
  mov    %rbp,%rsi
  not    %rdi
  call   <convertidor@plt>
  mov    %rbp,%rsi
  lea    D37(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x70,%rsp
  xor    %eax,%eax
  pop    %rbp
  ret
L2:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D6
type: string
name: disassemble_data
arguments: label: D10
type: string
name: disassemble_data
arguments: label: D26
type: string
name: disassemble_data
arguments: label: D37
type: string

tool: D6: 

 Ingrese el numero a convertir : 

tool: D10: %ld

tool: D26: 
 El numero en Binario de: %ld es %s 


tool: D37: 
Su complemento a1 es: %s 

assistant: ```c
int main() {
  long Dec;
  char Bin[80];
  printf("\n\n Ingrese el numero a convertir : ");
  scanf("%ld", &Dec);
  convertidor(Dec, Bin);
  printf("\n El numero en Binario de: %ld es %s \n", Dec, Bin);
  convertidor(~Dec, Bin);
  printf("\nSu complemento a1 es: %s ", Bin);
  getchar();
  getchar();
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<getop>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r12
L23:
  mov    $0x0,%eax
  call   <getch@plt>
  mov    %eax,%ebx
  mov    %al,(%r12)
  cmp    $0x9,%eax
  je     L23
  cmp    $0x20,%al
  je     L23
  movb   $0x0,0x1(%r12)
  lea    -0x61(%rax),%eax
  cmp    $0x19,%al
  ja     L47
  movsbl %bl,%ebx
L3:
  mov    %ebx,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L47:
  movsbl %bl,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L85
  lea    -0x2d(%rbx),%eax
  cmp    $0x1,%eax
  ja     L3
L85:
  cmp    $0x2d,%ebx
  je     L63
  mov    $0x0,%eax
  call   <getch@plt>
  mov    %eax,%ebp
L142:
  mov    $0x1,%ebx
  jmp    L139
L63:
  mov    $0x0,%eax
  call   <getch@plt>
  mov    %eax,%ebp
  movsbl %al,%edi
  call   <isdigit@plt>
  cmp    $0x2e,%ebp
  je     L142
  test   %rax,%rax
  jne    L142
  jmp    L3
L105:
  mov    $0x0,%eax
  call   <getch@plt>
  mov    %eax,%ebp
L139:
  mov    %ebx,%r13d
  mov    %bpl,(%r12,%rbx,1)
  movsbl %bpl,%edi
  call   <isdigit@plt>
  add    $0x1,%rbx
  test   %rax,%rax
  jne    L105
  cmp    $0x2e,%ebp
  je     L66
L108:
  movslq %r13d,%r13
  movb   $0x0,(%r12,%r13,1)
  mov    $0x30,%ebx
  mov    D2(%rip),%rax
  cmp    %ebp,(%rax)
  je     L3
  mov    %ebp,%edi
  call   <ungetch@plt>
  jmp    L3
L66:
  lea    0x1(%r13),%ebx
  movslq %ebx,%rbx
L131:
  mov    $0x0,%eax
  call   <getch@plt>
  mov    %eax,%ebp
  mov    %ebx,%r13d
  mov    %al,(%r12,%rbx,1)
  movsbl %al,%edi
  call   <isdigit@plt>
  add    $0x1,%rbx
  test   %rax,%rax
  jne    L131
  jmp    L108
```

assistant: ```c
int getop(char s[]) {
  int i = 0;
  int c, next;
  while ((s[0] = c = getch()) == ' ' || c == '\t') {
  }
  s[1] = '\0';
  if (s[i] >= 'a' && s[i] <= 'z') {
    return s[i];
  }
  if (!isdigit(c) && c != '.' && c != '-') {
    return c;
  }
  if (c == '-') {
    next = getch();
    if (!isdigit(next) && next != '.') {
      return c;
    } else {
      c = next;
    }
  } else {
    c = getch();
  }
  while (isdigit(s[++i] = c)) {
    c = getch();
  }
  if (c == '.') {
    while (isdigit(s[++i] = c = getch())) {
    }
  }
  s[i] = '\0';
  if (c != EOF) {
    ungetch(c);
  }
  return '0';
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<getop>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  nopl   (%rax)
L110:
  xor    %eax,%eax
  call   <getch@plt>
  mov    %al,(%r12)
  mov    %eax,%ebx
  cmp    $0x20,%al
  je     L110
  cmp    $0x9,%eax
  je     L110
  movsbl %al,%r13d
  lea    -0x61(%rax),%eax
  movb   $0x0,0x1(%r12)
  cmp    $0x19,%al
  ja     L111
L52:
  add    $0x18,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L111:
  mov    %r13d,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L23
  lea    -0x2d(%rbx),%eax
  mov    %ebx,%r13d
  cmp    $0x1,%eax
  ja     L52
L23:
  xor    %eax,%eax
  cmp    $0x2d,%ebx
  je     L157
  call   <getch@plt>
  mov    %eax,%ebp
  movsbl %al,%edi
L41:
  mov    %r12d,%r14d
  lea    0x1(%r12),%rbx
  neg    %r14d
  jmp    L12
  xchg   %ax,%ax
L10:
  xor    %eax,%eax
  call   <getch@plt>
  mov    %eax,%ebp
  movsbl %al,%edi
L12:
  mov    %bpl,(%rbx)
  lea    (%r14,%rbx,1),%r15d
  mov    %rbx,%r13
  add    $0x1,%rbx
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L10
  cmp    $0x2e,%ebp
  je     L75
L130:
  mov    D8(%rip),%rax
  movb   $0x0,0x0(%r13)
  mov    $0x30,%r13d
  cmp    %ebp,(%rax)
  je     L52
  mov    %ebp,%edi
  call   <ungetch@plt>
  jmp    L52
L157:
  call   <getch@plt>
  movsbl %al,%edi
  mov    %eax,%ebp
  mov    %edi,0xc(%rsp)
  call   <isdigit@plt>
  mov    0xc(%rsp),%edi
  test   %rax,%rax
  jne    L41
  mov    $0x2d,%r13d
  cmp    $0x2e,%ebp
  je     L41
  jmp    L52
L75:
  movslq %r15d,%r15
  lea    0x1(%r12,%r15,1),%rbx
  nopw   0x0(%rax,%rax,1)
L30:
  xor    %eax,%eax
  mov    %rbx,%r13
  add    $0x1,%rbx
  call   <getch@plt>
  mov    %al,-0x1(%rbx)
  movsbl %al,%edi
  mov    %eax,%ebp
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L30
  jmp    L130
```

assistant: ```c
int getop(char s[]) {
  int i = 0;
  int c, next;
  while ((s[0] = c = getch()) == ' ' || c == '\t') {
  }
  s[1] = '\0';
  if (s[i] >= 'a' && s[i] <= 'z') {
    return s[i];
  }
  if (!isdigit(c) && c != '.' && c != '-') {
    return c;
  }
  if (c == '-') {
    next = getch();
    if (!isdigit(next) && next != '.') {
      return c;
    } else {
      c = next;
    }
  } else {
    c = getch();
  }
  while (isdigit(s[++i] = c)) {
    c = getch();
  }
  if (c == '.') {
    while (isdigit(s[++i] = c = getch())) {
    }
  }
  s[i] = '\0';
  if (c != EOF) {
    ungetch(c);
  }
  return '0';
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<getop>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  nopl   (%rax)
L110:
  xor    %eax,%eax
  call   <getch@plt>
  mov    %al,(%r12)
  mov    %eax,%ebx
  cmp    $0x20,%al
  je     L110
  cmp    $0x9,%eax
  je     L110
  movsbl %al,%r13d
  lea    -0x61(%rax),%eax
  movb   $0x0,0x1(%r12)
  cmp    $0x19,%al
  ja     L81
L8:
  add    $0x18,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L81:
  mov    %r13d,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L147
  lea    -0x2d(%rbx),%eax
  mov    %ebx,%r13d
  cmp    $0x1,%eax
  ja     L8
L147:
  xor    %eax,%eax
  cmp    $0x2d,%ebx
  je     L99
  call   <getch@plt>
  mov    %eax,%ebp
  movsbl %al,%edi
L59:
  mov    %r12d,%r14d
  lea    0x1(%r12),%rbx
  neg    %r14d
  jmp    L44
  xchg   %ax,%ax
L83:
  xor    %eax,%eax
  call   <getch@plt>
  mov    %eax,%ebp
  movsbl %al,%edi
L44:
  mov    %bpl,(%rbx)
  lea    (%r14,%rbx,1),%r15d
  mov    %rbx,%r13
  add    $0x1,%rbx
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L83
  cmp    $0x2e,%ebp
  je     L103
L58:
  mov    D8(%rip),%rax
  movb   $0x0,0x0(%r13)
  mov    $0x30,%r13d
  cmp    %ebp,(%rax)
  je     L8
  mov    %ebp,%edi
  call   <ungetch@plt>
  jmp    L8
L99:
  call   <getch@plt>
  movsbl %al,%edi
  mov    %eax,%ebp
  mov    %edi,0xc(%rsp)
  call   <isdigit@plt>
  mov    0xc(%rsp),%edi
  test   %rax,%rax
  jne    L59
  mov    $0x2d,%r13d
  cmp    $0x2e,%ebp
  je     L59
  jmp    L8
L103:
  movslq %r15d,%r15
  lea    0x1(%r12,%r15,1),%rbx
  nopw   0x0(%rax,%rax,1)
L4:
  xor    %eax,%eax
  mov    %rbx,%r13
  add    $0x1,%rbx
  call   <getch@plt>
  mov    %al,-0x1(%rbx)
  movsbl %al,%edi
  mov    %eax,%ebp
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L4
  jmp    L58
```

assistant: ```c
int getop(char s[]) {
  int i = 0;
  int c, next;
  while ((s[0] = c = getch()) == ' ' || c == '\t') {
  }
  s[1] = '\0';
  if (s[i] >= 'a' && s[i] <= 'z') {
    return s[i];
  }
  if (!isdigit(c) && c != '.' && c != '-') {
    return c;
  }
  if (c == '-') {
    next = getch();
    if (!isdigit(next) && next != '.') {
      return c;
    } else {
      c = next;
    }
  } else {
    c = getch();
  }
  while (isdigit(s[++i] = c)) {
    c = getch();
  }
  if (c == '.') {
    while (isdigit(s[++i] = c = getch())) {
    }
  }
  s[i] = '\0';
  if (c != EOF) {
    ungetch(c);
  }
  return '0';
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<QuickSort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x20(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L76
L71:
  addl   $0x1,-0x10(%rbp)
L76:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8(%rbp)
  jg     L71
  jmp    L36
L14:
  subl   $0x1,-0xc(%rbp)
L36:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8(%rbp)
  jl     L14
  mov    -0x10(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jg     L3
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x10(%rbp)
  subl   $0x1,-0xc(%rbp)
L3:
  mov    -0x10(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jle    L76
  mov    -0x1c(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jge    L12
  mov    -0xc(%rbp),%edx
  mov    -0x1c(%rbp),%ecx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <QuickSort>
L12:
  mov    -0x1c(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jge    L69
  mov    -0x20(%rbp),%edx
  mov    -0x10(%rbp),%ecx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <QuickSort>
L69:
  nop
  leave
  ret
```

assistant: ```c
void QuickSort(int *v, int l, int r) {
  int i, j, aux, x;
  i = l;
  j = r;
  x = v[(l + r) / 2];
  do {
    while (v[i] < x)
      i++;
    while (x < v[j])
      j--;
    if (i <= j) {
      aux = v[i];
      v[i] = v[j];
      v[j] = aux;
      i++;
      j--;
    }
  } while (i <= j);
  if (l < j)
    QuickSort(v, l, j);
  if (l < r)
    QuickSort(v, i, r);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<QuickSort>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbp
  mov    %esi,%r12d
  mov    %edx,%r13d
  lea    (%rsi,%rdx,1),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cltq
  mov    (%rdi,%rax,4),%esi
  movslq %r12d,%rax
  lea    (%rdi,%rax,4),%r8
  mov    %r12d,%r9d
  lea    0x1(%r12),%r10d
  mov    %r13d,%edx
  jmp    L74
L79:
  mov    %ecx,(%r14)
  mov    %r11d,(%rdi)
  mov    %r10d,%ebx
  sub    $0x1,%edx
  cmp    %edx,%r10d
  jg     L7
L51:
  add    $0x4,%r8
  add    $0x1,%r10d
  add    $0x1,%r9d
L74:
  mov    %r9d,%ebx
  mov    %r8,%r14
  mov    (%r8),%r11d
  cmp    %esi,%r11d
  jl     L51
  movslq %edx,%rax
  lea    0x0(%rbp,%rax,4),%rdi
  mov    (%rdi),%ecx
  cmp    %ecx,%esi
  jge    L21
  lea    -0x4(%rbp,%rax,4),%rax
L59:
  sub    $0x1,%edx
  mov    %rax,%rdi
  sub    $0x4,%rax
  mov    0x4(%rax),%ecx
  cmp    %esi,%ecx
  jg     L59
L21:
  cmp    %edx,%ebx
  jle    L79
L7:
  cmp    %edx,%r12d
  jl     L15
L41:
  cmp    %r13d,%r12d
  jl     L34
L49:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L15:
  mov    %r12d,%esi
  mov    %rbp,%rdi
  call   <QuickSort>
  jmp    L41
L34:
  mov    %r13d,%edx
  mov    %ebx,%esi
  mov    %rbp,%rdi
  call   <QuickSort>
  jmp    L49
```

assistant: ```c
void QuickSort(int *v, int l, int r) {
  int i, j, aux, x;
  i = l;
  j = r;
  x = v[(l + r) / 2];
  do {
    while (v[i] < x)
      i++;
    while (x < v[j])
      j--;
    if (i <= j) {
      aux = v[i];
      v[i] = v[j];
      v[j] = aux;
      i++;
      j--;
    }
  } while (i <= j);
  if (l < j)
    QuickSort(v, l, j);
  if (l < r)
    QuickSort(v, i, r);
}
```