user: Please show me the C implementation that matches the assembly code listed below:

```asm
<tce_sortacc_6_scalar>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1e8,%rsp
  mov    %rdi,%r15
  mov    %rsi,0x70(%rsp)
  mov    %edx,%esi
  mov    %ecx,%eax
  mov    %r8d,%edx
  mov    %r9d,%ecx
  mov    0x220(%rsp),%edi
  mov    0x228(%rsp),%r8d
  mov    0x258(%rsp),%r9d
  mov    %fs:0x28,%r10
  mov    %r10,0x1d8(%rsp)
  xor    %r10d,%r10d
  mov    %esi,0x1a0(%rsp)
  mov    %eax,0x1a4(%rsp)
  mov    %edx,0x1a8(%rsp)
  mov    %ecx,0x1ac(%rsp)
  mov    %edi,0x1b0(%rsp)
  mov    %r8d,0x1b4(%rsp)
  imul   %edx,%eax
  imul   %ecx,%eax
  imul   %edi,%eax
  imul   %r8d,%eax
  mov    %eax,0x1c0(%rsp)
  mov    %edx,%eax
  imul   %ecx,%eax
  imul   %edi,%eax
  imul   %r8d,%eax
  mov    %eax,0x1c4(%rsp)
  mov    %ecx,%eax
  imul   %edi,%eax
  imul   %r8d,%eax
  mov    %eax,0x1c8(%rsp)
  imul   %r8d,%edi
  mov    %edi,0x1cc(%rsp)
  mov    %r8d,0x1d0(%rsp)
  movl   $0x1,0x1d4(%rsp)
  movslq 0x230(%rsp),%r8
  mov    0x1a0(%rsp,%r8,4),%eax
  mov    %eax,0xc(%rsp)
  movslq 0x238(%rsp),%rdi
  mov    0x1a0(%rsp,%rdi,4),%ebp
  mov    %ebp,0x10(%rsp)
  movslq 0x240(%rsp),%rsi
  mov    0x1a0(%rsp,%rsi,4),%r10d
  mov    %r10d,0x14(%rsp)
  movslq 0x248(%rsp),%rcx
  mov    0x1a0(%rsp,%rcx,4),%r11d
  mov    %r11d,0x18(%rsp)
  movslq 0x250(%rsp),%rdx
  mov    0x1a0(%rsp,%rdx,4),%ebx
  mov    %ebx,0x1c(%rsp)
  movslq %r9d,%rax
  mov    0x1a0(%rsp,%rax,4),%r14d
  mov    0x1c0(%rsp,%r8,4),%r8d
  mov    %r8d,0x48(%rsp)
  mov    0x1c0(%rsp,%rdi,4),%edi
  mov    %edi,0x4c(%rsp)
  mov    0x1c0(%rsp,%rsi,4),%edi
  mov    %edi,0x50(%rsp)
  mov    0x1c0(%rsp,%rcx,4),%edi
  mov    %edi,0x54(%rsp)
  mov    0x1c0(%rsp,%rdx,4),%esi
  mov    %esi,0x68(%rsp)
  mov    0x1c0(%rsp,%rax,4),%eax
  mov    %eax,0x6c(%rsp)
  mov    %ebp,%eax
  imul   %r10d,%eax
  imul   %r11d,%eax
  imul   %ebx,%eax
  imul   %r14d,%eax
  mov    %eax,0x58(%rsp)
  imul   %r11d,%r10d
  mov    %r10d,%eax
  imul   %ebx,%eax
  imul   %r14d,%eax
  mov    %eax,0x5c(%rsp)
  imul   %ebx,%r11d
  mov    %r11d,%eax
  imul   %r14d,%eax
  mov    %eax,0x60(%rsp)
  imul   %r14d,%ebx
  mov    %ebx,0x64(%rsp)
  cmp    $0x5,%r9d
  je     L749
L1128:
  cmpl   $0x5,0x250(%rsp)
  je     L857
L909:
  cmpl   $0x5,0x248(%rsp)
  je     L627
L1292:
  cmpl   $0x5,0x240(%rsp)
  je     L444
L828:
  cmpl   $0x5,0x238(%rsp)
  je     L827
L1225:
  cmpl   $0x5,0x230(%rsp)
  je     L831
L233:
  mov    0x1d8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1315
  add    $0x1e8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L749:
  cmpl   $0x0,0xc(%rsp)
  jle    L1128
  movslq %r8d,%rax
  shl    $0x3,%rax
  mov    %rax,0xb8(%rsp)
  mov    %r15,0x40(%rsp)
  movslq 0x58(%rsp),%rax
  shl    $0x3,%rax
  mov    %rax,0xc0(%rsp)
  lea    -0x1(%r14),%edx
  mov    0x70(%rsp),%rax
  lea    0x8(%rax,%rdx,8),%r10
  movslq 0x4c(%rsp),%rax
  shl    $0x3,%rax
  mov    %rax,0xa8(%rsp)
  movslq 0x5c(%rsp),%rax
  shl    $0x3,%rax
  mov    %rax,0xb0(%rsp)
  movslq 0x50(%rsp),%rax
  shl    $0x3,%rax
  mov    %rax,0x98(%rsp)
  movslq 0x60(%rsp),%rax
  shl    $0x3,%rax
  mov    %rax,0xa0(%rsp)
  movslq %edi,%rax
  shl    $0x3,%rax
  mov    %rax,0x88(%rsp)
  movslq %ebx,%rax
  shl    $0x3,%rax
  mov    %rax,0x90(%rsp)
  movslq %esi,%rax
  shl    $0x3,%rax
  mov    %rax,0x78(%rsp)
  movslq %r14d,%rax
  shl    $0x3,%rax
  mov    %rax,0x80(%rsp)
  movslq 0x6c(%rsp),%rax
  lea    0x0(,%rax,8),%r8
  mov    $0x0,%edi
  mov    %rdx,%rax
  not    %rax
  shl    $0x3,%rax
  mov    %rax,0xc8(%rsp)
  mov    %r15,%r9
  jmp    L276
L904:
  cmpl   $0x0,0x18(%rsp)
  jle    L883
  mov    0x28(%rsp),%r12
  mov    0x20(%rsp),%rbp
  mov    $0x0,%ebx
L688:
  cmpl   $0x0,0x1c(%rsp)
  jle    L803
  mov    %r12,%rcx
  mov    %rbp,%r15
  mov    $0x0,%r13d
L35:
  test   %r14d,%r14d
  jle    L691
  mov    0xc8(%rsp),%rax
  add    %rcx,%rax
  mov    %r15,%rdx
L766:
  movapd %xmm0,%xmm1
  mulsd  (%rdx),%xmm1
  addsd  (%rax),%xmm1
  movsd  %xmm1,(%rax)
  add    $0x8,%rax
  add    %r8,%rdx
  cmp    %rcx,%rax
  jne    L766
L691:
  add    $0x1,%r13d
  add    0x78(%rsp),%r15
  add    0x80(%rsp),%rcx
  cmp    %r13d,0x1c(%rsp)
  jne    L35
L803:
  add    $0x1,%ebx
  add    0x88(%rsp),%rbp
  add    0x90(%rsp),%r12
  cmp    %ebx,0x18(%rsp)
  jne    L688
L883:
  add    $0x1,%esi
  mov    0x98(%rsp),%rbx
  add    %rbx,0x20(%rsp)
  mov    0xa0(%rsp),%rbx
  add    %rbx,0x28(%rsp)
  cmp    %esi,0x14(%rsp)
  jne    L904
L1253:
  add    $0x1,%r11d
  mov    0xa8(%rsp),%rbx
  add    %rbx,0x30(%rsp)
  mov    0xb0(%rsp),%rbx
  add    %rbx,0x38(%rsp)
  cmp    %r11d,0x10(%rsp)
  je     L579
L478:
  cmpl   $0x0,0x14(%rsp)
  jle    L1253
  mov    0x38(%rsp),%rax
  mov    %rax,0x28(%rsp)
  mov    0x30(%rsp),%rax
  mov    %rax,0x20(%rsp)
  mov    $0x0,%esi
  jmp    L904
L579:
  add    $0x1,%edi
  mov    0xb8(%rsp),%rbx
  add    %rbx,0x40(%rsp)
  add    0xc0(%rsp),%r10
  cmp    %edi,0xc(%rsp)
  je     L678
L276:
  cmpl   $0x0,0x10(%rsp)
  jle    L579
  mov    %r10,0x38(%rsp)
  mov    0x40(%rsp),%rax
  mov    %rax,0x30(%rsp)
  mov    $0x0,%r11d
  jmp    L478
L857:
  cmpl   $0x0,0xc(%rsp)
  jle    L909
L630:
  movslq 0x48(%rsp),%rax
  mov    %rax,0x170(%rsp)
  movslq 0x58(%rsp),%rax
  mov    %rax,0x178(%rsp)
  mov    0x68(%rsp),%eax
  lea    0x0(,%rax,8),%ebx
  mov    %ebx,0x158(%rsp)
  lea    0x0(,%r14,8),%ebx
  mov    %ebx,0x15c(%rsp)
  mov    0x6c(%rsp),%ebx
  lea    0x0(,%rbx,8),%edi
  mov    %edi,0x20(%rsp)
  cltq
  lea    0x0(,%rax,8),%rsi
  movslq %r14d,%rax
  lea    0x0(,%rax,8),%r13
  movslq %ebx,%rax
  lea    0x0(,%rax,8),%r12
  movq   $0x0,0x150(%rsp)
  movl   $0x0,0x14c(%rsp)
  movq   $0x0,0x140(%rsp)
  movl   $0x0,0x148(%rsp)
  movl   $0x0,0x13c(%rsp)
  movl   $0x0,0x138(%rsp)
  movl   $0x0,0x78(%rsp)
  movslq 0x4c(%rsp),%rax
  mov    %rax,0x190(%rsp)
  movslq 0x54(%rsp),%rax
  mov    %rax,0x198(%rsp)
  mov    0x70(%rsp),%rax
  add    $0x8,%rax
  mov    %rax,0x40(%rsp)
  mov    %r15,0x28(%rsp)
  mov    %r12,%r15
  mov    %r13,%r12
  mov    %rsi,%r13
  jmp    L861
L1350:
  lea    0x8(%rbp),%r11d
  lea    0x7(%rbp),%eax
  mov    0x1c(%rsp),%ebx
  cmp    %eax,%ebx
  cmovle %ebx,%r11d
  mov    $0x0,%r8d
  mov    $0x0,%ebx
  mov    0x98(%rsp),%eax
  add    0xb8(%rsp),%eax
  cltq
  add    0xc0(%rsp),%rax
  mov    %rax,0x30(%rsp)
  mov    0xa0(%rsp),%eax
  add    0xc8(%rsp),%eax
  cltq
  add    0xd0(%rsp),%rax
  mov    %rax,0x38(%rsp)
L491:
  cmp    %ebp,%r11d
  jle    L1088
  lea    0x8(%r8),%r10d
  lea    0x7(%r8),%eax
  cmp    %eax,%r14d
  cmovle %r14d,%r10d
  movslq %ebx,%rax
  add    0x30(%rsp),%rax
  mov    0x28(%rsp),%rdi
  lea    (%rdi,%rax,8),%rdi
  mov    %r10d,%eax
  sub    %r8d,%eax
  lea    -0x1(%rax),%r9d
  mov    0x38(%rsp),%rax
  add    %r8,%rax
  add    %r9,%rax
  mov    0x40(%rsp),%rsi
  lea    (%rsi,%rax,8),%rcx
  mov    %ebp,%esi
  not    %r9
  shl    $0x3,%r9
L648:
  cmp    %r8d,%r10d
  jle    L1231
  lea    (%r9,%rcx,1),%rax
  mov    %rdi,%rdx
L720:
  movapd %xmm0,%xmm1
  mulsd  (%rdx),%xmm1
  addsd  (%rax),%xmm1
  movsd  %xmm1,(%rax)
  add    $0x8,%rax
  add    %r15,%rdx
  cmp    %rcx,%rax
  jne    L720
L1231:
  add    $0x1,%esi
  add    %r13,%rdi
  add    %r12,%rcx
  cmp    %esi,%r11d
  jne    L648
L1088:
  add    0x20(%rsp),%ebx
  add    $0x8,%r8
  cmp    %r8d,%r14d
  jg     L491
L1228:
  add    $0x8,%ebp
  mov    0x158(%rsp),%ebx
  add    %ebx,0x98(%rsp)
  mov    0x15c(%rsp),%ebx
  add    %ebx,0xa0(%rsp)
  cmp    %ebp,0x1c(%rsp)
  jle    L1288
L870:
  test   %r14d,%r14d
  jg     L1350
  jmp    L1228
L1288:
  addl   $0x1,0x90(%rsp)
  mov    0x90(%rsp),%eax
  mov    0x54(%rsp),%edi
  add    %edi,0xa8(%rsp)
  mov    0x64(%rsp),%esi
  add    %esi,0xb0(%rsp)
  sub    %edi,0xb8(%rsp)
  mov    0x198(%rsp),%rdi
  add    %rdi,0xc0(%rsp)
  sub    %esi,0xc8(%rsp)
  mov    0x188(%rsp),%rdi
  add    %rdi,0xd0(%rsp)
  cmp    %eax,0x18(%rsp)
  je     L987
L935:
  mov    0xb0(%rsp),%eax
  mov    %eax,0xa0(%rsp)
  mov    0xa8(%rsp),%eax
  mov    %eax,0x98(%rsp)
  mov    $0x0,%ebp
  cmpl   $0x0,0x1c(%rsp)
  jg     L870
  jmp    L1288
L987:
  addl   $0x1,0x88(%rsp)
  mov    0x88(%rsp),%eax
  mov    0x50(%rsp),%edi
  add    %edi,0xd8(%rsp)
  mov    0x60(%rsp),%esi
  add    %esi,0xe0(%rsp)
  sub    %edi,0xe8(%rsp)
  mov    0x180(%rsp),%rdi
  add    %rdi,0xf0(%rsp)
  sub    %esi,0xf8(%rsp)
  mov    0x160(%rsp),%rsi
  add    %rsi,0x100(%rsp)
  cmp    %eax,0x14(%rsp)
  je     L146
L39:
  cmpl   $0x0,0x18(%rsp)
  jle    L987
  mov    0x100(%rsp),%rax
  mov    %rax,0xd0(%rsp)
  mov    0xf8(%rsp),%eax
  mov    %eax,0xc8(%rsp)
  mov    0xf0(%rsp),%rax
  mov    %rax,0xc0(%rsp)
  mov    0xe8(%rsp),%eax
  mov    %eax,0xb8(%rsp)
  mov    0xe0(%rsp),%eax
  mov    %eax,0xb0(%rsp)
  mov    0xd8(%rsp),%eax
  mov    %eax,0xa8(%rsp)
  movl   $0x0,0x90(%rsp)
  jmp    L935
L146:
  mov    %r15,%rax
  mov    %r14d,%r15d
  mov    %rax,%r14
L1237:
  addl   $0x1,0x80(%rsp)
  mov    0x80(%rsp),%eax
  mov    0x4c(%rsp),%edi
  add    %edi,0x108(%rsp)
  mov    0x5c(%rsp),%esi
  add    %esi,0x110(%rsp)
  sub    %edi,0x118(%rsp)
  mov    0x190(%rsp),%rdi
  add    %rdi,0x120(%rsp)
  sub    %esi,0x128(%rsp)
  mov    0x168(%rsp),%rsi
  add    %rsi,0x130(%rsp)
  cmp    %eax,0x10(%rsp)
  je     L373
L848:
  cmpl   $0x0,0x14(%rsp)
  jle    L1237
  movslq 0x60(%rsp),%rax
  mov    %rax,0x160(%rsp)
  mov    0x130(%rsp),%rax
  mov    %rax,0x100(%rsp)
  mov    0x128(%rsp),%eax
  mov    %eax,0xf8(%rsp)
  mov    0x120(%rsp),%rax
  mov    %rax,0xf0(%rsp)
  mov    0x118(%rsp),%eax
  mov    %eax,0xe8(%rsp)
  mov    0x110(%rsp),%eax
  mov    %eax,0xe0(%rsp)
  mov    0x108(%rsp),%eax
  mov    %eax,0xd8(%rsp)
  movl   $0x0,0x88(%rsp)
  mov    %r14,%rax
  mov    %r15d,%r14d
  mov    %rax,%r15
  jmp    L39
L373:
  mov    %r14,%rax
  mov    %r15d,%r14d
  mov    %rax,%r15
L548:
  addl   $0x1,0x78(%rsp)
  mov    0x78(%rsp),%eax
  mov    0x48(%rsp),%edi
  add    %edi,0x138(%rsp)
  mov    0x58(%rsp),%esi
  add    %esi,0x13c(%rsp)
  sub    %edi,0x148(%rsp)
  mov    0x170(%rsp),%rdi
  add    %rdi,0x140(%rsp)
  sub    %esi,0x14c(%rsp)
  mov    0x178(%rsp),%rsi
  add    %rsi,0x150(%rsp)
  cmp    %eax,0xc(%rsp)
  jle    L1255
L861:
  cmpl   $0x0,0x10(%rsp)
  jle    L548
  movslq 0x5c(%rsp),%rax
  mov    %rax,0x168(%rsp)
  mov    0x150(%rsp),%rax
  mov    %rax,0x130(%rsp)
  mov    0x14c(%rsp),%eax
  mov    %eax,0x128(%rsp)
  mov    0x140(%rsp),%rax
  mov    %rax,0x120(%rsp)
  mov    0x148(%rsp),%eax
  mov    %eax,0x118(%rsp)
  mov    0x13c(%rsp),%eax
  mov    %eax,0x110(%rsp)
  mov    0x138(%rsp),%eax
  mov    %eax,0x108(%rsp)
  movl   $0x0,0x80(%rsp)
  movslq 0x50(%rsp),%rax
  mov    %rax,0x180(%rsp)
  movslq 0x64(%rsp),%rax
  mov    %rax,0x188(%rsp)
  mov    %r15,%rax
  mov    %r14d,%r15d
  mov    %rax,%r14
  jmp    L848
L627:
  cmpl   $0x0,0xc(%rsp)
  jle    L1292
L529:
  movslq 0x48(%rsp),%rax
  mov    %rax,0x108(%rsp)
  movslq 0x58(%rsp),%rax
  mov    %rax,0x110(%rsp)
  mov    0x54(%rsp),%eax
  lea    0x0(,%rax,8),%ebx
  mov    %ebx,0xd8(%rsp)
  mov    0x64(%rsp),%ebx
  lea    0x0(,%rbx,8),%esi
  mov    %esi,0xe0(%rsp)
  mov    0x6c(%rsp),%edi
  lea    0x0(,%rdi,8),%esi
  mov    %esi,0x20(%rsp)
  cltq
  lea    0x0(,%rax,8),%rsi
  movslq %ebx,%rax
  lea    0x0(,%rax,8),%r13
  movslq %edi,%rax
  lea    0x0(,%rax,8),%r12
  movq   $0x0,0xd0(%rsp)
  movq   $0x0,0xc8(%rsp)
  movl   $0x0,0x78(%rsp)
  movslq 0x68(%rsp),%rax
  mov    %rax,0x120(%rsp)
  mov    0x70(%rsp),%rax
  add    $0x8,%rax
  mov    %rax,0x40(%rsp)
  mov    %r15,0x38(%rsp)
  mov    %r12,%r15
  mov    %r13,%r12
  mov    %rsi,%r13
  jmp    L1125
L584:
  lea    0x8(%rbp),%r11d
  lea    0x7(%rbp),%eax
  mov    0x18(%rsp),%ebx
  cmp    %eax,%ebx
  cmovle %ebx,%r11d
  movslq 0x98(%rsp),%rax
  add    0xa8(%rsp),%rax
  mov    %rax,0x28(%rsp)
  movslq 0xa0(%rsp),%rax
  add    0xb0(%rsp),%rax
  mov    %rax,0x30(%rsp)
  movl   $0x0,0x90(%rsp)
L1042:
  test   %r14d,%r14d
  jle    L1148
  mov    $0x0,%r8d
  mov    $0x0,%ebx
L1086:
  cmp    %ebp,%r11d
  jle    L311
  lea    0x8(%r8),%r10d
  lea    0x7(%r8),%eax
  cmp    %eax,%r14d
  cmovle %r14d,%r10d
  movslq %ebx,%rax
  add    0x28(%rsp),%rax
  mov    0x38(%rsp),%rdi
  lea    (%rdi,%rax,8),%rdi
  mov    %r10d,%eax
  sub    %r8d,%eax
  lea    -0x1(%rax),%r9d
  mov    0x30(%rsp),%rax
  add    %r8,%rax
  add    %r9,%rax
  mov    0x40(%rsp),%rsi
  lea    (%rsi,%rax,8),%rcx
  mov    %ebp,%esi
  not    %r9
  shl    $0x3,%r9
L1252:
  cmp    %r8d,%r10d
  jle    L1145
  lea    (%r9,%rcx,1),%rax
  mov    %rdi,%rdx
L995:
  movapd %xmm0,%xmm1
  mulsd  (%rdx),%xmm1
  addsd  (%rax),%xmm1
  movsd  %xmm1,(%rax)
  add    $0x8,%rax
  add    %r15,%rdx
  cmp    %rcx,%rax
  jne    L995
L1145:
  add    $0x1,%esi
  add    %r13,%rdi
  add    %r12,%rcx
  cmp    %esi,%r11d
  jne    L1252
L311:
  add    0x20(%rsp),%ebx
  add    $0x8,%r8
  cmp    %r8d,%r14d
  jg     L1086
L1148:
  addl   $0x1,0x90(%rsp)
  mov    0x90(%rsp),%eax
  mov    0x120(%rsp),%rdi
  add    %rdi,0x28(%rsp)
  mov    0x118(%rsp),%rdi
  add    %rdi,0x30(%rsp)
  cmp    %eax,0x1c(%rsp)
  jne    L1042
L144:
  add    $0x8,%ebp
  mov    0xd8(%rsp),%ebx
  add    %ebx,0x98(%rsp)
  mov    0xe0(%rsp),%ebx
  add    %ebx,0xa0(%rsp)
  cmp    %ebp,0x18(%rsp)
  jle    L846
L29:
  cmpl   $0x0,0x1c(%rsp)
  jg     L584
  jmp    L144
L846:
  addl   $0x1,0x88(%rsp)
  mov    0x88(%rsp),%eax
  mov    0xe8(%rsp),%rdi
  add    %rdi,0xa8(%rsp)
  mov    0xf0(%rsp),%rdi
  add    %rdi,0xb0(%rsp)
  cmp    %eax,0x14(%rsp)
  je     L204
L657:
  movl   $0x0,0xa0(%rsp)
  movl   $0x0,0x98(%rsp)
  mov    $0x0,%ebp
  cmpl   $0x0,0x18(%rsp)
  jg     L29
  jmp    L846
L204:
  addl   $0x1,0x80(%rsp)
  mov    0x80(%rsp),%eax
  mov    0xf8(%rsp),%rsi
  add    %rsi,0xb8(%rsp)
  mov    0x100(%rsp),%rdi
  add    %rdi,0xc0(%rsp)
  cmp    %eax,0x10(%rsp)
  je     L205
L1122:
  cmpl   $0x0,0x14(%rsp)
  jle    L204
  movslq 0x50(%rsp),%rax
  mov    %rax,0xe8(%rsp)
  movslq 0x60(%rsp),%rax
  mov    %rax,0xf0(%rsp)
  mov    0xc0(%rsp),%rax
  mov    %rax,0xb0(%rsp)
  mov    0xb8(%rsp),%rax
  mov    %rax,0xa8(%rsp)
  movl   $0x0,0x88(%rsp)
  jmp    L657
L205:
  addl   $0x1,0x78(%rsp)
  mov    0x78(%rsp),%eax
  mov    0x108(%rsp),%rsi
  add    %rsi,0xc8(%rsp)
  mov    0x110(%rsp),%rdi
  add    %rdi,0xd0(%rsp)
  cmp    %eax,0xc(%rsp)
  jle    L1198
L1125:
  cmpl   $0x0,0x10(%rsp)
  jle    L205
  movslq 0x4c(%rsp),%rax
  mov    %rax,0xf8(%rsp)
  movslq 0x5c(%rsp),%rax
  mov    %rax,0x100(%rsp)
  mov    0xd0(%rsp),%rax
  mov    %rax,0xc0(%rsp)
  mov    0xc8(%rsp),%rax
  mov    %rax,0xb8(%rsp)
  movl   $0x0,0x80(%rsp)
  movslq %r14d,%rax
  mov    %rax,0x118(%rsp)
  jmp    L1122
L444:
  cmpl   $0x0,0xc(%rsp)
  jle    L1199
L384:
  movslq 0x48(%rsp),%rax
  mov    %rax,0x100(%rsp)
  movslq 0x58(%rsp),%rax
  mov    %rax,0x108(%rsp)
  mov    0x50(%rsp),%eax
  lea    0x0(,%rax,8),%ebx
  mov    %ebx,0xe0(%rsp)
  mov    0x60(%rsp),%ebx
  lea    0x0(,%rbx,8),%esi
  mov    %esi,0xe8(%rsp)
  mov    0x6c(%rsp),%edi
  lea    0x0(,%rdi,8),%esi
  mov    %esi,0x20(%rsp)
  cltq
  shl    $0x3,%rax
  mov    %rax,0xd8(%rsp)
  movslq %ebx,%rax
  lea    0x0(,%rax,8),%r12
  movslq %edi,%rax
  lea    0x0(,%rax,8),%r13
  movq   $0x0,0xd0(%rsp)
  movq   $0x0,0xc8(%rsp)
  movl   $0x0,0x78(%rsp)
  movslq 0x68(%rsp),%rax
  mov    %rax,0x128(%rsp)
  mov    0x70(%rsp),%rax
  add    $0x8,%rax
  mov    %rax,0x40(%rsp)
  mov    %r12,%rax
  mov    %r14d,%r12d
  mov    %r13,%r14
  mov    %r15,0x38(%rsp)
  mov    %rax,%r13
  jmp    L133
L1238:
  lea    0x8(%r14),%r11d
  lea    0x7(%r14),%eax
  mov    0x14(%rsp),%ebx
  cmp    %eax,%ebx
  cmovle %ebx,%r11d
  movslq 0xa8(%rsp),%rax
  add    0xb8(%rsp),%rax
  mov    %rax,0x98(%rsp)
  movslq 0xb0(%rsp),%rax
  add    0xc0(%rsp),%rax
  mov    %rax,0xa0(%rsp)
  movl   $0x0,0x88(%rsp)
L54:
  cmpl   $0x0,0x1c(%rsp)
  jle    L475
  mov    0xa0(%rsp),%rax
  mov    %rax,0x30(%rsp)
  mov    0x98(%rsp),%rax
  mov    %rax,0x28(%rsp)
  movl   $0x0,0x90(%rsp)
L42:
  test   %r15d,%r15d
  jle    L1211
  mov    $0x0,%r8d
  mov    $0x0,%ebx
L1297:
  cmp    %r14d,%r11d
  jle    L177
  lea    0x8(%r8),%r10d
  lea    0x7(%r8),%eax
  cmp    %eax,%r15d
  cmovle %r15d,%r10d
  movslq %ebx,%rax
  add    0x28(%rsp),%rax
  mov    0x38(%rsp),%rdi
  lea    (%rdi,%rax,8),%rdi
  mov    %r10d,%eax
  sub    %r8d,%eax
  lea    -0x1(%rax),%r9d
  mov    0x30(%rsp),%rax
  add    %r8,%rax
  add    %r9,%rax
  mov    0x40(%rsp),%rsi
  lea    (%rsi,%rax,8),%rcx
  mov    %r14d,%esi
  not    %r9
  shl    $0x3,%r9
L281:
  cmp    %r8d,%r10d
  jle    L26
  lea    (%r9,%rcx,1),%rax
  mov    %rdi,%rdx
L340:
  movapd %xmm0,%xmm1
  mulsd  (%rdx),%xmm1
  addsd  (%rax),%xmm1
  movsd  %xmm1,(%rax)
  add    $0x8,%rax
  add    %rbp,%rdx
  cmp    %rcx,%rax
  jne    L340
L26:
  add    $0x1,%esi
  add    %r12,%rdi
  add    %r13,%rcx
  cmp    %esi,%r11d
  jne    L281
L177:
  add    0x20(%rsp),%ebx
  add    $0x8,%r8
  cmp    %r8d,%r15d
  jg     L1297
L1211:
  addl   $0x1,0x90(%rsp)
  mov    0x90(%rsp),%eax
  mov    0x128(%rsp),%rdi
  add    %rdi,0x28(%rsp)
  mov    0x120(%rsp),%rdi
  add    %rdi,0x30(%rsp)
  cmp    %eax,0x1c(%rsp)
  jne    L42
L475:
  addl   $0x1,0x88(%rsp)
  mov    0x88(%rsp),%eax
  mov    0x110(%rsp),%rsi
  add    %rsi,0x98(%rsp)
  mov    0x118(%rsp),%rdi
  add    %rdi,0xa0(%rsp)
  cmp    %eax,0x18(%rsp)
  jne    L54
L906:
  add    $0x8,%r14d
  mov    0xe0(%rsp),%ebx
  add    %ebx,0xa8(%rsp)
  mov    0xe8(%rsp),%ebx
  add    %ebx,0xb0(%rsp)
  cmp    %r14d,0x14(%rsp)
  jle    L511
L943:
  cmpl   $0x0,0x18(%rsp)
  jg     L1238
  jmp    L906
L511:
  mov    %r13,%r14
L445:
  addl   $0x1,0x80(%rsp)
  mov    0x80(%rsp),%eax
  mov    0xf0(%rsp),%rsi
  add    %rsi,0xb8(%rsp)
  mov    0xf8(%rsp),%rdi
  add    %rdi,0xc0(%rsp)
  cmp    %eax,0x10(%rsp)
  je     L25
L300:
  movl   $0x0,0xb0(%rsp)
  movl   $0x0,0xa8(%rsp)
  mov    $0x0,%r12d
  movslq 0x54(%rsp),%rax
  mov    %rax,0x110(%rsp)
  movslq 0x64(%rsp),%rax
  mov    %rax,0x118(%rsp)
  cmpl   $0x0,0x14(%rsp)
  jle    L445
  mov    %r14,%r13
  mov    %r12d,%r14d
  mov    0xd8(%rsp),%r12
  jmp    L943
L25:
  mov    %r15d,%r12d
  mov    %r14,%r13
  mov    %rbp,%r14
L496:
  addl   $0x1,0x78(%rsp)
  mov    0x78(%rsp),%eax
  mov    0x100(%rsp),%rsi
  add    %rsi,0xc8(%rsp)
  mov    0x108(%rsp),%rdi
  add    %rdi,0xd0(%rsp)
  cmp    %eax,0xc(%rsp)
  jle    L788
L133:
  cmpl   $0x0,0x10(%rsp)
  jle    L496
  movslq 0x4c(%rsp),%rax
  mov    %rax,0xf0(%rsp)
  movslq 0x5c(%rsp),%rax
  mov    %rax,0xf8(%rsp)
  mov    0xd0(%rsp),%rax
  mov    %rax,0xc0(%rsp)
  mov    0xc8(%rsp),%rax
  mov    %rax,0xb8(%rsp)
  movl   $0x0,0x80(%rsp)
  movslq %r12d,%rax
  mov    %rax,0x120(%rsp)
  mov    %r12d,%r15d
  mov    %r14,%rbp
  mov    %r13,%r14
  jmp    L300
L827:
  cmpl   $0x0,0xc(%rsp)
  jle    L233
L1021:
  movslq 0x48(%rsp),%rax
  mov    %rax,0x100(%rsp)
  movslq 0x58(%rsp),%rax
  mov    %rax,0x108(%rsp)
  mov    0x4c(%rsp),%eax
  lea    0x0(,%rax,8),%ebx
  mov    %ebx,0xf0(%rsp)
  mov    0x5c(%rsp),%ebx
  lea    0x0(,%rbx,8),%esi
  mov    %esi,0xf8(%rsp)
  mov    0x6c(%rsp),%edi
  lea    0x0(,%rdi,8),%esi
  mov    %esi,0x20(%rsp)
  cltq
  shl    $0x3,%rax
  mov    %rax,0xd8(%rsp)
  movslq %ebx,%rax
  lea    0x0(,%rax,8),%r12
  movslq %edi,%rax
  lea    0x0(,%rax,8),%r13
  movq   $0x0,0xd0(%rsp)
  movq   $0x0,0xc8(%rsp)
  movl   $0x0,0x78(%rsp)
  movslq 0x68(%rsp),%rax
  mov    %rax,0x128(%rsp)
  mov    0x70(%rsp),%rax
  add    $0x8,%rax
  mov    %rax,0x40(%rsp)
  mov    %r13,%rbp
  mov    %r15,0x38(%rsp)
  mov    %r14d,%r15d
  mov    %r12,%r14
  jmp    L922
L1147:
  lea    0x8(%r14),%eax
  lea    0x7(%r14),%edx
  mov    0x10(%rsp),%edi
  cmp    %edx,%edi
  cmovle %edi,%eax
  mov    %eax,%ebp
  movslq 0x50(%rsp),%rax
  mov    %rax,0xe0(%rsp)
  movslq 0xb8(%rsp),%rax
  add    0xc8(%rsp),%rax
  mov    %rax,0xa8(%rsp)
  movslq 0x60(%rsp),%rax
  mov    %rax,0xe8(%rsp)
  movslq 0xc0(%rsp),%rax
  add    0xd0(%rsp),%rax
  mov    %rax,0xb0(%rsp)
  movl   $0x0,0x80(%rsp)
  movslq 0x54(%rsp),%rax
  mov    %rax,0x110(%rsp)
  movslq 0x64(%rsp),%rax
  mov    %rax,0x118(%rsp)
  mov    %r14d,%r15d
  mov    %rbx,%r14
  mov    0xd8(%rsp),%rbx
L1189:
  cmpl   $0x0,0x18(%rsp)
  jle    L1298
  mov    0xb0(%rsp),%rax
  mov    %rax,0xa0(%rsp)
  mov    0xa8(%rsp),%rax
  mov    %rax,0x98(%rsp)
  movl   $0x0,0x88(%rsp)
L361:
  cmpl   $0x0,0x1c(%rsp)
  jle    L1080
  mov    0xa0(%rsp),%rax
  mov    %rax,0x30(%rsp)
  mov    0x98(%rsp),%rax
  mov    %rax,0x28(%rsp)
  movl   $0x0,0x90(%rsp)
L46:
  test   %r13d,%r13d
  jle    L1247
  mov    $0x0,%r8d
  mov    $0x0,%r11d
L951:
  cmp    %r15d,%ebp
  jle    L1201
  lea    0x8(%r8),%r10d
  lea    0x7(%r8),%eax
  cmp    %eax,%r13d
  cmovle %r13d,%r10d
  movslq %r11d,%rax
  add    0x28(%rsp),%rax
  mov    0x38(%rsp),%rdi
  lea    (%rdi,%rax,8),%rdi
  mov    %r10d,%eax
  sub    %r8d,%eax
  lea    -0x1(%rax),%r9d
  mov    0x30(%rsp),%rax
  add    %r8,%rax
  add    %r9,%rax
  mov    0x40(%rsp),%rsi
  lea    (%rsi,%rax,8),%rcx
  mov    %r15d,%esi
  not    %r9
  shl    $0x3,%r9
L1055:
  cmp    %r8d,%r10d
  jle    L589
  lea    (%r9,%rcx,1),%rax
  mov    %rdi,%rdx
L261:
  movapd %xmm0,%xmm1
  mulsd  (%rdx),%xmm1
  addsd  (%rax),%xmm1
  movsd  %xmm1,(%rax)
  add    $0x8,%rax
  add    %r12,%rdx
  cmp    %rcx,%rax
  jne    L261
L589:
  add    $0x1,%esi
  add    %rbx,%rdi
  add    %r14,%rcx
  cmp    %esi,%ebp
  jne    L1055
L1201:
  add    0x20(%rsp),%r11d
  add    $0x8,%r8
  cmp    %r8d,%r13d
  jg     L951
L1247:
  addl   $0x1,0x90(%rsp)
  mov    0x90(%rsp),%eax
  mov    0x128(%rsp),%rsi
  add    %rsi,0x28(%rsp)
  mov    0x120(%rsp),%rsi
  add    %rsi,0x30(%rsp)
  cmp    %eax,0x1c(%rsp)
  jne    L46
L1080:
  addl   $0x1,0x88(%rsp)
  mov    0x88(%rsp),%eax
  mov    0x110(%rsp),%rsi
  add    %rsi,0x98(%rsp)
  mov    0x118(%rsp),%rsi
  add    %rsi,0xa0(%rsp)
  cmp    %eax,0x18(%rsp)
  jne    L361
L1298:
  addl   $0x1,0x80(%rsp)
  mov    0x80(%rsp),%eax
  mov    0xe0(%rsp),%rsi
  add    %rsi,0xa8(%rsp)
  mov    0xe8(%rsp),%rsi
  add    %rsi,0xb0(%rsp)
  cmp    %eax,0x14(%rsp)
  jne    L1189
  mov    %r14,%rbx
  mov    %r15d,%r14d
L50:
  add    $0x8,%r14d
  mov    0xf0(%rsp),%edi
  add    %edi,0xb8(%rsp)
  mov    0xf8(%rsp),%edi
  add    %edi,0xc0(%rsp)
  cmp    %r14d,0x10(%rsp)
  jle    L1339
L1359:
  cmpl   $0x0,0x14(%rsp)
  jg     L1147
  jmp    L50
L1339:
  mov    %r13d,%r15d
  mov    %r12,%rbp
  mov    %rbx,%r14
L963:
  addl   $0x1,0x78(%rsp)
  mov    0x78(%rsp),%eax
  mov    0x100(%rsp),%rdi
  add    %rdi,0xc8(%rsp)
  mov    0x108(%rsp),%rdi
  add    %rdi,0xd0(%rsp)
  cmp    %eax,0xc(%rsp)
  jle    L523
L922:
  movl   $0x0,0xc0(%rsp)
  movl   $0x0,0xb8(%rsp)
  mov    $0x0,%r12d
  movslq %r15d,%rax
  mov    %rax,0x120(%rsp)
  cmpl   $0x0,0x10(%rsp)
  jle    L963
  mov    %r15d,%r13d
  mov    %r14,%rbx
  mov    %r12d,%r14d
  mov    %rbp,%r12
  jmp    L1359
L831:
  cmpl   $0x0,0xc(%rsp)
  jle    L233
L38:
  mov    0x48(%rsp),%eax
  lea    0x0(,%rax,8),%ebx
  mov    %ebx,0xd8(%rsp)
  mov    0x58(%rsp),%ebx
  lea    0x0(,%rbx,8),%edi
  mov    %edi,0xe0(%rsp)
  mov    0x6c(%rsp),%esi
  lea    0x0(,%rsi,8),%edi
  mov    %edi,0x30(%rsp)
  cltq
  shl    $0x3,%rax
  mov    %rax,0xb0(%rsp)
  movslq %ebx,%rax
  lea    0x0(,%rax,8),%r13
  movslq %esi,%rax
  lea    0x0(,%rax,8),%r12
  movl   $0x0,0xa8(%rsp)
  movl   $0x0,0xa0(%rsp)
  mov    $0x0,%ebp
  movslq 0x68(%rsp),%rax
  mov    %rax,0x100(%rsp)
  mov    0x70(%rsp),%rax
  add    $0x8,%rax
  mov    %rax,0x38(%rsp)
  mov    %r13,%rbx
  mov    %r14d,%r13d
  mov    %r15,0x40(%rsp)
  mov    %ebp,%r15d
  jmp    L1009
L63:
  cmpl   $0x0,0x18(%rsp)
  jle    L639
  mov    0x88(%rsp),%rax
  mov    %rax,0x78(%rsp)
  mov    0x80(%rsp),%rax
  mov    %rax,0x70(%rsp)
  movl   $0x0,0x68(%rsp)
L451:
  cmpl   $0x0,0x1c(%rsp)
  jle    L227
  mov    0x78(%rsp),%rax
  mov    %rax,0x20(%rsp)
  mov    0x70(%rsp),%rax
  mov    %rax,0x28(%rsp)
  movl   $0x0,0x6c(%rsp)
L1133:
  test   %r15d,%r15d
  jle    L759
  mov    $0x0,%r8d
  mov    $0x0,%r11d
L1153:
  cmp    %ebx,%r14d
  jle    L72
  lea    0x8(%r8),%r10d
  lea    0x7(%r8),%eax
  cmp    %r15d,%eax
  cmovge %r15d,%r10d
  movslq %r11d,%rax
  add    0x28(%rsp),%rax
  mov    0x40(%rsp),%rdi
  lea    (%rdi,%rax,8),%rdi
  mov    %r10d,%eax
  sub    %r8d,%eax
  lea    -0x1(%rax),%r9d
  mov    0x20(%rsp),%rax
  add    %r8,%rax
  add    %r9,%rax
  mov    0x38(%rsp),%rsi
  lea    (%rsi,%rax,8),%rcx
  mov    %ebx,%esi
  not    %r9
  shl    $0x3,%r9
L1190:
  cmp    %r8d,%r10d
  jle    L1091
  lea    (%r9,%rcx,1),%rax
  mov    %rdi,%rdx
L545:
  movapd %xmm0,%xmm1
  mulsd  (%rdx),%xmm1
  addsd  (%rax),%xmm1
  movsd  %xmm1,(%rax)
  add    $0x8,%rax
  add    %r12,%rdx
  cmp    %rax,%rcx
  jne    L545
L1091:
  add    $0x1,%esi
  add    %r13,%rdi
  add    %rbp,%rcx
  cmp    %esi,%r14d
  jne    L1190
L72:
  add    0x30(%rsp),%r11d
  add    $0x8,%r8
  cmp    %r8d,%r15d
  jg     L1153
L759:
  addl   $0x1,0x6c(%rsp)
  mov    0x6c(%rsp),%eax
  mov    0x100(%rsp),%rdi
  add    %rdi,0x28(%rsp)
  mov    0xf8(%rsp),%rsi
  add    %rsi,0x20(%rsp)
  cmp    %eax,0x1c(%rsp)
  jne    L1133
L227:
  addl   $0x1,0x68(%rsp)
  mov    0x68(%rsp),%eax
  mov    0xe8(%rsp),%rdi
  add    %rdi,0x70(%rsp)
  mov    0xf0(%rsp),%rsi
  add    %rsi,0x78(%rsp)
  cmp    %eax,0x18(%rsp)
  jne    L451
L639:
  addl   $0x1,0x58(%rsp)
  mov    0x58(%rsp),%eax
  mov    0xb8(%rsp),%rdi
  add    %rdi,0x80(%rsp)
  mov    0xc0(%rsp),%rsi
  add    %rsi,0x88(%rsp)
  cmp    %eax,0x14(%rsp)
  jne    L63
L637:
  addl   $0x1,0x48(%rsp)
  mov    0x48(%rsp),%eax
  mov    0xc8(%rsp),%rdi
  add    %rdi,0x90(%rsp)
  mov    0xd0(%rsp),%rsi
  add    %rsi,0x98(%rsp)
  cmp    %eax,0x10(%rsp)
  je     L176
L363:
  cmpl   $0x0,0x14(%rsp)
  jle    L637
  movslq 0x50(%rsp),%rax
  mov    %rax,0xb8(%rsp)
  movslq 0x60(%rsp),%rax
  mov    %rax,0xc0(%rsp)
  mov    0x98(%rsp),%rax
  mov    %rax,0x88(%rsp)
  mov    0x90(%rsp),%rax
  mov    %rax,0x80(%rsp)
  movl   $0x0,0x58(%rsp)
  movslq 0x54(%rsp),%rax
  mov    %rax,0xe8(%rsp)
  movslq 0x64(%rsp),%rax
  mov    %rax,0xf0(%rsp)
  jmp    L63
L176:
  mov    %r15d,%r13d
  mov    %ebx,%r15d
  mov    %rbp,%rbx
L961:
  add    $0x8,%r15d
  mov    0xd8(%rsp),%edi
  add    %edi,0xa0(%rsp)
  mov    0xe0(%rsp),%esi
  add    %esi,0xa8(%rsp)
  cmp    %r15d,0xc(%rsp)
  jle    L233
L1009:
  cmpl   $0x0,0x10(%rsp)
  jle    L961
  lea    0x8(%r15),%eax
  lea    0x7(%r15),%edx
  mov    0xc(%rsp),%edi
  cmp    %edx,%edi
  cmovle %edi,%eax
  mov    %eax,%ebp
  movslq 0x4c(%rsp),%rax
  mov    %rax,0xc8(%rsp)
  movslq 0xa0(%rsp),%rax
  mov    %rax,0x90(%rsp)
  movslq 0x5c(%rsp),%rax
  mov    %rax,0xd0(%rsp)
  movslq 0xa8(%rsp),%rax
  mov    %rax,0x98(%rsp)
  movl   $0x0,0x48(%rsp)
  movslq %r13d,%rax
  mov    %rax,0xf8(%rsp)
  mov    %ebp,%r14d
  mov    %rbx,%rbp
  mov    %r15d,%ebx
  mov    %r13d,%r15d
  mov    0xb0(%rsp),%r13
  jmp    L363
L523:
  mov    %r15d,%r14d
  mov    0x38(%rsp),%r15
  cmpl   $0x5,0x230(%rsp)
  jne    L233
  jmp    L38
L788:
  mov    %r12d,%r14d
  mov    0x38(%rsp),%r15
  cmpl   $0x5,0x238(%rsp)
  jne    L1225
  jmp    L1021
L1198:
  mov    0x38(%rsp),%r15
  cmpl   $0x5,0x240(%rsp)
  jne    L828
  jmp    L384
L1255:
  mov    0x28(%rsp),%r15
  cmpl   $0x5,0x248(%rsp)
  jne    L1292
  jmp    L529
L678:
  mov    %r9,%r15
  cmpl   $0x5,0x250(%rsp)
  je     L630
  cmpl   $0x5,0x248(%rsp)
  jne    L1292
  jmp    L529
L1199:
  cmpl   $0x5,0x238(%rsp)
  jne    L1225
  jmp    L233
L1315:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void tce_sortacc_6_scalar(double *unsorted, double *sorted, int a, int b, int c, int d, int e, int f, int i, int j, int k, int l, int m, int n, double factor) {
  int id[6], jd[6], ia, ib, j1, j2, j3, j4, j5, j6;
  int l1, l2, l3, l4, l5, l6;
  int ia1, ia2, ia3, ia4, ia5, ia6;
  int ib1, ib2, ib3, ib4, ib5, ib6;
  int rangea1, rangea2, rangea3, rangea4, rangea5, rangea6;
  int rangeb1, rangeb2, rangeb3, rangeb4, rangeb5, rangeb6;
  int range[6], order[6], order_r[6];
  int jj1, jj2, jj3, jj4, jj5, jj6;
  int jj1_bound, jj2_bound, jj3_bound, jj4_bound, jj5_bound, jj6_bound;
  int N1, N2;
  jd[0] = a;
  jd[1] = b;
  jd[2] = c;
  jd[3] = d;
  jd[4] = e;
  jd[5] = f;
  range[0] = b * c * d * e * f;
  range[1] = c * d * e * f;
  range[2] = d * e * f;
  range[3] = e * f;
  range[4] = f;
  range[5] = 1;
  l1 = jd[i];
  l2 = jd[j];
  l3 = jd[k];
  l4 = jd[l];
  l5 = jd[m];
  l6 = jd[n];
  rangea1 = range[i];
  rangea2 = range[j];
  rangea3 = range[k];
  rangea4 = range[l];
  rangea5 = range[m];
  rangea6 = range[n];
  rangeb1 = l2 * l3 * l4 * l5 * l6;
  rangeb2 = l3 * l4 * l5 * l6;
  rangeb3 = l4 * l5 * l6;
  rangeb4 = l5 * l6;
  rangeb5 = l6;
  rangeb6 = 1;
  if (n == 5) {
    for (j1 = 0; j1 < l1; j1++) {
      ia1 = j1 * rangea1;
      ib1 = j1 * rangeb1;
      for (j2 = 0; j2 < l2; j2++) {
        ia2 = ia1 + j2 * rangea2;
        ib2 = ib1 + j2 * rangeb2;
        for (j3 = 0; j3 < l3; j3++) {
          ia3 = ia2 + j3 * rangea3;
          ib3 = ib2 + j3 * rangeb3;
          for (j4 = 0; j4 < l4; j4++) {
            ia4 = ia3 + j4 * rangea4;
            ib4 = ib3 + j4 * rangeb4;
            for (j5 = 0; j5 < l5; j5++) {
              ia5 = ia4 + j5 * rangea5;
              ib5 = ib4 + j5 * rangeb5;
              for (j6 = 0; j6 < l6; j6++) {
                ia = ia5 + j6 * rangea6;
                ib = ib5 + j6 * rangeb6;
                sorted[ib] += unsorted[ia] * factor;
              }
            }
          }
        }
      }
    }
  }
  if (m == 5) {
    for (j1 = 0; j1 < l1; j1++) {
      ia1 = j1 * rangea1;
      ib1 = j1 * rangeb1;
      for (j2 = 0; j2 < l2; j2++) {
        ia2 = ia1 + j2 * rangea2;
        ib2 = ib1 + j2 * rangeb2;
        for (j3 = 0; j3 < l3; j3++) {
          ia3 = ia2 + j3 * rangea3;
          ib3 = ib2 + j3 * rangeb3;
          for (j4 = 0; j4 < l4; j4++) {
            ia4 = ia3 + j4 * rangea4;
            ib4 = ib3 + j4 * rangeb4;
            for (j5 = 0; j5 < l5; j5 += 8) {
              for (j6 = 0; j6 < l6; j6 += 8) {
                jj5_bound = (j5 + 8 > l5) ? l5 : j5 + 8;
                for (jj5 = j5; jj5 < jj5_bound; jj5++) {
                  ia5 = ia4 + jj5 * rangea5;
                  ib5 = ib4 + jj5 * rangeb5;
                  jj6_bound = (j6 + 8 > l6) ? l6 : j6 + 8;
                  for (jj6 = j6; jj6 < jj6_bound; jj6++) {
                    ia = ia5 + jj6 * rangea6;
                    ib = ib5 + jj6 * rangeb6;
                    sorted[ib] += unsorted[ia] * factor;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (l == 5) {
    for (j1 = 0; j1 < l1; j1++) {
      ia1 = j1 * rangea1;
      ib1 = j1 * rangeb1;
      for (j2 = 0; j2 < l2; j2++) {
        ia2 = ia1 + j2 * rangea2;
        ib2 = ib1 + j2 * rangeb2;
        for (j3 = 0; j3 < l3; j3++) {
          ia3 = ia2 + j3 * rangea3;
          ib3 = ib2 + j3 * rangeb3;
          for (j4 = 0; j4 < l4; j4 += 8) {
            for (j5 = 0; j5 < l5; j5++) {
              ia5 = ia3 + j5 * rangea5;
              ib5 = ib3 + j5 * rangeb5;
              for (j6 = 0; j6 < l6; j6 += 8) {
                jj4_bound = (j4 + 8 > l4) ? l4 : j4 + 8;
                for (jj4 = j4; jj4 < jj4_bound; jj4++) {
                  ia4 = ia5 + jj4 * rangea4;
                  ib4 = ib5 + jj4 * rangeb4;
                  jj6_bound = (j6 + 8 > l6) ? l6 : j6 + 8;
                  for (jj6 = j6; jj6 < jj6_bound; jj6++) {
                    ia = ia4 + jj6 * rangea6;
                    ib = ib4 + jj6 * rangeb6;
                    sorted[ib] += unsorted[ia] * factor;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (k == 5) {
    for (j1 = 0; j1 < l1; j1++) {
      ia1 = j1 * rangea1;
      ib1 = j1 * rangeb1;
      for (j2 = 0; j2 < l2; j2++) {
        ia2 = ia1 + j2 * rangea2;
        ib2 = ib1 + j2 * rangeb2;
        for (j3 = 0; j3 < l3; j3 += 8) {
          for (j4 = 0; j4 < l4; j4++) {
            ia4 = ia2 + j4 * rangea4;
            ib4 = ib2 + j4 * rangeb4;
            for (j5 = 0; j5 < l5; j5++) {
              ia5 = ia4 + j5 * rangea5;
              ib5 = ib4 + j5 * rangeb5;
              for (j6 = 0; j6 < l6; j6 += 8) {
                jj3_bound = (j3 + 8 > l3) ? l3 : j3 + 8;
                for (jj3 = j3; jj3 < jj3_bound; jj3++) {
                  ia3 = ia5 + jj3 * rangea3;
                  ib3 = ib5 + jj3 * rangeb3;
                  jj6_bound = (j6 + 8 > l6) ? l6 : j6 + 8;
                  for (jj6 = j6; jj6 < jj6_bound; jj6++) {
                    ia = ia3 + jj6 * rangea6;
                    ib = ib3 + jj6 * rangeb6;
                    sorted[ib] += unsorted[ia] * factor;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (j == 5) {
    for (j1 = 0; j1 < l1; j1++) {
      ia1 = j1 * rangea1;
      ib1 = j1 * rangeb1;
      for (j2 = 0; j2 < l2; j2 += 8) {
        for (j3 = 0; j3 < l3; j3++) {
          ia3 = ia1 + j3 * rangea3;
          ib3 = ib1 + j3 * rangeb3;
          for (j4 = 0; j4 < l4; j4++) {
            ia4 = ia3 + j4 * rangea4;
            ib4 = ib3 + j4 * rangeb4;
            for (j5 = 0; j5 < l5; j5++) {
              ia5 = ia4 + j5 * rangea5;
              ib5 = ib4 + j5 * rangeb5;
              for (j6 = 0; j6 < l6; j6 += 8) {
                jj2_bound = (j2 + 8 > l2) ? l2 : j2 + 8;
                for (jj2 = j2; jj2 < jj2_bound; jj2++) {
                  ia2 = ia5 + jj2 * rangea2;
                  ib2 = ib5 + jj2 * rangeb2;
                  jj6_bound = (j6 + 8 > l6) ? l6 : j6 + 8;
                  for (jj6 = j6; jj6 < jj6_bound; jj6++) {
                    ia = ia2 + jj6 * rangea6;
                    ib = ib2 + jj6 * rangeb6;
                    sorted[ib] += unsorted[ia] * factor;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (i == 5) {
    for (j1 = 0; j1 < l1; j1 += 8) {
      for (j2 = 0; j2 < l2; j2++) {
        ia2 = j2 * rangea2;
        ib2 = j2 * rangeb2;
        for (j3 = 0; j3 < l3; j3++) {
          ia3 = ia2 + j3 * rangea3;
          ib3 = ib2 + j3 * rangeb3;
          for (j4 = 0; j4 < l4; j4++) {
            ia4 = ia3 + j4 * rangea4;
            ib4 = ib3 + j4 * rangeb4;
            for (j5 = 0; j5 < l5; j5++) {
              ia5 = ia4 + j5 * rangea5;
              ib5 = ib4 + j5 * rangeb5;
              for (j6 = 0; j6 < l6; j6 += 8) {
                jj1_bound = (j1 + 8 > l1) ? l1 : j1 + 8;
                for (jj1 = j1; jj1 < jj1_bound; jj1++) {
                  ia1 = ia5 + jj1 * rangea1;
                  ib1 = ib5 + jj1 * rangeb1;
                  jj6_bound = (j6 + 8 > l6) ? l6 : j6 + 8;
                  for (jj6 = j6; jj6 < jj6_bound; jj6++) {
                    ia = ia1 + jj6 * rangea6;
                    ib = ib1 + jj6 * rangeb6;
                    sorted[ib] += unsorted[ia] * factor;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```