user: Translate the below assembly code into C programming language:

```asm
<cBytesLshiftfromlentolen>:
  endbr64
  mov    %edi,%eax
  push   %r15
  mov    %rcx,%r9
  mov    %edi,%ecx
  push   %r14
  sar    $0x1f,%eax
  mov    %edi,%r14d
  mov    %r8d,%r15d
  push   %r13
  shr    $0x1d,%eax
  sar    $0x3,%r14d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  lea    (%rdi,%rax,1),%ebp
  push   %rbx
  and    $0x7,%ebp
  sub    %eax,%ebp
  sub    $0x18,%rsp
  mov    %edx,0xc(%rsp)
  and    $0x7,%ecx
  je     L51
  mov    %edi,%ebx
  test   %ebp,%ebp
  jle    L99
  mov    $0xff,%r13d
  shr    %cl,%r13d
L81:
  test   %r14d,%r14d
  jle    L93
  mov    %r9,%rdi
  movslq %r14d,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  mov    %rax,%r9
L93:
  sub    %r14d,%r15d
  xor    %eax,%eax
  mov    %r15d,0x8(%rsp)
  cmp    $0x1,%r15d
  jle    L87
  mov    $0x8,%r10d
  lea    -0x2(%r15),%r15d
  sub    %ebp,%r10d
  test   %ebp,%ebp
  js     L30
  movslq %r14d,%rdx
  mov    %ebx,%r11d
  xor    %edi,%edi
  xor    %eax,%eax
  add    %r9,%rdx
  and    $0x7,%r11d
  nop
L65:
  movzbl (%r12,%rdi,1),%r8d
  mov    %r11d,%ecx
  mov    %r8d,%esi
  and    %r13d,%esi
  shl    %cl,%esi
  mov    %r10d,%ecx
  or     %eax,%esi
  mov    %r8d,%eax
  shr    %cl,%eax
  mov    %rdi,%rcx
  mov    %sil,(%rdx,%rdi,1)
  add    $0x1,%rdi
  cmp    %rcx,%r15
  jne    L65
L87:
  mov    0x8(%rsp),%edi
  xor    %esi,%esi
  sub    $0x1,%edi
  cmp    0xc(%rsp),%edi
  jge    L73
  movslq %edi,%rdx
  movzbl (%r12,%rdx,1),%esi
  and    %r13d,%esi
L73:
  and    $0x7,%ebx
  mov    %esi,%edx
  mov    %ebx,%ecx
  shl    %cl,%edx
  mov    %ebp,%ecx
  neg    %ecx
  shr    %cl,%esi
  test   %ebp,%ebp
  cmovs  %esi,%edx
  add    %edi,%r14d
  movslq %r14d,%r14
  or     %eax,%edx
  mov    %dl,(%r9,%r14,1)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L99:
  mov    %ebp,%ecx
  mov    $0xff,%r13d
  neg    %ecx
  shl    %cl,%r13d
  jmp    L81
  nopw   0x0(%rax,%rax,1)
L30:
  movslq %r14d,%rdx
  mov    %ebp,%r11d
  xor    %esi,%esi
  xor    %eax,%eax
  lea    (%r9,%rdx,1),%rdi
  neg    %r11d
  nopl   0x0(%rax)
L95:
  movzbl (%r12,%rsi,1),%r8d
  mov    %r11d,%ecx
  mov    %r8d,%edx
  and    %r13d,%edx
  shr    %cl,%edx
  mov    %r10d,%ecx
  or     %eax,%edx
  mov    %r8d,%eax
  mov    %dl,(%rdi,%rsi,1)
  mov    %rsi,%rdx
  shr    %cl,%eax
  add    $0x1,%rsi
  cmp    %rdx,%r15
  jne    L95
  jmp    L87
  cs nopw 0x0(%rax,%rax,1)
L51:
  add    $0x18,%rsp
  lea    -0x1(%r8),%edx
  mov    %rsi,%rcx
  xor    %r8d,%r8d
  pop    %rbx
  mov    %r14d,%esi
  pop    %rbp
  mov    %r9,%rdi
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <cBytesReplacefromtowithstartingAt@plt>
```

assistant: ```c
int cBytesLshiftfromlentolen(int shiftCount, unsigned char *pFrom, int lenFrom, unsigned char *pTo, int lenTo) {
  int limit;
  int lastIx;
  int i;
  int carry;
  int byteShift;
  int rShift;
  int mask;
  int digit;
  int bitShift;
  byteShift = ((int)shiftCount >> 3);
  bitShift = shiftCount % 8;
  if (bitShift == 0) {
    return cBytesReplacefromtowithstartingAt(pTo, byteShift, lenTo - 1, pFrom, 0);
  }
  carry = 0;
  rShift = bitShift - 8;
  mask = (((0 - bitShift) < 0) ? ((unsigned)255 >> -(0 - bitShift)) : ((unsigned)255 << (0 - bitShift)));
  limit = byteShift - 1;
  for (i = 0; i <= limit; i += 1) {
    pTo[i] = 0;
  }
  limit = (lenTo - byteShift) - 2;
  ;
l1:;
  for (i = 0; i <= limit; i += 1) {
    digit = pFrom[i];
    pTo[i + byteShift] = ((((bitShift < 0) ? ((unsigned)(digit & mask) >> -bitShift) : ((unsigned)(digit & mask) << bitShift))) | carry);
    carry = ((rShift < 0) ? ((unsigned)digit >> -rShift) : ((unsigned)digit << rShift));
  }
  lastIx = limit + 1;
  if (lastIx > (lenFrom - 1)) {
    digit = 0;
  } else {
    digit = pFrom[lastIx];
  }
  pTo[lastIx + byteShift] = ((((bitShift < 0) ? ((unsigned)(digit & mask) >> -bitShift) : ((unsigned)(digit & mask) << bitShift))) | carry);
  carry = ((rShift < 0) ? ((unsigned)digit >> -rShift) : ((unsigned)digit << rShift));
  ;
l2:;
}
```