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

```asm
<CAST_cbc_encrypt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %rcx,-0x70(%rbp)
  mov    %r8,-0x78(%rbp)
  mov    %r9d,-0x7c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    -0x68(%rbp),%r15
  cmpl   $0x0,-0x7c(%rbp)
  je     L59
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x18,%rax
  mov    %rax,%r13
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%rax
  or     %rax,%r13
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%rax
  or     %rax,%r13
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  or     %rax,%r13
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x18,%rax
  mov    %rax,%r14
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%rax
  or     %rax,%r14
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%rax
  or     %rax,%r14
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  or     %rax,%r14
  subq   $0x8,-0x78(%rbp)
  sub    $0x8,%r15
  jmp    L25
L42:
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x18,%rax
  mov    %rax,%r12
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%rax
  or     %rax,%r12
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%rax
  or     %rax,%r12
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  or     %rax,%r12
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x18,%rax
  mov    %rax,%rbx
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%rax
  or     %rax,%rbx
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%rax
  or     %rax,%rbx
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  or     %rax,%rbx
  xor    %r13,%r12
  xor    %r14,%rbx
  mov    %r12,-0x50(%rbp)
  mov    %rbx,-0x48(%rbp)
  mov    -0x70(%rbp),%rdx
  lea    -0x50(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <CAST_encrypt@plt>
  mov    -0x50(%rbp),%r13
  mov    -0x48(%rbp),%r14
  mov    %r13,%rcx
  shr    $0x18,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r13,%rcx
  shr    $0x10,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r13,%rcx
  shr    $0x8,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %r13d,%edx
  mov    %dl,(%rax)
  mov    %r14,%rcx
  shr    $0x18,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r14,%rcx
  shr    $0x10,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r14,%rcx
  shr    $0x8,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %r14d,%edx
  mov    %dl,(%rax)
  sub    $0x8,%r15
L25:
  test   %r15,%r15
  jns    L42
  cmp    $0xfffffffffffffff8,%r15
  je     L2
  mov    %r15,%rax
  add    $0x8,%rax
  add    %rax,-0x58(%rbp)
  mov    $0x0,%ebx
  mov    %rbx,%r12
  lea    0x8(%r15),%rax
  cmp    $0x8,%rax
  ja     L30
  lea    0x0(,%rax,4),%rdx
  lea    D39(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D39(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  subq   $0x1,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%ebx
  subq   $0x1,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%rax
  or     %rax,%rbx
  subq   $0x1,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%rax
  or     %rax,%rbx
  subq   $0x1,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x18,%rax
  or     %rax,%rbx
  subq   $0x1,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%r12d
  subq   $0x1,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%rax
  or     %rax,%r12
  subq   $0x1,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%rax
  or     %rax,%r12
  subq   $0x1,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x18,%rax
  or     %rax,%r12
L30:
  xor    %r13,%r12
  xor    %r14,%rbx
  mov    %r12,-0x50(%rbp)
  mov    %rbx,-0x48(%rbp)
  mov    -0x70(%rbp),%rdx
  lea    -0x50(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <CAST_encrypt@plt>
  mov    -0x50(%rbp),%r13
  mov    -0x48(%rbp),%r14
  mov    %r13,%rcx
  shr    $0x18,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r13,%rcx
  shr    $0x10,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r13,%rcx
  shr    $0x8,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %r13d,%edx
  mov    %dl,(%rax)
  mov    %r14,%rcx
  shr    $0x18,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r14,%rcx
  shr    $0x10,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r14,%rcx
  shr    $0x8,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %r14d,%edx
  mov    %dl,(%rax)
L2:
  mov    %r13,%rcx
  shr    $0x18,%rcx
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r13,%rcx
  shr    $0x10,%rcx
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r13,%rcx
  shr    $0x8,%rcx
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    %r13d,%edx
  mov    %dl,(%rax)
  mov    %r14,%rcx
  shr    $0x18,%rcx
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r14,%rcx
  shr    $0x10,%rcx
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r14,%rcx
  shr    $0x8,%rcx
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    %r14d,%edx
  mov    %dl,(%rax)
  jmp    L71
L59:
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x18,%rax
  mov    %rax,%r13
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%rax
  or     %rax,%r13
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%rax
  or     %rax,%r13
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  or     %rax,%r13
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x18,%rax
  mov    %rax,%r14
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%rax
  or     %rax,%r14
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%rax
  or     %rax,%r14
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  or     %rax,%r14
  subq   $0x8,-0x78(%rbp)
  sub    $0x8,%r15
  jmp    L65
L17:
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x18,%rax
  mov    %rax,%r12
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%rax
  or     %rax,%r12
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%rax
  or     %rax,%r12
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  or     %rax,%r12
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x18,%rax
  mov    %rax,%rbx
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%rax
  or     %rax,%rbx
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%rax
  or     %rax,%rbx
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  or     %rax,%rbx
  mov    %r12,-0x50(%rbp)
  mov    %rbx,-0x48(%rbp)
  mov    -0x70(%rbp),%rdx
  lea    -0x50(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <CAST_decrypt@plt>
  mov    -0x50(%rbp),%rax
  xor    %rax,%r13
  mov    -0x48(%rbp),%rax
  xor    %rax,%r14
  mov    %r13,%rcx
  shr    $0x18,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r13,%rcx
  shr    $0x10,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r13,%rcx
  shr    $0x8,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %r13d,%edx
  mov    %dl,(%rax)
  mov    %r14,%rcx
  shr    $0x18,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r14,%rcx
  shr    $0x10,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r14,%rcx
  shr    $0x8,%rcx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %r14d,%edx
  mov    %dl,(%rax)
  mov    %r12,%r13
  mov    %rbx,%r14
  sub    $0x8,%r15
L65:
  test   %r15,%r15
  jns    L17
  cmp    $0xfffffffffffffff8,%r15
  je     L99
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x18,%rax
  mov    %rax,%r12
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%rax
  or     %rax,%r12
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%rax
  or     %rax,%r12
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  or     %rax,%r12
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x18,%rax
  mov    %rax,%rbx
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%rax
  or     %rax,%rbx
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%rax
  or     %rax,%rbx
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  or     %rax,%rbx
  mov    %r12,-0x50(%rbp)
  mov    %rbx,-0x48(%rbp)
  mov    -0x70(%rbp),%rdx
  lea    -0x50(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <CAST_decrypt@plt>
  mov    -0x50(%rbp),%rax
  xor    %rax,%r13
  mov    -0x48(%rbp),%rax
  xor    %rax,%r14
  mov    %r15,%rax
  add    $0x8,%rax
  add    %rax,-0x60(%rbp)
  lea    0x8(%r15),%rax
  cmp    $0x8,%rax
  ja     L45
  lea    0x0(,%rax,4),%rdx
  lea    D34(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D34(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  subq   $0x1,-0x60(%rbp)
  mov    %r14d,%edx
  mov    -0x60(%rbp),%rax
  mov    %dl,(%rax)
  mov    %r14,%rax
  shr    $0x8,%rax
  subq   $0x1,-0x60(%rbp)
  mov    %eax,%edx
  mov    -0x60(%rbp),%rax
  mov    %dl,(%rax)
  mov    %r14,%rax
  shr    $0x10,%rax
  subq   $0x1,-0x60(%rbp)
  mov    %eax,%edx
  mov    -0x60(%rbp),%rax
  mov    %dl,(%rax)
  mov    %r14,%rax
  shr    $0x18,%rax
  subq   $0x1,-0x60(%rbp)
  mov    %eax,%edx
  mov    -0x60(%rbp),%rax
  mov    %dl,(%rax)
  subq   $0x1,-0x60(%rbp)
  mov    %r13d,%edx
  mov    -0x60(%rbp),%rax
  mov    %dl,(%rax)
  mov    %r13,%rax
  shr    $0x8,%rax
  subq   $0x1,-0x60(%rbp)
  mov    %eax,%edx
  mov    -0x60(%rbp),%rax
  mov    %dl,(%rax)
  mov    %r13,%rax
  shr    $0x10,%rax
  subq   $0x1,-0x60(%rbp)
  mov    %eax,%edx
  mov    -0x60(%rbp),%rax
  mov    %dl,(%rax)
  mov    %r13,%rax
  shr    $0x18,%rax
  subq   $0x1,-0x60(%rbp)
  mov    %eax,%edx
  mov    -0x60(%rbp),%rax
  mov    %dl,(%rax)
L45:
  mov    %r12,%r13
  mov    %rbx,%r14
L99:
  mov    %r13,%rcx
  shr    $0x18,%rcx
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r13,%rcx
  shr    $0x10,%rcx
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r13,%rcx
  shr    $0x8,%rcx
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    %r13d,%edx
  mov    %dl,(%rax)
  mov    %r14,%rcx
  shr    $0x18,%rcx
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r14,%rcx
  shr    $0x10,%rcx
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    %r14,%rcx
  shr    $0x8,%rcx
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    %r14d,%edx
  mov    %dl,(%rax)
L71:
  movq   $0x0,-0x48(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x50(%rbp)
  nop
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L88
  call   <__stack_chk_fail@plt>
L88:
  add    $0x58,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, const CAST_KEY *ks, unsigned char *iv, int enc) {
  register CAST_LONG tin0, tin1;
  register CAST_LONG tout0, tout1, xor0, xor1;
  register long l = length;
  CAST_LONG tin[2];
  if (enc) {
    (tout0 = ((unsigned long)(*((iv)++))) << 24L, tout0 |= ((unsigned long)(*((iv)++))) << 16L, tout0 |= ((unsigned long)(*((iv)++))) << 8L, tout0 |= ((unsigned long)(*((iv)++))));
    (tout1 = ((unsigned long)(*((iv)++))) << 24L, tout1 |= ((unsigned long)(*((iv)++))) << 16L, tout1 |= ((unsigned long)(*((iv)++))) << 8L, tout1 |= ((unsigned long)(*((iv)++))));
    iv -= 8;
    for (l -= 8; l >= 0; l -= 8) {
      (tin0 = ((unsigned long)(*((in)++))) << 24L, tin0 |= ((unsigned long)(*((in)++))) << 16L, tin0 |= ((unsigned long)(*((in)++))) << 8L, tin0 |= ((unsigned long)(*((in)++))));
      (tin1 = ((unsigned long)(*((in)++))) << 24L, tin1 |= ((unsigned long)(*((in)++))) << 16L, tin1 |= ((unsigned long)(*((in)++))) << 8L, tin1 |= ((unsigned long)(*((in)++))));
      tin0 ^= tout0;
      tin1 ^= tout1;
      tin[0] = tin0;
      tin[1] = tin1;
      CAST_encrypt(tin, ks);
      tout0 = tin[0];
      tout1 = tin[1];
      (*((out)++) = (unsigned char)(((tout0) >> 24L) & 0xff), *((out)++) = (unsigned char)(((tout0) >> 16L) & 0xff), *((out)++) = (unsigned char)(((tout0) >> 8L) & 0xff), *((out)++) = (unsigned char)(((tout0)) & 0xff));
      (*((out)++) = (unsigned char)(((tout1) >> 24L) & 0xff), *((out)++) = (unsigned char)(((tout1) >> 16L) & 0xff), *((out)++) = (unsigned char)(((tout1) >> 8L) & 0xff), *((out)++) = (unsigned char)(((tout1)) & 0xff));
    }
    if (l != -8) {
      {
        in += l + 8;
        tin0 = tin1 = 0;
        switch (l + 8) {
        case 8:
          tin1 = ((unsigned long)(*(--(in))));
        case 7:
          tin1 |= ((unsigned long)(*(--(in)))) << 8;
        case 6:
          tin1 |= ((unsigned long)(*(--(in)))) << 16;
        case 5:
          tin1 |= ((unsigned long)(*(--(in)))) << 24;
        case 4:
          tin0 = ((unsigned long)(*(--(in))));
        case 3:
          tin0 |= ((unsigned long)(*(--(in)))) << 8;
        case 2:
          tin0 |= ((unsigned long)(*(--(in)))) << 16;
        case 1:
          tin0 |= ((unsigned long)(*(--(in)))) << 24;
        }
      };
      tin0 ^= tout0;
      tin1 ^= tout1;
      tin[0] = tin0;
      tin[1] = tin1;
      CAST_encrypt(tin, ks);
      tout0 = tin[0];
      tout1 = tin[1];
      (*((out)++) = (unsigned char)(((tout0) >> 24L) & 0xff), *((out)++) = (unsigned char)(((tout0) >> 16L) & 0xff), *((out)++) = (unsigned char)(((tout0) >> 8L) & 0xff), *((out)++) = (unsigned char)(((tout0)) & 0xff));
      (*((out)++) = (unsigned char)(((tout1) >> 24L) & 0xff), *((out)++) = (unsigned char)(((tout1) >> 16L) & 0xff), *((out)++) = (unsigned char)(((tout1) >> 8L) & 0xff), *((out)++) = (unsigned char)(((tout1)) & 0xff));
    }
    (*((iv)++) = (unsigned char)(((tout0) >> 24L) & 0xff), *((iv)++) = (unsigned char)(((tout0) >> 16L) & 0xff), *((iv)++) = (unsigned char)(((tout0) >> 8L) & 0xff), *((iv)++) = (unsigned char)(((tout0)) & 0xff));
    (*((iv)++) = (unsigned char)(((tout1) >> 24L) & 0xff), *((iv)++) = (unsigned char)(((tout1) >> 16L) & 0xff), *((iv)++) = (unsigned char)(((tout1) >> 8L) & 0xff), *((iv)++) = (unsigned char)(((tout1)) & 0xff));
  } else {
    (xor0 = ((unsigned long)(*((iv)++))) << 24L, xor0 |= ((unsigned long)(*((iv)++))) << 16L, xor0 |= ((unsigned long)(*((iv)++))) << 8L, xor0 |= ((unsigned long)(*((iv)++))));
    (xor1 = ((unsigned long)(*((iv)++))) << 24L, xor1 |= ((unsigned long)(*((iv)++))) << 16L, xor1 |= ((unsigned long)(*((iv)++))) << 8L, xor1 |= ((unsigned long)(*((iv)++))));
    iv -= 8;
    for (l -= 8; l >= 0; l -= 8) {
      (tin0 = ((unsigned long)(*((in)++))) << 24L, tin0 |= ((unsigned long)(*((in)++))) << 16L, tin0 |= ((unsigned long)(*((in)++))) << 8L, tin0 |= ((unsigned long)(*((in)++))));
      (tin1 = ((unsigned long)(*((in)++))) << 24L, tin1 |= ((unsigned long)(*((in)++))) << 16L, tin1 |= ((unsigned long)(*((in)++))) << 8L, tin1 |= ((unsigned long)(*((in)++))));
      tin[0] = tin0;
      tin[1] = tin1;
      CAST_decrypt(tin, ks);
      tout0 = tin[0] ^ xor0;
      tout1 = tin[1] ^ xor1;
      (*((out)++) = (unsigned char)(((tout0) >> 24L) & 0xff), *((out)++) = (unsigned char)(((tout0) >> 16L) & 0xff), *((out)++) = (unsigned char)(((tout0) >> 8L) & 0xff), *((out)++) = (unsigned char)(((tout0)) & 0xff));
      (*((out)++) = (unsigned char)(((tout1) >> 24L) & 0xff), *((out)++) = (unsigned char)(((tout1) >> 16L) & 0xff), *((out)++) = (unsigned char)(((tout1) >> 8L) & 0xff), *((out)++) = (unsigned char)(((tout1)) & 0xff));
      xor0 = tin0;
      xor1 = tin1;
    }
    if (l != -8) {
      (tin0 = ((unsigned long)(*((in)++))) << 24L, tin0 |= ((unsigned long)(*((in)++))) << 16L, tin0 |= ((unsigned long)(*((in)++))) << 8L, tin0 |= ((unsigned long)(*((in)++))));
      (tin1 = ((unsigned long)(*((in)++))) << 24L, tin1 |= ((unsigned long)(*((in)++))) << 16L, tin1 |= ((unsigned long)(*((in)++))) << 8L, tin1 |= ((unsigned long)(*((in)++))));
      tin[0] = tin0;
      tin[1] = tin1;
      CAST_decrypt(tin, ks);
      tout0 = tin[0] ^ xor0;
      tout1 = tin[1] ^ xor1;
      {
        out += l + 8;
        switch (l + 8) {
        case 8:
          *(--(out)) = (unsigned char)(((tout1)) & 0xff);
        case 7:
          *(--(out)) = (unsigned char)(((tout1) >> 8) & 0xff);
        case 6:
          *(--(out)) = (unsigned char)(((tout1) >> 16) & 0xff);
        case 5:
          *(--(out)) = (unsigned char)(((tout1) >> 24) & 0xff);
        case 4:
          *(--(out)) = (unsigned char)(((tout0)) & 0xff);
        case 3:
          *(--(out)) = (unsigned char)(((tout0) >> 8) & 0xff);
        case 2:
          *(--(out)) = (unsigned char)(((tout0) >> 16) & 0xff);
        case 1:
          *(--(out)) = (unsigned char)(((tout0) >> 24) & 0xff);
        }
      };
      xor0 = tin0;
      xor1 = tin1;
    }
    (*((iv)++) = (unsigned char)(((xor0) >> 24L) & 0xff), *((iv)++) = (unsigned char)(((xor0) >> 16L) & 0xff), *((iv)++) = (unsigned char)(((xor0) >> 8L) & 0xff), *((iv)++) = (unsigned char)(((xor0)) & 0xff));
    (*((iv)++) = (unsigned char)(((xor1) >> 24L) & 0xff), *((iv)++) = (unsigned char)(((xor1) >> 16L) & 0xff), *((iv)++) = (unsigned char)(((xor1) >> 8L) & 0xff), *((iv)++) = (unsigned char)(((xor1)) & 0xff));
  }
  tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0;
  tin[0] = tin[1] = 0;
}
```