// File: /workspace/github_cpp_makefile_star2_O2/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 $0x168, %rsp            # imm = 0x168
movl %r8d, 0x18(%rsp)
movl %ecx, %ebx
movq %rdi, %r12
movq 0x8(%rdi), %r14
subq (%rdi), %r14
movq %rsi, %rax
movq 0x8(%rsi), %rsi
movq %rax, 0x8(%rsp)
subq (%rax), %rsi
movq %rdx, 0x58(%rsp)
sarq $0x4, %rsi
pxor %xmm0, %xmm0
leaq 0x40(%rsp), %rdi
movdqa %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %rsi, 0x10(%rsp)
callq 0xf7b4
sarq $0x4, %r14
xorl %r15d, %r15d
leaq 0x60(%rsp), %r13
testb %bl, %bl
je 0xed76
cmpq 0x10(%rsp), %r15
je 0xee11
pxor %xmm0, %xmm0
movdqa %xmm0, 0x60(%rsp)
andq $0x0, 0x70(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0xf856
movq %r15, (%rsp)
shlq $0x4, %r15
xorl %ebp, %ebp
xorl %ebx, %ebx
movq (%r12), %rax
movq 0x8(%r12), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %rcx, %rbx
jae 0xed55
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movdqu (%rcx,%r15), %xmm0
movdqu (%rax,%rbp), %xmm1
paddq %xmm0, %xmm1
movdqa %xmm1, 0x20(%rsp)
movq %r13, %rdi
leaq 0x20(%rsp), %rsi
callq 0x6770
incq %rbx
addq $0x10, %rbp
jmp 0xed0d
leaq 0x40(%rsp), %rdi
movq %r13, %rsi
callq 0xf91c
movq (%rsp), %r15
movq %r13, %rdi
callq 0x673c
incq %r15
jmp 0xecdb
cmpq 0x10(%rsp), %r15
je 0xee11
pxor %xmm0, %xmm0
movdqa %xmm0, 0x60(%rsp)
andq $0x0, 0x70(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0xf856
movq %r15, (%rsp)
shlq $0x4, %r15
xorl %ebp, %ebp
xorl %ebx, %ebx
movq (%r12), %rax
movq 0x8(%r12), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %rcx, %rbx
jae 0xedf0
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movdqu (%rcx,%r15), %xmm0
movdqu (%rax,%rbp), %xmm1
psubq %xmm1, %xmm0
movdqa %xmm0, 0x20(%rsp)
movq %r13, %rdi
leaq 0x20(%rsp), %rsi
callq 0x6770
incq %rbx
addq $0x10, %rbp
jmp 0xeda8
leaq 0x40(%rsp), %rdi
movq %r13, %rsi
callq 0xf91c
movq (%rsp), %r15
movq %r13, %rdi
callq 0x673c
incq %r15
jmp 0xed76
pxor %xmm0, %xmm0
leaq 0x20(%rsp), %rdi
movdqa %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movl 0x18(%rsp), %ebp
movzbl %bpl, %eax
movq 0x10(%rsp), %rbx
addq %rbx, %rax
leaq 0x1(%r14), %rsi
imulq %rax, %rsi
callq 0xf7b4
xorb $0x1, %bpl
movzbl %bpl, %eax
subq %rax, %rbx
movq %rbx, 0x18(%rsp)
xorl %eax, %eax
leaq 0x60(%rsp), %r13
cmpq 0x18(%rsp), %rax
je 0xef5c
movq %rax, (%rsp)
incq %rax
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
cmpq %rbx, %r14
je 0xef52
pxor %xmm0, %xmm0
movdqa %xmm0, 0x60(%rsp)
andq $0x0, 0x70(%rsp)
movq %r13, %rdi
pushq $0x4
popq %rsi
callq 0xf856
movq (%rsp), %rax
xorl %edx, %edx
divq 0x10(%rsp)
movq 0x40(%rsp), %rcx
imulq $0x18, %rdx, %rbp
movq %rbx, %rax
xorl %edx, %edx
divq %r14
movq %rdx, %r15
shlq $0x4, %r15
movq (%rcx,%rbp), %rsi
addq %r15, %rsi
movq %r13, %rdi
callq 0xf8fe
movq 0x8(%rsp), %rax
xorl %edx, %edx
divq 0x10(%rsp)
movq 0x40(%rsp), %rax
imulq $0x18, %rdx, %r12
addq (%rax,%r12), %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0xf8fe
movq 0x40(%rsp), %rcx
incq %rbx
movq %rbx, %rax
xorl %edx, %edx
divq %r14
movq %rdx, %r15
shlq $0x4, %r15
movq (%rcx,%r12), %rsi
addq %r15, %rsi
movq %r13, %rdi
callq 0xf8fe
movq 0x40(%rsp), %rax
addq (%rax,%rbp), %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0xf8fe
movq %r13, %rdi
callq 0x7b8a
testb %al, %al
jne 0xef38
movq %r13, %rdi
callq 0xd1f8
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0xf91c
movq %r13, %rdi
callq 0x673c
jmp 0xee70
movq 0x8(%rsp), %rax
jmp 0xee57
leaq 0x120(%rsp), %rdi
pxor %xmm0, %xmm0
movdqu %xmm0, 0x20(%rdi)
andq $0x0, 0x30(%rdi)
movdqu %xmm0, 0x8(%rdi)
leaq 0xbd3a(%rip), %rax      # 0x1acb8
movq %rax, -0xc0(%rdi)
leaq 0xbd74(%rip), %rax      # 0x1ad00
movq %rax, (%rdi)
leaq 0xd8(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movdqu %xmm0, -0x70(%rax)
movdqu %xmm0, -0x60(%rax)
movdqu %xmm0, -0x50(%rax)
movdqu %xmm0, -0x40(%rax)
movdqu %xmm0, -0x30(%rax)
movdqu %xmm0, -0x20(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
xorl %ecx, %ecx
movb %cl, 0x60(%rax)
movdqu %xmm0, 0x20(%rax)
movdqu %xmm0, 0x29(%rax)
movb %cl, 0x44(%rax)
movb %cl, 0x46(%rax)
andw $0x0, 0x38(%rdi)
leaq 0x20(%rsp), %rsi
pushq $0x1
popq %rcx
xorl %edx, %edx
callq 0x9260
leaq 0x60(%rsp), %rdi
pushq $0x1
popq %rcx
movl %ecx, %esi
movq 0x58(%rsp), %rdx
movl %ecx, %r8d
callq 0x96e8
leaq 0x60(%rsp), %rdi
callq 0x961c
leaq 0x20(%rsp), %rdi
callq 0x671a
leaq 0x40(%rsp), %rdi
callq 0x671a
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xf070
movq %rax, %rbx
jmp 0xf07a
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x961c
jmp 0xf070
jmp 0xf054
jmp 0xf054
jmp 0xf054
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x673c
jmp 0xf07a
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x673c
leaq 0x20(%rsp), %rdi
callq 0x671a
leaq 0x40(%rsp), %rdi
callq 0x671a
movq %rbx, %rdi
callq 0x33a0