ylfeng/ReF-Decompile-dataset huggingface dataset:
user: What is the c source code of the assembly code below?

```asm
<mp2vseqx_set_horizontal>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,-0xc(%rbp)
  mov    -0x8(%rbp),%rax
  add    $0x14,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x14,%rax
  and    $0xfe,%edx
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x14,%rax
  mov    (%rax),%edx
  mov    -0xc(%rbp),%eax
  sar    %eax
  and    $0x1,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  add    $0x14,%rax
  or     %ecx,%edx
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x18,%rax
  and    $0x7f,%edx
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%ecx
  mov    -0xc(%rbp),%eax
  shl    $0x7,%eax
  movzbl %al,%edx
  mov    -0x8(%rbp),%rax
  add    $0x18,%rax
  or     %ecx,%edx
  mov    %edx,(%rax)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void mp2vseqx_set_horizontal(uint8_t *p_mp2vseqx, uint8_t i_horizontal) {
  p_mp2vseqx[5] &= 0xfe;
  p_mp2vseqx[5] |= (i_horizontal >> 1) & 0x1;
  p_mp2vseqx[6] &= 0x7f;
  p_mp2vseqx[6] |= (i_horizontal << 7) & 0x80;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<mp2vseqx_set_horizontal>:
  endbr64
  mov    0x14(%rdi),%eax
  and    $0xfe,%eax
  mov    %esi,%edx
  sar    %edx
  and    $0x1,%edx
  or     %edx,%eax
  mov    %eax,0x14(%rdi)
  mov    0x18(%rdi),%eax
  and    $0x7f,%eax
  shl    $0x7,%esi
  movzbl %sil,%esi
  or     %esi,%eax
  mov    %eax,0x18(%rdi)
  ret
```

assistant: ```c
void mp2vseqx_set_horizontal(uint8_t *p_mp2vseqx, uint8_t i_horizontal) {
  p_mp2vseqx[5] &= 0xfe;
  p_mp2vseqx[5] |= (i_horizontal >> 1) & 0x1;
  p_mp2vseqx[6] &= 0x7f;
  p_mp2vseqx[6] |= (i_horizontal << 7) & 0x80;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<mp2vseqx_set_horizontal>:
  endbr64
  mov    0x14(%rdi),%eax
  mov    %esi,%edx
  shl    $0x7,%esi
  sar    %edx
  movzbl %sil,%esi
  and    $0xfe,%eax
  and    $0x1,%edx
  or     %edx,%eax
  mov    %eax,0x14(%rdi)
  mov    0x18(%rdi),%eax
  and    $0x7f,%eax
  or     %esi,%eax
  mov    %eax,0x18(%rdi)
  ret
```

assistant: ```c
void mp2vseqx_set_horizontal(uint8_t *p_mp2vseqx, uint8_t i_horizontal) {
  p_mp2vseqx[5] &= 0xfe;
  p_mp2vseqx[5] |= (i_horizontal >> 1) & 0x1;
  p_mp2vseqx[6] &= 0x7f;
  p_mp2vseqx[6] |= (i_horizontal << 7) & 0x80;
}
```
user: What is the c source code of the assembly code below?

```asm
<mp2vseqx_set_horizontal>:
  endbr64
  movq   D19(%rip),%xmm1
  mov    %esi,%eax
  shl    $0x7,%esi
  movq   D18(%rip),%xmm2
  sar    %eax
  movd   %esi,%xmm3
  movd   %eax,%xmm0
  punpckldq %xmm3,%xmm0
  pand   %xmm1,%xmm0
  movq   0x14(%rdi),%xmm1
  pand   %xmm2,%xmm1
  por    %xmm1,%xmm0
  movq   %xmm0,0x14(%rdi)
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D19
type_guessed: byte[8]
name: disassemble_data
arguments: data_label: D18
type_guessed: byte[8]

tool: {"D19": [0x01,0x00,0x00,0x00,0xff,0x00,0x00,0x00]}

tool: {"D18": [0xfe,0x00,0x00,0x00,0x7f,0x00,0x00,0x00]}

assistant: ```c
void mp2vseqx_set_horizontal(uint8_t *p_mp2vseqx, uint8_t i_horizontal) {
  p_mp2vseqx[5] &= 0xfe;
  p_mp2vseqx[5] |= (i_horizontal >> 1) & 0x1;
  p_mp2vseqx[6] &= 0x7f;
  p_mp2vseqx[6] |= (i_horizontal << 7) & 0x80;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<termp_fd_pre>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    %rcx,-0x20(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <synopsis_pre@plt>
  mov    -0x20(%rbp),%rcx
  mov    -0x18(%rbp),%rdx
  mov    -0x10(%rbp),%rsi
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <termp_bold_pre@plt>
  leave
  ret
```

assistant: ```c
int termp_fd_pre(struct termp *p, struct termpair *pair, const struct roff_meta *meta, struct roff_node *n) {
  synopsis_pre(p, n);
  return termp_bold_pre(p, pair, meta, n);
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<termp_fd_pre>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r12
  mov    %rdx,%r13
  mov    %rcx,%rbp
  mov    %rcx,%rsi
  call   <synopsis_pre@plt>
  mov    %rbp,%rcx
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <termp_bold_pre@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
int termp_fd_pre(struct termp *p, struct termpair *pair, const struct roff_meta *meta, struct roff_node *n) {
  synopsis_pre(p, n);
  return termp_bold_pre(p, pair, meta, n);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<termp_fd_pre>:
  endbr64
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %rsi,%r13
  mov    %rcx,%rsi
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x8,%rsp
  call   <synopsis_pre@plt>
  add    $0x8,%rsp
  mov    %r12,%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1060 <termp_bold_pre@plt>
```

assistant: ```c
int termp_fd_pre(struct termp *p, struct termpair *pair, const struct roff_meta *meta, struct roff_node *n) {
  synopsis_pre(p, n);
  return termp_bold_pre(p, pair, meta, n);
}
```
user: What is the c source code of the assembly code below:

```asm
<termp_fd_pre>:
  endbr64
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %rsi,%r13
  mov    %rcx,%rsi
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x8,%rsp
  call   <synopsis_pre@plt>
  add    $0x8,%rsp
  mov    %r12,%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1060 <termp_bold_pre@plt>
```

assistant: ```c
int termp_fd_pre(struct termp *p, struct termpair *pair, const struct roff_meta *meta, struct roff_node *n) {
  synopsis_pre(p, n);
  return termp_bold_pre(p, pair, meta, n);
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %edi,-0x4(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    $0x0,%eax
  call   <init@plt>
  mov    $0x0,%eax
  call   <shell@plt>
  mov    $0x0,%eax
  leave
  ret
```

assistant: ```c
int main(int argc, char **argv) {
  init();
  shell();
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <init@plt>
  mov    $0x0,%eax
  call   <shell@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int main(int argc, char **argv) {
  init();
  shell();
  return 0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <init@plt>
  xor    %eax,%eax
  call   <shell@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int main(int argc, char **argv) {
  init();
  shell();
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <init@plt>
  xor    %eax,%eax
  call   <shell@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int main(int argc, char **argv) {
  init();
  shell();
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  movl   $0xa,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x28(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L7:
  cmp    %rdx,%rsp
  je     L65
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L7
L65:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L33
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L33:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x20(%rbp)
  cmpl   $0x2,-0x34(%rbp)
  je     L72
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L27
L72:
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x2c(%rbp)
  jge    L36
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L27
L36:
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
L27:
  mov    %rbx,%rsp
  mov    $0x0,%eax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L26
  call   <__stack_chk_fail@plt>
L26:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D5
data_type: string
name: extract_symbolic_data
arguments: label: D17
data_type: string

tool: D5: Incorrect number of inputs!


tool: D17: argument length is too long!


assistant: ```c
int main(int argc, char **argv) {
  int bufLen = 10;
  char buf[bufLen];
  if (argc != 2) {
    printf("Incorrect number of inputs!\n");
  } else {
    if (strlen(argv[1]) > bufLen) {
      printf("argument length is too long!\n");
    } else {
      strcpy(buf, argv[1]);
    }
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  cmp    $0x2,%edi
  je     L36
  lea    D8(%rip),%rdi
  call   <printf@plt>
L12:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L39
  mov    $0x0,%eax
  add    $0x20,%rsp
  pop    %rbx
  ret
L36:
  mov    %rsi,%rbx
  mov    0x8(%rsi),%rdi
  call   <strlen@plt>
  cmp    $0xa,%eax
  jle    L44
  lea    D13(%rip),%rdi
  call   <printf@plt>
  jmp    L12
L44:
  mov    0x8(%rbx),%rsi
  lea    0xe(%rsp),%rdi
  call   <strcpy@plt>
  jmp    L12
L39:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D8
data_type: string
name: disassemble_data
arguments: tag: D13
data_type: string

tool: D8: Incorrect number of inputs!


tool: D13: argument length is too long!


assistant: ```c
int main(int argc, char **argv) {
  int bufLen = 10;
  char buf[bufLen];
  if (argc != 2) {
    printf("Incorrect number of inputs!\n");
  } else {
    if (strlen(argv[1]) > bufLen) {
      printf("argument length is too long!\n");
    } else {
      strcpy(buf, argv[1]);
    }
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<main>:
  endbr64
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  cmp    $0x2,%edi
  je     L39
  lea    D2(%rip),%rdi
  call   <printf@plt>
L35:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L48
  add    $0x20,%rsp
  xor    %eax,%eax
  pop    %rbx
  ret
L39:
  mov    0x8(%rsi),%rdi
  mov    %rsi,%rbx
  call   <strlen@plt>
  cmp    $0xa,%eax
  jle    L7
  lea    D19(%rip),%rdi
  call   <printf@plt>
  jmp    L35
L7:
  mov    0x8(%rbx),%rsi
  lea    0xe(%rsp),%rdi
  call   <strcpy@plt>
  jmp    L35
L48:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D2
type: string
name: retrieve_data
arguments: label: D19
type: string

tool: D2: Incorrect number of inputs!


tool: D19: argument length is too long!


assistant: ```c
int main(int argc, char **argv) {
  int bufLen = 10;
  char buf[bufLen];
  if (argc != 2) {
    printf("Incorrect number of inputs!\n");
  } else {
    if (strlen(argv[1]) > bufLen) {
      printf("argument length is too long!\n");
    } else {
      strcpy(buf, argv[1]);
    }
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<main>:
  endbr64
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  cmp    $0x2,%edi
  je     L25
  lea    D0(%rip),%rdi
  call   <printf@plt>
L28:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L24
  add    $0x20,%rsp
  xor    %eax,%eax
  pop    %rbx
  ret
L25:
  mov    0x8(%rsi),%rdi
  mov    %rsi,%rbx
  call   <strlen@plt>
  cmp    $0xa,%eax
  jle    L39
  lea    D19(%rip),%rdi
  call   <printf@plt>
  jmp    L28
L39:
  mov    0x8(%rbx),%rsi
  lea    0xe(%rsp),%rdi
  call   <strcpy@plt>
  jmp    L28
L24:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D0
data_type: string
name: extract_symbolic_data
arguments: tag: D19
data_type: string

tool: D0: Incorrect number of inputs!


tool: D19: argument length is too long!


assistant: ```c
int main(int argc, char **argv) {
  int bufLen = 10;
  char buf[bufLen];
  if (argc != 2) {
    printf("Incorrect number of inputs!\n");
  } else {
    if (strlen(argv[1]) > bufLen) {
      printf("argument length is too long!\n");
    } else {
      strcpy(buf, argv[1]);
    }
  }
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<mapTestsuiteRWDGet>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %r9d,-0x4c(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <mapGetKeySize@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <mapGetValueSize@plt>
  mov    %eax,-0x10(%rbp)
  mov    -0x4c(%rbp),%eax
  imul   -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <mapGetKeyID@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  jns    L80
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L29
  mov    $0x0,%eax
  jmp    L116
L29:
  mov    $0x1,%eax
  jmp    L116
L80:
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L114
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0xc(%rbp)
  jne    L106
  mov    -0xc(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <mapGetValueByID@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L70
  mov    $0x0,%eax
  jmp    L116
L70:
  mov    -0x4c(%rbp),%eax
  imul   -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x10(%rbp),%edx
  mov    -0x8(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  jne    L24
  mov    $0x1,%eax
  jmp    L116
L24:
  mov    $0x0,%eax
  jmp    L116
L106:
  mov    $0x0,%eax
  jmp    L116
L114:
  mov    $0x0,%eax
L116:
  leave
  ret
```

assistant: ```c
int mapTestsuiteRWDGet(struct s_map *map, unsigned char *keys, unsigned char *values, int *states, int *keyids, int nr) {
  int key_size = mapGetKeySize(map);
  int value_size = mapGetValueSize(map);
  int ret = mapGetKeyID(map, &keys[nr * key_size]);
  char *vptr;
  if (ret < 0) {
    if (states[nr]) {
      return 0;
    } else {
      return 1;
    }
  } else {
    if (states[nr]) {
      if (ret == keyids[nr]) {
        vptr = mapGetValueByID(map, ret);
        if (vptr == NULL)
          return 0;
        if (memcmp(&values[nr * value_size], vptr, value_size) == 0) {
          return 1;
        } else {
          return 0;
        }
      } else {
        return 0;
      }
    } else {
      return 0;
    }
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<mapTestsuiteRWDGet>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r12
  mov    %rsi,%r13
  mov    %rdx,0x8(%rsp)
  mov    %rcx,%r14
  mov    %r8,%r15
  mov    %r9d,%ebp
  call   <mapGetKeySize@plt>
  mov    %eax,%ebx
  mov    %r12,%rdi
  call   <mapGetValueSize@plt>
  mov    %eax,0x4(%rsp)
  imul   %ebp,%ebx
  movslq %ebx,%rbx
  lea    0x0(%r13,%rbx,1),%rsi
  mov    %r12,%rdi
  call   <mapGetKeyID@plt>
  test   %eax,%eax
  js     L44
  movslq %ebp,%rcx
  mov    (%r14,%rcx,4),%edx
  test   %edx,%edx
  je     L40
  mov    $0x0,%edx
  cmp    %eax,(%r15,%rcx,4)
  jne    L40
  mov    %eax,%esi
  mov    %r12,%rdi
  call   <mapGetValueByID@plt>
  mov    %rax,%rsi
  mov    $0x0,%edx
  test   %rax,%rax
  je     L40
  mov    0x4(%rsp),%edx
  imul   %edx,%ebp
  movslq %ebp,%rbp
  mov    0x8(%rsp),%rdi
  add    %rbp,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  sete   %dl
  movzbl %dl,%edx
  jmp    L40
L44:
  movslq %ebp,%rbp
  cmpl   $0x0,(%r14,%rbp,4)
  sete   %dl
  movzbl %dl,%edx
L40:
  mov    %edx,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int mapTestsuiteRWDGet(struct s_map *map, unsigned char *keys, unsigned char *values, int *states, int *keyids, int nr) {
  int key_size = mapGetKeySize(map);
  int value_size = mapGetValueSize(map);
  int ret = mapGetKeyID(map, &keys[nr * key_size]);
  char *vptr;
  if (ret < 0) {
    if (states[nr]) {
      return 0;
    } else {
      return 1;
    }
  } else {
    if (states[nr]) {
      if (ret == keyids[nr]) {
        vptr = mapGetValueByID(map, ret);
        if (vptr == NULL)
          return 0;
        if (memcmp(&values[nr * value_size], vptr, value_size) == 0) {
          return 1;
        } else {
          return 0;
        }
      } else {
        return 0;
      }
    } else {
      return 0;
    }
  }
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<mapTestsuiteRWDGet>:
  endbr64
  push   %r15
  mov    %rcx,%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %r8,%r13
  push   %r12
  mov    %r9d,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdx,0x8(%rsp)
  call   <mapGetKeySize@plt>
  mov    %r14,%rdi
  mov    %eax,%ebx
  call   <mapGetValueSize@plt>
  imul   %r12d,%ebx
  mov    %r14,%rdi
  mov    %eax,0x4(%rsp)
  movslq %ebx,%rbx
  lea    0x0(%rbp,%rbx,1),%rsi
  call   <mapGetKeyID@plt>
  mov    %eax,%esi
  movslq %r12d,%rax
  lea    (%r15,%rax,4),%rdx
  test   %esi,%esi
  js     L41
  mov    (%rdx),%edx
  test   %edx,%edx
  je     L6
  cmp    %esi,0x0(%r13,%rax,4)
  je     L23
L6:
  xor    %eax,%eax
L46:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L41:
  mov    (%rdx),%ecx
  xor    %eax,%eax
  test   %ecx,%ecx
  sete   %al
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L23:
  mov    %r14,%rdi
  call   <mapGetValueByID@plt>
  mov    %rax,%rsi
  test   %rax,%rax
  je     L6
  mov    0x4(%rsp),%edx
  mov    0x8(%rsp),%rdi
  imul   %edx,%r12d
  movslq %r12d,%r12
  add    %r12,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  sete   %al
  movzbl %al,%eax
  jmp    L46
```

assistant: ```c
int mapTestsuiteRWDGet(struct s_map *map, unsigned char *keys, unsigned char *values, int *states, int *keyids, int nr) {
  int key_size = mapGetKeySize(map);
  int value_size = mapGetValueSize(map);
  int ret = mapGetKeyID(map, &keys[nr * key_size]);
  char *vptr;
  if (ret < 0) {
    if (states[nr]) {
      return 0;
    } else {
      return 1;
    }
  } else {
    if (states[nr]) {
      if (ret == keyids[nr]) {
        vptr = mapGetValueByID(map, ret);
        if (vptr == NULL)
          return 0;
        if (memcmp(&values[nr * value_size], vptr, value_size) == 0) {
          return 1;
        } else {
          return 0;
        }
      } else {
        return 0;
      }
    } else {
      return 0;
    }
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<mapTestsuiteRWDGet>:
  endbr64
  push   %r15
  mov    %rcx,%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %r8,%r13
  push   %r12
  mov    %r9d,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdx,0x8(%rsp)
  call   <mapGetKeySize@plt>
  mov    %r14,%rdi
  mov    %eax,%ebx
  call   <mapGetValueSize@plt>
  imul   %r12d,%ebx
  mov    %r14,%rdi
  mov    %eax,0x4(%rsp)
  movslq %ebx,%rbx
  lea    0x0(%rbp,%rbx,1),%rsi
  call   <mapGetKeyID@plt>
  mov    %eax,%esi
  movslq %r12d,%rax
  lea    (%r15,%rax,4),%rdx
  test   %esi,%esi
  js     L11
  mov    (%rdx),%edx
  test   %edx,%edx
  je     L9
  cmp    %esi,0x0(%r13,%rax,4)
  je     L14
L9:
  xor    %eax,%eax
L49:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L11:
  mov    (%rdx),%ecx
  xor    %eax,%eax
  test   %ecx,%ecx
  sete   %al
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L14:
  mov    %r14,%rdi
  call   <mapGetValueByID@plt>
  mov    %rax,%rsi
  test   %rax,%rax
  je     L9
  mov    0x4(%rsp),%edx
  mov    0x8(%rsp),%rdi
  imul   %edx,%r12d
  movslq %r12d,%r12
  add    %r12,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  sete   %al
  movzbl %al,%eax
  jmp    L49
```

assistant: ```c
int mapTestsuiteRWDGet(struct s_map *map, unsigned char *keys, unsigned char *values, int *states, int *keyids, int nr) {
  int key_size = mapGetKeySize(map);
  int value_size = mapGetValueSize(map);
  int ret = mapGetKeyID(map, &keys[nr * key_size]);
  char *vptr;
  if (ret < 0) {
    if (states[nr]) {
      return 0;
    } else {
      return 1;
    }
  } else {
    if (states[nr]) {
      if (ret == keyids[nr]) {
        vptr = mapGetValueByID(map, ret);
        if (vptr == NULL)
          return 0;
        if (memcmp(&values[nr * value_size], vptr, value_size) == 0) {
          return 1;
        } else {
          return 0;
        }
      } else {
        return 0;
      }
    } else {
      return 0;
    }
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<destroy_win>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x20
  push   $0x20
  push   $0x20
  mov    $0x20,%r9d
  mov    $0x20,%r8d
  mov    $0x20,%ecx
  mov    $0x20,%edx
  mov    $0x20,%esi
  mov    %rax,%rdi
  call   <wborder@plt>
  add    $0x20,%rsp
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <wclear@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <wrefresh@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <delwin@plt>
  nop
  leave
  ret
```

assistant: ```c
void destroy_win(WINDOW *local_win) {
  wborder(local_win, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ');
  wclear(local_win);
  wrefresh(local_win);
  delwin(local_win);
}
```
user: What is the c source code of the assembly code below:

```asm
<destroy_win>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  push   $0x20
  push   $0x20
  push   $0x20
  mov    $0x20,%r9d
  mov    $0x20,%r8d
  mov    $0x20,%ecx
  mov    $0x20,%edx
  mov    $0x20,%esi
  call   <wborder@plt>
  add    $0x20,%rsp
  mov    %rbx,%rdi
  call   <wclear@plt>
  mov    %rbx,%rdi
  call   <wrefresh@plt>
  mov    %rbx,%rdi
  call   <delwin@plt>
  pop    %rbx
  ret
```

assistant: ```c
void destroy_win(WINDOW *local_win) {
  wborder(local_win, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ');
  wclear(local_win);
  wrefresh(local_win);
  delwin(local_win);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<destroy_win>:
  endbr64
  push   %rbp
  mov    $0x20,%r9d
  mov    %rdi,%rbp
  mov    $0x20,%r8d
  mov    $0x20,%ecx
  mov    $0x20,%edx
  mov    $0x20,%esi
  sub    $0x8,%rsp
  push   $0x20
  push   $0x20
  push   $0x20
  call   <wborder@plt>
  add    $0x20,%rsp
  mov    %rbp,%rdi
  call   <wclear@plt>
  mov    %rbp,%rdi
  call   <wrefresh@plt>
  mov    %rbp,%rdi
  pop    %rbp
  jmp    1090 <delwin@plt>
```

assistant: ```c
void destroy_win(WINDOW *local_win) {
  wborder(local_win, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ');
  wclear(local_win);
  wrefresh(local_win);
  delwin(local_win);
}
```