// File: /workspace/github_cpp_makefile_star2_O3/thierry7100[P]CutOptim/src/SvgDoc.cpp
// Function: SvgDoc::EnlargePaths(double)
void SvgDoc::EnlargePaths(double Diff)
{
    int nShape, nPath;

    if ( debug_level > 0 )
    {
        OutDebug << "---------------- Entering EnlargePaths, elapsed time: " <<  1000.0*(clock() - StartClock)/CLOCKS_PER_SEC << "ms\n";
    }
    nShape = 0;
    if ( SvgData == NULL ) return;
	for (NSVGshape *shape = SvgData->shapes; shape != NULL; shape = shape->next, nShape++)
	{
        nPath = 0;
        //  Transform each path to a polygon
		for (NSVGpath *path = shape->paths; path != NULL; path = path->next, nPath++)
		{
            if ( path->ClosePolygon == NULL )
            {
                OutDebug << path->id << " has no closed polygon, skipping large polygon generation\n";
                continue;
            }
            if ( debug_level > 1 )
            {
                OutDebug << path->id << " before elarging polygon with " << path->ClosePolygon->nVertices << " vertices and area " << path->ClosePolygon->area() << "mm²\n" << std::flush;
            }
            path->LargePolygon = path->ClosePolygon->enlarge(Diff);
            if ( debug_level > 1 )
            {
                OutDebug << path->id << " before simplify large polygon with " << path->LargePolygon->nVertices << " vertices and area " << path->LargePolygon->area() << "mm²\n" << std::flush;
            }
            path->LargePolygon->Simplify(Diff*Diff/5);
            if ( debug_level > 1 )
            {
                OutDebug << path->id << " after simplify large polygon with " << path->LargePolygon->nVertices << " vertices and area " << path->LargePolygon->area() << "mm²\n" << std::flush;
            }
		}
	}
    if ( debug_level > 0 )
    {
        OutDebug << "---------------- Exit EnlargePaths, elapsed time: " <<  1000.0*(clock() - StartClock)/CLOCKS_PER_SEC << "ms\n\n\n" << std::flush;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, (%rsp)
movq %rdi, %rbx
cmpl $0x0, 0x60(%rdi)
jle 0x2dd0a
leaq 0x68(%rbx), %r14
leaq 0x10b26(%rip), %rsi     # 0x3e7e3
movl $0x36, %edx
movq %r14, %rdi
callq 0x74e0
callq 0x72f0
subq 0x268(%rbx), %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0xe32a(%rip), %xmm0     # 0x3c010
divsd 0x1055a(%rip), %xmm0    # 0x3e248
movq %r14, %rdi
callq 0x7690
leaq 0x10b1d(%rip), %rsi     # 0x3e81a
movl $0x3, %edx
movq %rax, %rdi
callq 0x74e0
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x2dff6
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x2df7f
leaq 0x68(%rbx), %r14
movsd (%rsp), %xmm0
mulsd %xmm0, %xmm0
divsd 0x10517(%rip), %xmm0    # 0x3e250
movsd %xmm0, 0x10(%rsp)
leaq 0x10b32(%rip), %r13     # 0x3e878
leaq 0x10957(%rip), %rbp     # 0x3e6a4
movq %rax, 0x8(%rsp)
movq 0xf0(%rax), %r15
testq %r15, %r15
je 0x2df6a
movq 0x60(%r15), %rdi
testq %rdi, %rdi
je 0x2df30
cmpl $0x2, 0x60(%rbx)
jl 0x2ddfc
leaq 0x90(%r15), %r12
movq %r12, %rdi
callq 0x71d0
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x74e0
movl $0x1e, %edx
movq %r14, %rdi
leaq 0x10ab4(%rip), %rsi     # 0x3e859
callq 0x74e0
movq 0x60(%r15), %rax
movl 0x8(%rax), %esi
movq %r14, %rdi
callq 0x7720
movq %rax, %r12
movl $0x13, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x74e0
movq 0x60(%r15), %rdi
callq 0x266bc
movq %r12, %rdi
callq 0x7690
movq %rax, %r12
movl $0x5, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movq %r12, %rdi
callq 0x7310
movq 0x60(%r15), %rdi
movsd (%rsp), %xmm0
callq 0x26afe
movq %rax, 0x68(%r15)
cmpl $0x2, 0x60(%rbx)
jl 0x2de97
leaq 0x90(%r15), %r12
movq %r12, %rdi
callq 0x71d0
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x74e0
movl $0x24, %edx
movq %r14, %rdi
leaq 0x10a4c(%rip), %rsi     # 0x3e88c
callq 0x74e0
movq 0x68(%r15), %rax
movl 0x8(%rax), %esi
movq %r14, %rdi
callq 0x7720
movq %rax, %r12
movl $0x13, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x74e0
movq 0x68(%r15), %rdi
callq 0x266bc
movq %r12, %rdi
callq 0x7690
movq %rax, %r12
movl $0x5, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movq %r12, %rdi
callq 0x7310
movq 0x68(%r15), %rax
movq %rax, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x28b52
cmpl $0x2, 0x60(%rbx)
jl 0x2df61
leaq 0x90(%r15), %r12
movq %r12, %rdi
callq 0x71d0
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x74e0
movl $0x23, %edx
movq %r14, %rdi
leaq 0x109d6(%rip), %rsi     # 0x3e8b1
callq 0x74e0
movq 0x68(%r15), %rax
movl 0x8(%rax), %esi
movq %r14, %rdi
callq 0x7720
movq %rax, %r12
movl $0x13, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x74e0
movq 0x68(%r15), %rdi
callq 0x266bc
movq %r12, %rdi
callq 0x7690
movq %rax, %r12
movl $0x5, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movq %r12, %rdi
callq 0x7310
jmp 0x2df61
leaq 0x90(%r15), %r12
movq %r12, %rdi
callq 0x71d0
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x74e0
movl $0x3a, %edx
movq %r14, %rdi
leaq 0x108c2(%rip), %rsi     # 0x3e81e
callq 0x74e0
movq 0x48(%r15), %r15
jmp 0x2dd59
movq 0x8(%rsp), %rax
movq 0xf8(%rax), %rax
testq %rax, %rax
jne 0x2dd4d
cmpl $0x0, 0x60(%rbx)
jle 0x2dff6
leaq 0x68(%rbx), %r14
leaq 0x10945(%rip), %rsi     # 0x3e8d5
movl $0x32, %edx
movq %r14, %rdi
callq 0x74e0
callq 0x72f0
subq 0x268(%rbx), %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0xe057(%rip), %xmm0     # 0x3c010
divsd 0x10287(%rip), %xmm0    # 0x3e248
movq %r14, %rdi
callq 0x7690
movq %rax, %rbx
leaq 0x10935(%rip), %rsi     # 0x3e908
movl $0x5, %edx
movq %rax, %rdi
callq 0x74e0
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7310
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop