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

```asm
<restore_sha512_array>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  call   <strlen@plt>
  cmp    $0x56,%eax
  jne    L141
  sub    $0x8,%rsp
  push   $0x2a
  mov    $0x15,%r9d
  mov    $0x0,%r8d
  mov    $0x4,%ecx
  mov    $0x0,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L408
  sub    $0x8,%rsp
  push   $0x1
  mov    $0x2b,%r9d
  mov    $0x16,%r8d
  mov    $0x4,%ecx
  mov    $0x4,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L55
  sub    $0x8,%rsp
  push   $0x17
  mov    $0x2,%r9d
  mov    $0x2c,%r8d
  mov    $0x4,%ecx
  mov    $0x8,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L188
  sub    $0x8,%rsp
  push   $0x2d
  mov    $0x18,%r9d
  mov    $0x3,%r8d
  mov    $0x4,%ecx
  mov    $0xc,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L245
  sub    $0x8,%rsp
  push   $0x4
  mov    $0x2e,%r9d
  mov    $0x19,%r8d
  mov    $0x4,%ecx
  mov    $0x10,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L261
  sub    $0x8,%rsp
  push   $0x1a
  mov    $0x5,%r9d
  mov    $0x2f,%r8d
  mov    $0x4,%ecx
  mov    $0x14,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L58
  sub    $0x8,%rsp
  push   $0x30
  mov    $0x1b,%r9d
  mov    $0x6,%r8d
  mov    $0x4,%ecx
  mov    $0x18,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L191
  sub    $0x8,%rsp
  push   $0x7
  mov    $0x31,%r9d
  mov    $0x1c,%r8d
  mov    $0x4,%ecx
  mov    $0x1c,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L95
  sub    $0x8,%rsp
  push   $0x1d
  mov    $0x8,%r9d
  mov    $0x32,%r8d
  mov    $0x4,%ecx
  mov    $0x20,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L206
  sub    $0x8,%rsp
  push   $0x33
  mov    $0x1e,%r9d
  mov    $0x9,%r8d
  mov    $0x4,%ecx
  mov    $0x24,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L126
  sub    $0x8,%rsp
  push   $0xa
  mov    $0x34,%r9d
  mov    $0x1f,%r8d
  mov    $0x4,%ecx
  mov    $0x28,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L182
  sub    $0x8,%rsp
  push   $0x20
  mov    $0xb,%r9d
  mov    $0x35,%r8d
  mov    $0x4,%ecx
  mov    $0x2c,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L101
  sub    $0x8,%rsp
  push   $0x36
  mov    $0x21,%r9d
  mov    $0xc,%r8d
  mov    $0x4,%ecx
  mov    $0x30,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L102
  sub    $0x8,%rsp
  push   $0xd
  mov    $0x37,%r9d
  mov    $0x22,%r8d
  mov    $0x4,%ecx
  mov    $0x34,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L334
  sub    $0x8,%rsp
  push   $0x23
  mov    $0xe,%r9d
  mov    $0x38,%r8d
  mov    $0x4,%ecx
  mov    $0x38,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L326
  sub    $0x8,%rsp
  push   $0x39
  mov    $0x24,%r9d
  mov    $0xf,%r8d
  mov    $0x4,%ecx
  mov    $0x3c,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L150
  sub    $0x8,%rsp
  push   $0x10
  mov    $0x3a,%r9d
  mov    $0x25,%r8d
  mov    $0x4,%ecx
  mov    $0x40,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L447
  sub    $0x8,%rsp
  push   $0x26
  mov    $0x11,%r9d
  mov    $0x3b,%r8d
  mov    $0x4,%ecx
  mov    $0x44,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L399
  sub    $0x8,%rsp
  push   $0x3c
  mov    $0x27,%r9d
  mov    $0x12,%r8d
  mov    $0x4,%ecx
  mov    $0x48,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L193
  sub    $0x8,%rsp
  push   $0x13
  mov    $0x3d,%r9d
  mov    $0x28,%r8d
  mov    $0x4,%ecx
  mov    $0x4c,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L198
  sub    $0x8,%rsp
  push   $0x29
  mov    $0x14,%r9d
  mov    $0x3e,%r8d
  mov    $0x4,%ecx
  mov    $0x50,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  js     L454
  movsbl 0x55(%rbx),%edi
  call   <b64_to_int@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  js     L343
  movsbl 0x54(%rbx),%edi
  call   <b64_to_int@plt>
  test   %eax,%eax
  js     L20
  shl    $0x6,%r12d
  or     %eax,%r12d
  movslq %r12d,%r12
  mov    %r12,0x1f8(%rbp)
  mov    $0x0,%eax
L14:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L141:
  mov    $0xffffffff,%eax
  jmp    L14
L408:
  mov    $0xffffffff,%eax
  jmp    L14
L55:
  mov    $0xffffffff,%eax
  jmp    L14
L188:
  mov    $0xffffffff,%eax
  jmp    L14
L245:
  mov    $0xffffffff,%eax
  jmp    L14
L261:
  mov    $0xffffffff,%eax
  jmp    L14
L58:
  mov    $0xffffffff,%eax
  jmp    L14
L191:
  mov    $0xffffffff,%eax
  jmp    L14
L95:
  mov    $0xffffffff,%eax
  jmp    L14
L206:
  mov    $0xffffffff,%eax
  jmp    L14
L126:
  mov    $0xffffffff,%eax
  jmp    L14
L182:
  mov    $0xffffffff,%eax
  jmp    L14
L101:
  mov    $0xffffffff,%eax
  jmp    L14
L102:
  mov    $0xffffffff,%eax
  jmp    L14
L334:
  mov    $0xffffffff,%eax
  jmp    L14
L326:
  mov    $0xffffffff,%eax
  jmp    L14
L150:
  mov    $0xffffffff,%eax
  jmp    L14
L447:
  mov    $0xffffffff,%eax
  jmp    L14
L399:
  mov    $0xffffffff,%eax
  jmp    L14
L193:
  mov    $0xffffffff,%eax
  jmp    L14
L198:
  mov    $0xffffffff,%eax
  jmp    L14
L454:
  mov    $0xffffffff,%eax
  jmp    L14
L343:
  mov    $0xffffffff,%eax
  jmp    L14
L20:
  mov    $0xffffffff,%eax
  jmp    L14
```

assistant: ```c
int restore_sha512_array(const char *string, uint8_t *hash) {
  uint32_t tmp = 0;
  int value1, value2;
  if (strlen(string) != 86)
    return -1;
  if (split_24bit(string, hash, 0, 4, 0, 21, 42) < 0)
    return -1;
  if (split_24bit(string, hash, 4, 4, 22, 43, 1) < 0)
    return -1;
  if (split_24bit(string, hash, 8, 4, 44, 2, 23) < 0)
    return -1;
  if (split_24bit(string, hash, 12, 4, 3, 24, 45) < 0)
    return -1;
  if (split_24bit(string, hash, 16, 4, 25, 46, 4) < 0)
    return -1;
  if (split_24bit(string, hash, 20, 4, 47, 5, 26) < 0)
    return -1;
  if (split_24bit(string, hash, 24, 4, 6, 27, 48) < 0)
    return -1;
  if (split_24bit(string, hash, 28, 4, 28, 49, 7) < 0)
    return -1;
  if (split_24bit(string, hash, 32, 4, 50, 8, 29) < 0)
    return -1;
  if (split_24bit(string, hash, 36, 4, 9, 30, 51) < 0)
    return -1;
  if (split_24bit(string, hash, 40, 4, 31, 52, 10) < 0)
    return -1;
  if (split_24bit(string, hash, 44, 4, 53, 11, 32) < 0)
    return -1;
  if (split_24bit(string, hash, 48, 4, 12, 33, 54) < 0)
    return -1;
  if (split_24bit(string, hash, 52, 4, 34, 55, 13) < 0)
    return -1;
  if (split_24bit(string, hash, 56, 4, 56, 14, 35) < 0)
    return -1;
  if (split_24bit(string, hash, 60, 4, 15, 36, 57) < 0)
    return -1;
  if (split_24bit(string, hash, 64, 4, 37, 58, 16) < 0)
    return -1;
  if (split_24bit(string, hash, 68, 4, 59, 17, 38) < 0)
    return -1;
  if (split_24bit(string, hash, 72, 4, 18, 39, 60) < 0)
    return -1;
  if (split_24bit(string, hash, 76, 4, 40, 61, 19) < 0)
    return -1;
  if (split_24bit(string, hash, 80, 4, 62, 20, 41) < 0)
    return -1;
  value1 = b64_to_int(string[85]);
  if (value1 < 0)
    return -1;
  value2 = b64_to_int(string[84]);
  if (value2 < 0)
    return -1;
  tmp = (value1 << 6) | value2;
  hash[63] = (uint8_t)tmp;
  return 0;
}
```