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

```asm
<restore_md5_array>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0x16,%eax
  je     L58
  mov    $0xffffffff,%eax
  jmp    L2
L58:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0xc
  mov    $0x6,%r9d
  mov    $0x0,%r8d
  mov    $0x4,%ecx
  mov    $0x0,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L27
  mov    $0xffffffff,%eax
  jmp    L2
L27:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0xd
  mov    $0x7,%r9d
  mov    $0x1,%r8d
  mov    $0x4,%ecx
  mov    $0x4,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L79
  mov    $0xffffffff,%eax
  jmp    L2
L79:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0xe
  mov    $0x8,%r9d
  mov    $0x2,%r8d
  mov    $0x4,%ecx
  mov    $0x8,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L134
  mov    $0xffffffff,%eax
  jmp    L2
L134:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0xf
  mov    $0x9,%r9d
  mov    $0x3,%r8d
  mov    $0x4,%ecx
  mov    $0xc,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L55
  mov    $0xffffffff,%eax
  jmp    L2
L55:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x5
  mov    $0xa,%r9d
  mov    $0x4,%r8d
  mov    $0x4,%ecx
  mov    $0x10,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L23
  mov    $0xffffffff,%eax
  jmp    L2
L23:
  mov    -0x18(%rbp),%rax
  add    $0x15,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <b64_to_int@plt>
  mov    %eax,-0x8(%rbp)
  cmpl   $0x0,-0x8(%rbp)
  jns    L116
  mov    $0xffffffff,%eax
  jmp    L2
L116:
  mov    -0x18(%rbp),%rax
  add    $0x14,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <b64_to_int@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  jns    L35
  mov    $0xffffffff,%eax
  jmp    L2
L35:
  mov    -0x8(%rbp),%eax
  shl    $0x6,%eax
  or     -0x4(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x20(%rbp),%rax
  lea    0x58(%rax),%rdx
  mov    -0xc(%rbp),%eax
  cltq
  mov    %rax,(%rdx)
  mov    $0x0,%eax
L2:
  leave
  ret
```

assistant: ```c
int restore_md5_array(const char *string, uint8_t *hash) {
  uint32_t tmp = 0;
  int value1, value2;
  if (strlen(string) != 22)
    return -1;
  if (split_24bit(string, hash, 0, 4, 0, 6, 12) < 0)
    return -1;
  if (split_24bit(string, hash, 4, 4, 1, 7, 13) < 0)
    return -1;
  if (split_24bit(string, hash, 8, 4, 2, 8, 14) < 0)
    return -1;
  if (split_24bit(string, hash, 12, 4, 3, 9, 15) < 0)
    return -1;
  if (split_24bit(string, hash, 16, 4, 4, 10, 5) < 0)
    return -1;
  value1 = b64_to_int(string[21]);
  if (value1 < 0)
    return -1;
  value2 = b64_to_int(string[20]);
  if (value2 < 0)
    return -1;
  tmp = (value1 << 6) | value2;
  hash[11] = (uint8_t)tmp;
  return 0;
}
```