// File: auton1[P]viterbi/entry.cpp
// Function: entry::make_typed_int_vector(std::vector<char, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
void entry::make_typed_int_vector(vector<char> &out, const string &in, int number )
{
	vector<char> tmp_char;
	vector<int> tmp_ints;
	vector<string> split_string;
	int converted, type;
	int8_t size_type;
	unsigned int max = 0;
	unsigned int max_val = 0;
	out.resize(0);

	if (in == " " or in == "." or in == "")
	{
		size_type = (int8_t)0;
		size_type = size_type << 4;
		size_type = size_type | (int8_t)1;

		out.push_back( size_type );
		return;
	}

	header::tokenize(in, ',', split_string);
	if (number == -1)
	{
		if (split_string.size() > max_val)
			max_val = split_string.size();
	}
	else
		max_val = number;

	for (unsigned int ui=0; ui<max_val; ui++)
	{
		if ( ui<split_string.size() )
		{
			converted = header::str2int(split_string[ui], 0x80000000);

			if ((abs(converted) > (int)max) and ( converted != (int)0x80000000))
				max = abs(converted);
		}
		else
			converted = 0x80000001;

		tmp_ints.push_back( converted );
	}

	if (max < 127)
		type = 1;
	else if (max < 32767)
		type = 2;
	else
		type = 3;

	if (max_val < 15)
	{
		size_type = (int8_t)max_val;
		size_type = size_type << 4;
		size_type = size_type | (int8_t)type;

		out.push_back( size_type );
	}
	else
	{
		size_type = (int8_t)15;
		size_type = size_type << 4;
		size_type = size_type | (int8_t)type;

		out.push_back( size_type );

		make_typed_int(tmp_char, max_val, true);
		out.insert( out.end(), tmp_char.begin(), tmp_char.begin() );
	}

	for (unsigned int ui=0; ui<tmp_ints.size(); ui++)
	{
		make_int(tmp_char, tmp_ints[ui], type);
		out.insert( out.end(), tmp_char.begin(), tmp_char.end() );
	}
}

// Assembly:
subq $0x158, %rsp            # imm = 0x158
movq %rdi, 0x150(%rsp)
movq %rsi, 0x148(%rsp)
movq %rdx, 0x140(%rsp)
movl %ecx, 0x13c(%rsp)
movq 0x150(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x120(%rsp), %rdi
callq 0x2a300
leaq 0x108(%rsp), %rdi
callq 0xea00
leaq 0xf0(%rsp), %rdi
callq 0x10260
movl $0x0, 0xe0(%rsp)
movl $0x0, 0xdc(%rsp)
movq 0x148(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x20910
jmp 0x46ae3
movq 0x140(%rsp), %rdi
leaq 0x2d5b2(%rip), %rsi     # 0x740a4
callq 0xea20
movb %al, 0x57(%rsp)
jmp 0x46afd
movb 0x57(%rsp), %al
testb $0x1, %al
jne 0x46b52
jmp 0x46b07
movq 0x140(%rsp), %rdi
leaq 0x2e5c8(%rip), %rsi     # 0x750de
callq 0xea20
movb %al, 0x56(%rsp)
jmp 0x46b21
movb 0x56(%rsp), %al
testb $0x1, %al
jne 0x46b52
jmp 0x46b2b
movq 0x140(%rsp), %rdi
leaq 0x2f1ef(%rip), %rsi     # 0x75d29
callq 0xea20
movb %al, 0x55(%rsp)
jmp 0x46b45
movb 0x55(%rsp), %al
testb $0x1, %al
jne 0x46b52
jmp 0x46bf0
movb $0x0, 0xe7(%rsp)
movb 0xe7(%rsp), %al
shlb $0x4, %al
movb %al, 0xe7(%rsp)
movb 0xe7(%rsp), %al
orb $0x1, %al
movb %al, 0xe7(%rsp)
movq 0x148(%rsp), %rdi
movb 0xe7(%rsp), %al
movb %al, 0xcb(%rsp)
leaq 0xcb(%rsp), %rsi
callq 0x49620
jmp 0x46ba0
movl $0x1, 0xc4(%rsp)
jmp 0x47006
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x10cc0
leaq 0x108(%rsp), %rdi
callq 0xed70
leaq 0x120(%rsp), %rdi
callq 0x267c0
jmp 0x47035
movq 0x140(%rsp), %rdi
movl $0x2c, %esi
leaq 0xf0(%rsp), %rdx
callq 0x2fa70
jmp 0x46c0c
cmpl $-0x1, 0x13c(%rsp)
jne 0x46c45
leaq 0xf0(%rsp), %rdi
callq 0x10270
movl 0xdc(%rsp), %ecx
cmpq %rcx, %rax
jbe 0x46c43
leaq 0xf0(%rsp), %rdi
callq 0x10270
movl %eax, 0xdc(%rsp)
jmp 0x46c53
movl 0x13c(%rsp), %eax
movl %eax, 0xdc(%rsp)
movl $0x0, 0xc0(%rsp)
movl 0xc0(%rsp), %eax
cmpl 0xdc(%rsp), %eax
jae 0x46d41
movl 0xc0(%rsp), %eax
movq %rax, 0x48(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x10270
movq %rax, %rcx
movq 0x48(%rsp), %rax
cmpq %rcx, %rax
jae 0x46d07
movl 0xc0(%rsp), %eax
movl %eax, %esi
leaq 0xf0(%rsp), %rdi
callq 0x10290
movq %rax, %rdi
movl $0x80000000, %esi       # imm = 0x80000000
callq 0x2fb70
movl %eax, 0x44(%rsp)
jmp 0x46cc1
movl 0x44(%rsp), %eax
movl %eax, 0xec(%rsp)
movl 0xec(%rsp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl 0xe0(%rsp), %eax
jle 0x46d05
cmpl $0x80000000, 0xec(%rsp) # imm = 0x80000000
je 0x46d05
movl 0xec(%rsp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, 0xe0(%rsp)
jmp 0x46d12
movl $0x80000001, 0xec(%rsp) # imm = 0x80000001
leaq 0x108(%rsp), %rdi
leaq 0xec(%rsp), %rsi
callq 0xea50
jmp 0x46d29
jmp 0x46d2b
movl 0xc0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc0(%rsp)
jmp 0x46c5e
cmpl $0x7f, 0xe0(%rsp)
jae 0x46d58
movl $0x1, 0xe8(%rsp)
jmp 0x46d7f
cmpl $0x7fff, 0xe0(%rsp) # imm = 0x7FFF
jae 0x46d72
movl $0x2, 0xe8(%rsp)
jmp 0x46d7d
movl $0x3, 0xe8(%rsp)
jmp 0x46d7f
cmpl $0xf, 0xdc(%rsp)
jae 0x46dea
movb 0xdc(%rsp), %al
movb %al, 0xe7(%rsp)
movb 0xe7(%rsp), %al
shlb $0x4, %al
movb %al, 0xe7(%rsp)
movzbl 0xe7(%rsp), %eax
movl 0xe8(%rsp), %ecx
orl %ecx, %eax
movb %al, 0xe7(%rsp)
movq 0x148(%rsp), %rdi
movb 0xe7(%rsp), %al
movb %al, 0xbf(%rsp)
leaq 0xbf(%rsp), %rsi
callq 0x49620
jmp 0x46de5
jmp 0x46f00
movb $0xf, 0xe7(%rsp)
movb 0xe7(%rsp), %al
shlb $0x4, %al
movb %al, 0xe7(%rsp)
movzbl 0xe7(%rsp), %eax
movl 0xe8(%rsp), %ecx
orl %ecx, %eax
movb %al, 0xe7(%rsp)
movq 0x148(%rsp), %rdi
movb 0xe7(%rsp), %al
movb %al, 0xbe(%rsp)
leaq 0xbe(%rsp), %rsi
callq 0x49620
jmp 0x46e40
movq 0x58(%rsp), %rdi
movl 0xdc(%rsp), %eax
movl %eax, 0xb8(%rsp)
leaq 0x120(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
movl $0x1, %ecx
callq 0x45d20
jmp 0x46e6f
movq 0x148(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x27020
movq %rax, 0xa8(%rsp)
leaq 0xb0(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x39b20
leaq 0x120(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x26ff0
movq 0x28(%rsp), %rdi
movq %rax, 0xa0(%rsp)
callq 0x26ff0
movq 0x30(%rsp), %rdi
movq %rax, 0x98(%rsp)
movq 0xb0(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x98(%rsp), %rcx
callq 0x39a60
movq %rax, 0x38(%rsp)
jmp 0x46ef3
movq 0x38(%rsp), %rax
movq %rax, 0x90(%rsp)
movl $0x0, 0x8c(%rsp)
movl 0x8c(%rsp), %eax
movq %rax, 0x20(%rsp)
leaq 0x108(%rsp), %rdi
callq 0x10be0
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jae 0x46ffb
movl 0x8c(%rsp), %eax
movl %eax, %esi
leaq 0x108(%rsp), %rdi
callq 0xecf0
movq 0x58(%rsp), %rdi
movq %rax, %rdx
movl 0xe8(%rsp), %ecx
leaq 0x120(%rsp), %rsi
callq 0x45ee0
jmp 0x46f69
movq 0x148(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x27020
movq %rax, 0x78(%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x39b20
leaq 0x120(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x26ff0
movq 0x8(%rsp), %rdi
movq %rax, 0x70(%rsp)
callq 0x27020
movq 0x10(%rsp), %rdi
movq %rax, 0x68(%rsp)
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x68(%rsp), %rcx
callq 0x39a60
movq %rax, 0x18(%rsp)
jmp 0x46fdb
movq 0x18(%rsp), %rax
movq %rax, 0x60(%rsp)
movl 0x8c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8c(%rsp)
jmp 0x46f0b
movl $0x0, 0xc4(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x10cc0
leaq 0x108(%rsp), %rdi
callq 0xed70
leaq 0x120(%rsp), %rdi
callq 0x267c0
addq $0x158, %rsp            # imm = 0x158
retq
movq 0xd0(%rsp), %rdi
callq 0x69e0
nopw %cs:(%rax,%rax)