user: 请将以下的汇编代码转换成C语言代码:

```asm
<convert_units_from_THz>:
  endbr64
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  mov    %rsi,%rbp
  lea    D186(%rip),%rsi
  push   %rbx
  mov    %rdi,%rbx
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L22
L107:
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L22:
  lea    D128(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L1
  mov    %r12d,%eax
  movsd  D17(%rip),%xmm0
  divsd  (%rbx),%xmm0
  movsd  %xmm0,(%rbx)
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L1:
  lea    D24(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L185
  mov    %r12d,%eax
  movsd  D182(%rip),%xmm0
  divsd  (%rbx),%xmm0
  movsd  %xmm0,(%rbx)
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L185:
  lea    D159(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L85
  movsd  D171(%rip),%xmm0
  divsd  (%rbx),%xmm0
  movsd  %xmm0,(%rbx)
  jmp    L107
  nopl   0x0(%rax)
L85:
  lea    D127(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L164
  movsd  D41(%rip),%xmm0
  divsd  (%rbx),%xmm0
  movsd  %xmm0,(%rbx)
  jmp    L107
L164:
  lea    D43(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L61
  movsd  D165(%rip),%xmm0
  divsd  (%rbx),%xmm0
  movsd  %xmm0,(%rbx)
  jmp    L107
L61:
  lea    D78(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L32
  movsd  D62(%rip),%xmm0
  mulsd  (%rbx),%xmm0
  movsd  %xmm0,(%rbx)
  jmp    L107
L32:
  lea    D5(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L146
  movsd  D113(%rip),%xmm0
  mulsd  (%rbx),%xmm0
  movsd  %xmm0,(%rbx)
  jmp    L107
L146:
  lea    D0(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L120
  movsd  D198(%rip),%xmm0
  mulsd  (%rbx),%xmm0
  movsd  %xmm0,(%rbx)
  jmp    L107
L120:
  lea    D144(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L128
  movsd  D31(%rip),%xmm0
  mulsd  (%rbx),%xmm0
  xor    %r12d,%r12d
  movsd  %xmm0,(%rbx)
  jmp    L107
L128:
  lea    D23(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L172
  movsd  D4(%rip),%xmm0
  mulsd  (%rbx),%xmm0
  xor    %r12d,%r12d
  movsd  %xmm0,(%rbx)
  jmp    L107
L172:
  mov    $0x2,%r12d
  jmp    L107
```

tool_calls: name: parse_data
arguments: label: D186
type: string
name: parse_data
arguments: label: D128
type: string
name: parse_data
arguments: label: D17
type: f64
name: parse_data
arguments: label: D24
type: string
name: parse_data
arguments: label: D182
type: f64
name: parse_data
arguments: label: D159
type: string
name: parse_data
arguments: label: D171
type: byte[8]
name: parse_data
arguments: label: D127
type: string
name: parse_data
arguments: label: D41
type: byte[8]
name: parse_data
arguments: label: D43
type: string
name: parse_data
arguments: label: D165
type: byte[8]
name: parse_data
arguments: label: D78
type: string
name: parse_data
arguments: label: D62
type: f64
name: parse_data
arguments: label: D5
type: string
name: parse_data
arguments: label: D113
type: byte[8]
name: parse_data
arguments: label: D0
type: string
name: parse_data
arguments: label: D198
type: f64
name: parse_data
arguments: label: D144
type: string
name: parse_data
arguments: label: D31
type: f64
name: parse_data
arguments: label: D23
type: string
name: parse_data
arguments: label: D4
type: f64

tool: D186: THz

tool: D128: um

tool: D17: 299.792458

tool: D24: nm

tool: D182: 299792.458

tool: D159: m

tool: {"D171": [0x90,0x94,0x7d,0xcd,0xae,0xa5,0x33,0x3f]}

tool: D127: cm

tool: {"D41": [0x20,0x38,0x14,0x21,0xe1,0xb2,0x9e,0x3f]}

tool: D43: mm

tool: {"D165": [0x14,0xa3,0xac,0xb4,0xcc,0x2f,0xd3,0x3f]}

tool: D78: eV

tool: D62: 0.004135665157613982

tool: D5: J

tool: {"D113": [0x81,0x02,0xb7,0x36,0x57,0x08,0x89,0x3b]}

tool: D0: GHz

tool: D198: 1000

tool: D144: Hz

tool: D31: 1000000000000

tool: D23: rad/s

tool: D4: 6283185307179.586

assistant: ```c
int convert_units_from_THz(double *value, const char *to_units) {
  if (0 == strcmp(to_units, "THz")) {
    return 0;
  } else if (0 == strcmp(to_units, "um")) {
    *value = 2.99792458e2 / *value;
  } else if (0 == strcmp(to_units, "nm")) {
    *value = 2.99792458e5 / *value;
  } else if (0 == strcmp(to_units, "m")) {
    *value = 2.99792458e-4 / *value;
  } else if (0 == strcmp(to_units, "cm")) {
    *value = 2.99792458e-2 / *value;
  } else if (0 == strcmp(to_units, "mm")) {
    *value = 2.99792458e-1 / *value;
  } else if (0 == strcmp(to_units, "eV")) {
    *value *= 0.004135665157613982;
  } else if (0 == strcmp(to_units, "J")) {
    *value *= 6.6260689599999995e-22;
  } else if (0 == strcmp(to_units, "GHz")) {
    *value *= 1e3;
  } else if (0 == strcmp(to_units, "Hz")) {
    *value *= 1e12;
  } else if (0 == strcmp(to_units, "rad/s")) {
    *value *= 6.283185307179586e12;
  } else {
    return 2;
  }
  return 0;
}
```