ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请从给定的汇编指令推导出C源代码:

```asm
<stpcpy>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x8(%rbp)
L9:
  mov    -0x8(%rbp),%rdx
  lea    0x1(%rdx),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x10(%rbp)
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L9
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  pop    %rbp
  ret
```

assistant: ```c
char *stpcpy(char *restrict s1, const char *restrict s2) {
  char *restrict dst = s1;
  const char *restrict src = s2;
  do {
    *dst++ = *src++;
  } while (*src != '\0');
  return dst - 1;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<stpcpy>:
  endbr64
L5:
  add    $0x1,%rsi
  mov    %rdi,%rax
  add    $0x1,%rdi
  movzbl -0x1(%rsi),%edx
  mov    %dl,-0x1(%rdi)
  cmpb   $0x0,(%rsi)
  jne    L5
  ret
```

assistant: ```c
char *stpcpy(char *restrict s1, const char *restrict s2) {
  char *restrict dst = s1;
  const char *restrict src = s2;
  do {
    *dst++ = *src++;
  } while (*src != '\0');
  return dst - 1;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<stpcpy>:
  endbr64
  movzbl (%rsi),%eax
  nopw   0x0(%rax,%rax,1)
L6:
  mov    %rdi,%r8
  add    $0x1,%rsi
  add    $0x1,%rdi
  mov    %al,-0x1(%rdi)
  movzbl (%rsi),%eax
  test   %al,%al
  jne    L6
  mov    %r8,%rax
  ret
```

assistant: ```c
char *stpcpy(char *restrict s1, const char *restrict s2) {
  char *restrict dst = s1;
  const char *restrict src = s2;
  do {
    *dst++ = *src++;
  } while (*src != '\0');
  return dst - 1;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<stpcpy>:
  endbr64
  movzbl (%rsi),%eax
  nopw   0x0(%rax,%rax,1)
L1:
  mov    %rdi,%r8
  add    $0x1,%rsi
  add    $0x1,%rdi
  mov    %al,-0x1(%rdi)
  movzbl (%rsi),%eax
  test   %al,%al
  jne    L1
  mov    %r8,%rax
  ret
```

assistant: ```c
char *stpcpy(char *restrict s1, const char *restrict s2) {
  char *restrict dst = s1;
  const char *restrict src = s2;
  do {
    *dst++ = *src++;
  } while (*src != '\0');
  return dst - 1;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<dump>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L3
L18:
  subq   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%esi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L3:
  mov    -0x8(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  jne    L18
  nop
  nop
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D0
type_guessed: string
name: retrieve_data
arguments: data_tag: D17
type_guessed: string

tool: D0: #x

tool: D17: %02x

assistant: ```c
void dump(unsigned char *mem, int length) {
  unsigned char *p = mem + length;
  printf("#x");
  while (p != mem) {
    p--;
    printf("%02x", (*p));
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<dump>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbp
  movslq %esi,%rbx
  add    %rdi,%rbx
  lea    D9(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmp    %rbx,%rbp
  je     L7
  lea    D7(%rip),%r12
L15:
  sub    $0x1,%rbx
  movzbl (%rbx),%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmp    %rbx,%rbp
  jne    L15
L7:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D9
data_type: string
name: disassemble_data
arguments: data_label: D7
data_type: string

tool: D9: #x

tool: D7: %02x

assistant: ```c
void dump(unsigned char *mem, int length) {
  unsigned char *p = mem + length;
  printf("#x");
  while (p != mem) {
    p--;
    printf("%02x", (*p));
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<dump>:
  endbr64
  push   %r12
  xor    %eax,%eax
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  movslq %esi,%rbx
  add    %rdi,%rbx
  lea    D15(%rip),%rdi
  call   <printf@plt>
  cmp    %rbx,%rbp
  je     L1
  lea    D4(%rip),%r12
  nopl   0x0(%rax,%rax,1)
L10:
  movzbl -0x1(%rbx),%esi
  sub    $0x1,%rbx
  xor    %eax,%eax
  mov    %r12,%rdi
  call   <printf@plt>
  cmp    %rbx,%rbp
  jne    L10
L1:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D15
type: string
name: disassemble_data
arguments: data_tag: D4
type: string

tool: D15: #x

tool: D4: %02x

assistant: ```c
void dump(unsigned char *mem, int length) {
  unsigned char *p = mem + length;
  printf("#x");
  while (p != mem) {
    p--;
    printf("%02x", (*p));
  }
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<dump>:
  endbr64
  push   %r12
  xor    %eax,%eax
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  movslq %esi,%rbx
  add    %rdi,%rbx
  lea    D19(%rip),%rdi
  call   <printf@plt>
  cmp    %rbx,%rbp
  je     L11
  lea    D12(%rip),%r12
  nopl   0x0(%rax,%rax,1)
L12:
  movzbl -0x1(%rbx),%esi
  sub    $0x1,%rbx
  xor    %eax,%eax
  mov    %r12,%rdi
  call   <printf@plt>
  cmp    %rbx,%rbp
  jne    L12
L11:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: disassemble_data
arguments: label: D19
type_guessed: string
name: disassemble_data
arguments: label: D12
type_guessed: string

tool: D19: #x

tool: D12: %02x

assistant: ```c
void dump(unsigned char *mem, int length) {
  unsigned char *p = mem + length;
  printf("#x");
  while (p != mem) {
    p--;
    printf("%02x", (*p));
  }
}
```
user: What is the c source code of the assembly code below:

```asm
<composite_line_yuv_sse2_simple>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edx,%ebp
  sar    $0x8,%r9d
  test   %rcx,%rcx
  setne  %dl
  movzbl %dl,%edx
  test   %r8,%r8
  setne  %al
  movzbl %al,%eax
  shl    $0x2,%eax
  lea    (%rax,%rdx,2),%eax
  cmp    $0x100,%r9d
  setne  %dl
  movzbl %dl,%edx
  add    %edx,%eax
  cmp    $0x7,%eax
  ja     L61
  mov    %r8,%rbx
  mov    %eax,%eax
  lea    D3(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  lea    0x0(%rbp,%rbp,1),%edx
  call   <memcpy@plt>
L61:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  mov    %r9d,%ecx
  mov    %ebp,%edx
  call   <blend_case1@plt>
  jmp    L61
  mov    %ebp,%edx
  call   <blend_case2@plt>
  jmp    L61
  mov    %r9d,%r8d
  mov    %ebp,%edx
  call   <blend_case3@plt>
  jmp    L61
  lea    0x0(%rbp,%rbp,1),%edx
  call   <memcpy@plt>
  mov    %ebp,%edx
  mov    $0xff,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  jmp    L61
  mov    %r9d,%r8d
  mov    %rbx,%rcx
  mov    %ebp,%edx
  call   <blend_case5@plt>
  jmp    L61
  mov    %ebp,%edx
  call   <blend_case6@plt>
  jmp    L61
  mov    %ebp,%edx
  call   <blend_case7@plt>
  jmp    L61
```

assistant: ```c
void composite_line_yuv_sse2_simple(uint8_t *dest, uint8_t *src, int width, uint8_t *src_a, uint8_t *dest_a, int weight) {
  weight >>= 8;
  int cond = ((dest_a != NULL) ? 4 : 0) + ((src_a != NULL) ? 2 : 0) + ((weight != 256) ? 1 : 0);
  switch (cond) {
  case 0:
    memcpy(dest, src, 2 * width);
    break;
  case 1:
    blend_case1(dest, src, width, weight);
    break;
  case 2:
    blend_case2(dest, src, width, src_a);
    break;
  case 3:
    blend_case3(dest, src, width, src_a, weight);
    break;
  case 4:
    memcpy(dest, src, 2 * width);
    memset(dest_a, 0xFF, width);
    break;
  case 5:
    blend_case5(dest, src, width, dest_a, weight);
    break;
  case 6:
    blend_case6(dest, src, width, src_a, dest_a);
    break;
  case 7:
    blend_case7(dest, src, width, src_a, dest_a, weight);
    break;
  };
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<_whitespace>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%ebx
  not    %edi
  shr    $0x1f,%edi
  call   <assert@plt>
  cmp    $0x1f3,%ebx
  setle  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %ebx,%edx
  lea    D14(%rip),%rsi
  lea    D10(%rip),%rbp
  mov    %rbp,%rdi
  call   <memcpy@plt>
  movslq %ebx,%rbx
  movb   $0x0,0x0(%rbp,%rbx,1)
  mov    %rbp,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: data_tag: D14
type_infered: string

tool: D14:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     

assistant: ```c
char const *_whitespace(int in_length) {
  static char const *const WHITESPACE = "                                                                                                    "
                                        "                                                                                                    "
                                        "                                                                                                    "
                                        "                                                                                                    "
                                        "                                                                                                    ";
  assert(in_length >= 0);
  assert(in_length < 500);
  static char r[500 + 1];
  memcpy(r, WHITESPACE, in_length);
  r[in_length] = 0;
  return r;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<_whitespace>:
  endbr64
  push   %r12
  lea    D2(%rip),%r12
  push   %rbx
  movslq %edi,%rbx
  mov    %ebx,%edi
  not    %edi
  sub    $0x8,%rsp
  shr    $0x1f,%edi
  call   <assert@plt>
  xor    %edi,%edi
  cmp    $0x1f3,%ebx
  setle  %dil
  call   <assert@plt>
  mov    %ebx,%edx
  mov    %r12,%rdi
  lea    D17(%rip),%rsi
  call   <memcpy@plt>
  movb   $0x0,(%r12,%rbx,1)
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
```

tool_calls: name: read_data
arguments: label: D17
type: string

tool: D17:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     

assistant: ```c
char const *_whitespace(int in_length) {
  static char const *const WHITESPACE = "                                                                                                    "
                                        "                                                                                                    "
                                        "                                                                                                    "
                                        "                                                                                                    "
                                        "                                                                                                    ";
  assert(in_length >= 0);
  assert(in_length < 500);
  static char r[500 + 1];
  memcpy(r, WHITESPACE, in_length);
  r[in_length] = 0;
  return r;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<_whitespace>:
  endbr64
  push   %r12
  lea    D5(%rip),%r12
  push   %rbx
  movslq %edi,%rbx
  mov    %ebx,%edi
  not    %edi
  sub    $0x8,%rsp
  shr    $0x1f,%edi
  call   <assert@plt>
  xor    %edi,%edi
  cmp    $0x1f3,%ebx
  setle  %dil
  call   <assert@plt>
  mov    %ebx,%edx
  mov    %r12,%rdi
  lea    D15(%rip),%rsi
  call   <memcpy@plt>
  movb   $0x0,(%r12,%rbx,1)
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
```

tool_calls: name: parse_data
arguments: tag: D15
datatype: string

tool: D15:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     

assistant: ```c
char const *_whitespace(int in_length) {
  static char const *const WHITESPACE = "                                                                                                    "
                                        "                                                                                                    "
                                        "                                                                                                    "
                                        "                                                                                                    "
                                        "                                                                                                    ";
  assert(in_length >= 0);
  assert(in_length < 500);
  static char r[500 + 1];
  memcpy(r, WHITESPACE, in_length);
  r[in_length] = 0;
  return r;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<remainerf>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  movss  %xmm0,-0x14(%rbp)
  movss  %xmm1,-0x18(%rbp)
  movss  -0x4(%rbp),%xmm0
  pop    %rbp
  ret
```

assistant: ```c
float remainerf(float x, float y) {
  float result;
  return result;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<remainerf>:
  endbr64
  pxor   %xmm0,%xmm0
  ret
```

assistant: ```c
float remainerf(float x, float y) {
  float result;
  return result;
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<remainerf>:
  endbr64
  pxor   %xmm0,%xmm0
  ret
```

assistant: ```c
float remainerf(float x, float y) {
  float result;
  return result;
}
```
user: Translate the below assembly code into C programming language:

```asm
<remainerf>:
  endbr64
  pxor   %xmm0,%xmm0
  ret
```

assistant: ```c
float remainerf(float x, float y) {
  float result;
  return result;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<multiple>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x12,-0x1c(%rbp)
  lea    -0x1c(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  lea    -0x18(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax),%ecx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0x18(%rbp),%rdx
  lea    -0x1c(%rbp),%rax
  mov    %rax,%rsi
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x10(%rbp),%rdx
  lea    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L0
  call   <__stack_chk_fail@plt>
L0:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D20
type: string
name: unpack_data
arguments: label: D19
type: string
name: unpack_data
arguments: label: D4
type: string

tool: D20: %d = %d = %d.


tool: D19: %p = %p = %p.


tool: D4: %p = %p.


assistant: ```c
void multiple(void) {
  int y = 18, *yPtr, **yPtrPtr;
  yPtr = &y;
  yPtrPtr = &yPtr;
  printf("%d = %d = %d.\n", y, *yPtr, **yPtrPtr);
  printf("%p = %p = %p.\n", &y, yPtr, *yPtrPtr);
  printf("%p = %p.\n", &yPtr, yPtrPtr);
}
```
user: Translate the below assembly code into C programming language:

```asm
<multiple>:
  endbr64
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movl   $0x12,0xc(%rsp)
  lea    0xc(%rsp),%rbx
  mov    %rbx,0x10(%rsp)
  mov    $0x12,%ecx
  mov    $0x12,%edx
  mov    $0x12,%esi
  lea    D3(%rip),%rdi
  call   <printf@plt>
  mov    0x10(%rsp),%rdx
  mov    %rdx,%rcx
  mov    %rbx,%rsi
  lea    D15(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x10(%rsp),%rsi
  mov    %rsi,%rdx
  lea    D19(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  add    $0x20,%rsp
  pop    %rbx
  ret
L8:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D3
type_guessed: string
name: disassemble_data
arguments: data_label: D15
type_guessed: string
name: disassemble_data
arguments: data_label: D19
type_guessed: string

tool: D3: %d = %d = %d.


tool: D15: %p = %p = %p.


tool: D19: %p = %p.


assistant: ```c
void multiple(void) {
  int y = 18, *yPtr, **yPtrPtr;
  yPtr = &y;
  yPtrPtr = &yPtr;
  printf("%d = %d = %d.\n", y, *yPtr, **yPtrPtr);
  printf("%p = %p = %p.\n", &y, yPtr, *yPtrPtr);
  printf("%p = %p.\n", &yPtr, yPtrPtr);
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<multiple>:
  endbr64
  push   %rbp
  mov    $0x12,%ecx
  mov    $0x12,%edx
  mov    $0x12,%esi
  lea    D29(%rip),%rdi
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rbp
  movl   $0x12,0xc(%rsp)
  mov    %rbp,0x10(%rsp)
  call   <printf@plt>
  mov    0x10(%rsp),%rdx
  mov    %rbp,%rsi
  xor    %eax,%eax
  lea    D4(%rip),%rdi
  mov    %rdx,%rcx
  call   <printf@plt>
  lea    0x10(%rsp),%rsi
  xor    %eax,%eax
  lea    D10(%rip),%rdi
  mov    %rsi,%rdx
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x20,%rsp
  pop    %rbp
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D29
type: string
name: extract_symbolic_data
arguments: label: D4
type: string
name: extract_symbolic_data
arguments: label: D10
type: string

tool: D29: %d = %d = %d.


tool: D4: %p = %p = %p.


tool: D10: %p = %p.


assistant: ```c
void multiple(void) {
  int y = 18, *yPtr, **yPtrPtr;
  yPtr = &y;
  yPtrPtr = &yPtr;
  printf("%d = %d = %d.\n", y, *yPtr, **yPtrPtr);
  printf("%p = %p = %p.\n", &y, yPtr, *yPtrPtr);
  printf("%p = %p.\n", &yPtr, yPtrPtr);
}
```
user: Translate the below assembly code into C programming language:

```asm
<multiple>:
  endbr64
  push   %rbp
  mov    $0x12,%ecx
  mov    $0x12,%edx
  mov    $0x12,%esi
  lea    D4(%rip),%rdi
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rbp
  movl   $0x12,0xc(%rsp)
  mov    %rbp,0x10(%rsp)
  call   <printf@plt>
  mov    0x10(%rsp),%rdx
  mov    %rbp,%rsi
  xor    %eax,%eax
  lea    D2(%rip),%rdi
  mov    %rdx,%rcx
  call   <printf@plt>
  lea    0x10(%rsp),%rsi
  xor    %eax,%eax
  lea    D6(%rip),%rdi
  mov    %rsi,%rdx
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x20,%rsp
  pop    %rbp
  ret
L2:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D4
type_guessed: string
name: unpack_data
arguments: data_label: D2
type_guessed: string
name: unpack_data
arguments: data_label: D6
type_guessed: string

tool: D4: %d = %d = %d.


tool: D2: %p = %p = %p.


tool: D6: %p = %p.


assistant: ```c
void multiple(void) {
  int y = 18, *yPtr, **yPtrPtr;
  yPtr = &y;
  yPtrPtr = &yPtr;
  printf("%d = %d = %d.\n", y, *yPtr, **yPtrPtr);
  printf("%p = %p = %p.\n", &y, yPtr, *yPtrPtr);
  printf("%p = %p.\n", &yPtr, yPtrPtr);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<fts_alloc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  add    $0x48,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  mov    D3(%rip),%rax
  mov    (%rax),%eax
  and    %edx,%eax
  test   %eax,%eax
  jne    L33
  addq   $0xb,-0x10(%rbp)
L33:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L12
  mov    $0x0,%eax
  jmp    L35
L12:
  mov    -0x24(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    0x38(%rax),%rax
  mov    -0x20(%rbp),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memmove@plt>
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  mov    D3(%rip),%rax
  mov    (%rax),%eax
  and    %edx,%eax
  test   %eax,%eax
  jne    L39
  mov    -0x8(%rbp),%rax
  mov    0x38(%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  add    %rdx,%rax
  add    $0x2,%rax
  mov    %rax,%rdi
  call   <ALIGN@plt>
  mov    %rax,%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,0x40(%rax)
L39:
  mov    -0x8(%rbp),%rax
  mov    -0x24(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  mov    0x4(%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,0x30(%rax)
  mov    -0x8(%rbp),%rax
  movq   $0x0,0x28(%rax)
  mov    -0x8(%rbp),%rax
  movq   $0x0,0x20(%rax)
  mov    D24(%rip),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,0x18(%rax)
  mov    -0x8(%rbp),%rax
  movq   $0x0,0x10(%rax)
  mov    -0x8(%rbp),%rax
  movq   $0x0,0x8(%rax)
  mov    -0x8(%rbp),%rax
L35:
  leave
  ret
```

assistant: ```c
FTSENT *fts_alloc(FTS *sp, char *name, int namelen) {
  FTSENT *p;
  size_t len;
  len = sizeof(FTSENT) + namelen;
  if (!(sp->fts_options & (FTS_NOSTAT)))
    len += sizeof(struct stat) + 7;
  if ((p = malloc(len)) == NULL)
    return (NULL);
  memmove(p->fts_name, name, namelen + 1);
  if (!(sp->fts_options & (FTS_NOSTAT)))
    p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
  p->fts_namelen = namelen;
  p->fts_path = sp->fts_path;
  p->fts_errno = 0;
  p->fts_flags = 0;
  p->fts_instr = FTS_NOINSTR;
  p->fts_number = 0;
  p->fts_pointer = NULL;
  return (p);
}
```
user: What is the c source code of the assembly code below?

```asm
<fts_alloc>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r12
  mov    %rsi,%r13
  mov    %edx,%ebp
  movslq %edx,%rdi
  mov    (%r12),%eax
  mov    D9(%rip),%rdx
  and    (%rdx),%eax
  lea    0x48(%rdi),%rdx
  add    $0x53,%rdi
  test   %eax,%eax
  cmovne %rdx,%rdi
  call   <malloc@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L17
  lea    0x1(%rbp),%edx
  mov    0x38(%rax),%rdi
  mov    %r13,%rsi
  call   <memmove@plt>
  mov    (%r12),%eax
  mov    D9(%rip),%rdx
  and    (%rdx),%eax
  je     L14
L6:
  mov    %ebp,(%rbx)
  mov    0x4(%r12),%eax
  mov    %eax,0x30(%rbx)
  movq   $0x0,0x28(%rbx)
  movq   $0x0,0x20(%rbx)
  mov    D28(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x18(%rbx)
  movq   $0x0,0x10(%rbx)
  movq   $0x0,0x8(%rbx)
L17:
  mov    %rbx,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L14:
  movslq %ebp,%rdi
  add    0x38(%rbx),%rdi
  add    $0x2,%rdi
  call   <ALIGN@plt>
  mov    %rax,0x40(%rbx)
  jmp    L6
```

assistant: ```c
FTSENT *fts_alloc(FTS *sp, char *name, int namelen) {
  FTSENT *p;
  size_t len;
  len = sizeof(FTSENT) + namelen;
  if (!(sp->fts_options & (FTS_NOSTAT)))
    len += sizeof(struct stat) + 7;
  if ((p = malloc(len)) == NULL)
    return (NULL);
  memmove(p->fts_name, name, namelen + 1);
  if (!(sp->fts_options & (FTS_NOSTAT)))
    p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
  p->fts_namelen = namelen;
  p->fts_path = sp->fts_path;
  p->fts_errno = 0;
  p->fts_flags = 0;
  p->fts_instr = FTS_NOINSTR;
  p->fts_number = 0;
  p->fts_pointer = NULL;
  return (p);
}
```