// File: /workspace/github_cpp_makefile_star2_O3/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, 0x50(%rsp)
xorl %eax, %eax
movq %rax, 0x60(%rsp)
movq %rax, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq %rax, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movq %rsi, %rdi
xorl %esi, %esi
callq 0xf332
leaq 0x17db7(%rip), %rsi     # 0x3810f
movq %r12, %rdi
callq 0x50e0
testl %eax, %eax
je 0x20488
leaq 0x18e7e(%rip), %rsi     # 0x391ed
movq %r12, %rdi
callq 0x50e0
testl %eax, %eax
je 0x20488
leaq 0x19b51(%rip), %rsi     # 0x39ed7
movq %r12, %rdi
callq 0x50e0
testl %eax, %eax
je 0x20488
leaq 0x30(%rsp), %rdx
movq %r12, %rdi
movl $0x2c, %esi
callq 0x16a0a
cmpl $-0x1, %r14d
jne 0x203c5
movq 0x38(%rsp), %r14
movq 0x30(%rsp), %rax
subq %rax, %r14
je 0x204bf
shrq $0x5, %r14
testl %r14d, %r14d
je 0x204b5
movq %r15, 0x70(%rsp)
movl %r14d, %ebp
xorl %r15d, %r15d
leaq 0xc(%rsp), %r13
xorl %r12d, %r12d
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0x20427
movq %r15, %rax
shlq $0x5, %rax
addq %rax, %rdi
movl $0x80000000, %esi       # imm = 0x80000000
callq 0x16afa
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpl %r12d, %ecx
cmovlel %r12d, %ecx
movl %eax, %edx
negl %edx
movl %eax, 0xc(%rsp)
cmovnol %ecx, %r12d
jmp 0x20434
movl $0x80000001, 0xc(%rsp)  # imm = 0x80000001
movl $0x80000001, %eax       # imm = 0x80000001
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x2044d
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x2045a
leaq 0x10(%rsp), %rdi
movq %r13, %rdx
callq 0xca58
incq %r15
cmpq %rbp, %r15
jne 0x203e1
cmpl $0x7fff, %r12d          # imm = 0x7FFF
movl $0x3, %eax
sbbl $0x0, %eax
cmpl $0x7f, %r12d
movl $0x1, %ebp
cmovael %eax, %ebp
movq 0x70(%rsp), %r15
jmp 0x204c7
movb $0x1, 0x8(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x204a3
movb $0x1, (%rsi)
incq 0x8(%rbx)
jmp 0x205a9
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x21896
jmp 0x205a9
movl $0x1, %ebp
xorl %r14d, %r14d
jmp 0x204c7
xorl %r14d, %r14d
movl $0x1, %ebp
cmpl $0xf, %r14d
jae 0x204ec
shll $0x4, %r14d
orl %ebp, %r14d
movb %r14b, 0x8(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x20506
movb %r14b, (%rsi)
incq 0x8(%rbx)
jmp 0x20550
movl %ebp, %eax
orb $-0x10, %al
movb %al, 0x8(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x20515
movb %al, (%rsi)
incq 0x8(%rbx)
jmp 0x20522
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x21896
jmp 0x20550
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x21896
leaq 0x8(%rsp), %rdx
movl %r14d, (%rdx)
leaq 0x50(%rsp), %rsi
movq %r15, %rdi
movl $0x1, %ecx
callq 0x1fbd8
movq 0x8(%rbx), %rsi
movq 0x50(%rsp), %rcx
movq %rbx, %rdi
movq %rcx, %rdx
callq 0x1bd8c
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x205a9
movl $0x1, %r15d
xorl %ecx, %ecx
leaq 0x50(%rsp), %r14
leaq (%rax,%rcx,4), %rdx
movq %r14, %rsi
movl %ebp, %ecx
callq 0x1fcbc
movq 0x8(%rbx), %rsi
movq 0x50(%rsp), %rdx
movq 0x58(%rsp), %rcx
movq %rbx, %rdi
callq 0x1bd8c
movl %r15d, %ecx
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
incl %r15d
cmpq %rcx, %rdx
ja 0x20569
leaq 0x30(%rsp), %rdi
callq 0xc4da
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x205c2
callq 0x5410
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x205d1
callq 0x5410
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x205f0
jmp 0x205f0
jmp 0x205f0
jmp 0x205f0
jmp 0x205f0
jmp 0x205f0
jmp 0x205f0
jmp 0x205f0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xc4da
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2060c
callq 0x5410
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x2061b
callq 0x5410
movq %rbx, %rdi
callq 0x57d0
nop