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

```asm
<calc>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x188,%rsp
  movdqa D5(%rip),%xmm0
  mov    %esi,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x178(%rsp)
  xor    %eax,%eax
  lea    -0x3f(%rsi),%eax
  movl   $0xc3d2e1f0,0x20(%rsp)
  mov    %eax,0x8(%rsp)
  movaps %xmm0,0x10(%rsp)
  test   %eax,%eax
  jle    L42
  movdqa D28(%rip),%xmm7
  xor    %ebx,%ebx
  mov    $0x40,%ebp
  lea    0x30(%rsp),%r13
  lea    0x10(%rsp),%r15
  nop
L85:
  mov    %ebx,%esi
  cmp    %ebx,%ebp
  jle    L6
  lea    -0x1(%rbp),%eax
  sub    %ebx,%eax
  mov    %eax,%r8d
  shr    $0x2,%r8d
  add    $0x1,%r8d
  cmp    $0x3b,%eax
  jbe    L79
  mov    %r8d,%r9d
  lea    (%r12,%rbx,1),%rdi
  pxor   %xmm6,%xmm6
  mov    %r13,%rax
  shr    $0x4,%r9d
  pxor   %xmm3,%xmm3
  sub    $0x1,%r9d
  shl    $0x6,%r9
  lea    0x70(%rsp,%r9,1),%r9
  cs nopw 0x0(%rax,%rax,1)
L44:
  movdqu (%rdi),%xmm1
  movdqu 0x10(%rdi),%xmm0
  movdqa %xmm7,%xmm8
  add    $0x40,%rax
  movdqu 0x10(%rdi),%xmm2
  movdqu 0x30(%rdi),%xmm4
  add    $0x40,%rdi
  pand   %xmm7,%xmm0
  pand   %xmm7,%xmm1
  movdqu -0x20(%rdi),%xmm5
  packuswb %xmm0,%xmm1
  movdqu -0x40(%rdi),%xmm0
  psrlw  $0x8,%xmm2
  pand   %xmm7,%xmm4
  psrlw  $0x8,%xmm5
  psrlw  $0x8,%xmm0
  packuswb %xmm2,%xmm0
  movdqu -0x20(%rdi),%xmm2
  pand   %xmm7,%xmm2
  packuswb %xmm4,%xmm2
  movdqu -0x10(%rdi),%xmm4
  pand   %xmm2,%xmm8
  psrlw  $0x8,%xmm2
  psrlw  $0x8,%xmm4
  packuswb %xmm4,%xmm5
  movdqa %xmm7,%xmm4
  pand   %xmm1,%xmm4
  psrlw  $0x8,%xmm1
  packuswb %xmm8,%xmm4
  packuswb %xmm2,%xmm1
  movdqa %xmm7,%xmm8
  movdqa %xmm7,%xmm2
  pand   %xmm5,%xmm8
  movdqa %xmm1,%xmm11
  pand   %xmm0,%xmm2
  psrlw  $0x8,%xmm5
  punpcklbw %xmm6,%xmm11
  packuswb %xmm8,%xmm2
  psrlw  $0x8,%xmm0
  movdqa %xmm4,%xmm8
  packuswb %xmm5,%xmm0
  movdqa %xmm2,%xmm5
  punpcklbw %xmm6,%xmm8
  punpcklbw %xmm6,%xmm5
  psllw  $0x8,%xmm11
  movdqa %xmm0,%xmm10
  movdqa %xmm5,%xmm9
  movdqa %xmm11,%xmm12
  punpcklbw %xmm6,%xmm10
  punpcklwd %xmm3,%xmm9
  punpcklwd %xmm3,%xmm12
  punpckhwd %xmm3,%xmm5
  pslld  $0x10,%xmm9
  movdqa %xmm10,%xmm13
  punpckhwd %xmm3,%xmm11
  por    %xmm12,%xmm9
  movdqa %xmm8,%xmm12
  punpckhwd %xmm3,%xmm8
  pslld  $0x10,%xmm5
  pslld  $0x18,%xmm8
  punpckhwd %xmm3,%xmm10
  por    %xmm10,%xmm8
  por    %xmm11,%xmm5
  punpckhbw %xmm6,%xmm2
  por    %xmm8,%xmm5
  punpckhbw %xmm6,%xmm1
  punpcklwd %xmm3,%xmm12
  psllw  $0x8,%xmm1
  movaps %xmm5,-0x30(%rax)
  movdqa %xmm2,%xmm5
  punpcklwd %xmm3,%xmm13
  movdqa %xmm1,%xmm8
  pslld  $0x18,%xmm12
  punpcklwd %xmm3,%xmm5
  punpckhbw %xmm6,%xmm4
  punpcklwd %xmm3,%xmm8
  por    %xmm13,%xmm12
  pslld  $0x10,%xmm5
  punpckhbw %xmm6,%xmm0
  por    %xmm12,%xmm9
  por    %xmm8,%xmm5
  movdqa %xmm4,%xmm8
  movaps %xmm9,-0x40(%rax)
  punpckhwd %xmm3,%xmm2
  movdqa %xmm0,%xmm9
  punpcklwd %xmm3,%xmm8
  punpckhwd %xmm3,%xmm4
  pslld  $0x18,%xmm8
  punpcklwd %xmm3,%xmm9
  punpckhwd %xmm3,%xmm1
  pslld  $0x10,%xmm2
  pslld  $0x18,%xmm4
  punpckhwd %xmm3,%xmm0
  por    %xmm9,%xmm8
  por    %xmm1,%xmm2
  por    %xmm0,%xmm4
  por    %xmm8,%xmm5
  por    %xmm4,%xmm2
  movaps %xmm5,-0x20(%rax)
  movaps %xmm2,-0x10(%rax)
  cmp    %rax,%r9
  jne    L44
  mov    %r8d,%eax
  and    $0xfffffff0,%eax
  lea    (%rsi,%rax,4),%esi
  cmp    %r8d,%eax
  je     L6
L112:
  cltq
  movslq %esi,%rsi
  lea    0x0(%r13,%rax,4),%rdi
  sub    %rsi,%rdi
  nopl   0x0(%rax)
L43:
  movzbl 0x1(%r12,%rsi,1),%eax
  movzbl 0x2(%r12,%rsi,1),%r8d
  shl    $0x10,%eax
  shl    $0x8,%r8d
  or     %r8d,%eax
  movzbl 0x3(%r12,%rsi,1),%r8d
  or     %r8d,%eax
  movzbl (%r12,%rsi,1),%r8d
  shl    $0x18,%r8d
  or     %r8d,%eax
  mov    %eax,(%rdi,%rsi,1)
  add    $0x4,%rsi
  cmp    %esi,%ebp
  jg     L43
L6:
  mov    %r13,%rsi
  mov    %r15,%rdi
  add    $0x40,%ebp
  add    $0x40,%rbx
  call   <innerHash@plt>
  cmp    %ebx,0x8(%rsp)
  movdqa D28(%rip),%xmm7
  jg     L85
  mov    0xc(%rsp),%ebx
  lea    -0x40(%rbx),%eax
  and    $0xffffffc0,%eax
  lea    0x40(%rax),%ecx
  sub    %ecx,%ebx
L20:
  xor    %esi,%esi
  mov    $0x40,%edx
  mov    %r13,%rdi
  mov    %ecx,0x8(%rsp)
  call   <memset@plt>
  test   %ebx,%ebx
  jle    L80
  movslq 0x8(%rsp),%rcx
  movslq %ebx,%r8
  mov    $0xfffffff8,%edi
  xor    %eax,%eax
  add    %rcx,%r12
  cs nopw 0x0(%rax,%rax,1)
L22:
  mov    %eax,%edx
  movzbl (%r12,%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,%r8
  jne    L22
  mov    %ebx,%ecx
  mov    %ebx,%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,%ebx
  jle    L101
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <innerHash@plt>
  mov    $0x40,%edx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
L101:
  mov    0xc(%rsp),%ebp
  mov    %r13,%rsi
  mov    %r15,%rdi
  shl    $0x3,%ebp
  mov    %ebp,0x6c(%rsp)
  call   <innerHash@plt>
  mov    $0xffffff80,%esi
  mov    $0x13,%eax
  nop
L96:
  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    L96
  mov    0x178(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L24
  add    $0x188,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L79:
  xor    %eax,%eax
  jmp    L112
L80:
  orl    $0x80000000,0x30(%rsp)
  jmp    L101
L42:
  mov    %esi,%ebx
  lea    0x30(%rsp),%r13
  lea    0x10(%rsp),%r15
  xor    %ecx,%ecx
  jmp    L20
L24:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D5
data_type: byte[16]
name: read_data
arguments: data_label: D28
data_type: byte[16]

tool: {"D5": [0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10]}

tool: {"D28": [0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00]}

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