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

```asm
<e_sha1_sum>:
  endbr64
  push   %r15
  pxor   %xmm0,%xmm0
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1d8,%rsp
  mov    %rdx,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x1c8(%rsp)
  movabs $0xefcdab8967452301,%rax
  movl   $0xc3d2e1f0,0x30(%rsp)
  movaps %xmm0,0x180(%rsp)
  movaps %xmm0,0x190(%rsp)
  movaps %xmm0,0x1a0(%rsp)
  movaps %xmm0,0x1b0(%rsp)
  mov    %rax,0x20(%rsp)
  movabs $0x1032547698badcfe,%rax
  mov    %rax,0x28(%rsp)
  test   %esi,%esi
  jle    L21
  mov    %esi,%ebx
  movl   $0xc3d2e1f0,0x10(%rsp)
  mov    %rdi,%r12
  mov    %esi,%r13d
  bswap  %ebx
  movl   $0x10325476,0xc(%rsp)
  xor    %eax,%eax
  lea    0x1c0(%rsp),%r14
  mov    %ebx,0x14(%rsp)
  lea    0x140(%rsp),%rbp
  lea    0x40(%rsp),%rbx
  movl   $0x98badcfe,0x8(%rsp)
  movl   $0xefcdab89,0x4(%rsp)
  movl   $0x67452301,(%rsp)
  jmp    L36
  nopl   0x0(%rax,%rax,1)
L184:
  test   %dl,%dl
  jne    L20
  add    $0x1,%r12
  sub    $0x1,%r13d
  je     L82
L36:
  test   %eax,%eax
  jne    L19
  cmp    $0x3f,%r13d
  jg     L19
  mov    0x14(%rsp),%esi
  pxor   %xmm0,%xmm0
  movq   $0x0,0x1b0(%rsp)
  movl   $0x0,0x1b8(%rsp)
  mov    %esi,0x1bc(%rsp)
  movaps %xmm0,0x180(%rsp)
  movaps %xmm0,0x190(%rsp)
  movaps %xmm0,0x1a0(%rsp)
L19:
  movzbl (%r12),%ecx
  movslq %eax,%rdx
  add    $0x1,%eax
  cmp    $0x1,%r13d
  mov    %cl,0x180(%rsp,%rdx,1)
  sete   %dl
  cmp    $0x40,%eax
  jne    L184
L20:
  cmp    $0x3f,%eax
  jg     L202
  test   %dl,%dl
  je     L202
  cltq
  movb   $0x80,0x180(%rsp,%rax,1)
L202:
  lea    0x180(%rsp),%rcx
  mov    %rbx,%rax
  mov    %rbx,%rsi
  nopl   0x0(%rax)
L56:
  movzbl (%rcx),%edx
  movzbl 0x1(%rcx),%edi
  add    $0x4,%rcx
  add    $0x4,%rsi
  shl    $0x10,%edi
  shl    $0x18,%edx
  or     %edi,%edx
  movzbl -0x1(%rcx),%edi
  or     %edi,%edx
  movzbl -0x2(%rcx),%edi
  shl    $0x8,%edi
  or     %edi,%edx
  mov    %edx,-0x4(%rsi)
  cmp    %rcx,%r14
  jne    L56
  xchg   %ax,%ax
L67:
  mov    0x34(%rax),%edx
  xor    0x20(%rax),%edx
  add    $0x4,%rax
  xor    0x4(%rax),%edx
  xor    -0x4(%rax),%edx
  rol    %edx
  mov    %edx,0x3c(%rax)
  cmp    %rax,%rbp
  jne    L67
  mov    0x10(%rsp),%r9d
  mov    0xc(%rsp),%ecx
  xor    %edx,%edx
  mov    0x8(%rsp),%esi
  mov    0x4(%rsp),%eax
  mov    (%rsp),%edi
  jmp    L187
  nopw   0x0(%rax,%rax,1)
L137:
  lea    0x6ed9eba1(%r9,%r15,1),%r10d
  xor    %esi,%eax
  add    %r11d,%r10d
  xor    %ecx,%eax
  add    %eax,%r10d
L195:
  mov    %ecx,%r9d
  mov    %edi,%eax
  mov    %esi,%ecx
  add    $0x1,%rdx
  mov    %r8d,%esi
  mov    %r10d,%edi
L187:
  mov    %edi,%r15d
  mov    %eax,%r8d
  rol    $0x5,%r15d
  ror    $0x2,%r8d
  cmp    $0x13,%rdx
  jbe    L209
  mov    (%rbx,%rdx,4),%r11d
  cmp    $0x27,%edx
  jle    L137
  cmp    $0x3b,%edx
  jg     L147
  mov    %esi,%r10d
  or     %ecx,%r10d
  and    %eax,%r10d
  mov    %esi,%eax
  and    %ecx,%eax
  or     %eax,%r10d
  lea    -0x70e44324(%r9,%r15,1),%eax
  add    %r11d,%eax
  add    %eax,%r10d
  jmp    L195
  nopl   (%rax)
L209:
  lea    0x5a827999(%r9,%r15,1),%r10d
  mov    (%rbx,%rdx,4),%r9d
  add    %r10d,%r9d
  mov    %esi,%r10d
  xor    %ecx,%r10d
  and    %r10d,%eax
  xor    %ecx,%eax
  lea    (%r9,%rax,1),%r10d
  jmp    L195
L147:
  lea    -0x359d3e2a(%r9,%r15,1),%r10d
  xor    %esi,%eax
  add    %r11d,%r10d
  xor    %ecx,%eax
  add    %eax,%r10d
  cmp    $0x4f,%rdx
  jne    L195
  add    %r10d,(%rsp)
  mov    (%rsp),%eax
  add    $0x1,%r12
  add    %edi,0x4(%rsp)
  mov    %eax,0x20(%rsp)
  mov    0x4(%rsp),%eax
  add    %r8d,0x8(%rsp)
  mov    %eax,0x24(%rsp)
  mov    0x8(%rsp),%eax
  add    %esi,0xc(%rsp)
  mov    %eax,0x28(%rsp)
  mov    0xc(%rsp),%eax
  add    %ecx,0x10(%rsp)
  mov    %eax,0x2c(%rsp)
  mov    0x10(%rsp),%eax
  mov    %eax,0x30(%rsp)
  xor    %eax,%eax
  sub    $0x1,%r13d
  jne    L36
L82:
  mov    (%rsp),%edi
  xor    %eax,%eax
  call   <htonl@plt>
  mov    0x4(%rsp),%edi
  mov    %eax,0x20(%rsp)
  xor    %eax,%eax
  call   <htonl@plt>
  mov    0x8(%rsp),%edi
  mov    %eax,0x24(%rsp)
  xor    %eax,%eax
  call   <htonl@plt>
  mov    0xc(%rsp),%edi
  mov    %eax,0x28(%rsp)
  xor    %eax,%eax
  call   <htonl@plt>
  mov    0x10(%rsp),%edi
  mov    %eax,0x2c(%rsp)
  xor    %eax,%eax
  call   <htonl@plt>
  mov    0x18(%rsp),%rbx
  movdqa 0x20(%rsp),%xmm1
  mov    %eax,0x30(%rsp)
  mov    %eax,0x10(%rbx)
  movups %xmm1,(%rbx)
  mov    0x1c8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L167
  add    $0x1d8,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L21:
  movl   $0xc3d2e1f0,0x10(%rsp)
  movl   $0x10325476,0xc(%rsp)
  movl   $0x98badcfe,0x8(%rsp)
  movl   $0xefcdab89,0x4(%rsp)
  movl   $0x67452301,(%rsp)
  jmp    L82
L167:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
__attribute__((visibility("default"))) int e_sha1_sum(unsigned char *data, int size, unsigned char *dst) {
  unsigned int digest[5], word[80], wa, wb, wc, wd, we, t;
  unsigned char buf[64], *d;
  int idx, left, i;
  const unsigned int magic[4] = {0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6};
  idx = 0;
  digest[0] = 0x67452301;
  digest[1] = 0xefcdab89;
  digest[2] = 0x98badcfe;
  digest[3] = 0x10325476;
  digest[4] = 0xc3d2e1f0;
  memset(buf, 0, sizeof(buf));
  for (left = size, d = data; left > 0; left--, d++) {
    if ((idx == 0) && (left < 64)) {
      memset(buf, 0, 60);
      buf[60] = (size >> 24) & 0xff;
      buf[61] = (size >> 16) & 0xff;
      buf[62] = (size >> 8) & 0xff;
      buf[63] = (size)&0xff;
    }
    buf[idx] = *d;
    idx++;
    if ((idx == 64) || (left == 1)) {
      if ((left == 1) && (idx < 64))
        buf[idx] = 0x80;
      for (i = 0; i < 16; i++) {
        word[i] = (unsigned int)buf[(i * 4)] << 24;
        word[i] |= (unsigned int)buf[(i * 4) + 1] << 16;
        word[i] |= (unsigned int)buf[(i * 4) + 2] << 8;
        word[i] |= (unsigned int)buf[(i * 4) + 3];
      }
      for (i = 16; i < 80; i++)
        word[i] = ((((word[i - 3] ^ word[i - 8] ^ word[i - 14] ^ word[i - 16]) << (1)) & 0xffffffff) | ((word[i - 3] ^ word[i - 8] ^ word[i - 14] ^ word[i - 16]) >> (32 - (1))));
      wa = digest[0];
      wb = digest[1];
      wc = digest[2];
      wd = digest[3];
      we = digest[4];
      for (i = 0; i < 80; i++) {
        if (i < 20)
          t = ((((wa) << (5)) & 0xffffffff) | ((wa) >> (32 - (5)))) + ((wb & wc) | ((~wb) & wd)) + we + word[i] + magic[0];
        else if (i < 40)
          t = ((((wa) << (5)) & 0xffffffff) | ((wa) >> (32 - (5)))) + (wb ^ wc ^ wd) + we + word[i] + magic[1];
        else if (i < 60)
          t = ((((wa) << (5)) & 0xffffffff) | ((wa) >> (32 - (5)))) + ((wb & wc) | (wb & wd) | (wc & wd)) + we + word[i] + magic[2];
        else if (i < 80)
          t = ((((wa) << (5)) & 0xffffffff) | ((wa) >> (32 - (5)))) + (wb ^ wc ^ wd) + we + word[i] + magic[3];
        we = wd;
        wd = wc;
        wc = ((((wb) << (30)) & 0xffffffff) | ((wb) >> (32 - (30))));
        wb = wa;
        wa = t;
      }
      digest[0] += wa;
      digest[1] += wb;
      digest[2] += wc;
      digest[3] += wd;
      digest[4] += we;
      idx = 0;
    }
  }
  t = htonl(digest[0]);
  digest[0] = t;
  t = htonl(digest[1]);
  digest[1] = t;
  t = htonl(digest[2]);
  digest[2] = t;
  t = htonl(digest[3]);
  digest[3] = t;
  t = htonl(digest[4]);
  digest[4] = t;
  memcpy(dst, digest, 5 * 4);
  return 1;
}
```