// File: NathanWine[P]2048-AI-Solvers/src/Game.cpp
// Function: Game::transpose()
void Game::transpose() {
    board transposed_state = {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}};
    for (int i = 0; i < DIM; ++i) {
        for (int j = 0; j < DIM; ++j) {
            transposed_state[i][j] = state[j][i];
        }
    }
    state = transposed_state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x168(%rbp)
movb $0x1, -0x142(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0x160(%rbp)
movq %rax, -0x98(%rbp)
movl $0x0, -0xb8(%rbp)
movl $0x0, -0xb4(%rbp)
movl $0x0, -0xb0(%rbp)
movl $0x0, -0xac(%rbp)
leaq -0xb8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq $0x4, -0xa0(%rbp)
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x40a0
movq -0x160(%rbp), %rdi
movq -0x158(%rbp), %rcx
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
callq 0x40c0
jmp 0x1098d
leaq -0x78(%rbp), %rax
movq %rax, -0x178(%rbp)
movq %rax, -0x98(%rbp)
movl $0x0, -0xf0(%rbp)
movl $0x0, -0xec(%rbp)
movl $0x0, -0xe8(%rbp)
movl $0x0, -0xe4(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq $0x4, -0xd8(%rbp)
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x40a0
movq -0x178(%rbp), %rdi
movq -0x170(%rbp), %rcx
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
callq 0x40c0
jmp 0x10a16
leaq -0x60(%rbp), %rax
movq %rax, -0x188(%rbp)
movq %rax, -0x98(%rbp)
movl $0x0, -0x118(%rbp)
movl $0x0, -0x114(%rbp)
movl $0x0, -0x110(%rbp)
movl $0x0, -0x10c(%rbp)
leaq -0x118(%rbp), %rax
movq %rax, -0x108(%rbp)
movq $0x4, -0x100(%rbp)
leaq -0x119(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x40a0
movq -0x188(%rbp), %rdi
movq -0x180(%rbp), %rcx
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
callq 0x40c0
jmp 0x10a9f
leaq -0x48(%rbp), %rax
movq %rax, -0x198(%rbp)
movq %rax, -0x98(%rbp)
movl $0x0, -0x140(%rbp)
movl $0x0, -0x13c(%rbp)
movl $0x0, -0x138(%rbp)
movl $0x0, -0x134(%rbp)
leaq -0x140(%rbp), %rax
movq %rax, -0x130(%rbp)
movq $0x4, -0x128(%rbp)
leaq -0x141(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x40a0
movq -0x198(%rbp), %rdi
movq -0x190(%rbp), %rcx
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdx
callq 0x40c0
jmp 0x10b28
movb $0x0, -0x142(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x4, -0x28(%rbp)
leaq -0x143(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x49d0
movq -0x1a0(%rbp), %rcx
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x20(%rbp), %rdi
callq 0x49f0
jmp 0x10b6f
leaq -0x143(%rbp), %rdi
callq 0x4a70
leaq -0x90(%rbp), %rax
movq %rax, -0x1b0(%rbp)
addq $0x60, %rax
movq %rax, -0x1a8(%rbp)
movq -0x1a8(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x4370
movq -0x1b0(%rbp), %rcx
movq -0x1b8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1a8(%rbp)
jne 0x10b94
leaq -0x141(%rbp), %rdi
callq 0x4140
leaq -0x119(%rbp), %rdi
callq 0x4140
leaq -0xf1(%rbp), %rdi
callq 0x4140
leaq -0xb9(%rbp), %rdi
callq 0x4140
movl $0x0, -0x148(%rbp)
cmpl $0x4, -0x148(%rbp)
jge 0x10dec
movl $0x0, -0x14c(%rbp)
cmpl $0x4, -0x14c(%rbp)
jge 0x10dd6
movq -0x168(%rbp), %rdi
addq $0x8, %rdi
movslq -0x14c(%rbp), %rsi
callq 0x7fb0
movq %rax, %rdi
movslq -0x148(%rbp), %rsi
callq 0x4230
movl (%rax), %eax
movl %eax, -0x1bc(%rbp)
movslq -0x148(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x7fb0
movq %rax, %rdi
movslq -0x14c(%rbp), %rsi
callq 0x4230
movl -0x1bc(%rbp), %ecx
movl %ecx, (%rax)
movl -0x14c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14c(%rbp)
jmp 0x10c16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x10d70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x10d64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x10d58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x10d4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0x143(%rbp), %rdi
callq 0x4a70
leaq -0x90(%rbp), %rax
movq %rax, -0x1d0(%rbp)
addq $0x60, %rax
movq %rax, -0x1c8(%rbp)
movq -0x1c8(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x4370
movq -0x1d0(%rbp), %rcx
movq -0x1d8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1c8(%rbp)
jne 0x10d19
jmp 0x10d4c
leaq -0x141(%rbp), %rdi
callq 0x4140
leaq -0x119(%rbp), %rdi
callq 0x4140
leaq -0xf1(%rbp), %rdi
callq 0x4140
leaq -0xb9(%rbp), %rdi
callq 0x4140
testb $0x1, -0x142(%rbp)
jne 0x10d87
jmp 0x10dd4
movq -0x98(%rbp), %rax
leaq -0x90(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x1e0(%rbp)
je 0x10dd2
movq -0x1e0(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x4370
movq -0x1e8(%rbp), %rax
leaq -0x90(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x1e0(%rbp)
jne 0x10da1
jmp 0x10dd4
jmp 0x10e2f
jmp 0x10dd8
movl -0x148(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x148(%rbp)
jmp 0x10bff
movq -0x168(%rbp), %rdi
addq $0x8, %rdi
leaq -0x20(%rbp), %rsi
callq 0x118f0
jmp 0x10e02
leaq -0x20(%rbp), %rdi
callq 0x43d0
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x43d0
movq -0xc8(%rbp), %rdi
callq 0x33d0
nopl (%rax,%rax)