user: 请从给定的汇编指令推导出C源代码:

```asm
<amplstr>:
  endbr64
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x18(%rsp),%rsi
  call   <strtod@plt>
  mov    0x18(%rsp),%rbp
  movsd  %xmm0,0x20(%rsp)
  cmpb   $0x0,0x0(%rbp)
  movsd  %xmm0,0x8(%rsp)
  je     L75
  lea    D210(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L176
  lea    D155(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  jne    L236
  movsd  0x8(%rsp),%xmm0
  subsd  D226(%rip),%xmm0
  mov    $0x1,%edx
  movsd  %xmm0,0x20(%rsp)
L4:
  test   %rbx,%rbx
  je     L78
  test   %dl,%dl
  je     L78
  movsd  0x20(%rsp),%xmm0
  movsd  %xmm0,(%rbx)
L78:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L17
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nop
L176:
  mov    $0x1,%edx
  jmp    L4
  nopw   0x0(%rax,%rax,1)
L236:
  lea    D76(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L26
  lea    D46(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  jne    L45
  movsd  0x8(%rsp),%xmm0
  subsd  D149(%rip),%xmm0
  mov    $0x1,%edx
  movsd  %xmm0,0x20(%rsp)
  jmp    L4
  nopl   0x0(%rax)
L26:
  movsd  0x8(%rsp),%xmm0
  addsd  D132(%rip),%xmm0
  mov    $0x1,%edx
  movsd  %xmm0,0x20(%rsp)
  jmp    L4
  cs nopw 0x0(%rax,%rax,1)
L45:
  lea    D94(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L284
  lea    D257(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  jne    L179
  movsd  0x8(%rsp),%xmm0
  addsd  D102(%rip),%xmm0
  mov    $0x1,%edx
  movsd  %xmm0,0x20(%rsp)
  jmp    L4
  nopl   0x0(%rax)
L284:
  movsd  0x8(%rsp),%xmm0
  subsd  D74(%rip),%xmm0
  mov    $0x1,%edx
  movsd  %xmm0,0x20(%rsp)
  jmp    L4
  cs nopw 0x0(%rax,%rax,1)
L75:
  mov    $0xffffffff,%eax
  jmp    L78
  nopw   0x0(%rax,%rax,1)
L179:
  lea    D105(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  jne    L271
  movsd  0x8(%rsp),%xmm0
  subsd  D95(%rip),%xmm0
  mov    $0x1,%edx
  movsd  %xmm0,0x20(%rsp)
  jmp    L4
L271:
  lea    D0(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  jne    L168
  movsd  0x8(%rsp),%xmm0
  subsd  D191(%rip),%xmm0
  mov    $0x1,%edx
  movsd  %xmm0,0x20(%rsp)
  jmp    L4
L168:
  lea    D220(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L204
  lea    D171(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L156
  lea    D129(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L304
  lea    D75(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L158
  lea    D119(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L128
  lea    D87(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  jne    L75
  movsd  D50(%rip),%xmm0
  lea    0x20(%rsp),%rdi
  call   <_vtodb@plt>
  test   %eax,%eax
  sete   %dl
  jmp    L4
L204:
  movsd  D132(%rip),%xmm0
  lea    0x20(%rsp),%rdi
  call   <_vtodb@plt>
  test   %eax,%eax
  sete   %dl
  jmp    L4
L156:
  movsd  D245(%rip),%xmm0
  lea    0x20(%rsp),%rdi
  call   <_vtodb@plt>
  test   %eax,%eax
  sete   %dl
  jmp    L4
L304:
  movsd  D176(%rip),%xmm0
  lea    0x20(%rsp),%rdi
  call   <_vtodb@plt>
  test   %eax,%eax
  sete   %dl
  jmp    L4
L17:
  call   <__stack_chk_fail@plt>
L158:
  movsd  D102(%rip),%xmm0
  lea    0x20(%rsp),%rdi
  call   <_vtodb@plt>
  test   %eax,%eax
  sete   %dl
  jmp    L4
L128:
  movsd  D249(%rip),%xmm0
  lea    0x20(%rsp),%rdi
  call   <_vtodb@plt>
  test   %eax,%eax
  sete   %dl
  jmp    L4
```

tool_calls: name: unpack_data
arguments: data_tag: D210
type_guessed: string
name: unpack_data
arguments: data_tag: D155
type_guessed: string
name: unpack_data
arguments: data_tag: D226
type_guessed: f64
name: unpack_data
arguments: data_tag: D76
type_guessed: string
name: unpack_data
arguments: data_tag: D46
type_guessed: string
name: unpack_data
arguments: data_tag: D149
type_guessed: f64
name: unpack_data
arguments: data_tag: D132
type_guessed: f64
name: unpack_data
arguments: data_tag: D94
type_guessed: string
name: unpack_data
arguments: data_tag: D257
type_guessed: string
name: unpack_data
arguments: data_tag: D102
type_guessed: f64
name: unpack_data
arguments: data_tag: D74
type_guessed: f64
name: unpack_data
arguments: data_tag: D105
type_guessed: string
name: unpack_data
arguments: data_tag: D95
type_guessed: f64
name: unpack_data
arguments: data_tag: D0
type_guessed: string
name: unpack_data
arguments: data_tag: D191
type_guessed: f64
name: unpack_data
arguments: data_tag: D220
type_guessed: string
name: unpack_data
arguments: data_tag: D171
type_guessed: string
name: unpack_data
arguments: data_tag: D129
type_guessed: string
name: unpack_data
arguments: data_tag: D75
type_guessed: string
name: unpack_data
arguments: data_tag: D119
type_guessed: string
name: unpack_data
arguments: data_tag: D87
type_guessed: string
name: unpack_data
arguments: data_tag: D50
type_guessed: byte[8]
name: unpack_data
arguments: data_tag: D245
type_guessed: byte[8]
name: unpack_data
arguments: data_tag: D176
type_guessed: byte[8]
name: unpack_data
arguments: data_tag: D249
type_guessed: byte[8]

tool: D210: dbm

tool: D155: dbf

tool: D226: 120

tool: D76: dbv

tool: D46: dbmv

tool: D149: 47

tool: D132: 13

tool: D94: dbuv

tool: D257: dbemfv

tool: D102: 7

tool: D74: 107

tool: D105: dbemfmv

tool: D95: 53

tool: D0: dbemfuv

tool: D191: 113

tool: D220: v

tool: D171: mv

tool: D129: uv

tool: D75: emfv

tool: D119: emfmv

tool: D87: emfmuv

tool: {"D50": [0x00,0x00,0x00,0x00,0x00,0x40,0x5c,0xc0]}

tool: {"D245": [0x00,0x00,0x00,0x00,0x00,0x80,0x47,0xc0]}

tool: {"D176": [0x00,0x00,0x00,0x00,0x00,0xc0,0x5a,0xc0]}

tool: {"D249": [0x00,0x00,0x00,0x00,0x00,0x80,0x4a,0xc0]}

assistant: ```c
int amplstr(char *str, double *ampl) {
  int result = 0;
  char *end;
  double a = strtod(str, &end);
  if (!*end)
    result = -1;
  else if (!strcasecmp(end, "dbm"))
    ;
  else if (!strcasecmp(end, "dbf"))
    a -= 120.0;
  else if (!strcasecmp(end, "dbv"))
    a += 13.0;
  else if (!strcasecmp(end, "dbmv"))
    a -= 47.0;
  else if (!strcasecmp(end, "dbuv"))
    a -= 107.0;
  else if (!strcasecmp(end, "dbemfv"))
    a += 7.0;
  else if (!strcasecmp(end, "dbemfmv"))
    a -= 53.0;
  else if (!strcasecmp(end, "dbemfuv"))
    a -= 113.0;
  else if (!strcasecmp(end, "v"))
    result = _vtodb(&a, 13.0);
  else if (!strcasecmp(end, "mv"))
    result = _vtodb(&a, -47.0);
  else if (!strcasecmp(end, "uv"))
    result = _vtodb(&a, -107.0);
  else if (!strcasecmp(end, "emfv"))
    result = _vtodb(&a, 7.0);
  else if (!strcasecmp(end, "emfmv"))
    result = _vtodb(&a, -53.0);
  else if (!strcasecmp(end, "emfmuv"))
    result = _vtodb(&a, -113.0);
  else
    result = -1;
  if (result == 0 && ampl != NULL)
    *ampl = a;
  return result;
}
```