user: What is the c source code of the assembly code below:

```asm
<rotate>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x4c(%rbp),%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  lea    0x0(,%rax,8),%edx
  mov    -0x4c(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x58(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %rax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  mov    %rax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  mov    %rax,%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L13:
  cmp    %rdx,%rsp
  je     L76
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L13
L76:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L70
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L70:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x58(%rbp),%rdx
  mov    -0x48(%rbp),%rcx
  mov    -0x20(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  movl   $0x0,-0x34(%rbp)
  jmp    L37
L71:
  mov    -0x34(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  cqto
  idivq  -0x58(%rbp)
  mov    %rdx,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x20(%rbp),%rdx
  mov    -0x34(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  mov    %al,(%rcx)
  addl   $0x1,-0x34(%rbp)
L37:
  mov    -0x34(%rbp),%eax
  cltq
  cmp    %rax,-0x58(%rbp)
  jg     L71
  mov    -0x58(%rbp),%rdx
  mov    -0x48(%rbp),%rcx
  mov    -0x20(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  movl   $0x1,-0x34(%rbp)
  jmp    L74
L28:
  mov    -0x34(%rbp),%eax
  sub    $0x1,%eax
  mov    -0x20(%rbp),%rdx
  cltq
  movzbl (%rdx,%rax,1),%eax
  movzbl %al,%edx
  mov    $0x8,%eax
  sub    -0x2c(%rbp),%eax
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,%esi
  mov    -0x20(%rbp),%rdx
  mov    -0x34(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  movzbl %al,%edx
  mov    -0x2c(%rbp),%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  or     %eax,%esi
  mov    %esi,%ecx
  mov    -0x34(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x34(%rbp)
L74:
  mov    -0x34(%rbp),%eax
  cltq
  cmp    %rax,-0x58(%rbp)
  jg     L28
  mov    -0x58(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movzbl (%rax,%rdx,1),%eax
  movzbl %al,%edx
  mov    $0x8,%eax
  sub    -0x2c(%rbp),%eax
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,%esi
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x2c(%rbp),%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  or     %esi,%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%rax
  mov    %dl,(%rax)
  mov    %rbx,%rsp
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L4
  call   <__stack_chk_fail@plt>
L4:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void rotate(unsigned char *a, int rot_amount, long long abytes) {
  int rot_bytes = rot_amount / 8;
  int rot_bits = rot_amount - (rot_bytes * 8);
  int i;
  unsigned char temp[abytes];
  memcpy(temp, a, abytes);
  for (i = 0; i < abytes; i++) {
    a[(i + rot_bytes) % abytes] = temp[i];
  }
  memcpy(temp, a, abytes);
  for (i = 1; i < abytes; i++) {
    a[i] = (temp[i - 1] << (8 - rot_bits)) | (temp[i] >> rot_bits);
  }
  a[0] = (temp[abytes - 1] << (8 - rot_bits)) | (temp[0] >> rot_bits);
}
```