// File: /workspace/github_cpp_makefile_star2_O1/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 0x2ea1c
leaq 0x68(%rbx), %r14
leaq 0x10d78(%rip), %rsi     # 0x3f747
movl $0x36, %edx
movq %r14, %rdi
callq 0x74d0
callq 0x72e0
subq 0x268(%rbx), %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0xe618(%rip), %xmm0     # 0x3d010
divsd 0x107a8(%rip), %xmm0    # 0x3f1a8
movq %r14, %rdi
callq 0x7680
leaq 0x10d6f(%rip), %rsi     # 0x3f77e
movl $0x3, %edx
movq %rax, %rdi
callq 0x74d0
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x2ecfb
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x2ec84
leaq 0x68(%rbx), %r14
movsd (%rsp), %xmm0
mulsd %xmm0, %xmm0
divsd 0x10765(%rip), %xmm0    # 0x3f1b0
movsd %xmm0, 0x10(%rsp)
leaq 0x10d84(%rip), %r13     # 0x3f7dc
leaq 0x10ba9(%rip), %rbp     # 0x3f608
movq %rax, 0x8(%rsp)
movq 0xf0(%rax), %r15
testq %r15, %r15
je 0x2ec6f
cmpq $0x0, 0x60(%r15)
je 0x2ec35
cmpl $0x2, 0x60(%rbx)
jl 0x2eb04
leaq 0x90(%r15), %r12
movq %r12, %rdi
callq 0x71d0
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x74d0
movl $0x1e, %edx
movq %r14, %rdi
leaq 0x10d0c(%rip), %rsi     # 0x3f7bd
callq 0x74d0
movq 0x60(%r15), %rax
movl 0x8(%rax), %esi
movq %r14, %rdi
callq 0x7710
movq %rax, %r12
movl $0x13, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x74d0
movq 0x60(%r15), %rdi
callq 0x26926
movq %r12, %rdi
callq 0x7680
movq %rax, %r12
movl $0x5, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74d0
movq %r12, %rdi
callq 0x7300
movq 0x60(%r15), %rdi
movsd (%rsp), %xmm0
callq 0x26d30
movq %rax, 0x68(%r15)
cmpl $0x2, 0x60(%rbx)
jl 0x2eb9b
leaq 0x90(%r15), %r12
movq %r12, %rdi
callq 0x71d0
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x74d0
movl $0x24, %edx
movq %r14, %rdi
leaq 0x10ca8(%rip), %rsi     # 0x3f7f0
callq 0x74d0
movq 0x68(%r15), %rax
movl 0x8(%rax), %esi
movq %r14, %rdi
callq 0x7710
movq %rax, %r12
movl $0x13, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x74d0
movq 0x68(%r15), %rdi
callq 0x26926
movq %r12, %rdi
callq 0x7680
movq %rax, %r12
movl $0x5, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74d0
movq %r12, %rdi
callq 0x7300
movq 0x68(%r15), %rdi
movsd 0x10(%rsp), %xmm0
callq 0x29388
cmpl $0x2, 0x60(%rbx)
jl 0x2ec66
leaq 0x90(%r15), %r12
movq %r12, %rdi
callq 0x71d0
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x74d0
movl $0x23, %edx
movq %r14, %rdi
leaq 0x10c35(%rip), %rsi     # 0x3f815
callq 0x74d0
movq 0x68(%r15), %rax
movl 0x8(%rax), %esi
movq %r14, %rdi
callq 0x7710
movq %rax, %r12
movl $0x13, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x74d0
movq 0x68(%r15), %rdi
callq 0x26926
movq %r12, %rdi
callq 0x7680
movq %rax, %r12
movl $0x5, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74d0
movq %r12, %rdi
callq 0x7300
jmp 0x2ec66
leaq 0x90(%r15), %r12
movq %r12, %rdi
callq 0x71d0
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x74d0
movl $0x3a, %edx
movq %r14, %rdi
leaq 0x10b21(%rip), %rsi     # 0x3f782
callq 0x74d0
movq 0x48(%r15), %r15
jmp 0x2ea6b
movq 0x8(%rsp), %rax
movq 0xf8(%rax), %rax
testq %rax, %rax
jne 0x2ea5f
cmpl $0x0, 0x60(%rbx)
jle 0x2ecfb
leaq 0x68(%rbx), %r14
leaq 0x10ba4(%rip), %rsi     # 0x3f839
movl $0x32, %edx
movq %r14, %rdi
callq 0x74d0
callq 0x72e0
subq 0x268(%rbx), %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0xe352(%rip), %xmm0     # 0x3d010
divsd 0x104e2(%rip), %xmm0    # 0x3f1a8
movq %r14, %rdi
callq 0x7680
movq %rax, %rbx
leaq 0x10b94(%rip), %rsi     # 0x3f86c
movl $0x5, %edx
movq %rax, %rdi
callq 0x74d0
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7300
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq