user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<convert_units>:
  endbr64
  test   %rdi,%rdi
  je     L104
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  test   %rsi,%rsi
  je     L42
  mov    %rdx,%r12
  test   %rdx,%rdx
  je     L43
  mov    %rdi,%r13
  mov    %rdx,%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  xor    %r8d,%r8d
  test   %rax,%rax
  jne    L52
L96:
  pop    %rbp
  mov    %r8d,%eax
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L52:
  lea    D140(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L85
  lea    D33(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L27
  lea    D25(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  movsd  D110(%rip),%xmm0
  test   %rax,%rax
  je     L6
  lea    D185(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  movsd  D52(%rip),%xmm0
  test   %rax,%rax
  je     L6
  lea    D104(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  movsd  D111(%rip),%xmm0
  test   %rax,%rax
  je     L6
  lea    D6(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L166
  lea    D1(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L98
  lea    D186(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L60
  lea    D147(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  movsd  D181(%rip),%xmm0
  test   %rax,%rax
  je     L33
  lea    D118(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  movsd  D0(%rip),%xmm0
  test   %rax,%rax
  je     L33
  lea    D153(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    $0x1,%r8d
  test   %rax,%rax
  jne    L96
  movsd  D101(%rip),%xmm0
L33:
  mulsd  0x0(%r13),%xmm0
  movsd  %xmm0,0x0(%r13)
L60:
  pop    %rbp
  mov    %r12,%rsi
  mov    %r13,%rdi
  pop    %r12
  pop    %r13
  jmp    1080 <convert_units_from_THz@plt>
  xchg   %ax,%ax
L27:
  movsd  D181(%rip),%xmm0
L6:
  mulsd  0x0(%r13),%xmm0
  movsd  %xmm0,0x0(%r13)
L85:
  pop    %rbp
  mov    %r12,%rsi
  mov    %r13,%rdi
  pop    %r12
  pop    %r13
  jmp    1090 <convert_units_from_um@plt>
  nopl   0x0(%rax)
L98:
  movsd  D91(%rip),%xmm0
  mulsd  0x0(%r13),%xmm0
  movsd  %xmm0,0x0(%r13)
L166:
  pop    %rbp
  mov    %r12,%rsi
  mov    %r13,%rdi
  pop    %r12
  pop    %r13
  jmp    10b0 <convert_units_from_eV@plt>
L43:
  mov    $0xfffffffd,%r8d
  jmp    L96
L42:
  mov    $0xfffffffe,%r8d
  jmp    L96
L104:
  mov    $0xffffffff,%eax
  ret
```

tool_calls: name: read_data
arguments: data_label: D140
data_type: string
name: read_data
arguments: data_label: D33
data_type: string
name: read_data
arguments: data_label: D25
data_type: string
name: read_data
arguments: data_label: D110
data_type: f64
name: read_data
arguments: data_label: D185
data_type: string
name: read_data
arguments: data_label: D52
data_type: f64
name: read_data
arguments: data_label: D104
data_type: string
name: read_data
arguments: data_label: D111
data_type: f64
name: read_data
arguments: data_label: D6
data_type: string
name: read_data
arguments: data_label: D1
data_type: string
name: read_data
arguments: data_label: D186
data_type: string
name: read_data
arguments: data_label: D147
data_type: string
name: read_data
arguments: data_label: D181
data_type: byte[8]
name: read_data
arguments: data_label: D118
data_type: string
name: read_data
arguments: data_label: D0
data_type: byte[8]
name: read_data
arguments: data_label: D153
data_type: string
name: read_data
arguments: data_label: D101
data_type: byte[8]
name: read_data
arguments: data_label: D91
data_type: f64

tool: D140: um

tool: D33: nm

tool: D25: m

tool: D110: 1000000

tool: D185: cm

tool: D52: 10000

tool: D104: mm

tool: D111: 1000

tool: D6: eV

tool: D1: J

tool: D186: THz

tool: D147: GHz

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

tool: D118: Hz

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

tool: D153: rad/s

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

tool: D91: 6.241506363094027e+18

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;
  }
}
```