// File: auton1[P]viterbi/header.cpp
// Function: header::add_CONTIG_descriptor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
void header::add_CONTIG_descriptor(const string &in, int index)
{
	size_t found_end=in.find_last_of(">");
	string details = in.substr(0, found_end);

	vector<string> tokens;
	tokenize(details, ',', tokens);
	Field_description I;
	I.Field = "contig";
	bool id_found = false;
	vector<string> entry;

	for (unsigned int ui=0; ui<tokens.size(); ui++)
	{
		tokenize(tokens[ui], '=', entry);
		if (entry[0] == "ID")
		{
			I.ID = entry[1];
			id_found = true;
		}
		else if (entry[0] == "length") I.Length = entry[1];
		else if (entry[0] == "assembly") I.Assembly = entry[1];
		else
		{
			if (I.Other != "")
				I.Other += ",";
			I.Other += tokens[ui];
		}
	}
	if (id_found == false)
		LOG.warning("CONTIG declaration found without ID: "+ in + "\n");

	parsed_lines.push_back(I);
	CONTIG_map[index] = I;
	CONTIG_reverse_map[I.ID] = index;
}

// Assembly:
subq $0x268, %rsp            # imm = 0x268
movq %rdi, 0x260(%rsp)
movq %rsi, 0x258(%rsp)
movl %edx, 0x254(%rsp)
movq 0x260(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x258(%rsp), %rdi
leaq 0x45dfc(%rip), %rsi     # 0x74b06
movq $-0x1, %rdx
callq 0x64f0
movq %rax, 0x248(%rsp)
movq 0x258(%rsp), %rsi
movq 0x248(%rsp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq 0x228(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x6580
leaq 0x210(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x10260
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rdx
movl $0x2c, %esi
callq 0x2fa70
jmp 0x2ed6c
leaq 0xb0(%rsp), %rdi
callq 0x30960
jmp 0x2ed7b
leaq 0x46071(%rip), %rsi     # 0x74df3
leaq 0xb0(%rsp), %rdi
callq 0x67b0
jmp 0x2ed91
movb $0x0, 0xaf(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x10260
movl $0x0, 0x8c(%rsp)
movl 0x8c(%rsp), %eax
movq %rax, 0x28(%rsp)
leaq 0x210(%rsp), %rdi
callq 0x10270
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jae 0x2efe5
movl 0x8c(%rsp), %eax
movl %eax, %esi
leaq 0x210(%rsp), %rdi
callq 0x10290
movq %rax, %rdi
movl $0x3d, %esi
leaq 0x90(%rsp), %rdx
callq 0x2fa70
jmp 0x2ee08
xorl %eax, %eax
movl %eax, %esi
leaq 0x90(%rsp), %rdi
callq 0x10290
movq %rax, %rdi
leaq 0x45b87(%rip), %rsi     # 0x749aa
callq 0xea20
movb %al, 0x27(%rsp)
jmp 0x2ee2e
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x2ee38
jmp 0x2eeb4
leaq 0x90(%rsp), %rdi
movl $0x1, %esi
callq 0x10290
movq %rax, %rsi
leaq 0xd0(%rsp), %rdi
callq 0x6060
jmp 0x2ee5c
movb $0x1, 0xaf(%rsp)
jmp 0x2efcd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
jmp 0x2f171
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
jmp 0x2f164
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
jmp 0x2f157
xorl %eax, %eax
movl %eax, %esi
leaq 0x90(%rsp), %rdi
callq 0x10290
movq %rax, %rdi
leaq 0x45f2b(%rip), %rsi     # 0x74dfa
callq 0xea20
movb %al, 0x26(%rsp)
jmp 0x2eeda
movb 0x26(%rsp), %al
testb $0x1, %al
jne 0x2eee4
jmp 0x2ef0d
leaq 0x90(%rsp), %rdi
movl $0x1, %esi
callq 0x10290
movq %rax, %rsi
leaq 0x160(%rsp), %rdi
callq 0x6060
jmp 0x2ef08
jmp 0x2efcb
xorl %eax, %eax
movl %eax, %esi
leaq 0x90(%rsp), %rdi
callq 0x10290
movq %rax, %rdi
leaq 0x45ed9(%rip), %rsi     # 0x74e01
callq 0xea20
movb %al, 0x25(%rsp)
jmp 0x2ef33
movb 0x25(%rsp), %al
testb $0x1, %al
jne 0x2ef3d
jmp 0x2ef63
leaq 0x90(%rsp), %rdi
movl $0x1, %esi
callq 0x10290
movq %rax, %rsi
leaq 0x180(%rsp), %rdi
callq 0x6060
jmp 0x2ef61
jmp 0x2efc9
leaq 0x1e0(%rsp), %rdi
leaq 0x46db7(%rip), %rsi     # 0x75d29
callq 0x30930
movb %al, 0x24(%rsp)
jmp 0x2ef7d
movb 0x24(%rsp), %al
testb $0x1, %al
jne 0x2ef87
jmp 0x2ef9f
leaq 0x1e0(%rsp), %rdi
leaq 0x45c44(%rip), %rsi     # 0x74bda
callq 0x6510
jmp 0x2ef9d
jmp 0x2ef9f
movl 0x8c(%rsp), %eax
movl %eax, %esi
leaq 0x210(%rsp), %rdi
callq 0x10290
movq %rax, %rsi
leaq 0x1e0(%rsp), %rdi
callq 0x6730
jmp 0x2efc7
jmp 0x2efc9
jmp 0x2efcb
jmp 0x2efcd
jmp 0x2efcf
movl 0x8c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8c(%rsp)
jmp 0x2edb1
movb 0xaf(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x2f099
movq 0x258(%rsp), %rdx
leaq 0x45e01(%rip), %rsi     # 0x74e0a
leaq 0x48(%rsp), %rdi
callq 0xe8d0
jmp 0x2f015
leaq 0x450cf(%rip), %rdx     # 0x740eb
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xf4a0
jmp 0x2f02d
leaq 0x645cc(%rip), %rdi     # 0x93600
leaq 0x68(%rsp), %rsi
callq 0x715a0
jmp 0x2f040
leaq 0x68(%rsp), %rdi
callq 0x6b50
leaq 0x48(%rsp), %rdi
callq 0x6b50
jmp 0x2f099
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
jmp 0x2f08a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x6b50
leaq 0x48(%rsp), %rdi
callq 0x6b50
jmp 0x2f157
movq 0x30(%rsp), %rdi
addq $0x40, %rdi
leaq 0xb0(%rsp), %rsi
callq 0x30e70
jmp 0x2f0b1
movq 0x30(%rsp), %rdi
addq $0xf0, %rdi
leaq 0x254(%rsp), %rsi
callq 0x30ef0
movq %rax, 0x18(%rsp)
jmp 0x2f0d1
movq 0x18(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x22b00
jmp 0x2f0e5
movq 0x30(%rsp), %rdi
movl 0x254(%rsp), %eax
movl %eax, 0xc(%rsp)
addq $0x120, %rdi            # imm = 0x120
leaq 0xd0(%rsp), %rsi
callq 0x30fe0
movq %rax, 0x10(%rsp)
jmp 0x2f110
movq 0x10(%rsp), %rax
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
leaq 0x90(%rsp), %rdi
callq 0x10cc0
leaq 0xb0(%rsp), %rdi
callq 0x22620
leaq 0x210(%rsp), %rdi
callq 0x10cc0
leaq 0x228(%rsp), %rdi
callq 0x6b50
addq $0x268, %rsp            # imm = 0x268
retq
leaq 0x90(%rsp), %rdi
callq 0x10cc0
leaq 0xb0(%rsp), %rdi
callq 0x22620
leaq 0x210(%rsp), %rdi
callq 0x10cc0
leaq 0x228(%rsp), %rdi
callq 0x6b50
movq 0x208(%rsp), %rdi
callq 0x69e0
nopl (%rax,%rax)