user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<iupStrToDoubleDouble>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%eax
  mov    %al,-0x2c(%rbp)
  mov    -0x18(%rbp),%rax
  test   %rax,%rax
  jne    L172
  mov    $0x0,%eax
  jmp    L155
L172:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jle    L141
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5a,%al
  jg     L141
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    $0x20,%eax
  jmp    L154
L141:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
L154:
  movsbl -0x2c(%rbp),%edx
  cmp    %edx,%eax
  jne    L138
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    -0x28(%rbp),%rdx
  lea    D26(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L179
  mov    $0x0,%eax
  jmp    L155
L179:
  mov    $0x1,%eax
  jmp    L155
L138:
  movsbl -0x2c(%rbp),%edx
  lea    -0x18(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <iStrDupUntilNoCase@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L163
  mov    -0x18(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  lea    D26(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L161
  mov    $0x0,%eax
  jmp    L155
L161:
  mov    $0x1,%eax
  jmp    L155
L163:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L44
  mov    -0x20(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  lea    D26(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  cmpl   $0x1,-0xc(%rbp)
  je     L48
  mov    $0x0,%eax
  jmp    L155
L48:
  mov    $0x1,%eax
  jmp    L155
L44:
  movl   $0x0,-0x10(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  lea    D26(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  jne    L38
  addl   $0x1,-0x10(%rbp)
L38:
  mov    -0x18(%rbp),%rax
  mov    -0x28(%rbp),%rdx
  lea    D26(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  jne    L176
  addl   $0x1,-0x10(%rbp)
L176:
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x10(%rbp),%eax
L155:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D26
type: string

tool: D26: %lf

assistant: ```c
int iupStrToDoubleDouble(const char *str, double *f1, double *f2, char sep) {
  if (!str)
    return 0;
  if (((*str >= 'A' && *str <= 'Z') ? (*str - 'A') + 'a' : *str) == sep) {
    str++;
    if (sscanf(str, "%lf", f2) != 1)
      return 0;
    return 1;
  } else {
    char *p_str = iStrDupUntilNoCase((char **)&str, sep);
    if (!p_str) {
      if (sscanf(str, "%lf", f1) != 1)
        return 0;
      return 1;
    } else if (*str == 0) {
      int ret = sscanf(p_str, "%lf", f1);
      free(p_str);
      if (ret != 1)
        return 0;
      return 1;
    } else {
      int ret = 0;
      if (sscanf(p_str, "%lf", f1) == 1)
        ret++;
      if (sscanf(str, "%lf", f2) == 1)
        ret++;
      free(p_str);
      return ret;
    }
  }
}
```