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     L74
  lea    D239(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L266
  lea    D178(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  jne    L23
  movsd  0x8(%rsp),%xmm0
  subsd  D41(%rip),%xmm0
  mov    $0x1,%edx
  movsd  %xmm0,0x20(%rsp)
L301:
  test   %rbx,%rbx
  je     L52
  test   %dl,%dl
  je     L52
  movsd  0x20(%rsp),%xmm0
  movsd  %xmm0,(%rbx)
L52:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L240
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nop
L266:
  mov    $0x1,%edx
  jmp    L301
  nopw   0x0(%rax,%rax,1)
L23:
  lea    D25(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L33
  lea    D17(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  jne    L223
  movsd  0x8(%rsp),%xmm0
  subsd  D34(%rip),%xmm0
  mov    $0x1,%edx
  movsd  %xmm0,0x20(%rsp)
  jmp    L301
  nopl   0x0(%rax)
L33:
  movsd  0x8(%rsp),%xmm0
  addsd  D137(%rip),%xmm0
  mov    $0x1,%edx
  movsd  %xmm0,0x20(%rsp)
  jmp    L301
  cs nopw 0x0(%rax,%rax,1)
L223:
  lea    D84(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L286
  lea    D103(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  jne    L285
  movsd  0x8(%rsp),%xmm0
  addsd  D23(%rip),%xmm0
  mov    $0x1,%edx
  movsd  %xmm0,0x20(%rsp)
  jmp    L301
  nopl   0x0(%rax)
L286:
  movsd  0x8(%rsp),%xmm0
  subsd  D7(%rip),%xmm0
  mov    $0x1,%edx
  movsd  %xmm0,0x20(%rsp)
  jmp    L301
  cs nopw 0x0(%rax,%rax,1)
L74:
  mov    $0xffffffff,%eax
  jmp    L52
  nopw   0x0(%rax,%rax,1)
L285:
  lea    D69(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  jne    L298
  movsd  0x8(%rsp),%xmm0
  subsd  D169(%rip),%xmm0
  mov    $0x1,%edx
  movsd  %xmm0,0x20(%rsp)
  jmp    L301
L298:
  lea    D238(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  jne    L198
  movsd  0x8(%rsp),%xmm0
  subsd  D116(%rip),%xmm0
  mov    $0x1,%edx
  movsd  %xmm0,0x20(%rsp)
  jmp    L301
L198:
  lea    D168(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L215
  lea    D109(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L13
  lea    D136(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L314
  lea    D90(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L35
  lea    D142(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  je     L120
  lea    D88(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  jne    L74
  movsd  D4(%rip),%xmm0
  lea    0x20(%rsp),%rdi
  call   <_vtodb@plt>
  test   %eax,%eax
  sete   %dl
  jmp    L301
L215:
  movsd  D137(%rip),%xmm0
  lea    0x20(%rsp),%rdi
  call   <_vtodb@plt>
  test   %eax,%eax
  sete   %dl
  jmp    L301
L13:
  movsd  D130(%rip),%xmm0
  lea    0x20(%rsp),%rdi
  call   <_vtodb@plt>
  test   %eax,%eax
  sete   %dl
  jmp    L301
L314:
  movsd  D189(%rip),%xmm0
  lea    0x20(%rsp),%rdi
  call   <_vtodb@plt>
  test   %eax,%eax
  sete   %dl
  jmp    L301
L240:
  call   <__stack_chk_fail@plt>
L35:
  movsd  D23(%rip),%xmm0
  lea    0x20(%rsp),%rdi
  call   <_vtodb@plt>
  test   %eax,%eax
  sete   %dl
  jmp    L301
L120:
  movsd  D126(%rip),%xmm0
  lea    0x20(%rsp),%rdi
  call   <_vtodb@plt>
  test   %eax,%eax
  sete   %dl
  jmp    L301
```

tool_calls: name: disassemble_data
arguments: data_tag: D239
data_type: string
name: disassemble_data
arguments: data_tag: D178
data_type: string
name: disassemble_data
arguments: data_tag: D41
data_type: f64
name: disassemble_data
arguments: data_tag: D25
data_type: string
name: disassemble_data
arguments: data_tag: D17
data_type: string
name: disassemble_data
arguments: data_tag: D34
data_type: f64
name: disassemble_data
arguments: data_tag: D137
data_type: f64
name: disassemble_data
arguments: data_tag: D84
data_type: string
name: disassemble_data
arguments: data_tag: D103
data_type: string
name: disassemble_data
arguments: data_tag: D23
data_type: f64
name: disassemble_data
arguments: data_tag: D7
data_type: f64
name: disassemble_data
arguments: data_tag: D69
data_type: string
name: disassemble_data
arguments: data_tag: D169
data_type: f64
name: disassemble_data
arguments: data_tag: D238
data_type: string
name: disassemble_data
arguments: data_tag: D116
data_type: f64
name: disassemble_data
arguments: data_tag: D168
data_type: string
name: disassemble_data
arguments: data_tag: D109
data_type: string
name: disassemble_data
arguments: data_tag: D136
data_type: string
name: disassemble_data
arguments: data_tag: D90
data_type: string
name: disassemble_data
arguments: data_tag: D142
data_type: string
name: disassemble_data
arguments: data_tag: D88
data_type: string
name: disassemble_data
arguments: data_tag: D4
data_type: byte[8]
name: disassemble_data
arguments: data_tag: D130
data_type: byte[8]
name: disassemble_data
arguments: data_tag: D189
data_type: byte[8]
name: disassemble_data
arguments: data_tag: D126
data_type: byte[8]

tool: D239: dbm

tool: D178: dbf

tool: D41: 120

tool: D25: dbv

tool: D17: dbmv

tool: D34: 47

tool: D137: 13

tool: D84: dbuv

tool: D103: dbemfv

tool: D23: 7

tool: D7: 107

tool: D69: dbemfmv

tool: D169: 53

tool: D238: dbemfuv

tool: D116: 113

tool: D168: v

tool: D109: mv

tool: D136: uv

tool: D90: emfv

tool: D142: emfmv

tool: D88: emfmuv

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

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

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

tool: {"D126": [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;
}
```