// File: auton1[P]viterbi/entry.cpp
// Function: entry::get_int_vector(unsigned int*, std::vector<char, std::allocator<char>> const&)
vector<int> entry::get_int_vector(unsigned int * line_position, const vector<char>& line)
{
	unsigned int size, type;
	get_type( line_position, line, type, size );
	vector<int> out(size);
	if (type == 1)
	{
		int8_t tmp;
		for (unsigned int ui=0; ui<size; ui++)
		{
			tmp = *reinterpret_cast<const int8_t*>(&line[*line_position]);
			*line_position += sizeof(tmp);
			out[ui] = tmp;
		}
	}
	else if (type == 2)
	{
		int16_t tmp;
		for (unsigned int ui=0; ui<size; ui++)
		{
			tmp = *reinterpret_cast<const int16_t*>(&line[*line_position]);
			*line_position += sizeof(tmp);
			out[ui] = tmp;
		}
	}
	else if (type == 3)
	{
		int32_t tmp;
		for (unsigned int ui=0; ui<size; ui++)
		{
			tmp = *reinterpret_cast<const int32_t*>(&line[*line_position]);
			*line_position += sizeof(tmp);
			out[ui] = tmp;
		}
	}
	else
	{
		LOG.printLOG("Error: Invalid type for integer size.\n");
		exit(0);
	}
	return out;
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0x20(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rcx, 0x98(%rsp)
movq 0xa8(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0x98(%rsp), %rdx
leaq 0x90(%rsp), %rcx
leaq 0x94(%rsp), %r8
callq 0x489f0
movb $0x0, 0x8f(%rsp)
movl 0x94(%rsp), %eax
movq %rax, 0x28(%rsp)
leaq 0x8e(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xf3c0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0xf3d0
jmp 0x48f0d
leaq 0x8e(%rsp), %rdi
callq 0xf450
cmpl $0x1, 0x90(%rsp)
jne 0x48fc0
movl $0x0, 0x74(%rsp)
movl 0x74(%rsp), %eax
cmpl 0x94(%rsp), %eax
jae 0x48fbb
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x49920
movq 0x20(%rsp), %rdi
movb (%rax), %al
movb %al, 0x7b(%rsp)
movq 0xa0(%rsp), %rax
movl (%rax), %ecx
addq $0x1, %rcx
movl %ecx, (%rax)
movsbl 0x7b(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x74(%rsp), %eax
movl %eax, %esi
callq 0xecf0
movl 0x14(%rsp), %ecx
movl %ecx, (%rax)
movl 0x74(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x74(%rsp)
jmp 0x48f30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
leaq 0x8e(%rsp), %rdi
callq 0xf450
jmp 0x49183
jmp 0x4915a
cmpl $0x2, 0x90(%rsp)
jne 0x49041
movl $0x0, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
cmpl 0x94(%rsp), %eax
jae 0x4903c
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x49920
movq 0x20(%rsp), %rdi
movw (%rax), %ax
movw %ax, 0x72(%rsp)
movq 0xa0(%rsp), %rax
movl (%rax), %ecx
addq $0x2, %rcx
movl %ecx, (%rax)
movswl 0x72(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x6c(%rsp), %eax
movl %eax, %esi
callq 0xecf0
movl 0x10(%rsp), %ecx
movl %ecx, (%rax)
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x48fd2
jmp 0x49158
cmpl $0x3, 0x90(%rsp)
jne 0x490bf
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
cmpl 0x94(%rsp), %eax
jae 0x490ba
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x49920
movq 0x20(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0x68(%rsp)
movq 0xa0(%rsp), %rax
movl (%rax), %ecx
addq $0x4, %rcx
movl %ecx, (%rax)
movl 0x68(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x64(%rsp), %eax
movl %eax, %esi
callq 0xecf0
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
jmp 0x49053
jmp 0x49156
leaq 0x3f(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x69f0
movq (%rsp), %rdx
leaq 0x2c19e(%rip), %rsi     # 0x75276
leaq 0x40(%rsp), %rdi
callq 0x67c0
jmp 0x490e4
leaq 0x4a515(%rip), %rdi     # 0x93600
leaq 0x40(%rsp), %rsi
callq 0x71280
jmp 0x490f7
leaq 0x40(%rsp), %rdi
callq 0x6b50
leaq 0x3f(%rsp), %rdi
callq 0x65f0
xorl %edi, %edi
callq 0x66b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0x49140
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x6b50
leaq 0x3f(%rsp), %rdi
callq 0x65f0
movq 0x20(%rsp), %rdi
callq 0xed70
jmp 0x49183
jmp 0x49158
jmp 0x4915a
movb $0x1, 0x8f(%rsp)
testb $0x1, 0x8f(%rsp)
jne 0x49176
movq 0x20(%rsp), %rdi
callq 0xed70
movq 0x18(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x80(%rsp), %rdi
callq 0x69e0