// File: /workspace/github_cpp_makefile_star2_O2/viniciu21[P]PetLolja/./src/PetFera.cpp
// Function: Petfera::salvar_doc_funcio()
void Petfera::salvar_doc_funcio()
{
	vector<string> chaves{"ID", "Classe", "Nome", "Numero", "contato", "Funcao", "Cpf", "Email", "Nivel", "seguranca", "Inscricao", "CRMV"};

	ifstream arqCache("cache_funcio.dat");
	ofstream arqDados("temp_func.dat");
	ofstream arqDados_csv("../banco/Dados_csv_funci.csv");
	vector<string> tokens_funcio;
	string linha;

	string palavra;

	while (arqCache >> linha)
	{
		if (linha != " " && linha != "==============")
		{
			tokens_funcio.push_back(linha);
		}
	}

	for (auto &novo : tokens_funcio)
	{
		arqDados << novo << endl;
	}

	for (unsigned int i = 0; i < tokens_funcio.size(); ++i)
	{
		for (unsigned int j = 0; j < chaves.size(); ++j)
		{
			if (tokens_funcio[i] == chaves[j] || tokens_funcio[i] == "|")
			{
				tokens_funcio[i] = "";
			}
		}
	}

	for (auto &novo : tokens_funcio)
	{
		if (novo == "." && novo != "")
		{
			arqDados_csv << "" << endl;
		}
		else if (novo != "")
		{
			arqDados_csv << novo << ";";
		}
	}

	inicio();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x698, %rsp            # imm = 0x698
movq %rdi, %r12
leaq 0x15630(%rip), %rsi     # 0x21292
leaq -0x2b8(%rbp), %r14
leaq -0x6b8(%rbp), %rdx
movq %r14, %rdi
callq 0x40b0
leaq -0x298(%rbp), %r15
leaq 0x1560f(%rip), %rsi     # 0x21295
leaq -0x4b8(%rbp), %rdx
movq %r15, %rdi
callq 0x40b0
leaq -0x278(%rbp), %r15
leaq 0x155f9(%rip), %rsi     # 0x2129c
leaq -0x90(%rbp), %rdx
movq %r15, %rdi
callq 0x40b0
leaq -0x258(%rbp), %r15
leaq 0x156e1(%rip), %rsi     # 0x213a1
leaq -0xb0(%rbp), %rdx
movq %r15, %rdi
callq 0x40b0
leaq -0x238(%rbp), %r15
leaq 0x156cb(%rip), %rsi     # 0x213a8
leaq -0x50(%rbp), %rdx
movq %r15, %rdi
callq 0x40b0
leaq -0x218(%rbp), %r15
leaq 0x156b9(%rip), %rsi     # 0x213b0
leaq -0x30(%rbp), %rdx
movq %r15, %rdi
callq 0x40b0
leaq -0x1f8(%rbp), %r15
leaq 0x156a6(%rip), %rsi     # 0x213b7
leaq -0x2f(%rbp), %rdx
movq %r15, %rdi
callq 0x40b0
leaq -0x1d8(%rbp), %r15
leaq 0x15690(%rip), %rsi     # 0x213bb
leaq -0x2e(%rbp), %rdx
movq %r15, %rdi
callq 0x40b0
leaq -0x1b8(%rbp), %r15
leaq 0x1567c(%rip), %rsi     # 0x213c1
leaq -0x2d(%rbp), %rdx
movq %r15, %rdi
callq 0x40b0
leaq -0x198(%rbp), %r15
leaq 0x150d7(%rip), %rsi     # 0x20e36
leaq -0x2c(%rbp), %rdx
movq %r15, %rdi
callq 0x40b0
leaq -0x178(%rbp), %r15
leaq 0x1564e(%rip), %rsi     # 0x213c7
leaq -0x2b(%rbp), %rdx
movq %r15, %rdi
callq 0x40b0
leaq -0x158(%rbp), %r15
leaq 0x15084(%rip), %rsi     # 0x20e17
leaq -0x2a(%rbp), %rdx
movq %r15, %rdi
callq 0x40b0
leaq -0x70(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
pushq $0xc
popq %rdx
leaq -0x29(%rbp), %rcx
callq 0x14152
movl $0x160, %ebx            # imm = 0x160
leaq (%rbx,%rbp), %rdi
addq $-0x2b8, %rdi           # imm = 0xFD48
callq 0x40e0
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0xbdbb
leaq 0x1414c(%rip), %rsi     # 0x1ff28
leaq -0x2b8(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x42d0
leaq 0x155df(%rip), %rsi     # 0x213d1
leaq -0x6b8(%rbp), %rdi
pushq $0x10
popq %rdx
callq 0x41d0
movq %r12, -0x58(%rbp)
leaq 0x13ab4(%rip), %rsi     # 0x1f8c0
leaq -0x4b8(%rbp), %rdi
pushq $0x10
popq %rdx
callq 0x41d0
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rbx
movaps %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
leaq -0x80(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq -0xa0(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq -0x2b8(%rbp), %r14
leaq -0x90(%rbp), %r15
leaq 0x15b9b(%rip), %r12     # 0x219fd
leaq 0x1373f(%rip), %r13     # 0x1f5a8
movq %r14, %rdi
movq %r15, %rsi
callq 0x41f0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xbead
movq %r15, %rdi
movq %r12, %rsi
callq 0x13f87
testb %al, %al
je 0xbe69
movq %r15, %rdi
movq %r13, %rsi
callq 0x13f87
testb %al, %al
je 0xbe69
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1328e
jmp 0xbe69
movq -0x50(%rbp), %rbx
movq -0x48(%rbp), %r15
leaq -0x6b8(%rbp), %r14
cmpq %r15, %rbx
je 0xbeda
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4190
movq %rax, %rdi
callq 0x40f0
addq $0x20, %rbx
jmp 0xbebc
xorl %r13d, %r13d
leaq 0x13b2e(%rip), %r15     # 0x1fa12
leaq 0x154b2(%rip), %r12     # 0x2139d
movl %r13d, %r13d
movq -0x50(%rbp), %r14
movq -0x48(%rbp), %rbx
movq %rbx, %rax
subq %r14, %rax
sarq $0x5, %rax
cmpq %r13, %rax
jbe 0xbf69
xorl %ebx, %ebx
movq %r13, %r14
shlq $0x5, %r14
movl %ebx, %ebx
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rbx, %rax
jbe 0xbf64
movq -0x50(%rbp), %rdi
addq %r14, %rdi
movq %rbx, %rax
shlq $0x5, %rax
addq %rax, %rsi
callq 0x13945
testb %al, %al
jne 0xbf51
movq -0x50(%rbp), %rdi
addq %r14, %rdi
movq %r12, %rsi
callq 0x132c9
testb %al, %al
je 0xbf60
movq -0x50(%rbp), %rdi
addq %r14, %rdi
movq %r15, %rsi
callq 0x42f0
incl %ebx
jmp 0xbf0e
incl %r13d
jmp 0xbeeb
leaq 0x1327b(%rip), %r15     # 0x1f1eb
leaq 0x13a9b(%rip), %r12     # 0x1fa12
leaq -0x4b8(%rbp), %r13
cmpq %rbx, %r14
je 0xbfe5
movq %r14, %rdi
movq %r15, %rsi
callq 0x132c9
testb %al, %al
je 0xbfb6
movq %r14, %rdi
movq %r12, %rsi
callq 0x13f87
testb %al, %al
je 0xbfb6
movq %r13, %rdi
movq %r12, %rsi
callq 0x41a0
movq %rax, %rdi
callq 0x40f0
jmp 0xbfdf
movq %r14, %rdi
movq %r12, %rsi
callq 0x13f87
testb %al, %al
je 0xbfdf
movq %r13, %rdi
movq %r14, %rsi
callq 0x4190
movq %rax, %rdi
leaq 0x153c5(%rip), %rsi     # 0x2139f
callq 0x41a0
addq $0x20, %r14
jmp 0xbf7e
movq -0x58(%rbp), %rdi
callq 0xadc2
leaq -0xb0(%rbp), %rdi
callq 0x40e0
leaq -0x90(%rbp), %rdi
callq 0x40e0
leaq -0x50(%rbp), %rdi
callq 0x13392
leaq -0x4b8(%rbp), %rdi
callq 0x4250
leaq -0x6b8(%rbp), %rdi
callq 0x4250
leaq -0x2b8(%rbp), %rdi
callq 0x4070
leaq -0x70(%rbp), %rdi
callq 0x13392
addq $0x698, %rsp            # imm = 0x698
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc0d7
movq %rax, %rbx
jmp 0xc107
movq %rax, %rbx
jmp 0xc113
movq %rax, %rbx
jmp 0xc11f
movq %rax, %rbx
movl $0x160, %r12d           # imm = 0x160
leaq (%r12,%rbp), %rdi
addq $-0x2b8, %rdi           # imm = 0xFD48
callq 0x40e0
addq $-0x20, %r12
cmpq $-0x20, %r12
jne 0xc074
movb $0x1, %al
jmp 0xc0ab
jmp 0xc0a6
jmp 0xc0a6
jmp 0xc0a6
jmp 0xc0a6
jmp 0xc0a6
jmp 0xc0a6
jmp 0xc0a6
jmp 0xc0a6
jmp 0xc0a6
jmp 0xc0a6
movq %rax, %rbx
xorl %eax, %eax
cmpq %r15, %r14
sete %cl
testb %al, %al
jne 0xc128
testb %cl, %cl
jne 0xc128
addq $-0x20, %r15
movq %r15, %rdi
callq 0x40e0
cmpq %r14, %r15
jne 0xc0b9
jmp 0xc128
movq %rax, %rbx
jmp 0xc128
jmp 0xc0d7
jmp 0xc0d7
jmp 0xc0d7
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x40e0
leaq -0x90(%rbp), %rdi
callq 0x40e0
leaq -0x50(%rbp), %rdi
callq 0x13392
leaq -0x4b8(%rbp), %rdi
callq 0x4250
leaq -0x6b8(%rbp), %rdi
callq 0x4250
leaq -0x2b8(%rbp), %rdi
callq 0x4070
leaq -0x70(%rbp), %rdi
callq 0x13392
movq %rbx, %rdi
callq 0x42c0