user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<MD4_Update>:
  endbr64
  test   %rdx,%rdx
  je     L138
  push   %r14
  push   %r13
  mov    D7(%rip),%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    (%rdi),%rax
  mov    %rdx,%rbx
  mov    0x0(%r13),%r8
  lea    (%rax,%rdx,8),%ecx
  mov    0x18(%rdi),%rdx
  cmp    %rax,%rcx
  mov    %rbx,%rax
  mov    %rcx,(%rdi)
  adc    $0x0,%rdx
  shr    $0x1d,%rax
  add    %rdx,%rax
  mov    %rax,0x18(%rdi)
  mov    0x8(%rdi),%eax
  test   %eax,%eax
  je     L388
  mov    %eax,%ecx
  mov    0x10(%rdi),%rsi
  movslq %eax,%r10
  mov    %eax,%edx
  sar    $0x2,%ecx
  add    %rbx,%r10
  and    $0x3,%edx
  movslq %ecx,%rdi
  lea    (%rsi,%rdi,8),%r9
  cmp    %r8,%r10
  jb     L290
  mov    (%r9),%r10
  movzbl 0x0(%rbp),%eax
  cmp    $0x2,%edx
  je     L35
  cmp    $0x3,%edx
  je     L408
  cmp    $0x1,%edx
  je     L108
  add    $0x1,%rbp
  movzbl %al,%r10d
L108:
  movzbl 0x0(%rbp),%edx
  lea    0x1(%rbp),%rax
  shl    $0x8,%rdx
  or     %rdx,%r10
L407:
  lea    0x1(%rax),%rbp
  movzbl (%rax),%eax
  shl    $0x10,%rax
  or     %rax,%r10
L408:
  movzbl 0x0(%rbp),%edx
  lea    0x1(%rcx),%eax
  lea    0x1(%rbp),%r8
  shl    $0x18,%rdx
  or     %r10,%rdx
  mov    %rdx,(%r9)
  mov    D6(%rip),%rdx
  mov    (%rdx),%edx
  cmp    %eax,%edx
  jle    L253
  neg    %rdi
  cltq
  lea    0x0(%rbp,%rdi,4),%rdi
  nopl   0x0(%rax)
L154:
  mov    -0x3(%rdi,%rax,4),%r11d
  mov    %r11,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%edx
  jg     L154
  sub    $0x2,%edx
  sub    %ecx,%edx
  lea    0x4(%r8,%rdx,4),%rbp
L211:
  mov    $0x1,%edx
  mov    %r12,%rdi
  call   <md4_block_host_order@plt>
  movslq 0x8(%r12),%rax
  mov    0x0(%r13),%rcx
  xor    %edx,%edx
  movl   $0x0,0x8(%r12)
  add    %rbx,%rax
  sub    %rcx,%rax
  mov    %rax,%rbx
  div    %rcx
  mov    %eax,%r14d
  test   %eax,%eax
  jle    L147
L344:
  mov    %r14d,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <md4_block_data_order@plt>
  imul   0x0(%r13),%r14d
  movslq %r14d,%r14
  add    %r14,%rbp
  sub    %r14,%rbx
L147:
  test   %rbx,%rbx
  jne    L255
L273:
  pop    %rbx
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  xchg   %ax,%ax
L388:
  mov    %rbx,%rax
  xor    %edx,%edx
  div    %r8
  mov    %eax,%r14d
  test   %eax,%eax
  jg     L344
L255:
  mov    %rbx,%rax
  mov    %ebx,0x8(%r12)
  mov    0x10(%r12),%rcx
  and    $0x3,%ebx
  shr    $0x2,%rax
  test   %eax,%eax
  je     L54
  lea    -0x1(%rax),%edi
  xor    %edx,%edx
  mov    %rdi,%rsi
  nop
L331:
  mov    0x0(%rbp,%rdx,4),%eax
  mov    %rax,(%rcx,%rdx,8)
  mov    %rdx,%rax
  add    $0x1,%rdx
  cmp    %rdi,%rax
  jne    L331
  mov    %esi,%eax
  add    $0x1,%rax
  lea    0x0(%rbp,%rax,4),%rbp
  lea    (%rcx,%rax,8),%rcx
L54:
  movslq %ebx,%rax
  add    %rbp,%rax
  cmp    $0x2,%ebx
  je     L118
  cmp    $0x3,%ebx
  je     L87
  cmp    $0x1,%ebx
  je     L210
  xor    %eax,%eax
L126:
  mov    %rax,(%rcx)
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nop
L138:
  mov    $0x1,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L210:
  xor    %edx,%edx
L319:
  movzbl -0x1(%rax),%eax
  or     %rdx,%rax
  jmp    L126
  nopl   0x0(%rax,%rax,1)
L87:
  movzbl -0x1(%rax),%esi
  lea    -0x1(%rax),%rdx
  shl    $0x10,%rsi
L381:
  lea    -0x1(%rdx),%rax
  movzbl -0x1(%rdx),%edx
  shl    $0x8,%rdx
  or     %rsi,%rdx
  jmp    L319
  nopl   (%rax)
L35:
  mov    %rbp,%rax
  jmp    L407
  nopl   0x0(%rax,%rax,1)
L290:
  movslq %edx,%r8
  add    %ebx,%eax
  add    %rbx,%r8
  mov    %eax,0x8(%r12)
  cmp    $0x3,%r8
  ja     L312
  mov    (%r9),%rax
  cmp    $0x1,%edx
  je     L302
  cmp    $0x2,%edx
  je     L390
  test   %edx,%edx
  je     L244
L337:
  mov    %rax,(%r9)
  jmp    L273
  nopl   0x0(%rax,%rax,1)
L118:
  mov    %rax,%rdx
  xor    %esi,%esi
  jmp    L381
  nopw   0x0(%rax,%rax,1)
L312:
  mov    %eax,%r8d
  and    $0x3,%eax
  sar    $0x2,%r8d
  test   %edx,%edx
  je     L14
  mov    (%r9),%rbx
  cmp    $0x2,%edx
  je     L89
  cmp    $0x3,%edx
  je     L350
  cmp    $0x1,%edx
  je     L22
L14:
  movzbl 0x0(%rbp),%ebx
  add    $0x1,%rbp
L22:
  movzbl 0x0(%rbp),%r10d
  lea    0x1(%rbp),%rdx
  shl    $0x8,%r10
  or     %r10,%rbx
L320:
  lea    0x1(%rdx),%rbp
  movzbl (%rdx),%edx
  shl    $0x10,%rdx
  or     %rdx,%rbx
L350:
  movzbl 0x0(%rbp),%r11d
  lea    0x1(%rcx),%edx
  lea    0x1(%rbp),%r10
  shl    $0x18,%r11
  or     %rbx,%r11
  mov    %r11,(%r9)
  cmp    %edx,%r8d
  jle    L227
  neg    %rdi
  movslq %edx,%rdx
  lea    0x0(%rbp,%rdi,4),%rdi
  nopl   0x0(%rax)
L85:
  mov    -0x3(%rdi,%rdx,4),%ebx
  mov    %rbx,(%rsi,%rdx,8)
  add    $0x1,%rdx
  cmp    %edx,%r8d
  jg     L85
  mov    %r8d,%edx
  sub    %ecx,%edx
  sub    $0x2,%edx
  lea    0x4(%r10,%rdx,4),%r10
L155:
  test   %eax,%eax
  je     L273
  movslq %eax,%rdx
  add    %rdx,%r10
  movzbl -0x1(%r10),%ecx
  cmp    $0x2,%eax
  je     L223
  xor    %edx,%edx
  cmp    $0x3,%eax
  jne    L351
  sub    $0x1,%r10
  shl    $0x10,%rcx
L371:
  movzbl -0x1(%r10),%edx
  sub    $0x1,%r10
  shl    $0x8,%rdx
  or     %rcx,%rdx
L351:
  movzbl -0x1(%r10),%eax
  movslq %r8d,%r8
  or     %rdx,%rax
  mov    %rax,(%rsi,%r8,8)
  jmp    L273
L253:
  mov    %r8,%rbp
  jmp    L211
L244:
  movzbl 0x0(%rbp),%eax
  sub    $0x1,%rbx
  je     L337
  add    $0x1,%rbp
L302:
  movzbl 0x0(%rbp),%edx
  shl    $0x8,%rdx
  or     %rdx,%rax
  cmp    $0x1,%rbx
  je     L337
  add    $0x1,%rbp
L390:
  movzbl 0x0(%rbp),%edx
  shl    $0x10,%rdx
  or     %rdx,%rax
  jmp    L337
L89:
  mov    %rbp,%rdx
  jmp    L320
L223:
  xor    %ecx,%ecx
  jmp    L371
L227:
  mov    %edx,%r8d
  jmp    L155
```

assistant: ```c
int MD4_Update(MD4_CTX *c, const void *data_, unsigned long len) {
  const unsigned char *data = data_;
  register MD4_LONG *p;
  register unsigned long l;
  int sw, sc, ew, ec;
  if (len == 0)
    return 1;
  l = (c->Nl + (len << 3)) & 0xffffffffL;
  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) >= MD4_CBLOCK) {
      l = p[sw];
      {
        switch (sc) {
        case 0:
          l = ((unsigned long)(*((data)++)));
        case 1:
          l |= ((unsigned long)(*((data)++))) << 8;
        case 2:
          l |= ((unsigned long)(*((data)++))) << 16;
        case 3:
          l |= ((unsigned long)(*((data)++))) << 24;
        }
      };
      p[sw++] = l;
      for (; sw < MD4_LBLOCK; sw++) {
        (l = (((unsigned long)(*((data)++)))), l |= (((unsigned long)(*((data)++))) << 8), l |= (((unsigned long)(*((data)++))) << 16), l |= (((unsigned long)(*((data)++))) << 24), l);
        p[sw] = l;
      }
      md4_block_host_order(c, p, 1);
      len -= (MD4_CBLOCK - c->num);
      c->num = 0;
    } else {
      c->num += len;
      if ((sc + len) < 4) {
        l = p[sw];
        {
          switch (sc) {
          case 0:
            l = ((unsigned long)(*((data)++)));
            if (--len == 0)
              break;
          case 1:
            l |= ((unsigned long)(*((data)++))) << 8;
            if (--len == 0)
              break;
          case 2:
            l |= ((unsigned long)(*((data)++))) << 16;
          }
        };
        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)++)));
          case 1:
            l |= ((unsigned long)(*((data)++))) << 8;
          case 2:
            l |= ((unsigned long)(*((data)++))) << 16;
          case 3:
            l |= ((unsigned long)(*((data)++))) << 24;
          }
        };
        p[sw++] = l;
        for (; sw < ew; sw++) {
          (l = (((unsigned long)(*((data)++)))), l |= (((unsigned long)(*((data)++))) << 8), l |= (((unsigned long)(*((data)++))) << 16), l |= (((unsigned long)(*((data)++))) << 24), l);
          p[sw] = l;
        }
        if (ec) {
          {
            l = 0;
            (data) += ec;
            switch (ec) {
            case 3:
              l = ((unsigned long)(*(--(data)))) << 16;
            case 2:
              l |= ((unsigned long)(*(--(data)))) << 8;
            case 1:
              l |= ((unsigned long)(*(--(data))));
            }
          };
          p[sw] = l;
        }
      }
      return 1;
    }
  }
  sw = len / MD4_CBLOCK;
  if (sw > 0) {
    {
      md4_block_data_order(c, data, sw);
      sw *= MD4_CBLOCK;
      data += sw;
      len -= sw;
    }
  }
  if (len != 0) {
    p = c->data;
    c->num = len;
    ew = len >> 2;
    ec = len & 0x03;
    for (; ew; ew--, p++) {
      (l = (((unsigned long)(*((data)++)))), l |= (((unsigned long)(*((data)++))) << 8), l |= (((unsigned long)(*((data)++))) << 16), l |= (((unsigned long)(*((data)++))) << 24), l);
      *p = l;
    }
    {
      l = 0;
      (data) += ec;
      switch (ec) {
      case 3:
        l = ((unsigned long)(*(--(data)))) << 16;
      case 2:
        l |= ((unsigned long)(*(--(data)))) << 8;
      case 1:
        l |= ((unsigned long)(*(--(data))));
      }
    };
    *p = l;
  }
  return 1;
}
```