user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<crypto_hash_sha512_tinynacl>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x180,%rsp
  mov    %rdi,-0x168(%rbp)
  mov    %rsi,-0x170(%rbp)
  mov    %rdx,-0x178(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x178(%rbp),%rax
  mov    %rax,-0x158(%rbp)
  movabs $0x6a09e667f3bcc908,%rax
  mov    %rax,-0x150(%rbp)
  movabs $0xbb67ae8584caa73b,%rax
  mov    %rax,-0x148(%rbp)
  movabs $0x3c6ef372fe94f82b,%rax
  mov    %rax,-0x140(%rbp)
  movabs $0xa54ff53a5f1d36f1,%rax
  mov    %rax,-0x138(%rbp)
  movabs $0x510e527fade682d1,%rax
  mov    %rax,-0x130(%rbp)
  movabs $0x9b05688c2b3e6c1f,%rax
  mov    %rax,-0x128(%rbp)
  movabs $0x1f83d9abfb41bd6b,%rax
  mov    %rax,-0x120(%rbp)
  movabs $0x5be0cd19137e2179,%rax
  mov    %rax,-0x118(%rbp)
  mov    -0x178(%rbp),%rdx
  mov    -0x170(%rbp),%rcx
  lea    -0x150(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <blocks@plt>
  mov    -0x178(%rbp),%rax
  add    %rax,-0x170(%rbp)
  andq   $0x7f,-0x178(%rbp)
  mov    -0x178(%rbp),%rax
  neg    %rax
  add    %rax,-0x170(%rbp)
  movq   $0x0,-0x160(%rbp)
  jmp    L45
L2:
  lea    -0x110(%rbp),%rdx
  mov    -0x160(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  addq   $0x1,-0x160(%rbp)
L45:
  mov    -0x160(%rbp),%rax
  cmp    $0xff,%rax
  jbe    L2
  movq   $0x0,-0x160(%rbp)
  jmp    L15
L46:
  mov    -0x160(%rbp),%rdx
  mov    -0x170(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  lea    -0x110(%rbp),%rcx
  mov    -0x160(%rbp),%rdx
  add    %rcx,%rdx
  mov    %al,(%rdx)
  addq   $0x1,-0x160(%rbp)
L15:
  mov    -0x160(%rbp),%rax
  cmp    %rax,-0x178(%rbp)
  ja     L46
  lea    -0x110(%rbp),%rdx
  mov    -0x178(%rbp),%rax
  add    %rdx,%rax
  movb   $0x80,(%rax)
  cmpq   $0x6f,-0x178(%rbp)
  ja     L63
  mov    $0x80,%eax
  jmp    L7
L63:
  mov    $0x100,%eax
L7:
  mov    %rax,-0x178(%rbp)
  mov    -0x158(%rbp),%rax
  shr    $0x3d,%rax
  mov    %rax,%rdx
  mov    -0x178(%rbp),%rax
  sub    $0x9,%rax
  mov    %dl,-0x110(%rbp,%rax,1)
  mov    -0x158(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x178(%rbp),%rax
  lea    -0x8(%rax),%rcx
  lea    -0x110(%rbp),%rax
  add    %rcx,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <store64_bigendian@plt>
  mov    -0x178(%rbp),%rdx
  lea    -0x110(%rbp),%rcx
  lea    -0x150(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <blocks@plt>
  movq   $0x0,-0x160(%rbp)
  jmp    L29
L33:
  mov    -0x160(%rbp),%rax
  mov    -0x150(%rbp,%rax,8),%rax
  mov    -0x160(%rbp),%rdx
  shl    $0x3,%rdx
  mov    %rdx,%rcx
  mov    -0x168(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <store64_bigendian@plt>
  addq   $0x1,-0x160(%rbp)
L29:
  cmpq   $0x7,-0x160(%rbp)
  jle    L33
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L77
  call   <__stack_chk_fail@plt>
L77:
  leave
  ret
```

assistant: ```c
int crypto_hash_sha512_tinynacl(unsigned char *o, const unsigned char *m, unsigned long long n) {
  long long i;
  unsigned char x[256];
  unsigned long long b = n;
  unsigned long long h[8] = {0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, 0x3c6ef372fe94f82bULL, 0xa54ff53a5f1d36f1ULL, 0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, 0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL};
  blocks(h, m, n);
  m += n;
  n &= 127;
  m -= n;
  for (i = 0; i < sizeof x; ++i)
    x[i] = 0;
  for (i = 0; i < n; ++i)
    x[i] = m[i];
  x[n] = 128;
  n = 256 - 128 * (n < 112);
  x[n - 9] = b >> 61;
  store64_bigendian(x + n - 8, b << 3);
  blocks(h, x, n);
  for (i = 0; i < 8; ++i)
    store64_bigendian(o + 8 * i, h[i]);
  return 0;
}
```