// File: /workspace/github_cpp_makefile_star2_O2/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 0x28973
leaq 0x68(%rbx), %rdi
leaq 0xde70(%rip), %rsi      # 0x367a3
callq 0x8420
movq %rax, %r14
callq 0x8300
subq 0x268(%rbx), %rax
cvtsi2sd %rax, %xmm0
mulsd 0xb6bc(%rip), %xmm0     # 0x34010
divsd 0xd8ac(%rip), %xmm0     # 0x36208
movq %r14, %rdi
callq 0x86b0
leaq 0xde6f(%rip), %rsi      # 0x367da
movq %rax, %rdi
callq 0x8420
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x28bd0
addq $0x10, %rax
leaq 0x68(%rbx), %r14
movsd (%rsp), %xmm0
mulsd %xmm0, %xmm0
divsd 0xd877(%rip), %xmm0     # 0x36210
movsd %xmm0, 0x10(%rsp)
leaq 0xde92(%rip), %r13      # 0x36838
leaq 0xdcb7(%rip), %rbp      # 0x36664
movq (%rax), %rax
testq %rax, %rax
je 0x28b6a
movq %rax, 0x8(%rsp)
leaq 0xf0(%rax), %r15
movq (%r15), %r15
testq %r15, %r15
je 0x28b5a
movq 0x60(%r15), %rdi
testq %rdi, %rdi
je 0x28b33
cmpl $0x2, 0x60(%rbx)
jl 0x28a47
leaq 0x90(%r15), %rsi
movq %r14, %rdi
callq 0x8420
movq %rax, %rdi
leaq 0xde1c(%rip), %rsi      # 0x36819
callq 0x8420
movq 0x60(%r15), %rcx
movl 0x8(%rcx), %esi
movq %rax, %rdi
callq 0x8740
movq %rax, %rdi
movq %r13, %rsi
callq 0x8420
movq %rax, %r12
movq 0x60(%r15), %rdi
callq 0x22296
movq %r12, %rdi
callq 0x86b0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x8420
movq %rax, %rdi
callq 0x8320
movq 0x60(%r15), %rdi
movsd (%rsp), %xmm0
callq 0x22656
movq %rax, 0x68(%r15)
cmpl $0x2, 0x60(%rbx)
jl 0x28abe
leaq 0x90(%r15), %rsi
movq %r14, %rdi
callq 0x8420
movq %rax, %rdi
leaq 0xddd8(%rip), %rsi      # 0x3684c
callq 0x8420
movq 0x68(%r15), %rcx
movl 0x8(%rcx), %esi
movq %rax, %rdi
callq 0x8740
movq %rax, %rdi
movq %r13, %rsi
callq 0x8420
movq %rax, %r12
movq 0x68(%r15), %rdi
callq 0x22296
movq %r12, %rdi
callq 0x86b0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x8420
movq %rax, %rdi
callq 0x8320
movq 0x68(%r15), %rax
movq %rax, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x23e40
cmpl $0x2, 0x60(%rbx)
jl 0x28b51
leaq 0x90(%r15), %rsi
movq %r14, %rdi
callq 0x8420
movq %rax, %rdi
leaq 0xdd86(%rip), %rsi      # 0x36871
callq 0x8420
movq 0x68(%r15), %rcx
movl 0x8(%rcx), %esi
movq %rax, %rdi
callq 0x8740
movq %rax, %rdi
movq %r13, %rsi
callq 0x8420
movq %rax, %r12
movq 0x68(%r15), %rdi
callq 0x22296
movq %r12, %rdi
callq 0x86b0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x8420
movq %rax, %rdi
callq 0x8320
jmp 0x28b51
leaq 0x90(%r15), %rsi
movq %r14, %rdi
callq 0x8420
movq %rax, %rdi
leaq 0xdc92(%rip), %rsi      # 0x367de
callq 0x8420
addq $0x48, %r15
jmp 0x289c5
movq 0x8(%rsp), %rax
addq $0xf8, %rax
jmp 0x289ad
cmpl $0x0, 0x60(%rbx)
jle 0x28bd0
leaq 0xdd1e(%rip), %rsi      # 0x36895
movq %r14, %rdi
callq 0x8420
movq %rax, %r14
callq 0x8300
subq 0x268(%rbx), %rax
cvtsi2sd %rax, %xmm0
mulsd 0xb475(%rip), %xmm0     # 0x34010
divsd 0xd665(%rip), %xmm0     # 0x36208
movq %r14, %rdi
callq 0x86b0
leaq 0xdd16(%rip), %rsi      # 0x368c8
movq %rax, %rdi
callq 0x8420
movq %rax, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8320
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop