user: Translate the below assembly code into C programming language:

```asm
<calc>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x188,%rsp
  mov    %esi,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x178(%rsp)
  movabs $0xefcdab8967452301,%rax
  movl   $0xc3d2e1f0,0x20(%rsp)
  mov    %rax,0x10(%rsp)
  movabs $0x1032547698badcfe,%rax
  mov    %rax,0x18(%rsp)
  lea    -0x3f(%rsi),%eax
  mov    %eax,0x8(%rsp)
  test   %eax,%eax
  jle    L53
  lea    0x30(%rsp),%r15
  xor    %ebp,%ebp
  mov    $0x40,%r13d
  mov    %r15,%rdx
  lea    0x10(%rsp),%r12
  nopw   0x0(%rax,%rax,1)
L102:
  mov    %rbp,%rsi
  cmp    %ebp,%r13d
  jle    L13
  nopl   0x0(%rax,%rax,1)
L60:
  movzbl 0x2(%rbx,%rsi,1),%eax
  movzbl 0x1(%rbx,%rsi,1),%edi
  shl    $0x8,%eax
  shl    $0x10,%edi
  or     %edi,%eax
  movzbl 0x3(%rbx,%rsi,1),%edi
  or     %edi,%eax
  movzbl (%rbx,%rsi,1),%edi
  shl    $0x18,%edi
  or     %edi,%eax
  mov    %eax,(%rdx,%rsi,1)
  add    $0x4,%rsi
  cmp    %esi,%r13d
  jg     L60
L13:
  mov    %r15,%rsi
  mov    %r12,%rdi
  mov    %rdx,(%rsp)
  add    $0x40,%r13d
  call   <innerHash@plt>
  mov    (%rsp),%rdx
  add    $0x40,%rbp
  sub    $0x40,%rdx
  cmp    %ebp,0x8(%rsp)
  jg     L102
  mov    0xc(%rsp),%ecx
  lea    -0x40(%rcx),%eax
  and    $0xffffffc0,%eax
  lea    0x40(%rax),%r13d
  sub    %r13d,%ecx
  mov    %ecx,%ebp
L92:
  xor    %esi,%esi
  mov    $0x40,%edx
  mov    %r15,%rdi
  call   <memset@plt>
  test   %ebp,%ebp
  jle    L19
  movslq %r13d,%r13
  movslq %ebp,%r9
  mov    $0xfffffff8,%edi
  xor    %eax,%eax
  add    %r13,%rbx
  nopl   (%rax)
L8:
  mov    %eax,%edx
  movzbl (%rbx,%rax,1),%esi
  mov    %edi,%ecx
  add    $0x1,%rax
  sar    $0x2,%edx
  and    $0x18,%ecx
  sub    $0x8,%edi
  movslq %edx,%rdx
  shl    %cl,%esi
  or     %esi,0x30(%rsp,%rdx,4)
  cmp    %rax,%r9
  jne    L8
  mov    %ebp,%ecx
  mov    %ebp,%eax
  mov    $0x80,%edx
  not    %ecx
  sar    $0x2,%eax
  shl    $0x3,%ecx
  cltq
  and    $0x18,%ecx
  shl    %cl,%edx
  or     %edx,0x30(%rsp,%rax,4)
  cmp    $0x37,%ebp
  jle    L4
  mov    %r15,%rsi
  mov    %r12,%rdi
  call   <innerHash@plt>
  mov    $0x40,%edx
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <memset@plt>
L4:
  mov    0xc(%rsp),%eax
  mov    %r15,%rsi
  mov    %r12,%rdi
  shl    $0x3,%eax
  mov    %eax,0x6c(%rsp)
  call   <innerHash@plt>
  mov    $0xffffff80,%esi
  mov    $0x13,%eax
  xchg   %ax,%ax
L86:
  mov    %eax,%edx
  mov    %esi,%ecx
  add    $0x8,%esi
  sar    $0x2,%edx
  and    $0x18,%ecx
  movslq %edx,%rdx
  mov    0x10(%rsp,%rdx,4),%edx
  shr    %cl,%edx
  mov    %dl,(%r14,%rax,1)
  sub    $0x1,%rax
  cmp    $0xffffffffffffffff,%rax
  jne    L86
  mov    0x178(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L56
  add    $0x188,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L19:
  orl    $0x80000000,0x30(%rsp)
  jmp    L4
L53:
  mov    %esi,%ebp
  lea    0x30(%rsp),%r15
  lea    0x10(%rsp),%r12
  xor    %r13d,%r13d
  jmp    L92
L56:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void calc(const void *src, const int bytelength, unsigned char *hash) {
  unsigned int result[5] = {0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0};
  const unsigned char *sarray = (const unsigned char *)src;
  unsigned int w[80];
  int j, i, i1;
  j = 0;
  for (i = 0, i1 = 64; i <= (bytelength - 64); i = i1, i1 += 64) {
    int k = 0;
    for (j = i; j < i1; j += 4) {
      w[k++] = (unsigned int)sarray[j + 3] | (((unsigned int)sarray[j + 2]) << 8) | (((unsigned int)sarray[j + 1]) << 16) | (((unsigned int)sarray[j]) << 24);
    }
    innerHash(result, w);
  }
  i1 = bytelength - i;
  memset(w, 0, sizeof(unsigned int) * 16);
  for (j = 0; j < i1; j++) {
    w[j >> 2] |= (unsigned int)sarray[j + i] << ((3 - (j & 3)) << 3);
  }
  w[j >> 2] |= 0x80 << ((3 - (j & 3)) << 3);
  if (i1 >= 56) {
    innerHash(result, w);
    memset(w, 0, sizeof(unsigned int) * 16);
  }
  w[15] = bytelength << 3;
  innerHash(result, w);
  for (i = 20; --i >= 0;) {
    hash[i] = (result[i >> 2] >> (((3 - i) & 0x3) << 3)) & 0xFF;
  }
}
```