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

```asm
<ConfigConvertSpeedToInt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x2c(%rbp)
  movl   $0x0,-0x28(%rbp)
  lea    -0x2c(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  movl   $0x1,-0x1c(%rbp)
  movl   $0x0,-0x20(%rbp)
  jmp    L146
L103:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L129
L37:
  mov    -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L13
  mov    -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jg     L13
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%ecx
  mov    -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  lea    (%rcx,%rax,1),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x1c(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L109
L13:
  mov    -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x6d,%eax
  je     L128
  cmp    $0x6d,%eax
  jg     L109
  cmp    $0x6b,%eax
  je     L1
  cmp    $0x6b,%eax
  jg     L109
  cmp    $0x4d,%eax
  je     L128
  cmp    $0x4d,%eax
  jg     L109
  cmp    $0x2e,%eax
  je     L68
  cmp    $0x4b,%eax
  jne    L109
L1:
  mov    -0x2c(%rbp),%eax
  shl    $0xa,%eax
  mov    %eax,%ecx
  mov    $0x400,%eax
  cltd
  idivl  -0x1c(%rbp)
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  imul   %edx,%eax
  add    %ecx,%eax
  jmp    L142
L128:
  mov    -0x2c(%rbp),%eax
  shl    $0x14,%eax
  mov    %eax,%ecx
  mov    $0x100000,%eax
  cltd
  idivl  -0x1c(%rbp)
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  imul   %edx,%eax
  add    %ecx,%eax
  jmp    L142
L68:
  lea    -0x28(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  movl   $0x1,-0x1c(%rbp)
  nop
L109:
  addl   $0x1,-0x24(%rbp)
L129:
  mov    -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L37
  addl   $0x1,-0x20(%rbp)
L146:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L103
  mov    -0x2c(%rbp),%eax
L142:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L53
  call   <__stack_chk_fail@plt>
L53:
  leave
  ret
```

assistant: ```c
int ConfigConvertSpeedToInt(char **tb) {
  const char *str;
  int nb = 0;
  int div = 0;
  int i, j;
  int *ptr = &nb;
  int len = 1;
  for (j = 0; tb[j]; j++) {
    str = tb[j];
    for (i = 0; str[i] != '\0'; i++) {
      if (str[i] >= '0' && str[i] <= '9') {
        *ptr = *ptr * 10 + ((int)str[i] - (int)'0');
        len *= 10;
      } else
        switch (str[i]) {
        case 'k':
        case 'K':
          return (nb * 1024 + div * (1024 / len));
        case 'm':
        case 'M':
          return (nb * 1024 * 1024 + div * ((1024 * 1024) / len));
        case '.':
          ptr = &div;
          len = 1;
          break;
        }
    }
  }
  return (nb);
}
```