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

```asm
<_shiftL>:
  endbr64
  push   %rbx
  mov    %rsi,%r8
  mov    %edx,%esi
  and    $0x7,%edx
  shr    $0x3,%sil
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  movzbl %sil,%eax
  test   %sil,%sil
  je     L91
  lea    -0x1(%rax),%r10d
  mov    %rdi,%r9
  movzbl %sil,%ecx
  xor    %ebx,%ebx
  sub    %r10,%r9
  add    $0x7,%r9
  cmp    $0x8,%ecx
  jb     L195
  lea    0x8(%r9),%r10
  movq   $0x0,(%r9)
  movq   $0x0,-0x8(%rcx,%r9,1)
  and    $0xfffffffffffffff8,%r10
  sub    %r10,%r9
  add    %r9d,%ecx
  and    $0xfffffff8,%ecx
  cmp    $0x8,%ecx
  jb     L106
  and    $0xfffffff8,%ecx
  xor    %r9d,%r9d
L172:
  mov    %r9d,%r11d
  add    $0x8,%r9d
  mov    %rbx,(%r10,%r11,1)
  cmp    %ecx,%r9d
  jb     L172
L106:
  cmp    $0x7,%sil
  ja     L146
L91:
  mov    $0x7,%ecx
  movzbl 0x7(%r8),%r10d
  mov    %ecx,%r9d
  sub    %eax,%r9d
  movslq %r9d,%r9
  mov    %r10b,(%rdi,%r9,1)
  lea    0x1(%rax),%r10d
  cmp    $0x7,%eax
  je     L58
  mov    %ecx,%r9d
  sub    %r10d,%r9d
  lea    (%rax,%r9,1),%r11d
  movslq %r9d,%r9
  movslq %r11d,%r11
  movzbl (%r8,%r11,1),%r11d
  mov    %r11b,(%rdi,%r9,1)
  lea    0x2(%rax),%r11d
  cmp    $0x6,%eax
  je     L58
  mov    %ecx,%r9d
  sub    %r11d,%r9d
  lea    (%rax,%r9,1),%r11d
  movslq %r9d,%r9
  movslq %r11d,%r11
  movzbl (%r8,%r11,1),%r11d
  mov    %r11b,(%rdi,%r9,1)
  lea    0x3(%rax),%r11d
  cmp    $0x5,%eax
  je     L58
  mov    %ecx,%r9d
  sub    %r11d,%r9d
  lea    (%rax,%r9,1),%r11d
  movslq %r9d,%r9
  movslq %r11d,%r11
  movzbl (%r8,%r11,1),%r11d
  mov    %r11b,(%rdi,%r9,1)
  lea    0x4(%rax),%r11d
  cmp    $0x4,%eax
  je     L58
  mov    %ecx,%r9d
  sub    %r11d,%r9d
  lea    (%rax,%r9,1),%r11d
  movslq %r9d,%r9
  movslq %r11d,%r11
  movzbl (%r8,%r11,1),%r11d
  mov    %r11b,(%rdi,%r9,1)
  lea    0x5(%rax),%r11d
  cmp    $0x3,%eax
  je     L58
  mov    %ecx,%r9d
  sub    %r11d,%r9d
  lea    (%rax,%r9,1),%r11d
  movslq %r9d,%r9
  movslq %r11d,%r11
  movzbl (%r8,%r11,1),%r11d
  mov    %r11b,(%rdi,%r9,1)
  lea    0x6(%rax),%r11d
  cmp    $0x2,%eax
  je     L58
  sub    %r11d,%ecx
  lea    (%rax,%rcx,1),%r9d
  movslq %ecx,%rcx
  movslq %r9d,%r9
  movzbl (%r8,%r9,1),%r9d
  mov    %r9b,(%rdi,%rcx,1)
  cmp    $0x6,%r11d
  jne    L58
  movzbl %sil,%esi
  movzbl (%r8,%rsi,1),%ecx
  mov    %cl,(%rdi)
L58:
  mov    (%rdi),%rcx
  mov    %rcx,(%rsp)
  test   %dl,%dl
  je     L146
  mov    $0x7,%esi
  mov    %edx,%ecx
  movzbl %dl,%ebx
  mov    %esi,%r8d
  sub    %eax,%r8d
  movslq %r8d,%r8
  movzbl (%rsp,%r8,1),%r9d
  shl    %cl,%r9d
  mov    %r9b,(%rdi,%r8,1)
  cmp    $0x8,%r10d
  je     L146
  mov    $0x8,%r8d
  mov    %esi,%ecx
  sub    %r10d,%ecx
  mov    %r8d,%r11d
  sub    %ebx,%r11d
  movslq %ecx,%rbx
  mov    %r8d,%ecx
  sub    %r10d,%ecx
  movzbl (%rsp,%rbx,1),%r10d
  movslq %ecx,%rcx
  movzbl (%rsp,%rcx,1),%r9d
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %edx,%ecx
  shl    %cl,%r10d
  or     %r10d,%r9d
  mov    %r9b,(%rdi,%rbx,1)
  lea    0x2(%rax),%r9d
  cmp    $0x6,%eax
  je     L146
  mov    %r8d,%ecx
  mov    %esi,%r10d
  sub    %r9d,%ecx
  sub    %r9d,%r10d
  movslq %ecx,%rcx
  movslq %r10d,%r10
  movzbl (%rsp,%rcx,1),%r9d
  movzbl (%rsp,%r10,1),%ebx
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %edx,%ecx
  shl    %cl,%ebx
  or     %ebx,%r9d
  mov    %r9b,(%rdi,%r10,1)
  lea    0x3(%rax),%r9d
  cmp    $0x5,%eax
  je     L146
  mov    %r8d,%ecx
  mov    %esi,%r10d
  sub    %r9d,%ecx
  sub    %r9d,%r10d
  movslq %ecx,%rcx
  movslq %r10d,%r10
  movzbl (%rsp,%rcx,1),%r9d
  movzbl (%rsp,%r10,1),%ebx
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %edx,%ecx
  shl    %cl,%ebx
  or     %ebx,%r9d
  mov    %r9b,(%rdi,%r10,1)
  lea    0x4(%rax),%r9d
  cmp    $0x4,%eax
  je     L146
  mov    %r8d,%ecx
  mov    %esi,%r10d
  sub    %r9d,%ecx
  sub    %r9d,%r10d
  movslq %ecx,%rcx
  movslq %r10d,%r10
  movzbl (%rsp,%rcx,1),%r9d
  movzbl (%rsp,%r10,1),%ebx
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %edx,%ecx
  shl    %cl,%ebx
  or     %ebx,%r9d
  mov    %r9b,(%rdi,%r10,1)
  lea    0x5(%rax),%r9d
  cmp    $0x3,%eax
  je     L146
  mov    %r8d,%ecx
  mov    %esi,%r10d
  sub    %r9d,%ecx
  sub    %r9d,%r10d
  movslq %ecx,%rcx
  movslq %r10d,%r10
  movzbl (%rsp,%rcx,1),%r9d
  movzbl (%rsp,%r10,1),%ebx
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %edx,%ecx
  shl    %cl,%ebx
  or     %ebx,%r9d
  mov    %r9b,(%rdi,%r10,1)
  lea    0x6(%rax),%r9d
  cmp    $0x2,%eax
  je     L146
  sub    %r9d,%r8d
  sub    %r9d,%esi
  mov    %r11d,%ecx
  movslq %r8d,%r8
  movslq %esi,%rsi
  movzbl (%rsp,%r8,1),%r8d
  movzbl (%rsp,%rsi,1),%r10d
  sar    %cl,%r8d
  mov    %edx,%ecx
  shl    %cl,%r10d
  or     %r10d,%r8d
  mov    %r8b,(%rdi,%rsi,1)
  cmp    $0x6,%r9d
  jne    L146
  cmp    $0x7,%eax
  movzbl (%rsp),%eax
  je     L235
  movzbl 0x1(%rsp),%edx
  shl    %cl,%eax
  mov    %r11d,%ecx
  sar    %cl,%edx
  or     %edx,%eax
  mov    %al,(%rdi)
  nopw   0x0(%rax,%rax,1)
L146:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L17
  add    $0x10,%rsp
  pop    %rbx
  ret
  cs nopw 0x0(%rax,%rax,1)
L195:
  test   $0x4,%cl
  jne    L261
  test   %ecx,%ecx
  je     L106
  movb   $0x0,(%r9)
  test   $0x2,%cl
  je     L106
  xor    %r10d,%r10d
  mov    %r10w,-0x2(%rcx,%r9,1)
  jmp    L106
L235:
  shl    %cl,%eax
  mov    %al,(%rdi)
  jmp    L146
L261:
  movl   $0x0,(%r9)
  movl   $0x0,-0x4(%rcx,%r9,1)
  jmp    L106
L17:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void _shiftL(unsigned char ans[8], unsigned char x[8], unsigned char r) {
  int i;
  int shiftbytes = r / 8;
  int shiftbits = r % 8;
  unsigned char temp[8];
  for (i = 0; i < shiftbytes; i++) {
    ans[7 - i] = 0;
  }
  for (i = shiftbytes; i < 8; i++) {
    ans[7 - i] = x[7 - i + shiftbytes];
  }
  for (i = 0; i < 8; i++) {
    temp[i] = ans[i];
  }
  if (shiftbits > 0) {
    for (i = shiftbytes; i < 8; i++) {
      if (i == shiftbytes) {
        ans[7 - i] = (temp[7 - i] << shiftbits);
      } else {
        ans[7 - i] = (temp[7 - i] << shiftbits) | (temp[8 - i] >> (8 - shiftbits));
      }
    }
  }
}
```