// File: /workspace/github_cpp_makefile_star2_O3/kaityo256[P]minlex/minlex.cpp
// Function: MinlexSearcher::search[abi:cxx11](Sudoku&)
std::string search(Sudoku &g) {
    min = max;
    std::vector<Sudoku> v;
    std::vector<int> vi;
    for (auto a : perm3) {
      Sudoku g2 = g.perm_rbox(a);
      v.push_back(g2);
      vi.push_back(g2.headbox_index(true));
    }
    Sudoku gt = g.transpose();
    for (auto a : perm3) {
      Sudoku g2 = gt.perm_rbox(a);
      v.push_back(g2);
      vi.push_back(g2.headbox_index(true));
    }
    int hb_min = *std::min_element(vi.begin(), vi.end());
    for (size_t i = 0; i < v.size(); i++) {
      if (vi[i] > hb_min) continue;
      perm_cbox(v[i], hb_min);
    }
    return min.str();
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
vmovups 0xf0(%rsi), %zmm0
vmovups 0x130(%rsi), %zmm1
vmovups 0x170(%rsi), %zmm2
vmovups 0x1a0(%rsi), %zmm3
leaq 0x30(%rsp), %r12
leaq 0x4671(%rip), %r14      # 0x7130
leaq 0x140(%rsp), %rbp
movq %rdx, %r15
movq %rdi, 0x48(%rsp)
movq %rsi, 0x28(%rsp)
xorl %ebx, %ebx
movq %rsp, %r13
vmovups %zmm0, (%rsi)
vxorps %xmm0, %xmm0, %xmm0
vmovups %zmm3, 0xb0(%rsi)
vmovups %zmm2, 0x80(%rsi)
vmovups %zmm1, 0x40(%rsi)
movq %rbx, 0x10(%r12)
movq %rbx, 0x10(%r13)
vmovaps %xmm0, (%r12)
vmovaps %xmm0, (%r13)
leaq (%r14,%rbx), %rdx
movq %rbp, %rdi
movq %r15, %rsi
vzeroupper
callq 0x2e14
movq %r12, %rdi
movq %rbp, %rsi
callq 0x2f44
movl $0x1, %esi
movq %rbp, %rdi
callq 0x2f7c
movq 0x8(%rsp), %rsi
movl %eax, 0x50(%rsp)
cmpq 0x10(%rsp), %rsi
je 0x2b57
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x2b64
leaq 0x50(%rsp), %rdx
movq %r13, %rdi
callq 0x3404
addq $0xc, %rbx
cmpq $0x48, %rbx
jne 0x2b10
leaq 0x140(%rsp), %rdi
movq %r15, %rsi
callq 0x30e2
leaq 0x50(%rsp), %r15
leaq 0x140(%rsp), %r12
leaq 0x30(%rsp), %r13
leaq 0x24(%rsp), %rbx
xorl %ebp, %ebp
leaq (%r14,%rbp), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2e14
movq %r13, %rdi
movq %r15, %rsi
callq 0x2f44
movl $0x1, %esi
movq %r15, %rdi
callq 0x2f7c
movq 0x8(%rsp), %rsi
movl %eax, 0x24(%rsp)
cmpq 0x10(%rsp), %rsi
je 0x2bdb
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x2be6
movq %rsp, %rdi
movq %rbx, %rdx
callq 0x3404
addq $0xc, %rbp
cmpq $0x48, %rbp
jne 0x2b97
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
cmpq %rax, %rcx
movq %rcx, %rdx
sete %sil
addq $0x4, %rdx
cmpq %rax, %rdx
sete %dil
orb %sil, %dil
je 0x2c1a
movq 0x28(%rsp), %r13
jmp 0x2c35
movl (%rcx), %esi
movq 0x28(%rsp), %r13
movl (%rdx), %edi
cmpl %esi, %edi
cmovll %edi, %esi
cmovlq %rdx, %rcx
addq $0x4, %rdx
cmpq %rax, %rdx
jne 0x2c21
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rax
cmpq %rsi, %rax
je 0x2c94
movl (%rcx), %ebx
movabsq $-0x1111111111111111, %r15 # imm = 0xEEEEEEEEEEEEEEEF
xorl %r14d, %r14d
xorl %r12d, %r12d
movq (%rsp), %rcx
cmpl %ebx, (%rcx,%r12,4)
jg 0x2c77
addq %r14, %rsi
movq %r13, %rdi
movl %ebx, %edx
callq 0x313e
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rax
movq %rax, %rcx
subq %rsi, %rcx
incq %r12
addq $0xf0, %r14
sarq $0x4, %rcx
imulq %r15, %rcx
cmpq %rcx, %r12
jb 0x2c56
movq 0x48(%rsp), %rbx
movq %r13, %rsi
movq %rbx, %rdi
callq 0x31ac
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2cb2
callq 0x20f0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x2cc1
callq 0x20f0
movq %rbx, %rax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2ce2
jmp 0x2ce2
jmp 0x2ce2
jmp 0x2ce2
jmp 0x2ce2
jmp 0x2ce2
movq (%rsp), %rdi
movq %rax, %rbx
testq %rdi, %rdi
je 0x2cf3
callq 0x20f0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x2d02
callq 0x20f0
movq %rbx, %rdi
callq 0x2190