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

```asm
<parse_bytes>:
  endbr64
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <strlen@plt>
  lea    D28(%rip),%rsi
  mov    %rbp,%rdi
  movslq %eax,%rbx
  call   <strcmp@plt>
  test   %eax,%eax
  je     L121
  add    %rbp,%rbx
  cmp    %rbx,%rbp
  jb     L132
  jmp    L298
  nopl   0x0(%rax,%rax,1)
L159:
  sub    $0x1,%rbx
  cmp    %rbx,%rbp
  je     L105
L132:
  movsbl -0x1(%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L159
L298:
  cmp    %rbx,%rbp
  je     L105
  movsbl -0x1(%rbx),%edi
  call   <tolower@plt>
  cmp    $0x6d,%eax
  je     L209
  jg     L169
  cmp    $0x67,%eax
  je     L134
  cmp    $0x6b,%eax
  jne    L49
  movsd  D35(%rip),%xmm4
  sub    $0x1,%rbx
  movsd  %xmm4,0x8(%rsp)
L179:
  cmp    %rbx,%rbp
  jb     L180
  jmp    L238
  nopw   0x0(%rax,%rax,1)
L189:
  add    $0x1,%rbp
  cmp    %rbx,%rbp
  je     L105
L180:
  movsbl 0x0(%rbp),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L189
  cmp    %rbx,%rbp
  jb     L8
  jmp    L238
  nopw   0x0(%rax,%rax,1)
L304:
  sub    $0x1,%rbx
  cmp    %rbx,%rbp
  je     L105
L8:
  movsbl -0x1(%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L304
L238:
  cmp    %rbp,%rbx
  je     L105
L187:
  lea    0x10(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strtod@plt>
  cmp    %rbp,0x10(%rsp)
  je     L105
  mulsd  0x8(%rsp),%xmm0
  movsd  D24(%rip),%xmm1
  comisd %xmm1,%xmm0
  jae    L268
  cvttsd2si %xmm0,%rax
  mov    %rax,(%r12)
L245:
  mov    $0x1,%eax
  jmp    L43
  nopl   0x0(%rax)
L169:
  cmp    $0x74,%eax
  jne    L49
  movsd  D58(%rip),%xmm7
  sub    $0x1,%rbx
  movsd  %xmm7,0x8(%rsp)
  jmp    L179
  nopl   0x0(%rax)
L105:
  xor    %eax,%eax
L43:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L269
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nop
L121:
  movq   $0x0,(%r12)
  mov    $0x1,%eax
  jmp    L43
  nop
L268:
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,(%r12)
  btcq   $0x3f,(%r12)
  jmp    L245
  nopl   (%rax)
L49:
  movsd  D34(%rip),%xmm3
  movsd  %xmm3,0x8(%rsp)
  cmp    %rbx,%rbp
  jb     L180
  jmp    L187
  nopl   0x0(%rax)
L134:
  movsd  D61(%rip),%xmm6
  sub    $0x1,%rbx
  movsd  %xmm6,0x8(%rsp)
  jmp    L179
  nop
L209:
  movsd  D38(%rip),%xmm5
  sub    $0x1,%rbx
  movsd  %xmm5,0x8(%rsp)
  jmp    L179
L269:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D28
datatype: string
name: disassemble_data
arguments: data_label: D35
datatype: f64
name: disassemble_data
arguments: data_label: D24
datatype: byte[8]
name: disassemble_data
arguments: data_label: D58
datatype: f64
name: disassemble_data
arguments: data_label: D34
datatype: byte[8]
name: disassemble_data
arguments: data_label: D61
datatype: f64
name: disassemble_data
arguments: data_label: D38
datatype: f64

tool: D28: inf

tool: D35: 1024

tool: {"D24": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x43]}

tool: D58: 1099511627776

tool: {"D34": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: D61: 1073741824

tool: D38: 1048576

assistant: ```c
int parse_bytes(const char *val, unsigned long *result) {
  double number, mult;
  const char *end = val + strlen(val);
  char *endptr;
  if (!strcmp(val, "inf")) {
    *result = 0;
    return 1;
  }
  while (val < end && isspace(end[-1]))
    --end;
  if (val == end)
    return 0;
  switch (tolower(end[-1])) {
  case 'k':
    --end, mult = 1024.0;
    break;
  case 'm':
    --end, mult = 1048576.0;
    break;
  case 'g':
    --end, mult = 1073741824.0;
    break;
  case 't':
    --end, mult = 1099511627776.0;
    break;
  default:
    mult = 1;
  }
  while (val < end && isspace(*val))
    ++val;
  while (val < end && isspace(end[-1]))
    --end;
  if (val == end)
    return 0;
  number = strtod(val, &endptr);
  if (val == endptr)
    return 0;
  *result = (unsigned long)(number * mult);
  return 1;
}
```