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

```asm
<safe_malloc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L0
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <fatal@plt>
L0:
  mov    -0x8(%rbp),%rax
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D0
type: string

tool: D0: Out of memory

assistant: ```c
void *safe_malloc(size_t nbytes) {
  void *buf;
  if ((buf = malloc(nbytes)) == NULL)
    fatal("Out of memory");
  return buf;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<safe_malloc>:
  endbr64
  push   %rbx
  call   <malloc@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L15
L3:
  mov    %rbx,%rax
  pop    %rbx
  ret
L15:
  lea    D7(%rip),%rdi
  call   <fatal@plt>
  jmp    L3
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D7
type_guessed: string

tool: D7: Out of memory

assistant: ```c
void *safe_malloc(size_t nbytes) {
  void *buf;
  if ((buf = malloc(nbytes)) == NULL)
    fatal("Out of memory");
  return buf;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<safe_malloc>:
  endbr64
  push   %r12
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L7
L0:
  mov    %r12,%rax
  pop    %r12
  ret
L7:
  lea    D8(%rip),%rdi
  call   <fatal@plt>
  jmp    L0
```

tool_calls: name: parse_data
arguments: label: D8
type_infered: string

tool: D8: Out of memory

assistant: ```c
void *safe_malloc(size_t nbytes) {
  void *buf;
  if ((buf = malloc(nbytes)) == NULL)
    fatal("Out of memory");
  return buf;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<safe_malloc>:
  endbr64
  push   %r12
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L10
L8:
  mov    %r12,%rax
  pop    %r12
  ret
L10:
  lea    D9(%rip),%rdi
  call   <fatal@plt>
  jmp    L8
```

tool_calls: name: retrieve_data
arguments: data_tag: D9
type_infered: string

tool: D9: Out of memory

assistant: ```c
void *safe_malloc(size_t nbytes) {
  void *buf;
  if ((buf = malloc(nbytes)) == NULL)
    fatal("Out of memory");
  return buf;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<copy_piece_from_to>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L26
L31:
  movl   $0x0,-0x4(%rbp)
  jmp    L30
L7:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  sub    %rdx,%rax
  mov    %rax,%rcx
  mov    -0x18(%rbp),%rax
  lea    (%rcx,%rax,1),%rsi
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  sub    %rdx,%rax
  mov    %rax,%rcx
  mov    -0x20(%rbp),%rax
  add    %rax,%rcx
  mov    -0x8(%rbp),%eax
  cltq
  movzbl (%rsi,%rax,1),%edx
  mov    -0x8(%rbp),%eax
  cltq
  mov    %dl,(%rcx,%rax,1)
  addl   $0x1,-0x4(%rbp)
L30:
  cmpl   $0x6,-0x4(%rbp)
  jle    L7
  addl   $0x1,-0x8(%rbp)
L26:
  cmpl   $0x6,-0x8(%rbp)
  jle    L31
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void copy_piece_from_to(char from[7][7], char to[7][7]) {
  for (int y = 0; y < 7; y++) {
    for (int x = 0; x < 7; x++) {
      to[x][y] = from[x][y];
    }
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<copy_piece_from_to>:
  endbr64
  mov    $0x31,%ecx
L11:
  lea    -0x31(%rcx),%rax
L18:
  movzbl (%rdi,%rax,1),%edx
  mov    %dl,(%rsi,%rax,1)
  add    $0x7,%rax
  cmp    %rcx,%rax
  jne    L18
  add    $0x1,%rcx
  cmp    $0x38,%rcx
  jne    L11
  ret
```

assistant: ```c
void copy_piece_from_to(char from[7][7], char to[7][7]) {
  for (int y = 0; y < 7; y++) {
    for (int x = 0; x < 7; x++) {
      to[x][y] = from[x][y];
    }
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<copy_piece_from_to>:
  endbr64
  mov    $0x31,%ecx
  nopl   0x0(%rax)
L1:
  lea    -0x31(%rcx),%rax
  nopl   0x0(%rax)
L19:
  movzbl (%rdi,%rax,1),%edx
  mov    %dl,(%rsi,%rax,1)
  add    $0x7,%rax
  cmp    %rcx,%rax
  jne    L19
  lea    0x1(%rax),%rcx
  cmp    $0x37,%rax
  jne    L1
  ret
```

assistant: ```c
void copy_piece_from_to(char from[7][7], char to[7][7]) {
  for (int y = 0; y < 7; y++) {
    for (int x = 0; x < 7; x++) {
      to[x][y] = from[x][y];
    }
  }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<copy_piece_from_to>:
  endbr64
  movzbl (%rdi),%ecx
  mov    %cl,(%rsi)
  movzbl 0x7(%rdi),%ecx
  mov    %cl,0x7(%rsi)
  movzbl 0xe(%rdi),%ecx
  mov    %cl,0xe(%rsi)
  movzbl 0x15(%rdi),%ecx
  mov    %cl,0x15(%rsi)
  movzbl 0x1c(%rdi),%ecx
  mov    %cl,0x1c(%rsi)
  movzbl 0x23(%rdi),%ecx
  mov    %cl,0x23(%rsi)
  movzbl 0x2a(%rdi),%ecx
  mov    %cl,0x2a(%rsi)
  movzbl 0x1(%rdi),%ecx
  mov    %cl,0x1(%rsi)
  movzbl 0x8(%rdi),%ecx
  mov    %cl,0x8(%rsi)
  movzbl 0xf(%rdi),%ecx
  mov    %cl,0xf(%rsi)
  movzbl 0x16(%rdi),%ecx
  mov    %cl,0x16(%rsi)
  movzbl 0x1d(%rdi),%ecx
  mov    %cl,0x1d(%rsi)
  movzbl 0x24(%rdi),%ecx
  mov    %cl,0x24(%rsi)
  movzbl 0x2b(%rdi),%ecx
  mov    %cl,0x2b(%rsi)
  movzbl 0x2(%rdi),%ecx
  mov    %cl,0x2(%rsi)
  movzbl 0x9(%rdi),%ecx
  mov    %cl,0x9(%rsi)
  movzbl 0x10(%rdi),%ecx
  mov    %cl,0x10(%rsi)
  movzbl 0x17(%rdi),%ecx
  mov    %cl,0x17(%rsi)
  movzbl 0x1e(%rdi),%ecx
  mov    %cl,0x1e(%rsi)
  movzbl 0x25(%rdi),%ecx
  mov    %cl,0x25(%rsi)
  movzbl 0x2c(%rdi),%ecx
  mov    %cl,0x2c(%rsi)
  movzbl 0x3(%rdi),%ecx
  mov    %cl,0x3(%rsi)
  movzbl 0xa(%rdi),%ecx
  mov    %cl,0xa(%rsi)
  movzbl 0x11(%rdi),%ecx
  mov    %cl,0x11(%rsi)
  movzbl 0x18(%rdi),%ecx
  mov    %cl,0x18(%rsi)
  movzbl 0x1f(%rdi),%ecx
  mov    %cl,0x1f(%rsi)
  movzbl 0x26(%rdi),%ecx
  mov    %cl,0x26(%rsi)
  movzbl 0x2d(%rdi),%ecx
  mov    %cl,0x2d(%rsi)
  movzbl 0x4(%rdi),%ecx
  mov    %cl,0x4(%rsi)
  movzbl 0xb(%rdi),%ecx
  mov    %cl,0xb(%rsi)
  movzbl 0x12(%rdi),%ecx
  mov    %cl,0x12(%rsi)
  movzbl 0x19(%rdi),%ecx
  mov    %cl,0x19(%rsi)
  movzbl 0x20(%rdi),%ecx
  mov    %cl,0x20(%rsi)
  movzbl 0x27(%rdi),%ecx
  mov    %cl,0x27(%rsi)
  movzbl 0x2e(%rdi),%ecx
  mov    %cl,0x2e(%rsi)
  movzbl 0x5(%rdi),%ecx
  mov    %cl,0x5(%rsi)
  movzbl 0xc(%rdi),%ecx
  mov    %cl,0xc(%rsi)
  movzbl 0x13(%rdi),%ecx
  mov    %cl,0x13(%rsi)
  movzbl 0x1a(%rdi),%ecx
  mov    %cl,0x1a(%rsi)
  movzbl 0x21(%rdi),%ecx
  mov    %cl,0x21(%rsi)
  movzbl 0x28(%rdi),%ecx
  mov    %cl,0x28(%rsi)
  movzbl 0x2f(%rdi),%ecx
  mov    %cl,0x2f(%rsi)
  movzbl 0x6(%rdi),%ecx
  mov    %cl,0x6(%rsi)
  movzbl 0xd(%rdi),%ecx
  mov    %cl,0xd(%rsi)
  movzbl 0x14(%rdi),%ecx
  mov    %cl,0x14(%rsi)
  movzbl 0x1b(%rdi),%ecx
  mov    %cl,0x1b(%rsi)
  movzbl 0x22(%rdi),%ecx
  mov    %cl,0x22(%rsi)
  movzbl 0x29(%rdi),%ecx
  mov    %cl,0x29(%rsi)
  movzbl 0x30(%rdi),%edx
  mov    %dl,0x30(%rsi)
  ret
```

assistant: ```c
void copy_piece_from_to(char from[7][7], char to[7][7]) {
  for (int y = 0; y < 7; y++) {
    for (int x = 0; x < 7; x++) {
      to[x][y] = from[x][y];
    }
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<hash_sha3_256>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %edx,-0x14(%rbp)
  mov    -0x8(%rbp),%rcx
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x20
  mov    $0x20,%r9d
  mov    %rcx,%r8
  mov    $0x6,%ecx
  mov    %rax,%rsi
  mov    $0x88,%edi
  call   <hash_keccak@plt>
  add    $0x10,%rsp
  mov    $0x1,%eax
  leave
  ret
```

assistant: ```c
int hash_sha3_256(uint8_t *h, const uint8_t *m, uint64_t n) {
  hash_keccak(17 * 8, m, n, 0x06, h, 32, 32);
  return 1;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<hash_sha3_256>:
  endbr64
  sub    $0x10,%rsp
  mov    %rdi,%r8
  push   $0x20
  mov    $0x20,%r9d
  mov    $0x6,%ecx
  mov    $0x88,%edi
  call   <hash_keccak@plt>
  mov    $0x1,%eax
  add    $0x18,%rsp
  ret
```

assistant: ```c
int hash_sha3_256(uint8_t *h, const uint8_t *m, uint64_t n) {
  hash_keccak(17 * 8, m, n, 0x06, h, 32, 32);
  return 1;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<hash_sha3_256>:
  endbr64
  sub    $0x10,%rsp
  mov    %rdi,%r8
  mov    $0x20,%r9d
  mov    $0x6,%ecx
  push   $0x20
  mov    $0x88,%edi
  call   <hash_keccak@plt>
  mov    $0x1,%eax
  add    $0x18,%rsp
  ret
```

assistant: ```c
int hash_sha3_256(uint8_t *h, const uint8_t *m, uint64_t n) {
  hash_keccak(17 * 8, m, n, 0x06, h, 32, 32);
  return 1;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<hash_sha3_256>:
  endbr64
  sub    $0x10,%rsp
  mov    %rdi,%r8
  mov    $0x20,%r9d
  mov    $0x6,%ecx
  push   $0x20
  mov    $0x88,%edi
  call   <hash_keccak@plt>
  mov    $0x1,%eax
  add    $0x18,%rsp
  ret
```

assistant: ```c
int hash_sha3_256(uint8_t *h, const uint8_t *m, uint64_t n) {
  hash_keccak(17 * 8, m, n, 0x06, h, 32, 32);
  return 1;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    $0x0,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x1,-0x4(%rbp)
  setg   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <__VERIFIER_assume@plt>
  movl   $0x2,-0x8(%rbp)
  jmp    L10
L6:
  addl   $0x1,-0x8(%rbp)
L10:
  mov    -0x8(%rbp),%eax
  cltd
  idivl  -0x4(%rbp)
  mov    %edx,%eax
  test   %eax,%eax
  jne    L6
  mov    -0x8(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  setle  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <__VERIFIER_assert@plt>
  nop
  leave
  ret
```

assistant: ```c
void main() {
  int i, n = __VERIFIER_nondet_int();
  __VERIFIER_assume(n >= 2);
  for (i = 2; i % n != 0; i++)
    ;
  __VERIFIER_assert(i <= n);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbx
  mov    $0x0,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%ebx
  cmp    $0x1,%eax
  setg   %dil
  movzbl %dil,%edi
  call   <__VERIFIER_assume@plt>
  mov    $0x2,%eax
  cltd
  idiv   %ebx
  test   %edx,%edx
  je     L23
  mov    $0x2,%ecx
L28:
  add    $0x1,%ecx
  mov    %ecx,%eax
  cltd
  idiv   %ebx
  test   %edx,%edx
  jne    L28
L10:
  cmp    %ecx,%ebx
  setge  %dil
  movzbl %dil,%edi
  call   <__VERIFIER_assert@plt>
  pop    %rbx
  ret
L23:
  mov    $0x2,%ecx
  jmp    L10
```

assistant: ```c
void main() {
  int i, n = __VERIFIER_nondet_int();
  __VERIFIER_assume(n >= 2);
  for (i = 2; i % n != 0; i++)
    ;
  __VERIFIER_assert(i <= n);
}
```
user: What is the c source code of the assembly code below:

```asm
<main>:
  endbr64
  push   %rbx
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  xor    %edi,%edi
  cmp    $0x1,%eax
  mov    %eax,%ebx
  setg   %dil
  call   <__VERIFIER_assume@plt>
  mov    $0x2,%eax
  mov    $0x2,%ecx
  cltd
  idiv   %ebx
  test   %edx,%edx
  je     L13
  nopl   (%rax)
L10:
  add    $0x1,%ecx
  mov    %ecx,%eax
  cltd
  idiv   %ebx
  test   %edx,%edx
  jne    L10
L13:
  xor    %edi,%edi
  cmp    %ecx,%ebx
  pop    %rbx
  setge  %dil
  jmp    1070 <__VERIFIER_assert@plt>
```

assistant: ```c
void main() {
  int i, n = __VERIFIER_nondet_int();
  __VERIFIER_assume(n >= 2);
  for (i = 2; i % n != 0; i++)
    ;
  __VERIFIER_assert(i <= n);
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %rbx
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  xor    %edi,%edi
  cmp    $0x1,%eax
  mov    %eax,%ebx
  setg   %dil
  call   <__VERIFIER_assume@plt>
  mov    $0x2,%eax
  mov    $0x2,%ecx
  cltd
  idiv   %ebx
  test   %edx,%edx
  je     L13
  nopl   (%rax)
L17:
  add    $0x1,%ecx
  mov    %ecx,%eax
  cltd
  idiv   %ebx
  test   %edx,%edx
  jne    L17
L13:
  xor    %edi,%edi
  cmp    %ecx,%ebx
  pop    %rbx
  setge  %dil
  jmp    1070 <__VERIFIER_assert@plt>
```

assistant: ```c
void main() {
  int i, n = __VERIFIER_nondet_int();
  __VERIFIER_assume(n >= 2);
  for (i = 2; i % n != 0; i++)
    ;
  __VERIFIER_assert(i <= n);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<lcd_clear_screen>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L20
L15:
  movl   $0x0,-0x4(%rbp)
  jmp    L21
L24:
  mov    -0x14(%rbp),%edx
  mov    -0x4(%rbp),%ecx
  mov    -0x8(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <lcd_draw_pixel@plt>
  addl   $0x1,-0x4(%rbp)
L21:
  cmpl   $0x1df,-0x4(%rbp)
  jle    L24
  addl   $0x1,-0x8(%rbp)
L20:
  cmpl   $0x10f,-0x8(%rbp)
  jle    L15
  nop
  nop
  leave
  ret
```

assistant: ```c
void lcd_clear_screen(int color) {
  int i, j;
  for (i = 0; i < (272); i++)
    for (j = 0; j < (480); j++)
      lcd_draw_pixel(i, j, color);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<lcd_clear_screen>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%r12d
  mov    $0x0,%ebp
L18:
  mov    $0x0,%ebx
L0:
  mov    %r12d,%edx
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <lcd_draw_pixel@plt>
  add    $0x1,%ebx
  cmp    $0x1e0,%ebx
  jne    L0
  add    $0x1,%ebp
  cmp    $0x110,%ebp
  jne    L18
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void lcd_clear_screen(int color) {
  int i, j;
  for (i = 0; i < (272); i++)
    for (j = 0; j < (480); j++)
      lcd_draw_pixel(i, j, color);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<lcd_clear_screen>:
  endbr64
  push   %r12
  mov    %edi,%r12d
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
L13:
  xor    %ebx,%ebx
  nop
L9:
  mov    %ebx,%esi
  mov    %r12d,%edx
  mov    %ebp,%edi
  add    $0x1,%ebx
  call   <lcd_draw_pixel@plt>
  cmp    $0x1e0,%ebx
  jne    L9
  add    $0x1,%ebp
  cmp    $0x110,%ebp
  jne    L13
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void lcd_clear_screen(int color) {
  int i, j;
  for (i = 0; i < (272); i++)
    for (j = 0; j < (480); j++)
      lcd_draw_pixel(i, j, color);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<lcd_clear_screen>:
  endbr64
  push   %r12
  mov    %edi,%r12d
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
L3:
  xor    %ebx,%ebx
  nop
L19:
  mov    %ebx,%esi
  mov    %r12d,%edx
  mov    %ebp,%edi
  add    $0x1,%ebx
  call   <lcd_draw_pixel@plt>
  cmp    $0x1e0,%ebx
  jne    L19
  add    $0x1,%ebp
  cmp    $0x110,%ebp
  jne    L3
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void lcd_clear_screen(int color) {
  int i, j;
  for (i = 0; i < (272); i++)
    for (j = 0; j < (480); j++)
      lcd_draw_pixel(i, j, color);
}
```
user: What is the c source code of the assembly code below?

```asm
<m_free>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L0
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L0:
  nop
  leave
  ret
```

assistant: ```c
void m_free(void *ptr) {
  if (ptr != NULL) {
    free(ptr);
  }
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<m_free>:
  endbr64
  test   %rdi,%rdi
  je     L1
  sub    $0x8,%rsp
  call   <free@plt>
  add    $0x8,%rsp
  ret
L1:
  ret
```

assistant: ```c
void m_free(void *ptr) {
  if (ptr != NULL) {
    free(ptr);
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<m_free>:
  endbr64
  test   %rdi,%rdi
  je     L0
  jmp    1050 <free@plt>
  xchg   %ax,%ax
L0:
  ret
```

assistant: ```c
void m_free(void *ptr) {
  if (ptr != NULL) {
    free(ptr);
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<m_free>:
  endbr64
  test   %rdi,%rdi
  je     L5
  jmp    1050 <free@plt>
  xchg   %ax,%ax
L5:
  ret
```

assistant: ```c
void m_free(void *ptr) {
  if (ptr != NULL) {
    free(ptr);
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<_quick_rec_central>:
  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    -0x20(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L66
L15:
  addl   $0x1,-0x10(%rbp)
L34:
  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     L15
  jmp    L63
L75:
  subl   $0x1,-0xc(%rbp)
L63:
  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     L75
  mov    -0x10(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jg     L66
  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)
L66:
  mov    -0x10(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jle    L34
  mov    -0x1c(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jge    L60
  mov    -0xc(%rbp),%edx
  mov    -0x1c(%rbp),%ecx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <_quick_rec_central>
L60:
  mov    -0x10(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jge    L50
  mov    -0x20(%rbp),%edx
  mov    -0x10(%rbp),%ecx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <_quick_rec_central>
L50:
  nop
  leave
  ret
```

assistant: ```c
void _quick_rec_central(int *vet, int begin, int end) {
  int i = begin, j = end;
  int tmp;
  int pivot = vet[begin + (end - begin) / 2];
  while (i <= j) {
    while (vet[i] < pivot)
      i++;
    while (vet[j] > pivot)
      j--;
    if (i <= j) {
      tmp = vet[i];
      vet[i] = vet[j];
      vet[j] = tmp;
      i++;
      j--;
    }
  }
  if (begin < j) {
    _quick_rec_central(vet, begin, j);
  }
  if (i < end) {
    _quick_rec_central(vet, i, end);
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<_quick_rec_central>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbp
  mov    %esi,%r10d
  mov    %edx,%r12d
  sub    %esi,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  add    %esi,%eax
  cltq
  mov    (%rdi,%rax,4),%esi
  mov    %r12d,%edx
  mov    %r10d,%ebx
  jmp    L44
L49:
  mov    %edi,(%r8)
  mov    %ecx,(%r9)
  add    $0x1,%ebx
  sub    $0x1,%edx
  jmp    L44
L121:
  cmp    %r10d,%edx
  jg     L31
L76:
  cmp    %r12d,%ebx
  jl     L135
L115:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L31:
  mov    %r10d,%esi
  mov    %rbp,%rdi
  call   <_quick_rec_central>
  jmp    L76
L135:
  mov    %r12d,%edx
  mov    %ebx,%esi
  mov    %rbp,%rdi
  call   <_quick_rec_central>
  jmp    L115
L7:
  movslq %edx,%rax
  lea    0x0(%rbp,%rax,4),%r9
  mov    (%r9),%edi
  cmp    %edi,%esi
  jge    L49
L56:
  movslq %edx,%rax
  lea    -0x4(%rbp,%rax,4),%rax
L111:
  sub    $0x1,%edx
  mov    %rax,%r9
  sub    $0x4,%rax
  mov    0x4(%rax),%edi
  cmp    %esi,%edi
  jg     L111
L21:
  cmp    %ebx,%edx
  jge    L49
L44:
  cmp    %edx,%ebx
  jg     L121
  movslq %ebx,%rax
  shl    $0x2,%rax
  lea    0x0(%rbp,%rax,1),%r8
  mov    (%r8),%ecx
  lea    0x4(%rbp,%rax,1),%rax
  cmp    %ecx,%esi
  jle    L7
L123:
  add    $0x1,%ebx
  mov    %rax,%r8
  add    $0x4,%rax
  mov    -0x4(%rax),%ecx
  cmp    %esi,%ecx
  jl     L123
  movslq %edx,%rax
  lea    0x0(%rbp,%rax,4),%r9
  mov    (%r9),%edi
  cmp    %edi,%esi
  jl     L56
  jmp    L21
```

assistant: ```c
void _quick_rec_central(int *vet, int begin, int end) {
  int i = begin, j = end;
  int tmp;
  int pivot = vet[begin + (end - begin) / 2];
  while (i <= j) {
    while (vet[i] < pivot)
      i++;
    while (vet[j] > pivot)
      j--;
    if (i <= j) {
      tmp = vet[i];
      vet[i] = vet[j];
      vet[j] = tmp;
      i++;
      j--;
    }
  }
  if (begin < j) {
    _quick_rec_central(vet, begin, j);
  }
  if (i < end) {
    _quick_rec_central(vet, i, end);
  }
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<_quick_rec_central>:
  endbr64
  push   %r12
  mov    %esi,%r10d
  mov    %rdi,%r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
L89:
  mov    %ebp,%edx
  mov    %r10d,%ebx
  sub    %r10d,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  mov    %ebp,%edx
  sar    %eax
  add    %r10d,%eax
  cltq
  mov    (%r12,%rax,4),%edi
  nopl   0x0(%rax)
L16:
  cmp    %edx,%ebx
  jg     L6
L0:
  movslq %ebx,%rax
  movslq %edx,%r11
  shl    $0x2,%rax
  lea    (%r12,%r11,4),%r9
  lea    (%r12,%rax,1),%rcx
  mov    (%r9),%r8d
  lea    0x4(%r12,%rax,1),%rax
  mov    (%rcx),%esi
  cmp    %edi,%esi
  jge    L128
  nopl   0x0(%rax)
L90:
  mov    %rax,%rcx
  mov    (%rax),%esi
  lea    0x4(%rax),%rax
  add    $0x1,%ebx
  cmp    %edi,%esi
  jl     L90
  cmp    %r8d,%edi
  jge    L35
L117:
  lea    -0x4(%r12,%r11,4),%rax
  nopw   0x0(%rax,%rax,1)
L39:
  mov    %rax,%r9
  mov    (%rax),%r8d
  sub    $0x4,%rax
  sub    $0x1,%edx
  cmp    %edi,%r8d
  jg     L39
L35:
  cmp    %ebx,%edx
  jl     L16
  mov    %r8d,(%rcx)
  add    $0x1,%ebx
  sub    $0x1,%edx
  mov    %esi,(%r9)
L24:
  cmp    %edx,%ebx
  jle    L0
L6:
  cmp    %r10d,%edx
  jg     L113
L85:
  cmp    %ebp,%ebx
  jge    L112
  mov    %ebx,%r10d
  jmp    L89
  nop
L128:
  cmp    %r8d,%edi
  jl     L117
  mov    %r8d,(%rcx)
  add    $0x1,%ebx
  sub    $0x1,%edx
  mov    %esi,(%r9)
  jmp    L24
L112:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L113:
  mov    %r10d,%esi
  mov    %r12,%rdi
  call   <_quick_rec_central>
  jmp    L85
```

assistant: ```c
void _quick_rec_central(int *vet, int begin, int end) {
  int i = begin, j = end;
  int tmp;
  int pivot = vet[begin + (end - begin) / 2];
  while (i <= j) {
    while (vet[i] < pivot)
      i++;
    while (vet[j] > pivot)
      j--;
    if (i <= j) {
      tmp = vet[i];
      vet[i] = vet[j];
      vet[j] = tmp;
      i++;
      j--;
    }
  }
  if (begin < j) {
    _quick_rec_central(vet, begin, j);
  }
  if (i < end) {
    _quick_rec_central(vet, i, end);
  }
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<_quick_rec_central>:
  endbr64
  push   %r12
  mov    %esi,%r10d
  mov    %rdi,%r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
L75:
  mov    %ebp,%edx
  mov    %r10d,%ebx
  sub    %r10d,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  mov    %ebp,%edx
  sar    %eax
  add    %r10d,%eax
  cltq
  mov    (%r12,%rax,4),%edi
  nopl   0x0(%rax)
L33:
  cmp    %edx,%ebx
  jg     L58
L38:
  movslq %ebx,%rax
  movslq %edx,%r11
  shl    $0x2,%rax
  lea    (%r12,%r11,4),%r9
  lea    (%r12,%rax,1),%rcx
  mov    (%r9),%r8d
  lea    0x4(%r12,%rax,1),%rax
  mov    (%rcx),%esi
  cmp    %edi,%esi
  jge    L72
  nopl   0x0(%rax)
L85:
  mov    %rax,%rcx
  mov    (%rax),%esi
  lea    0x4(%rax),%rax
  add    $0x1,%ebx
  cmp    %edi,%esi
  jl     L85
  cmp    %r8d,%edi
  jge    L57
L16:
  lea    -0x4(%r12,%r11,4),%rax
  nopw   0x0(%rax,%rax,1)
L89:
  mov    %rax,%r9
  mov    (%rax),%r8d
  sub    $0x4,%rax
  sub    $0x1,%edx
  cmp    %edi,%r8d
  jg     L89
L57:
  cmp    %ebx,%edx
  jl     L33
  mov    %r8d,(%rcx)
  add    $0x1,%ebx
  sub    $0x1,%edx
  mov    %esi,(%r9)
L73:
  cmp    %edx,%ebx
  jle    L38
L58:
  cmp    %r10d,%edx
  jg     L127
L53:
  cmp    %ebp,%ebx
  jge    L70
  mov    %ebx,%r10d
  jmp    L75
  nop
L72:
  cmp    %r8d,%edi
  jl     L16
  mov    %r8d,(%rcx)
  add    $0x1,%ebx
  sub    $0x1,%edx
  mov    %esi,(%r9)
  jmp    L73
L70:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L127:
  mov    %r10d,%esi
  mov    %r12,%rdi
  call   <_quick_rec_central>
  jmp    L53
```

assistant: ```c
void _quick_rec_central(int *vet, int begin, int end) {
  int i = begin, j = end;
  int tmp;
  int pivot = vet[begin + (end - begin) / 2];
  while (i <= j) {
    while (vet[i] < pivot)
      i++;
    while (vet[j] > pivot)
      j--;
    if (i <= j) {
      tmp = vet[i];
      vet[i] = vet[j];
      vet[j] = tmp;
      i++;
      j--;
    }
  }
  if (begin < j) {
    _quick_rec_central(vet, begin, j);
  }
  if (i < end) {
    _quick_rec_central(vet, i, end);
  }
}
```