// File: auton1[P]viterbi/entry.cpp
// Function: entry::make_typed_int_vector(std::vector<char, std::allocator<char>>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, int)
void entry::make_typed_int_vector(vector<char> &out, const vector<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 (number == -1)
	{
		unsigned int tmp_int = 0;
		for (unsigned int ui=0; ui<in.size(); ui++)
		{
			tmp_int = count(in[ui].begin(), in[ui].end(), ',');

			if (tmp_int > max_val)
				max_val = tmp_int;
		}
		max_val++;
	}
	else
		max_val = number;

	for (unsigned int ui=0; ui<in.size(); ui++)
	{
		header::tokenize(in[ui], ',', split_string);
		for (unsigned int uj=0; uj<max_val; uj++)
		{
			if ( uj<split_string.size() )
			{
				converted = header::str2int(split_string[uj], 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 $0x188, %rsp            # imm = 0x188
movq %rdi, 0x180(%rsp)
movq %rsi, 0x178(%rsp)
movq %rdx, 0x170(%rsp)
movl %ecx, 0x16c(%rsp)
movq 0x180(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x2a300
leaq 0x138(%rsp), %rdi
callq 0xea00
leaq 0x120(%rsp), %rdi
callq 0x10260
movl $0x0, 0x110(%rsp)
movl $0x0, 0x10c(%rsp)
movq 0x178(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x20910
jmp 0x470d3
cmpl $-0x1, 0x16c(%rsp)
jne 0x47230
movl $0x0, 0xf8(%rsp)
movl $0x0, 0xf4(%rsp)
movl 0xf4(%rsp), %eax
movq %rax, 0x60(%rsp)
movq 0x170(%rsp), %rdi
callq 0x10270
movq %rax, %rcx
movq 0x60(%rsp), %rax
cmpq %rcx, %rax
jae 0x4721d
movq 0x170(%rsp), %rdi
movl 0xf4(%rsp), %eax
movl %eax, %esi
callq 0x497f0
movq %rax, %rdi
callq 0x6500
movq %rax, 0xe8(%rsp)
movq 0x170(%rsp), %rdi
movl 0xf4(%rsp), %eax
movl %eax, %esi
callq 0x497f0
movq %rax, %rdi
callq 0x6aa0
movq %rax, 0xe0(%rsp)
movb $0x2c, 0xdf(%rsp)
movq 0xe8(%rsp), %rdi
movq 0xe0(%rsp), %rsi
leaq 0xdf(%rsp), %rdx
callq 0x498d0
movq %rax, 0x58(%rsp)
jmp 0x47199
movq 0x58(%rsp), %rax
movl %eax, 0xf8(%rsp)
movl 0xf8(%rsp), %eax
cmpl 0x10c(%rsp), %eax
jbe 0x47205
movl 0xf8(%rsp), %eax
movl %eax, 0x10c(%rsp)
jmp 0x47205
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0x120(%rsp), %rdi
callq 0x10cc0
leaq 0x138(%rsp), %rdi
callq 0xed70
leaq 0x150(%rsp), %rdi
callq 0x267c0
jmp 0x4769b
jmp 0x47207
movl 0xf4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf4(%rsp)
jmp 0x470f7
movl 0x10c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10c(%rsp)
jmp 0x4723e
movl 0x16c(%rsp), %eax
movl %eax, 0x10c(%rsp)
movl $0x0, 0xd8(%rsp)
movl 0xd8(%rsp), %eax
movq %rax, 0x50(%rsp)
movq 0x170(%rsp), %rdi
callq 0x10270
movq %rax, %rcx
movq 0x50(%rsp), %rax
cmpq %rcx, %rax
jae 0x473a6
movq 0x170(%rsp), %rdi
movl 0xd8(%rsp), %eax
movl %eax, %esi
callq 0x497f0
movq %rax, %rdi
movl $0x2c, %esi
leaq 0x120(%rsp), %rdx
callq 0x2fa70
jmp 0x472a0
movl $0x0, 0xd4(%rsp)
movl 0xd4(%rsp), %eax
cmpl 0x10c(%rsp), %eax
jae 0x4738e
movl 0xd4(%rsp), %eax
movq %rax, 0x48(%rsp)
leaq 0x120(%rsp), %rdi
callq 0x10270
movq %rax, %rcx
movq 0x48(%rsp), %rax
cmpq %rcx, %rax
jae 0x47354
movl 0xd4(%rsp), %eax
movl %eax, %esi
leaq 0x120(%rsp), %rdi
callq 0x10290
movq %rax, %rdi
movl $0x80000000, %esi       # imm = 0x80000000
callq 0x2fb70
movl %eax, 0x44(%rsp)
jmp 0x4730e
movl 0x44(%rsp), %eax
movl %eax, 0x11c(%rsp)
movl 0x11c(%rsp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl 0x110(%rsp), %eax
jle 0x47352
cmpl $0x80000000, 0x11c(%rsp) # imm = 0x80000000
je 0x47352
movl 0x11c(%rsp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, 0x110(%rsp)
jmp 0x4735f
movl $0x80000001, 0x11c(%rsp) # imm = 0x80000001
leaq 0x138(%rsp), %rdi
leaq 0x11c(%rsp), %rsi
callq 0xea50
jmp 0x47376
jmp 0x47378
movl 0xd4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xd4(%rsp)
jmp 0x472ab
jmp 0x47390
movl 0xd8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xd8(%rsp)
jmp 0x47249
cmpl $0x7f, 0x110(%rsp)
jae 0x473bd
movl $0x1, 0x118(%rsp)
jmp 0x473e4
cmpl $0x7fff, 0x110(%rsp) # imm = 0x7FFF
jae 0x473d7
movl $0x2, 0x118(%rsp)
jmp 0x473e2
movl $0x3, 0x118(%rsp)
jmp 0x473e4
cmpl $0xf, 0x10c(%rsp)
jae 0x4744f
movb 0x10c(%rsp), %al
movb %al, 0x117(%rsp)
movb 0x117(%rsp), %al
shlb $0x4, %al
movb %al, 0x117(%rsp)
movzbl 0x117(%rsp), %eax
movl 0x118(%rsp), %ecx
orl %ecx, %eax
movb %al, 0x117(%rsp)
movq 0x178(%rsp), %rdi
movb 0x117(%rsp), %al
movb %al, 0xd3(%rsp)
leaq 0xd3(%rsp), %rsi
callq 0x49620
jmp 0x4744a
jmp 0x47565
movb $0xf, 0x117(%rsp)
movb 0x117(%rsp), %al
shlb $0x4, %al
movb %al, 0x117(%rsp)
movzbl 0x117(%rsp), %eax
movl 0x118(%rsp), %ecx
orl %ecx, %eax
movb %al, 0x117(%rsp)
movq 0x178(%rsp), %rdi
movb 0x117(%rsp), %al
movb %al, 0xd2(%rsp)
leaq 0xd2(%rsp), %rsi
callq 0x49620
jmp 0x474a5
movq 0x68(%rsp), %rdi
movl 0x10c(%rsp), %eax
movl %eax, 0xcc(%rsp)
leaq 0x150(%rsp), %rsi
leaq 0xcc(%rsp), %rdx
movl $0x1, %ecx
callq 0x45d20
jmp 0x474d4
movq 0x178(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x27020
movq %rax, 0xb8(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x39b20
leaq 0x150(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x26ff0
movq 0x28(%rsp), %rdi
movq %rax, 0xb0(%rsp)
callq 0x26ff0
movq 0x30(%rsp), %rdi
movq %rax, 0xa8(%rsp)
movq 0xc0(%rsp), %rsi
movq 0xb0(%rsp), %rdx
movq 0xa8(%rsp), %rcx
callq 0x39a60
movq %rax, 0x38(%rsp)
jmp 0x47558
movq 0x38(%rsp), %rax
movq %rax, 0xa0(%rsp)
movl $0x0, 0x9c(%rsp)
movl 0x9c(%rsp), %eax
movq %rax, 0x20(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x10be0
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jae 0x4766c
movl 0x9c(%rsp), %eax
movl %eax, %esi
leaq 0x138(%rsp), %rdi
callq 0xecf0
movq 0x68(%rsp), %rdi
movq %rax, %rdx
movl 0x118(%rsp), %ecx
leaq 0x150(%rsp), %rsi
callq 0x45ee0
jmp 0x475ce
movq 0x178(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x27020
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x39b20
leaq 0x150(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x26ff0
movq 0x8(%rsp), %rdi
movq %rax, 0x80(%rsp)
callq 0x27020
movq 0x10(%rsp), %rdi
movq %rax, 0x78(%rsp)
movq 0x90(%rsp), %rsi
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rcx
callq 0x39a60
movq %rax, 0x18(%rsp)
jmp 0x4764c
movq 0x18(%rsp), %rax
movq %rax, 0x70(%rsp)
movl 0x9c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x9c(%rsp)
jmp 0x47570
leaq 0x120(%rsp), %rdi
callq 0x10cc0
leaq 0x138(%rsp), %rdi
callq 0xed70
leaq 0x150(%rsp), %rdi
callq 0x267c0
addq $0x188, %rsp            # imm = 0x188
retq
movq 0x100(%rsp), %rdi
callq 0x69e0
nopl (%rax,%rax)