// File: /workspace/github_cpp_makefile_star2_O1/hzeller[P]gcode-multi-shell-extrude/third_party/clipper.cpp
// Function: ClipperLib::Minkowski(std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>> const&, std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>> const&, std::vector<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>, std::allocator<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>>>&, bool, bool)
void Minkowski(const Path& poly, const Path& path, 
  Paths& solution, bool isSum, bool isClosed)
{
  int delta = (isClosed ? 1 : 0);
  size_t polyCnt = poly.size();
  size_t pathCnt = path.size();
  Paths pp;
  pp.reserve(pathCnt);
  if (isSum)
    for (size_t i = 0; i < pathCnt; ++i)
    {
      Path p;
      p.reserve(polyCnt);
      for (size_t j = 0; j < poly.size(); ++j)
        p.push_back(IntPoint(path[i].X + poly[j].X, path[i].Y + poly[j].Y));
      pp.push_back(p);
    }
  else
    for (size_t i = 0; i < pathCnt; ++i)
    {
      Path p;
      p.reserve(polyCnt);
      for (size_t j = 0; j < poly.size(); ++j)
        p.push_back(IntPoint(path[i].X - poly[j].X, path[i].Y - poly[j].Y));
      pp.push_back(p);
    }

  Paths quads; 
  quads.reserve((pathCnt + delta) * (polyCnt + 1));
  for (size_t i = 0; i < pathCnt - 1 + delta; ++i)
    for (size_t j = 0; j < polyCnt; ++j)
    {
      Path quad;
      quad.reserve(4);
      quad.push_back(pp[i % pathCnt][j % polyCnt]);
      quad.push_back(pp[(i + 1) % pathCnt][j % polyCnt]);
      quad.push_back(pp[(i + 1) % pathCnt][(j + 1) % polyCnt]);
      quad.push_back(pp[i % pathCnt][(j + 1) % polyCnt]);
      if (!Orientation(quad)) ReversePath(quad);
      quads.push_back(quad);
    }

  Clipper c;
  c.AddPaths(quads, ptSubject, true);
  c.Execute(ctUnion, solution, pftNonZero, pftNonZero);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movl %r8d, 0x38(%rsp)
movl %ecx, 0x8(%rsp)
movq %rdx, 0x68(%rsp)
movq %rsi, %r12
movq %rdi, %r13
movq (%rdi), %rbp
movq 0x8(%rdi), %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %r15
movq %r15, %rsi
subq %r14, %rsi
sarq $0x4, %rsi
xorpd %xmm0, %xmm0
leaq 0x40(%rsp), %rdi
movapd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rsi, 0x18(%rsp)
callq 0x12334
movq %rbx, %rax
movq %rbp, 0x60(%rsp)
subq %rbp, %rax
sarq $0x4, %rax
movq %rax, 0x10(%rsp)
cmpb $0x0, 0x8(%rsp)
movq %rbx, 0x78(%rsp)
je 0x11657
cmpq %r14, %r15
je 0x1176d
movq 0x18(%rsp), %rax
cmpq $0x1, %rax
adcq $0x0, %rax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
xorpd %xmm0, %xmm0
movapd %xmm0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
leaq 0x80(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1241a
movq (%r13), %rax
cmpq %rax, 0x8(%r13)
je 0x11615
movl $0x8, %r14d
movq %rbp, %r15
shlq $0x4, %r15
xorl %ebx, %ebx
movq (%r12), %rcx
movq -0x8(%rax,%r14), %rdx
addq (%rcx,%r15), %rdx
movq (%rax,%r14), %rax
addq 0x8(%rcx,%r15), %rax
movq %rdx, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq 0x88(%rsp), %rsi
cmpq 0x90(%rsp), %rsi
je 0x115e8
movupd 0x20(%rsp), %xmm0
movupd %xmm0, (%rsi)
addq $0x10, 0x88(%rsp)
jmp 0x115fa
leaq 0x80(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x75d4
incq %rbx
movq (%r13), %rax
movq 0x8(%r13), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
addq $0x10, %r14
cmpq %rcx, %rbx
jb 0x115a1
leaq 0x40(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x124c2
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x11644
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
incq %rbp
cmpq 0x8(%rsp), %rbp
jne 0x11559
jmp 0x1176d
cmpq %r14, %r15
je 0x1176d
movq 0x18(%rsp), %rax
cmpq $0x1, %rax
adcq $0x0, %rax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
xorpd %xmm0, %xmm0
movapd %xmm0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
leaq 0x80(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1241a
movq (%r13), %rax
cmpq %rax, 0x8(%r13)
je 0x11730
movl $0x8, %r14d
movq %rbp, %r15
shlq $0x4, %r15
xorl %ebx, %ebx
movq (%r12), %rcx
movq (%rcx,%r15), %rdx
subq -0x8(%rax,%r14), %rdx
movq 0x8(%rcx,%r15), %rcx
subq (%rax,%r14), %rcx
movq %rdx, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
movq 0x88(%rsp), %rsi
cmpq 0x90(%rsp), %rsi
je 0x11703
movupd 0x20(%rsp), %xmm0
movupd %xmm0, (%rsi)
addq $0x10, 0x88(%rsp)
jmp 0x11715
leaq 0x80(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x75d4
incq %rbx
movq (%r13), %rax
movq 0x8(%r13), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
addq $0x10, %r14
cmpq %rcx, %rbx
jb 0x116bc
leaq 0x40(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x124c2
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x1175f
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
incq %rbp
cmpq 0x8(%rsp), %rbp
jne 0x11674
xorpd %xmm0, %xmm0
leaq 0x20(%rsp), %rdi
movapd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl 0x38(%rsp), %ebp
movzbl %bpl, %eax
movq 0x18(%rsp), %rbx
addq %rbx, %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rcx), %rsi
imulq %rax, %rsi
callq 0x12334
xorb $0x1, %bpl
movzbl %bpl, %eax
subq %rax, %rbx
movq %rbx, 0x70(%rsp)
movq 0x60(%rsp), %rax
je 0x119fa
movq 0x10(%rsp), %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
movq %rcx, 0x38(%rsp)
xorl %r12d, %r12d
leaq 0x80(%rsp), %r13
cmpq %rax, 0x78(%rsp)
je 0x119e7
leaq 0x1(%r12), %rax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
xorpd %xmm0, %xmm0
movapd %xmm0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
movl $0x4, %esi
movq %r13, %rdi
callq 0x1241a
movq %r12, %rax
xorl %edx, %edx
divq 0x18(%rsp)
movq 0x40(%rsp), %rcx
leaq (%rdx,%rdx,2), %r15
movq %rbp, %rax
xorl %edx, %edx
divq 0x10(%rsp)
movq %rdx, %r14
shlq $0x4, %r14
movq (%rcx,%r15,8), %rdx
addq %r14, %rdx
movq 0x88(%rsp), %rsi
cmpq 0x90(%rsp), %rsi
je 0x11869
movupd (%rdx), %xmm0
movupd %xmm0, (%rsi)
addq $0x10, 0x88(%rsp)
jmp 0x11871
movq %r13, %rdi
callq 0x1270c
movq 0x8(%rsp), %rax
xorl %edx, %edx
divq 0x18(%rsp)
movq 0x40(%rsp), %rax
leaq (%rdx,%rdx,2), %rbx
addq (%rax,%rbx,8), %r14
movq 0x88(%rsp), %rsi
cmpq 0x90(%rsp), %rsi
je 0x118b0
movupd (%r14), %xmm0
movupd %xmm0, (%rsi)
addq $0x10, 0x88(%rsp)
jmp 0x118bb
movq %r13, %rdi
movq %r14, %rdx
callq 0x1270c
movq 0x40(%rsp), %rcx
incq %rbp
movq %rbp, %rax
xorl %edx, %edx
divq 0x10(%rsp)
movq %rdx, %r14
shlq $0x4, %r14
movq (%rcx,%rbx,8), %rdx
addq %r14, %rdx
movq 0x88(%rsp), %rsi
cmpq 0x90(%rsp), %rsi
je 0x11900
movupd (%rdx), %xmm0
movupd %xmm0, (%rsi)
addq $0x10, 0x88(%rsp)
jmp 0x11908
movq %r13, %rdi
callq 0x1270c
movq 0x40(%rsp), %rax
addq (%rax,%r15,8), %r14
movq 0x88(%rsp), %rsi
cmpq 0x90(%rsp), %rsi
je 0x11937
movupd (%r14), %xmm0
movupd %xmm0, (%rsi)
addq $0x10, 0x88(%rsp)
jmp 0x11942
movq %r13, %rdi
movq %r14, %rdx
callq 0x1270c
movq %r13, %rdi
callq 0x892d
ucomisd 0x26b6(%rip), %xmm0     # 0x14008
jae 0x119b2
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rcx
cmpq %rcx, %rax
setne %dl
addq $-0x10, %rcx
cmpq %rax, %rcx
seta %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x119b2
addq $0x10, %rax
movups -0x10(%rax), %xmm0
movaps %xmm0, 0x180(%rsp)
movups (%rcx), %xmm0
movups %xmm0, -0x10(%rax)
movapd 0x180(%rsp), %xmm0
movupd %xmm0, (%rcx)
addq $-0x10, %rcx
leaq 0x10(%rax), %rdx
cmpq %rcx, %rax
movq %rdx, %rax
jb 0x11982
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x124c2
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x119dc
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
cmpq 0x38(%rsp), %rbp
jne 0x117f3
incq %r12
cmpq 0x70(%rsp), %r12
movq 0x60(%rsp), %rax
jne 0x117dc
leaq 0x140(%rsp), %rbx
xorpd %xmm0, %xmm0
movupd %xmm0, 0x20(%rbx)
xorl %eax, %eax
movq %rax, 0x30(%rbx)
movupd %xmm0, 0x8(%rbx)
leaq 0xa29b(%rip), %rcx      # 0x1bcb8
movq %rcx, -0xc0(%rbx)
leaq 0xa2d5(%rip), %rcx      # 0x1bd00
movq %rcx, (%rbx)
leaq 0xf8(%rsp), %rcx
movl $0x0, (%rcx)
movq %rax, 0x8(%rcx)
movupd %xmm0, -0x70(%rcx)
movupd %xmm0, -0x60(%rcx)
movupd %xmm0, -0x50(%rcx)
movupd %xmm0, -0x40(%rcx)
movupd %xmm0, -0x30(%rcx)
movupd %xmm0, -0x20(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movb %al, 0x60(%rcx)
movupd %xmm0, 0x29(%rcx)
movupd %xmm0, 0x20(%rcx)
movb %al, 0x44(%rcx)
movb %al, 0x46(%rcx)
movw $0x0, 0x38(%rbx)
movq 0x20(%rsp), %rsi
cmpq %rsi, 0x28(%rsp)
je 0x11ace
xorl %r14d, %r14d
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
xorl %r12d, %r12d
addq %r14, %rsi
movq %rbx, %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x9b74
incq %r12
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rax
subq %rsi, %rax
sarq $0x3, %rax
imulq %r15, %rax
addq $0x18, %r14
cmpq %rax, %r12
jb 0x11a9b
leaq 0x80(%rsp), %rdi
movl $0x1, %esi
movq 0x68(%rsp), %rdx
movl $0x1, %ecx
movl $0x1, %r8d
callq 0xa738
leaq 0xa229(%rip), %rsi      # 0x1bd20
leaq 0x80(%rsp), %rdi
callq 0xa574
movq %rbx, %rdi
callq 0x9760
leaq 0x20(%rsp), %rdi
callq 0x7586
leaq 0x40(%rsp), %rdi
callq 0x7586
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11b3e
movq %rax, %r14
jmp 0x11ba7
movq %rax, %r14
jmp 0x11bb1
movq %rax, %r14
leaq 0xa1d8(%rip), %rsi      # 0x1bd20
leaq 0x80(%rsp), %rdi
callq 0xa574
movq %rbx, %rdi
callq 0x9760
jmp 0x11ba7
jmp 0x11b65
jmp 0x11b65
jmp 0x11b65
movq %rax, %r14
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x11bb1
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
jmp 0x11bb1
movq %rax, %r14
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x11ba7
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
leaq 0x20(%rsp), %rdi
callq 0x7586
leaq 0x40(%rsp), %rdi
callq 0x7586
movq %r14, %rdi
callq 0x3380