// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rdx, %r15
movq %rdi, 0x48(%rsp)
vmovups 0xf0(%rsi), %zmm0
vmovups 0x130(%rsi), %zmm1
vmovups 0x170(%rsi), %zmm2
vmovups 0x1a0(%rsi), %zmm3
vmovups %zmm3, 0xb0(%rsi)
vmovups %zmm2, 0x80(%rsi)
vmovups %zmm1, 0x40(%rsi)
movq %rsi, 0x28(%rsp)
vmovups %zmm0, (%rsi)
xorl %ebx, %ebx
leaq 0x30(%rsp), %r12
movq %rbx, 0x10(%r12)
vxorps %xmm0, %xmm0, %xmm0
vmovaps %xmm0, (%r12)
movq %rsp, %r13
movq %rbx, 0x10(%r13)
vmovaps %xmm0, (%r13)
leaq 0x457a(%rip), %r14      # 0x7130
leaq 0x140(%rsp), %rbp
leaq (%r14,%rbx), %rdx
movq %rbp, %rdi
movq %r15, %rsi
vzeroupper
callq 0x2ec2
movq %r12, %rdi
movq %rbp, %rsi
callq 0x300c
movq %rbp, %rdi
movl $0x1, %esi
callq 0x3044
movl %eax, 0x50(%rsp)
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x2c05
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x2c12
movq %r13, %rdi
leaq 0x50(%rsp), %rdx
callq 0x34cc
addq $0xc, %rbx
cmpq $0x48, %rbx
jne 0x2bbe
leaq 0x140(%rsp), %rdi
movq %r15, %rsi
callq 0x31aa
xorl %ebp, %ebp
leaq 0x50(%rsp), %r15
leaq 0x140(%rsp), %r12
leaq 0x30(%rsp), %r13
leaq 0x24(%rsp), %rbx
leaq (%r14,%rbp), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2ec2
movq %r13, %rdi
movq %r15, %rsi
callq 0x300c
movq %r15, %rdi
movl $0x1, %esi
callq 0x3044
movl %eax, 0x24(%rsp)
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x2c89
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x2c94
movq %rsp, %rdi
movq %rbx, %rdx
callq 0x34cc
addq $0xc, %rbp
cmpq $0x48, %rbp
jne 0x2c45
movq (%rsp), %rdx
movq 0x8(%rsp), %rax
cmpq %rax, %rdx
sete %sil
movq %rdx, %rcx
addq $0x4, %rcx
cmpq %rax, %rcx
sete %dil
orb %sil, %dil
je 0x2ccb
movq %rdx, %rdi
movq 0x28(%rsp), %r13
jmp 0x2ce8
movq 0x28(%rsp), %r13
movl (%rcx), %esi
movq %rcx, %rdi
cmpl (%rdx), %esi
jl 0x2cdc
movq %rdx, %rdi
addq $0x4, %rcx
movq %rdi, %rdx
cmpq %rax, %rcx
jne 0x2cd0
movq 0x30(%rsp), %rsi
cmpq %rsi, 0x38(%rsp)
je 0x2d41
movl (%rdi), %ebx
xorl %r14d, %r14d
movabsq $-0x1111111111111111, %r15 # imm = 0xEEEEEEEEEEEEEEEF
xorl %r12d, %r12d
movq (%rsp), %rax
cmpl %ebx, (%rax,%r12,4)
jg 0x2d1d
addq %r14, %rsi
movq %r13, %rdi
movl %ebx, %edx
callq 0x3206
incq %r12
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rax
subq %rsi, %rax
sarq $0x4, %rax
imulq %r15, %rax
addq $0xf0, %r14
cmpq %rax, %r12
jb 0x2d06
movq 0x48(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3274
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2d5f
callq 0x20f0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x2d6e
callq 0x20f0
movq %rbx, %rax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2d8f
jmp 0x2d8f
jmp 0x2d8f
jmp 0x2d8f
jmp 0x2d8f
jmp 0x2d8f
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2da0
callq 0x20f0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x2daf
callq 0x20f0
movq %rbx, %rdi
callq 0x2190
nop