ylfeng/ReF-Decompile-dataset huggingface dataset:
user: What would the C source look like for the assembly code provided here?

```asm
<get_delta_hdr_size>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  movl   $0x0,-0x1c(%rbp)
L14:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  and    $0x7f,%eax
  mov    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  mov    %eax,%ecx
  shl    %cl,%rdx
  mov    %rdx,%rax
  or     %rax,-0x10(%rbp)
  addl   $0x7,-0x1c(%rbp)
  mov    -0x8(%rbp),%rax
  and    $0x80,%eax
  test   %rax,%rax
  je     L0
  mov    -0x18(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jb     L14
L0:
  mov    -0x28(%rbp),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x10(%rbp),%rax
  pop    %rbp
  ret
```

assistant: ```c
unsigned long get_delta_hdr_size(const unsigned char **datap, const unsigned char *top) {
  const unsigned char *data = *datap;
  unsigned long cmd, size = 0;
  int i = 0;
  do {
    cmd = *data++;
    size |= (cmd & 0x7f) << i;
    i += 7;
  } while (cmd & 0x80 && data < top);
  *datap = data;
  return size;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<get_delta_hdr_size>:
  endbr64
  mov    (%rdi),%rax
  mov    $0x0,%ecx
  mov    $0x0,%r9d
L9:
  add    $0x1,%rax
  movzbl -0x1(%rax),%r8d
  mov    %r8,%rdx
  and    $0x7f,%edx
  shl    %cl,%rdx
  or     %rdx,%r9
  add    $0x7,%ecx
  cmp    %rsi,%rax
  jae    L5
  test   %r8b,%r8b
  js     L9
L5:
  mov    %rax,(%rdi)
  mov    %r9,%rax
  ret
```

assistant: ```c
unsigned long get_delta_hdr_size(const unsigned char **datap, const unsigned char *top) {
  const unsigned char *data = *datap;
  unsigned long cmd, size = 0;
  int i = 0;
  do {
    cmd = *data++;
    size |= (cmd & 0x7f) << i;
    i += 7;
  } while (cmd & 0x80 && data < top);
  *datap = data;
  return size;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<get_delta_hdr_size>:
  endbr64
  mov    (%rdi),%rax
  xor    %ecx,%ecx
  xor    %r9d,%r9d
  jmp    L6
  xchg   %ax,%ax
L11:
  cmp    %rsi,%rax
  jae    L2
L6:
  movzbl (%rax),%r8d
  add    $0x1,%rax
  mov    %r8,%rdx
  and    $0x7f,%edx
  shl    %cl,%rdx
  add    $0x7,%ecx
  or     %rdx,%r9
  test   %r8b,%r8b
  js     L11
L2:
  mov    %rax,(%rdi)
  mov    %r9,%rax
  ret
```

assistant: ```c
unsigned long get_delta_hdr_size(const unsigned char **datap, const unsigned char *top) {
  const unsigned char *data = *datap;
  unsigned long cmd, size = 0;
  int i = 0;
  do {
    cmd = *data++;
    size |= (cmd & 0x7f) << i;
    i += 7;
  } while (cmd & 0x80 && data < top);
  *datap = data;
  return size;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<get_delta_hdr_size>:
  endbr64
  mov    (%rdi),%rax
  xor    %ecx,%ecx
  xor    %r9d,%r9d
  jmp    L12
  xchg   %ax,%ax
L29:
  cmp    %rsi,%rax
  jae    L9
L12:
  movzbl (%rax),%r8d
  add    $0x1,%rax
  mov    %r8,%rdx
  and    $0x7f,%edx
  shl    %cl,%rdx
  add    $0x7,%ecx
  or     %rdx,%r9
  test   %r8b,%r8b
  js     L29
L9:
  mov    %rax,(%rdi)
  mov    %r9,%rax
  ret
```

assistant: ```c
unsigned long get_delta_hdr_size(const unsigned char **datap, const unsigned char *top) {
  const unsigned char *data = *datap;
  unsigned long cmd, size = 0;
  int i = 0;
  do {
    cmd = *data++;
    size |= (cmd & 0x7f) << i;
    i += 7;
  } while (cmd & 0x80 && data < top);
  *datap = data;
  return size;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xf0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x64,%esi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0xe0(%rbp),%rax
  mov    %rax,%rsi
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0xec(%rbp),%rdx
  lea    -0xf0(%rbp),%rax
  mov    %rax,%rsi
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0xec(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xe8(%rbp)
  movl   $0x0,-0xe4(%rbp)
  jmp    L26
L18:
  mov    -0xe8(%rbp),%eax
  cltq
  movzbl -0xe0(%rbp,%rax,1),%edx
  mov    -0xe4(%rbp),%eax
  cltq
  mov    %dl,-0x70(%rbp,%rax,1)
  addl   $0x1,-0xe8(%rbp)
  addl   $0x1,-0xe4(%rbp)
L26:
  mov    -0xec(%rbp),%edx
  mov    -0xf0(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0xe8(%rbp)
  jl     L18
  mov    -0xe4(%rbp),%eax
  cltq
  movb   $0x0,-0x70(%rbp,%rax,1)
  lea    -0x70(%rbp),%rax
  mov    %rax,%rsi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L2
  call   <__stack_chk_fail@plt>
L2:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D24
data_type: string
name: read_data
arguments: data_label: D38
data_type: string
name: read_data
arguments: data_label: D36
data_type: string
name: read_data
arguments: data_label: D0
data_type: string
name: read_data
arguments: data_label: D2
data_type: string

tool: D24: Enter the String now more than %d character long 


tool: D38: %s

tool: D36: Enter the Value of M and N: 

tool: D0: %d %d

tool: D2: Ans: %s 


assistant: ```c
int main() {
  int i, j, m, n;
  printf("Enter the String now more than %d character long \n", 100);
  char str1[100], str2[100];
  scanf("%s", str1);
  printf("Enter the Value of M and N: ");
  scanf("%d %d", &m, &n);
  for (i = n - 1, j = 0; i < n + m; i++, j++)
    str2[j] = str1[i];
  str2[j] = '\0';
  printf("Ans: %s \n", str2);
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  sub    $0xf8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xe8(%rsp)
  xor    %eax,%eax
  mov    $0x64,%esi
  lea    D47(%rip),%rdi
  call   <printf@plt>
  lea    0x10(%rsp),%rsi
  lea    D12(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D1(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0xc(%rsp),%rdx
  lea    0x8(%rsp),%rsi
  lea    D7(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    0xc(%rsp),%r8d
  mov    0x8(%rsp),%edi
  lea    (%r8,%rdi,1),%esi
  test   %edi,%edi
  js     L16
  lea    -0x1(%r8),%eax
  cltq
  lea    0x80(%rsp),%rcx
  movslq %r8d,%rdx
  sub    %rdx,%rcx
L35:
  movzbl 0x10(%rsp,%rax,1),%edx
  mov    %dl,0x1(%rcx,%rax,1)
  add    $0x1,%rax
  cmp    %eax,%esi
  jg     L35
  add    $0x1,%edi
  cmp    %esi,%r8d
  mov    $0x1,%eax
  cmovg  %eax,%edi
L6:
  movslq %edi,%rdi
  movb   $0x0,0x80(%rsp,%rdi,1)
  lea    0x80(%rsp),%rsi
  lea    D15(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0xe8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L32
  mov    $0x0,%eax
  add    $0xf8,%rsp
  ret
L16:
  mov    $0x0,%edi
  jmp    L6
L32:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D47
type: string
name: parse_data
arguments: tag: D12
type: string
name: parse_data
arguments: tag: D1
type: string
name: parse_data
arguments: tag: D7
type: string
name: parse_data
arguments: tag: D15
type: string

tool: D47: Enter the String now more than %d character long 


tool: D12: %s

tool: D1: Enter the Value of M and N: 

tool: D7: %d %d

tool: D15: Ans: %s 


assistant: ```c
int main() {
  int i, j, m, n;
  printf("Enter the String now more than %d character long \n", 100);
  char str1[100], str2[100];
  scanf("%s", str1);
  printf("Enter the Value of M and N: ");
  scanf("%d %d", &m, &n);
  for (i = n - 1, j = 0; i < n + m; i++, j++)
    str2[j] = str1[i];
  str2[j] = '\0';
  printf("Ans: %s \n", str2);
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r13
  mov    $0x64,%esi
  lea    D25(%rip),%rdi
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xf8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xe8(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r12
  call   <printf@plt>
  mov    %r12,%rsi
  lea    D13(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  lea    D41(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0xc(%rsp),%rdx
  lea    0x8(%rsp),%rsi
  xor    %eax,%eax
  lea    D2(%rip),%rdi
  call   <scanf@plt>
  mov    0xc(%rsp),%ebp
  mov    0x8(%rsp),%ebx
  lea    0x0(%rbp,%rbx,1),%r13d
  test   %ebx,%ebx
  js     L9
  mov    %ebx,%edx
  mov    $0x1,%ecx
  lea    -0x1(%rbp),%eax
  add    $0x1,%rdx
  cmp    %r13d,%ebp
  lea    0x80(%rsp),%r8
  cltq
  cmovg  %rcx,%rdx
  mov    %r8,%rdi
  lea    (%r12,%rax,1),%rsi
  add    $0x1,%ebx
  call   <memcpy@plt>
  cmp    %r13d,%ebp
  mov    %rax,%r8
  mov    $0x1,%eax
  cmovg  %eax,%ebx
L29:
  movslq %ebx,%rbx
  xor    %eax,%eax
  mov    %r8,%rsi
  lea    D20(%rip),%rdi
  movb   $0x0,0x80(%rsp,%rbx,1)
  call   <printf@plt>
  mov    0xe8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  add    $0xf8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L9:
  xor    %ebx,%ebx
  lea    0x80(%rsp),%r8
  jmp    L29
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D25
data_type: string
name: retrieve_data
arguments: data_label: D13
data_type: string
name: retrieve_data
arguments: data_label: D41
data_type: string
name: retrieve_data
arguments: data_label: D2
data_type: string
name: retrieve_data
arguments: data_label: D20
data_type: string

tool: D25: Enter the String now more than %d character long 


tool: D13: %s

tool: D41: Enter the Value of M and N: 

tool: D2: %d %d

tool: D20: Ans: %s 


assistant: ```c
int main() {
  int i, j, m, n;
  printf("Enter the String now more than %d character long \n", 100);
  char str1[100], str2[100];
  scanf("%s", str1);
  printf("Enter the Value of M and N: ");
  scanf("%d %d", &m, &n);
  for (i = n - 1, j = 0; i < n + m; i++, j++)
    str2[j] = str1[i];
  str2[j] = '\0';
  printf("Ans: %s \n", str2);
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %r13
  mov    $0x64,%esi
  lea    D34(%rip),%rdi
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xf8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xe8(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r12
  call   <printf@plt>
  mov    %r12,%rsi
  lea    D22(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  lea    D0(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0xc(%rsp),%rdx
  lea    0x8(%rsp),%rsi
  xor    %eax,%eax
  lea    D26(%rip),%rdi
  call   <scanf@plt>
  mov    0xc(%rsp),%ebp
  mov    0x8(%rsp),%ebx
  lea    0x0(%rbp,%rbx,1),%r13d
  test   %ebx,%ebx
  js     L10
  mov    %ebx,%edx
  mov    $0x1,%ecx
  lea    -0x1(%rbp),%eax
  add    $0x1,%rdx
  cmp    %r13d,%ebp
  lea    0x80(%rsp),%r8
  cltq
  cmovg  %rcx,%rdx
  mov    %r8,%rdi
  lea    (%r12,%rax,1),%rsi
  add    $0x1,%ebx
  call   <memcpy@plt>
  cmp    %r13d,%ebp
  mov    %rax,%r8
  mov    $0x1,%eax
  cmovg  %eax,%ebx
L8:
  movslq %ebx,%rbx
  xor    %eax,%eax
  mov    %r8,%rsi
  lea    D8(%rip),%rdi
  movb   $0x0,0x80(%rsp,%rbx,1)
  call   <printf@plt>
  mov    0xe8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L14
  add    $0xf8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L10:
  xor    %ebx,%ebx
  lea    0x80(%rsp),%r8
  jmp    L8
L14:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D34
type_guessed: string
name: retrieve_data
arguments: tag: D22
type_guessed: string
name: retrieve_data
arguments: tag: D0
type_guessed: string
name: retrieve_data
arguments: tag: D26
type_guessed: string
name: retrieve_data
arguments: tag: D8
type_guessed: string

tool: D34: Enter the String now more than %d character long 


tool: D22: %s

tool: D0: Enter the Value of M and N: 

tool: D26: %d %d

tool: D8: Ans: %s 


assistant: ```c
int main() {
  int i, j, m, n;
  printf("Enter the String now more than %d character long \n", 100);
  char str1[100], str2[100];
  scanf("%s", str1);
  printf("Enter the Value of M and N: ");
  scanf("%d %d", &m, &n);
  for (i = n - 1, j = 0; i < n + m; i++, j++)
    str2[j] = str1[i];
  str2[j] = '\0';
  printf("Ans: %s \n", str2);
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<arrPrint>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  jmp    L14
L10:
  mov    -0x8(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    (%rax),%eax
  mov    %eax,%esi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L14:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L10
  nop
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D7
type: string

tool: D7: %d;

assistant: ```c
void arrPrint(int *a) {
  while (*a) {
    printf("%d;", *a++);
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<arrPrint>:
  endbr64
  mov    (%rdi),%esi
  test   %esi,%esi
  je     L7
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  lea    D0(%rip),%rbp
L19:
  add    $0x4,%rbx
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    (%rbx),%esi
  test   %esi,%esi
  jne    L19
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L7:
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D0
datatype: string

tool: D0: %d;

assistant: ```c
void arrPrint(int *a) {
  while (*a) {
    printf("%d;", *a++);
  }
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<arrPrint>:
  endbr64
  mov    (%rdi),%esi
  test   %esi,%esi
  je     L0
  push   %rbp
  lea    D9(%rip),%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  nopw   0x0(%rax,%rax,1)
L8:
  add    $0x4,%rbx
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    (%rbx),%esi
  test   %esi,%esi
  jne    L8
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L0:
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D9
datatype: string

tool: D9: %d;

assistant: ```c
void arrPrint(int *a) {
  while (*a) {
    printf("%d;", *a++);
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<arrPrint>:
  endbr64
  mov    (%rdi),%esi
  test   %esi,%esi
  je     L2
  push   %rbp
  lea    D9(%rip),%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  nopw   0x0(%rax,%rax,1)
L16:
  add    $0x4,%rbx
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    (%rbx),%esi
  test   %esi,%esi
  jne    L16
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L2:
  ret
```

tool_calls: name: retrieve_data
arguments: label: D9
type_guessed: string

tool: D9: %d;

assistant: ```c
void arrPrint(int *a) {
  while (*a) {
    printf("%d;", *a++);
  }
}
```
user: What is the c source code of the assembly code below:

```asm
<get_fd_set>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    -0x18(%rbp),%rax
  add    $0x3f,%rax
  shr    $0x6,%rax
  shl    $0x3,%rax
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  je     L97
  mov    -0x18(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x1,%edi
  call   <verify_area@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  jne    L44
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <__builtin_constant_p@plt>
  test   %rax,%rax
  je     L17
  mov    -0x18(%rbp),%rdx
  mov    -0x20(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <__constant_copy_from_user_nocheck@plt>
  test   %rax,%rax
  setne  %al
  jmp    L28
L17:
  mov    -0x18(%rbp),%rdx
  mov    -0x20(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <__generic_copy_from_user_nocheck@plt>
  test   %rax,%rax
  setne  %al
L28:
  test   %al,%al
  je     L44
  movl   $0xfffffff2,-0x4(%rbp)
L44:
  mov    -0x4(%rbp),%eax
  jmp    L58
L97:
  mov    $0x0,%edi
  call   <__builtin_constant_p@plt>
  test   %rax,%rax
  je     L22
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <__builtin_constant_p@plt>
  test   %rax,%rax
  je     L85
  mov    -0x18(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <__constant_c_and_count_memset@plt>
  jmp    L3
L85:
  mov    -0x18(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <__constant_c_memset@plt>
  jmp    L3
L22:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <__builtin_constant_p@plt>
  test   %rax,%rax
  je     L41
  mov    -0x18(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <__memset_generic@plt>
  jmp    L3
L41:
  mov    -0x18(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <__memset_generic@plt>
L3:
  mov    $0x0,%eax
L58:
  leave
  ret
```

assistant: ```c
int get_fd_set(unsigned long nr, void *ufdset, unsigned long *fdset) {
  nr = ((((nr) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))) * sizeof(long));
  if (ufdset) {
    int error;
    error = verify_area(1, ufdset, nr);
    if (!error && (__builtin_constant_p(nr) ? __constant_copy_from_user_nocheck((fdset), (ufdset), (nr)) : __generic_copy_from_user_nocheck((fdset), (ufdset), (nr))))
      error = -14;
    return error;
  }
  (__builtin_constant_p(0) ? (__builtin_constant_p((nr)) ? __constant_c_and_count_memset(((fdset)), ((0x01010101UL * (unsigned char)(0))), ((nr))) : __constant_c_memset(((fdset)), ((0x01010101UL * (unsigned char)(0))), ((nr)))) : (__builtin_constant_p((nr)) ? __memset_generic((((fdset))), (((0))), (((nr)))) : __memset_generic(((fdset)), ((0)), ((nr)))));
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<get_fd_set>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdx,%r12
  add    $0x3f,%rdi
  shr    $0x6,%rdi
  lea    0x0(,%rdi,8),%rbx
  test   %rsi,%rsi
  je     L21
  mov    %rsi,%rbp
  mov    %rbx,%rdx
  mov    $0x1,%edi
  call   <verify_area@plt>
  mov    %eax,%r13d
  test   %eax,%eax
  je     L102
L46:
  mov    %r13d,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L102:
  mov    %rbx,%rdi
  call   <__builtin_constant_p@plt>
  test   %rax,%rax
  je     L44
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <__constant_copy_from_user_nocheck@plt>
  test   %rax,%rax
  je     L46
L109:
  mov    $0xfffffff2,%r13d
  jmp    L46
L44:
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <__generic_copy_from_user_nocheck@plt>
  test   %rax,%rax
  je     L46
  jmp    L109
L21:
  mov    $0x0,%edi
  call   <__builtin_constant_p@plt>
  test   %rax,%rax
  je     L54
  mov    %rbx,%rdi
  call   <__builtin_constant_p@plt>
  test   %rax,%rax
  je     L60
  mov    %rbx,%rdx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <__constant_c_and_count_memset@plt>
  mov    $0x0,%r13d
  jmp    L46
L60:
  mov    %rbx,%rdx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <__constant_c_memset@plt>
  mov    $0x0,%r13d
  jmp    L46
L54:
  mov    %rbx,%rdi
  call   <__builtin_constant_p@plt>
  test   %rax,%rax
  je     L11
  mov    %rbx,%rdx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <__memset_generic@plt>
  mov    $0x0,%r13d
  jmp    L46
L11:
  mov    %rbx,%rdx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <__memset_generic@plt>
  mov    $0x0,%r13d
  jmp    L46
```

assistant: ```c
int get_fd_set(unsigned long nr, void *ufdset, unsigned long *fdset) {
  nr = ((((nr) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))) * sizeof(long));
  if (ufdset) {
    int error;
    error = verify_area(1, ufdset, nr);
    if (!error && (__builtin_constant_p(nr) ? __constant_copy_from_user_nocheck((fdset), (ufdset), (nr)) : __generic_copy_from_user_nocheck((fdset), (ufdset), (nr))))
      error = -14;
    return error;
  }
  (__builtin_constant_p(0) ? (__builtin_constant_p((nr)) ? __constant_c_and_count_memset(((fdset)), ((0x01010101UL * (unsigned char)(0))), ((nr))) : __constant_c_memset(((fdset)), ((0x01010101UL * (unsigned char)(0))), ((nr)))) : (__builtin_constant_p((nr)) ? __memset_generic((((fdset))), (((0))), (((nr)))) : __memset_generic(((fdset)), ((0)), ((nr)))));
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<get_fd_set>:
  endbr64
  push   %r14
  add    $0x3f,%rdi
  push   %r13
  shr    $0x6,%rdi
  mov    %rdx,%r13
  push   %r12
  lea    0x0(,%rdi,8),%r12
  push   %rbp
  sub    $0x8,%rsp
  test   %rsi,%rsi
  je     L2
  mov    %r12,%rdx
  mov    $0x1,%edi
  mov    %rsi,%rbp
  call   <verify_area@plt>
  mov    %eax,%r14d
  test   %eax,%eax
  je     L22
L47:
  add    $0x8,%rsp
  mov    %r14d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   (%rax)
L2:
  xor    %edi,%edi
  call   <__builtin_constant_p@plt>
  mov    %r12,%rdi
  test   %rax,%rax
  je     L75
  call   <__builtin_constant_p@plt>
  mov    %r12,%rdx
  xor    %esi,%esi
  mov    %r13,%rdi
  test   %rax,%rax
  je     L83
  call   <__constant_c_and_count_memset@plt>
  xor    %r14d,%r14d
  add    $0x8,%rsp
  pop    %rbp
  mov    %r14d,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L75:
  call   <__builtin_constant_p@plt>
  mov    %r12,%rdx
  mov    %r13,%rdi
  xor    %esi,%esi
  call   <__memset_generic@plt>
  xor    %r14d,%r14d
  add    $0x8,%rsp
  pop    %rbp
  mov    %r14d,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L22:
  mov    %r12,%rdi
  call   <__builtin_constant_p@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  test   %rax,%rax
  je     L17
  call   <__constant_copy_from_user_nocheck@plt>
  test   %rax,%rax
  je     L47
L69:
  mov    $0xfffffff2,%r14d
  jmp    L47
  nopw   0x0(%rax,%rax,1)
L83:
  call   <__constant_c_memset@plt>
  xor    %r14d,%r14d
  add    $0x8,%rsp
  pop    %rbp
  mov    %r14d,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L17:
  call   <__generic_copy_from_user_nocheck@plt>
  test   %rax,%rax
  je     L47
  jmp    L69
```

assistant: ```c
int get_fd_set(unsigned long nr, void *ufdset, unsigned long *fdset) {
  nr = ((((nr) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))) * sizeof(long));
  if (ufdset) {
    int error;
    error = verify_area(1, ufdset, nr);
    if (!error && (__builtin_constant_p(nr) ? __constant_copy_from_user_nocheck((fdset), (ufdset), (nr)) : __generic_copy_from_user_nocheck((fdset), (ufdset), (nr))))
      error = -14;
    return error;
  }
  (__builtin_constant_p(0) ? (__builtin_constant_p((nr)) ? __constant_c_and_count_memset(((fdset)), ((0x01010101UL * (unsigned char)(0))), ((nr))) : __constant_c_memset(((fdset)), ((0x01010101UL * (unsigned char)(0))), ((nr)))) : (__builtin_constant_p((nr)) ? __memset_generic((((fdset))), (((0))), (((nr)))) : __memset_generic(((fdset)), ((0)), ((nr)))));
  return 0;
}
```