// File: /workspace/github_cpp_makefile_star2_O1/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 $0x688, %rsp            # imm = 0x688
movq %rdi, %r12
leaq -0x298(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1d0e7(%rip), %rsi     # 0x2f2b2
leaq 0x1d0e2(%rip), %rdx     # 0x2f2b4
leaq -0x2a8(%rbp), %r15
movq %r15, %rdi
callq 0x1e03c
leaq -0x288(%rbp), %r14
leaq -0x278(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1d0bb(%rip), %rsi     # 0x2f2b5
leaq 0x1d0ba(%rip), %rdx     # 0x2f2bb
movq %r14, %rdi
callq 0x1e03c
leaq -0x268(%rbp), %r14
leaq -0x258(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1d09a(%rip), %rsi     # 0x2f2bc
leaq 0x1d097(%rip), %rdx     # 0x2f2c0
movq %r14, %rdi
callq 0x1e03c
leaq -0x248(%rbp), %r14
leaq -0x238(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1d177(%rip), %rsi     # 0x2f3c1
leaq 0x1d176(%rip), %rdx     # 0x2f3c7
movq %r14, %rdi
callq 0x1e03c
leaq -0x228(%rbp), %r14
leaq -0x218(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1d156(%rip), %rsi     # 0x2f3c8
leaq 0x1d156(%rip), %rdx     # 0x2f3cf
movq %r14, %rdi
callq 0x1e03c
leaq -0x208(%rbp), %r14
leaq -0x1f8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1d136(%rip), %rsi     # 0x2f3d0
leaq 0x1d135(%rip), %rdx     # 0x2f3d6
movq %r14, %rdi
callq 0x1e03c
leaq -0x1e8(%rbp), %r14
leaq -0x1d8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1d115(%rip), %rsi     # 0x2f3d7
leaq 0x1d111(%rip), %rdx     # 0x2f3da
movq %r14, %rdi
callq 0x1e03c
leaq -0x1c8(%rbp), %r14
leaq -0x1b8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1d0f1(%rip), %rsi     # 0x2f3db
leaq 0x1d0ef(%rip), %rdx     # 0x2f3e0
movq %r14, %rdi
callq 0x1e03c
leaq -0x1a8(%rbp), %r14
leaq -0x198(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1d0cf(%rip), %rsi     # 0x2f3e1
leaq 0x1d0cd(%rip), %rdx     # 0x2f3e6
movq %r14, %rdi
callq 0x1e03c
leaq -0x188(%rbp), %r14
leaq -0x178(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1cb1c(%rip), %rsi     # 0x2ee56
leaq 0x1cb1e(%rip), %rdx     # 0x2ee5f
movq %r14, %rdi
callq 0x1e03c
leaq -0x168(%rbp), %r14
leaq -0x158(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1d085(%rip), %rsi     # 0x2f3e7
leaq 0x1d087(%rip), %rdx     # 0x2f3f0
movq %r14, %rdi
callq 0x1e03c
leaq -0x148(%rbp), %r14
leaq -0x138(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1caad(%rip), %rsi     # 0x2ee37
leaq 0x1caaa(%rip), %rdx     # 0x2ee3b
movq %r14, %rdi
callq 0x1e03c
leaq -0x58(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
leaq -0x6a8(%rbp), %rcx
movl $0xc, %edx
callq 0x1dff4
movq $-0x180, %r14           # imm = 0xFE80
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x123d0
movq (%rbx), %rsi
incq %rsi
callq 0x41d0
addq $-0x20, %rbx
addq $0x20, %r14
jne 0x123bc
leaq 0x1bb67(%rip), %rsi     # 0x2df48
leaq -0x2a8(%rbp), %rdi
movl $0x8, %edx
callq 0x4310
leaq 0x1cff8(%rip), %rsi     # 0x2f3f1
leaq -0x6a8(%rbp), %rdi
movl $0x10, %edx
callq 0x41f0
movq %r12, -0x60(%rbp)
leaq 0x1b4cb(%rip), %rsi     # 0x2d8e0
leaq -0x4a8(%rbp), %rdi
movl $0x10, %edx
callq 0x41f0
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %rbx
movaps %xmm0, (%rbx)
xorl %eax, %eax
movq %rax, 0x10(%rbx)
leaq -0x70(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x90(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x2a8(%rbp), %r14
leaq -0x80(%rbp), %r12
leaq 0x1d5b6(%rip), %r13     # 0x2fa1d
leaq 0x1b164(%rip), %r15     # 0x2d5d2
movq %r14, %rdi
movq %r12, %rsi
callq 0x4220
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x124b2
movq %r12, %rdi
movq %r13, %rsi
callq 0x4090
testl %eax, %eax
je 0x1246e
movq %r12, %rdi
movq %r15, %rsi
callq 0x4090
testl %eax, %eax
je 0x1246e
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1de06
jmp 0x1246e
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r12
cmpq %r12, %r15
je 0x12508
leaq -0x6a8(%rbp), %rbx
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x4210
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x41b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4120
addq $0x20, %r15
cmpq %r12, %r15
jne 0x124c6
movq -0x40(%rbp), %r12
movq -0x38(%rbp), %r14
cmpq %r12, %r14
je 0x125d3
xorl %r15d, %r15d
leaq 0x1ce9a(%rip), %r13     # 0x2f3bd
xorl %ebx, %ebx
movq -0x58(%rbp), %rax
cmpq %rax, -0x50(%rbp)
je 0x125b3
movl $0x1, %r12d
shlq $0x5, %r15
xorl %ecx, %ecx
movq -0x40(%rbp), %r14
shlq $0x5, %rcx
movq 0x8(%r14,%r15), %rdx
addq %r15, %r14
cmpq 0x8(%rax,%rcx), %rdx
jne 0x1256d
testq %rdx, %rdx
je 0x1257c
addq %rcx, %rax
movq (%rax), %rsi
movq (%r14), %rdi
callq 0x41e0
testl %eax, %eax
je 0x1257c
movq %r14, %rdi
movq %r13, %rsi
callq 0x4090
testl %eax, %eax
jne 0x12599
movq -0x40(%rbp), %rdi
movq 0x8(%rdi,%r15), %rdx
addq %r15, %rdi
xorl %esi, %esi
leaq 0x1b4a1(%rip), %rcx     # 0x2da32
xorl %r8d, %r8d
callq 0x42a0
movl %r12d, %ecx
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
incl %r12d
cmpq %rcx, %rdx
ja 0x1253f
incl %ebx
movq -0x40(%rbp), %r12
movq -0x38(%rbp), %r14
movq %r14, %rax
subq %r12, %rax
sarq $0x5, %rax
movq %rbx, %r15
cmpq %rbx, %rax
ja 0x12525
cmpq %r14, %r12
je 0x12699
leaq 0x1ac32(%rip), %r13     # 0x2d215
leaq 0x1b448(%rip), %rbx     # 0x2da32
leaq 0x1cdce(%rip), %r15     # 0x2f3bf
movq %r12, %rdi
movq %r13, %rsi
callq 0x4090
testl %eax, %eax
je 0x12636
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4090
testl %eax, %eax
je 0x1268c
movq (%r12), %rsi
movq 0x8(%r12), %rdx
leaq -0x4a8(%rbp), %rdi
callq 0x4210
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x4210
jmp 0x1268c
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4090
testl %eax, %eax
je 0x12600
leaq -0x4a8(%rbp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4210
movq -0x4a8(%rbp), %rax
movq -0x18(%rax), %rdi
leaq -0x4a8(%rbp), %rax
addq %rax, %rdi
movl $0xa, %esi
callq 0x41b0
movsbl %al, %esi
leaq -0x4a8(%rbp), %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4120
addq $0x20, %r12
cmpq %r14, %r12
jne 0x125f1
movq -0x60(%rbp), %rdi
callq 0x10be2
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x126c4
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x41d0
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x126dd
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x41d0
leaq -0x40(%rbp), %rdi
callq 0x1de52
movq 0x288d3(%rip), %rax     # 0x3afc0
movq (%rax), %rbx
movq 0x18(%rax), %r14
leaq -0x4a0(%rbp), %rdi
movq %rbx, -0x8(%rdi)
movq -0x18(%rbx), %rax
movq %r14, -0x4a8(%rbp,%rax)
callq 0x4180
movl $0xf8, %r15d
leaq -0x4a8(%rbp), %rdi
addq %r15, %rdi
callq 0x40a0
leaq -0x6a0(%rbp), %rdi
movq %rbx, -0x8(%rdi)
movq -0x18(%rbx), %rax
movq %r14, -0x6a8(%rbp,%rax)
callq 0x4180
leaq -0x6a8(%rbp), %rdi
addq %r15, %rdi
callq 0x40a0
leaq -0x2a8(%rbp), %rdi
callq 0x4070
leaq -0x58(%rbp), %rdi
callq 0x1de52
addq $0x688, %rsp            # imm = 0x688
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x12819
movq %rax, %rbx
jmp 0x1286c
movq %rax, %rbx
jmp 0x12878
movq %rax, %rbx
jmp 0x12884
movq %rax, %rbx
leaq -0x128(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0x4346
movb $0x1, %al
jmp 0x127c7
jmp 0x127c2
jmp 0x127c2
jmp 0x127c2
jmp 0x127c2
jmp 0x127c2
jmp 0x127c2
jmp 0x127c2
jmp 0x127c2
jmp 0x127c2
jmp 0x127c2
movq %rax, %rbx
xorl %eax, %eax
cmpq %r14, %r15
sete %cl
orb %al, %cl
jne 0x1288d
addq $-0x10, %r14
leaq -0x2a8(%rbp), %r15
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x127f4
movq (%r14), %rsi
incq %rsi
callq 0x41d0
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %r15, %r14
movq %rax, %r14
jne 0x127e0
jmp 0x1288d
movq %rax, %rbx
xorl %eax, %eax
movq %r15, %r14
jmp 0x127c7
jmp 0x12819
jmp 0x12819
jmp 0x12819
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x1283e
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x41d0
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x12857
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x41d0
leaq -0x40(%rbp), %rdi
callq 0x1de52
leaq -0x4a8(%rbp), %rdi
callq 0x4270
leaq -0x6a8(%rbp), %rdi
callq 0x4270
leaq -0x2a8(%rbp), %rdi
callq 0x4070
leaq -0x58(%rbp), %rdi
callq 0x1de52
movq %rbx, %rdi
callq 0x42f0
nop