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     L404
  mov    $0xffffffff,%eax
  jmp    L50
L404:
  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    L387
  mov    $0xffffffff,%eax
  jmp    L50
L387:
  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    L138
  mov    $0xffffffff,%eax
  jmp    L50
L138:
  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    L307
  mov    $0xffffffff,%eax
  jmp    L50
L307:
  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    L131
  mov    $0xffffffff,%eax
  jmp    L50
L131:
  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    L29
  mov    $0xffffffff,%eax
  jmp    L50
L29:
  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    L298
  mov    $0xffffffff,%eax
  jmp    L50
L298:
  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    L475
  mov    $0xffffffff,%eax
  jmp    L50
L475:
  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    L308
  mov    $0xffffffff,%eax
  jmp    L50
L308:
  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    L311
  mov    $0xffffffff,%eax
  jmp    L50
L311:
  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    L312
  mov    $0xffffffff,%eax
  jmp    L50
L312:
  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    L174
  mov    $0xffffffff,%eax
  jmp    L50
L174:
  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    L206
  mov    $0xffffffff,%eax
  jmp    L50
L206:
  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    L147
  mov    $0xffffffff,%eax
  jmp    L50
L147:
  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    L315
  mov    $0xffffffff,%eax
  jmp    L50
L315:
  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    L213
  mov    $0xffffffff,%eax
  jmp    L50
L213:
  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    L337
  mov    $0xffffffff,%eax
  jmp    L50
L337:
  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    L188
  mov    $0xffffffff,%eax
  jmp    L50
L188:
  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    L455
  mov    $0xffffffff,%eax
  jmp    L50
L455:
  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    L348
  mov    $0xffffffff,%eax
  jmp    L50
L348:
  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    L218
  mov    $0xffffffff,%eax
  jmp    L50
L218:
  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    L102
  mov    $0xffffffff,%eax
  jmp    L50
L102:
  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    L263
  mov    $0xffffffff,%eax
  jmp    L50
L263:
  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    L238
  mov    $0xffffffff,%eax
  jmp    L50
L238:
  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
L50:
  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;
}
```