// File: ksabry[P]bfbrute/src/DataCache.h
// Function: DataCache<32ul, 12ul>::AddData()
void AddData()
	{
		auto lookup = LookupData<data_size>(currentDataIdx, currentData);
		if (dataSet.count(lookup) > 0)
			return;
		dataSet.insert(lookup);

		bool balanced = currentDataIdx == 0;
		std::vector<AlignedData<data_size>>& data = balanced ? dataBalanced : dataUnbalanced;
		std::vector<char>& programs = balanced ? programsBalanced : programsUnbalanced;
		uint_fast32_t& dataCount = balanced ? dataBalancedCount : dataUnbalancedCount;

		data.resize(dataCount + 1);
		programs.resize((dataCount + 1) * max_cache_size + 1);
		
		memcpy(&data[dataCount].data, currentData, data_size);
		data[dataCount].idx = currentDataIdx;
		data[dataCount].start = currentDataStart;
		data[dataCount].end = currentDataEnd;
		
		memcpy(&programs[dataCount * max_cache_size], currentProgram, currentProgramSize);
		programs[dataCount * max_cache_size + currentProgramSize] = '\0';

		dataCount++;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdx
movq %rdx, -0x68(%rbp)
movq 0x1c0(%rdx), %rsi
addq $0x1a0, %rdx            # imm = 0x1A0
leaq -0x30(%rbp), %rdi
callq 0x7a30
movq -0x68(%rbp), %rdi
addq $0x168, %rdi            # imm = 0x168
leaq -0x30(%rbp), %rsi
callq 0x7a70
cmpq $0x0, %rax
jbe 0x781d
jmp 0x7a1d
movq -0x68(%rbp), %rdi
addq $0x168, %rdi            # imm = 0x168
leaq -0x30(%rbp), %rsi
callq 0x7aa0
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x40(%rbp)
movb %dl, -0x38(%rbp)
cmpq $0x0, 0x1c0(%rax)
sete %al
andb $0x1, %al
movb %al, -0x41(%rbp)
testb $0x1, -0x41(%rbp)
je 0x7863
movq -0x68(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x70(%rbp)
jmp 0x786f
movq -0x68(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x50(%rbp)
testb $0x1, -0x41(%rbp)
je 0x788b
movq -0x68(%rbp), %rax
addq $0x58, %rax
movq %rax, -0x78(%rbp)
jmp 0x7897
movq -0x68(%rbp), %rax
addq $0x70, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x58(%rbp)
testb $0x1, -0x41(%rbp)
je 0x78b3
movq -0x68(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x80(%rbp)
jmp 0x78bf
movq -0x68(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rdi
movq -0x60(%rbp), %rax
movq (%rax), %rsi
addq $0x1, %rsi
callq 0x7ae0
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
imulq $0xc, %rax, %rsi
addq $0x1, %rsi
callq 0x7b70
movq -0x50(%rbp), %rdi
movq -0x60(%rbp), %rax
movq (%rax), %rsi
callq 0x7c00
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq 0x1a0(%rax), %rdx
movq %rdx, (%rcx)
movq 0x1a8(%rax), %rdx
movq %rdx, 0x8(%rcx)
movq 0x1b0(%rax), %rdx
movq %rdx, 0x10(%rcx)
movq 0x1b8(%rax), %rdx
movq %rdx, 0x18(%rcx)
movq 0x1c0(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x50(%rbp), %rdi
movq -0x60(%rbp), %rax
movq (%rax), %rsi
callq 0x7c00
movq -0x98(%rbp), %rdx
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rdx, 0x20(%rcx)
movq 0x1c8(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x50(%rbp), %rdi
movq -0x60(%rbp), %rax
movq (%rax), %rsi
callq 0x7c00
movq -0x90(%rbp), %rdx
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rdx, 0x28(%rcx)
movq 0x1d0(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x50(%rbp), %rdi
movq -0x60(%rbp), %rax
movq (%rax), %rsi
callq 0x7c00
movq -0x88(%rbp), %rcx
movq %rcx, 0x30(%rax)
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rax
imulq $0xc, (%rax), %rsi
callq 0x7c20
movq %rax, %rdi
movq -0x68(%rbp), %rax
movq %rax, %rsi
addq $0x1d8, %rsi            # imm = 0x1D8
movq 0x1e8(%rax), %rdx
callq 0x3200
movq -0x68(%rbp), %rax
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rcx
imulq $0xc, (%rcx), %rsi
addq 0x1e8(%rax), %rsi
callq 0x7c20
movb $0x0, (%rax)
movq -0x60(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)