// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::perm_columns(int*, int*, int*)
Sudoku perm_columns(int ai[3], int aj[3], int ak[3]) {
    mbit bdata2[9];
    mbit v[9];
    for (int i = 0; i < 9; i++) {
      for (int j = 0; j < 9; j++) {
        v[j] = (bdata[i] & column_bits[j]) >> (8 - j);
      }
      bdata2[i] = v[ai[0]] << 8;
      bdata2[i] |= v[ai[1]] << 7;
      bdata2[i] |= v[ai[2]] << 6;
      bdata2[i] |= v[aj[0] + 3] << 5;
      bdata2[i] |= v[aj[1] + 3] << 4;
      bdata2[i] |= v[aj[2] + 3] << 3;
      bdata2[i] |= v[ak[0] + 6] << 2;
      bdata2[i] |= v[ak[1] + 6] << 1;
      bdata2[i] |= v[ak[2] + 6] << 0;
    }
    return Sudoku(bdata2);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movslq (%rdx), %rax
movslq (%rcx), %r9
movq %rdi, (%rsp)
movslq 0x4(%rcx), %rdi
addq $0x60, %rsi
movslq 0x8(%rcx), %rcx
leaq 0x448e(%rip), %rbx      # 0x81b0
xorl %ebp, %ebp
movq %rsi, 0x50(%rsp)
leaq 0x60(%rsp), %rsi
shlq $0x4, %rax
shlq $0x4, %r9
shlq $0x4, %rdi
shlq $0x4, %rcx
leaq 0x60(%rsp,%rax), %rax
leaq 0x30(%rcx,%rsi), %rcx
movq %rax, 0x48(%rsp)
movslq 0x4(%rdx), %rax
movq %rcx, 0x28(%rsp)
shlq $0x4, %rax
leaq 0x60(%rsp,%rax), %rax
movq %rax, 0x40(%rsp)
movslq 0x8(%rdx), %rax
leaq 0x30(%r9,%rsi), %rdx
movq %rdx, 0x38(%rsp)
leaq 0x30(%rdi,%rsi), %rdx
movq %rdx, 0x30(%rsp)
movslq (%r8), %rdx
shlq $0x4, %rax
leaq 0x60(%rsp,%rax), %rax
movq %rax, 0x18(%rsp)
movslq 0x4(%r8), %rax
shlq $0x4, %rdx
leaq 0x60(%rdx,%rsi), %rcx
movq %rcx, 0x20(%rsp)
shlq $0x4, %rax
leaq 0x60(%rax,%rsi), %rax
movq %rax, 0x10(%rsp)
movslq 0x8(%r8), %rax
shlq $0x4, %rax
leaq 0x60(%rax,%rsi), %rax
movq %rax, 0x8(%rsp)
cmpq $0x9, %rbp
je 0x3f18
movq 0x50(%rsp), %rax
movq %rbp, 0x58(%rsp)
shlq $0x4, %rbp
xorl %r13d, %r13d
movq (%rax,%rbp), %r14
movq 0x8(%rax,%rbp), %r12
pushq $0x8
popq %r15
cmpq $-0x1, %r15
je 0x3e19
movq (%r13,%rbx), %rdi
movq 0x8(%r13,%rbx), %rsi
movzbl %r15b, %edx
andq %r14, %rdi
andq %r12, %rsi
callq 0x2100
movq %rdx, 0x68(%rsp,%r13)
movq %rax, 0x60(%rsp,%r13)
decq %r15
addq $0x10, %r13
jmp 0x3de7
movq 0x48(%rsp), %rcx
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %r9
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
shldq $0x8, %rax, %rcx
shldq $0x7, %rsi, %rdx
shlq $0x8, %rax
shlq $0x7, %rsi
orq %rax, %rsi
movq 0x8(%r9), %rax
orq %rcx, %rdx
movq 0x18(%rsp), %rcx
movq (%rcx), %rdi
movq 0x8(%rcx), %r8
movq (%r9), %rcx
movq 0x28(%rsp), %r9
shldq $0x6, %rdi, %r8
shldq $0x5, %rcx, %rax
shlq $0x6, %rdi
shlq $0x5, %rcx
movq 0x8(%r9), %r10
orq %rdi, %rcx
movq 0x30(%rsp), %rdi
orq %r8, %rax
orq %rsi, %rcx
orq %rdx, %rax
movq (%rdi), %rdx
movq 0x8(%rdi), %rsi
movq (%r9), %rdi
movq 0x20(%rsp), %r9
shldq $0x4, %rdx, %rsi
shldq $0x3, %rdi, %r10
leaq (,%rdi,8), %r8
movq 0x8(%r9), %rdi
shlq $0x4, %rdx
orq %rsi, %r10
movq (%r9), %rsi
orq %rdx, %r8
shldq $0x2, %rsi, %rdi
shlq $0x2, %rsi
orq %r8, %rsi
movq 0x10(%rsp), %r8
orq %r10, %rdi
orq %rcx, %rsi
orq %rax, %rdi
movq (%r8), %rax
movq 0x8(%r8), %rdx
leaq (%rax,%rax), %rcx
shldq $0x1, %rax, %rdx
orq %rsi, %rcx
movq 0x8(%rsp), %rsi
orq %rdi, %rdx
orq 0x8(%rsi), %rdx
orq (%rsi), %rcx
movq %rdx, 0xf8(%rsp,%rbp)
movq %rcx, 0xf0(%rsp,%rbp)
movq 0x58(%rsp), %rbp
incq %rbp
jmp 0x3dbf
movq (%rsp), %rbx
leaq 0xf0(%rsp), %rsi
movq %rbx, %rdi
callq 0x2ec8
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop