ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<help>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %edi,-0x4(%rbp)
  mov    %rsi,-0x10(%rbp)
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D12
data_type: string
name: parse_data
arguments: data_tag: D7
data_type: string
name: parse_data
arguments: data_tag: D35
data_type: string
name: parse_data
arguments: data_tag: D5
data_type: string
name: parse_data
arguments: data_tag: D24
data_type: string
name: parse_data
arguments: data_tag: D23
data_type: string

tool: D12: Encodes into a cassette tape format file, suitable for

tool: D7: input to the Epple ][ emulator's cassette functions.

tool: D35: Usage: %s [OPTION...]


tool: D5: Options:

tool: D24:   -h, --help           shows this help

tool: D23:   -V, --version        shows version information

assistant: ```c
void help(int argc, char *argv[]) {
  (void)argc;
  printf("Encodes into a cassette tape format file, suitable for\n");
  printf("input to the Epple ][ emulator's cassette functions.\n");
  printf("\n");
  printf("Usage: %s [OPTION...]\n", argv[0]);
  printf("Options:\n");
  printf("  -h, --help           shows this help\n");
  printf("  -V, --version        shows version information\n");
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<help>:
  endbr64
  push   %rbx
  mov    %rsi,%rbx
  lea    D31(%rip),%rdi
  call   <puts@plt>
  lea    D27(%rip),%rdi
  call   <puts@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    (%rbx),%rsi
  lea    D7(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D26(%rip),%rdi
  call   <puts@plt>
  lea    D16(%rip),%rdi
  call   <puts@plt>
  lea    D39(%rip),%rdi
  call   <puts@plt>
  pop    %rbx
  ret
```

tool_calls: name: parse_data
arguments: tag: D31
type_infered: string
name: parse_data
arguments: tag: D27
type_infered: string
name: parse_data
arguments: tag: D7
type_infered: string
name: parse_data
arguments: tag: D26
type_infered: string
name: parse_data
arguments: tag: D16
type_infered: string
name: parse_data
arguments: tag: D39
type_infered: string

tool: D31: Encodes into a cassette tape format file, suitable for

tool: D27: input to the Epple ][ emulator's cassette functions.

tool: D7: Usage: %s [OPTION...]


tool: D26: Options:

tool: D16:   -h, --help           shows this help

tool: D39:   -V, --version        shows version information

assistant: ```c
void help(int argc, char *argv[]) {
  (void)argc;
  printf("Encodes into a cassette tape format file, suitable for\n");
  printf("input to the Epple ][ emulator's cassette functions.\n");
  printf("\n");
  printf("Usage: %s [OPTION...]\n", argv[0]);
  printf("Options:\n");
  printf("  -h, --help           shows this help\n");
  printf("  -V, --version        shows version information\n");
}
```
user: Translate the below assembly code into C programming language:

```asm
<help>:
  endbr64
  push   %rbx
  lea    D21(%rip),%rdi
  mov    %rsi,%rbx
  call   <puts@plt>
  lea    D43(%rip),%rdi
  call   <puts@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    (%rbx),%rsi
  lea    D3(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D33(%rip),%rdi
  call   <puts@plt>
  lea    D44(%rip),%rdi
  call   <puts@plt>
  lea    D15(%rip),%rdi
  pop    %rbx
  jmp    1080 <puts@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D21
type: string
name: retrieve_data
arguments: data_label: D43
type: string
name: retrieve_data
arguments: data_label: D3
type: string
name: retrieve_data
arguments: data_label: D33
type: string
name: retrieve_data
arguments: data_label: D44
type: string
name: retrieve_data
arguments: data_label: D15
type: string

tool: D21: Encodes into a cassette tape format file, suitable for

tool: D43: input to the Epple ][ emulator's cassette functions.

tool: D3: Usage: %s [OPTION...]


tool: D33: Options:

tool: D44:   -h, --help           shows this help

tool: D15:   -V, --version        shows version information

assistant: ```c
void help(int argc, char *argv[]) {
  (void)argc;
  printf("Encodes into a cassette tape format file, suitable for\n");
  printf("input to the Epple ][ emulator's cassette functions.\n");
  printf("\n");
  printf("Usage: %s [OPTION...]\n", argv[0]);
  printf("Options:\n");
  printf("  -h, --help           shows this help\n");
  printf("  -V, --version        shows version information\n");
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<help>:
  endbr64
  push   %rbx
  lea    D57(%rip),%rdi
  mov    %rsi,%rbx
  call   <puts@plt>
  lea    D18(%rip),%rdi
  call   <puts@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    (%rbx),%rsi
  lea    D13(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D48(%rip),%rdi
  call   <puts@plt>
  lea    D50(%rip),%rdi
  call   <puts@plt>
  lea    D36(%rip),%rdi
  pop    %rbx
  jmp    1080 <puts@plt>
```

tool_calls: name: read_data
arguments: data_label: D57
type_infered: string
name: read_data
arguments: data_label: D18
type_infered: string
name: read_data
arguments: data_label: D13
type_infered: string
name: read_data
arguments: data_label: D48
type_infered: string
name: read_data
arguments: data_label: D50
type_infered: string
name: read_data
arguments: data_label: D36
type_infered: string

tool: D57: Encodes into a cassette tape format file, suitable for

tool: D18: input to the Epple ][ emulator's cassette functions.

tool: D13: Usage: %s [OPTION...]


tool: D48: Options:

tool: D50:   -h, --help           shows this help

tool: D36:   -V, --version        shows version information

assistant: ```c
void help(int argc, char *argv[]) {
  (void)argc;
  printf("Encodes into a cassette tape format file, suitable for\n");
  printf("input to the Epple ][ emulator's cassette functions.\n");
  printf("\n");
  printf("Usage: %s [OPTION...]\n", argv[0]);
  printf("Options:\n");
  printf("  -h, --help           shows this help\n");
  printf("  -V, --version        shows version information\n");
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<oatoi>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  mov    %rdi,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L47
  mov    $0xffffffff,%eax
  jmp    L4
L47:
  mov    $0x0,%ebx
  jmp    L59
L51:
  lea    0x0(,%rbx,8),%edx
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %edx,%eax
  lea    -0x30(%rax),%ebx
  addq   $0x1,-0x10(%rbp)
L59:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L55
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x37,%al
  jle    L51
L55:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L15
  mov    $0xffffffff,%eax
  jmp    L4
L15:
  mov    %ebx,%eax
L4:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int oatoi(s)
char *s;
{
  register int i;
  if (*s == 0)
    return -1;
  for (i = 0; ((*s) >= '0' && (*s) <= '7'); ++s)
    i = i * 8 + *s - '0';
  if (*s)
    return -1;
  return i;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<oatoi>:
  endbr64
  movzbl (%rdi),%eax
  lea    -0x30(%rax),%edx
  cmp    $0x7,%dl
  ja     L18
  mov    $0x0,%edx
L25:
  movsbl %al,%eax
  lea    -0x30(%rax,%rdx,8),%edx
  add    $0x1,%rdi
  movzbl (%rdi),%eax
  lea    -0x30(%rax),%ecx
  cmp    $0x7,%cl
  jbe    L25
  test   %al,%al
  mov    $0xffffffff,%eax
  cmovne %eax,%edx
L17:
  mov    %edx,%eax
  ret
L18:
  mov    $0xffffffff,%edx
  jmp    L17
```

assistant: ```c
int oatoi(s)
char *s;
{
  register int i;
  if (*s == 0)
    return -1;
  for (i = 0; ((*s) >= '0' && (*s) <= '7'); ++s)
    i = i * 8 + *s - '0';
  if (*s)
    return -1;
  return i;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<oatoi>:
  endbr64
  movsbl (%rdi),%eax
  lea    -0x30(%rax),%edx
  cmp    $0x7,%dl
  ja     L3
  xor    %r8d,%r8d
  nopw   0x0(%rax,%rax,1)
L6:
  add    $0x1,%rdi
  lea    -0x30(%rax,%r8,8),%r8d
  movsbl (%rdi),%eax
  lea    -0x30(%rax),%edx
  cmp    $0x7,%dl
  jbe    L6
  test   %al,%al
  mov    $0xffffffff,%eax
  cmovne %eax,%r8d
L8:
  mov    %r8d,%eax
  ret
L3:
  mov    $0xffffffff,%r8d
  jmp    L8
```

assistant: ```c
int oatoi(s)
char *s;
{
  register int i;
  if (*s == 0)
    return -1;
  for (i = 0; ((*s) >= '0' && (*s) <= '7'); ++s)
    i = i * 8 + *s - '0';
  if (*s)
    return -1;
  return i;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<oatoi>:
  endbr64
  movsbl (%rdi),%eax
  lea    -0x30(%rax),%edx
  cmp    $0x7,%dl
  ja     L5
  xor    %r8d,%r8d
  nopw   0x0(%rax,%rax,1)
L17:
  add    $0x1,%rdi
  lea    -0x30(%rax,%r8,8),%r8d
  movsbl (%rdi),%eax
  lea    -0x30(%rax),%edx
  cmp    $0x7,%dl
  jbe    L17
  test   %al,%al
  mov    $0xffffffff,%eax
  cmovne %eax,%r8d
L23:
  mov    %r8d,%eax
  ret
L5:
  mov    $0xffffffff,%r8d
  jmp    L23
```

assistant: ```c
int oatoi(s)
char *s;
{
  register int i;
  if (*s == 0)
    return -1;
  for (i = 0; ((*s) >= '0' && (*s) <= '7'); ++s)
    i = i * 8 + *s - '0';
  if (*s)
    return -1;
  return i;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<sys_free_virtual_addr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    -0x18(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <munmap@plt>
  nop
  leave
  ret
```

assistant: ```c
void sys_free_virtual_addr(int *pDev, unsigned long virtual_ptr, unsigned long mem_size) {
  close(*pDev);
  munmap(virtual_ptr, mem_size);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<sys_free_virtual_addr>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rsi,%rbx
  mov    %rdx,%rbp
  mov    (%rdi),%edi
  call   <close@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <munmap@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
void sys_free_virtual_addr(int *pDev, unsigned long virtual_ptr, unsigned long mem_size) {
  close(*pDev);
  munmap(virtual_ptr, mem_size);
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<sys_free_virtual_addr>:
  endbr64
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rsi,%rbp
  sub    $0x8,%rsp
  mov    (%rdi),%edi
  call   <close@plt>
  add    $0x8,%rsp
  mov    %r12,%rsi
  mov    %rbp,%rdi
  pop    %rbp
  pop    %r12
  jmp    1070 <munmap@plt>
```

assistant: ```c
void sys_free_virtual_addr(int *pDev, unsigned long virtual_ptr, unsigned long mem_size) {
  close(*pDev);
  munmap(virtual_ptr, mem_size);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<sys_free_virtual_addr>:
  endbr64
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rsi,%rbp
  sub    $0x8,%rsp
  mov    (%rdi),%edi
  call   <close@plt>
  add    $0x8,%rsp
  mov    %r12,%rsi
  mov    %rbp,%rdi
  pop    %rbp
  pop    %r12
  jmp    1070 <munmap@plt>
```

assistant: ```c
void sys_free_virtual_addr(int *pDev, unsigned long virtual_ptr, unsigned long mem_size) {
  close(*pDev);
  munmap(virtual_ptr, mem_size);
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<send_data>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  movq   $0x0,-0x10(%rbp)
  jmp    L27
L22:
  mov    -0x8(%rbp),%rax
  add    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  cmp    %rax,-0x28(%rbp)
  je     L8
L27:
  mov    -0x10(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  sub    %rcx,%rax
  mov    %rax,%rdx
  mov    -0x10(%rbp),%rcx
  mov    -0x20(%rbp),%rax
  add    %rax,%rcx
  mov    -0x14(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jg     L22
  cmpq   $0x0,-0x8(%rbp)
  js     L30
  cmpq   $0x0,-0x28(%rbp)
  je     L55
L30:
  lea    D8(%rip),%rax
  mov    %rax,%rsi
  mov    $0x1,%edi
  call   <err@plt>
  jmp    L55
L8:
  nop
L55:
  leave
  ret
```

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

tool: D8: writing to other end

assistant: ```c
void send_data(int fd, const void *mem, unsigned long size) {
  long ret, done = 0;
  while ((ret = write(fd, mem + done, size - done)) > 0) {
    done += ret;
    if (done == size)
      return;
  }
  if (ret < 0 || size != 0)
    err(1, "writing to other end");
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<send_data>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%r13d
  mov    %rsi,%r12
  mov    %rdx,%rbp
  mov    $0x0,%ebx
L37:
  mov    %rbp,%rdx
  sub    %rbx,%rdx
  lea    (%r12,%rbx,1),%rsi
  mov    %r13d,%edi
  call   <write@plt>
  test   %rax,%rax
  jle    L40
  add    %rax,%rbx
  cmp    %rbp,%rbx
  jne    L37
L10:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L40:
  js     L11
  test   %rbp,%rbp
  je     L10
L11:
  lea    D1(%rip),%rsi
  mov    $0x1,%edi
  call   <err@plt>
  jmp    L10
```

tool_calls: name: disassemble_data
arguments: tag: D1
type_infered: string

tool: D1: writing to other end

assistant: ```c
void send_data(int fd, const void *mem, unsigned long size) {
  long ret, done = 0;
  while ((ret = write(fd, mem + done, size - done)) > 0) {
    done += ret;
    if (done == size)
      return;
  }
  if (ret < 0 || size != 0)
    err(1, "writing to other end");
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<send_data>:
  endbr64
  push   %r13
  mov    %edi,%r13d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x8,%rsp
  jmp    L0
  nopl   0x0(%rax,%rax,1)
L34:
  add    %rax,%rbx
  cmp    %rbp,%rbx
  je     L19
L0:
  mov    %rbp,%rdx
  lea    (%r12,%rbx,1),%rsi
  mov    %r13d,%edi
  sub    %rbx,%rdx
  call   <write@plt>
  test   %rax,%rax
  jg     L34
  js     L25
  test   %rbp,%rbp
  jne    L25
L19:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L25:
  add    $0x8,%rsp
  lea    D8(%rip),%rsi
  mov    $0x1,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1070 <err@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D8
type_guessed: string

tool: D8: writing to other end

assistant: ```c
void send_data(int fd, const void *mem, unsigned long size) {
  long ret, done = 0;
  while ((ret = write(fd, mem + done, size - done)) > 0) {
    done += ret;
    if (done == size)
      return;
  }
  if (ret < 0 || size != 0)
    err(1, "writing to other end");
}
```
user: Translate the below assembly code into C programming language:

```asm
<send_data>:
  endbr64
  push   %r13
  mov    %edi,%r13d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x8,%rsp
  jmp    L10
  nopl   0x0(%rax,%rax,1)
L29:
  add    %rax,%rbx
  cmp    %rbp,%rbx
  je     L14
L10:
  mov    %rbp,%rdx
  lea    (%r12,%rbx,1),%rsi
  mov    %r13d,%edi
  sub    %rbx,%rdx
  call   <write@plt>
  test   %rax,%rax
  jg     L29
  js     L48
  test   %rbp,%rbp
  jne    L48
L14:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L48:
  add    $0x8,%rsp
  lea    D2(%rip),%rsi
  mov    $0x1,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1070 <err@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D2
type_guessed: string

tool: D2: writing to other end

assistant: ```c
void send_data(int fd, const void *mem, unsigned long size) {
  long ret, done = 0;
  while ((ret = write(fd, mem + done, size - done)) > 0) {
    done += ret;
    if (done == size)
      return;
  }
  if (ret < 0 || size != 0)
    err(1, "writing to other end");
}
```
user: What is the c source code of the assembly code below:

```asm
<fscan_double>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  D24(%rip),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <fgetc@plt>
  mov    %al,-0x19(%rbp)
  cmpb   $0x2d,-0x19(%rbp)
  jne    L51
  movsd  D16(%rip),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  jmp    L78
L51:
  cmpb   $0x2b,-0x19(%rbp)
  jne    L62
  movsd  D32(%rip),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  jmp    L78
L62:
  movsd  D32(%rip),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsbl -0x19(%rbp),%eax
  sub    $0x30,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x18(%rbp)
L78:
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <fgetc@plt>
  mov    %al,-0x19(%rbp)
  movsbl -0x19(%rbp),%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L1
  movsd  -0x18(%rbp),%xmm1
  movsd  D30(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsbl -0x19(%rbp),%eax
  sub    $0x30,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  -0x18(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L78
L1:
  nop
  cmpb   $0x2e,-0x19(%rbp)
  jne    L72
L87:
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <fgetc@plt>
  mov    %al,-0x19(%rbp)
  movsbl -0x19(%rbp),%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L88
  movsbl -0x19(%rbp),%eax
  sub    $0x30,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  -0x10(%rbp),%xmm0
  movsd  -0x18(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  D30(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L87
L88:
  nop
L72:
  movsd  -0x8(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D24
type_guessed: f64
name: disassemble_data
arguments: tag: D16
type_guessed: byte[8]
name: disassemble_data
arguments: tag: D32
type_guessed: byte[8]
name: disassemble_data
arguments: tag: D30
type_guessed: f64

tool: D24: 0.1

tool: {"D16": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf]}

tool: {"D32": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: D30: 10

assistant: ```c
double fscan_double(unsigned f) {
  double value, significance, sign;
  char c;
  value = 0;
  significance = 0.1;
  c = fgetc(f);
  if (c == '-') {
    sign = -1;
  } else if (c == '+') {
    sign = 1;
  } else {
    sign = 1;
    value = c - '0';
  }
  while (1) {
    c = fgetc(f);
    if (!isdigit(c))
      break;
    value *= 10;
    value += c - '0';
  }
  if (c == '.') {
    while (1) {
      c = fgetc(f);
      if (!isdigit(c))
        break;
      value += significance * (c - '0');
      significance /= 10.0;
    }
  }
  return sign * value;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<fscan_double>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,%r12d
  call   <fgetc@plt>
  cmp    $0x2d,%al
  je     L1
  cmp    $0x2b,%al
  je     L83
  movsbl %al,%eax
  sub    $0x30,%eax
  pxor   %xmm5,%xmm5
  cvtsi2sd %eax,%xmm5
  movsd  %xmm5,(%rsp)
  mov    D56(%rip),%r13
  jmp    L6
L1:
  mov    D17(%rip),%r13
  pxor   %xmm6,%xmm6
  movsd  %xmm6,(%rsp)
  jmp    L6
L83:
  mov    D56(%rip),%r13
  pxor   %xmm6,%xmm6
  movsd  %xmm6,(%rsp)
  jmp    L6
L73:
  movsd  (%rsp),%xmm0
  mulsd  D46(%rip),%xmm0
  sub    $0x30,%ebx
  pxor   %xmm1,%xmm1
  cvtsi2sd %ebx,%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsp)
L6:
  mov    %r12d,%edi
  call   <fgetc@plt>
  mov    %eax,%ebp
  movsbl %al,%ebx
  mov    %ebx,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  jne    L73
  cmp    $0x2e,%bpl
  je     L69
L15:
  movq   %r13,%xmm0
  mulsd  (%rsp),%xmm0
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L69:
  movsd  D18(%rip),%xmm7
  movsd  %xmm7,0x8(%rsp)
L11:
  mov    %r12d,%edi
  call   <fgetc@plt>
  movsbl %al,%ebx
  mov    %ebx,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L15
  sub    $0x30,%ebx
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebx,%xmm0
  movsd  0x8(%rsp),%xmm2
  mulsd  %xmm2,%xmm0
  addsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  divsd  D46(%rip),%xmm2
  movsd  %xmm2,0x8(%rsp)
  jmp    L11
```

tool_calls: name: extract_symbolic_data
arguments: label: D56
data_type: byte[8]
name: extract_symbolic_data
arguments: label: D17
data_type: byte[8]
name: extract_symbolic_data
arguments: label: D46
data_type: f64
name: extract_symbolic_data
arguments: label: D18
data_type: f64

tool: {"D56": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: {"D17": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf]}

tool: D46: 10

tool: D18: 0.1

assistant: ```c
double fscan_double(unsigned f) {
  double value, significance, sign;
  char c;
  value = 0;
  significance = 0.1;
  c = fgetc(f);
  if (c == '-') {
    sign = -1;
  } else if (c == '+') {
    sign = 1;
  } else {
    sign = 1;
    value = c - '0';
  }
  while (1) {
    c = fgetc(f);
    if (!isdigit(c))
      break;
    value *= 10;
    value += c - '0';
  }
  if (c == '.') {
    while (1) {
      c = fgetc(f);
      if (!isdigit(c))
        break;
      value += significance * (c - '0');
      significance /= 10.0;
    }
  }
  return sign * value;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<fscan_double>:
  endbr64
  push   %r12
  mov    %edi,%r12d
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  call   <fgetc@plt>
  cmp    $0x2d,%al
  je     L56
  cmp    $0x2b,%al
  je     L52
  movsbl %al,%eax
  pxor   %xmm5,%xmm5
  movsd  D7(%rip),%xmm6
  sub    $0x30,%eax
  cvtsi2sd %eax,%xmm5
  movsd  %xmm6,0x18(%rsp)
  movsd  %xmm5,0x8(%rsp)
  jmp    L21
  nopl   0x0(%rax,%rax,1)
L89:
  movsd  D29(%rip),%xmm0
  sub    $0x30,%ebx
  pxor   %xmm1,%xmm1
  mulsd  0x8(%rsp),%xmm0
  cvtsi2sd %ebx,%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
L21:
  mov    %r12d,%edi
  call   <fgetc@plt>
  movsbl %al,%ebx
  mov    %ebx,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  jne    L89
  cmp    $0x2e,%bl
  je     L76
L6:
  movsd  0x8(%rsp),%xmm0
  mulsd  0x18(%rsp),%xmm0
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L52:
  movsd  D7(%rip),%xmm5
  pxor   %xmm6,%xmm6
  movsd  %xmm6,0x8(%rsp)
  movsd  %xmm5,0x18(%rsp)
  jmp    L21
  nopw   0x0(%rax,%rax,1)
L56:
  movsd  D45(%rip),%xmm7
  movsd  %xmm7,0x18(%rsp)
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x8(%rsp)
  jmp    L21
  nopw   0x0(%rax,%rax,1)
L76:
  movsd  D21(%rip),%xmm1
  jmp    L62
  nopw   0x0(%rax,%rax,1)
L0:
  sub    $0x30,%ebx
  pxor   %xmm0,%xmm0
  movsd  0x10(%rsp),%xmm1
  cvtsi2sd %ebx,%xmm0
  mulsd  %xmm1,%xmm0
  divsd  D29(%rip),%xmm1
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
L62:
  mov    %r12d,%edi
  movsd  %xmm1,0x10(%rsp)
  call   <fgetc@plt>
  movsbl %al,%ebx
  mov    %ebx,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  jne    L0
  jmp    L6
```

tool_calls: name: retrieve_data
arguments: data_label: D7
datatype: byte[8]
name: retrieve_data
arguments: data_label: D29
datatype: f64
name: retrieve_data
arguments: data_label: D45
datatype: byte[8]
name: retrieve_data
arguments: data_label: D21
datatype: f64

tool: {"D7": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: D29: 10

tool: {"D45": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf]}

tool: D21: 0.1

assistant: ```c
double fscan_double(unsigned f) {
  double value, significance, sign;
  char c;
  value = 0;
  significance = 0.1;
  c = fgetc(f);
  if (c == '-') {
    sign = -1;
  } else if (c == '+') {
    sign = 1;
  } else {
    sign = 1;
    value = c - '0';
  }
  while (1) {
    c = fgetc(f);
    if (!isdigit(c))
      break;
    value *= 10;
    value += c - '0';
  }
  if (c == '.') {
    while (1) {
      c = fgetc(f);
      if (!isdigit(c))
        break;
      value += significance * (c - '0');
      significance /= 10.0;
    }
  }
  return sign * value;
}
```