// File: ksabry[P]bfbrute/src/ProgramIterator.h
// Function: ProgramIterator<400ul, 32ul, 12ul, 32ul>::Deserialize(std::istream&)
bool Deserialize(std::istream& input)
	{
		serializeLock.lock();

		input >> programSize >> threadOffset >> threadDelta;
		input >> currentCount;
		input >> iteratorCount;
		for (uint_fast32_t i = 0; i < iteratorCount; i++)
		{
			input >> iteratorSizes[i];
		}
		for (uint_fast32_t i = 0; i < iteratorCount; i++)
		{
			if (!iterators[i].Deserialize(input))
			{
				serializeLock.unlock();
				return false;
			}
		}
		for (uint_fast32_t i = 0; i < iteratorCount - 1; i++)
		{
			int bracketInt;
			input >> bracketInt >> brackets[i].depth;
			brackets[i].bracket = bracketInt == 0 ? Bracket::EMPTY : bracketInt == 1 ? Bracket::LEFT : Bracket::RIGHT;
		}
		for (uint_fast32_t i = 0; i < iteratorCount - 1; i++)
		{
			input >> jumps[i].zero >> jumps[i].nonzero;
		}
		input >> iteratorIdx >> bracketIdx >> remainingSize;
		input >> firstIteratorWithNonZeroDataDelta >> lastExecutionSuccessful >> lastExecutionMaxProgramIdx;

		serializeLock.unlock();
		return true;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x48(%rbp)
addq $0x4248, %rdi           # imm = 0x4248
callq 0xc060
movq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rdi
addq $0x18, %rsi
callq 0x33b0
movq -0x48(%rbp), %rsi
movq %rax, %rdi
addq $0x8, %rsi
callq 0x33b0
movq -0x48(%rbp), %rsi
movq %rax, %rdi
addq $0x10, %rsi
callq 0x33b0
movq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rdi
addq $0x4270, %rsi           # imm = 0x4270
callq 0x33b0
movq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rdi
addq $0x20, %rsi
callq 0x33b0
movq $0x0, -0x20(%rbp)
movq -0x48(%rbp), %rcx
movq -0x20(%rbp), %rax
cmpq 0x20(%rcx), %rax
jae 0xc93a
movq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rdi
addq $0x28, %rsi
movq -0x20(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x3140
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xc902
movq $0x0, -0x28(%rbp)
movq -0x48(%rbp), %rcx
movq -0x28(%rbp), %rax
cmpq 0x20(%rcx), %rax
jae 0xc99c
movq -0x48(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
imulq $0x1e8, -0x28(%rbp), %rax # imm = 0x1E8
addq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0xd280
testb $0x1, %al
jne 0xc98c
movq -0x48(%rbp), %rdi
addq $0x4248, %rdi           # imm = 0x4248
callq 0xc7f0
movb $0x0, -0x1(%rbp)
jmp 0xcb2a
jmp 0xc98e
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xc942
movq $0x0, -0x30(%rbp)
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
movq 0x20(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0xca36
movq -0x18(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x3150
movq -0x48(%rbp), %rsi
movq %rax, %rdi
addq $0x3e30, %rsi           # imm = 0x3E30
movq -0x30(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
addq $0x8, %rsi
callq 0x33b0
cmpl $0x0, -0x34(%rbp)
jne 0xc9f5
xorl %eax, %eax
movl %eax, -0x4c(%rbp)
jmp 0xca0b
movl -0x34(%rbp), %edx
movl $0x2, %eax
movl $0x1, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rax
movl -0x4c(%rbp), %ecx
addq $0x3e30, %rax           # imm = 0x3E30
movq -0x30(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xc9a4
movq $0x0, -0x40(%rbp)
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %rax
movq 0x20(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0xcaa2
movq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rdi
addq $0x4030, %rsi           # imm = 0x4030
movq -0x40(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x33b0
movq -0x48(%rbp), %rsi
movq %rax, %rdi
addq $0x4030, %rsi           # imm = 0x4030
movq -0x40(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
addq $0x8, %rsi
callq 0x33b0
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0xca3e
movq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rdi
addq $0x4238, %rsi           # imm = 0x4238
callq 0x3140
movq -0x48(%rbp), %rsi
movq %rax, %rdi
addq $0x4230, %rsi           # imm = 0x4230
callq 0x3140
movq -0x48(%rbp), %rsi
movq %rax, %rdi
addq $0x3e28, %rsi           # imm = 0x3E28
callq 0x3140
movq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rdi
addq $0x4240, %rsi           # imm = 0x4240
callq 0x3140
movq -0x48(%rbp), %rsi
movq %rax, %rdi
addq $0x4468, %rsi           # imm = 0x4468
callq 0x3230
movq -0x48(%rbp), %rsi
movq %rax, %rdi
addq $0x4470, %rsi           # imm = 0x4470
callq 0x33b0
movq -0x48(%rbp), %rdi
addq $0x4248, %rdi           # imm = 0x4248
callq 0xc7f0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop