// File: It4innovations[P]Handicap/src/GraphLabelings/../Solvers/kSumProblemSolver.h
// Function: kSumProblemSolver<int>::solve5SUM(std::unique_ptr<int [], std::default_delete<int []>> const&, std::stack<int, std::deque<int, std::allocator<int>>>&)
void solve5SUM(const std::unique_ptr<T[]> & labels, std::stack<T> & solution) {
			int sum, lhs, rhs, searchWeight;
			for (int k = labelsCount - 1; k >= 4; --k) {
				for (int i = k-1; i >= 3; --i) {
					for (int j = i - 1; j >= 2; --j) {
						lhs = 0;
						rhs = j - 1;
						searchWeight = searchNumber - labels[i] - labels[j] - labels[k];
						if (searchWeight <= 0) continue;
						while (lhs < rhs) {
							sum = labels[lhs] + labels[rhs];
							if (sum < searchWeight) {
								lhs += 1;
							} else if (sum > searchWeight) {
								rhs -= 1;
							} else {
								solution.emplace(labels[lhs]);
								solution.emplace(labels[rhs]);
								solution.emplace(labels[j]);
								solution.emplace(labels[i]);
								solution.emplace(labels[k]);
								rhs -= 1;
								lhs += 1;
							}
						}
					}
				}
			}
		}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x38(%rsp)
movl (%rax), %eax
subl $0x1, %eax
movl %eax, 0x4c(%rsp)
cmpl $0x4, 0x4c(%rsp)
jl 0x3900
movl 0x4c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x48(%rsp)
cmpl $0x3, 0x48(%rsp)
jl 0x38ee
movl 0x48(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x44(%rsp)
cmpl $0x2, 0x44(%rsp)
jl 0x38dc
movq 0x38(%rsp), %rax
movl $0x0, 0x58(%rsp)
movl 0x44(%rsp), %ecx
subl $0x1, %ecx
movl %ecx, 0x54(%rsp)
movl 0x4(%rax), %eax
movl %eax, 0x2c(%rsp)
movq 0x68(%rsp), %rdi
movslq 0x48(%rsp), %rsi
callq 0x3290
movq %rax, %rcx
movl 0x2c(%rsp), %eax
subl (%rcx), %eax
movl %eax, 0x30(%rsp)
movq 0x68(%rsp), %rdi
movslq 0x44(%rsp), %rsi
callq 0x3290
movq %rax, %rcx
movl 0x30(%rsp), %eax
subl (%rcx), %eax
movl %eax, 0x34(%rsp)
movq 0x68(%rsp), %rdi
movslq 0x4c(%rsp), %rsi
callq 0x3290
movq %rax, %rcx
movl 0x34(%rsp), %eax
subl (%rcx), %eax
movl %eax, 0x50(%rsp)
cmpl $0x0, 0x50(%rsp)
jg 0x377c
jmp 0x38cc
jmp 0x377e
movl 0x58(%rsp), %eax
cmpl 0x54(%rsp), %eax
jge 0x38ca
movq 0x68(%rsp), %rdi
movslq 0x58(%rsp), %rsi
callq 0x3290
movl (%rax), %eax
movl %eax, 0x28(%rsp)
movq 0x68(%rsp), %rdi
movslq 0x54(%rsp), %rsi
callq 0x3290
movq %rax, %rcx
movl 0x28(%rsp), %eax
addl (%rcx), %eax
movl %eax, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
cmpl 0x50(%rsp), %eax
jge 0x37d7
movl 0x58(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x58(%rsp)
jmp 0x38c5
movl 0x5c(%rsp), %eax
cmpl 0x50(%rsp), %eax
jle 0x37f1
movl 0x54(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x38c3
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq 0x68(%rsp), %rdi
movslq 0x58(%rsp), %rsi
callq 0x3290
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x32d0
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x68(%rsp), %rdi
movslq 0x54(%rsp), %rsi
callq 0x3290
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x32d0
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x68(%rsp), %rdi
movslq 0x44(%rsp), %rsi
callq 0x3290
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x32d0
movq 0x60(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x68(%rsp), %rdi
movslq 0x48(%rsp), %rsi
callq 0x3290
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x32d0
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x68(%rsp), %rdi
movslq 0x4c(%rsp), %rsi
callq 0x3290
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x32d0
movl 0x54(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x54(%rsp)
movl 0x58(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x58(%rsp)
jmp 0x38c5
jmp 0x377e
jmp 0x38cc
movl 0x44(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x36f2
jmp 0x38de
movl 0x48(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x36dc
jmp 0x38f0
movl 0x4c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x36c6
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
nop