user: What is the c source code of the assembly code below:

```asm
<SHA256_Final>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  mov    0x20(%rsi),%r12
  mov    (%rsi),%rax
  mov    D4(%rip),%r13
  movb   $0x80,(%r12,%rax,1)
  add    $0x1,%rax
  mov    0x0(%r13),%edx
  lea    (%r12,%rax,1),%rdi
  mov    %eax,%esi
  lea    -0x8(%rdx),%ecx
  movslq %ecx,%rcx
  cmp    %rax,%rcx
  jb     L2
L109:
  sub    %esi,%edx
  xor    %esi,%esi
  sub    $0x8,%edx
  call   <memset@plt>
  movslq 0x0(%r13),%rax
  mov    0x8(%rbp),%edx
  mov    %rbp,%rdi
  bswap  %edx
  lea    -0x8(%r12,%rax,1),%rax
  mov    %edx,(%rax)
  lea    0x8(%rax),%r12
  mov    0xc(%rbp),%edx
  bswap  %edx
  mov    %edx,0x4(%rax)
  movslq 0x0(%r13),%rax
  mov    $0x1,%edx
  sub    %rax,%r12
  mov    %r12,%rsi
  call   <sha256_block_data_order@plt>
  mov    0x0(%r13),%edx
  xor    %esi,%esi
  mov    %r12,%rdi
  movq   $0x0,0x0(%rbp)
  call   <memset@plt>
  mov    0x10(%rbp),%eax
  cmp    $0x80,%eax
  je     L0
  cmp    $0x81,%eax
  jne    L104
  mov    0x18(%rbp),%rcx
  xor    %edx,%edx
L47:
  mov    (%rcx,%rdx,2),%eax
  bswap  %eax
  mov    %eax,(%rbx,%rdx,1)
  add    $0x4,%rdx
  cmp    $0x80,%rdx
  jne    L47
L37:
  mov    $0x1,%r8d
L9:
  add    $0x8,%rsp
  mov    %r8d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L0:
  mov    0x18(%rbp),%rcx
  xor    %edx,%edx
  cs nopw 0x0(%rax,%rax,1)
L59:
  mov    (%rcx,%rdx,2),%eax
  bswap  %eax
  mov    %eax,(%rbx,%rdx,1)
  add    $0x4,%rdx
  cmp    $0x80,%rdx
  jne    L59
  jmp    L37
  nopw   0x0(%rax,%rax,1)
L104:
  xor    %r8d,%r8d
  cmp    $0x80,%eax
  jg     L9
  add    $0x3,%eax
  cmp    $0x6,%eax
  jbe    L37
  mov    0x18(%rbp),%rsi
  xor    %edx,%edx
  nopl   0x0(%rax,%rax,1)
L85:
  mov    %edx,%eax
  mov    (%rsi,%rax,8),%rax
  bswap  %eax
  mov    %eax,(%rbx,%rdx,4)
  mov    0x10(%rbp),%ecx
  add    $0x1,%rdx
  lea    0x3(%rcx),%eax
  test   %ecx,%ecx
  cmovns %ecx,%eax
  sar    $0x2,%eax
  cmp    %edx,%eax
  ja     L85
  jmp    L37
  cs nopw 0x0(%rax,%rax,1)
L2:
  sub    %eax,%edx
  xor    %esi,%esi
  call   <memset@plt>
  mov    $0x1,%edx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <sha256_block_data_order@plt>
  mov    0x0(%r13),%edx
  mov    %r12,%rdi
  xor    %esi,%esi
  jmp    L109
```

assistant: ```c
int SHA256_Final(unsigned char *md, SHA256_CTX *c) {
  unsigned char *p = (unsigned char *)c->data;
  size_t n = c->num;
  p[n] = 0x80;
  n++;
  if (n > (SHA_CBLOCK - 8)) {
    memset(p + n, 0, SHA_CBLOCK - n);
    n = 0;
    sha256_block_data_order(c, p, 1);
  }
  memset(p + n, 0, SHA_CBLOCK - 8 - n);
  p += SHA_CBLOCK - 8;
  (void)({
    unsigned int r = (c->Nh);
    asm("bswapl %0" : "=r"(r) : "0"(r));
    *((unsigned int *)(p)) = r;
    (p) += 4;
    r;
  });
  (void)({
    unsigned int r = (c->Nl);
    asm("bswapl %0" : "=r"(r) : "0"(r));
    *((unsigned int *)(p)) = r;
    (p) += 4;
    r;
  });
  p -= SHA_CBLOCK;
  sha256_block_data_order(c, p, 1);
  c->num = 0;
  memset(p, 0, SHA_CBLOCK);
  do {
    unsigned long ll;
    unsigned int xn;
    switch ((c)->md_len) {
    case SHA224_DIGEST_LENGTH:
      for (xn = 0; xn < SHA224_DIGEST_LENGTH / 4; xn++) {
        ll = (c)->h[xn];
        ({
          unsigned int r = (ll);
          asm("bswapl %0" : "=r"(r) : "0"(r));
          *((unsigned int *)((md))) = r;
          ((md)) += 4;
          r;
        });
      }
      break;
    case SHA256_DIGEST_LENGTH:
      for (xn = 0; xn < SHA256_DIGEST_LENGTH / 4; xn++) {
        ll = (c)->h[xn];
        ({
          unsigned int r = (ll);
          asm("bswapl %0" : "=r"(r) : "0"(r));
          *((unsigned int *)((md))) = r;
          ((md)) += 4;
          r;
        });
      }
      break;
    default:
      if ((c)->md_len > SHA256_DIGEST_LENGTH)
        return 0;
      for (xn = 0; xn < (c)->md_len / 4; xn++) {
        ll = (c)->h[xn];
        ({
          unsigned int r = (ll);
          asm("bswapl %0" : "=r"(r) : "0"(r));
          *((unsigned int *)((md))) = r;
          ((md)) += 4;
          r;
        });
      }
      break;
    }
  } while (0);
  return 1;
}
```