user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<SHA1_Update>:
  endbr64
  test   %rdx,%rdx
  je     L140
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r12
  mov    %rsi,%rbp
  mov    %rdx,%rbx
  mov    (%rdi),%edx
  mov    %ebx,%r8d
  lea    (%rdx,%rbx,8),%eax
  cmp    %eax,%edx
  jbe    L126
  addq   $0x1,0x10(%rdi)
L126:
  mov    %rbx,%rdx
  shr    $0x1d,%rdx
  add    %rdx,0x10(%r12)
  mov    %eax,(%r12)
  mov    0x4(%r12),%eax
  test   %eax,%eax
  je     L102
  mov    0x8(%r12),%rsi
  mov    %eax,%edi
  sar    $0x2,%edi
  movslq %edi,%rdi
  mov    %eax,%edx
  and    $0x3,%edx
  movslq %eax,%rcx
  add    %rbx,%rcx
  cmp    $0x3f,%rcx
  jbe    L12
  lea    (%rsi,%rdi,4),%rcx
  mov    (%rcx),%eax
  cmp    $0x2,%edx
  je     L360
  cmp    $0x2,%edx
  jg     L131
  test   %edx,%edx
  je     L96
  cmp    $0x1,%edx
  jne    L230
L350:
  lea    0x1(%rbp),%rdx
  movzbl 0x0(%rbp),%r8d
  shl    $0x10,%r8
  or     %r8d,%eax
L306:
  lea    0x1(%rdx),%rbp
  movzbl (%rdx),%edx
  shl    $0x8,%rdx
  or     %edx,%eax
L131:
  lea    0x1(%rbp),%r8
  movzbl 0x0(%rbp),%edx
  or     %edx,%eax
L197:
  lea    0x1(%rdi),%rdx
  mov    %eax,(%rcx)
  cmp    $0xf,%rdx
  ja     L403
  mov    %rdi,%rax
  neg    %rax
  lea    (%r8,%rax,4),%rcx
L234:
  mov    -0x4(%rcx,%rdx,4),%eax
  bswap  %eax
  mov    %eax,(%rsi,%rdx,4)
  add    $0x1,%rdx
  cmp    $0x10,%rdx
  jne    L234
  mov    $0xf,%eax
  sub    %rdi,%rax
  lea    (%r8,%rax,4),%rbp
L217:
  mov    $0x1,%edx
  mov    %r12,%rdi
  call   <sha1_block_host_order@plt>
  mov    $0x40,%eax
  sub    0x4(%r12),%eax
  cltq
  sub    %rax,%rbx
  movl   $0x0,0x4(%r12)
  cmp    $0x3f,%rbx
  jbe    L202
  mov    %rbx,%rdx
  shr    $0x6,%rdx
L49:
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <sha1_block_data_order@plt>
  mov    %rbx,%rax
  and    $0xffffffffffffffc0,%rax
  add    %rax,%rbp
  sub    %rax,%rbx
L202:
  test   %rbx,%rbx
  jne    L51
L272:
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L230:
  mov    %rbp,%r8
  jmp    L197
L96:
  movzbl 0x0(%rbp),%eax
  shl    $0x18,%eax
  lea    0x1(%rbp),%rbp
  jmp    L350
L360:
  mov    %rbp,%rdx
  jmp    L306
L403:
  mov    %r8,%rbp
  jmp    L217
L12:
  movslq %edx,%rcx
  add    %r8d,%eax
  mov    %eax,0x4(%r12)
  lea    (%rbx,%rcx,1),%r8
  cmp    $0x3,%r8
  ja     L390
  lea    (%rsi,%rdi,4),%rcx
  mov    (%rcx),%eax
  cmp    $0x1,%edx
  je     L408
  cmp    $0x2,%edx
  je     L293
  test   %edx,%edx
  je     L438
L26:
  mov    %eax,(%rcx)
  jmp    L272
L438:
  movzbl 0x0(%rbp),%eax
  shl    $0x18,%eax
  sub    $0x1,%rbx
  je     L26
  add    $0x1,%rbp
L408:
  movzbl 0x0(%rbp),%edx
  shl    $0x10,%rdx
  or     %edx,%eax
  cmp    $0x1,%rbx
  je     L26
  add    $0x1,%rbp
L293:
  movzbl 0x0(%rbp),%edx
  shl    $0x8,%rdx
  or     %edx,%eax
  jmp    L26
L390:
  mov    %eax,%r8d
  sar    $0x2,%r8d
  movslq %r8d,%r8
  mov    %eax,%r11d
  and    $0x3,%r11d
  and    $0x3,%eax
  test   %rcx,%rcx
  je     L22
  mov    (%rsi,%rdi,4),%r9d
  cmp    $0x2,%edx
  je     L352
  cmp    $0x2,%edx
  jg     L373
  mov    %rbp,%r10
  cmp    $0x1,%edx
  jne    L84
L303:
  lea    0x1(%rbp),%rdx
  movzbl 0x0(%rbp),%ecx
  shl    $0x10,%rcx
  or     %ecx,%r9d
L190:
  lea    0x1(%rdx),%rbp
  movzbl (%rdx),%edx
  shl    $0x8,%rdx
  or     %edx,%r9d
L373:
  lea    0x1(%rbp),%r10
  movzbl 0x0(%rbp),%edx
  or     %edx,%r9d
L84:
  lea    0x1(%rdi),%rcx
  mov    %r9d,(%rsi,%rdi,4)
  cmp    %rcx,%r8
  jbe    L64
  mov    %rdi,%rdx
  neg    %rdx
  lea    (%r10,%rdx,4),%r9
L61:
  mov    -0x4(%r9,%rcx,4),%edx
  bswap  %edx
  mov    %edx,(%rsi,%rcx,4)
  add    $0x1,%rcx
  cmp    %rcx,%r8
  jne    L61
  mov    %rcx,%rdx
  sub    %rdi,%rdx
  lea    -0x4(%r10,%rdx,4),%r10
L64:
  test   %rax,%rax
  je     L272
  add    %rax,%r10
  cmp    $0x2,%r11d
  je     L185
  cmp    $0x3,%r11d
  je     L396
  mov    $0x0,%eax
  cmp    $0x1,%r11d
  jne    L169
  mov    $0x0,%eax
  jmp    L421
L22:
  movzbl 0x0(%rbp),%r9d
  shl    $0x18,%r9d
  lea    0x1(%rbp),%rbp
  jmp    L303
L352:
  mov    %rbp,%rdx
  jmp    L190
L396:
  movzbl -0x1(%r10),%eax
  shl    $0x8,%eax
  lea    -0x1(%r10),%r10
L365:
  movzbl -0x1(%r10),%edx
  shl    $0x10,%rdx
  or     %edx,%eax
  lea    -0x1(%r10),%r10
L421:
  movzbl -0x1(%r10),%edx
  shl    $0x18,%rdx
  or     %edx,%eax
L169:
  mov    %eax,(%rsi,%rcx,4)
  jmp    L272
L185:
  mov    $0x0,%eax
  jmp    L365
L248:
  movzbl -0x1(%rbp),%eax
  shl    $0x8,%eax
  lea    -0x1(%rbp),%rbp
L341:
  movzbl -0x1(%rbp),%edx
  shl    $0x10,%rdx
  or     %edx,%eax
  lea    -0x1(%rbp),%rbp
L80:
  movzbl -0x1(%rbp),%edx
  shl    $0x18,%rdx
  or     %edx,%eax
L45:
  mov    %eax,(%rcx)
  jmp    L272
L251:
  mov    $0x0,%eax
  jmp    L341
L102:
  mov    %rbx,%rdx
  shr    $0x6,%rdx
  cmp    $0x3f,%rbx
  ja     L49
L51:
  mov    0x8(%r12),%rcx
  mov    %ebx,0x4(%r12)
  mov    %rbx,%rsi
  and    $0x3,%esi
  shr    $0x2,%rbx
  je     L76
  shl    $0x2,%rbx
  mov    $0x0,%edx
L425:
  mov    0x0(%rbp,%rdx,1),%eax
  bswap  %eax
  mov    %eax,(%rcx,%rdx,1)
  add    $0x4,%rdx
  cmp    %rbx,%rdx
  jne    L425
  add    %rbx,%rbp
  add    %rbx,%rcx
L76:
  add    %rsi,%rbp
  cmp    $0x2,%rsi
  je     L251
  cmp    $0x3,%rsi
  je     L248
  mov    $0x0,%eax
  cmp    $0x1,%rsi
  jne    L45
  mov    $0x0,%eax
  jmp    L80
L140:
  mov    $0x1,%eax
  ret
```

assistant: ```c
int SHA1_Update(SHA_CTX *c, const void *data_, size_t len) {
  const unsigned char *data = data_;
  register unsigned int *p;
  register unsigned int l;
  size_t sw, sc, ew, ec;
  if (len == 0)
    return 1;
  l = (c->Nl + (((unsigned int)len) << 3)) & 0xffffffffUL;
  if (l < c->Nl)
    c->Nh++;
  c->Nh += (len >> 29);
  c->Nl = l;
  if (c->num != 0) {
    p = c->data;
    sw = c->num >> 2;
    sc = c->num & 0x03;
    if ((c->num + len) >= (16 * 4)) {
      l = p[sw];
      {
        switch (sc) {
        case 0:
          l = ((unsigned long)(*((data)++))) << 24;
        case 1:
          l |= ((unsigned long)(*((data)++))) << 16;
        case 2:
          l |= ((unsigned long)(*((data)++))) << 8;
        case 3:
          l |= ((unsigned long)(*((data)++)));
        }
      };
      p[sw++] = l;
      for (; sw < 16; sw++) {
        ({
          unsigned int r = *((const unsigned int *)(data));
          asm("bswapl %0" : "=r"(r) : "0"(r));
          (data) += 4;
          (l) = r;
        });
        p[sw] = l;
      }
      sha1_block_host_order(c, p, 1);
      len -= ((16 * 4) - c->num);
      c->num = 0;
    } else {
      c->num += (unsigned int)len;
      if ((sc + len) < 4) {
        l = p[sw];
        {
          switch (sc) {
          case 0:
            l = ((unsigned long)(*((data)++))) << 24;
            if (--len == 0)
              break;
          case 1:
            l |= ((unsigned long)(*((data)++))) << 16;
            if (--len == 0)
              break;
          case 2:
            l |= ((unsigned long)(*((data)++))) << 8;
          }
        };
        p[sw] = l;
      } else {
        ew = (c->num >> 2);
        ec = (c->num & 0x03);
        if (sc)
          l = p[sw];
        {
          switch (sc) {
          case 0:
            l = ((unsigned long)(*((data)++))) << 24;
          case 1:
            l |= ((unsigned long)(*((data)++))) << 16;
          case 2:
            l |= ((unsigned long)(*((data)++))) << 8;
          case 3:
            l |= ((unsigned long)(*((data)++)));
          }
        };
        p[sw++] = l;
        for (; sw < ew; sw++) {
          ({
            unsigned int r = *((const unsigned int *)(data));
            asm("bswapl %0" : "=r"(r) : "0"(r));
            (data) += 4;
            (l) = r;
          });
          p[sw] = l;
        }
        if (ec) {
          {
            l = 0;
            (data) += ec;
            switch (ec) {
            case 3:
              l = ((unsigned long)(*(--(data)))) << 8;
            case 2:
              l |= ((unsigned long)(*(--(data)))) << 16;
            case 1:
              l |= ((unsigned long)(*(--(data)))) << 24;
            }
          };
          p[sw] = l;
        }
      }
      return 1;
    }
  }
  sw = len / (16 * 4);
  if (sw > 0) {
    {
      sha1_block_data_order(c, data, sw);
      sw *= (16 * 4);
      data += sw;
      len -= sw;
    }
  }
  if (len != 0) {
    p = c->data;
    c->num = len;
    ew = len >> 2;
    ec = len & 0x03;
    for (; ew; ew--, p++) {
      ({
        unsigned int r = *((const unsigned int *)(data));
        asm("bswapl %0" : "=r"(r) : "0"(r));
        (data) += 4;
        (l) = r;
      });
      *p = l;
    }
    {
      l = 0;
      (data) += ec;
      switch (ec) {
      case 3:
        l = ((unsigned long)(*(--(data)))) << 8;
      case 2:
        l |= ((unsigned long)(*(--(data)))) << 16;
      case 1:
        l |= ((unsigned long)(*(--(data)))) << 24;
      }
    };
    *p = l;
  }
  return 1;
}
```