// File: /workspace/github_cpp_makefile_star2_O1/nataly-enne[P]pet-fera/pet_fera_cadastrar.cpp
// Function: cadastrar(std::map<int, VETERINARIO, std::less<int>, std::allocator<std::pair<int const, VETERINARIO>>>&)
void cadastrar(map <int, VETERINARIO> &vets){ 
	int id, idade;
	unsigned int old_size;
	long int cpf;
	string nome, especialidade, crmv, tipo_sang, id_string, cpf_string, idade_string, tipo_sang_string, fator_rh_string;
	char fator_rh, continuar, sucesso;
	bool check;
	old_size = vets.size();
	ofstream veterinarios;
	
	do{
		// Recebe o ID e verifica se é valido.
		do{
			cout << "Digite o id:" << endl;
			cin >> id_string;
			if(!verifica_ID(vets, id_string, sucesso)){
				cout << "O ID deve conter apenas inteiros ou ID já cadastrado!" << endl << endl;
			}
			else{
				stringstream ss(id_string); // Converte string para int.
				ss >> id;
			}

		}while(sucesso == 'n');

		// Recebe o nome e verifica se é valido.
		do{	
			cout << "Digite o nome:" << endl;
			cin.ignore();
			getline(cin, nome);
			if(!verifica_nome(nome, sucesso)){
				cout << "ERRO: só pode ser inserido letra ou espaço!" << endl << endl;
			}
		}while(sucesso == 'n');

		// Recebe o CPF e verifica se é valido.
		do{
			cout << "Digite o CPF: " << endl;
			getline(cin, cpf_string);
			if(!verifica_CPF(cpf_string, sucesso)){
				cout << "CPF deve conter apenas numeros" << endl << endl;
			}
			else{
				cpf = stoll(cpf_string); //Transforma a string em long int.
				check = check_CPF(vets, cpf); // Checa se o CPF existe.
				if(check){
					cout << "CPF já cadastrado!" << endl;
					sucesso = 'n';
				}
			}
		}while(sucesso == 'n');

		// Recebe a idade e verifica se é valida.
		do{
			cout << "Digite a idade: " << endl;
			getline(cin, idade_string);
			if(!verifica_idade(idade_string, sucesso)){
				cout << "Idade deve conter apenas inteiros positivos!" << endl << endl;
			}
			else{
				stringstream ss(idade_string);
				ss >> idade;
			}
		}while(sucesso == 'n');

		// Recebe o tipo sanguineo e verifica se é valido.
		do{
			cout << "Insira o tipo sanguineo: " << endl;
			getline(cin, tipo_sang_string);
			if(!verifica_tipo_sang(tipo_sang_string, sucesso)){
				cout << "ERRO: O tipo sanguineo deve ser: A, B, AB ou O!" << endl << endl;
			}
			else{
				tipo_sang = tipo_sang_string;
			}
		}while(sucesso == 'n');

		// Recebe o fator RH e verifica se é valido.
		do{
			cout << "Insira o fator RH: " << endl;
			getline(cin, fator_rh_string);
			if(!verifica_fator(fator_rh_string, sucesso)){
				cout << "ERRO: O fator RH deve ser: + ou -" << endl << endl;
			}
			else{
				fator_rh = (char)fator_rh_string[0];
			}
		}while(sucesso == 'n');

		// Recebe a especialidade e verifica se é valida.
		do{
			cout << "Digite a especialidade: " << endl;
			getline(cin, especialidade);
			if(!verifica_especialidade(especialidade, sucesso)){
				cout << "ERRO: A especialidade deve conter apenas letras!" << endl << endl;
			}
			else{
				transform(especialidade.begin(), especialidade.end(), especialidade.begin(), ::tolower);
				especialidade = especialidade;
			}
		}while(sucesso == 'n');

		
		
		do{
			cout << "Digite o crmv: "<< endl;
			getline(cin, crmv);
			if(!verifica_CRMV(vets, crmv, sucesso)){
				cout << "ERRO: Crmv deve conter pelo menos um '-' " << endl << endl;
			}
			else{
				transform(crmv.begin(), crmv.end(), crmv.begin(), ::tolower);
				crmv = crmv;
			}
		}while(sucesso == 'n');

		// Armazenando os valores recebidos pelo usuário no map.
		vets.insert(pair <int, VETERINARIO> (id,VETERINARIO(id, nome, cpf, idade, tipo_sang, fator_rh, especialidade, crmv)));
		
		cout << "Deseja cadastrar um novo funcionario? s/n" << endl;
		cin >> continuar;
	}while(continuar == 's');

	if (vets.size() == old_size){ 
		cout << "Falha no cadastro do funcionario!" << endl;
	}
	else{
		if(!vets.empty()){
			veterinarios.open("veterinarios.txt");
			for(auto it = vets.begin(); it != vets.end(); it++){
				veterinarios << (*it).second;
			}
			veterinarios.close();
		}
		cout << "Cadastro efetuado com sucesso!!" << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x6d8, %rsp            # imm = 0x6D8
leaq -0x128(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x88(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x68(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x340(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x108(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xe8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xc8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x320(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xa8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movq %rdi, -0x38(%rbp)
movl 0x28(%rdi), %eax
movq %rax, -0x140(%rbp)
leaq -0x6f8(%rbp), %rdi
callq 0x3360
leaq -0x4f8(%rbp), %r15
leaq 0x80(%r15), %rax
movq %rax, -0x48(%rbp)
leaq 0x36ee4(%rip), %rax     # 0x47ab0
addq $0x10, %rax
movq %rax, -0x50(%rbp)
movq 0x373f5(%rip), %r12     # 0x47fd0
movq 0x373fe(%rip), %r13     # 0x47fe0
movl $0xc, %edx
movq %r12, %rdi
leaq 0x29b4e(%rip), %rsi     # 0x3a73f
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %r13, %rdi
leaq -0x118(%rbp), %rsi
callq 0x3270
leaq -0x300(%rbp), %rax
movq %rax, -0x310(%rbp)
movq -0x118(%rbp), %rsi
movq -0x110(%rbp), %rdx
addq %rsi, %rdx
leaq -0x310(%rbp), %rdi
callq 0x4574
movq -0x38(%rbp), %rdi
leaq -0x310(%rbp), %rsi
leaq -0x29(%rbp), %rdx
callq 0x3710c
movl %eax, %ebx
movq -0x310(%rbp), %rdi
leaq -0x300(%rbp), %rax
cmpq %rax, %rdi
je 0x10c86
callq 0x31d0
testb %bl, %bl
je 0x10cc4
movq %r15, %rdi
leaq -0x118(%rbp), %rsi
movl $0x18, %edx
callq 0x3310
movq %r15, %rdi
leaq -0x3c(%rbp), %rsi
callq 0x3120
movq %r15, %rdi
movq 0x372fc(%rip), %rsi     # 0x47fb0
callq 0x3160
movq -0x48(%rbp), %rdi
callq 0x30d0
jmp 0x10d2a
movl $0x36, %edx
movq %r12, %rdi
leaq 0x29a79(%rip), %rsi     # 0x3a74c
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
cmpb $0x6e, -0x29(%rbp)
je 0x10be2
movl $0xe, %edx
movq %r12, %rdi
leaq 0x29a40(%rip), %rsi     # 0x3a783
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %r13, %rdi
callq 0x33a0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %edx
movq %r13, %rdi
leaq -0x138(%rbp), %rsi
callq 0x33c0
leaq -0x138(%rbp), %rdi
leaq -0x29(%rbp), %rsi
callq 0x3832d
testb %al, %al
jne 0x10e19
movl $0x2d, %edx
movq %r12, %rdi
leaq 0x299d0(%rip), %rsi     # 0x3a792
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
cmpb $0x6e, -0x29(%rbp)
je 0x10d34
movl $0xe, %edx
movq %r12, %rdi
leaq 0x2998e(%rip), %rsi     # 0x3a7c0
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %edx
movq %r13, %rdi
leaq -0xf8(%rbp), %rsi
callq 0x33c0
leaq -0x2e0(%rbp), %rax
movq %rax, -0x2f0(%rbp)
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x2f0(%rbp), %rdi
callq 0x4574
leaq -0x2f0(%rbp), %rdi
leaq -0x29(%rbp), %rsi
callq 0x3859e
movl %eax, %ebx
movq -0x2f0(%rbp), %rdi
leaq -0x2e0(%rbp), %rax
cmpq %rax, %rdi
je 0x10edb
callq 0x31d0
testb %bl, %bl
je 0x10f25
movq -0xf8(%rbp), %rbx
callq 0x3040
movq %rax, %r14
movq %r15, %rsi
movl (%rax), %r15d
movl $0x0, (%rax)
movq %rbx, %rdi
movl $0xa, %edx
callq 0x3060
cmpq %rbx, -0x4f8(%rbp)
je 0x11cc4
movl (%r14), %ecx
testl %ecx, %ecx
je 0x10f8d
cmpl $0x22, %ecx
jne 0x10f90
jmp 0x11cd0
movl $0x1e, %edx
movq %r12, %rdi
leaq 0x2989b(%rip), %rsi     # 0x3a7cf
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
jmp 0x10fee
movl %r15d, (%r14)
movq -0x38(%rbp), %rdi
movq %rax, -0x148(%rbp)
movq %rax, %rsi
callq 0x36d2c
leaq -0x4f8(%rbp), %r15
testb %al, %al
je 0x10fee
movl $0x13, %edx
movq %r12, %rdi
leaq 0x29831(%rip), %rsi     # 0x3a7ee
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movb $0x6e, -0x29(%rbp)
cmpb $0x6e, -0x29(%rbp)
je 0x10e23
movl $0x10, %edx
movq %r12, %rdi
leaq 0x297fb(%rip), %rsi     # 0x3a802
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %edx
movq %r13, %rdi
leaq -0xd8(%rbp), %rsi
callq 0x33c0
leaq -0x2c0(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x2d0(%rbp), %rdi
callq 0x4574
leaq -0x2d0(%rbp), %rdi
leaq -0x29(%rbp), %rsi
callq 0x3865c
movl %eax, %ebx
movq -0x2d0(%rbp), %rdi
leaq -0x2c0(%rbp), %rax
cmpq %rax, %rdi
je 0x110b0
callq 0x31d0
testb %bl, %bl
je 0x110ee
movq %r15, %rdi
leaq -0xd8(%rbp), %rsi
movl $0x18, %edx
callq 0x3310
movq %r15, %rdi
leaq -0x58(%rbp), %rsi
callq 0x3120
movq %r15, %rdi
movq 0x36ed2(%rip), %rsi     # 0x47fb0
callq 0x3160
movq -0x48(%rbp), %rdi
callq 0x30d0
jmp 0x11154
movl $0x2c, %edx
movq %r12, %rdi
leaq 0x29716(%rip), %rsi     # 0x3a813
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
cmpb $0x6e, -0x29(%rbp)
je 0x10ff8
movl $0x19, %edx
movq %r12, %rdi
leaq 0x296d3(%rip), %rsi     # 0x3a840
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %edx
movq %r13, %rdi
leaq -0x330(%rbp), %rsi
callq 0x33c0
leaq -0x330(%rbp), %rdi
leaq -0x29(%rbp), %rsi
callq 0x387d8
testb %al, %al
je 0x111ea
leaq -0x350(%rbp), %rdi
leaq -0x330(%rbp), %rsi
callq 0x30f0
jmp 0x11250
movl $0x2f, %edx
movq %r12, %rdi
leaq 0x29661(%rip), %rsi     # 0x3a85a
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
cmpb $0x6e, -0x29(%rbp)
je 0x1115e
movl $0x13, %edx
movq %r12, %rdi
leaq 0x29621(%rip), %rsi     # 0x3a88a
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %edx
movq %r13, %rdi
leaq -0xb8(%rbp), %rsi
callq 0x33c0
leaq -0x2a0(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x2b0(%rbp), %rdi
callq 0x4574
leaq -0x2b0(%rbp), %rdi
leaq -0x29(%rbp), %rsi
callq 0x38938
movl %eax, %ebx
movq -0x2b0(%rbp), %rdi
leaq -0x2a0(%rbp), %rax
cmpq %rax, %rdi
je 0x11312
callq 0x31d0
testb %bl, %bl
je 0x11324
movq -0xb8(%rbp), %rax
movb (%rax), %al
movb %al, -0x2a(%rbp)
jmp 0x1138a
movl $0x21, %edx
movq %r12, %rdi
leaq 0x2956b(%rip), %rsi     # 0x3a89e
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
cmpb $0x6e, -0x29(%rbp)
je 0x1125a
movl $0x18, %edx
movq %r12, %rdi
leaq 0x2951d(%rip), %rsi     # 0x3a8c0
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %edx
movq %r13, %rdi
leaq -0x98(%rbp), %rsi
callq 0x33c0
leaq -0x280(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
leaq -0x290(%rbp), %rdi
callq 0x4574
leaq -0x290(%rbp), %rdi
leaq -0x29(%rbp), %rsi
callq 0x38a27
movl %eax, %ebx
movq -0x290(%rbp), %rdi
leaq -0x280(%rbp), %rax
cmpq %rax, %rdi
je 0x1144c
callq 0x31d0
testb %bl, %bl
je 0x11494
movq -0x90(%rbp), %rbx
testq %rbx, %rbx
je 0x1147c
movq -0x98(%rbp), %r14
xorl %r15d, %r15d
movsbl (%r14,%r15), %edi
callq 0x32c0
movb %al, (%r14,%r15)
incq %r15
cmpq %r15, %rbx
jne 0x11466
leaq -0x98(%rbp), %rdi
movq %rdi, %rsi
callq 0x30f0
leaq -0x4f8(%rbp), %r15
jmp 0x114fa
movl $0x30, %edx
movq %r12, %rdi
leaq 0x29436(%rip), %rsi     # 0x3a8d9
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
cmpb $0x6e, -0x29(%rbp)
je 0x11394
movl $0xf, %edx
movq %r12, %rdi
leaq 0x293f7(%rip), %rsi     # 0x3a90a
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %edx
movq %r13, %rdi
leaq -0x78(%rbp), %rsi
callq 0x33c0
leaq -0x260(%rbp), %rax
movq %rax, -0x270(%rbp)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
addq %rsi, %rdx
leaq -0x270(%rbp), %rdi
callq 0x4574
movq -0x38(%rbp), %rdi
leaq -0x270(%rbp), %rsi
leaq -0x29(%rbp), %rdx
callq 0x38b4e
movl %eax, %ebx
movq -0x270(%rbp), %rdi
leaq -0x260(%rbp), %rax
cmpq %rax, %rdi
je 0x115b7
callq 0x31d0
testb %bl, %bl
je 0x115f6
movq -0x70(%rbp), %rbx
testq %rbx, %rbx
je 0x115e1
movq -0x78(%rbp), %r14
xorl %r15d, %r15d
movsbl (%r14,%r15), %edi
callq 0x32c0
movb %al, (%r14,%r15)
incq %r15
cmpq %r15, %rbx
jne 0x115cb
leaq -0x78(%rbp), %rdi
movq %rdi, %rsi
callq 0x30f0
leaq -0x4f8(%rbp), %r15
jmp 0x1165c
movl $0x29, %edx
movq %r12, %rdi
leaq 0x29315(%rip), %rsi     # 0x3a91a
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
cmpb $0x6e, -0x29(%rbp)
je 0x11504
movl -0x3c(%rbp), %ebx
leaq -0x198(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq -0x138(%rbp), %rsi
movq -0x130(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1a8(%rbp), %rdi
callq 0x4574
movl -0x58(%rbp), %r14d
leaq -0x178(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x350(%rbp), %rsi
movq -0x348(%rbp), %rdx
addq %rsi, %rdx
leaq -0x188(%rbp), %rdi
callq 0x4574
movl %r14d, -0x54(%rbp)
leaq -0x158(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
leaq -0x168(%rbp), %rdi
callq 0x4574
leaq -0x360(%rbp), %rax
movq %rax, -0x370(%rbp)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
addq %rsi, %rdx
leaq -0x370(%rbp), %r14
movq %r14, %rdi
callq 0x4574
subq $0x8, %rsp
movsbl -0x2a(%rbp), %eax
leaq -0x250(%rbp), %rdi
movl %ebx, %esi
leaq -0x1a8(%rbp), %rdx
movq -0x148(%rbp), %rcx
movl -0x54(%rbp), %r8d
leaq -0x188(%rbp), %r9
pushq %r14
leaq -0x168(%rbp), %r10
pushq %r10
pushq %rax
callq 0xf318
addq $0x20, %rsp
movl -0x3c(%rbp), %eax
movl %eax, -0x4f8(%rbp)
leaq 0x360cf(%rip), %rax     # 0x47838
movq %rax, -0x4f0(%rbp)
movl -0x248(%rbp), %eax
movl %eax, -0x4e8(%rbp)
leaq -0x4d0(%rbp), %rcx
movq %rcx, -0x4e0(%rbp)
movq -0x240(%rbp), %rax
leaq -0x230(%rbp), %rdx
cmpq %rdx, %rax
je 0x117b4
movq %rax, -0x4e0(%rbp)
movq -0x230(%rbp), %rax
movq %rax, -0x4d0(%rbp)
jmp 0x117ba
movups (%rdx), %xmm0
movups %xmm0, (%rcx)
movq -0x238(%rbp), %rax
movq %rax, -0x4d8(%rbp)
movq %rdx, -0x240(%rbp)
movq $0x0, -0x238(%rbp)
movb $0x0, -0x230(%rbp)
movl 0x18(%rdx), %eax
movl %eax, 0x40(%r15)
movq 0x10(%rdx), %rax
movq %rax, 0x38(%r15)
leaq -0x4a0(%rbp), %rcx
movq %rcx, -0x4b0(%rbp)
movq -0x210(%rbp), %rax
leaq -0x200(%rbp), %rdx
cmpq %rdx, %rax
je 0x11828
movq %rax, -0x4b0(%rbp)
movq -0x200(%rbp), %rax
movq %rax, -0x4a0(%rbp)
jmp 0x1182e
movups (%rdx), %xmm0
movups %xmm0, (%rcx)
movq -0x208(%rbp), %rax
movq %rax, -0x4a8(%rbp)
movq %rdx, -0x210(%rbp)
movq $0x0, -0x208(%rbp)
movb $0x0, -0x200(%rbp)
movb -0x1f0(%rbp), %al
movb %al, -0x490(%rbp)
movq -0x48(%rbp), %rcx
movq %rcx, -0x488(%rbp)
movq -0x1e8(%rbp), %rax
leaq -0x1d8(%rbp), %rdx
cmpq %rdx, %rax
je 0x11896
movq %rax, -0x488(%rbp)
movq -0x1d8(%rbp), %rax
movq %rax, -0x478(%rbp)
jmp 0x1189c
movups (%rdx), %xmm0
movups %xmm0, (%rcx)
movq -0x1e0(%rbp), %rcx
movq -0x1c8(%rbp), %rax
movq %rcx, -0x480(%rbp)
movq %rdx, -0x1e8(%rbp)
movq $0x0, -0x1e0(%rbp)
movb $0x0, -0x1d8(%rbp)
movq -0x50(%rbp), %rcx
movq %rcx, -0x4f0(%rbp)
leaq -0x458(%rbp), %rcx
movq %rcx, -0x468(%rbp)
leaq -0x1b8(%rbp), %rdx
cmpq %rdx, %rax
je 0x11906
movq %rax, -0x468(%rbp)
movq -0x1b8(%rbp), %rax
movq %rax, -0x458(%rbp)
jmp 0x1190c
movups (%rdx), %xmm0
movups %xmm0, (%rcx)
movq -0x1c0(%rbp), %rax
movq %rax, -0x460(%rbp)
movq %rdx, -0x1c8(%rbp)
movq $0x0, -0x1c0(%rbp)
movb $0x0, -0x1b8(%rbp)
movq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0x1d538
movq -0x50(%rbp), %rax
movq %rax, -0x4f0(%rbp)
movq -0x468(%rbp), %rdi
leaq -0x458(%rbp), %rax
cmpq %rax, %rdi
je 0x11962
callq 0x31d0
leaq 0x35ecf(%rip), %rax     # 0x47838
movq %rax, -0x4f0(%rbp)
movq -0x488(%rbp), %rdi
cmpq -0x48(%rbp), %rdi
je 0x11982
callq 0x31d0
movq -0x4b0(%rbp), %rdi
leaq -0x4a0(%rbp), %rax
cmpq %rax, %rdi
je 0x1199a
callq 0x31d0
movq -0x4e0(%rbp), %rdi
leaq -0x4d0(%rbp), %rax
cmpq %rax, %rdi
je 0x119b2
callq 0x31d0
movq -0x50(%rbp), %rax
movq %rax, -0x250(%rbp)
movq -0x1c8(%rbp), %rdi
leaq -0x1b8(%rbp), %rax
cmpq %rax, %rdi
je 0x119d5
callq 0x31d0
leaq 0x35e5c(%rip), %rax     # 0x47838
movq %rax, -0x250(%rbp)
movq -0x1e8(%rbp), %rdi
leaq -0x1d8(%rbp), %rax
cmpq %rax, %rdi
je 0x119fb
callq 0x31d0
movq -0x210(%rbp), %rdi
leaq -0x200(%rbp), %rax
cmpq %rax, %rdi
je 0x11a13
callq 0x31d0
movq -0x240(%rbp), %rdi
leaq -0x230(%rbp), %rax
cmpq %rax, %rdi
je 0x11a2b
callq 0x31d0
movq -0x370(%rbp), %rdi
leaq -0x360(%rbp), %rax
cmpq %rax, %rdi
je 0x11a43
callq 0x31d0
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x11a5b
callq 0x31d0
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x11a73
callq 0x31d0
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x11a8b
callq 0x31d0
movl $0x29, %edx
movq %r12, %rdi
leaq 0x28eaa(%rip), %rsi     # 0x3a944
callq 0x3250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %r13, %rdi
leaq -0x2b(%rbp), %rsi
callq 0x3280
cmpb $0x73, -0x2b(%rbp)
je 0x10be2
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
cmpq -0x140(%rbp), %rax
jne 0x11afd
movl $0x21, %r14d
leaq 0x28e73(%rip), %r15     # 0x3a96e
jmp 0x11b6a
movl $0x1f, %r14d
leaq 0x28e97(%rip), %r15     # 0x3a9a1
testq %rax, %rax
je 0x11b6a
leaq 0x28e7a(%rip), %rsi     # 0x3a990
leaq -0x6f8(%rbp), %rdi
movl $0x10, %edx
callq 0x3050
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rbx
addq $0x8, %rax
cmpq %rax, %rbx
je 0x11b5e
movq %rax, %r13
leaq -0x6f8(%rbp), %r12
leaq 0x28(%rbx), %rsi
movq %r12, %rdi
callq 0xf831
movq %rbx, %rdi
callq 0x3140
movq %rax, %rbx
cmpq %r13, %rax
jne 0x11b42
leaq -0x6f8(%rbp), %rdi
callq 0x32a0
movq 0x3645f(%rip), %rbx     # 0x47fd0
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3250
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq 0x36433(%rip), %rdi     # 0x47fd0
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq 0x36417(%rip), %rax     # 0x47fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x6f0(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x6f8(%rbp,%rcx)
callq 0x3190
leaq -0x600(%rbp), %rdi
callq 0x30d0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x11bf8
callq 0x31d0
movq -0x330(%rbp), %rdi
leaq -0x320(%rbp), %rax
cmpq %rax, %rdi
je 0x11c10
callq 0x31d0
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x11c28
callq 0x31d0
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x11c40
callq 0x31d0
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x11c58
callq 0x31d0
movq -0x350(%rbp), %rdi
leaq -0x340(%rbp), %rax
cmpq %rax, %rdi
je 0x11c70
callq 0x31d0
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x11c82
callq 0x31d0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x11c9a
callq 0x31d0
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0x11cb2
callq 0x31d0
addq $0x6d8, %rsp            # imm = 0x6D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x294e1(%rip), %rdi     # 0x3b1ac
callq 0x3110
leaq 0x294d5(%rip), %rdi     # 0x3b1ac
callq 0x32b0
movq %rax, %rbx
jmp 0x11eb3
jmp 0x11e7a
jmp 0x11e7a
movq %rax, %rbx
jmp 0x11d65
movq %rax, %rbx
jmp 0x11d4d
movq %rax, %rbx
jmp 0x11d35
movq %rax, %rbx
jmp 0x11d1d
movq %rax, %rbx
leaq -0x4f8(%rbp), %rdi
callq 0x1cc9a
leaq -0x250(%rbp), %rdi
callq 0x1cd18
movq -0x370(%rbp), %rdi
leaq -0x360(%rbp), %rax
cmpq %rax, %rdi
je 0x11d35
callq 0x31d0
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x11d4d
callq 0x31d0
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x11d65
callq 0x31d0
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x11e7d
jmp 0x11e65
jmp 0x11e7a
jmp 0x11e7a
jmp 0x11e7a
jmp 0x11d92
movq %rax, %rbx
movq 0x36214(%rip), %rsi     # 0x47fb0
leaq -0x4f8(%rbp), %rdi
callq 0x3160
leaq -0x478(%rbp), %rdi
callq 0x30d0
jmp 0x11e7d
jmp 0x11e7a
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x11e7d
movl %r15d, (%r14)
jmp 0x11e7d
movq %rax, %rbx
movq -0x270(%rbp), %rdi
leaq -0x260(%rbp), %rax
cmpq %rax, %rdi
je 0x11e7d
jmp 0x11e65
movq %rax, %rbx
movq -0x290(%rbp), %rdi
leaq -0x280(%rbp), %rax
cmpq %rax, %rdi
je 0x11e7d
jmp 0x11e65
movq %rax, %rbx
movq -0x2b0(%rbp), %rdi
leaq -0x2a0(%rbp), %rax
cmpq %rax, %rdi
je 0x11e7d
jmp 0x11e65
movq %rax, %rbx
movq -0x2d0(%rbp), %rdi
leaq -0x2c0(%rbp), %rax
cmpq %rax, %rdi
je 0x11e7d
jmp 0x11e65
movq %rax, %rbx
movq -0x2f0(%rbp), %rdi
leaq -0x2e0(%rbp), %rax
cmpq %rax, %rdi
je 0x11e7d
jmp 0x11e65
movq %rax, %rbx
movq -0x310(%rbp), %rdi
leaq -0x300(%rbp), %rax
cmpq %rax, %rdi
je 0x11e7d
callq 0x31d0
jmp 0x11e7d
jmp 0x11e7a
jmp 0x11e7a
jmp 0x11e7a
jmp 0x11e7a
jmp 0x11e7a
jmp 0x11e7a
jmp 0x11e7a
movq %rax, %rbx
movq 0x36144(%rip), %rax     # 0x47fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x6f0(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x6f8(%rbp,%rcx)
callq 0x3190
leaq -0x600(%rbp), %rdi
callq 0x30d0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x11ecb
callq 0x31d0
movq -0x330(%rbp), %rdi
leaq -0x320(%rbp), %rax
cmpq %rax, %rdi
je 0x11ee3
callq 0x31d0
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x11efb
callq 0x31d0
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x11f13
callq 0x31d0
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x11f2b
callq 0x31d0
movq -0x350(%rbp), %rdi
leaq -0x340(%rbp), %rax
cmpq %rax, %rdi
je 0x11f43
callq 0x31d0
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x11f55
callq 0x31d0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x11f6d
callq 0x31d0
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0x11f85
callq 0x31d0
movq %rbx, %rdi
callq 0x3380