// File: /workspace/github_cpp_makefile_star2_O3/MatthewZMD[P]TetrisDual/concreteboard.cc
// Function: ConcreteBoard::ConcreteBoard(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
ConcreteBoard::ConcreteBoard(int boardNum, std::string fileName, int l): boardNum { boardNum }, score{ 0 }, countTurn{ 0 }, boardInfo{} {
    countD = 0;
    level = std::make_shared<Level0>(fileName);
    while(l > 0){
        level = level->levelUp();
        --l;
    }
    allCells.clear();
    std::vector<Cell> temp;
    for (int i = 0; i < 18; ++i) {
        for (int j = 0; j < 11; ++j) {
            Coordinate pos{i, j};
            temp.emplace_back(Cell(pos));
        }
        allCells.emplace_back(temp);
        temp.clear();
    }
    for (int i = 0; i < 18; ++i) {
        for (int j = 0; j < 11; ++j) {
            if (i != 17) {
                allCells[i][j].attach(&(allCells[i + 1][j]));
            }
            if (i != 0) {
                allCells[i][j].attach(&(allCells[i - 1][j]));
            }
        }
    }

    nextType = level->genBlock();
    genThis();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x28(%rdi)
leaq 0x12afa(%rip), %rax     # 0x1b478
movq %rax, (%rdi)
addq $0x30, %rdi
movq %rdi, 0x30(%rsp)
movq %r15, (%rsp)
callq 0x8910
movl %r14d, 0x44(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%r15)
leaq 0x78(%r15), %rax
movq %rax, 0x8(%rsp)
leaq 0x98(%r15), %rdi
movups %xmm0, 0x5c(%r15)
movq $0x0, 0x6c(%r15)
movups %xmm0, 0x78(%r15)
movups %xmm0, 0x81(%r15)
movq %rdi, 0x28(%rsp)
callq 0x8200
movl $0x0, 0x40(%r15)
leaq 0x48(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x40(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rcx
callq 0xad48
movaps 0x40(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x40(%rsp)
movq 0x68(%r15), %rdi
movups %xmm0, 0x60(%r15)
testq %rdi, %rdi
je 0x8a29
callq 0x5f5e
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x8a29
callq 0x5f5e
testl %ebp, %ebp
jle 0x8a7b
incl %ebp
leaq 0x40(%rsp), %rbx
movq (%rsp), %r14
movq 0x60(%r14), %rsi
movq (%rsi), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movaps 0x40(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x40(%rsp)
movq 0x68(%r14), %rdi
movups %xmm0, 0x60(%r14)
testq %rdi, %rdi
je 0x8a74
callq 0x5f5e
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x8a74
callq 0x5f5e
decl %ebp
cmpl $0x1, %ebp
jg 0x8a38
movq (%rsp), %rax
movq 0x78(%rax), %r14
movq 0x80(%rax), %r15
cmpq %r14, %r15
je 0x8aae
movq %r14, %rbx
movq %rbx, %rdi
callq 0xabcc
addq $0x18, %rbx
cmpq %r15, %rbx
jne 0x8a92
movq (%rsp), %rax
movq %r14, 0x80(%rax)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rax
movaps %xmm0, (%rax)
movq $0x0, 0x10(%rax)
xorl %ebx, %ebx
leaq 0x40(%rsp), %r12
leaq 0x128a9(%rip), %r15     # 0x1b378
leaq 0x10(%r15), %rbp
addq $0x30, %r15
movabsq $0x100000000, %r13      # imm = 0x100000000
movl $0xb, %r14d
movq %rbx, 0x38(%rsp)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x84b0
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0xaaec
movq %rbp, 0x40(%rsp)
movq %r15, 0x48(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0xeb2c
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x8b38
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x52e0
leaq 0x68(%rsp), %rdi
callq 0x88cc
leaq 0x126b7(%rip), %rax     # 0x1b200
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x8b65
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x52e0
addq %r13, %rbx
decq %r14
jne 0x8aec
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rbx
movq %rbx, %rsi
callq 0xab90
movq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0xb8c8
movq 0x38(%rsp), %rbx
incq %rbx
cmpq $0x12, %rbx
jne 0x8ae1
xorl %ebx, %ebx
leaq (%rbx,%rbx,2), %r14
xorl %r15d, %r15d
cmpq $0x11, %rbx
je 0x8bd7
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rcx
leaq (%rcx,%r15), %rdi
addq $0x8, %rdi
movq 0x18(%rax,%r14,8), %rsi
addq %r15, %rsi
callq 0xeb38
testq %rbx, %rbx
je 0x8bf8
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rcx
leaq (%rcx,%r15), %rdi
addq $0x8, %rdi
movq -0x18(%rax,%r14,8), %rsi
addq %r15, %rsi
callq 0xeb38
addq $0x90, %r15
cmpq $0x630, %r15            # imm = 0x630
jne 0x8bab
incq %rbx
cmpq $0x12, %rbx
jne 0x8ba4
movq (%rsp), %rbx
movq 0x60(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
movl %eax, 0x58(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x40(%rax)
leaq 0x10(%rsp), %rdi
callq 0xabcc
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8c54
movq %rax, %r14
jmp 0x8c83
movq %rax, %r14
jmp 0x8cbb
jmp 0x8c6c
movq %rax, %r14
jmp 0x8c79
jmp 0x8c6c
jmp 0x8c6c
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0xab28
jmp 0x8c6f
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0xabcc
movq 0x28(%rsp), %rdi
callq 0x8272
movq 0x8(%rsp), %rdi
callq 0xabfc
movq (%rsp), %rax
movq 0x68(%rax), %rdi
testq %rdi, %rdi
je 0x8c9f
callq 0x5f5e
movq (%rsp), %rax
movq 0x50(%rax), %rdi
testq %rdi, %rdi
je 0x8cb1
callq 0x5f5e
movq 0x30(%rsp), %rdi
callq 0xeb2c
movq (%rsp), %rdi
callq 0xac44
movq %r14, %rdi
callq 0x54e0