// File: Laakeri[P]maxpre/src/./GSLE.cpp
// Function: maxPreprocessor::Preprocessor::GSLEBT(int, unsigned long, std::vector<int, std::allocator<int>>&, std::vector<unsigned long, std::allocator<unsigned long>>&, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, bool&, unsigned long&)
void Preprocessor::GSLEBT(int i, uint64_t w, vector<int>& sel, vector<uint64_t>& weights, vector<vector<int> >& hs, bool& found, uint64_t& itLim) {
	if (i == (int)hs.size()) {
		found = true;
		return;
	}
	if (itLim == 0) {
		return;
	}
	itLim--;
	bool f = false;
	for (int l : hs[i]) {
		if (sel[l]) {
			f = true;
			break;
		}
	}
	if (f) {
		GSLEBT(i + 1, w, sel, weights, hs, found, itLim);
	}
	else {
		for (int l : hs[i]) {
			if (weights[l] > w) continue;
			sel[l] = 1;
			GSLEBT(i + 1, w - weights[l], sel, weights, hs, found, itLim);
			sel[l] = 0;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x78(%rbp)
movq -0x30(%rbp), %rdi
callq 0xfd70
movq %rax, %rcx
movl -0x78(%rbp), %eax
cmpl %ecx, %eax
jne 0x29e77
movq 0x10(%rbp), %rax
movb $0x1, (%rax)
jmp 0x2a03e
movq 0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x29e86
jmp 0x2a03e
movq 0x18(%rbp), %rax
movq (%rax), %rcx
addq $-0x1, %rcx
movq %rcx, (%rax)
movb $0x0, -0x31(%rbp)
movq -0x30(%rbp), %rdi
movslq -0xc(%rbp), %rsi
callq 0xaab0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xa800
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0xa830
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x29ed6
jmp 0x29f09
leaq -0x48(%rbp), %rdi
callq 0xa8a0
movl (%rax), %eax
movl %eax, -0x54(%rbp)
movq -0x20(%rbp), %rdi
movslq -0x54(%rbp), %rsi
callq 0xa7c0
cmpl $0x0, (%rax)
je 0x29efc
movb $0x1, -0x31(%rbp)
jmp 0x29f09
jmp 0x29efe
leaq -0x48(%rbp), %rdi
callq 0xa930
jmp 0x29ec3
testb $0x1, -0x31(%rbp)
je 0x29f44
movq -0x80(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movq 0x10(%rbp), %r10
movq 0x18(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x29e20
jmp 0x2a03e
movq -0x30(%rbp), %rdi
movslq -0xc(%rbp), %rsi
callq 0xaab0
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0xa800
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
callq 0xa830
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x29f85
jmp 0x2a03c
leaq -0x68(%rbp), %rdi
callq 0xa8a0
movl (%rax), %eax
movl %eax, -0x74(%rbp)
movq -0x28(%rbp), %rdi
movslq -0x74(%rbp), %rsi
callq 0x3d140
movq (%rax), %rax
cmpq -0x18(%rbp), %rax
jbe 0x29fae
jmp 0x2a02e
movq -0x20(%rbp), %rdi
movslq -0x74(%rbp), %rsi
callq 0xa7c0
movl $0x1, (%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x28(%rbp), %rdi
movslq -0x74(%rbp), %rsi
callq 0x3d140
movq -0x90(%rbp), %rdx
movq -0x80(%rbp), %rdi
movl -0x84(%rbp), %esi
subq (%rax), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movq 0x10(%rbp), %r10
movq 0x18(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x29e20
movq -0x20(%rbp), %rdi
movslq -0x74(%rbp), %rsi
callq 0xa7c0
movl $0x0, (%rax)
leaq -0x68(%rbp), %rdi
callq 0xa930
jmp 0x29f6f
jmp 0x2a03e
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)