user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<scrypt_core_r2_sidm>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0xa8,%rsp
  mov    %rdi,%rbx
  mov    %esi,-0xb4(%rbp)
  mov    %edx,%r13d
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %esi,%eax
  shl    $0x5,%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L48:
  cmp    %rdx,%rsp
  je     L44
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L48
L44:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L30
  orq    $0x0,-0x8(%rsp,%rdx,1)
L30:
  mov    %rsp,-0xc0(%rbp)
  lea    0x4(%rbx),%rax
  mov    %rax,-0x90(%rbp)
  lea    0x8(%rbx),%rax
  mov    %rax,-0x50(%rbp)
  lea    0xc(%rbx),%rax
  mov    %rax,-0x58(%rbp)
  lea    0x10(%rbx),%rax
  mov    %rax,-0x60(%rbp)
  lea    0x14(%rbx),%rax
  mov    %rax,-0x48(%rbp)
  lea    0x18(%rbx),%r15
  lea    0x1c(%rbx),%r14
  lea    0x20(%rbx),%rax
  mov    %rax,-0x98(%rbp)
  lea    0x24(%rbx),%rax
  mov    %rax,-0xa0(%rbp)
  lea    0x28(%rbx),%rax
  mov    %rax,-0xa8(%rbp)
  lea    0x2c(%rbx),%rax
  mov    %rax,-0xb0(%rbp)
  lea    0x30(%rbx),%rax
  mov    %rax,-0x68(%rbp)
  lea    0x34(%rbx),%rax
  mov    %rax,-0x70(%rbp)
  lea    0x38(%rbx),%rax
  mov    %rax,-0x78(%rbp)
  lea    0x3c(%rbx),%rax
  mov    %rax,-0x80(%rbp)
  mov    0x38(%rbx),%esi
  mov    0x30(%rbx),%edi
  mov    $0xf0,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,-0x88(%rbp)
  mov    0x3c(%rbx),%esi
  mov    0x34(%rbx),%edi
  mov    $0xf,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,-0xb8(%rbp)
  mov    0x30(%rbx),%esi
  mov    0x38(%rbx),%edi
  mov    $0xf0,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,-0xc4(%rbp)
  mov    0x34(%rbx),%esi
  mov    0x3c(%rbx),%edi
  mov    $0xf,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r12d
  mov    $0xcc,%edx
  mov    %eax,%esi
  mov    -0x88(%rbp),%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x30(%rbx)
  mov    $0xcc,%edx
  mov    -0x88(%rbp),%esi
  mov    -0xb8(%rbp),%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x34(%rbx)
  mov    $0xcc,%edx
  mov    -0xb8(%rbp),%esi
  mov    -0xc4(%rbp),%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x38(%rbx)
  mov    $0xcc,%edx
  mov    -0xc4(%rbp),%esi
  mov    %r12d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x3c(%rbx)
  mov    0x28(%rbx),%esi
  mov    0x20(%rbx),%edi
  mov    $0xf0,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,-0x88(%rbp)
  mov    0x2c(%rbx),%esi
  mov    0x24(%rbx),%edi
  mov    $0xf,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,-0xb8(%rbp)
  mov    0x20(%rbx),%esi
  mov    0x28(%rbx),%edi
  mov    $0xf0,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,-0xc4(%rbp)
  mov    0x24(%rbx),%esi
  mov    0x2c(%rbx),%edi
  mov    $0xf,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r12d
  mov    $0xcc,%edx
  mov    %eax,%esi
  mov    -0x88(%rbp),%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x20(%rbx)
  mov    $0xcc,%edx
  mov    -0x88(%rbp),%esi
  mov    -0xb8(%rbp),%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x24(%rbx)
  mov    $0xcc,%edx
  mov    -0xb8(%rbp),%esi
  mov    -0xc4(%rbp),%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x28(%rbx)
  mov    $0xcc,%edx
  mov    -0xc4(%rbp),%esi
  mov    %r12d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x2c(%rbx)
  mov    0x18(%rbx),%esi
  mov    0x10(%rbx),%edi
  mov    $0xf0,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,-0x88(%rbp)
  mov    0x1c(%rbx),%esi
  mov    0x14(%rbx),%edi
  mov    $0xf,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,-0xb8(%rbp)
  mov    0x10(%rbx),%esi
  mov    0x18(%rbx),%edi
  mov    $0xf0,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,-0xc4(%rbp)
  mov    0x14(%rbx),%esi
  mov    0x1c(%rbx),%edi
  mov    $0xf,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r12d
  mov    $0xcc,%edx
  mov    %eax,%esi
  mov    -0x88(%rbp),%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x10(%rbx)
  mov    $0xcc,%edx
  mov    -0x88(%rbp),%esi
  mov    -0xb8(%rbp),%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x14(%rbx)
  mov    $0xcc,%edx
  mov    -0xb8(%rbp),%esi
  mov    -0xc4(%rbp),%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x18(%rbx)
  mov    $0xcc,%edx
  mov    -0xc4(%rbp),%esi
  mov    %r12d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x1c(%rbx)
  mov    0x8(%rbx),%esi
  mov    $0xf0,%edx
  mov    (%rbx),%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,-0x88(%rbp)
  mov    0xc(%rbx),%esi
  mov    0x4(%rbx),%edi
  mov    $0xf,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,-0xb8(%rbp)
  mov    0x8(%rbx),%edi
  mov    $0xf0,%edx
  mov    (%rbx),%esi
  call   <_mm_blend_epi16@plt>
  mov    %eax,-0xc4(%rbp)
  mov    0x4(%rbx),%esi
  mov    0xc(%rbx),%edi
  mov    $0xf,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r12d
  mov    $0xcc,%edx
  mov    %eax,%esi
  mov    -0x88(%rbp),%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,(%rbx)
  mov    $0xcc,%edx
  mov    -0x88(%rbp),%esi
  mov    -0xb8(%rbp),%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x4(%rbx)
  mov    $0xcc,%edx
  mov    -0xb8(%rbp),%esi
  mov    -0xc4(%rbp),%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x8(%rbx)
  mov    $0xcc,%edx
  mov    -0xc4(%rbp),%esi
  mov    %r12d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0xc(%rbx)
  mov    -0xb4(%rbp),%eax
  test   %eax,%eax
  jle    L46
  mov    -0xc0(%rbp),%rcx
  mov    %rcx,%r12
  mov    %eax,%eax
  shl    $0x6,%rax
  add    %rcx,%rax
  mov    %rax,-0x88(%rbp)
L26:
  mov    (%rbx),%eax
  mov    %eax,(%r12)
  mov    0x4(%rbx),%eax
  mov    %eax,0x4(%r12)
  mov    0x8(%rbx),%eax
  mov    %eax,0x8(%r12)
  mov    0xc(%rbx),%eax
  mov    %eax,0xc(%r12)
  mov    0x10(%rbx),%eax
  mov    %eax,0x10(%r12)
  mov    0x14(%rbx),%eax
  mov    %eax,0x14(%r12)
  mov    0x18(%rbx),%eax
  mov    %eax,0x18(%r12)
  mov    0x1c(%rbx),%eax
  mov    %eax,0x1c(%r12)
  mov    0x20(%rbx),%eax
  mov    %eax,0x20(%r12)
  mov    0x24(%rbx),%eax
  mov    %eax,0x24(%r12)
  mov    0x28(%rbx),%eax
  mov    %eax,0x28(%r12)
  mov    0x2c(%rbx),%eax
  mov    %eax,0x2c(%r12)
  mov    0x30(%rbx),%eax
  mov    %eax,0x30(%r12)
  mov    0x34(%rbx),%eax
  mov    %eax,0x34(%r12)
  mov    0x38(%rbx),%eax
  mov    %eax,0x38(%r12)
  mov    0x3c(%rbx),%eax
  mov    %eax,0x3c(%r12)
  sub    $0x8,%rsp
  push   %r13
  push   -0x80(%rbp)
  push   -0x78(%rbp)
  mov    -0x70(%rbp),%r9
  mov    -0x68(%rbp),%r8
  mov    -0x58(%rbp),%rcx
  mov    -0x50(%rbp),%rdx
  mov    -0x90(%rbp),%rsi
  mov    %rbx,%rdi
  call   <xor_salsa_sidm@plt>
  add    $0x18,%rsp
  push   %r13
  push   -0x58(%rbp)
  push   -0x50(%rbp)
  mov    -0x90(%rbp),%r9
  mov    %rbx,%r8
  mov    %r14,%rcx
  mov    %r15,%rdx
  mov    -0x48(%rbp),%rsi
  mov    -0x60(%rbp),%rdi
  call   <xor_salsa_sidm@plt>
  add    $0x18,%rsp
  push   %r13
  push   %r14
  push   %r15
  mov    -0x48(%rbp),%r9
  mov    -0x60(%rbp),%r8
  mov    -0xb0(%rbp),%rcx
  mov    -0xa8(%rbp),%rdx
  mov    -0xa0(%rbp),%rsi
  mov    -0x98(%rbp),%rdi
  call   <xor_salsa_sidm_swap@plt>
  add    $0x18,%rsp
  push   %r13
  push   %r14
  push   %r15
  mov    -0x48(%rbp),%r9
  mov    -0x60(%rbp),%r8
  mov    -0x80(%rbp),%rcx
  mov    -0x78(%rbp),%rdx
  mov    -0x70(%rbp),%rsi
  mov    -0x68(%rbp),%rdi
  call   <xor_salsa_sidm@plt>
  add    $0x40,%r12
  add    $0x20,%rsp
  cmp    -0x88(%rbp),%r12
  jne    L26
  movl   $0x0,-0x88(%rbp)
  mov    -0xb4(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xb8(%rbp)
L10:
  mov    0x30(%rbx),%edi
  mov    $0x0,%esi
  call   <_mm_extract_epi16@plt>
  and    -0xb8(%rbp),%eax
  shl    $0x4,%eax
  cltq
  mov    -0xc0(%rbp),%rcx
  lea    (%rcx,%rax,4),%r12
  mov    (%r12),%esi
  mov    (%rbx),%edi
  call   <_mm_xor_si128@plt>
  mov    %eax,(%rbx)
  mov    0x4(%r12),%esi
  mov    0x4(%rbx),%edi
  call   <_mm_xor_si128@plt>
  mov    %eax,0x4(%rbx)
  mov    0x8(%r12),%esi
  mov    0x8(%rbx),%edi
  call   <_mm_xor_si128@plt>
  mov    %eax,0x8(%rbx)
  mov    0xc(%r12),%esi
  mov    0xc(%rbx),%edi
  call   <_mm_xor_si128@plt>
  mov    %eax,0xc(%rbx)
  mov    0x10(%r12),%esi
  mov    0x10(%rbx),%edi
  call   <_mm_xor_si128@plt>
  mov    %eax,0x10(%rbx)
  mov    0x14(%r12),%esi
  mov    0x14(%rbx),%edi
  call   <_mm_xor_si128@plt>
  mov    %eax,0x14(%rbx)
  mov    0x18(%r12),%esi
  mov    0x18(%rbx),%edi
  call   <_mm_xor_si128@plt>
  mov    %eax,0x18(%rbx)
  mov    0x1c(%r12),%esi
  mov    0x1c(%rbx),%edi
  call   <_mm_xor_si128@plt>
  mov    %eax,0x1c(%rbx)
  mov    0x20(%r12),%esi
  mov    0x20(%rbx),%edi
  call   <_mm_xor_si128@plt>
  mov    %eax,0x20(%rbx)
  mov    0x24(%r12),%esi
  mov    0x24(%rbx),%edi
  call   <_mm_xor_si128@plt>
  mov    %eax,0x24(%rbx)
  mov    0x28(%r12),%esi
  mov    0x28(%rbx),%edi
  call   <_mm_xor_si128@plt>
  mov    %eax,0x28(%rbx)
  mov    0x2c(%r12),%esi
  mov    0x2c(%rbx),%edi
  call   <_mm_xor_si128@plt>
  mov    %eax,0x2c(%rbx)
  mov    0x30(%r12),%esi
  mov    0x30(%rbx),%edi
  call   <_mm_xor_si128@plt>
  mov    %eax,0x30(%rbx)
  mov    0x34(%r12),%esi
  mov    0x34(%rbx),%edi
  call   <_mm_xor_si128@plt>
  mov    %eax,0x34(%rbx)
  mov    0x38(%r12),%esi
  mov    0x38(%rbx),%edi
  call   <_mm_xor_si128@plt>
  mov    %eax,0x38(%rbx)
  mov    0x3c(%r12),%esi
  mov    0x3c(%rbx),%edi
  call   <_mm_xor_si128@plt>
  mov    %eax,0x3c(%rbx)
  sub    $0x8,%rsp
  push   %r13
  push   -0x80(%rbp)
  push   -0x78(%rbp)
  mov    -0x70(%rbp),%r9
  mov    -0x68(%rbp),%r8
  mov    -0x58(%rbp),%rcx
  mov    -0x50(%rbp),%rdx
  mov    -0x90(%rbp),%r12
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <xor_salsa_sidm@plt>
  add    $0x18,%rsp
  push   %r13
  push   -0x58(%rbp)
  push   -0x50(%rbp)
  mov    %r12,%r9
  mov    %rbx,%r8
  mov    %r14,%rcx
  mov    %r15,%rdx
  mov    -0x48(%rbp),%rsi
  mov    -0x60(%rbp),%r12
  mov    %r12,%rdi
  call   <xor_salsa_sidm@plt>
  add    $0x18,%rsp
  push   %r13
  push   %r14
  push   %r15
  mov    -0x48(%rbp),%r9
  mov    %r12,%r8
  mov    -0xb0(%rbp),%rcx
  mov    -0xa8(%rbp),%rdx
  mov    -0xa0(%rbp),%rsi
  mov    -0x98(%rbp),%rdi
  call   <xor_salsa_sidm_swap@plt>
  add    $0x18,%rsp
  push   %r13
  push   %r14
  push   %r15
  mov    -0x48(%rbp),%r9
  mov    %r12,%r8
  mov    -0x80(%rbp),%rcx
  mov    -0x78(%rbp),%rdx
  mov    -0x70(%rbp),%rsi
  mov    -0x68(%rbp),%rdi
  call   <xor_salsa_sidm@plt>
  addl   $0x1,-0x88(%rbp)
  mov    -0x88(%rbp),%eax
  add    $0x20,%rsp
  cmp    %eax,-0xb4(%rbp)
  jne    L10
L46:
  mov    0x38(%rbx),%esi
  mov    0x30(%rbx),%edi
  mov    $0xf0,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r15d
  mov    0x3c(%rbx),%esi
  mov    0x34(%rbx),%edi
  mov    $0xf,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r14d
  mov    0x30(%rbx),%esi
  mov    0x38(%rbx),%edi
  mov    $0xf0,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r13d
  mov    0x34(%rbx),%esi
  mov    0x3c(%rbx),%edi
  mov    $0xf,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r12d
  mov    $0xcc,%edx
  mov    %eax,%esi
  mov    %r15d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x30(%rbx)
  mov    $0xcc,%edx
  mov    %r15d,%esi
  mov    %r14d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x34(%rbx)
  mov    $0xcc,%edx
  mov    %r14d,%esi
  mov    %r13d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x38(%rbx)
  mov    $0xcc,%edx
  mov    %r13d,%esi
  mov    %r12d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x3c(%rbx)
  mov    0x28(%rbx),%esi
  mov    0x20(%rbx),%edi
  mov    $0xf0,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r15d
  mov    0x2c(%rbx),%esi
  mov    0x24(%rbx),%edi
  mov    $0xf,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r14d
  mov    0x20(%rbx),%esi
  mov    0x28(%rbx),%edi
  mov    $0xf0,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r13d
  mov    0x24(%rbx),%esi
  mov    0x2c(%rbx),%edi
  mov    $0xf,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r12d
  mov    $0xcc,%edx
  mov    %eax,%esi
  mov    %r15d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x20(%rbx)
  mov    $0xcc,%edx
  mov    %r15d,%esi
  mov    %r14d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x24(%rbx)
  mov    $0xcc,%edx
  mov    %r14d,%esi
  mov    %r13d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x28(%rbx)
  mov    $0xcc,%edx
  mov    %r13d,%esi
  mov    %r12d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x2c(%rbx)
  mov    0x18(%rbx),%esi
  mov    0x10(%rbx),%edi
  mov    $0xf0,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r15d
  mov    0x1c(%rbx),%esi
  mov    0x14(%rbx),%edi
  mov    $0xf,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r14d
  mov    0x10(%rbx),%esi
  mov    0x18(%rbx),%edi
  mov    $0xf0,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r13d
  mov    0x14(%rbx),%esi
  mov    0x1c(%rbx),%edi
  mov    $0xf,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r12d
  mov    $0xcc,%edx
  mov    %eax,%esi
  mov    %r15d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x10(%rbx)
  mov    $0xcc,%edx
  mov    %r15d,%esi
  mov    %r14d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x14(%rbx)
  mov    $0xcc,%edx
  mov    %r14d,%esi
  mov    %r13d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x18(%rbx)
  mov    $0xcc,%edx
  mov    %r13d,%esi
  mov    %r12d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x1c(%rbx)
  mov    0x8(%rbx),%esi
  mov    $0xf0,%edx
  mov    (%rbx),%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r15d
  mov    0xc(%rbx),%esi
  mov    0x4(%rbx),%edi
  mov    $0xf,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r14d
  mov    0x8(%rbx),%edi
  mov    $0xf0,%edx
  mov    (%rbx),%esi
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r13d
  mov    0x4(%rbx),%esi
  mov    0xc(%rbx),%edi
  mov    $0xf,%edx
  call   <_mm_blend_epi16@plt>
  mov    %eax,%r12d
  mov    $0xcc,%edx
  mov    %eax,%esi
  mov    %r15d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,(%rbx)
  mov    $0xcc,%edx
  mov    %r15d,%esi
  mov    %r14d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x4(%rbx)
  mov    $0xcc,%edx
  mov    %r14d,%esi
  mov    %r13d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0x8(%rbx)
  mov    $0xcc,%edx
  mov    %r13d,%esi
  mov    %r12d,%edi
  call   <_mm_blend_epi16@plt>
  mov    %eax,0xc(%rbx)
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L31
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L31:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void scrypt_core_r2_sidm(__m128i *X, uint32_t Loops, uint32_t double_rounds) {
  uint32_t i, j;
  __m128i scratch[Loops * 8 * 4];
  __m128i *calc_1 = (__m128i *)&X[0];
  __m128i *calc_2 = (__m128i *)&X[1];
  __m128i *calc_3 = (__m128i *)&X[2];
  __m128i *calc_4 = (__m128i *)&X[3];
  __m128i *calc_11 = (__m128i *)&X[4];
  __m128i *calc_12 = (__m128i *)&X[5];
  __m128i *calc_13 = (__m128i *)&X[6];
  __m128i *calc_14 = (__m128i *)&X[7];
  __m128i *calc_21 = (__m128i *)&X[8];
  __m128i *calc_22 = (__m128i *)&X[9];
  __m128i *calc_23 = (__m128i *)&X[10];
  __m128i *calc_24 = (__m128i *)&X[11];
  __m128i *calc_31 = (__m128i *)&X[12];
  __m128i *calc_32 = (__m128i *)&X[13];
  __m128i *calc_33 = (__m128i *)&X[14];
  __m128i *calc_34 = (__m128i *)&X[15];
  __m128i _calc5;
  __m128i _calc6;
  __m128i _calc7;
  __m128i _calc8;
  _calc5 = _mm_blend_epi16(*calc_31, *calc_33, 0xf0);
  _calc6 = _mm_blend_epi16(*calc_32, *calc_34, 0x0f);
  _calc7 = _mm_blend_epi16(*calc_33, *calc_31, 0xf0);
  _calc8 = _mm_blend_epi16(*calc_34, *calc_32, 0x0f);
  *calc_31 = _mm_blend_epi16(_calc5, _calc8, 0xcc);
  *calc_32 = _mm_blend_epi16(_calc6, _calc5, 0xcc);
  *calc_33 = _mm_blend_epi16(_calc7, _calc6, 0xcc);
  *calc_34 = _mm_blend_epi16(_calc8, _calc7, 0xcc);
  _calc5 = _mm_blend_epi16(*calc_21, *calc_23, 0xf0);
  _calc6 = _mm_blend_epi16(*calc_22, *calc_24, 0x0f);
  _calc7 = _mm_blend_epi16(*calc_23, *calc_21, 0xf0);
  _calc8 = _mm_blend_epi16(*calc_24, *calc_22, 0x0f);
  *calc_21 = _mm_blend_epi16(_calc5, _calc8, 0xcc);
  *calc_22 = _mm_blend_epi16(_calc6, _calc5, 0xcc);
  *calc_23 = _mm_blend_epi16(_calc7, _calc6, 0xcc);
  *calc_24 = _mm_blend_epi16(_calc8, _calc7, 0xcc);
  _calc5 = _mm_blend_epi16(*calc_11, *calc_13, 0xf0);
  _calc6 = _mm_blend_epi16(*calc_12, *calc_14, 0x0f);
  _calc7 = _mm_blend_epi16(*calc_13, *calc_11, 0xf0);
  _calc8 = _mm_blend_epi16(*calc_14, *calc_12, 0x0f);
  *calc_11 = _mm_blend_epi16(_calc5, _calc8, 0xcc);
  *calc_12 = _mm_blend_epi16(_calc6, _calc5, 0xcc);
  *calc_13 = _mm_blend_epi16(_calc7, _calc6, 0xcc);
  *calc_14 = _mm_blend_epi16(_calc8, _calc7, 0xcc);
  _calc5 = _mm_blend_epi16(*calc_1, *calc_3, 0xf0);
  _calc6 = _mm_blend_epi16(*calc_2, *calc_4, 0x0f);
  _calc7 = _mm_blend_epi16(*calc_3, *calc_1, 0xf0);
  _calc8 = _mm_blend_epi16(*calc_4, *calc_2, 0x0f);
  *calc_1 = _mm_blend_epi16(_calc5, _calc8, 0xcc);
  *calc_2 = _mm_blend_epi16(_calc6, _calc5, 0xcc);
  *calc_3 = _mm_blend_epi16(_calc7, _calc6, 0xcc);
  *calc_4 = _mm_blend_epi16(_calc8, _calc7, 0xcc);
  for (i = 0; i < Loops; i++) {
    scratch[i * 16 + 0] = *calc_1;
    scratch[i * 16 + 1] = *calc_2;
    scratch[i * 16 + 2] = *calc_3;
    scratch[i * 16 + 3] = *calc_4;
    scratch[i * 16 + 4] = *calc_11;
    scratch[i * 16 + 5] = *calc_12;
    scratch[i * 16 + 6] = *calc_13;
    scratch[i * 16 + 7] = *calc_14;
    scratch[i * 16 + 8] = *calc_21;
    scratch[i * 16 + 9] = *calc_22;
    scratch[i * 16 + 10] = *calc_23;
    scratch[i * 16 + 11] = *calc_24;
    scratch[i * 16 + 12] = *calc_31;
    scratch[i * 16 + 13] = *calc_32;
    scratch[i * 16 + 14] = *calc_33;
    scratch[i * 16 + 15] = *calc_34;
    xor_salsa_sidm(calc_1, calc_2, calc_3, calc_4, calc_31, calc_32, calc_33, calc_34, double_rounds);
    xor_salsa_sidm(calc_11, calc_12, calc_13, calc_14, calc_1, calc_2, calc_3, calc_4, double_rounds);
    xor_salsa_sidm_swap(calc_21, calc_22, calc_23, calc_24, calc_11, calc_12, calc_13, calc_14, double_rounds);
    xor_salsa_sidm(calc_31, calc_32, calc_33, calc_34, calc_11, calc_12, calc_13, calc_14, double_rounds);
  }
  for (i = 0; i < Loops; i++) {
    j = 16 * (_mm_extract_epi16(*calc_31, 0x00) & (Loops - 1));
    *calc_1 = _mm_xor_si128(*calc_1, scratch[j]);
    *calc_2 = _mm_xor_si128(*calc_2, scratch[j + 1]);
    *calc_3 = _mm_xor_si128(*calc_3, scratch[j + 2]);
    *calc_4 = _mm_xor_si128(*calc_4, scratch[j + 3]);
    *calc_11 = _mm_xor_si128(*calc_11, scratch[j + 4]);
    *calc_12 = _mm_xor_si128(*calc_12, scratch[j + 5]);
    *calc_13 = _mm_xor_si128(*calc_13, scratch[j + 6]);
    *calc_14 = _mm_xor_si128(*calc_14, scratch[j + 7]);
    *calc_21 = _mm_xor_si128(*calc_21, scratch[j + 8]);
    *calc_22 = _mm_xor_si128(*calc_22, scratch[j + 9]);
    *calc_23 = _mm_xor_si128(*calc_23, scratch[j + 10]);
    *calc_24 = _mm_xor_si128(*calc_24, scratch[j + 11]);
    *calc_31 = _mm_xor_si128(*calc_31, scratch[j + 12]);
    *calc_32 = _mm_xor_si128(*calc_32, scratch[j + 13]);
    *calc_33 = _mm_xor_si128(*calc_33, scratch[j + 14]);
    *calc_34 = _mm_xor_si128(*calc_34, scratch[j + 15]);
    xor_salsa_sidm(calc_1, calc_2, calc_3, calc_4, calc_31, calc_32, calc_33, calc_34, double_rounds);
    xor_salsa_sidm(calc_11, calc_12, calc_13, calc_14, calc_1, calc_2, calc_3, calc_4, double_rounds);
    xor_salsa_sidm_swap(calc_21, calc_22, calc_23, calc_24, calc_11, calc_12, calc_13, calc_14, double_rounds);
    xor_salsa_sidm(calc_31, calc_32, calc_33, calc_34, calc_11, calc_12, calc_13, calc_14, double_rounds);
  }
  _calc5 = _mm_blend_epi16(*calc_31, *calc_33, 0xf0);
  _calc6 = _mm_blend_epi16(*calc_32, *calc_34, 0x0f);
  _calc7 = _mm_blend_epi16(*calc_33, *calc_31, 0xf0);
  _calc8 = _mm_blend_epi16(*calc_34, *calc_32, 0x0f);
  *calc_31 = _mm_blend_epi16(_calc5, _calc8, 0xcc);
  *calc_32 = _mm_blend_epi16(_calc6, _calc5, 0xcc);
  *calc_33 = _mm_blend_epi16(_calc7, _calc6, 0xcc);
  *calc_34 = _mm_blend_epi16(_calc8, _calc7, 0xcc);
  _calc5 = _mm_blend_epi16(*calc_21, *calc_23, 0xf0);
  _calc6 = _mm_blend_epi16(*calc_22, *calc_24, 0x0f);
  _calc7 = _mm_blend_epi16(*calc_23, *calc_21, 0xf0);
  _calc8 = _mm_blend_epi16(*calc_24, *calc_22, 0x0f);
  *calc_21 = _mm_blend_epi16(_calc5, _calc8, 0xcc);
  *calc_22 = _mm_blend_epi16(_calc6, _calc5, 0xcc);
  *calc_23 = _mm_blend_epi16(_calc7, _calc6, 0xcc);
  *calc_24 = _mm_blend_epi16(_calc8, _calc7, 0xcc);
  _calc5 = _mm_blend_epi16(*calc_11, *calc_13, 0xf0);
  _calc6 = _mm_blend_epi16(*calc_12, *calc_14, 0x0f);
  _calc7 = _mm_blend_epi16(*calc_13, *calc_11, 0xf0);
  _calc8 = _mm_blend_epi16(*calc_14, *calc_12, 0x0f);
  *calc_11 = _mm_blend_epi16(_calc5, _calc8, 0xcc);
  *calc_12 = _mm_blend_epi16(_calc6, _calc5, 0xcc);
  *calc_13 = _mm_blend_epi16(_calc7, _calc6, 0xcc);
  *calc_14 = _mm_blend_epi16(_calc8, _calc7, 0xcc);
  _calc5 = _mm_blend_epi16(*calc_1, *calc_3, 0xf0);
  _calc6 = _mm_blend_epi16(*calc_2, *calc_4, 0x0f);
  _calc7 = _mm_blend_epi16(*calc_3, *calc_1, 0xf0);
  _calc8 = _mm_blend_epi16(*calc_4, *calc_2, 0x0f);
  *calc_1 = _mm_blend_epi16(_calc5, _calc8, 0xcc);
  *calc_2 = _mm_blend_epi16(_calc6, _calc5, 0xcc);
  *calc_3 = _mm_blend_epi16(_calc7, _calc6, 0xcc);
  *calc_4 = _mm_blend_epi16(_calc8, _calc7, 0xcc);
}
```