// File: davidjosepha[P]slitherlink/src/shared/export.cpp
// Function: Export::print() const
void Export::print() const {
    int m = lattice_->getHeight();
    int n = lattice_->getWidth();

    for (int i = 1; i < m-1; i++) {
        /* print points/lines/Xs/nothing above the row of numbers */
        for (int j = 1; j < n-1; j++) {
            std::cout << POINT;
            std::cout << ' ';
            std::cout << formatHLine(i, j);
            std::cout << ' ';
        }
        std::cout << POINT << std::endl;

        /* print row of numbers */
        for (int j = 1; j < n-1; j++) {
            /* print line/x/nothing to the left of number */
            std::cout << formatVLine(i, j);
            std::cout << ' ';
            /* print number */
            std::cout << formatNumber(i, j);
            std::cout << ' ';
        }
        /* print line/x/nothing to the right of last number */
        std::cout << formatVLine(i, n-1) << std::endl;
    }

    /* print lines/Xs/nothing below the last row of numbers */
    for (int j = 1; j < n-1; j++) {
        std::cout << POINT;
        std::cout << ' ';
        std::cout << formatHLine(m-1, j);
        std::cout << ' ';
    }
    std::cout << POINT << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq (%rax), %rdi
callq 0x2ad0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, -0xc(%rbp)
movq (%rax), %rdi
callq 0x2af0
movl %eax, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x2903
movl $0x1, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x2828
movq 0x19805(%rip), %rdi     # 0x1bfd8
movl $0x2e, %esi
callq 0x2200
movq 0x197f4(%rip), %rdi     # 0x1bfd8
movl $0x20, %esi
callq 0x2200
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0x29a0
movq 0x197d4(%rip), %rdi     # 0x1bfd8
movsbl %al, %esi
callq 0x2200
movq 0x197c5(%rip), %rdi     # 0x1bfd8
movl $0x20, %esi
callq 0x2200
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x27bf
movq 0x197a9(%rip), %rdi     # 0x1bfd8
movl $0x2e, %esi
callq 0x2200
movq %rax, %rdi
movq 0x19785(%rip), %rsi     # 0x1bfc8
callq 0x21e0
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x28c5
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x2a00
movq 0x19766(%rip), %rdi     # 0x1bfd8
movsbl %al, %esi
callq 0x2200
movq 0x19757(%rip), %rdi     # 0x1bfd8
movl $0x20, %esi
callq 0x2200
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x2a60
movq 0x19737(%rip), %rdi     # 0x1bfd8
movsbl %al, %esi
callq 0x2200
movq 0x19728(%rip), %rdi     # 0x1bfd8
movl $0x20, %esi
callq 0x2200
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x284f
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x10(%rbp), %edx
subl $0x1, %edx
callq 0x2a00
movq 0x196fa(%rip), %rdi     # 0x1bfd8
movsbl %al, %esi
callq 0x2200
movq %rax, %rdi
movq 0x196d8(%rip), %rsi     # 0x1bfc8
callq 0x21e0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x27a7
movl $0x1, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x2976
movq 0x196ba(%rip), %rdi     # 0x1bfd8
movl $0x2e, %esi
callq 0x2200
movq 0x196a9(%rip), %rdi     # 0x1bfd8
movl $0x20, %esi
callq 0x2200
movq -0x28(%rbp), %rdi
movl -0xc(%rbp), %esi
subl $0x1, %esi
movl -0x20(%rbp), %edx
callq 0x29a0
movq 0x19686(%rip), %rdi     # 0x1bfd8
movsbl %al, %esi
callq 0x2200
movq 0x19677(%rip), %rdi     # 0x1bfd8
movl $0x20, %esi
callq 0x2200
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x290a
movq 0x1965b(%rip), %rdi     # 0x1bfd8
movl $0x2e, %esi
callq 0x2200
movq %rax, %rdi
movq 0x19637(%rip), %rsi     # 0x1bfc8
callq 0x21e0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)