user: What would the C source look like for the assembly code provided here:

```asm
<restore_sha512_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    $0x56,%eax
  je     L54
  mov    $0xffffffff,%eax
  jmp    L111
L54:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x2a
  mov    $0x15,%r9d
  mov    $0x0,%r8d
  mov    $0x4,%ecx
  mov    $0x0,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L293
  mov    $0xffffffff,%eax
  jmp    L111
L293:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x1
  mov    $0x2b,%r9d
  mov    $0x16,%r8d
  mov    $0x4,%ecx
  mov    $0x4,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L23
  mov    $0xffffffff,%eax
  jmp    L111
L23:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x17
  mov    $0x2,%r9d
  mov    $0x2c,%r8d
  mov    $0x4,%ecx
  mov    $0x8,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L446
  mov    $0xffffffff,%eax
  jmp    L111
L446:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x2d
  mov    $0x18,%r9d
  mov    $0x3,%r8d
  mov    $0x4,%ecx
  mov    $0xc,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L155
  mov    $0xffffffff,%eax
  jmp    L111
L155:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x4
  mov    $0x2e,%r9d
  mov    $0x19,%r8d
  mov    $0x4,%ecx
  mov    $0x10,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L439
  mov    $0xffffffff,%eax
  jmp    L111
L439:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x1a
  mov    $0x5,%r9d
  mov    $0x2f,%r8d
  mov    $0x4,%ecx
  mov    $0x14,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L473
  mov    $0xffffffff,%eax
  jmp    L111
L473:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x30
  mov    $0x1b,%r9d
  mov    $0x6,%r8d
  mov    $0x4,%ecx
  mov    $0x18,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L356
  mov    $0xffffffff,%eax
  jmp    L111
L356:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x7
  mov    $0x31,%r9d
  mov    $0x1c,%r8d
  mov    $0x4,%ecx
  mov    $0x1c,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L348
  mov    $0xffffffff,%eax
  jmp    L111
L348:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x1d
  mov    $0x8,%r9d
  mov    $0x32,%r8d
  mov    $0x4,%ecx
  mov    $0x20,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L12
  mov    $0xffffffff,%eax
  jmp    L111
L12:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x33
  mov    $0x1e,%r9d
  mov    $0x9,%r8d
  mov    $0x4,%ecx
  mov    $0x24,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L237
  mov    $0xffffffff,%eax
  jmp    L111
L237:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0xa
  mov    $0x34,%r9d
  mov    $0x1f,%r8d
  mov    $0x4,%ecx
  mov    $0x28,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L79
  mov    $0xffffffff,%eax
  jmp    L111
L79:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x20
  mov    $0xb,%r9d
  mov    $0x35,%r8d
  mov    $0x4,%ecx
  mov    $0x2c,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L393
  mov    $0xffffffff,%eax
  jmp    L111
L393:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x36
  mov    $0x21,%r9d
  mov    $0xc,%r8d
  mov    $0x4,%ecx
  mov    $0x30,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L324
  mov    $0xffffffff,%eax
  jmp    L111
L324:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0xd
  mov    $0x37,%r9d
  mov    $0x22,%r8d
  mov    $0x4,%ecx
  mov    $0x34,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L243
  mov    $0xffffffff,%eax
  jmp    L111
L243:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x23
  mov    $0xe,%r9d
  mov    $0x38,%r8d
  mov    $0x4,%ecx
  mov    $0x38,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L431
  mov    $0xffffffff,%eax
  jmp    L111
L431:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x39
  mov    $0x24,%r9d
  mov    $0xf,%r8d
  mov    $0x4,%ecx
  mov    $0x3c,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L98
  mov    $0xffffffff,%eax
  jmp    L111
L98:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x10
  mov    $0x3a,%r9d
  mov    $0x25,%r8d
  mov    $0x4,%ecx
  mov    $0x40,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L467
  mov    $0xffffffff,%eax
  jmp    L111
L467:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x26
  mov    $0x11,%r9d
  mov    $0x3b,%r8d
  mov    $0x4,%ecx
  mov    $0x44,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L24
  mov    $0xffffffff,%eax
  jmp    L111
L24:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x3c
  mov    $0x27,%r9d
  mov    $0x12,%r8d
  mov    $0x4,%ecx
  mov    $0x48,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L17
  mov    $0xffffffff,%eax
  jmp    L111
L17:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x13
  mov    $0x3d,%r9d
  mov    $0x28,%r8d
  mov    $0x4,%ecx
  mov    $0x4c,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L318
  mov    $0xffffffff,%eax
  jmp    L111
L318:
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x29
  mov    $0x14,%r9d
  mov    $0x3e,%r8d
  mov    $0x4,%ecx
  mov    $0x50,%edx
  mov    %rax,%rdi
  call   <split_24bit@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jns    L218
  mov    $0xffffffff,%eax
  jmp    L111
L218:
  mov    -0x18(%rbp),%rax
  add    $0x55,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <b64_to_int@plt>
  mov    %eax,-0x8(%rbp)
  cmpl   $0x0,-0x8(%rbp)
  jns    L461
  mov    $0xffffffff,%eax
  jmp    L111
L461:
  mov    -0x18(%rbp),%rax
  add    $0x54,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <b64_to_int@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  jns    L275
  mov    $0xffffffff,%eax
  jmp    L111
L275:
  mov    -0x8(%rbp),%eax
  shl    $0x6,%eax
  or     -0x4(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x20(%rbp),%rax
  lea    0x1f8(%rax),%rdx
  mov    -0xc(%rbp),%eax
  cltq
  mov    %rax,(%rdx)
  mov    $0x0,%eax
L111:
  leave
  ret
```

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;
}
```