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

```asm
<verify_hash>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  cmpb   $0x24,(%rsi)
  je     L27
L24:
  mov    $0x4,%eax
L92:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L66
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopl   0x0(%rax)
L27:
  lea    0x1(%rsi),%rdi
  mov    $0x24,%esi
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L24
  movb   $0x0,(%rax)
  lea    0x1(%rax),%r15
  mov    $0x24,%esi
  mov    %r15,%rdi
  call   <strchr@plt>
  mov    %rax,-0x58(%rbp)
  test   %rax,%rax
  je     L24
  movb   $0x0,(%rax)
  lea    0x1(%rax),%r12
  mov    D25(%rip),%rax
  mov    %rsp,%rsi
  movslq (%rax),%rax
  add    $0xf,%rax
  mov    %rax,%rdi
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rdi
  and    $0xfffffffffffffff0,%rcx
  sub    %rdi,%rsi
  cmp    %rsi,%rsp
  je     L88
L38:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L38
L88:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  je     L57
  orq    $0x0,-0x8(%rsp,%rcx,1)
L57:
  mov    %rax,%rdi
  mov    %rsp,%rsi
  mov    %rax,%rcx
  mov    %rsp,-0x50(%rbp)
  and    $0xfffffffffffff000,%rdi
  and    $0xfffffffffffffff0,%rcx
  sub    %rdi,%rsi
  cmp    %rsi,%rsp
  je     L160
L146:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L146
L160:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  je     L177
  orq    $0x0,-0x8(%rsp,%rcx,1)
L177:
  mov    %rax,%rcx
  mov    %rsp,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,-0x68(%rbp)
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rcx
  cmp    %rsi,%rsp
  je     L154
L82:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L82
L154:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  je     L68
  orq    $0x0,-0x8(%rsp,%rcx,1)
L68:
  movzbl 0x1(%rbx),%edi
  mov    %rsp,-0x60(%rbp)
  test   %dil,%dil
  je     L9
  mov    -0x50(%rbp),%r14
  nopl   0x0(%rax)
L32:
  movzbl 0x1(%r15),%r13d
  add    $0x2,%r15
  add    $0x1,%r14
  call   <__get_raw@plt>
  mov    %eax,%ebx
  movzbl %r13b,%edi
  call   <__get_raw@plt>
  shl    $0x4,%ebx
  or     %eax,%ebx
  mov    %bl,-0x1(%r14)
  movzbl (%r15),%edi
  test   %dil,%dil
  jne    L32
L9:
  mov    -0x58(%rbp),%rax
  movzbl 0x1(%rax),%edi
  test   %dil,%dil
  je     L126
  mov    -0x60(%rbp),%r15
  nopl   0x0(%rax,%rax,1)
L45:
  movzbl 0x1(%r12),%r13d
  add    $0x2,%r12
  add    $0x1,%r15
  call   <__get_raw@plt>
  mov    %eax,%ebx
  movzbl %r13b,%edi
  call   <__get_raw@plt>
  shl    $0x4,%ebx
  or     %eax,%ebx
  mov    %bl,-0x1(%r15)
  movzbl (%r12),%edi
  test   %dil,%dil
  jne    L45
L126:
  mov    D25(%rip),%rax
  mov    -0x68(%rbp),%rbx
  mov    -0x48(%rbp),%rdx
  mov    -0x50(%rbp),%rsi
  mov    (%rax),%ecx
  mov    %rbx,%rdi
  call   <generate_hash@plt>
  mov    D25(%rip),%rax
  mov    -0x60(%rbp),%rsi
  mov    %rbx,%rdi
  mov    (%rax),%edx
  call   <memcmp@plt>
  mov    $0x3,%edx
  test   %eax,%eax
  cmovne %edx,%eax
  jmp    L92
L66:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int verify_hash(char *given_password, char *stored_password) {
  char *stored_salt, *stored_hash, *algorithm;
  if (*stored_password != '$')
    return 4;
  stored_password++;
  algorithm = stored_password;
  stored_salt = strchr(algorithm, '$');
  if (!stored_salt)
    return 4;
  *stored_salt = 0;
  stored_salt++;
  stored_hash = strchr(stored_salt, '$');
  if (!stored_hash)
    return 4;
  *stored_hash = 0;
  stored_hash++;
  unsigned char salt[SHA512_DIGEST_LENGTH];
  unsigned char hash[SHA512_DIGEST_LENGTH];
  unsigned char compare_hash[SHA512_DIGEST_LENGTH];
  int i = 0;
  while (*stored_salt) {
    unsigned char v1, v2;
    v1 = *stored_salt;
    v2 = *(stored_salt + 1);
    v1 = __get_raw(v1);
    v2 = __get_raw(v2);
    salt[i] = (v1 << 4) | v2;
    stored_salt += 2;
    i++;
  }
  i = 0;
  while (*stored_hash) {
    unsigned char v1, v2;
    v1 = *stored_hash;
    v2 = *(stored_hash + 1);
    v1 = __get_raw(v1);
    v2 = __get_raw(v2);
    compare_hash[i] = (v1 << 4) | v2;
    stored_hash += 2;
    i++;
  }
  generate_hash(hash, salt, given_password, SHA512_DIGEST_LENGTH);
  if (!memcmp(hash, compare_hash, SHA512_DIGEST_LENGTH))
    return 0;
  return 3;
}
```