// File: leobru[P]ACPUfont/splitter.cc
// Function: main
int main(int argc, char**argv) {
    int full, full_thr, cir_thr;
    char p2[3];
    int top_heavy_corr = 0;
    int opt;
    const char * postproc = NULL;
    bool do_dump_marked = false;
    while ((opt = getopt(argc, argv, "v:h:t:m")) != -1) {
        switch (opt) {
        case 'v':
            vsize = atoi(optarg);
            break;
        case 'h':
            hsize = atoi(optarg);
            break;
        case 't':
            top_heavy_corr = atoi(optarg);
            break;
        case 'm':
            do_dump_marked = true;
            break;
        case '?':
            fprintf(stderr, "Usage: splitter [-t N] [-v N] [-h N] [-m] [postprocessing command]\n");
            exit(1);
        }
    }
    if (optind < argc) {
        postproc = argv[optind];
        if (!*postproc) postproc = NULL;
    }
    Picture array(NULL, postproc);
    // Find local minima (darkest spots)
    vector<int> horcenters = centers(smooth(array.average_lines(0, array.width-1), vsize/4), vsize);
    vector<int> leftcenters = centers(smooth(array.average_lines(0, array.width/2), vsize/4), vsize);
    vector<int> rightcenters = centers(smooth(array.average_lines(array.width/2+1, array.width-1), vsize/4), vsize);

    double skew = 0;
    for (int i = 0; i < horcenters.size(); ++i) {
        skew += rightcenters[i]-leftcenters[i];
    }
    skew /= horcenters.size();

    // Find average interval
    double interv = 0;
    for (uint i = 1; i < horcenters.size(); ++i) interv += horcenters[i]-horcenters[i-1];
    interv /= horcenters.size()-1;
    printf("Found %d lines, average line interval = %.2f\n", horcenters.size(), interv);

    vector<int> vercenters = centers(smooth(array.average_columns(0, array.height-1), hsize/4), hsize);
    interv = 0;
    for (uint i = 1; i < vercenters.size(); ++i) interv += vercenters[i]-vercenters[i-1];
    interv /= vercenters.size()-1;
    printf("Found %d columns, average pitch = %.2f\n", vercenters.size(), interv);
    if (do_dump_marked) {
        array.dump_marked(&horcenters, &vercenters);
        exit(0);
    }
    
    for (int line = 0; line < (int)horcenters.size(); ++line) {
        // Looking from the right, find the column of the apostrophe (that's when whiteness drops)
        uint col = vercenters.size()-1;
        double avg = array.rectavg(horcenters[line], vercenters[col], hsize/2, vsize/2);
        for (; --col; ) {
            double cur = array.rectavg(horcenters[line], vercenters[col], hsize/2, vsize/2);
            if (cur < avg*0.95) break;
            avg = cur;
        }
        // 'col' is the column number of GOST 0137
        col -= 0137;
        fprintf(stderr, "Dumping line %d starting from column %d\n", line, col);
	for (int gost = 0; gost <= 0137; ++gost) {
            int hci = horcenters[line];
            int v4 = (vercenters.size()+2)/4, v2 = (vercenters.size()+1)/2;
            int curcol = gost + col;
            int hc = curcol < v4  ? hci-skew : curcol < v2 ? hci-skew/2 : curcol < v2+v4 ? hci+skew/2 : hci+skew;
            int vc = vercenters[curcol];
            // improve(array, hc, vc);
            array.dump(hc+top_heavy_corr, vc, line, col, gost);
        }
    }
}

// Assembly:
subq $0x698, %rsp            # imm = 0x698
movl $0x0, 0x694(%rsp)
movl %edi, 0x690(%rsp)
movq %rsi, 0x688(%rsp)
movl $0x0, 0x674(%rsp)
movq $0x0, 0x668(%rsp)
movb $0x0, 0x667(%rsp)
movl 0x690(%rsp), %edi
movq 0x688(%rsp), %rsi
leaq 0x491a(%rip), %rdx      # 0x6050
callq 0x1060
movl %eax, 0x670(%rsp)
cmpl $-0x1, %eax
je 0x1813
movl 0x670(%rsp), %eax
movl %eax, 0xa0(%rsp)
subl $0x3f, %eax
je 0x17ec
jmp 0x1764
movl 0xa0(%rsp), %eax
subl $0x68, %eax
je 0x17b3
jmp 0x1772
movl 0xa0(%rsp), %eax
subl $0x6d, %eax
je 0x17e2
jmp 0x1780
movl 0xa0(%rsp), %eax
subl $0x74, %eax
je 0x17ca
jmp 0x178e
movl 0xa0(%rsp), %eax
subl $0x76, %eax
jne 0x180e
jmp 0x179c
movq 0x7815(%rip), %rax      # 0x8fb8
movq (%rax), %rdi
callq 0x11b0
movl %eax, 0x7963(%rip)      # 0x9114
jmp 0x180e
movq 0x77fe(%rip), %rax      # 0x8fb8
movq (%rax), %rdi
callq 0x11b0
movl %eax, 0x7948(%rip)      # 0x9110
jmp 0x180e
movq 0x77e7(%rip), %rax      # 0x8fb8
movq (%rax), %rdi
callq 0x11b0
movl %eax, 0x674(%rsp)
jmp 0x180e
movb $0x1, 0x667(%rsp)
jmp 0x180e
movq 0x77dd(%rip), %rax      # 0x8fd0
movq (%rax), %rdi
leaq 0x485b(%rip), %rsi      # 0x6058
movb $0x0, %al
callq 0x1190
movl $0x1, %edi
callq 0x1160
jmp 0x1720
movq 0x77be(%rip), %rax      # 0x8fd8
movl (%rax), %eax
cmpl 0x690(%rsp), %eax
jge 0x185e
movq 0x688(%rsp), %rax
movq 0x77a4(%rip), %rcx      # 0x8fd8
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x668(%rsp)
movq 0x668(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x185c
movq $0x0, 0x668(%rsp)
jmp 0x185e
movq 0x668(%rsp), %rdx
xorl %eax, %eax
movl %eax, 0x9c(%rsp)
movl %eax, %esi
leaq 0x230(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0x2740
movq 0x90(%rsp), %rsi
movl 0x9c(%rsp), %edx
movl 0x64c(%rsp), %ecx
decl %ecx
leaq 0x1e8(%rsp), %rdi
callq 0x2a50
jmp 0x18ad
movl 0x7861(%rip), %edx      # 0x9114
movl %edx, %eax
addl $0x3, %eax
testl %edx, %edx
cmovsl %eax, %edx
sarl $0x2, %edx
leaq 0x200(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x1380
jmp 0x18d7
movl 0x7837(%rip), %edx      # 0x9114
leaq 0x218(%rsp), %rdi
leaq 0x200(%rsp), %rsi
callq 0x1580
jmp 0x18f4
leaq 0x200(%rsp), %rdi
callq 0x2600
leaq 0x1e8(%rsp), %rdi
callq 0x2600
movl 0x64c(%rsp), %ecx
movl %ecx, %eax
shrl $0x1f, %eax
addl %eax, %ecx
sarl %ecx
leaq 0x190(%rsp), %rdi
leaq 0x230(%rsp), %rsi
xorl %edx, %edx
callq 0x2a50
jmp 0x1937
movl 0x77d7(%rip), %edx      # 0x9114
movl %edx, %eax
addl $0x3, %eax
testl %edx, %edx
cmovsl %eax, %edx
sarl $0x2, %edx
leaq 0x1a8(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x1380
jmp 0x1961
movl 0x77ad(%rip), %edx      # 0x9114
leaq 0x1c0(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x1580
jmp 0x197e
leaq 0x1a8(%rsp), %rdi
callq 0x2600
leaq 0x190(%rsp), %rdi
callq 0x2600
movl 0x64c(%rsp), %ecx
movl %ecx, %eax
shrl $0x1f, %eax
movl %ecx, %edx
addl %eax, %edx
sarl %edx
incl %edx
decl %ecx
leaq 0x148(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0x2a50
jmp 0x19c5
movl 0x7749(%rip), %edx      # 0x9114
movl %edx, %eax
addl $0x3, %eax
testl %edx, %edx
cmovsl %eax, %edx
sarl $0x2, %edx
leaq 0x160(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x1380
jmp 0x19ef
movl 0x771f(%rip), %edx      # 0x9114
leaq 0x178(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0x1580
jmp 0x1a0c
leaq 0x160(%rsp), %rdi
callq 0x2600
leaq 0x148(%rsp), %rdi
callq 0x2600
xorps %xmm0, %xmm0
movsd %xmm0, 0x140(%rsp)
movl $0x0, 0x13c(%rsp)
movslq 0x13c(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x218(%rsp), %rdi
callq 0x2bd0
movq %rax, %rcx
movq 0x88(%rsp), %rax
cmpq %rcx, %rax
jae 0x1bff
movslq 0x13c(%rsp), %rsi
leaq 0x178(%rsp), %rdi
callq 0x2bf0
movl (%rax), %eax
movl %eax, 0x84(%rsp)
movslq 0x13c(%rsp), %rsi
leaq 0x1c0(%rsp), %rdi
callq 0x2bf0
movq %rax, %rcx
movl 0x84(%rsp), %eax
subl (%rcx), %eax
cvtsi2sd %eax, %xmm0
addsd 0x140(%rsp), %xmm0
movsd %xmm0, 0x140(%rsp)
movl 0x13c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x13c(%rsp)
jmp 0x1a3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
jmp 0x2408
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
jmp 0x1b29
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
leaq 0x200(%rsp), %rdi
callq 0x2600
leaq 0x1e8(%rsp), %rdi
callq 0x2600
jmp 0x2408
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
jmp 0x23fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
jmp 0x1b8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
leaq 0x1a8(%rsp), %rdi
callq 0x2600
leaq 0x190(%rsp), %rdi
callq 0x2600
jmp 0x23fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
jmp 0x23ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
jmp 0x1bed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
leaq 0x160(%rsp), %rdi
callq 0x2600
leaq 0x148(%rsp), %rdi
callq 0x2600
jmp 0x23ee
leaq 0x218(%rsp), %rdi
callq 0x2bd0
movq %rax, %xmm1
movaps 0x43f8(%rip), %xmm0     # 0x6010
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x43fc(%rip), %xmm0     # 0x6020
subpd %xmm0, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movsd 0x140(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x140(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x130(%rsp)
movl $0x1, 0x12c(%rsp)
movl 0x12c(%rsp), %eax
movq %rax, 0x78(%rsp)
leaq 0x218(%rsp), %rdi
callq 0x2bd0
movq %rax, %rcx
movq 0x78(%rsp), %rax
cmpq %rcx, %rax
jae 0x1cf2
movl 0x12c(%rsp), %eax
movl %eax, %esi
leaq 0x218(%rsp), %rdi
callq 0x2bf0
movl (%rax), %eax
movl %eax, 0x74(%rsp)
movl 0x12c(%rsp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x218(%rsp), %rdi
callq 0x2bf0
movq %rax, %rcx
movl 0x74(%rsp), %eax
subl (%rcx), %eax
cvtsi2sd %eax, %xmm0
addsd 0x130(%rsp), %xmm0
movsd %xmm0, 0x130(%rsp)
movl 0x12c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x12c(%rsp)
jmp 0x1c60
leaq 0x218(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x2bd0
movq 0x68(%rsp), %rdi
decq %rax
movq %rax, %xmm1
movaps 0x42f8(%rip), %xmm0     # 0x6010
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x42fc(%rip), %xmm0     # 0x6020
subpd %xmm0, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movsd 0x130(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x130(%rsp)
callq 0x2bd0
movq %rax, %rsi
movsd 0x130(%rsp), %xmm0
leaq 0x433b(%rip), %rdi      # 0x609c
movb $0x1, %al
callq 0x1040
jmp 0x1d6a
movl 0x650(%rsp), %ecx
decl %ecx
leaq 0xe0(%rsp), %rdi
leaq 0x230(%rsp), %rsi
xorl %edx, %edx
callq 0x2c10
jmp 0x1d8c
movl 0x737e(%rip), %edx      # 0x9110
movl %edx, %eax
addl $0x3, %eax
testl %edx, %edx
cmovsl %eax, %edx
sarl $0x2, %edx
leaq 0xf8(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x1380
jmp 0x1db6
movl 0x7354(%rip), %edx      # 0x9110
leaq 0x110(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x1580
jmp 0x1dd3
leaq 0xf8(%rsp), %rdi
callq 0x2600
leaq 0xe0(%rsp), %rdi
callq 0x2600
xorps %xmm0, %xmm0
movsd %xmm0, 0x130(%rsp)
movl $0x1, 0xdc(%rsp)
movl 0xdc(%rsp), %eax
movq %rax, 0x60(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x2bd0
movq %rax, %rcx
movq 0x60(%rsp), %rax
cmpq %rcx, %rax
jae 0x1efc
movl 0xdc(%rsp), %eax
movl %eax, %esi
leaq 0x110(%rsp), %rdi
callq 0x2bf0
movl (%rax), %eax
movl %eax, 0x5c(%rsp)
movl 0xdc(%rsp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x110(%rsp), %rdi
callq 0x2bf0
movq %rax, %rcx
movl 0x5c(%rsp), %eax
subl (%rcx), %eax
cvtsi2sd %eax, %xmm0
addsd 0x130(%rsp), %xmm0
movsd %xmm0, 0x130(%rsp)
movl 0xdc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xdc(%rsp)
jmp 0x1e04
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
jmp 0x23e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
jmp 0x1eea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x2600
leaq 0xe0(%rsp), %rdi
callq 0x2600
jmp 0x23e1
leaq 0x110(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x2bd0
movq 0x50(%rsp), %rdi
decq %rax
movq %rax, %xmm1
movaps 0x40ee(%rip), %xmm0     # 0x6010
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x40f2(%rip), %xmm0     # 0x6020
subpd %xmm0, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movsd 0x130(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x130(%rsp)
callq 0x2bd0
movq %rax, %rsi
movsd 0x130(%rsp), %xmm0
leaq 0x415f(%rip), %rdi      # 0x60ca
movb $0x1, %al
callq 0x1040
jmp 0x1f74
testb $0x1, 0x667(%rsp)
je 0x1fca
leaq 0x230(%rsp), %rdi
leaq 0x218(%rsp), %rsi
leaq 0x110(%rsp), %rdx
callq 0x2ed0
jmp 0x1f9d
xorl %edi, %edi
callq 0x1160
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x26e0
jmp 0x23e1
movl $0x0, 0xd8(%rsp)
movl 0xd8(%rsp), %eax
movl %eax, 0x4c(%rsp)
leaq 0x218(%rsp), %rdi
callq 0x2bd0
movq %rax, %rcx
movl 0x4c(%rsp), %eax
cmpl %ecx, %eax
jge 0x2391
leaq 0x110(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x2bd0
decl %eax
movl %eax, 0xd4(%rsp)
movslq 0xd8(%rsp), %rsi
leaq 0x218(%rsp), %rdi
callq 0x2bf0
movq 0x30(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0x3c(%rsp)
movl 0xd4(%rsp), %eax
movl %eax, %esi
callq 0x2bf0
movl 0x3c(%rsp), %esi
movl (%rax), %edx
movl 0x70bf(%rip), %ecx      # 0x9110
movl %ecx, %eax
shrl $0x1f, %eax
addl %eax, %ecx
sarl %ecx
movl 0x70b3(%rip), %r8d      # 0x9114
movl %r8d, %eax
shrl $0x1f, %eax
addl %eax, %r8d
sarl %r8d
leaq 0x230(%rsp), %rdi
callq 0x3140
movsd %xmm0, 0x40(%rsp)
jmp 0x2082
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0xc8(%rsp)
movl 0xd4(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xd4(%rsp)
cmpl $0x0, %eax
je 0x2161
movslq 0xd8(%rsp), %rsi
leaq 0x218(%rsp), %rdi
callq 0x2bf0
movl (%rax), %eax
movl %eax, 0x24(%rsp)
movl 0xd4(%rsp), %eax
movl %eax, %esi
leaq 0x110(%rsp), %rdi
callq 0x2bf0
movl 0x24(%rsp), %esi
movl (%rax), %edx
movl 0x7028(%rip), %ecx      # 0x9110
movl %ecx, %eax
shrl $0x1f, %eax
addl %eax, %ecx
sarl %ecx
movl 0x701c(%rip), %r8d      # 0x9114
movl %r8d, %eax
shrl $0x1f, %eax
addl %eax, %r8d
sarl %r8d
leaq 0x230(%rsp), %rdi
callq 0x3140
movsd %xmm0, 0x28(%rsp)
jmp 0x2119
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0xc0(%rsp)
movsd 0xc0(%rsp), %xmm1
movsd 0x3ef7(%rip), %xmm0     # 0x6030
mulsd 0xc8(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x214a
jmp 0x2161
movsd 0xc0(%rsp), %xmm0
movsd %xmm0, 0xc8(%rsp)
jmp 0x2091
movl 0xd4(%rsp), %eax
subl $0x5f, %eax
movl %eax, 0xd4(%rsp)
movq 0x6e57(%rip), %rax      # 0x8fd0
movq (%rax), %rdi
movl 0xd8(%rsp), %edx
movl 0xd4(%rsp), %ecx
leaq 0x3f61(%rip), %rsi      # 0x60f2
movb $0x0, %al
callq 0x1190
movl $0x0, 0xbc(%rsp)
cmpl $0x5f, 0xbc(%rsp)
jg 0x2379
movslq 0xd8(%rsp), %rsi
leaq 0x218(%rsp), %rdi
callq 0x2bf0
movl (%rax), %eax
movl %eax, 0xb8(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x2bd0
addq $0x2, %rax
shrq $0x2, %rax
movl %eax, 0xb4(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x2bd0
addq $0x1, %rax
shrq %rax
movl %eax, 0xb0(%rsp)
movl 0xbc(%rsp), %eax
addl 0xd4(%rsp), %eax
movl %eax, 0xac(%rsp)
movl 0xac(%rsp), %eax
cmpl 0xb4(%rsp), %eax
jge 0x2248
cvtsi2sdl 0xb8(%rsp), %xmm0
subsd 0x140(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
jmp 0x22f5
movl 0xac(%rsp), %eax
cmpl 0xb0(%rsp), %eax
jge 0x2282
cvtsi2sdl 0xb8(%rsp), %xmm0
movsd 0x140(%rsp), %xmm1
movsd 0x3dc6(%rip), %xmm2     # 0x6038
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
jmp 0x22e9
movl 0xac(%rsp), %eax
movl 0xb0(%rsp), %ecx
addl 0xb4(%rsp), %ecx
cmpl %ecx, %eax
jge 0x22c5
cvtsi2sdl 0xb8(%rsp), %xmm0
movsd 0x140(%rsp), %xmm1
movsd 0x3d83(%rip), %xmm2     # 0x6038
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x22dd
cvtsi2sdl 0xb8(%rsp), %xmm0
addsd 0x140(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0xa8(%rsp)
movslq 0xac(%rsp), %rsi
leaq 0x110(%rsp), %rdi
callq 0x2bf0
movl (%rax), %eax
movl %eax, 0xa4(%rsp)
movl 0xa8(%rsp), %esi
movl 0x674(%rsp), %eax
addl %eax, %esi
movl 0xa4(%rsp), %edx
movl 0xd8(%rsp), %ecx
movl 0xd4(%rsp), %r8d
movl 0xbc(%rsp), %r9d
leaq 0x230(%rsp), %rdi
callq 0x3290
jmp 0x2361
jmp 0x2363
movl 0xbc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xbc(%rsp)
jmp 0x21a3
jmp 0x237b
movl 0xd8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xd8(%rsp)
jmp 0x1fd5
leaq 0x110(%rsp), %rdi
callq 0x26e0
leaq 0x178(%rsp), %rdi
callq 0x26e0
leaq 0x1c0(%rsp), %rdi
callq 0x26e0
leaq 0x218(%rsp), %rdi
callq 0x26e0
leaq 0x230(%rsp), %rdi
callq 0x36a0
movl 0x694(%rsp), %eax
addq $0x698, %rsp            # imm = 0x698
retq
leaq 0x178(%rsp), %rdi
callq 0x26e0
leaq 0x1c0(%rsp), %rdi
callq 0x26e0
leaq 0x218(%rsp), %rdi
callq 0x26e0
leaq 0x230(%rsp), %rdi
callq 0x36a0
movq 0x1e0(%rsp), %rdi
callq 0x11d0
nopw %cs:(%rax,%rax)
nopl (%rax)