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

```asm
<sha1_chunk>:
  endbr64
  push   %r14
  mov    $0x14,%edx
  mov    %rsi,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x170,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x168(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  mov    %rbp,%rdi
  call   <memcpy@plt>
  xor    %edx,%edx
  xchg   %ax,%ax
L1:
  mov    (%rbx,%rdx,4),%eax
  mov    0x4(%rbx,%rdx,4),%esi
  mov    %edx,%ecx
  sar    $0x2,%ecx
  shl    $0x10,%esi
  shl    $0x18,%eax
  movslq %ecx,%rcx
  or     %esi,%eax
  mov    0x8(%rbx,%rdx,4),%esi
  or     0xc(%rbx,%rdx,4),%eax
  add    $0x4,%rdx
  shl    $0x8,%esi
  or     %esi,%eax
  mov    %eax,0x20(%rsp,%rcx,4)
  cmp    $0x40,%rdx
  jne    L1
  lea    0x20(%rsp),%r13
  lea    0x120(%rsp),%r12
  mov    %r13,%rbx
  nopw   0x0(%rax,%rax,1)
L41:
  mov    0x34(%rbx),%edi
  mov    $0x1,%esi
  xor    0x20(%rbx),%edi
  add    $0x4,%rbx
  xor    0x4(%rbx),%edi
  xor    -0x4(%rbx),%edi
  call   <rotleft@plt>
  mov    %eax,0x3c(%rbx)
  cmp    %rbx,%r12
  jne    L41
  lea    0x50(%r13),%rbx
  mov    %r13,%r12
  nopl   0x0(%rax)
L6:
  mov    0xc(%rsp),%eax
  mov    0x8(%rsp),%esi
  mov    $0x5a827999,%edx
  mov    %rbp,%rdi
  mov    (%r12),%ecx
  add    $0x4,%r12
  xor    %eax,%esi
  and    0x4(%rsp),%esi
  xor    %eax,%esi
  call   <sha1_step@plt>
  cmp    %r12,%rbx
  jne    L6
  lea    0x70(%rsp),%r12
  lea    0xa0(%r13),%rbx
  xchg   %ax,%ax
L53:
  mov    (%r12),%ecx
  mov    0x4(%rsp),%esi
  mov    $0x6ed9eba1,%edx
  mov    %rbp,%rdi
  xor    0x8(%rsp),%esi
  add    $0x4,%r12
  xor    0xc(%rsp),%esi
  call   <sha1_step@plt>
  cmp    %r12,%rbx
  jne    L53
  lea    0xc0(%rsp),%r12
  lea    0xf0(%r13),%rbx
  nopl   (%rax)
L73:
  mov    0x8(%rsp),%esi
  mov    0x8(%rsp),%eax
  mov    $0x8f1bbcdc,%edx
  mov    %rbp,%rdi
  mov    (%r12),%ecx
  or     0xc(%rsp),%esi
  add    $0x4,%r12
  and    0x4(%rsp),%esi
  and    0xc(%rsp),%eax
  or     %eax,%esi
  call   <sha1_step@plt>
  cmp    %r12,%rbx
  jne    L73
  lea    0x110(%rsp),%rbx
  add    $0x140,%r13
  nopw   0x0(%rax,%rax,1)
L11:
  mov    (%rbx),%ecx
  mov    0x4(%rsp),%esi
  mov    $0xca62c1d6,%edx
  mov    %rbp,%rdi
  xor    0x8(%rsp),%esi
  add    $0x4,%rbx
  xor    0xc(%rsp),%esi
  call   <sha1_step@plt>
  cmp    %rbx,%r13
  jne    L11
  xor    %eax,%eax
L66:
  mov    0x0(%rbp,%rax,1),%edx
  add    %edx,(%r14,%rax,1)
  add    $0x4,%rax
  cmp    $0x14,%rax
  jne    L66
  mov    0x168(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L44
  add    $0x170,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L44:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void sha1_chunk(uint8_t *chunk, uint32_t *hash) {
  uint32_t state[5], w[80];
  memcpy(state, hash, sizeof(state));
  for (uint32_t src = 0; src < 64; src += 4) {
    w[src >> 2] = chunk[src] << 24 | chunk[src + 1] << 16 | chunk[src + 2] << 8 | chunk[src + 3];
  }
  for (uint32_t cur = 16; cur < 80; cur++) {
    w[cur] = rotleft(w[cur - 3] ^ w[cur - 8] ^ w[cur - 14] ^ w[cur - 16], 1);
  }
  for (uint32_t cur = 0; cur < 20; cur++) {
    sha1_step(state, (state[1] & state[2]) | ((~state[1]) & state[3]), 0x5A827999, w[cur]);
  }
  for (uint32_t cur = 20; cur < 40; cur++) {
    sha1_step(state, state[1] ^ state[2] ^ state[3], 0x6ED9EBA1, w[cur]);
  }
  for (uint32_t cur = 40; cur < 60; cur++) {
    sha1_step(state, (state[1] & state[2]) | (state[1] & state[3]) | (state[2] & state[3]), 0x8F1BBCDC, w[cur]);
  }
  for (uint32_t cur = 60; cur < 80; cur++) {
    sha1_step(state, state[1] ^ state[2] ^ state[3], 0xCA62C1D6, w[cur]);
  }
  for (uint32_t i = 0; i < 5; i++) {
    hash[i] += state[i];
  }
}
```