user: Converte this assembly snippet into its equivalent C code:

```asm
<MD5_Update>:
  endbr64
  test   %rdx,%rdx
  je     L588
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x8,%rsp
  mov    (%rdi),%rax
  mov    D7(%rip),%r13
  lea    (%rax,%rdx,8),%ecx
  mov    0x18(%rdi),%rdx
  cmp    %rax,%rcx
  mov    %rbx,%rax
  mov    %rcx,(%rdi)
  mov    0x0(%r13),%rcx
  adc    $0x0,%rdx
  shr    $0x1d,%rax
  add    %rdx,%rax
  mov    %rax,0x18(%rdi)
  mov    0x8(%rdi),%eax
  test   %eax,%eax
  je     L166
  mov    %eax,%r10d
  mov    0x10(%rdi),%rsi
  movslq %eax,%r11
  mov    %eax,%edi
  sar    $0x2,%r10d
  add    %rbx,%r11
  and    $0x3,%edi
  movslq %r10d,%r9
  lea    0x0(,%r9,8),%rdx
  lea    (%rsi,%rdx,1),%r8
  cmp    %rcx,%r11
  jb     L230
  mov    (%r8),%rcx
  movzbl 0x0(%rbp),%eax
  cmp    $0x2,%edi
  je     L316
  cmp    $0x3,%edi
  je     L560
  cmp    $0x1,%edi
  je     L523
  add    $0x1,%rbp
  movzbl %al,%ecx
L523:
  movzbl 0x0(%rbp),%edi
  lea    0x1(%rbp),%rax
  shl    $0x8,%rdi
  or     %rdi,%rcx
L417:
  lea    0x1(%rax),%rbp
  movzbl (%rax),%eax
  shl    $0x10,%rax
  or     %rax,%rcx
L560:
  movzbl 0x0(%rbp),%eax
  lea    0x1(%r10),%edi
  lea    0x1(%rbp),%r11
  shl    $0x18,%rax
  or     %rcx,%rax
  mov    %rax,(%r8)
  mov    D10(%rip),%rax
  mov    (%rax),%r8d
  cmp    %edi,%r8d
  jle    L52
  mov    %r8d,%ecx
  lea    0x1(%r9),%rax
  lea    0x8(%rsi,%rdx,1),%rdx
  sub    %r10d,%ecx
  lea    -0x1(%rcx),%r14d
  lea    -0x2(%rcx),%r10d
  lea    (%rax,%r14,1),%r15
  mov    %r14,%rcx
  lea    0x1(%rbp,%r14,4),%r14
  lea    (%rsi,%r15,8),%r15
  cmp    %r15,%r11
  setae  %r15b
  cmp    %r14,%rdx
  setae  %r14b
  or     %r15b,%r14b
  je     L336
  cmp    $0x2,%r10d
  jbe    L336
  mov    %ecx,%r9d
  xor    %eax,%eax
  pxor   %xmm1,%xmm1
  shr    $0x2,%r9d
  shl    $0x4,%r9
  nopw   0x0(%rax,%rax,1)
L17:
  movdqu 0x1(%rbp,%rax,1),%xmm0
  movdqa %xmm0,%xmm2
  punpckhdq %xmm1,%xmm0
  punpckldq %xmm1,%xmm2
  movups %xmm0,0x10(%rdx,%rax,2)
  movups %xmm2,(%rdx,%rax,2)
  add    $0x10,%rax
  cmp    %rax,%r9
  jne    L17
  mov    %ecx,%eax
  and    $0xfffffffc,%eax
  mov    %eax,%edx
  add    %eax,%edi
  lea    (%r11,%rdx,4),%rdx
  cmp    %ecx,%eax
  je     L365
  mov    (%rdx),%ecx
  movslq %edi,%rax
  mov    %rcx,(%rsi,%rax,8)
  lea    0x1(%rdi),%eax
  cmp    %eax,%r8d
  jle    L365
  mov    0x4(%rdx),%r15d
  cltq
  add    $0x2,%edi
  lea    0x0(,%rax,8),%rcx
  mov    %r15,(%rsi,%rax,8)
  cmp    %r8d,%edi
  jge    L365
  mov    0x8(%rdx),%eax
  mov    %rax,0x8(%rsi,%rcx,1)
L365:
  mov    %r10d,%r10d
  lea    0x4(%r11,%r10,4),%rbp
L375:
  mov    $0x1,%edx
  mov    %r12,%rdi
  call   <md5_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    L352
L399:
  mov    %r14d,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <md5_block_data_order@plt>
  imul   0x0(%r13),%r14d
  movslq %r14d,%r14
  add    %r14,%rbp
  sub    %r14,%rbx
L352:
  test   %rbx,%rbx
  jne    L274
L330:
  add    $0x8,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L166:
  mov    %rbx,%rax
  xor    %edx,%edx
  div    %rcx
  mov    %eax,%r14d
  test   %eax,%eax
  jg     L399
L274:
  mov    %rbx,%rdi
  mov    %ebx,0x8(%r12)
  mov    0x10(%r12),%rdx
  and    $0x3,%ebx
  shr    $0x2,%rdi
  test   %edi,%edi
  je     L138
  mov    %edi,%ecx
  lea    -0x1(%rdi),%esi
  lea    (%rdx,%rcx,8),%rax
  lea    0x0(%rbp,%rcx,4),%rcx
  cmp    %rax,%rbp
  setae  %al
  cmp    %rcx,%rdx
  setae  %cl
  or     %cl,%al
  je     L561
  cmp    $0x2,%esi
  jbe    L561
  mov    %edi,%ecx
  xor    %eax,%eax
  pxor   %xmm1,%xmm1
  shr    $0x2,%ecx
  shl    $0x4,%rcx
  nopl   (%rax)
L497:
  movdqu 0x0(%rbp,%rax,1),%xmm0
  movdqa %xmm0,%xmm2
  punpckhdq %xmm1,%xmm0
  punpckldq %xmm1,%xmm2
  movups %xmm0,0x10(%rdx,%rax,2)
  movups %xmm2,(%rdx,%rax,2)
  add    $0x10,%rax
  cmp    %rax,%rcx
  jne    L497
  mov    %edi,%eax
  mov    %edi,%r9d
  and    $0xfffffffc,%eax
  mov    %eax,%ecx
  sub    %eax,%r9d
  lea    0x0(%rbp,%rcx,4),%r8
  lea    (%rdx,%rcx,8),%rcx
  cmp    %edi,%eax
  je     L379
  mov    (%r8),%eax
  mov    %rax,(%rcx)
  cmp    $0x1,%r9d
  je     L379
  mov    0x4(%r8),%eax
  mov    %rax,0x8(%rcx)
  cmp    $0x2,%r9d
  je     L379
  mov    0x8(%r8),%eax
  mov    %rax,0x10(%rcx)
L379:
  mov    %esi,%esi
  add    $0x1,%rsi
  lea    0x0(%rbp,%rsi,4),%rbp
  lea    (%rdx,%rsi,8),%rdx
L138:
  movslq %ebx,%rax
  add    %rbp,%rax
  cmp    $0x2,%ebx
  je     L154
  cmp    $0x3,%ebx
  je     L320
  cmp    $0x1,%ebx
  je     L168
  xor    %eax,%eax
L115:
  mov    %rax,(%rdx)
  jmp    L330
  nopw   0x0(%rax,%rax,1)
L588:
  mov    $0x1,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L168:
  xor    %ecx,%ecx
L362:
  movzbl -0x1(%rax),%eax
  or     %rcx,%rax
  jmp    L115
  nopl   0x0(%rax,%rax,1)
L320:
  movzbl -0x1(%rax),%esi
  lea    -0x1(%rax),%rcx
  shl    $0x10,%rsi
L466:
  lea    -0x1(%rcx),%rax
  movzbl -0x1(%rcx),%ecx
  shl    $0x8,%rcx
  or     %rsi,%rcx
  jmp    L362
  nopl   (%rax)
L316:
  mov    %rbp,%rax
  jmp    L417
  nopl   0x0(%rax,%rax,1)
L230:
  movslq %edi,%rcx
  add    %ebx,%eax
  add    %rbx,%rcx
  mov    %eax,0x8(%r12)
  cmp    $0x3,%rcx
  ja     L565
  mov    (%r8),%rax
  cmp    $0x1,%edi
  je     L92
  cmp    $0x2,%edi
  je     L266
  test   %edi,%edi
  je     L73
L393:
  mov    %rax,(%r8)
  jmp    L330
  nopl   0x0(%rax,%rax,1)
L154:
  mov    %rax,%rcx
  xor    %esi,%esi
  jmp    L466
  nopw   0x0(%rax,%rax,1)
L565:
  mov    %eax,%r11d
  and    $0x3,%eax
  sar    $0x2,%r11d
  test   %edi,%edi
  je     L382
  mov    (%r8),%r13
  cmp    $0x2,%edi
  je     L486
  cmp    $0x3,%edi
  je     L370
  cmp    $0x1,%edi
  je     L240
L382:
  movzbl 0x0(%rbp),%r13d
  add    $0x1,%rbp
L240:
  movzbl 0x0(%rbp),%edi
  lea    0x1(%rbp),%rcx
  shl    $0x8,%rdi
  or     %rdi,%r13
L388:
  lea    0x1(%rcx),%rbp
  movzbl (%rcx),%ecx
  shl    $0x10,%rcx
  or     %rcx,%r13
L370:
  movzbl 0x0(%rbp),%ecx
  lea    0x1(%r10),%r12d
  lea    0x1(%rbp),%rbx
  shl    $0x18,%rcx
  or     %r13,%rcx
  mov    %rcx,(%r8)
  cmp    %r12d,%r11d
  jle    L395
  mov    %r11d,%ecx
  lea    0x1(%r9),%rdi
  sub    %r10d,%ecx
  lea    -0x1(%rcx),%r13d
  lea    -0x2(%rcx),%r8d
  lea    0x8(%rsi,%rdx,1),%rcx
  lea    (%rdi,%r13,1),%rdx
  mov    %r13,%r10
  lea    (%rsi,%rdx,8),%rdx
  lea    0x1(%rbp,%r13,4),%r13
  cmp    %rdx,%rbx
  setae  %dl
  cmp    %r13,%rcx
  setae  %r13b
  or     %r13b,%dl
  je     L559
  cmp    $0x2,%r8d
  jbe    L559
  mov    %r10d,%edi
  xor    %edx,%edx
  pxor   %xmm1,%xmm1
  shr    $0x2,%edi
  shl    $0x4,%rdi
L638:
  movdqu 0x1(%rbp,%rdx,1),%xmm0
  movdqa %xmm0,%xmm2
  punpckhdq %xmm1,%xmm0
  punpckldq %xmm1,%xmm2
  movups %xmm0,0x10(%rcx,%rdx,2)
  movups %xmm2,(%rcx,%rdx,2)
  add    $0x10,%rdx
  cmp    %rdx,%rdi
  jne    L638
  mov    %r10d,%edx
  and    $0xfffffffc,%edx
  mov    %edx,%ecx
  add    %edx,%r12d
  lea    (%rbx,%rcx,4),%rcx
  cmp    %r10d,%edx
  je     L541
  mov    (%rcx),%edi
  movslq %r12d,%rdx
  mov    %rdi,(%rsi,%rdx,8)
  lea    0x1(%r12),%edx
  cmp    %edx,%r11d
  jle    L541
  mov    0x4(%rcx),%r15d
  movslq %edx,%rdx
  add    $0x2,%r12d
  lea    0x0(,%rdx,8),%rdi
  mov    %r15,(%rsi,%rdx,8)
  cmp    %r11d,%r12d
  jge    L541
  mov    0x8(%rcx),%edx
  mov    %rdx,0x8(%rsi,%rdi,1)
L541:
  mov    %r8d,%r8d
  lea    0x4(%rbx,%r8,4),%rbx
L123:
  test   %eax,%eax
  je     L330
  movslq %eax,%rdx
  add    %rdx,%rbx
  movzbl -0x1(%rbx),%ecx
  cmp    $0x2,%eax
  je     L11
  xor    %edx,%edx
  cmp    $0x3,%eax
  jne    L45
  sub    $0x1,%rbx
  shl    $0x10,%rcx
L392:
  movzbl -0x1(%rbx),%edx
  sub    $0x1,%rbx
  shl    $0x8,%rdx
  or     %rcx,%rdx
L45:
  movzbl -0x1(%rbx),%eax
  movslq %r11d,%r11
  or     %rdx,%rax
  mov    %rax,(%rsi,%r11,8)
  jmp    L330
  nopl   0x0(%rax,%rax,1)
L561:
  mov    %esi,%edi
  xor    %eax,%eax
  nopl   0x0(%rax)
L191:
  mov    0x0(%rbp,%rax,4),%ecx
  mov    %rcx,(%rdx,%rax,8)
  mov    %rax,%rcx
  add    $0x1,%rax
  cmp    %rdi,%rcx
  jne    L191
  jmp    L379
L52:
  mov    %r11,%rbp
  jmp    L375
L73:
  movzbl 0x0(%rbp),%eax
  sub    $0x1,%rbx
  je     L393
  add    $0x1,%rbp
L92:
  movzbl 0x0(%rbp),%edx
  shl    $0x8,%rdx
  or     %rdx,%rax
  cmp    $0x1,%rbx
  je     L393
  add    $0x1,%rbp
L266:
  movzbl 0x0(%rbp),%edx
  shl    $0x10,%rdx
  or     %rdx,%rax
  jmp    L393
  nopl   0x0(%rax)
L336:
  neg    %r9
  lea    0x0(%rbp,%r9,4),%rdx
  nopl   0x0(%rax,%rax,1)
L175:
  mov    -0x3(%rdx,%rax,4),%edi
  mov    %rdi,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%r8d
  jg     L175
  jmp    L365
L486:
  mov    %rbp,%rcx
  jmp    L388
L559:
  neg    %r9
  lea    0x0(%rbp,%r9,4),%rdx
  cs nopw 0x0(%rax,%rax,1)
L539:
  mov    -0x3(%rdx,%rdi,4),%ecx
  mov    %rcx,(%rsi,%rdi,8)
  add    $0x1,%rdi
  cmp    %edi,%r11d
  jg     L539
  jmp    L541
L11:
  xor    %ecx,%ecx
  jmp    L392
L395:
  mov    %r12d,%r11d
  jmp    L123
```

assistant: ```c
int MD5_Update(MD5_CTX *c, const void *data_, unsigned long len) {
  const unsigned char *data = data_;
  register MD5_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) >= MD5_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 < MD5_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;
      }
      md5_block_host_order(c, p, 1);
      len -= (MD5_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 / MD5_CBLOCK;
  if (sw > 0) {
    {
      md5_block_data_order(c, data, sw);
      sw *= MD5_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;
}
```