// File: ksabry[P]bfbrute/src/ProgramSearch.h
// Function: ProgramSearch<ProgramIterator<400ul, 32ul, 12ul, 32ul>, DataCache<32ul, 12ul>>::ProgramSearch(std::vector<char const*, std::allocator<char const*>>, std::vector<unsigned long, std::allocator<unsigned long>>, std::vector<char const*, std::allocator<char const*>>, std::vector<unsigned long, std::allocator<unsigned long>>)
ProgramSearch(
		std::vector<const char*> inputs,
		std::vector<uint_fast32_t> input_sizes,
		std::vector<const char*> outputs,
		std::vector<uint_fast32_t> output_sizes)
		: inputs(inputs), input_sizes(input_sizes), outputs(outputs), output_sizes(output_sizes), count(0), sizeCount(0), programResult(""), printProgress(true)
	{
		for (uint_fast32_t i = 0; i < THREAD_COUNT; i++)
		{
			threads[i] = nullptr;
		}
		cache.Create();
		Setup();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rsi, -0x78(%rbp)
movq %rdx, -0x70(%rbp)
movq %rcx, -0x68(%rbp)
movq %r8, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x50(%rbp)
movb $0x1, (%rdi)
addq $0x8, %rdi
movq %rdi, -0x58(%rbp)
callq 0x63a0
movq -0x50(%rbp), %rdi
addq $0x1f8, %rdi            # imm = 0x1F8
movq %rdi, -0x48(%rbp)
callq 0x128a0
jmp 0x564d
movq -0x50(%rbp), %rax
addq $0x401f8, %rax          # imm = 0x401F8
movq %rax, -0x90(%rbp)
movq %rax, %rcx
addq $0x45780, %rcx          # imm = 0x45780
movq %rcx, -0x88(%rbp)
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x6430
jmp 0x5685
movq -0x88(%rbp), %rcx
movq -0x98(%rbp), %rax
addq $0x4578, %rax           # imm = 0x4578
cmpq %rcx, %rax
movq %rax, -0x80(%rbp)
jne 0x5673
movq -0x50(%rbp), %rax
addq $0x859f8, %rax          # imm = 0x859F8
movq %rax, -0xa8(%rbp)
leaq -0x35(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x34e0
movq -0xa8(%rbp), %rdi
movq -0xa0(%rbp), %rdx
leaq 0xe145(%rip), %rsi      # 0x1381d
callq 0x3a90
jmp 0x56df
leaq -0x35(%rbp), %rdi
callq 0x32f0
movq -0x50(%rbp), %rdi
movb $0x0, 0x85a18(%rdi)
addq $0x85a30, %rdi          # imm = 0x85A30
callq 0x6540
jmp 0x5701
movq -0x78(%rbp), %rsi
movq -0x50(%rbp), %rdi
addq $0x85a38, %rdi          # imm = 0x85A38
movq %rdi, -0xb0(%rbp)
callq 0x4020
jmp 0x571e
movq -0x70(%rbp), %rsi
movq -0x50(%rbp), %rdi
addq $0x85a50, %rdi          # imm = 0x85A50
movq %rdi, -0xb8(%rbp)
callq 0x6570
jmp 0x573b
movq -0x68(%rbp), %rsi
movq -0x50(%rbp), %rdi
addq $0x85a68, %rdi          # imm = 0x85A68
movq %rdi, -0xc0(%rbp)
callq 0x4020
jmp 0x5758
movq -0x60(%rbp), %rsi
movq -0x50(%rbp), %rdi
addq $0x85a80, %rdi          # imm = 0x85A80
movq %rdi, -0xc8(%rbp)
callq 0x6570
jmp 0x5775
movq -0x50(%rbp), %rax
movq $0x0, 0x85a98(%rax)
movq $0x0, 0x85aa0(%rax)
movq $0x0, -0x40(%rbp)
cmpq $0x10, -0x40(%rbp)
jae 0x5887
movq -0x50(%rbp), %rax
movq -0x40(%rbp), %rcx
movq $0x0, 0x85978(%rax,%rcx,8)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x5797
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x5945
movq -0x90(%rbp), %rcx
movq %rax, %rsi
movq -0x98(%rbp), %rax
movq %rsi, -0x30(%rbp)
movl %edx, -0x34(%rbp)
cmpq %rax, %rcx
movq %rax, -0xd0(%rbp)
je 0x582d
movq -0xd0(%rbp), %rdi
addq $-0x4578, %rdi          # imm = 0xBA88
movq %rdi, -0xd8(%rbp)
callq 0x64f0
movq -0x90(%rbp), %rcx
movq -0xd8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0xd0(%rbp)
jne 0x57f9
jmp 0x593c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x35(%rbp), %rdi
callq 0x32f0
jmp 0x58f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x58e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x58da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x58ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x58c2
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
callq 0x6660
jmp 0x5896
movq -0x50(%rbp), %rdi
callq 0x6720
jmp 0x58a1
addq $0xf0, %rsp
popq %rbp
retq
movq -0xc8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x5960
movq -0xc0(%rbp), %rdi
callq 0x42b0
movq -0xb8(%rbp), %rdi
callq 0x5960
movq -0xb0(%rbp), %rdi
callq 0x42b0
movq -0xa8(%rbp), %rdi
callq 0x3160
movq -0x90(%rbp), %rax
addq $0x45780, %rax          # imm = 0x45780
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
addq $-0x4578, %rdi          # imm = 0xBA88
movq %rdi, -0xe8(%rbp)
callq 0x64f0
movq -0x90(%rbp), %rcx
movq -0xe8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0xe0(%rbp)
jne 0x5906
jmp 0x593c
movq -0x48(%rbp), %rdi
callq 0x12990
movq -0x58(%rbp), %rdi
callq 0x6830
movq -0x30(%rbp), %rdi
callq 0x34d0
nopw (%rax,%rax)