// File: /workspace/github_cpp_makefile_star2_O3/nataly-enne[P]pet-fera/pet_fera_cadastrar.cpp
// Function: cadastrar(std::map<int, TRATADOR, std::less<int>, std::allocator<std::pair<int const, TRATADOR>>>&)
void cadastrar(map <int, TRATADOR>  &tratadores){ 
	int id, idade, nivel_seg;
	unsigned int old_size;
	long int cpf;
	string nome, especialidade, tipo_sang, id_string, idade_string, tipo_sang_string, nivel_seg_string, cpf_string, fator_rh_string;
	char fator_rh, continuar, sucesso;
	bool check;
	old_size = tratadores.size();
	ofstream tratador;
	
	do{
		// Recebe o ID e verifica se é valido.
		do{
			cout << "Digite o id:" << endl;
			cin >> id_string;
			if(!verifica_ID(tratadores, 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(tratadores, 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');

		// Recebe o nível de segurança e verifica se é valida.
		do{
			cout << "Digite o nivel de seguranca: 0 ou 1 ou 2"<< endl;
			getline(cin, nivel_seg_string);
			if(!verifica_seguranca(nivel_seg_string, sucesso)){
				cout << "ERRO: O nivel de seguranca só pode ser 0, 1 ou 2!" << endl << endl;
			}
			else{
				stringstream ss(nivel_seg_string);
				ss >> nivel_seg;
			}
		}while(sucesso == 'n');

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x698, %rsp            # imm = 0x698
leaq -0x120(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x58(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x278(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x100(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xe0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x258(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xc0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xa0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x80(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movq %rdi, -0x38(%rbp)
movl 0x28(%rdi), %eax
movq %rax, -0x138(%rbp)
leaq -0x6c0(%rbp), %rdi
callq 0x3360
leaq -0x4c0(%rbp), %rax
leaq 0x80(%rax), %r14
leaq -0x218(%rbp), %r15
leaq 0x35a4c(%rip), %rax     # 0x47ac8
addq $0x10, %rax
movq %rax, -0x140(%rbp)
movq 0x35f42(%rip), %r12     # 0x47fd0
movq 0x35f4b(%rip), %r13     # 0x47fe0
movq %r14, -0x70(%rbp)
movl $0xc, %edx
movq %r12, %rdi
leaq 0x28697(%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 -0x110(%rbp), %rsi
callq 0x3270
leaq -0x238(%rbp), %rax
movq %rax, -0x248(%rbp)
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
addq %rsi, %rdx
leaq -0x248(%rbp), %rdi
callq 0x4574
movq -0x38(%rbp), %rdi
leaq -0x248(%rbp), %rsi
leaq -0x29(%rbp), %rdx
callq 0x3729b
movl %eax, %ebx
movq -0x248(%rbp), %rdi
leaq -0x238(%rbp), %rax
cmpq %rax, %rdi
je 0x1213d
callq 0x31d0
testb %bl, %bl
je 0x12181
leaq -0x4c0(%rbp), %rbx
movq %rbx, %rdi
leaq -0x110(%rbp), %rsi
movl $0x18, %edx
callq 0x3310
movq %rbx, %rdi
leaq -0x3c(%rbp), %rsi
callq 0x3120
movq %rbx, %rdi
movq 0x35e3e(%rip), %rsi     # 0x47fb0
callq 0x3160
movq %r14, %rdi
callq 0x30d0
jmp 0x121e7
movl $0x36, %edx
movq %r12, %rdi
leaq 0x285bc(%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 0x12099
movl $0xe, %edx
movq %r12, %rdi
leaq 0x28583(%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 -0x130(%rbp), %rsi
callq 0x33c0
leaq -0x130(%rbp), %rdi
leaq -0x29(%rbp), %rsi
callq 0x3821c
testb %al, %al
jne 0x122d6
movl $0x2d, %edx
movq %r12, %rdi
leaq 0x28513(%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 0x121f1
movl $0xe, %edx
movq %r12, %rdi
leaq 0x284d1(%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 -0xb0(%rbp), %rsi
callq 0x33c0
movq %r15, -0x228(%rbp)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x228(%rbp), %rdi
callq 0x4574
leaq -0x228(%rbp), %rdi
leaq -0x29(%rbp), %rsi
callq 0x38462
movl %eax, %ebx
movq -0x228(%rbp), %rdi
cmpq %r15, %rdi
je 0x1238a
callq 0x31d0
testb %bl, %bl
je 0x123d8
movq -0xb0(%rbp), %rbx
callq 0x3040
movq %rax, %r15
movl (%rax), %r14d
movl $0x0, (%rax)
movq %rbx, %rdi
leaq -0x4c0(%rbp), %rsi
movl $0xa, %edx
callq 0x3060
cmpq %rbx, -0x4c0(%rbp)
je 0x1309f
movl (%r15), %ecx
testl %ecx, %ecx
je 0x12440
cmpl $0x22, %ecx
jne 0x12443
jmp 0x130ab
movl $0x1e, %edx
movq %r12, %rdi
leaq 0x283e8(%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 0x124aa
movl %r14d, (%r15)
movq -0x38(%rbp), %rdi
movq %rax, -0x148(%rbp)
movq %rax, %rsi
callq 0x36ce1
movq -0x70(%rbp), %r14
leaq -0x218(%rbp), %r15
testb %al, %al
je 0x124aa
movl $0x13, %edx
movq %r12, %rdi
leaq 0x2837a(%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)
jmp 0x122e0
cmpb $0x6e, -0x29(%rbp)
je 0x122e0
movl $0x10, %edx
movq %r12, %rdi
leaq 0x2833f(%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 -0xf0(%rbp), %rsi
callq 0x33c0
leaq -0x1f8(%rbp), %rax
movq %rax, -0x208(%rbp)
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x208(%rbp), %rdi
callq 0x4574
leaq -0x208(%rbp), %rdi
leaq -0x29(%rbp), %rsi
callq 0x38511
movl %eax, %ebx
movq -0x208(%rbp), %rdi
leaq -0x1f8(%rbp), %rax
cmpq %rax, %rdi
je 0x1256c
callq 0x31d0
testb %bl, %bl
je 0x125b0
leaq -0x4c0(%rbp), %rbx
movq %rbx, %rdi
leaq -0xf0(%rbp), %rsi
movl $0x18, %edx
callq 0x3310
movq %rbx, %rdi
leaq -0x48(%rbp), %rsi
callq 0x3120
movq %rbx, %rdi
movq 0x35a0f(%rip), %rsi     # 0x47fb0
callq 0x3160
movq %r14, %rdi
callq 0x30d0
jmp 0x12616
movl $0x2c, %edx
movq %r12, %rdi
leaq 0x28254(%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 0x124b4
movl $0x19, %edx
movq %r12, %rdi
leaq 0x28211(%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 -0x268(%rbp), %rsi
callq 0x33c0
leaq -0x268(%rbp), %rdi
leaq -0x29(%rbp), %rsi
callq 0x3866f
testb %al, %al
je 0x126ac
leaq -0x288(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x30f0
jmp 0x12712
movl $0x2f, %edx
movq %r12, %rdi
leaq 0x2819f(%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 0x12620
movl $0x13, %edx
movq %r12, %rdi
leaq 0x2815f(%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 -0x90(%rbp), %rsi
callq 0x33c0
leaq -0x1d8(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1e8(%rbp), %rdi
callq 0x4574
leaq -0x1e8(%rbp), %rdi
leaq -0x29(%rbp), %rsi
callq 0x387c0
movl %eax, %ebx
movq -0x1e8(%rbp), %rdi
leaq -0x1d8(%rbp), %rax
cmpq %rax, %rdi
je 0x127d4
callq 0x31d0
testb %bl, %bl
je 0x127e6
movq -0x90(%rbp), %rax
movb (%rax), %al
movb %al, -0x2a(%rbp)
jmp 0x1284c
movl $0x21, %edx
movq %r12, %rdi
leaq 0x280a9(%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 0x1271c
movl $0x18, %edx
movq %r12, %rdi
leaq 0x2805b(%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 -0x68(%rbp), %rsi
callq 0x33c0
leaq -0x1b8(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1c8(%rbp), %rdi
callq 0x4574
leaq -0x1c8(%rbp), %rdi
leaq -0x29(%rbp), %rsi
callq 0x38873
movl %eax, %ebx
movq -0x1c8(%rbp), %rdi
leaq -0x1b8(%rbp), %rax
cmpq %rax, %rdi
je 0x12905
callq 0x31d0
testb %bl, %bl
je 0x12941
movq -0x60(%rbp), %rbx
testq %rbx, %rbx
je 0x1292f
movq -0x68(%rbp), %r14
xorl %r15d, %r15d
movsbl (%r14,%r15), %edi
callq 0x32c0
movb %al, (%r14,%r15)
incq %r15
cmpq %r15, %rbx
jne 0x12919
leaq -0x68(%rbp), %rdi
movq %rdi, %rsi
callq 0x30f0
movq -0x70(%rbp), %r14
jmp 0x129a7
movl $0x30, %edx
movq %r12, %rdi
leaq 0x27f89(%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 0x12856
movl $0x28, %edx
movq %r12, %rdi
leaq 0x28001(%rip), %rsi     # 0x3a9c1
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 -0xd0(%rbp), %rsi
callq 0x33c0
leaq -0x198(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1a8(%rbp), %rdi
callq 0x4574
leaq -0x1a8(%rbp), %rdi
leaq -0x29(%rbp), %rsi
callq 0x38087
movl %eax, %ebx
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x12a69
callq 0x31d0
testb %bl, %bl
je 0x12aad
leaq -0x4c0(%rbp), %rbx
movq %rbx, %rdi
leaq -0xd0(%rbp), %rsi
movl $0x18, %edx
callq 0x3310
movq %rbx, %rdi
leaq -0x44(%rbp), %rsi
callq 0x3120
movq %rbx, %rdi
movq 0x35512(%rip), %rsi     # 0x47fb0
callq 0x3160
movq %r14, %rdi
callq 0x30d0
jmp 0x12b13
movl $0x32, %edx
movq %r12, %rdi
leaq 0x27f2e(%rip), %rsi     # 0x3a9ea
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 0x129b1
movl -0x3c(%rbp), %ebx
leaq -0x178(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdx
addq %rsi, %rdx
leaq -0x188(%rbp), %rdi
callq 0x4574
movl -0x48(%rbp), %eax
movl %eax, -0x40(%rbp)
leaq -0x158(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x288(%rbp), %rsi
movq -0x280(%rbp), %rdx
addq %rsi, %rdx
leaq -0x168(%rbp), %rdi
callq 0x4574
leaq -0x328(%rbp), %rax
movq %rax, -0x338(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0x338(%rbp), %r15
movq %r15, %rdi
callq 0x4574
movl -0x44(%rbp), %eax
subq $0x8, %rsp
movsbl -0x2a(%rbp), %r10d
leaq -0x318(%rbp), %rdi
movl %ebx, %esi
leaq -0x188(%rbp), %rdx
movq -0x148(%rbp), %rcx
movl -0x40(%rbp), %r8d
leaq -0x168(%rbp), %r9
pushq %rax
pushq %r15
pushq %r10
callq 0xfb04
addq $0x20, %rsp
movl -0x3c(%rbp), %eax
movl %eax, -0x4c0(%rbp)
leaq 0x34c48(%rip), %rax     # 0x47838
movq %rax, -0x4b8(%rbp)
movl -0x310(%rbp), %eax
movl %eax, -0x4b0(%rbp)
leaq -0x498(%rbp), %rcx
movq %rcx, -0x4a8(%rbp)
movq -0x308(%rbp), %rax
leaq -0x2f8(%rbp), %rdx
cmpq %rdx, %rax
leaq -0x218(%rbp), %r15
je 0x12c42
movq %rax, -0x4a8(%rbp)
movq -0x2f8(%rbp), %rax
movq %rax, -0x498(%rbp)
jmp 0x12c48
movups (%rdx), %xmm0
movups %xmm0, (%rcx)
movq -0x300(%rbp), %rax
movq %rax, -0x4a0(%rbp)
movq %rdx, -0x308(%rbp)
movq $0x0, -0x300(%rbp)
movb $0x0, -0x2f8(%rbp)
movl 0x18(%rdx), %eax
leaq -0x4c0(%rbp), %rcx
movl %eax, 0x40(%rcx)
movq 0x10(%rdx), %rax
movq %rax, 0x38(%rcx)
leaq -0x468(%rbp), %rcx
movq %rcx, -0x478(%rbp)
movq -0x2d8(%rbp), %rax
leaq -0x2c8(%rbp), %rdx
cmpq %rdx, %rax
je 0x12cbc
movq %rax, -0x478(%rbp)
movq -0x2c8(%rbp), %rax
movq %rax, -0x468(%rbp)
jmp 0x12cc2
movups (%rdx), %xmm0
movups %xmm0, (%rcx)
movq -0x2d0(%rbp), %rax
movq %rax, -0x470(%rbp)
movq %rdx, -0x2d8(%rbp)
movq $0x0, -0x2d0(%rbp)
movb $0x0, -0x2c8(%rbp)
movb -0x2b8(%rbp), %al
movb %al, -0x458(%rbp)
movq %r14, -0x450(%rbp)
movq -0x2b0(%rbp), %rax
leaq -0x2a0(%rbp), %rcx
cmpq %rcx, %rax
je 0x12d26
movq %rax, -0x450(%rbp)
movq -0x2a0(%rbp), %rax
movq %rax, -0x440(%rbp)
jmp 0x12d2d
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq -0x2a8(%rbp), %rax
movq %rax, -0x448(%rbp)
movq %rcx, -0x2b0(%rbp)
movq $0x0, -0x2a8(%rbp)
movb $0x0, -0x2a0(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0x4b8(%rbp)
movl -0x290(%rbp), %eax
movl %eax, -0x430(%rbp)
movq -0x38(%rbp), %rdi
leaq -0x4c0(%rbp), %rsi
callq 0x1d7f0
leaq 0x34ab3(%rip), %rax     # 0x47838
movq %rax, -0x4b8(%rbp)
movq -0x450(%rbp), %rdi
cmpq %r14, %rdi
je 0x12d9d
callq 0x31d0
movq -0x478(%rbp), %rdi
leaq -0x468(%rbp), %rax
cmpq %rax, %rdi
je 0x12db5
callq 0x31d0
movq -0x4a8(%rbp), %rdi
leaq -0x498(%rbp), %rax
cmpq %rax, %rdi
je 0x12dcd
callq 0x31d0
leaq 0x34a64(%rip), %rax     # 0x47838
movq %rax, -0x318(%rbp)
movq -0x2b0(%rbp), %rdi
leaq -0x2a0(%rbp), %rax
cmpq %rax, %rdi
je 0x12df3
callq 0x31d0
movq -0x2d8(%rbp), %rdi
leaq -0x2c8(%rbp), %rax
cmpq %rax, %rdi
je 0x12e0b
callq 0x31d0
movq -0x308(%rbp), %rdi
leaq -0x2f8(%rbp), %rax
cmpq %rax, %rdi
je 0x12e23
callq 0x31d0
movq -0x338(%rbp), %rdi
leaq -0x328(%rbp), %rax
cmpq %rax, %rdi
je 0x12e3b
callq 0x31d0
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x12e53
callq 0x31d0
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x12e6b
callq 0x31d0
movl $0x2a, %edx
movq %r12, %rdi
leaq 0x27ba3(%rip), %rsi     # 0x3aa1d
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 0x12099
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
cmpq -0x138(%rbp), %rax
jne 0x12edc
movl $0x21, %ebx
leaq 0x27a94(%rip), %r14     # 0x3a96e
jmp 0x12f48
movl $0x1f, %ebx
leaq 0x27ab9(%rip), %r14     # 0x3a9a1
testq %rax, %rax
je 0x12f48
leaq 0x27b54(%rip), %rsi     # 0x3aa48
leaq -0x6c0(%rbp), %rdi
movl $0x10, %edx
callq 0x3050
movq -0x38(%rbp), %rax
movq 0x18(%rax), %r15
addq $0x8, %rax
cmpq %rax, %r15
je 0x12f3c
movq %rax, %r13
leaq -0x6c0(%rbp), %r12
leaq 0x28(%r15), %rsi
movq %r12, %rdi
callq 0xffb8
movq %r15, %rdi
callq 0x3140
movq %rax, %r15
cmpq %r13, %rax
jne 0x12f20
leaq -0x6c0(%rbp), %rdi
callq 0x32a0
movq 0x35081(%rip), %r15     # 0x47fd0
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3250
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq 0x35055(%rip), %rdi     # 0x47fd0
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq 0x35039(%rip), %rax     # 0x47fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x6b8(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x6c0(%rbp,%rcx)
callq 0x3190
leaq -0x5c8(%rbp), %rdi
callq 0x30d0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x12fd3
callq 0x31d0
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x12feb
callq 0x31d0
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x13003
callq 0x31d0
movq -0x268(%rbp), %rdi
leaq -0x258(%rbp), %rax
cmpq %rax, %rdi
je 0x1301b
callq 0x31d0
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x13033
callq 0x31d0
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x1304b
callq 0x31d0
movq -0x288(%rbp), %rdi
leaq -0x278(%rbp), %rax
cmpq %rax, %rdi
je 0x13063
callq 0x31d0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x13075
callq 0x31d0
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x1308d
callq 0x31d0
addq $0x698, %rsp            # imm = 0x698
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28106(%rip), %rdi     # 0x3b1ac
callq 0x3110
leaq 0x280fa(%rip), %rdi     # 0x3b1ac
callq 0x32b0
movq %rax, %rbx
jmp 0x13266
jmp 0x1322d
jmp 0x1322d
jmp 0x1322d
movq %rax, %rbx
jmp 0x13128
movq %rax, %rbx
jmp 0x13110
movq %rax, %rbx
jmp 0x130f8
movq %rax, %rbx
leaq -0x4c0(%rbp), %rdi
callq 0x1cd82
leaq -0x318(%rbp), %rdi
callq 0x4a38
movq -0x338(%rbp), %rdi
leaq -0x328(%rbp), %rax
cmpq %rax, %rdi
je 0x13110
callq 0x31d0
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x13128
callq 0x31d0
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x13230
jmp 0x13218
jmp 0x1322d
jmp 0x1322d
jmp 0x13157
jmp 0x1322d
jmp 0x13157
movq %rax, %rbx
movq 0x34e4f(%rip), %rsi     # 0x47fb0
leaq -0x4c0(%rbp), %rdi
callq 0x3160
movq %r14, %rdi
callq 0x30d0
jmp 0x13230
jmp 0x1322d
movq %rax, %rbx
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x13230
jmp 0x13218
movq %rax, %rbx
movq -0x1c8(%rbp), %rdi
leaq -0x1b8(%rbp), %rax
cmpq %rax, %rdi
je 0x13230
jmp 0x13218
movq %rax, %rbx
movq -0x1e8(%rbp), %rdi
leaq -0x1d8(%rbp), %rax
cmpq %rax, %rdi
je 0x13230
jmp 0x13218
movq %rax, %rbx
movq -0x208(%rbp), %rdi
leaq -0x1f8(%rbp), %rax
cmpq %rax, %rdi
je 0x13230
jmp 0x13218
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x13230
movl %r14d, (%r15)
jmp 0x13230
movq %rax, %rbx
movq -0x248(%rbp), %rdi
leaq -0x238(%rbp), %rax
cmpq %rax, %rdi
je 0x13230
jmp 0x13218
movq %rax, %rbx
movq -0x228(%rbp), %rdi
cmpq %r15, %rdi
je 0x13230
callq 0x31d0
jmp 0x13230
jmp 0x1322d
jmp 0x1322d
jmp 0x1322d
jmp 0x1322d
jmp 0x1322d
jmp 0x1322d
jmp 0x1322d
movq %rax, %rbx
movq 0x34d91(%rip), %rax     # 0x47fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x6b8(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x6c0(%rbp,%rcx)
callq 0x3190
leaq -0x5c8(%rbp), %rdi
callq 0x30d0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x1327b
callq 0x31d0
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x13293
callq 0x31d0
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x132ab
callq 0x31d0
movq -0x268(%rbp), %rdi
leaq -0x258(%rbp), %rax
cmpq %rax, %rdi
je 0x132c3
callq 0x31d0
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x132db
callq 0x31d0
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x132f3
callq 0x31d0
movq -0x288(%rbp), %rdi
leaq -0x278(%rbp), %rax
cmpq %rax, %rdi
je 0x1330b
callq 0x31d0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x1331d
callq 0x31d0
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x13335
callq 0x31d0
movq %rbx, %rdi
callq 0x3380