// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %ecx, %r14d
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
andq $0x0, 0x60(%rsp)
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq %rsi, %rdi
xorl %esi, %esi
callq 0xcc7c
leaq 0x1288d(%rip), %rsi     # 0x2d0c4
movq %r12, %rdi
callq 0x96f3
testb %al, %al
jne 0x1a869
leaq 0x138e3(%rip), %rsi     # 0x2e12d
movq %r12, %rdi
callq 0x96f3
testb %al, %al
jne 0x1a869
leaq 0x145da(%rip), %rsi     # 0x2ee37
movq %r12, %rdi
callq 0x96f3
testb %al, %al
je 0x1a8a6
leaq 0x8(%rsp), %rsi
movb $0x1, (%rsi)
movq %rbx, %rdi
callq 0x1ba5c
leaq 0x10(%rsp), %rdi
callq 0x9f1c
leaq 0x50(%rsp), %rdi
callq 0xa18e
leaq 0x30(%rsp), %rdi
callq 0xe88a
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x2c
popq %rsi
leaq 0x10(%rsp), %rdx
movq %r12, %rdi
callq 0x126cc
movq %r15, 0x68(%rsp)
cmpl $-0x1, %r14d
jne 0x1a8de
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rax, %r14
subq %rcx, %r14
shrq $0x5, %r14
xorl %edx, %edx
cmpq %rcx, %rax
cmovel %edx, %r14d
movq %r14, 0x70(%rsp)
movl %r14d, %ebp
xorl %r15d, %r15d
leaq 0xc(%rsp), %r13
xorl %r12d, %r12d
xorl %r14d, %r14d
cmpq %r12, %rbp
je 0x1a956
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x1a938
addq %r15, %rdi
movl $0x80000000, %esi       # imm = 0x80000000
callq 0x12782
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpl %r14d, %ecx
cmovlel %r14d, %ecx
movl %eax, %edx
negl %edx
movl %eax, 0xc(%rsp)
cmovnol %ecx, %r14d
jmp 0x1a940
movl $0x80000001, 0xc(%rsp)  # imm = 0x80000001
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x9700
incq %r12
addq $0x20, %r15
jmp 0x1a8f4
cmpl $0x7fff, %r14d          # imm = 0x7FFF
pushq $0x3
popq %rax
sbbl $0x0, %eax
cmpl $0x7f, %r14d
pushq $0x1
popq %rbp
cmovael %eax, %ebp
movq 0x70(%rsp), %r14
cmpl $0xf, %r14d
jae 0x1a991
shll $0x4, %r14d
orl %ebp, %r14d
leaq 0x8(%rsp), %rsi
movb %r14b, (%rsi)
movq %rbx, %rdi
callq 0x1ba5c
jmp 0x1a9d2
movl %ebp, %eax
orb $-0x10, %al
leaq 0x8(%rsp), %rsi
movb %al, (%rsi)
movq %rbx, %rdi
callq 0x1ba5c
leaq 0x8(%rsp), %rdx
movl %r14d, (%rdx)
leaq 0x30(%rsp), %rsi
pushq $0x1
popq %rcx
movq 0x68(%rsp), %rdi
callq 0x1a272
movq 0x8(%rbx), %rsi
movq 0x30(%rsp), %rcx
movq %rbx, %rdi
movq %rcx, %rdx
callq 0x163d4
xorl %r15d, %r15d
leaq 0x30(%rsp), %r14
movl %r15d, %r15d
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r15, %rcx
jbe 0x1a879
leaq (%rax,%r15,4), %rdx
movq %r14, %rsi
movl %ebp, %ecx
callq 0x1a330
movq 0x8(%rbx), %rsi
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rcx
movq %rbx, %rdi
callq 0x163d4
incl %r15d
jmp 0x1a9da
jmp 0x1aa30
jmp 0x1aa30
jmp 0x1aa30
jmp 0x1aa30
jmp 0x1aa30
jmp 0x1aa30
jmp 0x1aa30
jmp 0x1aa30
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x9f1c
leaq 0x50(%rsp), %rdi
callq 0xa18e
leaq 0x30(%rsp), %rdi
callq 0xe88a
movq %rbx, %rdi
callq 0x5800
nop