// File: 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:
subq $0x178, %rsp            # imm = 0x178
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x170(%rsp)
movq %rsi, 0x168(%rsp)
movq %rdx, 0x160(%rsp)
movq %rcx, 0x158(%rsp)
movq %r8, 0x150(%rsp)
movq 0x168(%rsp), %rax
movq %rax, 0x20(%rsp)
movl $0x0, 0x2c(%rsp)
cmpl $0x9, 0x2c(%rsp)
jge 0x7e83
movl $0x0, 0x28(%rsp)
cmpl $0x9, 0x28(%rsp)
jge 0x7b6b
movq 0x20(%rsp), %rax
movslq 0x2c(%rsp), %rdx
shlq $0x4, %rdx
movq 0x60(%rax,%rdx), %rcx
movq 0x68(%rax,%rdx), %rdx
movslq 0x28(%rsp), %rsi
movq %rsi, %rax
shlq $0x4, %rax
leaq 0x46d6(%rip), %r8       # 0xc1e0
movq (%rax,%r8), %rdi
movq 0x8(%rax,%r8), %r8
andq %r8, %rdx
andq %rdi, %rcx
movb $0x8, %dil
subb %sil, %dil
movb %dil, %sil
shrxq %rsi, %rcx, %r8
movq %rdx, %rcx
addq %rcx, %rcx
movb %dil, %r10b
notb %r10b
movb %r10b, %r9b
shlxq %r9, %rcx, %rcx
orq %r8, %rcx
shrxq %rsi, %rdx, %rdx
xorl %esi, %esi
testb $0x40, %dil
cmovneq %rdx, %rcx
cmovneq %rsi, %rdx
movq %rdx, 0x38(%rsp,%rax)
movq %rcx, 0x30(%rsp,%rax)
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x7ad4
movq 0x160(%rsp), %rax
movslq (%rax), %rax
shlq $0x4, %rax
movq 0x30(%rsp,%rax), %rdx
movq 0x38(%rsp,%rax), %rcx
movq %rdx, %rax
shrq $0x38, %rax
shlq $0x8, %rcx
orq %rax, %rcx
shlq $0x8, %rdx
movslq 0x2c(%rsp), %rax
shlq $0x4, %rax
movq %rdx, 0xc0(%rsp,%rax)
movq %rcx, 0xc8(%rsp,%rax)
movq 0x160(%rsp), %rax
movslq 0x4(%rax), %rax
shlq $0x4, %rax
movq 0x30(%rsp,%rax), %rsi
movq 0x38(%rsp,%rax), %rdi
movq %rsi, %rax
shrq $0x39, %rax
shlq $0x7, %rdi
orq %rax, %rdi
shlq $0x7, %rsi
movslq 0x2c(%rsp), %rax
shlq $0x4, %rax
movq 0xc0(%rsp,%rax), %rdx
movq 0xc8(%rsp,%rax), %rcx
orq %rdi, %rcx
orq %rsi, %rdx
movq %rdx, 0xc0(%rsp,%rax)
movq %rcx, 0xc8(%rsp,%rax)
movq 0x160(%rsp), %rax
movslq 0x8(%rax), %rax
shlq $0x4, %rax
movq 0x30(%rsp,%rax), %rsi
movq 0x38(%rsp,%rax), %rdi
movq %rsi, %rax
shrq $0x3a, %rax
shlq $0x6, %rdi
orq %rax, %rdi
shlq $0x6, %rsi
movslq 0x2c(%rsp), %rax
shlq $0x4, %rax
movq 0xc0(%rsp,%rax), %rdx
movq 0xc8(%rsp,%rax), %rcx
orq %rdi, %rcx
orq %rsi, %rdx
movq %rdx, 0xc0(%rsp,%rax)
movq %rcx, 0xc8(%rsp,%rax)
movq 0x158(%rsp), %rax
movslq (%rax), %rax
shlq $0x4, %rax
leaq 0x30(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq 0x30(%rax,%rcx), %rdi
movq 0x38(%rax,%rcx), %r8
movq %rdi, %rax
shrq $0x3b, %rax
shlq $0x5, %r8
orq %rax, %r8
shlq $0x5, %rdi
movslq 0x2c(%rsp), %rax
shlq $0x4, %rax
movq 0xc0(%rsp,%rax), %rsi
movq 0xc8(%rsp,%rax), %rdx
orq %r8, %rdx
orq %rdi, %rsi
movq %rsi, 0xc0(%rsp,%rax)
movq %rdx, 0xc8(%rsp,%rax)
movq 0x158(%rsp), %rax
movslq 0x4(%rax), %rax
shlq $0x4, %rax
movq 0x30(%rax,%rcx), %rdi
movq 0x38(%rax,%rcx), %r8
movq %rdi, %rax
shrq $0x3c, %rax
shlq $0x4, %r8
orq %rax, %r8
shlq $0x4, %rdi
movslq 0x2c(%rsp), %rax
shlq $0x4, %rax
movq 0xc0(%rsp,%rax), %rsi
movq 0xc8(%rsp,%rax), %rdx
orq %r8, %rdx
orq %rdi, %rsi
movq %rsi, 0xc0(%rsp,%rax)
movq %rdx, 0xc8(%rsp,%rax)
movq 0x158(%rsp), %rax
movslq 0x8(%rax), %rax
shlq $0x4, %rax
movq 0x30(%rax,%rcx), %rdi
movq 0x38(%rax,%rcx), %rdx
movq %rdi, %rax
shrq $0x3d, %rax
leaq (%rax,%rdx,8), %r8
shlq $0x3, %rdi
movslq 0x2c(%rsp), %rax
shlq $0x4, %rax
movq 0xc0(%rsp,%rax), %rsi
movq 0xc8(%rsp,%rax), %rdx
orq %r8, %rdx
orq %rdi, %rsi
movq %rsi, 0xc0(%rsp,%rax)
movq %rdx, 0xc8(%rsp,%rax)
movq 0x150(%rsp), %rax
movslq (%rax), %rax
shlq $0x4, %rax
movq 0x60(%rax,%rcx), %rdi
movq 0x68(%rax,%rcx), %rdx
movq %rdi, %rax
shrq $0x3e, %rax
leaq (%rax,%rdx,4), %r8
shlq $0x2, %rdi
movslq 0x2c(%rsp), %rax
shlq $0x4, %rax
movq 0xc0(%rsp,%rax), %rsi
movq 0xc8(%rsp,%rax), %rdx
orq %r8, %rdx
orq %rdi, %rsi
movq %rsi, 0xc0(%rsp,%rax)
movq %rdx, 0xc8(%rsp,%rax)
movq 0x150(%rsp), %rax
movslq 0x4(%rax), %rax
shlq $0x4, %rax
movq 0x60(%rax,%rcx), %rdi
movq 0x68(%rax,%rcx), %rdx
movq %rdi, %rax
shrq $0x3f, %rax
leaq (%rax,%rdx,2), %r8
addq %rdi, %rdi
movslq 0x2c(%rsp), %rax
shlq $0x4, %rax
movq 0xc0(%rsp,%rax), %rsi
movq 0xc8(%rsp,%rax), %rdx
orq %r8, %rdx
orq %rdi, %rsi
movq %rsi, 0xc0(%rsp,%rax)
movq %rdx, 0xc8(%rsp,%rax)
movq 0x150(%rsp), %rax
movslq 0x8(%rax), %rax
shlq $0x4, %rax
movq 0x60(%rax,%rcx), %rdi
movq 0x68(%rax,%rcx), %rsi
movslq 0x2c(%rsp), %rax
shlq $0x4, %rax
movq 0xc0(%rsp,%rax), %rcx
movq 0xc8(%rsp,%rax), %rdx
orq %rdi, %rcx
orq %rsi, %rdx
movq %rdx, 0xc8(%rsp,%rax)
movq %rcx, 0xc0(%rsp,%rax)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x7ac1
movq 0x10(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x3f20
movq 0x18(%rsp), %rax
addq $0x178, %rsp            # imm = 0x178
retq
nopw %cs:(%rax,%rax)
nopl (%rax)