LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/block.cc
// Function: Block::Block(CellType, int, std::vector<Cell*, std::allocator<Cell*>>)
Block::Block(CellType t, int l, std::vector<Cell*> cells): cells { cells }, btmLft { Coordinate { 3, 0 } } {
    std::vector<Cell*> sq;
    for(auto &c : cells){
        if(!c->isEmpty()){
            throw "Game Over";
        }
        for(auto &ci : cells){
            if(ci != c){
                sq.emplace_back(ci);
            }
        }
        c->set(t, l, sq);
        sq.clear();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r14
movl %edx, 0xc(%rsp)
movl %esi, 0x8(%rsp)
movq %rdi, %rbx
movq %rcx, %rsi
callq 0x7558
movq %rbx, 0x30(%rsp)
movq $0x3, 0x18(%rbx)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r12
andq $0x0, 0x10(%r12)
movaps %xmm0, (%r12)
movq (%r14), %rbp
movq 0x8(%r14), %rax
movq %rax, 0x38(%rsp)
leaq 0x40(%rsp), %r13
cmpq 0x38(%rsp), %rbp
je 0x74c8
movq (%rbp), %rdi
callq 0x7fde
testb %al, %al
je 0x74e1
movq (%r14), %rbx
movq 0x8(%r14), %r15
cmpq %r15, %rbx
je 0x7487
movq (%rbx), %rax
cmpq (%rbp), %rax
je 0x7481
movq %r12, %rdi
movq %rbx, %rsi
callq 0x75a6
addq $0x8, %rbx
jmp 0x7468
movq (%rbp), %rbx
movq %r13, %rdi
movq %r12, %rsi
callq 0x7558
movq %rbx, %rdi
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
movq %r13, %rcx
callq 0x7e86
movq %r13, %rdi
callq 0x75fe
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x74c2
movq %rax, 0x18(%rsp)
addq $0x8, %rbp
jmp 0x7449
leaq 0x10(%rsp), %rdi
callq 0x75fe
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x5170
leaq 0x9e47(%rip), %rcx      # 0x11337
movq %rcx, (%rax)
movq 0x14a96(%rip), %rsi     # 0x1bf90
movq %rax, %rdi
xorl %edx, %edx
callq 0x5490
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x75fe
jmp 0x751a
jmp 0x7517
jmp 0x7517
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x75fe
movq 0x30(%rsp), %rdi
callq 0x75fe
movq %r14, %rdi
callq 0x54b0
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/cell.cc
// Function: Cell::notify(Subject&)
void Cell::notify(Subject& s) {
    Cell & c = dynamic_cast<Cell&>(s);
    CellInfo & info = dynamic_cast<CellInfo&>(c.getInfo());

	if (c.cellState.cellStatus == CellStatus::Dead) {
		if (info.pos.row == pos.row + 1) {
			c.cellState = CellState{CellStatus::Down};
			notifyObservers();
		}
	}
	else {
		if (info.pos.row == pos.row - 1) {
			blockLevel = info.blockLevel;
			type = info.type;
			squad = info.squad;

			// update squad
			for (auto& cell : squad) {
				for (unsigned i = 0; i < cell->squad.size(); ++i) {
					if (cell->squad.at(i)->pos == c.pos) {
						cell->squad.at(i) = this;
						break;
					}
				}
			}
		} else {
			c.cellState = CellState{CellStatus::Down};
			notifyObservers();
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x13356(%rip), %rsi     # 0x1b208
leaq 0x134f7(%rip), %rdx     # 0x1b3b0
pushq $0x8
popq %rcx
movq %rax, %rdi
callq 0x52d0
testq %rax, %rax
je 0x7fd9
movq %rax, %r14
movq (%rax), %rax
movq %r14, %rdi
callq *0x8(%rax)
leaq 0x13ad0(%rip), %rsi     # 0x1b9b0
leaq 0x13531(%rip), %rdx     # 0x1b418
movq %rax, %rdi
xorl %ecx, %ecx
callq 0x52d0
testq %rax, %rax
je 0x7fd9
cmpl $0x0, 0x88(%r14)
movl 0x8(%rax), %ecx
movl 0x58(%rbx), %edx
je 0x7f98
decl %edx
cmpl %edx, %ecx
jne 0x7f9e
movq 0x10(%rax), %rcx
movq %rcx, 0x60(%rbx)
addq $0x18, %rax
leaq 0x68(%rbx), %rdi
movq %rax, %rsi
callq 0x8010
movq 0x68(%rbx), %r12
movq 0x70(%rbx), %r13
cmpq %r13, %r12
je 0x7fcb
xorl %ecx, %ecx
movl %ecx, %r15d
movq (%r12), %rdi
movq 0x70(%rdi), %rax
subq 0x68(%rdi), %rax
sarq $0x3, %rax
cmpq %r15, %rax
jbe 0x7f92
addq $0x68, %rdi
movq %r15, %rsi
callq 0x7536
movq (%rax), %rdi
addq $0x58, %rdi
movq 0x58(%r14), %rsi
callq 0xadf8
leal 0x1(%r15), %ecx
testb %al, %al
je 0x7f43
movq (%r12), %rdi
addq $0x68, %rdi
movq %r15, %rsi
callq 0x7536
movq %rbx, (%rax)
addq $0x8, %r12
jmp 0x7f38
incl %edx
cmpl %edx, %ecx
jne 0x7fcb
movq %rsp, %r15
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x8196
movl 0x8(%r15), %eax
movl %eax, 0x88(%r14)
movq %r15, %rdi
callq 0xda50
addq $0x8, %rbx
movq %rbx, %rdi
callq 0xda72
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x5500
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/cell.cc
// Function: Cell::getInfo()
Info& Cell::getInfo() {
	cellInfo.pos = pos;
	cellInfo.blockLevel = blockLevel;
	cellInfo.type = type;
	cellInfo.squad = squad;
	return cellInfo;
}

// Assembly:
pushq %rbx
leaq 0x28(%rdi), %rbx
movups 0x58(%rdi), %xmm0
movups %xmm0, 0x30(%rdi)
leaq 0x68(%rdi), %rsi
addq $0x40, %rdi
callq 0x8010
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/concreteboard.cc
// Function: ConcreteBoard::levelUp()
void ConcreteBoard::levelUp(){
    level = level->levelUp();
    if (level->getLevel() == 3) {
        countTurn = 0;
    }
    notifyObservers();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x60(%rdi), %r14
movq 0x60(%rdi), %rsi
movq (%rsi), %rax
movq %rsp, %r15
movq %r15, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x9db2
leaq 0x8(%rsp), %rdi
callq 0x5c18
movq 0x60(%rbx), %rdi
callq 0xd862
cmpl $0x3, %eax
jne 0x8479
andl $0x0, 0x70(%rbx)
movq %rbx, %rdi
callq 0xda72
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/concreteboard.cc
// Function: ConcreteBoard::levelDown()
void ConcreteBoard::levelDown(){
    level = level->levelDown();
    if (level->getLevel() == 4) {
        countTurn = 0;
    }
    notifyObservers();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x60(%rdi), %r14
movq 0x60(%rdi), %rsi
movq (%rsi), %rax
movq %rsp, %r15
movq %r15, %rdi
callq *0x8(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x9db2
leaq 0x8(%rsp), %rdi
callq 0x5c18
movq 0x60(%rbx), %rdi
callq 0xd862
cmpl $0x4, %eax
jne 0x84d3
andl $0x0, 0x70(%rbx)
movq %rbx, %rdi
callq 0xda72
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/concreteboard.cc
// Function: ConcreteBoard::getInfo()
Info& ConcreteBoard::getInfo()  {
    boardInfo.player = boardNum;
    boardInfo.level = level->getLevel();
    boardInfo.score = score;
    boardInfo.boardData = display();
    boardInfo.nextType = nextType;
    return boardInfo;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl 0x44(%rdi), %eax
leaq 0x98(%rdi), %r14
movl %eax, 0xa0(%rdi)
movq 0x60(%rdi), %rdi
callq 0xd862
movl %eax, 0xa4(%rbx)
movl 0x5c(%rbx), %eax
movl %eax, 0xa8(%rbx)
movq (%rbx), %rax
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq *0x50(%rax)
leaq 0xb0(%rbx), %rdi
movq %r15, %rsi
callq 0x7ad4
movq %r15, %rdi
callq 0x7a0e
movl 0x58(%rbx), %eax
movl %eax, 0xc8(%rbx)
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/concreteboard.cc
// Function: ConcreteBoard::display()
std::vector<std::vector<char>> ConcreteBoard::display() {
	std::vector<std::vector<char>> displayBoard;
	std::vector<char> temp;
	for (int i = 0; i < 18; ++i) {
		for (int j = 0; j < 11; ++j) {
			switch(allCells[i][j].type) {
				case CellType::I:
					temp.emplace_back('I');
					break;
				case CellType::J:
					temp.emplace_back('J');
					break;
				case CellType::L:
					temp.emplace_back('L');
					break;
				case CellType::O:
					temp.emplace_back('O');
					break;
				case CellType::S:
					temp.emplace_back('S');
					break;
				case CellType::Z:
					temp.emplace_back('Z');
					break;
				case CellType::T:
					temp.emplace_back('T');
					break;
				case CellType::E:
					temp.emplace_back(' ');
					break;
				case CellType::Star:
					temp.emplace_back('*');
					break;
			}
		}
		displayBoard.emplace_back(temp);
		temp.clear();
	}
	return displayBoard;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, 0x8(%rsp)
andq $0x0, 0x10(%rdi)
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
xorl %ecx, %ecx
leaq 0x7dc2(%rip), %rbp      # 0x113e4
leaq 0x7(%rsp), %r12
cmpq $0x12, %rcx
je 0x9745
movq %rcx, 0x30(%rsp)
imulq $0x18, %rcx, %rbx
pushq $0x64
popq %r13
cmpq $0x694, %r13            # imm = 0x694
je 0x971a
movq 0x78(%r14), %rax
movq (%rax,%rbx), %rax
movl (%rax,%r13), %eax
cmpq $0x8, %rax
ja 0x970e
movslq (%rbp,%rax,4), %rax
addq %rbp, %rax
jmpq *%rax
movb $0x49, 0x7(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x9a94
jmp 0x970e
movb $0x53, 0x7(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x9a94
jmp 0x970e
movb $0x4c, 0x7(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x9a94
jmp 0x970e
movb $0x4f, 0x7(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x9a94
jmp 0x970e
movb $0x20, 0x7(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x9a94
jmp 0x970e
movb $0x4a, 0x7(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x9a94
jmp 0x970e
movb $0x5a, 0x7(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x9a94
jmp 0x970e
movb $0x54, 0x7(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x9a94
jmp 0x970e
movb $0x2a, 0x7(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x9a94
addq $0x90, %r13
jmp 0x963e
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x9ac8
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rcx
je 0x973d
movq %rax, 0x18(%rsp)
incq %rcx
jmp 0x9627
leaq 0x10(%rsp), %rdi
callq 0x7a92
movq 0x8(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9775
jmp 0x9775
jmp 0x9775
jmp 0x9775
jmp 0x9775
jmp 0x9775
jmp 0x9775
jmp 0x9775
jmp 0x9775
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x7a92
movq 0x8(%rsp), %rdi
callq 0x7a0e
movq %r14, %rdi
callq 0x54b0
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/concreteboard.cc
// Function: ConcreteBoard::replaceBlock(CellType)
void ConcreteBoard::replaceBlock(CellType newType) {
    for(auto& c: thisBlock->cells){
        c->restore();
    }
    thisBlock->cells.clear();
	CellType temp = nextType;
	nextType = newType;
	genThis();
	nextType = temp;
	notifyObservers();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x48(%rdi), %rax
movq (%rax), %r14
movq 0x8(%rax), %r15
cmpq %r15, %r14
je 0x981a
movq (%r14), %rdi
callq 0x7e68
addq $0x8, %r14
jmp 0x9807
movq 0x48(%rbx), %rax
movq (%rax), %rcx
cmpq %rcx, 0x8(%rax)
je 0x982b
movq %rcx, 0x8(%rax)
movl 0x58(%rbx), %r14d
movl %ebp, 0x58(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x40(%rax)
movl %r14d, 0x58(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xda72
nop
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/forcedecorator.cc
// Function: ForceDecorator::ForceDecorator(std::shared_ptr<Board>, CellType)
ForceDecorator::ForceDecorator(std::shared_ptr<Board> board, CellType giventype): BoardDecorator { board }, giventype{giventype} {
	for (auto &i : board->observers) {
              attach(i);
        }
	board->replaceBlock(giventype);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rdi
callq 0x72c6
movq %rbx, %rdi
movq %r15, %rsi
callq 0x779c
leaq 0x8(%rsp), %rdi
callq 0x5c18
leaq 0x107b9(%rip), %rax     # 0x1b600
movq %rax, (%rbx)
movl %ebp, 0x40(%rbx)
movq (%r14), %rax
movq 0x8(%rax), %r15
movq 0x10(%rax), %r12
cmpq %r12, %r15
je 0xae6e
movq (%r15), %rsi
movq %rbx, %rdi
callq 0xda5c
addq $0x8, %r15
jmp 0xae58
movq (%r14), %rdi
movq (%rdi), %rax
movl %ebp, %esi
callq *0x90(%rax)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xae9a
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x5c18
jmp 0xaea5
movq %rax, %r14
movq %rbx, %rdi
callq 0x728c
movq %r14, %rdi
callq 0x54b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/game.cc
// Function: Game::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, bool)
void Game::init(std::string fileName1, std::string fileName2, int l, bool isTextOnly){
    playerTurn = 0;
    display = std::make_shared<TextDisplay>(2, 18, 11);
    if(!isTextOnly){
        window = std::make_shared<GraphicsDisplay>(590, 520);
    }
    board1 = std::make_shared<ConcreteBoard>(0, fileName1, l);
    board1->attach(display.get());
    if(!isTextOnly){
        board1->attach(window.get());
    }
    board2 = std::make_shared<ConcreteBoard>(1, fileName2, l);
    board2->attach(display.get());
    if(!isTextOnly){
        board2->attach(window.get());
    }
    board1->notifyObservers();
    board2->notifyObservers();

    // start from player 1
    board1->setNext(board1->genNext());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %r8d, %ebp
movq %rdi, %rbx
movl %ecx, 0x4(%rsp)
andl $0x0, 0x44(%rdi)
movq %rdx, %r14
movq %rsi, %r15
movq %rsp, %rsi
movl $0x2, (%rsi)
leaq 0x18(%rsp), %rdx
movl $0x12, (%rdx)
leaq 0x1c(%rsp), %rcx
movl $0xb, (%rcx)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0xb8f8
leaq 0x20(%rbx), %rdi
movq %r12, %rsi
callq 0xbc54
leaq 0x10(%rsp), %rdi
callq 0x5c18
testl %ebp, %ebp
jne 0xb02b
movq %rsp, %rsi
movl $0x24e, (%rsi)          # imm = 0x24E
leaq 0x18(%rsp), %rdx
movl $0x208, (%rdx)          # imm = 0x208
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0xb91c
leaq 0x30(%rbx), %rdi
movq %r12, %rsi
callq 0xbe18
leaq 0x10(%rsp), %rdi
callq 0x5c18
movq %rsp, %rsi
andl $0x0, (%rsi)
leaq 0x8(%rsp), %r12
leaq 0x4(%rsp), %rcx
movq %r12, %rdi
movq %r15, %rdx
callq 0xb93d
movq %rbx, %rdi
movq %r12, %rsi
callq 0xc10c
leaq 0x10(%rsp), %rdi
callq 0x5c18
movq (%rbx), %rdi
movq 0x20(%rbx), %rsi
callq 0xda5c
testb %bpl, %bpl
jne 0xb078
movq (%rbx), %rdi
movq 0x30(%rbx), %rsi
callq 0xda5c
movq %rsp, %rsi
movl $0x1, (%rsi)
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rdx
callq 0xb93d
leaq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0xc10c
leaq 0x10(%rsp), %rdi
callq 0x5c18
movq 0x10(%rbx), %rdi
movq 0x20(%rbx), %rsi
callq 0xda5c
testb %bpl, %bpl
jne 0xb0cb
movq 0x10(%rbx), %rdi
movq 0x30(%rbx), %rsi
callq 0xda5c
movq (%rbx), %rdi
callq 0xda72
movq 0x10(%rbx), %rdi
callq 0xda72
movq (%rbx), %rbx
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x48(%rax)
movq (%rbx), %rcx
movq %rbx, %rdi
movl %eax, %esi
callq *0x68(%rcx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/game.cc
// Function: Game::heavy()
void Game::heavy() {
    if (playerTurn == 1) {
        board1 = std::make_shared<HeavyDecorator>(board1);
    }
    else if (playerTurn == 0) {
        board2 = std::make_shared<HeavyDecorator>(board2);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x44(%rdi), %eax
testl %eax, %eax
je 0xb118
cmpl $0x1, %eax
je 0xb11c
jmp 0xb141
addq $0x10, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb961
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc326
leaq 0x10(%rsp), %rdi
callq 0x5c18
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/game.cc
// Function: Game::blind()
void Game::blind() {
    if (playerTurn == 1) {
        board1 = std::make_shared<BlindDecorator>(board1);
        board1->notifyObservers();
    }
    else if (playerTurn == 0) {
        board2 = std::make_shared<BlindDecorator>(board2);
        board2->notifyObservers();
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x44(%rdi), %eax
testl %eax, %eax
je 0xb162
cmpl $0x1, %eax
je 0xb166
jmp 0xb193
addq $0x10, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb97f
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc540
leaq 0x10(%rsp), %rdi
callq 0x5c18
movq (%rbx), %rdi
callq 0xda72
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/game.cc
// Function: Game::force(CellType)
void Game::force(CellType type) {
    if (playerTurn == 1) {
        board1 = std::make_shared<ForceDecorator>(board1, type);
	board1->notifyObservers();
    }
    else if (playerTurn == 0) {
        board2 = std::make_shared<ForceDecorator>(board2, type);
	board2->notifyObservers();
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl %esi, 0x4(%rsp)
movl 0x44(%rdi), %eax
testl %eax, %eax
je 0xb1b8
cmpl $0x1, %eax
je 0xb1bc
jmp 0xb1ee
addq $0x10, %rbx
leaq 0x8(%rsp), %r14
leaq 0x4(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb99d
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc76e
leaq 0x10(%rsp), %rdi
callq 0x5c18
movq (%rbx), %rdi
callq 0xda72
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/game.cc
// Function: Game::recover()
void Game::recover() {
    if (playerTurn == 0) {
        board1 = board1->getBoard();
    }
    else if (playerTurn == 1) {
        board2 = board2->getBoard();
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x44(%rdi), %eax
cmpl $0x1, %eax
je 0xb211
testl %eax, %eax
jne 0xb23c
movq (%rbx), %rsi
jmp 0xb219
movq 0x10(%rbx), %rsi
addq $0x10, %rbx
movq (%rsi), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq *0x58(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc79c
leaq 0x10(%rsp), %rdi
callq 0x5c18
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/game.cc
// Function: Game::left(std::istream&, int)
void Game::left(std::istream & in, int n) {
    int numberOfRowsRemoved = 0;
    if (playerTurn == 0) {
        numberOfRowsRemoved = board1->left(n);

        // special actions
        if (numberOfRowsRemoved >= 2) {
            execAction(in);
        }

        if (board1->isTurnOver()) {
            board1->setTurnOver();
            recover();
            switchTurn();
        }
    }
    else if (playerTurn == 1) {
        numberOfRowsRemoved = board2->left(n);

        // special actions
        if (numberOfRowsRemoved >= 2) {
            execAction(in);
        }

        if (board2->isTurnOver()) {
            board2->setTurnOver();
            recover();
            switchTurn();
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x44(%rdi), %eax
cmpl $0x1, %eax
je 0xb284
testl %eax, %eax
jne 0xb2cf
movq (%rbx), %rdi
movq (%rdi), %rax
movl %edx, %esi
callq *0x8(%rax)
cmpl $0x2, %eax
jl 0xb276
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2d6
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
movq %rbx, %r15
jmp 0xb2ad
leaq 0x10(%rbx), %r15
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
movl %edx, %esi
callq *0x8(%rax)
cmpl $0x2, %eax
jl 0xb2a4
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2d6
movq (%r15), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
testb %al, %al
je 0xb2cf
movq (%r15), %rdi
movq (%rdi), %rax
callq *0x78(%rax)
movq %rbx, %rdi
callq 0xb1f6
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xb4b0
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/game.cc
// Function: Game::switchTurn()
void Game::switchTurn() {
    if (playerTurn == 0) {
        board1->genThis();
        board2->setNext(board2->genNext());
        playerTurn = 1;
    }
    else if (playerTurn == 1) {
        board2->genThis();
        board1->setNext(board1->genNext());
        playerTurn = 0;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x44(%rdi), %eax
cmpl $0x1, %eax
je 0xb4d5
testl %eax, %eax
jne 0xb4fe
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
leaq 0x10(%rbx), %rax
pushq $0x1
popq %rbp
jmp 0xb4e4
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
xorl %ebp, %ebp
movq %rbx, %rax
movq (%rax), %r14
movq (%r14), %rax
movq %r14, %rdi
callq *0x48(%rax)
movq (%r14), %rcx
movq %r14, %rdi
movl %eax, %esi
callq *0x68(%rcx)
movl %ebp, 0x44(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/game.cc
// Function: Game::right(std::istream&, int)
void Game::right(std::istream & in, int n) {
    int numberOfRowsRemoved = 0;
    if (playerTurn == 0) {
        numberOfRowsRemoved = board1->right(n);

        // special actions
        if (numberOfRowsRemoved >= 2) {
            execAction(in);
        }

        if (board1->isTurnOver()) {
            board1->setTurnOver();
            recover();
            switchTurn();
        }
    }
    else if (playerTurn == 1) {
        numberOfRowsRemoved = board2->right(n);

        // special actions
        if (numberOfRowsRemoved >= 2) {
            execAction(in);
        }

        if (board2->isTurnOver()) {
            board2->setTurnOver();
            recover();
            switchTurn();
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x44(%rdi), %eax
cmpl $0x1, %eax
je 0xb544
testl %eax, %eax
jne 0xb58f
movq (%rbx), %rdi
movq (%rdi), %rax
movl %edx, %esi
callq *0x10(%rax)
cmpl $0x2, %eax
jl 0xb536
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2d6
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
movq %rbx, %r15
jmp 0xb56d
leaq 0x10(%rbx), %r15
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
movl %edx, %esi
callq *0x10(%rax)
cmpl $0x2, %eax
jl 0xb564
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2d6
movq (%r15), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
testb %al, %al
je 0xb58f
movq (%r15), %rdi
movq (%rdi), %rax
callq *0x78(%rax)
movq %rbx, %rdi
callq 0xb1f6
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xb4b0
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/game.cc
// Function: Game::drop(std::istream&, int)
void Game::drop(std::istream & in, int n) {
    int numberOfRowsRemoved = 0;
    if (playerTurn == 0) {
        if(n > 1){
            board1->setCountD(n - 1);
        } else if (board1->getCountD() > 0) {
            board1->setCountD(board1->getCountD() - 1);
        }

        numberOfRowsRemoved = board1->drop();

        // special actions
        if (numberOfRowsRemoved >= 2) {
            execAction(in);
        }

        if (board1->isTurnOver()) {
            board1->setTurnOver();
            recover();
            switchTurn();
        }
    }
    else if (playerTurn == 1) {
        if(n > 1){
            board2->setCountD(n - 1);
        } else if (board2->getCountD() > 0){
            board2->setCountD(board2->getCountD() - 1);
        }

        numberOfRowsRemoved = board2->drop();

        // special actions
        if (numberOfRowsRemoved >= 2) {
            execAction(in);
        }

        if (board2->isTurnOver()) {
            board2->setTurnOver();
            recover();
            switchTurn();
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x44(%rdi), %eax
cmpl $0x1, %eax
je 0xb651
testl %eax, %eax
jne 0xb6d5
movq (%rbx), %r15
cmpl $0x1, %edx
jg 0xb61a
movq (%r15), %rax
movq %r15, %rdi
callq *0x98(%rax)
testl %eax, %eax
jle 0xb62a
movq (%rbx), %r15
movq (%r15), %rax
movq %r15, %rdi
callq *0x98(%rax)
movl %eax, %edx
decl %edx
movq (%r15), %rax
movq %r15, %rdi
movl %edx, %esi
callq *0xa0(%rax)
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x2, %eax
jl 0xb643
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2d6
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
movq %rbx, %r15
jmp 0xb6b3
movq 0x10(%rbx), %r15
cmpl $0x1, %edx
jg 0xb67c
movq (%r15), %rax
movq %r15, %rdi
callq *0x98(%rax)
testl %eax, %eax
jle 0xb68c
movq 0x10(%rbx), %r15
movq (%r15), %rax
movq %r15, %rdi
callq *0x98(%rax)
movl %eax, %edx
decl %edx
movq (%r15), %rax
movq %r15, %rdi
movl %edx, %esi
callq *0xa0(%rax)
leaq 0x10(%rbx), %r15
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x2, %eax
jl 0xb6aa
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2d6
movq (%r15), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
testb %al, %al
je 0xb6d5
movq (%r15), %rdi
movq (%rdi), %rax
callq *0x78(%rax)
movq %rbx, %rdi
callq 0xb1f6
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xb4b0
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/game.cc
// Function: Game::levelup(int)
void Game::levelup(int n) {
    if (playerTurn == 0) {
        for (int i = 0; i < n; ++i) {
            board1->levelUp();
        }
    }
    else {
        for (int i = 0; i < n; ++i) {
            board2->levelUp();
        }
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x44(%rdi)
je 0xb700
xorl %ebp, %ebp
testl %esi, %esi
cmovgl %esi, %ebp
subl $0x1, %ebp
jb 0xb717
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
jmp 0xb6ef
xorl %ebp, %ebp
testl %esi, %esi
cmovgl %esi, %ebp
subl $0x1, %ebp
jb 0xb717
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
jmp 0xb707
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/game.cc
// Function: Game::leveldown(int)
void Game::leveldown(int n) {
    if (playerTurn == 0) {
        for (int i = 0; i < n; ++i) {
            board1->levelDown();
        }
    }
    else {
        for (int i = 0; i < n; ++i) {
            board2->levelDown();
        }
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x44(%rdi)
je 0xb742
xorl %ebp, %ebp
testl %esi, %esi
cmovgl %esi, %ebp
subl $0x1, %ebp
jb 0xb759
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
jmp 0xb731
xorl %ebp, %ebp
testl %esi, %esi
cmovgl %esi, %ebp
subl $0x1, %ebp
jb 0xb759
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
jmp 0xb749
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/game.cc
// Function: Game::norandom(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Game::norandom(std::string file) {
    if (playerTurn == 0) {
        board1->noRandom(file);
    }
    else if (playerTurn == 1) {
        board2->noRandom(file);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl 0x44(%rdi), %eax
cmpl $0x1, %eax
je 0xb794
testl %eax, %eax
jne 0xb7bc
movq (%rdi), %r14
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x53b0
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x80(%rax)
jmp 0xb7b4
movq 0x10(%rdi), %r14
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x53b0
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x80(%rax)
movq %rbx, %rdi
callq 0x5150
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0xb7d6
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x5150
movq %rbx, %rdi
callq 0x54b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/game.cc
// Function: Game::replaceBlock(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Game::replaceBlock(std::string cmd) {
    CellType type = CellType::E;

    if (cmd == "I") {
        type = CellType::I;
    }
    else if (cmd == "J") {
        type = CellType::J;
    }
    else if (cmd == "L") {
        type = CellType::L;
    }
    else if (cmd == "O") {
        type = CellType::O;
    }
    else if (cmd == "S") {
        type = CellType::S;
    }
    else if (cmd == "Z") {
        type = CellType::Z;
    }
    else if (cmd == "T") {
        type = CellType::T;
    }

    if (playerTurn == 0) {
        board1->replaceBlock(type);
    } else {
        board2->replaceBlock(type);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x610d(%rip), %rsi      # 0x11920
movq %r14, %rdi
callq 0x5af9
xorl %esi, %esi
testb %al, %al
jne 0xb893
leaq 0x60fc(%rip), %rsi      # 0x11924
movq %r14, %rdi
callq 0x5af9
testb %al, %al
je 0xb838
pushq $0x1
jmp 0xb892
leaq 0x60d1(%rip), %rsi      # 0x11910
movq %r14, %rdi
callq 0x5af9
testb %al, %al
je 0xb84f
pushq $0x2
jmp 0xb892
leaq 0x60bd(%rip), %rsi      # 0x11913
movq %r14, %rdi
callq 0x5af9
testb %al, %al
je 0xb866
pushq $0x3
jmp 0xb892
leaq 0x60aa(%rip), %rsi      # 0x11917
movq %r14, %rdi
callq 0x5af9
testb %al, %al
je 0xb87d
pushq $0x4
jmp 0xb892
leaq 0x60a8(%rip), %rsi      # 0x1192c
movq %r14, %rdi
callq 0x5af9
testb %al, %al
je 0xb8b6
pushq $0x5
popq %rsi
xorl %eax, %eax
cmpl $0x0, 0x44(%rbx)
setne %al
shll $0x4, %eax
movq (%rbx,%rax), %rdi
movq (%rdi), %rax
movq 0x90(%rax), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
leaq 0x6072(%rip), %rsi      # 0x1192f
movq %r14, %rdi
callq 0x5af9
movzbl %al, %esi
xorl $0x7, %esi
jmp 0xb893
nop
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/heavydecorator.cc
// Function: HeavyDecorator::left(int)
int HeavyDecorator::left(int time) {
	board->left(time);
	int lineRemove = 0;
	if (!board->down(1) || !board->down(1)) {
		lineRemove = board->drop();
	}
	notifyObservers();
	return lineRemove;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
pushq $0x1
popq %rsi
callq *0x20(%rax)
testb %al, %al
je 0xc800
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
pushq $0x1
popq %rsi
callq *0x20(%rax)
xorl %ebp, %ebp
testb %al, %al
jne 0xc80c
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0xda72
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/heavydecorator.cc
// Function: HeavyDecorator::right(int)
int HeavyDecorator::right(int time) {
	board->right(time);
	int lineRemove = 0;
	if (!board->down(1) || !board->down(1)) {
		lineRemove = board->drop();
	}
	notifyObservers();
	return lineRemove;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
pushq $0x1
popq %rsi
callq *0x20(%rax)
testb %al, %al
je 0xc852
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
pushq $0x1
popq %rsi
callq *0x20(%rax)
xorl %ebp, %ebp
testb %al, %al
jne 0xc85e
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0xda72
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/level3.cc
// Function: Level3::genBlock()
CellType Level3::genBlock() {
	if (readFromFile) {
		return genBlockFromFile();
	}
	const CellType types[9] = {
		CellType::I,
		CellType::J,
		CellType::L,
		CellType::O,
		CellType::T,
		CellType::S,
		CellType::Z
	};
	return types[rand() % 9];
}

// Assembly:
cmpb $0x1, 0x30(%rdi)
je 0xd866
subq $0x28, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
andl $0x0, 0x20(%rsp)
movaps 0x4510(%rip), %xmm0     # 0x11850
movups %xmm0, 0x4(%rsp)
movabsq $0x500000004, %rax      # imm = 0x500000004
movq %rax, 0x14(%rsp)
callq 0x50b0
pushq $0x9
popq %rcx
cltd
idivl %ecx
movslq %edx, %rax
movl (%rsp,%rax,4), %eax
addq $0x28, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/level.cc
// Function: Level::setReadFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Level::setReadFromFile(std::string fileName) {
	readFromFile = true;

	std::ifstream fin;
	fin.open(fileName.c_str());

	sequence.clear();
	char c;
	CellType type = CellType::I;
	while (fin >> c) {
		switch (c) {
			case 'I':
				type = CellType::I;
				break;
			case 'J':
				type = CellType::J;
				break;
			case 'L':
				type = CellType::L;
				break;
			case 'O':
				type = CellType::O;
				break;
			case 'S':
				type = CellType::S;
				break;
			case 'Z':
				type = CellType::Z;
				break;
			case 'T':
				type = CellType::T;
				break;
		}
		sequence.emplace_back(type);
	}
	nextLine = 0;

	fin.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %r14
movq %rdi, %rbx
movb $0x1, 0x30(%rdi)
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x52e0
movq (%r14), %rsi
pushq $0x8
popq %rdx
movq %r15, %rdi
callq 0x51e0
movq 0x38(%rbx), %rax
cmpq %rax, 0x40(%rbx)
je 0xd762
movq %rax, 0x40(%rbx)
leaq 0x8(%rsp), %r14
andl $0x0, (%r14)
leaq 0x38(%rbx), %r15
leaq 0x10(%rsp), %r12
leaq 0xf(%rsp), %r13
leaq 0x413c(%rip), %rbp      # 0x118bc
movq %r12, %rdi
movq %r13, %rsi
callq 0x5370
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xd806
movzbl 0xf(%rsp), %eax
leal -0x49(%rax), %ecx
cmpl $0xb, %ecx
ja 0xd7b7
movslq (%rbp,%rcx,4), %rax
addq %rbp, %rax
jmpq *%rax
andl $0x0, 0x8(%rsp)
jmp 0xd7f6
cmpl $0x5a, %eax
jne 0xd7f6
movl $0x5, 0x8(%rsp)
jmp 0xd7f6
movl $0x2, 0x8(%rsp)
jmp 0xd7f6
movl $0x6, 0x8(%rsp)
jmp 0xd7f6
movl $0x3, 0x8(%rsp)
jmp 0xd7f6
movl $0x1, 0x8(%rsp)
jmp 0xd7f6
movl $0x4, 0x8(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0xd898
jmp 0xd780
andl $0x0, 0x50(%rbx)
leaq 0x10(%rsp), %rdi
callq 0x5060
leaq 0x10(%rsp), %rdi
callq 0x5090
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd834
jmp 0xd834
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5090
movq %rbx, %rdi
callq 0x54b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/textdisplay.cc
// Function: TextDisplay::TextDisplay(int, int, int)
TextDisplay::TextDisplay(int numberOfPlayers, int numberOfRows, int numberOfColumns){
	for (int i = 0; i < numberOfPlayers; ++i) {
		level.emplace_back(0);
		score.emplace_back(0);

		boardData.emplace_back(std::vector<std::vector<char>>{});
		for (int r = 0; r < numberOfRows; ++r) {
			boardData.at(i).emplace_back(std::vector<char>{});
			for (int c = 0; c < numberOfColumns; ++c) {
				boardData.at(i).at(r).emplace_back(' ');
			}
		}

		nextType.emplace_back(CellType::E);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %r13d
leaq 0xe120(%rip), %rax      # 0x1bd18
movq %rax, (%rdi)
leaq 0x8(%rdi), %rax
movq %rax, 0x38(%rsp)
leaq 0x20(%rdi), %rax
movq %rax, 0x30(%rsp)
xorl %r14d, %r14d
testl %ecx, %ecx
cmovlel %r14d, %ecx
movl %ecx, 0xc(%rsp)
leaq 0x38(%rdi), %r15
testl %edx, %edx
cmovlel %r14d, %r13d
leaq 0x50(%rdi), %rax
movq %rax, 0x28(%rsp)
testl %esi, %esi
cmovlel %r14d, %esi
movq %rsi, 0x40(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
leaq 0x10(%rsp), %r12
cmpq 0x40(%rsp), %r14
je 0xdd2e
andl $0x0, 0x10(%rsp)
movq 0x38(%rsp), %rdi
movq %r12, %rsi
callq 0xe4b2
andl $0x0, 0x10(%rsp)
movq 0x30(%rsp), %rdi
movq %r12, %rsi
callq 0xe4b2
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0xe4e6
movq %r12, %rdi
callq 0x7a0e
xorl %ebx, %ebx
cmpq %r13, %rbx
je 0xdd11
movq %r15, %rdi
movq %r14, %rsi
callq 0xe530
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq %rax, %rdi
movq %r12, %rsi
callq 0xe54e
movq %r12, %rdi
callq 0x7a92
movl 0xc(%rsp), %ebp
subl $0x1, %ebp
jb 0xdd0c
movq %r15, %rdi
movq %r14, %rsi
callq 0xe530
movq %rax, %rdi
movq %rbx, %rsi
callq 0xe598
movb $0x20, 0x10(%rsp)
movq %rax, %rdi
movq %r12, %rsi
callq 0x9a94
jmp 0xdcdf
incq %rbx
jmp 0xdcaa
movl $0x7, 0x10(%rsp)
movq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0xe5b6
incq %r14
jmp 0xdc58
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xdd65
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7a0e
jmp 0xdd68
jmp 0xdd65
jmp 0xdd65
jmp 0xdd65
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7a92
jmp 0xdd68
jmp 0xdd65
movq %rax, %rbx
movq 0x28(%rsp), %rdi
callq 0x9d50
movq %r15, %rdi
callq 0xbb9c
movq 0x30(%rsp), %rdi
callq 0xbc20
movq 0x38(%rsp), %rdi
callq 0xbc20
movq %rbx, %rdi
callq 0x54b0
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/textdisplay.cc
// Function: TextDisplay::notify(Subject&)
void TextDisplay::notify(Subject & s) {
	Board & b = dynamic_cast<Board&>(s);
	BoardInfo &bi = dynamic_cast<BoardInfo&>(b.getInfo());

	int player = bi.player;
	level.at(player) = bi.level;
	score.at(player) = bi.score;
	boardData.at(player) = bi.boardData;
	nextType.at(player) = bi.nextType;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
leaq 0xd45d(%rip), %rsi      # 0x1b208
leaq 0xd556(%rip), %rdx      # 0x1b308
movq %rax, %rdi
xorl %ecx, %ecx
callq 0x52d0
testq %rax, %rax
je 0xde50
movq (%rax), %rcx
movq %rax, %rdi
callq *(%rcx)
leaq 0xdbdc(%rip), %rsi      # 0x1b9b0
leaq 0xd585(%rip), %rdx      # 0x1b360
movq %rax, %rdi
xorl %ecx, %ecx
callq 0x52d0
testq %rax, %rax
je 0xde50
movq %rax, %r14
movslq 0x8(%rax), %r15
movl 0xc(%rax), %ebp
leaq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0xe5ea
movl %ebp, (%rax)
movl 0x10(%r14), %ebp
leaq 0x20(%rbx), %rdi
movq %r15, %rsi
callq 0xe5ea
movl %ebp, (%rax)
movq %r14, %r12
addq $0x18, %r12
leaq 0x38(%rbx), %rdi
movq %r15, %rsi
callq 0xe530
movq %rax, %rdi
movq %r12, %rsi
callq 0xe60c
movl 0x30(%r14), %ebp
addq $0x50, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd8cc
movl %ebp, (%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x5500
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/window.cc
// Function: Xwindow::fillPolygon(int, int, int, int, int, int)
void Xwindow::fillPolygon(int x, int y, int vertices, int side, int rotate, int colour){
	XPoint* point = new XPoint[vertices];

	point[0] = XPoint{(short int)x, (short int)y};

	double angle = rotate + pi/2;

	for ( int i = 1; i < vertices; ++i ){
		short int X = side * sin(angle);
		short int Y = side * cos(angle);
		point[i] = XPoint{X,Y};
		angle += 2*pi - pi* 2/vertices;
	}

	XSetForeground(d, gc, colours[colour]);
	XFillPolygon(d, w, gc, point, vertices, Convex, CoordModePrevious);
	XSetForeground(d, gc, colours[Black]);

	delete[] point;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %r15d
movl %r8d, 0x8(%rsp)
movl %ecx, %ebp
movl %edx, %r13d
movl %esi, %r12d
movq %rdi, %rbx
movl 0x80(%rsp), %eax
movl %eax, 0x14(%rsp)
movl %ecx, %eax
shlq $0x2, %rax
testl %ecx, %ecx
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x5030
movq %rax, %r14
movw %r12w, (%rax)
movw %r13w, 0x2(%rax)
cvtsi2sd %r15d, %xmm1
movsd 0xc04b(%rip), %xmm0     # 0x1c2e8
mulsd 0x182b(%rip), %xmm0     # 0x11ad0
addsd %xmm1, %xmm0
cvtsi2sdl 0x8(%rsp), %xmm1
cvtsi2sd %ebp, %xmm2
movsd %xmm2, 0x18(%rsp)
movslq %ebp, %r15
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
movapd %xmm1, 0x20(%rsp)
pushq $0x1
popq %r12
cmpq %r15, %r12
jge 0x1033b
movsd %xmm0, 0x8(%rsp)
callq 0x5070
movapd %xmm0, 0x30(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x54f0
movapd 0x30(%rsp), %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
mulpd 0x20(%rsp), %xmm1
cvttpd2dq %xmm1, %xmm0
pshuflw $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3,4,5,6,7]
movd %xmm0, (%r14,%r12,4)
movsd 0xbfd6(%rip), %xmm2     # 0x1c2e8
movapd %xmm2, %xmm1
mulsd 0x17ba(%rip), %xmm1     # 0x11ad8
divsd 0x18(%rsp), %xmm1
addsd %xmm2, %xmm2
addsd %xmm1, %xmm2
movsd 0x8(%rsp), %xmm0
addsd %xmm2, %xmm0
incq %r12
jmp 0x102ca
movq (%rbx), %rdi
movq 0x18(%rbx), %rsi
movslq 0x14(%rsp), %rax
movq 0x20(%rbx,%rax,8), %rdx
callq 0x5110
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movq 0x18(%rbx), %rdx
movl $0x1, (%rsp)
pushq $0x2
popq %r9
movq %r14, %rcx
movl %ebp, %r8d
callq 0x54e0
movq (%rbx), %rdi
movq 0x18(%rbx), %rsi
movq 0x28(%rbx), %rdx
callq 0x5110
movq %r14, %rdi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5350
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/window.cc
// Function: Xwindow::printMessage(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, XFontStruct&)
void Xwindow::printMessage(int x, int y, const string& msg, int colour, XFontStruct& f){
  XSetForeground(d, gc, colours[colour]);
  XTextItem ti;
  ti.chars = const_cast<char*>(msg.c_str());
  ti.nchars = msg.length();
  ti.delta = 0;
  ti.font = f.fid;
  XDrawText(d, w, gc, x, y, &ti, 1);
  XSetForeground(d, gc, colours[Black]);
  XFlush(d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r9, %r14
movq %rcx, %r15
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x18(%rbx), %rsi
movslq %r8d, %rax
movq 0x20(%rbx,%rax,8), %rdx
callq 0x5110
movq (%r15), %rax
leaq 0x8(%rsp), %r9
movq %rax, (%r9)
movl 0x8(%r15), %eax
movl %eax, 0x8(%r9)
andl $0x0, 0xc(%r9)
movq 0x8(%r14), %rax
movq %rax, 0x10(%r9)
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movq 0x18(%rbx), %rdx
movl $0x1, (%rsp)
movl %r12d, %ecx
movl %ebp, %r8d
callq 0x53a0
movq (%rbx), %rdi
movq 0x18(%rbx), %rsi
movq 0x28(%rbx), %rdx
callq 0x5110
movq (%rbx), %rdi
callq 0x5420
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/window.cc
// Function: Xwindow::drawStringFont(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void Xwindow::drawStringFont(int x, int y, string msg, string font, int colour) {
  XFontStruct * f = XLoadQueryFont(d, font.c_str());
  
	if ( f == nullptr ){
		f = XLoadQueryFont(d, "6x13");
	}

	printMessage(x, y, msg, colour, *f);
	delete f;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r12
movq (%rdi), %rdi
movq (%r8), %rsi
callq 0x54c0
movq %rax, %r13
testq %rax, %rax
jne 0x105fb
movq (%r12), %rdi
leaq 0x1521(%rip), %rsi      # 0x11b14
callq 0x54c0
movq %rax, %r13
movq %r12, %rdi
movl %r15d, %esi
movl %ebp, %edx
movq %r14, %rcx
movl %ebx, %r8d
movq %r13, %r9
callq 0x1052c
pushq $0x60
popq %rsi
movq %r13, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x52b0
// File: /workspace/github_cpp_makefile_star2_O2/MatthewZMD[P]TetrisDual/window.cc
// Function: Xwindow::drawBigString(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void Xwindow::drawBigString(int x, int y, string msg, int colour) {
  // Font f = XLoadFont(d, "-*-helvetica-bold-r-normal--*-240-*-*-*-*-*");
  ostringstream name;
  name << "-*-helvetica-bold-r-*-*-*-240-" << width/5 << "-" << height/5 << "-*-*-*-*";

	drawStringFont(x, y, msg, name.str(), colour);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movl %r8d, %ebx
movq %rcx, %r12
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
leaq 0x40(%rsp), %r13
movq %r13, %rdi
callq 0x5380
leaq 0x14bc(%rip), %rsi      # 0x11b19
movq %r13, %rdi
callq 0x5290
movq %rax, %rdi
movl 0x78(%r15), %eax
pushq $0x5
popq %r13
cltd
idivl %r13d
movl %eax, %esi
callq 0x54a0
leaq 0x14b4(%rip), %rsi      # 0x11b36
movq %rax, %rdi
callq 0x5290
movq %rax, %rdi
movl 0x7c(%r15), %eax
cltd
idivl %r13d
movl %eax, %esi
callq 0x54a0
leaq 0x1468(%rip), %rsi      # 0x11b0b
movq %rax, %rdi
callq 0x5290
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x53b0
leaq 0x48(%rsp), %rsi
movq %rsp, %rdi
callq 0x5450
leaq 0x20(%rsp), %rcx
movq %rsp, %r8
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl %ebx, %r9d
callq 0x105bc
movq %rsp, %rdi
callq 0x5150
leaq 0x20(%rsp), %rdi
callq 0x5150
leaq 0x40(%rsp), %rdi
callq 0x5080
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5150
jmp 0x1071b
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5150
jmp 0x1072a
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x5080
movq %rbx, %rdi
callq 0x54b0
// File: /workspace/github_cpp_makefile_star2_O2/Altius[P]hotspot2/src/resolveOverlapsInSummit-CenteredPeaks.cpp
// Function: Peak_coordLT(Peak const&, Peak const&)
bool Peak_coordLT(const Peak& a, const Peak& b)
{
  if (a.beg == b.beg)
    {
      if (a.end == b.end)
	{
	  if (a.id == b.id)
	    return a.score < b.score;
	  else
	    return a.id < b.id;
	}
      else
	return a.end < b.end;
    }
  return a.beg < b.beg;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x20(%rsi), %rax
cmpq %rax, 0x20(%rdi)
jne 0x2404
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rsi), %rax
cmpq %rax, 0x28(%rdi)
jne 0x2404
leaq 0x30(%rbx), %r15
leaq 0x30(%r14), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x2958
testb %al, %al
je 0x2413
movss 0x50(%r14), %xmm0
ucomiss 0x50(%rbx), %xmm0
seta %al
jmp 0x2407
setl %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %r12, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2981
// File: /workspace/github_cpp_makefile_star2_O2/Altius[P]hotspot2/src/resolveOverlapsInSummit-CenteredPeaks.cpp
// Function: resolveOverlaps(std::__cxx11::list<Peak, std::allocator<Peak>>&)
void resolveOverlaps(list<Peak>& peaks)
{
  peaks.sort(Peak_scoreGT);

  for (list<Peak>::iterator it1 = peaks.begin(); it1 != peaks.end(); it1++)
    {
      list<Peak>::iterator it2(it1);
      it2++;
      while (it2 != peaks.end())
	{
	  if (it2->beg < it1->end && it2->end > it1->beg)
	    {
	      list<Peak>::iterator it3(it2);
	      it2++;
	      peaks.erase(it3);
	    }
	  else
	    it2++;
	}
    }
  // restore to genomic, sort-bed order
  peaks.sort(Peak_coordLT);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq -0x1c(%rip), %rsi       # 0x2429
callq 0x2994
movq %rbx, %r14
movq (%r14), %r14
cmpq %rbx, %r14
je 0x2486
movq (%r14), %rsi
cmpq %rbx, %rsi
je 0x244d
movq 0x30(%rsi), %rax
cmpq 0x38(%r14), %rax
jge 0x2481
movq 0x38(%rsi), %rax
cmpq 0x30(%r14), %rax
jle 0x2481
movq (%rsi), %r15
movq %rbx, %rdi
callq 0x2b4a
movq %r15, %rsi
jmp 0x2458
movq (%rsi), %rsi
jmp 0x2458
leaq -0xd1(%rip), %rsi       # 0x23bc
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2994