// File: It4innovations[P]Handicap/src/GraphLabelings/../Solvers/kSumProblemSolver.h
// Function: kSumProblemSolver<int>::solve4SUM(std::unique_ptr<int [], std::default_delete<int []>> const&, std::stack<int, std::deque<int, std::allocator<int>>>&)
void solve4SUM(const std::unique_ptr<T[]> & labels, std::stack<T> & solution) {
			int sum, lhs, rhs, searchWeight;
			for (int i = labelsCount - 1; i >= 3; --i) {
				for (int j = i - 1; j >= 2; --j) {
					lhs = 0;
					rhs = j - 1;
					searchWeight = searchNumber - labels[i] - labels[j];
					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]);
							rhs -= 1;
							lhs += 1;
						}
					}
				}
			}
		}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x30(%rsp)
movl (%rax), %eax
subl $0x1, %eax
movl %eax, 0x3c(%rsp)
cmpl $0x3, 0x3c(%rsp)
jl 0x3696
movl 0x3c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x38(%rsp)
cmpl $0x2, 0x38(%rsp)
jl 0x3684
movq 0x30(%rsp), %rax
movl $0x0, 0x48(%rsp)
movl 0x38(%rsp), %ecx
subl $0x1, %ecx
movl %ecx, 0x44(%rsp)
movl 0x4(%rax), %eax
movl %eax, 0x28(%rsp)
movq 0x58(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x3290
movq %rax, %rcx
movl 0x28(%rsp), %eax
subl (%rcx), %eax
movl %eax, 0x2c(%rsp)
movq 0x58(%rsp), %rdi
movslq 0x38(%rsp), %rsi
callq 0x3290
movq %rax, %rcx
movl 0x2c(%rsp), %eax
subl (%rcx), %eax
movl %eax, 0x40(%rsp)
cmpl $0x0, 0x40(%rsp)
jg 0x354a
jmp 0x3674
jmp 0x354c
movl 0x48(%rsp), %eax
cmpl 0x44(%rsp), %eax
jge 0x3672
movq 0x58(%rsp), %rdi
movslq 0x48(%rsp), %rsi
callq 0x3290
movl (%rax), %eax
movl %eax, 0x24(%rsp)
movq 0x58(%rsp), %rdi
movslq 0x44(%rsp), %rsi
callq 0x3290
movq %rax, %rcx
movl 0x24(%rsp), %eax
addl (%rcx), %eax
movl %eax, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
cmpl 0x40(%rsp), %eax
jge 0x35a5
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x366d
movl 0x4c(%rsp), %eax
cmpl 0x40(%rsp), %eax
jle 0x35bf
movl 0x44(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x366b
movq 0x50(%rsp), %rax
movq %rax, (%rsp)
movq 0x58(%rsp), %rdi
movslq 0x48(%rsp), %rsi
callq 0x3290
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x32d0
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rdi
movslq 0x44(%rsp), %rsi
callq 0x3290
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x32d0
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %rdi
movslq 0x38(%rsp), %rsi
callq 0x3290
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x32d0
movq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x58(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x3290
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x32d0
movl 0x44(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x44(%rsp)
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x366d
jmp 0x354c
jmp 0x3674
movl 0x38(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x38(%rsp)
jmp 0x34dc
jmp 0x3686
movl 0x3c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x34c6
addq $0x68, %rsp
retq
nopl (%rax,%rax)