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

```asm
<readMx>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x3c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x14(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5b,%al
  jne    L96
  addq   $0x1,-0x10(%rbp)
L96:
  movl   $0x0,-0x18(%rbp)
  jmp    L136
L194:
  cmpl   $0xc,-0x3c(%rbp)
  je     L210
  cmpl   $0xc,-0x3c(%rbp)
  jg     L159
  cmpl   $0x7,-0x3c(%rbp)
  je     L90
  cmpl   $0x7,-0x3c(%rbp)
  jg     L159
  cmpl   $0x3,-0x3c(%rbp)
  je     L55
  cmpl   $0x6,-0x3c(%rbp)
  je     L152
  jmp    L159
L210:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%rax
  lea    D30(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L243
L152:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%rax
  lea    D13(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L243
L90:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%rax
  lea    D17(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L243
L55:
  lea    -0x1c(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  lea    D30(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    %dl,(%rax)
  jmp    L243
L159:
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <ERROR@plt>
L243:
  cmpl   $0x0,-0x14(%rbp)
  je     L147
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5d,%al
  je     L147
  jmp    L49
L214:
  addq   $0x1,-0x10(%rbp)
L49:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L15
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jle    L214
L15:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  je     L214
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  je     L214
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2c,%al
  je     L99
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  jne    L60
L99:
  addq   $0x1,-0x10(%rbp)
L60:
  addl   $0x1,-0x18(%rbp)
L136:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L147
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x18(%rbp)
  jl     L194
L147:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5d,%al
  jne    L144
  addq   $0x1,-0x10(%rbp)
L144:
  mov    -0x28(%rbp),%rax
  mov    -0x18(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x10(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L148
  call   <__stack_chk_fail@plt>
L148:
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D30
type_infered: string
name: parse_data
arguments: tag: D13
type_infered: string
name: parse_data
arguments: tag: D17
type_infered: string
name: parse_data
arguments: tag: D20
type_infered: string

tool: D30: %d

tool: D13: %lf

tool: D17: %f

tool: D20: Unsupported data type

assistant: ```c
char *readMx(int *numel, char *datstr, void *data, int dtype) {
  char *cp = datstr;
  int i, nch = 0, tmp;
  if (*cp == '[')
    cp++;
  for (i = 0; *cp != 0 && i < *numel; i++) {
    switch (dtype) {
    case 12:
      nch = sscanf(cp, "%d", ((int *)data) + i);
      break;
    case 6:
      nch = sscanf(cp, "%lf", ((double *)data) + i);
      break;
    case 7:
      nch = sscanf(cp, "%f", ((float *)data) + i);
      break;
    case 3:
      nch = sscanf(cp, "%d", &tmp);
      ((char *)data)[i] = (char)tmp;
      break;
    default:
      ERROR("Unsupported data type");
    }
    if (nch == 0 || *cp == ']')
      break;
    for (; (*cp >= '0' && *cp <= '9') || *cp == '.' || *cp == '-'; cp++)
      ;
    if (*cp == ',' || *cp == ' ')
      cp++;
  }
  if (*cp == ']')
    cp++;
  *numel = i;
  return cp;
}
```