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

```asm
<test>:
  endbr64
  push   %r15
  movslq %edi,%rax
  push   %r14
  mov    %rax,%rcx
  push   %r13
  mov    %ecx,%edx
  push   %r12
  sar    $0x1f,%edx
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %eax,0x28(%rsp)
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  sub    %edx,%eax
  mov    %eax,0x10(%rsp)
  cmp    $0x4,%ecx
  jle    L213
  lea    -0x5(%rcx),%r13d
  mov    $0xaaaaaaab,%eax
  xor    %ebp,%ebp
  mov    $0x3,%r12d
  imul   %rax,%r13
  shr    $0x21,%r13
  test   %ebp,%ebp
  je     L279
L103:
  lea    -0x2(%r12),%ebx
  cmp    %ebx,%r12d
  jl     L635
L555:
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %ebx,%edi
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <hash@plt>
  mov    %ebp,%edi
  xor    %eax,%eax
  call   <hash@plt>
  cmp    %r12d,%ebx
  jle    L555
L635:
  lea    0x1(%rbp),%eax
  add    $0x3,%r12d
  cmp    %r13d,%ebp
  je     L189
  mov    %eax,%ebp
  test   %ebp,%ebp
  jne    L103
L279:
  mov    $0x1,%ebx
  jmp    L555
L213:
  cmpl   $0x1,0x28(%rsp)
  je     L433
  jle    L450
L93:
  mov    $0x1,%edi
  xor    %eax,%eax
  mov    $0x1,%ebx
  mov    $0x5,%r12d
  call   <hash@plt>
  mov    $0x1,%edi
  xor    %eax,%eax
  mov    $0xfffffffe,%r15d
  call   <hash@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    0x28(%rsp),%edx
  mov    $0x4,%eax
  sub    %edx,%eax
  sub    %edx,%r12d
  lea    -0x1(%rdx),%r13d
  cmp    %eax,%edx
  mov    $0x2,%eax
  mov    %r13d,%ebp
  cmovle %eax,%r12d
  cmp    %r12d,%ebx
  jg     L126
L267:
  movslq %ebp,%rax
  mov    %ebp,%r14d
  imul   $0x55555556,%rax,%rax
  sar    $0x1f,%r14d
  shr    $0x20,%rax
  sub    %eax,%r14d
  mov    %r15d,%eax
  sub    %ebp,%eax
  cmp    $0xfffffffc,%eax
  mov    $0x0,%eax
  cmovge %eax,%r14d
  jmp    L633
L231:
  cmp    $0x3,%ebx
  je     L360
  cmpl   $0x2,0x28(%rsp)
  jg     L360
  mov    $0x2,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %ebx,%edi
  xor    %eax,%eax
  call   <hash@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <hash@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <hash@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <hash@plt>
L360:
  mov    $0x1,%eax
L633:
  cmp    %r14d,%eax
  jle    L231
  add    $0x1,%ebx
  add    $0x1,%ebp
  cmp    %r12d,%ebx
  jle    L267
L126:
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    $0x2,%edi
  xor    %eax,%eax
  call   <hash@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <hash@plt>
  cmpl   $0x2,0x28(%rsp)
  jle    L649
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    $0x3,%edi
  xor    %eax,%eax
  call   <hash@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <hash@plt>
L649:
  mov    0x28(%rsp),%r12d
  mov    $0x5,%r14d
  mov    %r13d,0xc(%rsp)
  mov    $0x1,%ebp
  sub    %r12d,%r14d
  cmp    %r12d,%r14d
  cmovg  %r12d,%r14d
L204:
  mov    0xc(%rsp),%r15d
  add    $0x1,%ebp
  mov    $0x1,%ebx
  test   %r14d,%r14d
  jle    L326
L201:
  movslq %r15d,%rax
  mov    %r15d,%r13d
  imul   $0x55555556,%rax,%rax
  sar    $0x1f,%r13d
  shr    $0x20,%rax
  sub    %eax,%r13d
  mov    $0xfffffffe,%eax
  sub    %r15d,%eax
  cmp    $0xfffffffc,%eax
  mov    $0x0,%eax
  cmovge %eax,%r13d
  jmp    L529
L599:
  cmp    $0x3,%ebx
  je     L504
  cmp    $0x2,%r12d
  jg     L504
  mov    $0x2,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %ebp,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %ebx,%edi
  xor    %eax,%eax
  call   <hash@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <hash@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <hash@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <hash@plt>
L504:
  mov    $0x1,%eax
L529:
  cmp    %r13d,%eax
  jle    L599
  add    $0x1,%ebx
  add    $0x1,%r15d
  cmp    %r14d,%ebx
  jle    L201
L326:
  cmp    %ebp,%r12d
  jg     L204
  cmpl   $0x3,0x28(%rsp)
  mov    0xc(%rsp),%r13d
  jle    L186
  cmpl   $0x4,0x28(%rsp)
  je     L186
L642:
  mov    0x28(%rsp),%eax
  lea    -0x2(%rax),%edx
  mov    $0xaaaaaaab,%eax
  imul   %rax,%rdx
  shr    $0x21,%rdx
L2:
  mov    0x28(%rsp),%ebx
  mov    $0x3,%eax
  movslq %r13d,%rcx
  sar    $0x1f,%r13d
  imul   $0x55555556,%rcx,%rcx
  mov    %edx,0x14(%rsp)
  sub    %ebx,%eax
  movslq %eax,%rsi
  sar    $0x1f,%eax
  imul   $0x55555556,%rsi,%rsi
  shr    $0x20,%rcx
  sub    %r13d,%ecx
  shr    $0x20,%rsi
  sub    %esi,%eax
  test   %ebx,%ebx
  mov    0x10(%rsp),%esi
  cmovg  %ecx,%eax
  mov    %eax,0x40(%rsp)
  mov    $0x2,%eax
  sub    %ebx,%eax
  movslq %eax,%rcx
  sar    $0x1f,%eax
  imul   $0x55555556,%rcx,%rcx
  shr    $0x20,%rcx
  sub    %ecx,%eax
  mov    %ebx,%ecx
  cmp    $0x1,%ebx
  mov    %esi,%ebx
  cmovle %eax,%ebx
  test   %ecx,%ecx
  cmovns %esi,%eax
  mov    %ebx,0x30(%rsp)
  mov    0x14(%rsp),%ebx
  mov    %eax,0x34(%rsp)
  lea    (%rdx,%rdx,2),%eax
  mov    %eax,0x38(%rsp)
  mov    $0x5,%eax
  sub    %ecx,%eax
  mov    %eax,0x3c(%rsp)
  mov    0x40(%rsp),%eax
  cmp    %eax,%ebx
  jg     L168
L238:
  mov    0x3c(%rsp),%ecx
  mov    0x38(%rsp),%edx
  mov    %ecx,%eax
  add    %edx,%eax
  test   %eax,%eax
  jle    L576
  mov    0x28(%rsp),%esi
  mov    $0x1,%r15d
  mov    %esi,%eax
  sub    %edx,%eax
  mov    %eax,0x18(%rsp)
  mov    %edx,%eax
  sub    %esi,%eax
  sub    $0x1,%eax
  mov    %eax,0xc(%rsp)
  lea    -0x1(%rdx),%eax
  mov    %eax,0x20(%rsp)
  lea    (%rbx,%rbx,2),%eax
  add    %ecx,%eax
  mov    %eax,0x24(%rsp)
L235:
  mov    0x18(%rsp),%eax
  mov    0x14(%rsp),%r12d
  lea    -0x1(%rax),%edx
  movslq %edx,%rax
  sar    $0x1f,%edx
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  sub    %eax,%edx
  mov    0x20(%rsp),%eax
  mov    %edx,0x1c(%rsp)
  lea    0x2(%rax),%r14d
  xchg   %ax,%ax
L655:
  mov    0x14(%rsp),%r13d
  xor    %eax,%eax
  sub    %r12d,%r13d
  cmpl   $0xfffffffc,0xc(%rsp)
  jge    L136
  cmpl   $0x3,0x18(%rsp)
  cmovg  0x1c(%rsp),%eax
L136:
  cmp    %r13d,%eax
  jl     L628
  mov    %r14d,%edx
  sub    $0x2,%edx
  js     L81
  mov    %r14d,%ebx
  mov    $0xaaaaaaab,%eax
  imul   %rax,%rbx
  shr    $0x21,%rbx
L409:
  mov    0x30(%rsp),%eax
  mov    %r14d,%ecx
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  movslq %r14d,%rax
  sar    $0x1f,%ecx
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  mov    %eax,%ebp
  mov    $0x2,%eax
  sub    %r14d,%eax
  sub    %ecx,%ebp
  movslq %eax,%rcx
  sar    $0x1f,%eax
  imul   $0x55555556,%rcx,%rcx
  shr    $0x20,%rcx
  sub    %ecx,%eax
  cmp    $0xfffffffe,%edx
  cmovl  %eax,%ebp
  mov    0x34(%rsp),%eax
  cmp    %eax,%ebp
  cmovg  %eax,%ebp
  jmp    L237
  nopl   (%rax)
L443:
  mov    $0x2,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %r15d,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %r13d,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %ebx,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %r12d,%edi
  xor    %eax,%eax
  sub    %ebx,%edi
  add    $0x1,%ebx
  call   <hash@plt>
L237:
  cmp    %ebx,%ebp
  jge    L443
  sub    $0x3,%r14d
  sub    $0x1,%r12d
  jmp    L655
L81:
  mov    $0x2,%ebx
  sub    %r14d,%ebx
  movslq %ebx,%rax
  sar    $0x1f,%ebx
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  sub    %eax,%ebx
  jmp    L409
L628:
  addl   $0x1,0x18(%rsp)
  add    $0x1,%r15d
  subl   $0x1,0xc(%rsp)
  subl   $0x1,0x20(%rsp)
  cmp    0x24(%rsp),%r15d
  jle    L235
L576:
  mov    0x38(%rsp),%eax
  mov    0x28(%rsp),%ebp
  lea    0x1(%rax),%ebx
  add    $0x3,%eax
  cmp    %ebp,%eax
  mov    %eax,0x38(%rsp)
  cmovle %eax,%ebp
  cmp    %ebx,%ebp
  jl     L545
L278:
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %ebx,%edi
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <hash@plt>
  mov    0x14(%rsp),%edi
  xor    %eax,%eax
  call   <hash@plt>
  cmp    %ebx,%ebp
  jge    L278
L545:
  cmpl   $0x1,0x28(%rsp)
  jle    L604
  mov    0x14(%rsp),%eax
  mov    0x3c(%rsp),%edx
  mov    $0x1,%r15d
  mov    0x28(%rsp),%ecx
  lea    (%rax,%rax,2),%eax
  add    %eax,%edx
  mov    %edx,0x2c(%rsp)
  mov    %ecx,%edx
  sub    %eax,%edx
  mov    %edx,0x44(%rsp)
  mov    %eax,%edx
  sub    $0x1,%eax
  sub    %ecx,%edx
  mov    %eax,0x4c(%rsp)
  sub    $0x1,%edx
  mov    %edx,0x48(%rsp)
L259:
  mov    0x2c(%rsp),%edx
  add    $0x1,%r15d
  test   %edx,%edx
  jle    L291
  mov    0x4c(%rsp),%eax
  mov    $0x1,%r14d
  mov    %eax,0x24(%rsp)
  mov    0x48(%rsp),%eax
  mov    %eax,0x18(%rsp)
  mov    0x44(%rsp),%eax
  mov    %eax,0x1c(%rsp)
  nopl   0x0(%rax,%rax,1)
L316:
  mov    0x1c(%rsp),%eax
  mov    0x14(%rsp),%r12d
  lea    -0x1(%rax),%edx
  movslq %edx,%rax
  sar    $0x1f,%edx
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  sub    %eax,%edx
  mov    0x24(%rsp),%eax
  mov    %edx,0x20(%rsp)
  add    $0x2,%eax
  mov    %eax,0xc(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L607:
  mov    0x14(%rsp),%r13d
  xor    %eax,%eax
  sub    %r12d,%r13d
  cmpl   $0xfffffffc,0x18(%rsp)
  jge    L630
  cmpl   $0x3,0x1c(%rsp)
  cmovg  0x20(%rsp),%eax
L630:
  cmp    %r13d,%eax
  jl     L653
  mov    0xc(%rsp),%eax
  mov    %eax,%edx
  sub    $0x2,%edx
  js     L486
  mov    0xc(%rsp),%ebx
  mov    $0xaaaaaaab,%eax
  imul   %rax,%rbx
  shr    $0x21,%rbx
L50:
  mov    0x10(%rsp),%esi
  mov    0xc(%rsp),%ecx
  cmp    %esi,%ebx
  movslq %ecx,%rbp
  cmovl  %esi,%ebx
  mov    %rbp,%rax
  imul   $0x55555556,%rbp,%rbp
  sar    $0x1f,%eax
  shr    $0x20,%rbp
  sub    %eax,%ebp
  mov    $0x2,%eax
  sub    %ecx,%eax
  movslq %eax,%rcx
  sar    $0x1f,%eax
  imul   $0x55555556,%rcx,%rcx
  shr    $0x20,%rcx
  sub    %ecx,%eax
  cmp    $0xfffffffe,%edx
  cmovl  %eax,%ebp
  cmp    %esi,%ebp
  cmovg  %esi,%ebp
  jmp    L436
  xchg   %ax,%ax
L467:
  mov    $0x2,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %r15d,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %r14d,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %r13d,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %ebx,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %r12d,%edi
  xor    %eax,%eax
  sub    %ebx,%edi
  add    $0x1,%ebx
  call   <hash@plt>
L436:
  cmp    %ebx,%ebp
  jge    L467
  subl   $0x3,0xc(%rsp)
  sub    $0x1,%r12d
  jmp    L607
  nopl   0x0(%rax)
L486:
  mov    $0x2,%ebx
  sub    %eax,%ebx
  movslq %ebx,%rax
  sar    $0x1f,%ebx
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  sub    %eax,%ebx
  jmp    L50
  nopw   0x0(%rax,%rax,1)
L653:
  addl   $0x1,0x1c(%rsp)
  add    $0x1,%r14d
  subl   $0x1,0x18(%rsp)
  subl   $0x1,0x24(%rsp)
  cmp    0x2c(%rsp),%r14d
  jle    L316
L291:
  cmp    %r15d,0x28(%rsp)
  jne    L259
L604:
  addl   $0x1,0x14(%rsp)
  mov    0x40(%rsp),%eax
  mov    0x14(%rsp),%ebx
  cmp    %eax,%ebx
  jle    L238
L168:
  mov    0x28(%rsp),%ecx
  test   %ecx,%ecx
  jle    L381
  mov    $0xaaaaaaab,%edx
  lea    0x2(%rcx),%eax
  imul   %rdx,%rax
  shr    $0x21,%rax
  mov    %eax,0x18(%rsp)
  mov    %rax,%rsi
  lea    0x1(%rcx,%rcx,1),%eax
  imul   %rdx,%rax
  shr    $0x21,%rax
  cmp    %esi,%eax
  jl     L381
  xor    %edx,%edx
  cmp    $0x1,%ecx
  cmovne 0x10(%rsp),%edx
  add    $0x1,%eax
  mov    %eax,0x40(%rsp)
  mov    %edx,0x20(%rsp)
  lea    (%rsi,%rsi,2),%edx
  sub    %ecx,%edx
  mov    %edx,0x34(%rsp)
L371:
  mov    0x34(%rsp),%edx
  mov    0x28(%rsp),%ecx
  mov    %edx,%eax
  add    %ecx,%eax
  mov    %eax,0x38(%rsp)
  mov    $0x2,%eax
  cmp    %eax,%edx
  cmovge %edx,%eax
  sub    $0x1,%eax
  mov    %eax,0x3c(%rsp)
  lea    0x5(%rdx),%eax
  add    $0x4,%edx
  cmp    %edx,%ecx
  cmovle %ecx,%eax
  xor    %r15d,%r15d
  mov    %eax,0x2c(%rsp)
  mov    0x18(%rsp),%eax
  lea    (%rax,%rax,2),%eax
  mov    %eax,0x30(%rsp)
L253:
  mov    0x38(%rsp),%eax
  sub    0x3c(%rsp),%eax
  add    $0x1,%r15d
  mov    %eax,%edx
  sub    0x28(%rsp),%edx
  mov    %eax,0x24(%rsp)
  mov    %edx,0x14(%rsp)
L345:
  mov    0x30(%rsp),%r14d
  sub    0x24(%rsp),%r14d
  cmp    %r14d,0x2c(%rsp)
  jl     L632
  mov    0x14(%rsp),%eax
  xor    %ecx,%ecx
  test   %eax,%eax
  js     L623
  je     L623
  mov    0x14(%rsp),%eax
  lea    0x2(%rax),%ecx
  mov    $0xaaaaaaab,%eax
  imul   %rax,%rcx
  shr    $0x21,%rcx
L623:
  mov    $0xfffffffe,%eax
  sub    0x14(%rsp),%eax
  mov    0x18(%rsp),%r12d
  movslq %eax,%rdx
  sar    $0x1f,%eax
  imul   $0x55555556,%rdx,%rdx
  sub    %ecx,%r12d
  shr    $0x20,%rdx
  sub    %edx,%eax
  lea    (%rcx,%rcx,2),%edx
  mov    %eax,0x1c(%rsp)
  mov    0x24(%rsp),%eax
  sub    %edx,%eax
  add    $0x2,%eax
  mov    %eax,0xc(%rsp)
  nopl   0x0(%rax,%rax,1)
L354:
  mov    0x18(%rsp),%r13d
  xor    %eax,%eax
  sub    %r12d,%r13d
  cmpl   $0xfffffffc,0x14(%rsp)
  cmovl  0x1c(%rsp),%eax
  cmp    %r13d,%eax
  jl     L137
  mov    0xc(%rsp),%eax
  mov    %eax,%edx
  sub    $0x2,%edx
  js     L592
  mov    0xc(%rsp),%ebx
  mov    $0xaaaaaaab,%eax
  imul   %rax,%rbx
  shr    $0x21,%rbx
L294:
  mov    0x20(%rsp),%eax
  mov    0xc(%rsp),%ecx
  cmp    %eax,%ebx
  movslq %ecx,%rbp
  cmovl  %eax,%ebx
  mov    %rbp,%rax
  imul   $0x55555556,%rbp,%rbp
  sar    $0x1f,%eax
  shr    $0x20,%rbp
  sub    %eax,%ebp
  mov    $0x2,%eax
  sub    %ecx,%eax
  movslq %eax,%rcx
  sar    $0x1f,%eax
  imul   $0x55555556,%rcx,%rcx
  shr    $0x20,%rcx
  sub    %ecx,%eax
  cmp    $0xfffffffe,%edx
  cmovl  %eax,%ebp
  mov    0x10(%rsp),%eax
  cmp    %eax,%ebp
  cmovg  %eax,%ebp
  jmp    L551
  nopl   0x0(%rax,%rax,1)
L229:
  mov    $0x2,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %r15d,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %r14d,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %r13d,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %ebx,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    %r12d,%edi
  xor    %eax,%eax
  sub    %ebx,%edi
  add    $0x1,%ebx
  call   <hash@plt>
L551:
  cmp    %ebx,%ebp
  jge    L229
  subl   $0x3,0xc(%rsp)
  sub    $0x1,%r12d
  jmp    L354
  nopl   0x0(%rax)
L592:
  mov    $0x2,%ebx
  sub    %eax,%ebx
  movslq %ebx,%rax
  sar    $0x1f,%ebx
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  sub    %eax,%ebx
  jmp    L294
L137:
  subl   $0x1,0x14(%rsp)
  subl   $0x1,0x24(%rsp)
  jmp    L345
L632:
  cmp    %r15d,0x28(%rsp)
  jne    L253
  addl   $0x1,0x18(%rsp)
  mov    0x18(%rsp),%eax
  addl   $0x3,0x34(%rsp)
  cmp    0x40(%rsp),%eax
  jne    L371
L381:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L450:
  mov    0x28(%rsp),%eax
  lea    -0x1(%rax),%r13d
L186:
  mov    $0x1,%edx
  jmp    L2
L433:
  mov    $0x1,%edi
  xor    %eax,%eax
  xor    %r13d,%r13d
  call   <hash@plt>
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <hash@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    $0x2,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <hash@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <hash@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <hash@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <hash@plt>
  mov    $0x1,%edx
  jmp    L2
L189:
  mov    0x28(%rsp),%eax
  cmp    $0x4,%eax
  jbe    L93
  lea    -0x1(%rax),%r13d
  jmp    L642
```

assistant: ```c
void test(int n) {
  int c1, c2;
  int i, j, k, p, q;
  for (c1 = 0; c1 <= (((n - 5) < 0) ? -((-(n - 5) + (3) - 1) / (3)) : (n - 5) / (3)); c1++) {
    for (i = ((3 * c1 + 1) > (1) ? (3 * c1 + 1) : (1)); i <= 3 * c1 + 3; i++) {
      {
        hash(1);
        hash(i);
        hash(c1);
      };
    }
  }
  if (n == 1) {
    {
      hash(1);
      hash(1);
      hash(0);
    };
    for (k = 0; k <= ((0) < (0) ? (0) : (0)); k++) {
      for (p = ((0) > ((((-3 * k - 1) < 0) ? -((-(-3 * k - 1)) / (3)) : ((-3 * k - 1) + (3) - 1) / (3))) ? (0) : ((((-3 * k - 1) < 0) ? -((-(-3 * k - 1)) / (3)) : ((-3 * k - 1) + (3) - 1) / (3)))); p <= (((((-3 * k + 1) < 0) ? -((-(-3 * k + 1) + (3) - 1) / (3)) : (-3 * k + 1) / (3))) < (0) ? ((((-3 * k + 1) < 0) ? -((-(-3 * k + 1) + (3) - 1) / (3)) : (-3 * k + 1) / (3))) : (0)); p++) {
        q = -k - p;
        {
          hash(2);
          hash(1);
          hash(1);
          hash(k);
          hash(p);
          hash(-k - p);
        };
      }
    }
  }
  if (n >= 2) {
    for (c1 = ((0) > ((((n - 4) < 0) ? -((-(n - 4)) / (3)) : ((n - 4) + (3) - 1) / (3))) ? (0) : ((((n - 4) < 0) ? -((-(n - 4)) / (3)) : ((n - 4) + (3) - 1) / (3)))); c1 <= 0; c1++) {
      {
        hash(1);
        hash(1);
        hash(c1);
      };
      for (j = 1; j <= ((n) < (3 * c1 - n + 5) ? (n) : (3 * c1 - n + 5)); j++) {
        for (k = 0; k <= (((3 * c1 - j - n + 4) < 0) ? -((-(3 * c1 - j - n + 4) + (3) - 1) / (3)) : (3 * c1 - j - n + 4) / (3)); k++) {
          for (p = (((n - 2) < 0) ? -((-(n - 2)) / (3)) : ((n - 2) + (3) - 1) / (3)); p <= (((3 * c1 - j - 3 * k + 2) < 0) ? -((-(3 * c1 - j - 3 * k + 2) + (3) - 1) / (3)) : (3 * c1 - j - 3 * k + 2) / (3)); p++) {
            q = c1 - k - p;
            {
              hash(2);
              hash(1);
              hash(j);
              hash(k);
              hash(p);
              hash(c1 - k - p);
            };
          }
        }
      }
      for (i = 2; i <= ((n) < (3 * c1 + 3) ? (n) : (3 * c1 + 3)); i++) {
        {
          hash(1);
          hash(i);
          hash(c1);
        };
      }
      for (c2 = 1; c2 <= n - 1; c2++) {
        i = c2 + 1;
        for (j = 1; j <= ((3 * c1 - n + 5) < (n) ? (3 * c1 - n + 5) : (n)); j++) {
          for (k = 0; k <= (((3 * c1 - j - n + 4) < 0) ? -((-(3 * c1 - j - n + 4) + (3) - 1) / (3)) : (3 * c1 - j - n + 4) / (3)); k++) {
            for (p = (((n - 2) < 0) ? -((-(n - 2)) / (3)) : ((n - 2) + (3) - 1) / (3)); p <= (((3 * c1 - j - 3 * k + 2) < 0) ? -((-(3 * c1 - j - 3 * k + 2) + (3) - 1) / (3)) : (3 * c1 - j - 3 * k + 2) / (3)); p++) {
              q = c1 - k - p;
              {
                hash(2);
                hash(c2 + 1);
                hash(j);
                hash(k);
                hash(p);
                hash(c1 - k - p);
              };
            }
          }
        }
      }
    }
  }
  for (c1 = ((1) > ((((n - 4) < 0) ? -((-(n - 4)) / (3)) : ((n - 4) + (3) - 1) / (3))) ? (1) : ((((n - 4) < 0) ? -((-(n - 4)) / (3)) : ((n - 4) + (3) - 1) / (3)))); c1 <= (((n - 1) < 0) ? -((-(n - 1) + (3) - 1) / (3)) : (n - 1) / (3)); c1++) {
    for (j = 1; j <= 3 * c1 - n + 5; j++) {
      for (k = 0; k <= (((((3 * c1 - j - n + 4) < 0) ? -((-(3 * c1 - j - n + 4) + (3) - 1) / (3)) : (3 * c1 - j - n + 4) / (3))) < (0) ? ((((3 * c1 - j - n + 4) < 0) ? -((-(3 * c1 - j - n + 4) + (3) - 1) / (3)) : (3 * c1 - j - n + 4) / (3))) : (0)); k++) {
        for (p = (((((n - 2) < 0) ? -((-(n - 2)) / (3)) : ((n - 2) + (3) - 1) / (3))) > ((((3 * c1 - j - 3 * k) < 0) ? -((-(3 * c1 - j - 3 * k)) / (3)) : ((3 * c1 - j - 3 * k) + (3) - 1) / (3))) ? ((((n - 2) < 0) ? -((-(n - 2)) / (3)) : ((n - 2) + (3) - 1) / (3))) : ((((3 * c1 - j - 3 * k) < 0) ? -((-(3 * c1 - j - 3 * k)) / (3)) : ((3 * c1 - j - 3 * k) + (3) - 1) / (3)))); p <= (((((3 * c1 - j - 3 * k + 2) < 0) ? -((-(3 * c1 - j - 3 * k + 2) + (3) - 1) / (3)) : (3 * c1 - j - 3 * k + 2) / (3))) < ((((n) < 0) ? -((-(n) + (3) - 1) / (3)) : (n) / (3))) ? ((((3 * c1 - j - 3 * k + 2) < 0) ? -((-(3 * c1 - j - 3 * k + 2) + (3) - 1) / (3)) : (3 * c1 - j - 3 * k + 2) / (3))) : ((((n) < 0) ? -((-(n) + (3) - 1) / (3)) : (n) / (3)))); p++) {
          q = c1 - k - p;
          {
            hash(2);
            hash(1);
            hash(j);
            hash(k);
            hash(p);
            hash(c1 - k - p);
          };
        }
      }
    }
    for (i = 3 * c1 + 1; i <= ((n) < (3 * c1 + 3) ? (n) : (3 * c1 + 3)); i++) {
      {
        hash(1);
        hash(i);
        hash(c1);
      };
    }
    for (c2 = 1; c2 <= n - 1; c2++) {
      i = c2 + 1;
      for (j = 1; j <= 3 * c1 - n + 5; j++) {
        for (k = 0; k <= (((((3 * c1 - j - n + 4) < 0) ? -((-(3 * c1 - j - n + 4) + (3) - 1) / (3)) : (3 * c1 - j - n + 4) / (3))) < (0) ? ((((3 * c1 - j - n + 4) < 0) ? -((-(3 * c1 - j - n + 4) + (3) - 1) / (3)) : (3 * c1 - j - n + 4) / (3))) : (0)); k++) {
          for (p = (((((n - 2) < 0) ? -((-(n - 2)) / (3)) : ((n - 2) + (3) - 1) / (3))) > ((((3 * c1 - j - 3 * k) < 0) ? -((-(3 * c1 - j - 3 * k)) / (3)) : ((3 * c1 - j - 3 * k) + (3) - 1) / (3))) ? ((((n - 2) < 0) ? -((-(n - 2)) / (3)) : ((n - 2) + (3) - 1) / (3))) : ((((3 * c1 - j - 3 * k) < 0) ? -((-(3 * c1 - j - 3 * k)) / (3)) : ((3 * c1 - j - 3 * k) + (3) - 1) / (3)))); p <= (((((3 * c1 - j - 3 * k + 2) < 0) ? -((-(3 * c1 - j - 3 * k + 2) + (3) - 1) / (3)) : (3 * c1 - j - 3 * k + 2) / (3))) < ((((n) < 0) ? -((-(n) + (3) - 1) / (3)) : (n) / (3))) ? ((((3 * c1 - j - 3 * k + 2) < 0) ? -((-(3 * c1 - j - 3 * k + 2) + (3) - 1) / (3)) : (3 * c1 - j - 3 * k + 2) / (3))) : ((((n) < 0) ? -((-(n) + (3) - 1) / (3)) : (n) / (3)))); p++) {
            q = c1 - k - p;
            {
              hash(2);
              hash(c2 + 1);
              hash(j);
              hash(k);
              hash(p);
              hash(c1 - k - p);
            };
          }
        }
      }
    }
  }
  if (n >= 1) {
    for (c1 = (((n) < 0) ? -((-(n)) / (3)) : ((n) + (3) - 1) / (3)); c1 <= (((2 * n + 1) < 0) ? -((-(2 * n + 1) + (3) - 1) / (3)) : (2 * n + 1) / (3)); c1++) {
      for (c2 = 0; c2 <= n - 1; c2++) {
        i = c2 + 1;
        for (j = ((1) > (3 * c1 - n - 1) ? (1) : (3 * c1 - n - 1)); j <= ((n) < (3 * c1 - n + 5) ? (n) : (3 * c1 - n + 5)); j++) {
          for (k = (((((3 * c1 - j - n) < 0) ? -((-(3 * c1 - j - n)) / (3)) : ((3 * c1 - j - n) + (3) - 1) / (3))) > (0) ? ((((3 * c1 - j - n) < 0) ? -((-(3 * c1 - j - n)) / (3)) : ((3 * c1 - j - n) + (3) - 1) / (3))) : (0)); k <= (((((3 * c1 - j - n + 4) < 0) ? -((-(3 * c1 - j - n + 4) + (3) - 1) / (3)) : (3 * c1 - j - n + 4) / (3))) < (0) ? ((((3 * c1 - j - n + 4) < 0) ? -((-(3 * c1 - j - n + 4) + (3) - 1) / (3)) : (3 * c1 - j - n + 4) / (3))) : (0)); k++) {
            for (p = (((((n - 2) < 0) ? -((-(n - 2)) / (3)) : ((n - 2) + (3) - 1) / (3))) > ((((3 * c1 - j - 3 * k) < 0) ? -((-(3 * c1 - j - 3 * k)) / (3)) : ((3 * c1 - j - 3 * k) + (3) - 1) / (3))) ? ((((n - 2) < 0) ? -((-(n - 2)) / (3)) : ((n - 2) + (3) - 1) / (3))) : ((((3 * c1 - j - 3 * k) < 0) ? -((-(3 * c1 - j - 3 * k)) / (3)) : ((3 * c1 - j - 3 * k) + (3) - 1) / (3)))); p <= (((((3 * c1 - j - 3 * k + 2) < 0) ? -((-(3 * c1 - j - 3 * k + 2) + (3) - 1) / (3)) : (3 * c1 - j - 3 * k + 2) / (3))) < ((((n) < 0) ? -((-(n) + (3) - 1) / (3)) : (n) / (3))) ? ((((3 * c1 - j - 3 * k + 2) < 0) ? -((-(3 * c1 - j - 3 * k + 2) + (3) - 1) / (3)) : (3 * c1 - j - 3 * k + 2) / (3))) : ((((n) < 0) ? -((-(n) + (3) - 1) / (3)) : (n) / (3)))); p++) {
              q = c1 - k - p;
              {
                hash(2);
                hash(c2 + 1);
                hash(j);
                hash(k);
                hash(p);
                hash(c1 - k - p);
              };
            }
          }
        }
      }
    }
  }
}
```