// File: /workspace/github_cpp_makefile_star2_O1/thierry7100[P]CutOptim/src/SvgDoc.cpp
// Function: SvgDoc::BuilSingleListPath()
void SvgDoc::BuilSingleListPath()
{
    int nShape = 0;
	for (NSVGshape *shape = SvgData->shapes; shape != NULL; shape = shape->next, nShape++)
	{
        //  Then for each path in the shape
        int iPath = 0;
        for (NSVGpath *path = shape->paths; path != NULL; path = path->next, iPath++)
        {
            path->isFixed = 0;              //  Not yet fixed !
            path->CachePoly = NULL;         //  No cache associated yet
            if ( path->LargePolygon == NULL ) continue;     //  Do NOT Add to list if no large polygon
            listPath.push_back(path);
        }
    }
    if ( debug_level > 0 )
    {
        OutDebug << "--------  BuilSingleListPath : There are " << listPath.size() << " paths in the list" << endl;
    }
    listPath.sort(compare_area);
    if ( debug_level > 0 )
    {
        int idx = 0;
        for (std::list<NSVGpath *>::iterator it=listPath.begin(); it != listPath.end(); ++it)
        {
            OutDebug << "  Path " << idx << " id: " << (*it)->id << " area " <<  (*it)->LargePolygon->area() << "mm2 and " << NbChildren(*it) << " children\n";
            if ( debug_level > 1 )
                OutDebug << *((*it)->LargePolygon);
            idx++;
        }
        OutDebug << "-----------   End of BuilSingleListPath  ---------------------------\n\n\n";
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x10(%rax), %r15
testq %r15, %r15
je 0x319c9
leaq 0x20(%rbx), %r14
movq 0xf0(%r15), %r12
testq %r12, %r12
je 0x319bd
movl $0x0, 0x80(%r12)
movq $0x0, 0x88(%r12)
cmpq $0x0, 0x68(%r12)
je 0x319b6
movl $0x18, %edi
callq 0x7430
movq %r12, 0x10(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x7080
incq 0x30(%rbx)
movq 0x48(%r12), %r12
jmp 0x31974
movq 0xf8(%r15), %r15
testq %r15, %r15
jne 0x3196d
cmpl $0x0, 0x60(%rbx)
jle 0x31a31
leaq 0x68(%rbx), %r14
leaq 0xe7bc(%rip), %rsi      # 0x40196
movl $0x29, %edx
movq %r14, %rdi
callq 0x74d0
movq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0x72f0
movq %rax, %r14
leaq 0xe7c3(%rip), %rsi      # 0x401c0
movl $0x12, %edx
movq %rax, %rdi
callq 0x74d0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x73f0
movsbl %al, %esi
movq %r14, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7300
leaq 0x20(%rbx), %r15
leaq -0x122(%rip), %rsi      # 0x3191a
movq %r15, %rdi
callq 0x3c5cc
cmpl $0x0, 0x60(%rbx)
jle 0x31b85
movq (%r15), %r14
cmpq %r15, %r14
je 0x31b5f
leaq 0x68(%rbx), %rax
movq %rax, (%rsp)
xorl %ebp, %ebp
movl $0x7, %edx
movq (%rsp), %r12
movq %r12, %rdi
leaq 0xe75c(%rip), %rsi      # 0x401d3
callq 0x74d0
movq %r12, %rdi
movl %ebp, %esi
callq 0x7710
movq %rax, %r13
movl $0x5, %edx
movq %rax, %rdi
leaq 0xe743(%rip), %rsi      # 0x401db
callq 0x74d0
movq 0x10(%r14), %r12
movl $0x90, %eax
addq %rax, %r12
movq %r12, %rdi
callq 0x71d0
movq %r13, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x74d0
movl $0x6, %edx
movq %r13, %rdi
leaq 0xed1e(%rip), %rsi      # 0x407ec
callq 0x74d0
movq 0x10(%r14), %rax
movq 0x68(%rax), %rdi
callq 0x26926
movq %r13, %rdi
callq 0x7680
movq %rax, %r13
movl $0x8, %edx
movq %rax, %rdi
leaq 0xe6e7(%rip), %rsi      # 0x401e1
callq 0x74d0
movq 0x10(%r14), %rax
movq 0x58(%rax), %rax
movl $0x0, %esi
testq %rax, %rax
je 0x31b1e
xorl %esi, %esi
incl %esi
movq 0x48(%rax), %rax
testq %rax, %rax
jne 0x31b13
movq %r13, %rdi
callq 0x7710
movl $0xa, %edx
movq %rax, %rdi
leaq 0xdbc9(%rip), %rsi      # 0x3f6fe
callq 0x74d0
cmpl $0x2, 0x60(%rbx)
jl 0x31b51
movq 0x10(%r14), %rax
movq 0x68(%rax), %rsi
movq (%rsp), %rdi
callq 0x3c85c
incl %ebp
movq (%r14), %r14
cmpq %r15, %r14
jne 0x31a64
addq $0x68, %rbx
leaq 0xe680(%rip), %rsi      # 0x401ea
movl $0x47, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x74d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq