ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将以下的汇编代码转换成C语言代码:

```asm
<nospacein>:
  endbr64
  movzbl (%rdi),%eax
  test   %al,%al
  je     L20
L27:
  cmp    $0x20,%al
  je     L22
  cmp    $0x9,%al
  je     L22
  add    $0x1,%rdi
  movzbl (%rdi),%eax
  test   %al,%al
  jne    L27
  mov    $0x1,%eax
  ret
L20:
  mov    $0x1,%eax
  ret
L22:
  mov    $0x0,%eax
  ret
```

assistant: ```c
int nospacein(char *s) {
  while (*s) {
    if (*s == ' ' || *s == '\t')
      return 0;
    s++;
  }
  return 1;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<nospacein>:
  endbr64
  jmp    L37
  cs nopw 0x0(%rax,%rax,1)
L25:
  cmp    $0x20,%al
  je     L31
  cmp    $0x9,%al
  je     L31
  add    $0x1,%rdi
L37:
  movzbl (%rdi),%eax
  test   %al,%al
  jne    L25
  mov    $0x1,%eax
  ret
  nopl   0x0(%rax)
L31:
  xor    %eax,%eax
  ret
```

assistant: ```c
int nospacein(char *s) {
  while (*s) {
    if (*s == ' ' || *s == '\t')
      return 0;
    s++;
  }
  return 1;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<nospacein>:
  endbr64
  jmp    L1
  cs nopw 0x0(%rax,%rax,1)
L5:
  cmp    $0x20,%al
  je     L25
  cmp    $0x9,%al
  je     L25
  add    $0x1,%rdi
L1:
  movzbl (%rdi),%eax
  test   %al,%al
  jne    L5
  mov    $0x1,%eax
  ret
  nopl   0x0(%rax)
L25:
  xor    %eax,%eax
  ret
```

assistant: ```c
int nospacein(char *s) {
  while (*s) {
    if (*s == ' ' || *s == '\t')
      return 0;
    s++;
  }
  return 1;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<shrd_reg32_reg32_cl>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %edi,-0x4(%rbp)
  mov    %esi,-0x8(%rbp)
  mov    $0xf,%edi
  call   <put8@plt>
  mov    $0xad,%edi
  call   <put8@plt>
  mov    -0x8(%rbp),%eax
  shl    $0x3,%eax
  or     -0x4(%rbp),%eax
  or     $0xc0,%al
  mov    %eax,%edi
  call   <put8@plt>
  nop
  leave
  ret
```

assistant: ```c
void shrd_reg32_reg32_cl(unsigned int reg1, unsigned int reg2) {
  put8(0x0F);
  put8(0xAD);
  put8(0xC0 | (reg2 << 3) | reg1);
}
```
user: Translate the below assembly code into C programming language:

```asm
<shrd_reg32_reg32_cl>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%ebp
  mov    %esi,%ebx
  mov    $0xf,%edi
  call   <put8@plt>
  mov    $0xad,%edi
  call   <put8@plt>
  lea    0x0(,%rbx,8),%edi
  or     %ebp,%edi
  or     $0xc0,%dil
  call   <put8@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
void shrd_reg32_reg32_cl(unsigned int reg1, unsigned int reg2) {
  put8(0x0F);
  put8(0xAD);
  put8(0xC0 | (reg2 << 3) | reg1);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<shrd_reg32_reg32_cl>:
  endbr64
  push   %rbp
  mov    %edi,%ebp
  mov    $0xf,%edi
  push   %rbx
  mov    %esi,%ebx
  sub    $0x8,%rsp
  call   <put8@plt>
  mov    $0xad,%edi
  call   <put8@plt>
  lea    0x0(,%rbx,8),%edi
  add    $0x8,%rsp
  or     %ebp,%edi
  pop    %rbx
  pop    %rbp
  or     $0xc0,%dil
  jmp    1050 <put8@plt>
```

assistant: ```c
void shrd_reg32_reg32_cl(unsigned int reg1, unsigned int reg2) {
  put8(0x0F);
  put8(0xAD);
  put8(0xC0 | (reg2 << 3) | reg1);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<shrd_reg32_reg32_cl>:
  endbr64
  push   %rbp
  mov    %edi,%ebp
  mov    $0xf,%edi
  push   %rbx
  mov    %esi,%ebx
  sub    $0x8,%rsp
  call   <put8@plt>
  mov    $0xad,%edi
  call   <put8@plt>
  lea    0x0(,%rbx,8),%edi
  add    $0x8,%rsp
  or     %ebp,%edi
  pop    %rbx
  pop    %rbp
  or     $0xc0,%dil
  jmp    1050 <put8@plt>
```

assistant: ```c
void shrd_reg32_reg32_cl(unsigned int reg1, unsigned int reg2) {
  put8(0x0F);
  put8(0xAD);
  put8(0xC0 | (reg2 << 3) | reg1);
}
```
user: Translate the below assembly code into C programming language:

```asm
<test_end>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L9
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <cerr@plt>
L9:
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D9
type: string

tool: D9: Too many arguments

assistant: ```c
void test_end(char *k) {
  if (k)
    cerr("Too many arguments");
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<test_end>:
  endbr64
  test   %rdi,%rdi
  je     L9
  sub    $0x8,%rsp
  lea    D6(%rip),%rdi
  call   <cerr@plt>
  add    $0x8,%rsp
  ret
L9:
  ret
```

tool_calls: name: disassemble_data
arguments: label: D6
type: string

tool: D6: Too many arguments

assistant: ```c
void test_end(char *k) {
  if (k)
    cerr("Too many arguments");
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<test_end>:
  endbr64
  test   %rdi,%rdi
  je     L7
  lea    D0(%rip),%rdi
  jmp    1050 <cerr@plt>
  nopl   (%rax)
L7:
  ret
```

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

tool: D0: Too many arguments

assistant: ```c
void test_end(char *k) {
  if (k)
    cerr("Too many arguments");
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<test_end>:
  endbr64
  test   %rdi,%rdi
  je     L1
  lea    D1(%rip),%rdi
  jmp    1050 <cerr@plt>
  nopl   (%rax)
L1:
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D1
type_guessed: string

tool: D1: Too many arguments

assistant: ```c
void test_end(char *k) {
  if (k)
    cerr("Too many arguments");
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<line_search>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L12
  cmpq   $0x0,-0x20(%rbp)
  je     L12
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L42
L12:
  mov    $0x0,%eax
  jmp    L78
L42:
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x4(%rbp)
  jmp    L84
L66:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L53
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L11
  mov    -0x4(%rbp),%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L11
  mov    $0x0,%eax
  jmp    L78
L11:
  addq   $0x1,-0x18(%rbp)
L84:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L66
  jmp    L26
L53:
  nop
L26:
  mov    $0x1,%eax
L78:
  leave
  ret
```

assistant: ```c
int line_search(char *line, char *search) {
  int len;
  if (line == NULL || search == NULL || !*search)
    return 0;
  len = strlen(search);
  while (*line) {
    if (*line == '\n')
      break;
    if (*line == *search && !strncmp(line, search, len))
      return 0;
    line++;
  }
  return 1;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<line_search>:
  endbr64
  test   %rdi,%rdi
  je     L81
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  test   %rsi,%rsi
  je     L18
  mov    $0x0,%eax
  cmpb   $0x0,(%rsi)
  jne    L26
L117:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L26:
  mov    %rsi,%rdi
  call   <strlen@plt>
  mov    %eax,%r12d
  movzbl (%rbx),%eax
  cmp    $0xa,%al
  je     L129
  test   %al,%al
  jne    L87
L129:
  mov    $0x1,%eax
  jmp    L117
L63:
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  cmp    $0xa,%al
  je     L56
  test   %al,%al
  je     L56
L87:
  cmp    %al,0x0(%rbp)
  jne    L63
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L63
  jmp    L117
L56:
  mov    $0x1,%eax
  jmp    L117
L18:
  mov    $0x0,%eax
  jmp    L117
L81:
  mov    $0x0,%eax
  ret
```

assistant: ```c
int line_search(char *line, char *search) {
  int len;
  if (line == NULL || search == NULL || !*search)
    return 0;
  len = strlen(search);
  while (*line) {
    if (*line == '\n')
      break;
    if (*line == *search && !strncmp(line, search, len))
      return 0;
    line++;
  }
  return 1;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<line_search>:
  endbr64
  test   %rdi,%rdi
  je     L40
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  test   %rsi,%rsi
  je     L3
  cmpb   $0x0,(%rsi)
  jne    L0
L3:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L0:
  mov    %rdi,%rbx
  mov    %rsi,%rdi
  call   <strlen@plt>
  mov    %eax,%r12d
  movzbl (%rbx),%eax
  cmp    $0xa,%al
  je     L13
  test   %al,%al
  jne    L97
  jmp    L13
  nopl   0x0(%rax,%rax,1)
L98:
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  test   %al,%al
  je     L13
L73:
  cmp    $0xa,%al
  je     L13
L97:
  cmp    %al,0x0(%rbp)
  jne    L98
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L3
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  test   %al,%al
  jne    L73
L13:
  pop    %rbx
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L40:
  xor    %eax,%eax
  ret
```

assistant: ```c
int line_search(char *line, char *search) {
  int len;
  if (line == NULL || search == NULL || !*search)
    return 0;
  len = strlen(search);
  while (*line) {
    if (*line == '\n')
      break;
    if (*line == *search && !strncmp(line, search, len))
      return 0;
    line++;
  }
  return 1;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<line_search>:
  endbr64
  test   %rdi,%rdi
  je     L7
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  test   %rsi,%rsi
  je     L92
  cmpb   $0x0,(%rsi)
  jne    L28
L92:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L28:
  mov    %rdi,%rbx
  mov    %rsi,%rdi
  call   <strlen@plt>
  mov    %eax,%r12d
  movzbl (%rbx),%eax
  cmp    $0xa,%al
  je     L96
  test   %al,%al
  jne    L103
  jmp    L96
  nopl   0x0(%rax,%rax,1)
L47:
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  test   %al,%al
  je     L96
L70:
  cmp    $0xa,%al
  je     L96
L103:
  cmp    %al,0x0(%rbp)
  jne    L47
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L92
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  test   %al,%al
  jne    L70
L96:
  pop    %rbx
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L7:
  xor    %eax,%eax
  ret
```

assistant: ```c
int line_search(char *line, char *search) {
  int len;
  if (line == NULL || search == NULL || !*search)
    return 0;
  len = strlen(search);
  while (*line) {
    if (*line == '\n')
      break;
    if (*line == *search && !strncmp(line, search, len))
      return 0;
    line++;
  }
  return 1;
}
```
user: Translate the below assembly code into C programming language:

```asm
<xrealloc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L7
  mov    $0x0,%eax
  call   <memory_error@plt>
L7:
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
void *xrealloc(void *ptr, size_t size) {
  void *p = realloc(ptr, size);
  if (!p)
    memory_error();
  return p;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<xrealloc>:
  endbr64
  push   %rbx
  call   <realloc@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L9
L8:
  mov    %rbx,%rax
  pop    %rbx
  ret
L9:
  mov    $0x0,%eax
  call   <memory_error@plt>
  jmp    L8
```

assistant: ```c
void *xrealloc(void *ptr, size_t size) {
  void *p = realloc(ptr, size);
  if (!p)
    memory_error();
  return p;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<xrealloc>:
  endbr64
  push   %r12
  call   <realloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L7
L16:
  mov    %r12,%rax
  pop    %r12
  ret
L7:
  xor    %eax,%eax
  call   <memory_error@plt>
  jmp    L16
```

assistant: ```c
void *xrealloc(void *ptr, size_t size) {
  void *p = realloc(ptr, size);
  if (!p)
    memory_error();
  return p;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<xrealloc>:
  endbr64
  push   %r12
  call   <realloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L11
L19:
  mov    %r12,%rax
  pop    %r12
  ret
L11:
  xor    %eax,%eax
  call   <memory_error@plt>
  jmp    L19
```

assistant: ```c
void *xrealloc(void *ptr, size_t size) {
  void *p = realloc(ptr, size);
  if (!p)
    memory_error();
  return p;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  lea    D23(%rip),%rax
  mov    %rax,%rsi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L12
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0xffffffff,%eax
  jmp    L19
L12:
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <gen_headers@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <gen_filter_tab@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <gen_footers@plt>
  mov    $0x0,%eax
L19:
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D23
type: string
name: parse_data
arguments: tag: D7
type: string

tool: D23: w

tool: D7: dsptables.h

assistant: ```c
int main(int argc, char **argv) {
  FILE *of;
  of = fopen("dsptables.h", "w");
  if (of == NULL) {
    perror("dsptables.h");
    return -1;
  }
  gen_headers(of);
  gen_filter_tab(of);
  gen_footers(of);
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<main>:
  endbr64
  push   %rbx
  lea    D13(%rip),%rsi
  lea    D9(%rip),%rdi
  call   <fopen@plt>
  test   %rax,%rax
  je     L11
  mov    %rax,%rbx
  mov    %rax,%rdi
  call   <gen_headers@plt>
  mov    %rbx,%rdi
  call   <gen_filter_tab@plt>
  mov    %rbx,%rdi
  call   <gen_footers@plt>
  mov    $0x0,%eax
L8:
  pop    %rbx
  ret
L11:
  lea    D9(%rip),%rdi
  call   <perror@plt>
  mov    $0xffffffff,%eax
  jmp    L8
```

tool_calls: name: read_data
arguments: label: D13
type_infered: string
name: read_data
arguments: label: D9
type_infered: string

tool: D13: w

tool: D9: dsptables.h

assistant: ```c
int main(int argc, char **argv) {
  FILE *of;
  of = fopen("dsptables.h", "w");
  if (of == NULL) {
    perror("dsptables.h");
    return -1;
  }
  gen_headers(of);
  gen_filter_tab(of);
  gen_footers(of);
  return 0;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<main>:
  endbr64
  push   %r12
  lea    D8(%rip),%r12
  lea    D17(%rip),%rsi
  push   %rbp
  mov    %r12,%rdi
  sub    $0x8,%rsp
  call   <fopen@plt>
  test   %rax,%rax
  je     L6
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <gen_headers@plt>
  mov    %rbp,%rdi
  call   <gen_filter_tab@plt>
  mov    %rbp,%rdi
  call   <gen_footers@plt>
  xor    %eax,%eax
L1:
  add    $0x8,%rsp
  pop    %rbp
  pop    %r12
  ret
L6:
  mov    %r12,%rdi
  call   <perror@plt>
  or     $0xffffffff,%eax
  jmp    L1
```

tool_calls: name: retrieve_data
arguments: tag: D8
data_type: string
name: retrieve_data
arguments: tag: D17
data_type: string

tool: D8: dsptables.h

tool: D17: w

assistant: ```c
int main(int argc, char **argv) {
  FILE *of;
  of = fopen("dsptables.h", "w");
  if (of == NULL) {
    perror("dsptables.h");
    return -1;
  }
  gen_headers(of);
  gen_filter_tab(of);
  gen_footers(of);
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r12
  lea    D7(%rip),%r12
  lea    D17(%rip),%rsi
  push   %rbp
  mov    %r12,%rdi
  sub    $0x8,%rsp
  call   <fopen@plt>
  test   %rax,%rax
  je     L2
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <gen_headers@plt>
  mov    %rbp,%rdi
  call   <gen_filter_tab@plt>
  mov    %rbp,%rdi
  call   <gen_footers@plt>
  xor    %eax,%eax
L15:
  add    $0x8,%rsp
  pop    %rbp
  pop    %r12
  ret
L2:
  mov    %r12,%rdi
  call   <perror@plt>
  or     $0xffffffff,%eax
  jmp    L15
```

tool_calls: name: unpack_data
arguments: data_tag: D7
type_infered: string
name: unpack_data
arguments: data_tag: D17
type_infered: string

tool: D7: dsptables.h

tool: D17: w

assistant: ```c
int main(int argc, char **argv) {
  FILE *of;
  of = fopen("dsptables.h", "w");
  if (of == NULL) {
    perror("dsptables.h");
    return -1;
  }
  gen_headers(of);
  gen_filter_tab(of);
  gen_footers(of);
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<pcie_dma_rw>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    $0x100000,%edx
  mov    $0x80c,%esi
  mov    %rax,%rdi
  call   <pci_write_config_dword@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x80,%edx
  mov    $0x710,%esi
  mov    %rax,%rdi
  call   <pci_write_config_dword@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x20,%edx
  mov    $0x78,%esi
  mov    %rax,%rdi
  call   <pci_write_config_dword@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x70200,%r9d
  mov    $0x8e6ff000,%r8d
  mov    $0x200,%ecx
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <nonll_dma_config@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x0,%r9d
  mov    $0x0,%r8d
  mov    $0x8e6ff000,%ecx
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <dma_imwr@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <dma_doorbell@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x8e6ff000,%r9d
  mov    $0x70200,%r8d
  mov    $0x200,%ecx
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <nonll_dma_config@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x1,%r9d
  mov    $0x0,%r8d
  mov    $0x8e6ff000,%ecx
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <dma_imwr@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <dma_doorbell@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <dma_com@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <dma_com@plt>
  nop
  leave
  ret
```

assistant: ```c
void pcie_dma_rw(struct pci_dev *pdev) {
  pci_write_config_dword(pdev, ((0x0 + 0x700) + 0x10c), 0x00100000);
  pci_write_config_dword(pdev, ((0x0 + 0x700) + 0x10), 0x80);
  pci_write_config_dword(pdev, ((0x0 + 0x70) + 0x8), (0x1 << 5));
  nonll_dma_config(pdev, 0, 1, 0x200, 0x8e6ff000, 0x00070000 + 0x200);
  dma_imwr(pdev, 0, 1, 0x8e6ff000, 0, 0x0);
  dma_doorbell(pdev, 0, 1);
  nonll_dma_config(pdev, 0, 0, 0x200, 0x00070000 + 0x200, 0x8e6ff000);
  dma_imwr(pdev, 0, 0, 0x8e6ff000, 0, 0x1);
  dma_doorbell(pdev, 0, 0);
  dma_com(pdev, 0, 1);
  dma_com(pdev, 0, 0);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<pcie_dma_rw>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  mov    $0x100000,%edx
  mov    $0x80c,%esi
  call   <pci_write_config_dword@plt>
  mov    $0x80,%edx
  mov    $0x710,%esi
  mov    %rbx,%rdi
  call   <pci_write_config_dword@plt>
  mov    $0x20,%edx
  mov    $0x78,%esi
  mov    %rbx,%rdi
  call   <pci_write_config_dword@plt>
  mov    $0x70200,%r9d
  mov    $0x8e6ff000,%r8d
  mov    $0x200,%ecx
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <nonll_dma_config@plt>
  mov    $0x0,%r9d
  mov    $0x0,%r8d
  mov    $0x8e6ff000,%ecx
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <dma_imwr@plt>
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <dma_doorbell@plt>
  mov    $0x8e6ff000,%r9d
  mov    $0x70200,%r8d
  mov    $0x200,%ecx
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <nonll_dma_config@plt>
  mov    $0x1,%r9d
  mov    $0x0,%r8d
  mov    $0x8e6ff000,%ecx
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <dma_imwr@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <dma_doorbell@plt>
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <dma_com@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <dma_com@plt>
  pop    %rbx
  ret
```

assistant: ```c
void pcie_dma_rw(struct pci_dev *pdev) {
  pci_write_config_dword(pdev, ((0x0 + 0x700) + 0x10c), 0x00100000);
  pci_write_config_dword(pdev, ((0x0 + 0x700) + 0x10), 0x80);
  pci_write_config_dword(pdev, ((0x0 + 0x70) + 0x8), (0x1 << 5));
  nonll_dma_config(pdev, 0, 1, 0x200, 0x8e6ff000, 0x00070000 + 0x200);
  dma_imwr(pdev, 0, 1, 0x8e6ff000, 0, 0x0);
  dma_doorbell(pdev, 0, 1);
  nonll_dma_config(pdev, 0, 0, 0x200, 0x00070000 + 0x200, 0x8e6ff000);
  dma_imwr(pdev, 0, 0, 0x8e6ff000, 0, 0x1);
  dma_doorbell(pdev, 0, 0);
  dma_com(pdev, 0, 1);
  dma_com(pdev, 0, 0);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<pcie_dma_rw>:
  endbr64
  push   %rbp
  mov    $0x100000,%edx
  mov    %rdi,%rbp
  mov    $0x80c,%esi
  call   <pci_write_config_dword@plt>
  mov    %rbp,%rdi
  mov    $0x80,%edx
  mov    $0x710,%esi
  call   <pci_write_config_dword@plt>
  mov    %rbp,%rdi
  mov    $0x20,%edx
  mov    $0x78,%esi
  call   <pci_write_config_dword@plt>
  mov    %rbp,%rdi
  mov    $0x70200,%r9d
  xor    %esi,%esi
  mov    $0x8e6ff000,%r8d
  mov    $0x200,%ecx
  mov    $0x1,%edx
  call   <nonll_dma_config@plt>
  xor    %r9d,%r9d
  xor    %r8d,%r8d
  mov    $0x8e6ff000,%ecx
  mov    %rbp,%rdi
  mov    $0x1,%edx
  xor    %esi,%esi
  call   <dma_imwr@plt>
  mov    %rbp,%rdi
  mov    $0x1,%edx
  xor    %esi,%esi
  call   <dma_doorbell@plt>
  mov    %rbp,%rdi
  mov    $0x8e6ff000,%r9d
  xor    %edx,%edx
  mov    $0x70200,%r8d
  mov    $0x200,%ecx
  xor    %esi,%esi
  call   <nonll_dma_config@plt>
  mov    $0x1,%r9d
  xor    %r8d,%r8d
  xor    %edx,%edx
  mov    $0x8e6ff000,%ecx
  mov    %rbp,%rdi
  xor    %esi,%esi
  call   <dma_imwr@plt>
  mov    %rbp,%rdi
  xor    %edx,%edx
  xor    %esi,%esi
  call   <dma_doorbell@plt>
  mov    %rbp,%rdi
  mov    $0x1,%edx
  xor    %esi,%esi
  call   <dma_com@plt>
  mov    %rbp,%rdi
  xor    %edx,%edx
  xor    %esi,%esi
  pop    %rbp
  jmp    10a0 <dma_com@plt>
```

assistant: ```c
void pcie_dma_rw(struct pci_dev *pdev) {
  pci_write_config_dword(pdev, ((0x0 + 0x700) + 0x10c), 0x00100000);
  pci_write_config_dword(pdev, ((0x0 + 0x700) + 0x10), 0x80);
  pci_write_config_dword(pdev, ((0x0 + 0x70) + 0x8), (0x1 << 5));
  nonll_dma_config(pdev, 0, 1, 0x200, 0x8e6ff000, 0x00070000 + 0x200);
  dma_imwr(pdev, 0, 1, 0x8e6ff000, 0, 0x0);
  dma_doorbell(pdev, 0, 1);
  nonll_dma_config(pdev, 0, 0, 0x200, 0x00070000 + 0x200, 0x8e6ff000);
  dma_imwr(pdev, 0, 0, 0x8e6ff000, 0, 0x1);
  dma_doorbell(pdev, 0, 0);
  dma_com(pdev, 0, 1);
  dma_com(pdev, 0, 0);
}
```
user: What is the c source code of the assembly code below:

```asm
<pcie_dma_rw>:
  endbr64
  push   %rbp
  mov    $0x100000,%edx
  mov    %rdi,%rbp
  mov    $0x80c,%esi
  call   <pci_write_config_dword@plt>
  mov    %rbp,%rdi
  mov    $0x80,%edx
  mov    $0x710,%esi
  call   <pci_write_config_dword@plt>
  mov    %rbp,%rdi
  mov    $0x20,%edx
  mov    $0x78,%esi
  call   <pci_write_config_dword@plt>
  mov    %rbp,%rdi
  mov    $0x70200,%r9d
  xor    %esi,%esi
  mov    $0x8e6ff000,%r8d
  mov    $0x200,%ecx
  mov    $0x1,%edx
  call   <nonll_dma_config@plt>
  xor    %r9d,%r9d
  xor    %r8d,%r8d
  mov    $0x8e6ff000,%ecx
  mov    %rbp,%rdi
  mov    $0x1,%edx
  xor    %esi,%esi
  call   <dma_imwr@plt>
  mov    %rbp,%rdi
  mov    $0x1,%edx
  xor    %esi,%esi
  call   <dma_doorbell@plt>
  mov    %rbp,%rdi
  mov    $0x8e6ff000,%r9d
  xor    %edx,%edx
  mov    $0x70200,%r8d
  mov    $0x200,%ecx
  xor    %esi,%esi
  call   <nonll_dma_config@plt>
  mov    $0x1,%r9d
  xor    %r8d,%r8d
  xor    %edx,%edx
  mov    $0x8e6ff000,%ecx
  mov    %rbp,%rdi
  xor    %esi,%esi
  call   <dma_imwr@plt>
  mov    %rbp,%rdi
  xor    %edx,%edx
  xor    %esi,%esi
  call   <dma_doorbell@plt>
  mov    %rbp,%rdi
  mov    $0x1,%edx
  xor    %esi,%esi
  call   <dma_com@plt>
  mov    %rbp,%rdi
  xor    %edx,%edx
  xor    %esi,%esi
  pop    %rbp
  jmp    10a0 <dma_com@plt>
```

assistant: ```c
void pcie_dma_rw(struct pci_dev *pdev) {
  pci_write_config_dword(pdev, ((0x0 + 0x700) + 0x10c), 0x00100000);
  pci_write_config_dword(pdev, ((0x0 + 0x700) + 0x10), 0x80);
  pci_write_config_dword(pdev, ((0x0 + 0x70) + 0x8), (0x1 << 5));
  nonll_dma_config(pdev, 0, 1, 0x200, 0x8e6ff000, 0x00070000 + 0x200);
  dma_imwr(pdev, 0, 1, 0x8e6ff000, 0, 0x0);
  dma_doorbell(pdev, 0, 1);
  nonll_dma_config(pdev, 0, 0, 0x200, 0x00070000 + 0x200, 0x8e6ff000);
  dma_imwr(pdev, 0, 0, 0x8e6ff000, 0, 0x1);
  dma_doorbell(pdev, 0, 0);
  dma_com(pdev, 0, 1);
  dma_com(pdev, 0, 0);
}
```