// File: kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::perm_cbox(int*)
Sudoku perm_cbox(int a[3]) {
    mbit bdata2[9];
    mbit t2 = 0;
    for (int i = 0; i < 9; i++) {
      t2 |= (mbit(7) << (i * 9));
    }
    mbit t1 = t2 << 3;
    mbit t0 = t2 << 6;
    mbit v[3];
    for (int i = 0; i < 9; i++) {
      v[0] = (bdata[i] & t0) >> 6;
      v[1] = (bdata[i] & t1) >> 3;
      v[2] = (bdata[i] & t2);
      bdata2[i] = v[a[0]] << 6;
      bdata2[i] |= v[a[1]] << 3;
      bdata2[i] |= v[a[2]];
    }
    return Sudoku(bdata2);
  }

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
movq %rdx, 0x120(%rsp)
movq 0x128(%rsp), %rax
movq %rax, 0x10(%rsp)
movq $0x0, 0x88(%rsp)
movq $0x0, 0x80(%rsp)
movl $0x0, 0x7c(%rsp)
cmpl $0x9, 0x7c(%rsp)
jge 0x6df7
movl 0x7c(%rsp), %ecx
movl %ecx, %eax
leal (%rax,%rax,8), %eax
movb %al, %cl
movb %cl, %dl
movl $0x7, %eax
shlxq %rdx, %rax, %rdx
movb %cl, %al
notb %al
movb %al, %sil
movl $0x3, %eax
shrxq %rsi, %rax, %rsi
xorl %eax, %eax
testb $0x40, %cl
cmovneq %rdx, %rsi
cmovneq %rax, %rdx
movq 0x80(%rsp), %rcx
movq 0x88(%rsp), %rax
orq %rsi, %rax
orq %rdx, %rcx
movq %rcx, 0x80(%rsp)
movq %rax, 0x88(%rsp)
movl 0x7c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7c(%rsp)
jmp 0x6d88
movq 0x80(%rsp), %rcx
movq 0x88(%rsp), %rdx
movq %rcx, %rax
shrq $0x3d, %rax
leaq (%rax,%rdx,8), %rax
shlq $0x3, %rcx
movq %rcx, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movq 0x80(%rsp), %rcx
movq 0x88(%rsp), %rax
movq %rcx, %rdx
shrq $0x3a, %rdx
shlq $0x6, %rax
orq %rdx, %rax
shlq $0x6, %rcx
movq %rcx, 0x50(%rsp)
movq %rax, 0x58(%rsp)
movl $0x0, 0x1c(%rsp)
cmpl $0x9, 0x1c(%rsp)
jge 0x700a
movq 0x10(%rsp), %rcx
movslq 0x1c(%rsp), %rax
shlq $0x4, %rax
movq 0x60(%rcx,%rax), %rsi
movq 0x68(%rcx,%rax), %rdx
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rdi
andq %rdi, %rdx
andq %rax, %rsi
shrq $0x6, %rsi
movq %rdx, %rax
shlq $0x3a, %rax
orq %rsi, %rax
shrq $0x6, %rdx
movq %rdx, 0x28(%rsp)
movq %rax, 0x20(%rsp)
movslq 0x1c(%rsp), %rax
shlq $0x4, %rax
movq 0x60(%rcx,%rax), %rsi
movq 0x68(%rcx,%rax), %rdx
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rdi
andq %rdi, %rdx
andq %rax, %rsi
shrq $0x3, %rsi
movq %rdx, %rax
shlq $0x3d, %rax
orq %rsi, %rax
shrq $0x3, %rdx
movq %rdx, 0x38(%rsp)
movq %rax, 0x30(%rsp)
movslq 0x1c(%rsp), %rdx
shlq $0x4, %rdx
movq 0x60(%rcx,%rdx), %rax
movq 0x68(%rcx,%rdx), %rcx
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
andq %rsi, %rax
andq %rdx, %rcx
movq %rcx, 0x48(%rsp)
movq %rax, 0x40(%rsp)
movq 0x120(%rsp), %rax
movslq (%rax), %rax
shlq $0x4, %rax
movq 0x20(%rsp,%rax), %rdx
movq 0x28(%rsp,%rax), %rcx
movq %rdx, %rax
shrq $0x3a, %rax
shlq $0x6, %rcx
orq %rax, %rcx
shlq $0x6, %rdx
movslq 0x1c(%rsp), %rax
shlq $0x4, %rax
movq %rdx, 0x90(%rsp,%rax)
movq %rcx, 0x98(%rsp,%rax)
movq 0x120(%rsp), %rax
movslq 0x4(%rax), %rax
shlq $0x4, %rax
movq 0x20(%rsp,%rax), %rsi
movq 0x28(%rsp,%rax), %rcx
movq %rsi, %rax
shrq $0x3d, %rax
leaq (%rax,%rcx,8), %rdi
shlq $0x3, %rsi
movslq 0x1c(%rsp), %rax
shlq $0x4, %rax
movq 0x90(%rsp,%rax), %rdx
movq 0x98(%rsp,%rax), %rcx
orq %rdi, %rcx
orq %rsi, %rdx
movq %rdx, 0x90(%rsp,%rax)
movq %rcx, 0x98(%rsp,%rax)
movq 0x120(%rsp), %rax
movslq 0x8(%rax), %rax
shlq $0x4, %rax
movq 0x20(%rsp,%rax), %rdi
movq 0x28(%rsp,%rax), %rsi
movslq 0x1c(%rsp), %rax
shlq $0x4, %rax
movq 0x90(%rsp,%rax), %rcx
movq 0x98(%rsp,%rax), %rdx
orq %rdi, %rcx
orq %rsi, %rdx
movq %rdx, 0x98(%rsp,%rax)
movq %rcx, 0x90(%rsp,%rax)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x6e54
movq (%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x3f20
movq 0x8(%rsp), %rax
addq $0x138, %rsp            # imm = 0x138
retq
nopl (%rax,%rax)