// File: leobru[P]ACPUfont/splitter.cc
// Function: Picture::dump(int, int, int, int, int)
void dump(int cline, int ccol, int lineno, int colno, int where) {
        if (cline-vsize/2 < 0 || ccol-hsize/2 < 0 ||
            cline + vsize/2 >= height || ccol + hsize/2 >= width) {
            fprintf(stderr, "Cell [%d,%d] with center (%d,%d) is out of bounds\n", lineno, colno, cline, ccol);
            return;
        }
        char fname[8192];
        sprintf(fname, "gost%03o", where);
        if (-1 == mkdir(fname, 0700) && errno != EEXIST) {
            perror(fname);
            exit(1);
        }
        if (postproc) 
            sprintf(fname, "%s > gost%03o/l%02dc%03d.pgm", postproc, where, lineno, colno);
        else 
            sprintf(fname, "gost%03o/l%02dc%03d.pgm", where, lineno, colno);
        FILE * f;
        if (postproc) {
            if (runs[currun]) {
                int ret = pclose(runs[currun]); 
                if (ret) {
                    fprintf(stderr, "Postproc failed with %d\n", ret);
                }
            }
            f = runs[currun] = popen(fname, "w") ;
            currun = (currun+1)%128;
        } else {
            f = fopen(fname, "w");
        }
        if (f == NULL) { perror(fname); exit(1); }
        fprintf(f, "P5\n%d %d\n%d\n", hsize, vsize, full);
        for (int i = cline - vsize/2; i <= cline + vsize/2; ++i) {
            for (int j = ccol - hsize/2; j <= ccol + hsize/2; ++j)
                putc(int(p(i,j)), f);
        }
        if (!postproc)
            fclose(f);
        else
            fflush(f);
    }

// Assembly:
subq $0x2068, %rsp           # imm = 0x2068
movq %rdi, 0x2060(%rsp)
movl %esi, 0x205c(%rsp)
movl %edx, 0x2058(%rsp)
movl %ecx, 0x2054(%rsp)
movl %r8d, 0x2050(%rsp)
movl %r9d, 0x204c(%rsp)
movq 0x2060(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0x205c(%rsp), %eax
movl %eax, 0x28(%rsp)
movl 0x5e32(%rip), %eax      # 0x9114
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x28(%rsp), %eax
subl %ecx, %eax
cmpl $0x0, %eax
jl 0x337d
movl 0x2058(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x5e04(%rip), %eax      # 0x9110
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x1c(%rsp), %eax
subl %ecx, %eax
cmpl $0x0, %eax
jl 0x337d
movq 0x20(%rsp), %rcx
movl 0x205c(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x5ddd(%rip), %eax      # 0x9114
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movl 0x18(%rsp), %eax
addl %edx, %eax
cmpl 0x420(%rcx), %eax
jge 0x337d
movq 0x20(%rsp), %rcx
movl 0x2058(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x5dab(%rip), %eax      # 0x9110
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movl 0x14(%rsp), %eax
addl %edx, %eax
cmpl 0x41c(%rcx), %eax
jl 0x33b8
movq 0x5c4c(%rip), %rax      # 0x8fd0
movq (%rax), %rdi
movl 0x2054(%rsp), %edx
movl 0x2050(%rsp), %ecx
movl 0x205c(%rsp), %r8d
movl 0x2058(%rsp), %r9d
leaq 0x2e26(%rip), %rsi      # 0x61d2
movb $0x0, %al
callq 0x1190
jmp 0x3689
leaq 0x40(%rsp), %rdi
movl 0x204c(%rsp), %edx
leaq 0x2e3a(%rip), %rsi      # 0x6205
movb $0x0, %al
callq 0x1050
leaq 0x40(%rsp), %rdi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x10c0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x340a
callq 0x1030
cmpl $0x11, (%rax)
je 0x340a
leaq 0x40(%rsp), %rdi
callq 0x10f0
movl $0x1, %edi
callq 0x1160
movq 0x20(%rsp), %rax
cmpq $0x0, 0x428(%rax)
je 0x3451
movq 0x20(%rsp), %rax
leaq 0x40(%rsp), %rdi
movq 0x428(%rax), %rdx
movl 0x204c(%rsp), %ecx
movl 0x2054(%rsp), %r8d
movl 0x2050(%rsp), %r9d
leaq 0x2dc6(%rip), %rsi      # 0x620e
movb $0x0, %al
callq 0x1050
jmp 0x347a
leaq 0x40(%rsp), %rdi
movl 0x204c(%rsp), %edx
movl 0x2054(%rsp), %ecx
movl 0x2050(%rsp), %r8d
leaq 0x2da0(%rip), %rsi      # 0x6213
movb $0x0, %al
callq 0x1050
movq 0x20(%rsp), %rax
cmpq $0x0, 0x428(%rax)
je 0x3528
movq 0x20(%rsp), %rax
movslq 0x418(%rax), %rcx
cmpq $0x0, 0x18(%rax,%rcx,8)
je 0x34e0
movq 0x20(%rsp), %rax
movslq 0x418(%rax), %rcx
movq 0x18(%rax,%rcx,8), %rdi
callq 0x1180
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x34de
movq 0x5b07(%rip), %rax      # 0x8fd0
movq (%rax), %rdi
movl 0x34(%rsp), %edx
leaq 0x2d54(%rip), %rsi      # 0x622b
movb $0x0, %al
callq 0x1190
jmp 0x34e0
leaq 0x40(%rsp), %rdi
leaq 0x2cd7(%rip), %rsi      # 0x61c3
callq 0x1090
movq %rax, %rcx
movq 0x20(%rsp), %rax
movslq 0x418(%rax), %rdx
movq %rcx, 0x18(%rax,%rdx,8)
movq %rcx, 0x38(%rsp)
movl 0x418(%rax), %eax
addl $0x1, %eax
movl $0x80, %ecx
cltd
idivl %ecx
movq 0x20(%rsp), %rax
movl %edx, 0x418(%rax)
jmp 0x353e
leaq 0x40(%rsp), %rdi
leaq 0x2c8f(%rip), %rsi      # 0x61c3
callq 0x1150
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x355a
leaq 0x40(%rsp), %rdi
callq 0x10f0
movl $0x1, %edi
callq 0x1160
movq 0x20(%rsp), %rax
movq 0x38(%rsp), %rdi
movl 0x5ba6(%rip), %edx      # 0x9110
movl 0x5ba4(%rip), %ecx      # 0x9114
movl 0x424(%rax), %r8d
leaq 0x2cc6(%rip), %rsi      # 0x6244
movb $0x0, %al
callq 0x1190
movl 0x205c(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x5b7e(%rip), %eax      # 0x9114
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x10(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x30(%rsp)
movl 0x30(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x205c(%rsp), %ecx
movl 0x5b55(%rip), %eax      # 0x9114
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movl 0xc(%rsp), %eax
addl %edx, %ecx
cmpl %ecx, %eax
jg 0x3664
movl 0x2058(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x5b28(%rip), %eax      # 0x9110
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x8(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x2058(%rsp), %ecx
movl 0x5aff(%rip), %eax      # 0x9110
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movl 0x4(%rsp), %eax
addl %edx, %ecx
cmpl %ecx, %eax
jg 0x3652
movq 0x20(%rsp), %rdi
movl 0x30(%rsp), %esi
movl 0x2c(%rsp), %edx
callq 0x4410
cvttsd2si (%rax), %edi
movq 0x38(%rsp), %rsi
callq 0x11f0
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x35fc
jmp 0x3654
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x35aa
movq 0x20(%rsp), %rax
cmpq $0x0, 0x428(%rax)
jne 0x367f
movq 0x38(%rsp), %rdi
callq 0x1110
jmp 0x3689
movq 0x38(%rsp), %rdi
callq 0x1140
addq $0x2068, %rsp           # imm = 0x2068
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)