user: 请将以下的汇编代码转换成C语言代码：

```asm
<SHA256_Update>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x38(%rbp)
  jne    L18
  mov    $0x1,%eax
  jmp    L94
L18:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x38(%rbp),%rax
  shl    $0x3,%eax
  add    %edx,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x1c(%rbp)
  jge    L93
  mov    -0x28(%rbp),%rax
  mov    0x4(%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,0x4(%rax)
L93:
  mov    -0x28(%rbp),%rax
  mov    0x4(%rax),%edx
  mov    -0x38(%rbp),%rax
  shr    $0x1d,%rax
  add    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,0x4(%rax)
  mov    -0x28(%rbp),%rax
  mov    -0x1c(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  mov    0x8(%rax),%rax
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  je     L78
  mov    -0x28(%rbp),%rax
  mov    0x10(%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    D18(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,-0x38(%rbp)
  jae    L68
  mov    -0x38(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rax,%rdx
  mov    D18(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jb     L25
L68:
  mov    D18(%rip),%rax
  mov    (%rax),%rax
  sub    -0x10(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x8(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  add    %rax,%rcx
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <memcpy@plt>
  mov    -0x8(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sha256_block_data_order@plt>
  mov    D18(%rip),%rax
  mov    (%rax),%rax
  sub    -0x10(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  add    %rax,-0x18(%rbp)
  mov    -0x10(%rbp),%rax
  sub    %rax,-0x38(%rbp)
  mov    -0x28(%rbp),%rax
  movq   $0x0,0x8(%rax)
  mov    D18(%rip),%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  jmp    L78
L25:
  mov    -0x8(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x38(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <memcpy@plt>
  mov    -0x28(%rbp),%rax
  mov    0x8(%rax),%rdx
  mov    -0x38(%rbp),%rax
  mov    %eax,%eax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,0x8(%rax)
  mov    $0x1,%eax
  jmp    L94
L78:
  mov    D18(%rip),%rax
  mov    (%rax),%rsi
  mov    -0x38(%rbp),%rax
  mov    $0x0,%edx
  div    %rsi
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  je     L56
  mov    -0x10(%rbp),%rdx
  mov    -0x18(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sha256_block_data_order@plt>
  mov    D18(%rip),%rax
  mov    (%rax),%rax
  mov    -0x10(%rbp),%rdx
  imul   %rdx,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  add    %rax,-0x18(%rbp)
  mov    -0x10(%rbp),%rax
  sub    %rax,-0x38(%rbp)
L56:
  cmpq   $0x0,-0x38(%rbp)
  je     L63
  mov    -0x28(%rbp),%rax
  mov    0x10(%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %rdx,0x8(%rax)
  mov    -0x38(%rbp),%rdx
  mov    -0x18(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
L63:
  mov    $0x1,%eax
L94:
  leave
  ret
```

assistant: ```c
int SHA256_Update(SHA256_CTX *c, const void *data_, size_t len) {
  const unsigned char *data = data_;
  unsigned char *p;
  SHA_LONG l;
  size_t n;
  if (len == 0)
    return 1;
  l = (c->Nl + (((SHA_LONG)len) << 3)) & 0xffffffffUL;
  if (l < c->Nl)
    c->Nh++;
  c->Nh += (SHA_LONG)(len >> 29);
  c->Nl = l;
  n = c->num;
  if (n != 0) {
    p = (unsigned char *)c->data;
    if (len >= SHA_CBLOCK || len + n >= SHA_CBLOCK) {
      memcpy(p + n, data, SHA_CBLOCK - n);
      sha256_block_data_order(c, p, 1);
      n = SHA_CBLOCK - n;
      data += n;
      len -= n;
      c->num = 0;
      memset(p, 0, SHA_CBLOCK);
    } else {
      memcpy(p + n, data, len);
      c->num += (unsigned int)len;
      return 1;
    }
  }
  n = len / SHA_CBLOCK;
  if (n > 0) {
    sha256_block_data_order(c, data, n);
    n *= SHA_CBLOCK;
    data += n;
    len -= n;
  }
  if (len != 0) {
    p = (unsigned char *)c->data;
    c->num = (unsigned int)len;
    memcpy(p, data, len);
  }
  return 1;
}
```