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

```asm
<util_version_number>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x70,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%r8
  mov    $0x4,%ecx
  mov    $0x0,%edx
  lea    D6(%rip),%rsi
  call   <string_split@plt>
  mov    %rax,%r13
  mov    $0x0,%ebp
  lea    0x8(%rsp),%r14
  jmp    L127
L1:
  mov    %rbx,%rdi
  call   <utf8_next_char@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L36
  movzbl (%rax),%edi
  cmp    $0x3e,%r12d
  setle  %dl
  test   %dil,%dil
  setne  %al
  test   %al,%dl
  je     L36
  cmp    $0x2d,%dil
  je     L36
L74:
  movzbl %dil,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L1
  movzbl (%rbx),%edx
  movslq %r12d,%rax
  mov    %dl,0x20(%rsp,%rax,1)
  add    $0x1,%r12d
  jmp    L1
L159:
  mov    $0x0,%r12d
  jmp    L36
L149:
  mov    $0x0,%r12d
L36:
  movslq %r12d,%r12
  movb   $0x0,0x20(%rsp,%r12,1)
  cmpb   $0x0,0x20(%rsp)
  jne    L146
L156:
  add    $0x1,%rbp
  cmp    $0x4,%rbp
  je     L47
L127:
  movl   $0x0,0x10(%rsp,%rbp,4)
  test   %r13,%r13
  je     L156
  cmp    %ebp,0x4(%rsp)
  jle    L156
  mov    0x0(%r13,%rbp,8),%rbx
  test   %rbx,%rbx
  je     L159
  movzbl (%rbx),%edi
  cmp    $0x2d,%dil
  je     L149
  test   %dil,%dil
  je     L149
  mov    $0x0,%r12d
  jmp    L74
L146:
  movq   $0x0,0x8(%rsp)
  lea    0x20(%rsp),%rdi
  mov    $0xa,%edx
  mov    %r14,%rsi
  call   <strtol@plt>
  mov    0x8(%rsp),%rdx
  test   %rdx,%rdx
  je     L156
  cmpb   $0x0,(%rdx)
  jne    L156
  mov    $0xff,%edx
  cmp    %rdx,%rax
  cmovg  %rdx,%rax
  test   %rax,%rax
  mov    $0x0,%edx
  cmovs  %rdx,%rax
  mov    %eax,0x10(%rsp,%rbp,4)
  jmp    L156
L47:
  test   %r13,%r13
  je     L174
  mov    %r13,%rdi
  call   <string_free_split@plt>
L174:
  mov    0x10(%rsp),%eax
  shl    $0x18,%eax
  mov    0x14(%rsp),%edx
  shl    $0x10,%edx
  or     %edx,%eax
  or     0x1c(%rsp),%eax
  mov    0x18(%rsp),%edx
  shl    $0x8,%edx
  or     %edx,%eax
  mov    0x68(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L199
  add    $0x70,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L199:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D6
data_type: string

tool: D6: .

assistant: ```c
int util_version_number(const char *version) {
  char **items, buf[64], *error;
  const char *ptr_item;
  int num_items, i, version_int[4], index_buf;
  long number;
  items = string_split(version, ".", 0, 4, &num_items);
  for (i = 0; i < 4; i++) {
    version_int[i] = 0;
    if (items && (i < num_items)) {
      ptr_item = items[i];
      index_buf = 0;
      while (ptr_item && ptr_item[0] && (index_buf < (int)sizeof(buf) - 1)) {
        if (ptr_item[0] == '-')
          break;
        if (isdigit((unsigned char)ptr_item[0])) {
          buf[index_buf] = ptr_item[0];
          index_buf++;
        }
        ptr_item = utf8_next_char(ptr_item);
      }
      buf[index_buf] = '\0';
      if (buf[0]) {
        error = NULL;
        number = strtol(buf, &error, 10);
        if (error && !error[0]) {
          if (number < 0)
            number = 0;
          else if (number > 0xFF)
            number = 0xFF;
          version_int[i] = number;
        }
      }
    }
  }
  if (items)
    string_free_split(items);
  return (version_int[0] << 24) | (version_int[1] << 16) | (version_int[2] << 8) | version_int[3];
}
```