// File: /workspace/github_cpp_makefile_star2_O2/Bartor[P]kompilator/middle/abstract_assembler/AbstractAssembler.cpp
// Function: AbstractAssembler::assembleCommands(CommandList&)
SimpleResolution *AbstractAssembler::assembleCommands(CommandList &commandList) {
    InstructionList &instructions = *new InstructionList();

    for (const auto &command : commandList.commands) {
        long long tempVars = 0;

        if (auto commandList = dynamic_cast<CommandList *>(command)) { // NESTED COMMANDLIST
            SimpleResolution *assmebledCommands = assembleCommands(*commandList);
            instructions.append(assmebledCommands->instructions);
            tempVars += assmebledCommands->temporaryVars;
        } else if (auto readNode = dynamic_cast<Read *>(command)) { // READ
            Resolution *idRes = resolve(readNode->identifier, false);

            if (!idRes->writable) throw "Trying to read to non-writable variable " + readNode->identifier.name;

            Get *get = new Get();
            if (idRes->indirect) {
                TemporaryVariable *tempAddressVar = new TemporaryVariable(TEMPORARY_NAMES, *new ResolvableAddress());
                scopedVariables->pushVariableScope(tempAddressVar);

                instructions.append(idRes->instructions).append(new Store(tempAddressVar->getAddress())).append(get).append(new Storei(tempAddressVar->getAddress()));
                tempVars += 1;
            } else {
                instructions.append(get).append(new Store(idRes->address));
            }

            tempVars += idRes->temporaryVars;
        } else if (auto writeNode = dynamic_cast<Write *>(command)) { // WRITE
            Resolution *valRes = resolve(writeNode->value);
            Put *put = new Put();

            if (valRes->indirect) {
                instructions.append(valRes->instructions).append(new Loadi(primaryAccumulator)).append(put);
            } else {
                instructions.append(new Load(valRes->address)).append(put);
            }

            tempVars += valRes->temporaryVars;
        } else if (auto assignNode = dynamic_cast<Assignment *>(command)) { // ASSIGN
            Resolution *idRes = resolve(assignNode->identifier, false);

            if (!idRes->writable) throw "Trying to assign to non-writable variable " + assignNode->identifier.name;

            SimpleResolution *expRes = assembleExpression(assignNode->expression);

            if (idRes->indirect) {
                TemporaryVariable *tempAddressVar = new TemporaryVariable(TEMPORARY_NAMES, *new ResolvableAddress());
                scopedVariables->pushVariableScope(tempAddressVar);

                instructions.append(idRes->instructions).append(new Store(tempAddressVar->getAddress())).append(expRes->instructions).append(new Storei(tempAddressVar->getAddress()));
                tempVars += 1;
            } else {
                instructions.append(expRes->instructions).append(new Store(idRes->address));
            }

            tempVars += idRes->temporaryVars + expRes->temporaryVars;
        } else if (auto ifNode = dynamic_cast<If *>(command)) { // IF
            SimpleResolution *codeResolution = assembleCommands(ifNode->commands); // assemble inner instructions
            SimpleResolution *conditionResolution = assembleCondition(ifNode->condition, codeResolution->instructions); // assemble condition

            instructions.append(conditionResolution->instructions) // add condition code
                    .append(codeResolution->instructions); // add inner block code

            tempVars += conditionResolution->temporaryVars;
        } else if (auto ifElseNode = dynamic_cast<IfElse *>(command)) { // IF ELSE
            SimpleResolution *ifCodeResolution = assembleCommands(ifElseNode->commands);
            SimpleResolution *conditionResolution = assembleCondition(ifElseNode->condition, ifCodeResolution->instructions);
            SimpleResolution *elseCodeResolution = assembleCommands(ifElseNode->elseCommands);

            Jump *jump = new Jump(elseCodeResolution->instructions.end());
            ifCodeResolution->instructions.append(jump);

            instructions.append(conditionResolution->instructions)
                    .append(ifCodeResolution->instructions)
                    .append(elseCodeResolution->instructions);

            tempVars += conditionResolution->temporaryVars;
        } else if (auto whileNode = dynamic_cast<While *>(command)) { // WHILE
            SimpleResolution *codeResolution = assembleCommands(whileNode->commands);

            if (whileNode->doWhile) {
                InstructionList *jumpBlock = new InstructionList();
                Jump *jump = new Jump(codeResolution->instructions.start());
                jumpBlock->append(jump);

                SimpleResolution *conditionResolution = assembleCondition(whileNode->condition, *jumpBlock);
                instructions.append(codeResolution->instructions)
                        .append(conditionResolution->instructions)
                        .append(*jumpBlock);

                tempVars += conditionResolution->temporaryVars;
            } else {
                SimpleResolution *conditionResolution = assembleCondition(whileNode->condition, codeResolution->instructions);
                Jump *jump = new Jump(conditionResolution->instructions.start());
                codeResolution->instructions.append(jump);

                instructions.append(conditionResolution->instructions)
                        .append(codeResolution->instructions);

                tempVars += conditionResolution->temporaryVars;
            }
        } else if (auto forNode = dynamic_cast<For *>(command)) {
            NumberVariable *iterator = new NumberVariable(
                    forNode->variableName,
                    *new ResolvableAddress(),
                    true
            );
            iterator->initialized = true;
            scopedVariables->pushVariableScope(iterator); // create iterator BEFORE commands would use it
            tempVars += 1;

            Resolution *startRes = resolve(forNode->startValue); // resolve start and end
            Resolution *endRes = resolve(forNode->endValue);
            tempVars += startRes->temporaryVars + endRes->temporaryVars;

            ResolvableAddress *iterationEndAddress; // we will need it in comparing

            if (endRes->type == CONSTANT) {
                iterationEndAddress = &endRes->address;
            } else {
                TemporaryVariable *iterationEnd = new TemporaryVariable(TEMPORARY_NAMES, *new ResolvableAddress());
                scopedVariables->pushVariableScope(iterationEnd);
                tempVars += 1;

                iterationEndAddress = &iterationEnd->getAddress();

                instructions.append(endRes->instructions)
                        .append(endRes->indirect ? static_cast<Instruction *>(new Loadi(primaryAccumulator)) : static_cast<Instruction *>(new Load(endRes->address)))
                        .append(new Store(*iterationEndAddress));
            }

            SimpleResolution *codeResolution = assembleCommands(forNode->commands); // assemble iterated commands

            InstructionList &forLoopInstructions = *new InstructionList();
            forLoopInstructions.append(new Sub(*iterationEndAddress))
                    .append(forNode->reversed ? static_cast<Instruction *>(new Jneg(codeResolution->instructions.end())) : static_cast<Instruction *>(new Jpos(codeResolution->instructions.end())));

            codeResolution->instructions.append(new Load(iterator->getAddress()))
                    .append(forNode->reversed ? static_cast<Instruction *>(new Dec()) : static_cast<Instruction *>(new Inc()))
                    .append(new Store(iterator->getAddress()))
                    .append(new Jump(forLoopInstructions.start()));

            instructions.append(startRes->instructions) // load start instructions
                    .append(startRes->indirect ? static_cast<Instruction *>(new Loadi(primaryAccumulator)) : static_cast<Instruction *>(new Load(startRes->address)))
                    .append(new Store(iterator->getAddress())); // store it in the iterator

            instructions.append(forLoopInstructions)
                    .append(codeResolution->instructions);
        }

        scopedVariables->popVariableScope(tempVars);
    }

    return new SimpleResolution(
            instructions,
            0
    );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %rbx
movq %rdi, %r15
pushq $0x20
popq %rdi
callq 0x51c0
movq %rax, %r14
movq %rax, %rdi
callq 0x14d30
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq %rcx, -0xe0(%rbp)
movq %rax, %rbx
leaq 0x1487e(%rip), %rax     # 0x1f6d8
addq $0x10, %rax
movq %rax, -0xc8(%rbp)
leaq 0x14ba4(%rip), %rax     # 0x1fa10
addq $0x10, %rax
movq %rax, -0xc0(%rbp)
leaq 0x14d22(%rip), %rax     # 0x1fba0
addq $0x10, %rax
movq %rax, -0xb8(%rbp)
leaq 0x149f0(%rip), %rax     # 0x1f880
addq $0x10, %rax
movq %rax, -0x60(%rbp)
leaq 0x14a31(%rip), %rax     # 0x1f8d0
addq $0x10, %rax
movq %rax, -0x48(%rbp)
leaq 0x14c02(%rip), %rax     # 0x1fab0
addq $0x10, %rax
movq %rax, -0x58(%rbp)
leaq 0x14a63(%rip), %rax     # 0x1f920
addq $0x10, %rax
movq %rax, -0x78(%rbp)
leaq 0x14c34(%rip), %rax     # 0x1fb00
addq $0x10, %rax
movq %rax, -0xb0(%rbp)
leaq 0x1487a(%rip), %rax     # 0x1f758
addq $0x10, %rax
movq %rax, -0x80(%rbp)
leaq 0x14a83(%rip), %rax     # 0x1f970
addq $0x10, %rax
movq %rax, -0xa0(%rbp)
leaq 0x14d41(%rip), %rax     # 0x1fc40
addq $0x10, %rax
movq %rax, -0xd0(%rbp)
leaq 0x14cdf(%rip), %rax     # 0x1fbf0
addq $0x10, %rax
movq %rax, -0xd8(%rbp)
leaq 0x8(%r15), %rax
movq %rax, -0x70(%rbp)
movq %r15, -0x30(%rbp)
movq %r14, -0x98(%rbp)
cmpq -0xe0(%rbp), %rbx
je 0xba37
movq (%rbx), %r12
testq %r12, %r12
je 0xaf8a
movq %rbx, -0x38(%rbp)
movq %r12, %rdi
leaq 0x146c6(%rip), %rbx     # 0x1f618
movq %rbx, %rsi
leaq 0x143d4(%rip), %rdx     # 0x1f330
xorl %ecx, %ecx
callq 0x51f0
testq %rax, %rax
je 0xaf92
movq %r15, %rdi
movq %rax, %rsi
callq 0xae14
movq %rax, %rbx
movq 0x8(%rax), %rsi
movq %r14, %rdi
callq 0x14dee
movq (%rbx), %r13
jmp 0xb1ba
xorl %r13d, %r13d
jmp 0xb1be
movq %r12, %rdi
movq %rbx, %rsi
leaq 0x14541(%rip), %rdx     # 0x1f4e0
xorl %ecx, %ecx
callq 0x51f0
testq %rax, %rax
je 0xb0e0
movq %rax, %rbx
movq 0x8(%rax), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0xbb48
cmpb $0x0, (%rax)
je 0xba59
movq %rax, %r12
pushq $0x18
popq %rdi
callq 0x51c0
movq %rax, %r15
andq $0x0, 0x10(%rax)
orq $-0x1, 0x8(%rax)
movq -0xd8(%rbp), %rax
movq %rax, (%r15)
cmpb $0x1, 0x1(%r12)
jne 0xb174
pushq $0x30
popq %rdi
callq 0x51c0
movq %rax, %r13
pushq $0x10
popq %rdi
callq 0x51c0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rax, 0x8(%r13)
movb $0x0, 0x10(%r13)
leaq 0x152e0(%rip), %rax     # 0x20300
movq %rax, 0x18(%r13)
movw $0x101, 0x28(%r13)      # imm = 0x101
movq -0x80(%rbp), %rax
movq %rax, (%r13)
movq $0x1, 0x20(%r13)
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rdi
movq %r13, %rsi
callq 0x12a70
movq 0x10(%r12), %rsi
movq %r14, %rdi
callq 0x14dee
movq %rax, %r14
pushq $0x20
popq %rdi
callq 0x51c0
movq %rax, %rbx
movq %r13, %rdi
callq 0x12e14
orq $-0x1, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq -0x48(%rbp), %rax
movq %rax, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14e9c
movq %rax, %rdi
movq %r15, %rsi
callq 0x14e9c
movq %rax, %r14
pushq $0x20
popq %rdi
callq 0x51c0
movq %rax, %rbx
movq %r13, %rdi
callq 0x12e14
orq $-0x1, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq -0xa0(%rbp), %rax
movq %rax, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14e9c
pushq $0x1
popq %r13
movq -0x98(%rbp), %r14
jmp 0xb1b1
movq %rbx, %r13
movq %r12, %rdi
movq %rbx, %rsi
leaq 0x14438(%rip), %rdx     # 0x1f528
xorl %ecx, %ecx
callq 0x51f0
testq %rax, %rax
je 0xb1d3
movq 0x8(%rax), %rsi
movq %r15, %rdi
callq 0xc240
movq %rax, %r15
pushq $0x18
popq %rdi
callq 0x51c0
movq %rax, %r12
andq $0x0, 0x10(%rax)
orq $-0x1, 0x8(%rax)
movq -0xd0(%rbp), %rax
movq %rax, (%r12)
cmpb $0x1, 0x1(%r15)
jne 0xb321
movq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x14dee
movq %rax, %rbx
pushq $0x20
popq %rdi
callq 0x51c0
movq -0x70(%rbp), %rcx
movq (%rcx), %rcx
orq $-0x1, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq -0x78(%rbp), %rcx
movq %rcx, (%rax)
movq %rbx, %rdi
jmp 0xb344
movq %r14, %rdi
movq %r15, %rsi
callq 0x14e9c
movq %rax, %rbx
pushq $0x20
popq %rdi
callq 0x51c0
movq 0x18(%r12), %rcx
orq $-0x1, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x14e9c
xorl %r13d, %r13d
movq -0x30(%rbp), %r15
addq 0x8(%r12), %r13
movq -0x38(%rbp), %rbx
movq 0x28(%r15), %rdi
movq %r13, %rsi
callq 0x12b56
addq $0x8, %rbx
jmp 0xaf2f
movq %r12, %rdi
movq %r13, %rsi
leaq 0x14198(%rip), %rdx     # 0x1f378
xorl %ecx, %ecx
callq 0x51f0
testq %rax, %rax
je 0xb368
movq %rax, %r15
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq 0xbb48
cmpb $0x0, (%rax)
je 0xba91
movq %rax, %r12
movq 0x10(%r15), %rsi
movq %rbx, %rdi
callq 0xc3ea
cmpb $0x1, 0x1(%r12)
movq %rbx, %r15
jne 0xb3d6
movq %rax, -0x40(%rbp)
pushq $0x30
popq %rdi
callq 0x51c0
movq %rax, %r13
pushq $0x10
popq %rdi
callq 0x51c0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rax, 0x8(%r13)
movb $0x0, 0x10(%r13)
leaq 0x150a7(%rip), %rax     # 0x20300
movq %rax, 0x18(%r13)
movw $0x101, 0x28(%r13)      # imm = 0x101
movq -0x80(%rbp), %rax
movq %rax, (%r13)
movq $0x1, 0x20(%r13)
movq 0x28(%r15), %rdi
movq %r13, %rsi
callq 0x12a70
movq 0x10(%r12), %rsi
movq %r14, %r15
movq %r14, %rdi
callq 0x14dee
movq %rax, %r14
pushq $0x20
popq %rdi
callq 0x51c0
movq %rax, %rbx
movq %r13, %rdi
callq 0x12e14
orq $-0x1, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq -0x48(%rbp), %rax
movq %rax, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14e9c
movq -0x40(%rbp), %rcx
movq 0x8(%rcx), %rsi
movq %rax, %rdi
callq 0x14dee
movq %rax, %r14
pushq $0x20
popq %rdi
callq 0x51c0
movq %rax, %rbx
movq %r13, %rdi
callq 0x12e14
orq $-0x1, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq -0xa0(%rbp), %rax
movq %rax, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14e9c
pushq $0x1
popq %r13
movq %r15, %r14
movq -0x30(%rbp), %r15
movq -0x40(%rbp), %rbx
jmp 0xb417
pushq $0x20
popq %rdi
callq 0x51c0
movq 0x18(%r15), %rcx
orq $-0x1, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq -0x60(%rbp), %rcx
movq %rcx, (%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x14e9c
movq -0x38(%rbp), %rbx
movq %rax, %rdi
movq %r12, %rsi
callq 0x14e9c
movq 0x8(%r15), %r13
movq -0x30(%rbp), %r15
jmp 0xb1be
movq %r12, %rdi
movq %r13, %rsi
leaq 0x1404b(%rip), %rdx     # 0x1f3c0
xorl %ecx, %ecx
callq 0x51f0
testq %rax, %rax
je 0xb424
movq %rax, %rbx
movq 0x10(%rax), %rsi
movq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0xae14
movq 0x8(%rbx), %rsi
movq 0x8(%rax), %rbx
movq %r12, %rdi
movq %rbx, %rdx
callq 0x10f8c
movq %r14, %r15
movq %rax, %r14
movq 0x8(%rax), %rsi
movq %r15, %rdi
callq 0x14dee
movq %rax, %rdi
movq %rbx, %rsi
callq 0x14dee
movq (%r14), %r13
movq %r15, %r14
movq %r12, %r15
jmp 0xb1ba
movq 0x8(%rax), %rsi
movq %r14, %rdi
movq %rax, %rbx
callq 0x14dee
movq %rax, %r13
pushq $0x20
popq %rdi
callq 0x51c0
movq 0x18(%r12), %rcx
orq $-0x1, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
movq %r13, %rdi
movq %rax, %rsi
callq 0x14e9c
xorl %r13d, %r13d
addq 0x8(%r12), %r13
addq (%rbx), %r13
jmp 0xb1ba
movq %r12, %rdi
movq %r13, %rsi
leaq 0x13fd7(%rip), %rdx     # 0x1f408
xorl %ecx, %ecx
callq 0x51f0
testq %rax, %rax
movq -0x30(%rbp), %r15
je 0xb4df
movq %rax, %rbx
movq 0x10(%rax), %rsi
movq %r15, %rdi
callq 0xae14
movq 0x8(%rbx), %rsi
movq 0x8(%rax), %r12
movq %r15, %rdi
movq %r12, %rdx
callq 0x10f8c
movq %rax, -0x40(%rbp)
movq 0x18(%rbx), %rsi
movq %r15, %rdi
callq 0xae14
movq %rax, %rbx
pushq $0x20
popq %rdi
callq 0x51c0
movq %rax, %r15
movq 0x8(%rbx), %r13
movq %r13, %rdi
callq 0x14da8
orq $-0x1, 0x8(%r15)
movb $0x0, 0x10(%r15)
movq -0x58(%rbp), %rcx
movq %rcx, (%r15)
movq %rax, 0x18(%r15)
movq %r12, %rdi
movq %r15, %rsi
callq 0x14e9c
movq -0x40(%rbp), %rbx
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x14dee
movq %rax, %rdi
movq %r12, %rsi
callq 0x14dee
movq %rax, %rdi
movq %r13, %rsi
callq 0x14dee
movq (%rbx), %r13
jmp 0xba2e
movq %r12, %rdi
movq %r13, %rsi
leaq 0x13f64(%rip), %rdx     # 0x1f450
xorl %ecx, %ecx
callq 0x51f0
testq %rax, %rax
movq -0x38(%rbp), %rbx
je 0xb5a6
movq %rax, %r13
movq 0x10(%rax), %rsi
movq %r15, %rdi
callq 0xae14
movq %r15, %rdi
movq %rax, %r15
cmpb $0x1, 0x18(%r13)
movq %r13, %r12
jne 0xb759
pushq $0x20
popq %rbx
movq %rbx, %rdi
callq 0x51c0
movq %rax, %r13
movq %rax, %rdi
callq 0x14d30
movq %rbx, %rdi
callq 0x51c0
movq %rax, %rbx
movq 0x8(%r15), %r15
movq %r15, %rdi
callq 0x14db2
orq $-0x1, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq -0x58(%rbp), %rcx
movq %rcx, (%rbx)
movq %rax, 0x18(%rbx)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x14e9c
movq 0x8(%r12), %rsi
movq -0x30(%rbp), %rdi
movq %r13, %rdx
callq 0x10f8c
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x14dee
movq 0x8(%r12), %rsi
movq %rax, %rdi
callq 0x14dee
movq %rax, %rdi
movq %r13, %rsi
jmp 0xb7b7
movq %r12, %rdi
leaq 0x14068(%rip), %rsi     # 0x1f618
leaq 0x13ee1(%rip), %rdx     # 0x1f498
xorl %ecx, %ecx
callq 0x51f0
movl $0x0, %r13d
movq %rax, -0x40(%rbp)
testq %rax, %rax
je 0xb1be
pushq $0x30
popq %rdi
callq 0x51c0
movq %rax, %rbx
pushq $0x10
popq %rdi
callq 0x51c0
movq -0x40(%rbp), %r12
movq %r12, %rcx
addq $0x8, %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rax, 0x8(%rbx)
movq %rcx, 0x18(%rbx)
movb $0x1, %cl
movb %cl, 0x28(%rbx)
movq -0xc8(%rbp), %rax
movq %rax, (%rbx)
movq $0x1, 0x20(%rbx)
movb %cl, 0x10(%rbx)
movq 0x28(%r15), %rdi
movq %rbx, -0x68(%rbp)
movq %rbx, %rsi
callq 0x12a70
movq 0x28(%r12), %rsi
movq %r15, %rdi
callq 0xc240
movq %rax, %rbx
movq 0x30(%r12), %rsi
movq %r15, %rdi
callq 0xc240
movq %rax, %r15
movq 0x8(%rax), %r13
addq 0x8(%rbx), %r13
cmpl $0x0, 0x20(%rax)
movq %rbx, -0xa8(%rbp)
je 0xb7c5
pushq $0x30
popq %rdi
callq 0x51c0
movq %rax, %r12
pushq $0x10
popq %rdi
callq 0x51c0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rax, 0x8(%r12)
xorl %eax, %eax
movb %al, 0x10(%r12)
leaq 0x14c74(%rip), %rax     # 0x20300
movq %rax, 0x18(%r12)
movw $0x101, 0x28(%r12)      # imm = 0x101
movq -0x80(%rbp), %rax
movq %rax, (%r12)
movq $0x1, 0x20(%r12)
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rdi
movq %r12, %rsi
callq 0x12a70
movq %r12, %rdi
callq 0x12e14
movq %rax, -0x50(%rbp)
movq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x14dee
movq %rax, %rbx
movb 0x1(%r15), %al
xorl %ecx, %ecx
cmpb %cl, %al
movq -0x60(%rbp), %r14
cmovneq -0x78(%rbp), %r14
addq $0x18, %r15
cmpb %cl, %al
cmovneq -0x70(%rbp), %r15
addq $0x2, %r13
pushq $0x20
popq %r12
movq %r12, %rdi
callq 0x51c0
movq (%r15), %rcx
movq %r12, %r15
orq $-0x1, 0x8(%rax)
xorl %r12d, %r12d
movb %r12b, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq %r14, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x14e9c
movq %rax, %rbx
movq %r15, %rdi
callq 0x51c0
orq $-0x1, 0x8(%rax)
movb %r12b, 0x10(%rax)
movq -0x50(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x14e9c
movq -0x30(%rbp), %rdi
jmp 0xb7d8
movq 0x8(%r12), %rsi
movq 0x8(%r15), %r15
movq %r15, %rdx
callq 0x10f8c
movq %rax, %r12
pushq $0x20
popq %rdi
callq 0x51c0
movq %rax, %r13
movq 0x8(%r12), %rbx
movq %rbx, %rdi
callq 0x14db2
orq $-0x1, 0x8(%r13)
movb $0x0, 0x10(%r13)
movq -0x58(%rbp), %rcx
movq %rcx, (%r13)
movq %rax, 0x18(%r13)
movq %r15, %rdi
movq %r13, %rsi
callq 0x14e9c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14dee
movq %rax, %rdi
movq %r15, %rsi
callq 0x14dee
movq (%r12), %r13
jmp 0xba2e
incq %r13
movq 0x18(%r15), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rdi
pushq $0x20
popq %r15
movq -0x40(%rbp), %r14
movq 0x38(%r14), %rsi
callq 0xae14
movq %rax, %r12
movq %r15, %rdi
callq 0x51c0
movq %rax, %rbx
movq %rax, %rdi
callq 0x14d30
movq %r15, %rdi
callq 0x51c0
orq $-0x1, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x50(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0xc0(%rbp), %rcx
movq %rcx, (%rax)
movq %rbx, -0x90(%rbp)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x14e9c
movq %rax, -0x88(%rbp)
movb 0x40(%r14), %bl
movq %r15, %rdi
callq 0x51c0
movq %rax, %r15
movq 0x8(%r12), %rdi
cmpb $0x1, %bl
movq %rdi, -0x50(%rbp)
jne 0xb866
callq 0x14da8
movq -0x68(%rbp), %r12
movq -0xb8(%rbp), %rcx
jmp 0xb876
callq 0x14da8
movq -0x68(%rbp), %r12
movq -0xb0(%rbp), %rcx
movq -0x88(%rbp), %rdi
orq $-0x1, 0x8(%r15)
movb $0x0, 0x10(%r15)
movq %rax, 0x18(%r15)
movq %rcx, (%r15)
movq %r15, %rsi
callq 0x14e9c
pushq $0x20
popq %r15
movq %r15, %rdi
callq 0x51c0
movq %rax, %rbx
movq %r12, %rdi
callq 0x12e14
orq $-0x1, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq -0x60(%rbp), %rax
movq %rax, (%rbx)
movq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x14e9c
movq %rax, %rbx
cmpb $0x0, 0x40(%r14)
leaq 0x14404(%rip), %r14     # 0x1fce0
je 0xb8e5
leaq 0x1444b(%rip), %r14     # 0x1fd30
pushq $0x18
popq %rdi
callq 0x51c0
andq $0x0, 0x10(%rax)
orq $-0x1, 0x8(%rax)
addq $0x10, %r14
movq %r14, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x14e9c
movq %rax, %r14
movq %r15, %rdi
callq 0x51c0
movq %rax, %rbx
movq %r12, %rdi
callq 0x12e14
orq $-0x1, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq -0x48(%rbp), %rax
movq %rax, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14e9c
movq %rax, %rbx
movq %r15, %rdi
callq 0x51c0
movq %rax, %r15
movq -0x90(%rbp), %rdi
callq 0x14db2
orq $-0x1, 0x8(%r15)
xorl %r12d, %r12d
movb %r12b, 0x10(%r15)
movq -0x58(%rbp), %rcx
movq %rcx, (%r15)
movq %rax, 0x18(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x14e9c
movq -0xa8(%rbp), %rbx
movq 0x10(%rbx), %rsi
movq -0x98(%rbp), %r15
movq %r15, %rdi
callq 0x14dee
movq %rax, -0x40(%rbp)
movb 0x1(%rbx), %al
cmpb %r12b, %al
movq -0x60(%rbp), %r14
cmovneq -0x78(%rbp), %r14
addq $0x18, %rbx
cmpb %r12b, %al
cmovneq -0x70(%rbp), %rbx
pushq $0x20
popq %rdi
callq 0x51c0
movq (%rbx), %rcx
orq $-0x1, 0x8(%rax)
movb %r12b, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq %r14, (%rax)
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x14e9c
movq %rax, %r14
pushq $0x20
popq %rdi
callq 0x51c0
movq %rax, %rbx
movq -0x68(%rbp), %rdi
callq 0x12e14
orq $-0x1, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq -0x48(%rbp), %rax
movq %rax, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14e9c
movq %r15, %rdi
movq -0x90(%rbp), %rsi
callq 0x14dee
movq %rax, %rdi
movq -0x50(%rbp), %rsi
callq 0x14dee
movq %r15, %r14
movq -0x30(%rbp), %r15
jmp 0xb1ba
pushq $0x10
popq %rdi
callq 0x51c0
andq $0x0, (%rax)
movq %r14, 0x8(%rax)
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x5110
movq %rax, %r15
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdx
leaq 0xc9cf(%rip), %rsi      # 0x18442
movq %r15, %rdi
callq 0x11816
leaq 0x13c36(%rip), %rsi     # 0x1f6b8
movq 0x14517(%rip), %rdx     # 0x1ffa0
movq %r15, %rdi
callq 0x5360
pushq $0x20
popq %rdi
callq 0x5110
movq %rax, %rbx
movq 0x8(%r15), %rax
movq 0x8(%rax), %rdx
leaq 0xc9c0(%rip), %rsi      # 0x1846b
movq %rbx, %rdi
callq 0x11816
leaq 0x13bfe(%rip), %rsi     # 0x1f6b8
movq 0x144df(%rip), %rdx     # 0x1ffa0
movq %rbx, %rdi
callq 0x5360
jmp 0xbaf4
jmp 0xbaf4
movq %rax, %r14
pushq $0x30
popq %rsi
movq %r12, %rdi
jmp 0xbb2e
jmp 0xbb1a
jmp 0xbaf4
jmp 0xbb1a
jmp 0xbb1a
jmp 0xbb1a
movq %rax, %r14
pushq $0x30
jmp 0xbb1f
jmp 0xbb1a
jmp 0xbaed
movq %rax, %r14
pushq $0x20
jmp 0xbb2a
movq %rax, %r14
pushq $0x20
popq %rsi
movq %r15, %rdi
jmp 0xbb2e
jmp 0xbb1a
jmp 0xbb1a
jmp 0xbb25
movq %rax, %r14
movq %rbx, %rdi
jmp 0xbb3b
movq %r14, %rdi
movq %rax, %r14
pushq $0x20
popq %rsi
jmp 0xbb2e
jmp 0xbb1a
movq %rax, %r14
pushq $0x20
popq %rsi
movq %rbx, %rdi
jmp 0xbb2e
movq %rax, %r14
pushq $0x30
popq %rsi
movq %r13, %rdi
callq 0x51d0
jmp 0xbb40
movq %rax, %r14
movq %r15, %rdi
callq 0x5140
movq %r14, %rdi
callq 0x5390