// File: ksabry[P]bfbrute/src/ProgramIterator.h
// Function: ProgramIterator<400ul, 32ul, 12ul, 32ul>::Serialize(std::ostream&)
void Serialize(std::ostream& output)
	{
		serializeLock.lock();

		output << programSize << " " << threadOffset << " " << threadDelta << "\n";
		output << currentCount << "\n";
		output << iteratorCount << "\n";
		for (uint_fast32_t i = 0; i < iteratorCount; i++)
		{
			output << iteratorSizes[i] << " ";
		}
		output << "\n";
		for (uint_fast32_t i = 0; i < iteratorCount; i++)
		{
			output << " ";
			iterators[i].Serialize(output);
			output << "\n";
		}
		output << "\n";
		for (uint_fast32_t i = 0; i < iteratorCount - 1; i++)
		{
			output << " " << (brackets[i].bracket == Bracket::EMPTY ? 0 : brackets[i].bracket == Bracket::LEFT ? 1 : 2) << " " << brackets[i].depth << "\n";
		}
		output << "\n";
		for (uint_fast32_t i = 0; i < iteratorCount - 1; i++)
		{
			output << " " << jumps[i].zero << " " << jumps[i].nonzero << "\n";
		}
		output << "\n";
		output << iteratorIdx << " " << bracketIdx << " " << remainingSize << "\n";
		output << firstIteratorWithNonZeroDataDelta << " " << lastExecutionSuccessful << " " << lastExecutionMaxProgramIdx << "\n";

		serializeLock.unlock();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
addq $0x4248, %rdi           # imm = 0x4248
callq 0xc060
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rdi
movq 0x18(%rax), %rsi
callq 0x3060
movq %rax, %rdi
leaq 0x2697(%rip), %rsi      # 0x131c6
callq 0x32a0
movq %rax, %rdi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3060
movq %rax, %rdi
leaq 0x2678(%rip), %rsi      # 0x131c6
callq 0x32a0
movq %rax, %rdi
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x3060
movq %rax, %rdi
leaq 0x2caf(%rip), %rsi      # 0x1381c
callq 0x32a0
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rdi
movq 0x4270(%rax), %rsi
callq 0x3060
movq %rax, %rdi
leaq 0x2c8c(%rip), %rsi      # 0x1381c
callq 0x32a0
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rdi
movq 0x20(%rax), %rsi
callq 0x3060
movq %rax, %rdi
leaq 0x2c6c(%rip), %rsi      # 0x1381c
callq 0x32a0
movq $0x0, -0x18(%rbp)
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
cmpq 0x20(%rcx), %rax
jae 0x10bfe
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq 0x28(%rax,%rcx,8), %rsi
callq 0x3510
movq %rax, %rdi
leaq 0x25db(%rip), %rsi      # 0x131c6
callq 0x32a0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x10bbd
movq -0x10(%rbp), %rdi
leaq 0x2c13(%rip), %rsi      # 0x1381c
callq 0x32a0
movq $0x0, -0x20(%rbp)
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
cmpq 0x20(%rcx), %rax
jae 0x10c71
movq -0x10(%rbp), %rdi
leaq 0x2597(%rip), %rsi      # 0x131c6
callq 0x32a0
movq -0x38(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
imulq $0x1e8, -0x20(%rbp), %rax # imm = 0x1E8
addq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x10f10
movq -0x10(%rbp), %rdi
leaq 0x2bbe(%rip), %rsi      # 0x1381c
callq 0x32a0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x10c16
movq -0x10(%rbp), %rdi
leaq 0x2ba0(%rip), %rsi      # 0x1381c
callq 0x32a0
movq $0x0, -0x28(%rbp)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq 0x20(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x10d60
movq -0x10(%rbp), %rdi
leaq 0x2519(%rip), %rsi      # 0x131c6
callq 0x32a0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x40(%rbp)
addq $0x3e30, %rax           # imm = 0x3E30
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x10cda
xorl %eax, %eax
movl %eax, -0x44(%rbp)
jmp 0x10d04
movq -0x38(%rbp), %rax
addq $0x3e30, %rax           # imm = 0x3E30
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %edx
movl $0x2, %eax
movl $0x1, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
movl %eax, -0x44(%rbp)
movq -0x40(%rbp), %rdi
movl -0x44(%rbp), %esi
callq 0x34c0
movq %rax, %rdi
leaq 0x24ac(%rip), %rsi      # 0x131c6
callq 0x32a0
movq %rax, %rdi
movq -0x38(%rbp), %rax
addq $0x3e30, %rax           # imm = 0x3E30
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
callq 0x3060
movq %rax, %rdi
leaq 0x2ad2(%rip), %rsi      # 0x1381c
callq 0x32a0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x10c89
movq -0x10(%rbp), %rdi
leaq 0x2ab1(%rip), %rsi      # 0x1381c
callq 0x32a0
movq $0x0, -0x30(%rbp)
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq 0x20(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x10e11
movq -0x10(%rbp), %rdi
leaq 0x242a(%rip), %rsi      # 0x131c6
callq 0x32a0
movq %rax, %rdi
movq -0x38(%rbp), %rax
addq $0x4030, %rax           # imm = 0x4030
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x3060
movq %rax, %rdi
leaq 0x23fb(%rip), %rsi      # 0x131c6
callq 0x32a0
movq %rax, %rdi
movq -0x38(%rbp), %rax
addq $0x4030, %rax           # imm = 0x4030
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
callq 0x3060
movq %rax, %rdi
leaq 0x2a21(%rip), %rsi      # 0x1381c
callq 0x32a0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x10d78
movq -0x10(%rbp), %rdi
leaq 0x2a00(%rip), %rsi      # 0x1381c
callq 0x32a0
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rdi
movq 0x4238(%rax), %rsi
callq 0x3510
movq %rax, %rdi
leaq 0x2387(%rip), %rsi      # 0x131c6
callq 0x32a0
movq %rax, %rdi
movq -0x38(%rbp), %rax
movq 0x4230(%rax), %rsi
callq 0x3510
movq %rax, %rdi
leaq 0x2365(%rip), %rsi      # 0x131c6
callq 0x32a0
movq %rax, %rdi
movq -0x38(%rbp), %rax
movq 0x3e28(%rax), %rsi
callq 0x3510
movq %rax, %rdi
leaq 0x2999(%rip), %rsi      # 0x1381c
callq 0x32a0
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rdi
movq 0x4240(%rax), %rsi
callq 0x3510
movq %rax, %rdi
leaq 0x2320(%rip), %rsi      # 0x131c6
callq 0x32a0
movq %rax, %rdi
movq -0x38(%rbp), %rax
movb 0x4468(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x34f0
movq %rax, %rdi
leaq 0x22fa(%rip), %rsi      # 0x131c6
callq 0x32a0
movq %rax, %rdi
movq -0x38(%rbp), %rax
movq 0x4470(%rax), %rsi
callq 0x3060
movq %rax, %rdi
leaq 0x292e(%rip), %rsi      # 0x1381c
callq 0x32a0
movq -0x38(%rbp), %rdi
addq $0x4248, %rdi           # imm = 0x4248
callq 0xc7f0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)