user: Converte this assembly snippet into its equivalent C code:

```asm
<convert_units>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %rdx,-0x18(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L16
  mov    $0xffffffff,%eax
  jmp    L54
L16:
  cmpq   $0x0,-0x10(%rbp)
  jne    L280
  mov    $0xfffffffe,%eax
  jmp    L54
L280:
  cmpq   $0x0,-0x18(%rbp)
  jne    L281
  mov    $0xfffffffd,%eax
  jmp    L54
L281:
  mov    -0x18(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L248
  mov    $0x0,%eax
  jmp    L54
L248:
  mov    -0x10(%rbp),%rax
  lea    D89(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L107
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <convert_units_from_um@plt>
  jmp    L54
L107:
  mov    -0x10(%rbp),%rax
  lea    D131(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L19
  mov    -0x8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D46(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x8(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <convert_units_from_um@plt>
  jmp    L54
L19:
  mov    -0x10(%rbp),%rax
  lea    D106(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L267
  mov    -0x8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D37(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x8(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <convert_units_from_um@plt>
  jmp    L54
L267:
  mov    -0x10(%rbp),%rax
  lea    D136(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L131
  mov    -0x8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D126(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x8(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <convert_units_from_um@plt>
  jmp    L54
L131:
  mov    -0x10(%rbp),%rax
  lea    D43(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L257
  mov    -0x8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D24(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x8(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <convert_units_from_um@plt>
  jmp    L54
L257:
  mov    -0x10(%rbp),%rax
  lea    D112(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L89
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <convert_units_from_eV@plt>
  jmp    L54
L89:
  mov    -0x10(%rbp),%rax
  lea    D95(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L101
  mov    -0x8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D129(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x8(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <convert_units_from_eV@plt>
  jmp    L54
L101:
  mov    -0x10(%rbp),%rax
  lea    D132(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L8
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <convert_units_from_THz@plt>
  jmp    L54
L8:
  mov    -0x10(%rbp),%rax
  lea    D56(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L73
  mov    -0x8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D46(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x8(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <convert_units_from_THz@plt>
  jmp    L54
L73:
  mov    -0x10(%rbp),%rax
  lea    D26(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L95
  mov    -0x8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D178(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x8(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <convert_units_from_THz@plt>
  jmp    L54
L95:
  mov    -0x10(%rbp),%rax
  lea    D174(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L183
  mov    -0x8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D166(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x8(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <convert_units_from_THz@plt>
  jmp    L54
L183:
  mov    $0x1,%eax
L54:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D89
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D131
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D46
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_tag: D106
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D37
type_infered: f64
name: extract_symbolic_data
arguments: data_tag: D136
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D126
type_infered: f64
name: extract_symbolic_data
arguments: data_tag: D43
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D24
type_infered: f64
name: extract_symbolic_data
arguments: data_tag: D112
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D95
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D129
type_infered: f64
name: extract_symbolic_data
arguments: data_tag: D132
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D56
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D26
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D178
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_tag: D174
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D166
type_infered: byte[8]

tool: D89: um

tool: D131: nm

tool: {"D46": [0xfc,0xa9,0xf1,0xd2,0x4d,0x62,0x50,0x3f]}

tool: D106: m

tool: D37: 1000000

tool: D136: cm

tool: D126: 10000

tool: D43: mm

tool: D24: 1000

tool: D112: eV

tool: D95: J

tool: D129: 6.241506363094027e+18

tool: D132: THz

tool: D56: GHz

tool: D26: Hz

tool: {"D178": [0x11,0xea,0x2d,0x81,0x99,0x97,0x71,0x3d]}

tool: D174: rad/s

tool: {"D166": [0x6d,0x8b,0x6b,0x40,0x29,0x66,0x46,0x3d]}

assistant: ```c
int convert_units(double *value, const char *from_units, const char *to_units) {
  if (NULL == value) {
    return -1;
  }
  if (NULL == from_units) {
    return -2;
  }
  if (NULL == to_units) {
    return -3;
  }
  if (0 == strcmp(from_units, to_units)) {
    return 0;
  } else if (0 == strcmp(from_units, "um")) {
    return convert_units_from_um(value, to_units);
  } else if (0 == strcmp(from_units, "nm")) {
    *value *= 1e-3;
    return convert_units_from_um(value, to_units);
  } else if (0 == strcmp(from_units, "m")) {
    *value *= 1e6;
    return convert_units_from_um(value, to_units);
  } else if (0 == strcmp(from_units, "cm")) {
    *value *= 1e4;
    return convert_units_from_um(value, to_units);
  } else if (0 == strcmp(from_units, "mm")) {
    *value *= 1e3;
    return convert_units_from_um(value, to_units);
  } else if (0 == strcmp(from_units, "eV")) {
    return convert_units_from_eV(value, to_units);
  } else if (0 == strcmp(from_units, "J")) {
    *value *= 6.241506363094027e18;
    return convert_units_from_eV(value, to_units);
  } else if (0 == strcmp(from_units, "THz")) {
    return convert_units_from_THz(value, to_units);
  } else if (0 == strcmp(from_units, "GHz")) {
    *value *= 1e-3;
    return convert_units_from_THz(value, to_units);
  } else if (0 == strcmp(from_units, "Hz")) {
    *value *= 1e-12;
    return convert_units_from_THz(value, to_units);
  } else if (0 == strcmp(from_units, "rad/s")) {
    *value *= 1.5915494309189535e-13;
    return convert_units_from_THz(value, to_units);
  } else {
    return 1;
  }
}
```