// File: /workspace/github_cpp_makefile_star2_O1/RuiDGPires[P]CrimLang/src/preprocessor.cpp
// Function: crl::preprocess(std::vector<crl::Token, std::allocator<crl::Token>>&, crl::preprocessor_lib)
void preprocess(std::vector<Token> &vec, Pproc_lib libs){
		size_t size = vec.size();	
		bool preproc_line = false;
		size_t begin = 0;

		for (size_t i = 0; i < size; i++){
			switch(vec[i].type){
				case Token::Type::PREPROC_START:
					preproc_line = true;
					begin = i;
				break;
				case Token::Type::PREPROC_END:
					preproc_line = false;
					vec.erase(vec.begin() + i--);
				break;
				case Token::Type::IDENT:
					if (!preproc_line) break;
					if (vec[i].str == "include"){
						ASSERT(i < size - 3, "Incomplete preprocessor directive");
						ASSERT(vec[i+2].type == Token::Type::PREPROC_END, "Expected end of preprocessor directive");
						if (vec[i+1].type == Token::Type::STRING){
							ASSERT(file_exists(vec[i+1].str), "File " + vec[i+1].str + " cannot be read");
							include(vec, libs, vec[i+1].str, begin, i);
						}else if (vec[i+1].type == Token::Type::GLOBAL_FOLDER){
							std::string other_full_path;

							for (size_t j = 0; j < libs.libc; j++)
								if (file_exists(std::string(libs.libv[j]) + "/" + vec[i+1].str)){
									other_full_path = std::string(libs.libv[j]) + "/" + vec[i+1].str;
									break;
								}
							ASSERT(other_full_path != "", "File " + vec[i+1].str + " cannot be read");

							include(vec, libs, other_full_path, begin, i);
						}else ASSERT(false, "unkown preprocessor directive");
					}
					break;
				default:
					break;
			}	
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rdx, -0x70(%rbp)
movq %rsi, -0x78(%rbp)
movq 0x8(%rdi), %rax
movq (%rdi), %rcx
xorl %edx, %edx
movq %rdx, -0xc8(%rbp)
movq %rdx, -0x40(%rbp)
subq %rcx, %rax
je 0x12fa1
sarq $0x4, %rax
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r14
leaq -0x3(%r14), %rax
movq %rax, -0xd0(%rbp)
leaq -0x50(%rbp), %r13
movq $0x0, -0xa0(%rbp)
leaq -0xc0(%rbp), %rbx
xorl %r15d, %r15d
movq %rdi, -0x30(%rbp)
movq (%rdi), %rsi
leaq (%r15,%r15,2), %r12
shlq $0x4, %r12
movl 0x20(%rsi,%r12), %eax
addq %r12, %rsi
cmpl $0x1, %eax
je 0x12ada
cmpl $0x39, %eax
je 0x12aba
cmpl $0x37, %eax
jne 0x12f8d
movq %r15, -0xc8(%rbp)
movb $0x1, %al
movq %rax, -0xa0(%rbp)
jmp 0x12f8d
decq %r15
movq %r15, -0x40(%rbp)
callq 0x13aec
movq -0x30(%rbp), %rdi
movq $0x0, -0xa0(%rbp)
jmp 0x12f8d
testb $0x1, -0xa0(%rbp)
je 0x12f8d
movq %rsi, %rdi
leaq 0x8c5e(%rip), %rsi      # 0x1b74f
callq 0x30a0
testl %eax, %eax
jne 0x12f89
cmpq -0xd0(%rbp), %r15
movq -0x30(%rbp), %rax
jae 0x12fb3
movq (%rax), %rax
cmpl $0x39, 0x80(%rax,%r12)
jne 0x13020
incq %r15
leaq (%r15,%r15,2), %rcx
shlq $0x4, %rcx
movq %rcx, -0x68(%rbp)
movl 0x20(%rax,%rcx), %ecx
cmpl $0x38, %ecx
je 0x12c19
cmpl $0x1c, %ecx
leaq -0x140(%rbp), %r15
jne 0x1308d
addq -0x68(%rbp), %rax
leaq -0x1a0(%rbp), %r12
movq %r12, -0x1b0(%rbp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x1b0(%rbp), %rdi
callq 0x4d4a
movq -0x1b0(%rbp), %rdi
movl $0x4, %esi
callq 0x33b0
movl %eax, %r13d
movq -0x1b0(%rbp), %rdi
cmpq %r12, %rdi
je 0x12ba4
movq -0x1a0(%rbp), %rsi
incq %rsi
callq 0x3230
testl %r13d, %r13d
jne 0x130fa
movq -0x30(%rbp), %r12
movq (%r12), %rax
movq %r15, -0x150(%rbp)
movq -0x68(%rbp), %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
addq %rsi, %rdx
leaq -0x150(%rbp), %r13
movq %r13, %rdi
callq 0x4d4a
movq %r12, %rdi
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq %r13, %rcx
leaq -0xc8(%rbp), %r8
leaq -0x40(%rbp), %r9
callq 0x134a1
leaq -0x50(%rbp), %r13
movq -0x150(%rbp), %rdi
cmpq %r15, %rdi
je 0x12f89
movq -0x140(%rbp), %rsi
jmp 0x12f81
leaq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
movq $0x0, -0x90(%rbp)
movb $0x0, -0x88(%rbp)
cmpq $0x0, -0x78(%rbp)
je 0x12ee4
xorl %r15d, %r15d
movq -0x70(%rbp), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %r12
movq %rbx, %rdi
leaq -0xf0(%rbp), %rdx
callq 0xf69c
movq %r12, %rdi
leaq 0x9190(%rip), %rsi      # 0x1bdfb
callq 0x3430
movq %r13, -0x60(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x12c90
movq %rdx, -0x60(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x50(%rbp)
jmp 0x12c98
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq %r14, %r12
movq 0x8(%rax), %rdx
movq %rdx, -0x58(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x68(%rbp), %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
leaq -0x60(%rbp), %rdi
callq 0x30b0
leaq -0x100(%rbp), %r14
movq %r14, -0x110(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x12cff
movq %rdx, -0x110(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x100(%rbp)
jmp 0x12d06
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, -0x108(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x110(%rbp), %rdi
movl $0x4, %esi
callq 0x33b0
movl %eax, %r13d
movq -0x110(%rbp), %rdi
cmpq %r14, %rdi
je 0x12d4f
movq -0x100(%rbp), %rsi
incq %rsi
callq 0x3230
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
movq %r12, %r14
je 0x12d6b
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x3230
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x12d8d
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x3230
testl %r13d, %r13d
je 0x12da8
incq %r15
cmpq %r15, -0x78(%rbp)
leaq -0x50(%rbp), %r13
jne 0x12c47
jmp 0x12ee4
movq -0x70(%rbp), %rax
movq (%rax,%r15,8), %rsi
leaq -0xf0(%rbp), %r15
movq %r15, %rdi
leaq -0x31(%rbp), %rdx
callq 0xf69c
movq %r15, %rdi
leaq 0x902e(%rip), %rsi      # 0x1bdfb
callq 0x3430
leaq -0x50(%rbp), %r13
leaq -0xb0(%rbp), %r15
movq %r15, -0xc0(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x12e06
movq %rdx, -0xc0(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xb0(%rbp)
jmp 0x12e0d
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, -0xb8(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x68(%rbp), %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq %rbx, %rdi
callq 0x30b0
movq %r13, -0x60(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x12e63
movq %rdx, -0x60(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x50(%rbp)
jmp 0x12e6b
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, -0x58(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x98(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x32b0
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x12ea7
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x3230
movq -0xc0(%rbp), %rdi
cmpq %r15, %rdi
je 0x12ec2
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x3230
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x12ee4
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x3230
leaq -0x98(%rbp), %rdi
leaq 0x85f2(%rip), %rsi      # 0x1b4e4
callq 0x30a0
testl %eax, %eax
je 0x1315d
leaq -0x120(%rbp), %r15
movq %r15, -0x130(%rbp)
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
leaq -0x130(%rbp), %r12
movq %r12, %rdi
callq 0x4d4a
movq -0x30(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq %r12, %rcx
leaq -0xc8(%rbp), %r8
leaq -0x40(%rbp), %r9
callq 0x134a1
movq -0x130(%rbp), %rdi
cmpq %r15, %rdi
je 0x12f67
movq -0x120(%rbp), %rsi
incq %rsi
callq 0x3230
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x12f89
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x3230
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %r15
incq %r15
movq %r15, -0x40(%rbp)
cmpq %r14, %r15
jb 0x12a7f
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x50, %edi
callq 0x3120
movq %rax, %r14
leaq -0x200(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x8784(%rip), %rsi      # 0x1b757
leaq 0x879e(%rip), %rdx      # 0x1b778
leaq -0x210(%rbp), %rdi
callq 0x433a
movb $0x1, %r15b
leaq -0x210(%rbp), %rcx
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5470
xorl %r15d, %r15d
leaq 0xfd6c(%rip), %rsi      # 0x22d78
leaq -0xda2d(%rip), %rdx     # 0x55e6
movq %r14, %rdi
callq 0x33d0
jmp 0x13286
movl $0x50, %edi
callq 0x3120
movq %rax, %r14
leaq -0x1e0(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x8739(%rip), %rsi      # 0x1b779
leaq 0x8758(%rip), %rdx      # 0x1b79f
leaq -0x1f0(%rbp), %rdi
callq 0x433a
movb $0x1, %r15b
leaq -0x1f0(%rbp), %rcx
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5470
xorl %r15d, %r15d
leaq 0xfcff(%rip), %rsi      # 0x22d78
leaq -0xda9a(%rip), %rdx     # 0x55e6
movq %r14, %rdi
callq 0x33d0
jmp 0x13286
movl $0x50, %edi
callq 0x3120
movq %rax, %r14
leaq -0x1c0(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x8709(%rip), %rsi      # 0x1b7b6
leaq 0x871f(%rip), %rdx      # 0x1b7d3
leaq -0x1d0(%rbp), %rdi
callq 0x433a
movb $0x1, %r15b
leaq -0x1d0(%rbp), %rcx
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5470
xorl %r15d, %r15d
leaq 0xfc92(%rip), %rsi      # 0x22d78
leaq -0xdb07(%rip), %rdx     # 0x55e6
movq %r14, %rdi
callq 0x33d0
jmp 0x13286
movl $0x50, %edi
callq 0x3120
movq %rax, %r14
movq -0x30(%rbp), %rax
movq -0x68(%rbp), %rdx
addq (%rax), %rdx
leaq 0x8687(%rip), %rsi      # 0x1b7a0
leaq -0x98(%rbp), %rdi
callq 0x40f6
leaq 0x867a(%rip), %rsi      # 0x1b7a6
leaq -0x98(%rbp), %rdi
callq 0x3430
leaq -0x180(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rcx
movq %rax, %rdx
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0x131ca
movups (%rdx), %xmm0
movups %xmm0, (%r12)
jmp 0x131db
movl $0x50, %edi
callq 0x3120
movq %rax, %r14
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
leaq (%rcx,%rax), %rdx
addq $0x30, %rdx
leaq 0x8614(%rip), %rsi      # 0x1b7a0
leaq -0x60(%rbp), %rdi
callq 0x40f6
leaq 0x860a(%rip), %rsi      # 0x1b7a6
leaq -0x60(%rbp), %rdi
callq 0x3430
leaq -0x160(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rcx
movq %rax, %rdx
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0x13229
movups (%rdx), %xmm0
movups %xmm0, (%r12)
jmp 0x1323a
movq %rcx, -0x190(%rbp)
movq (%rdx), %rcx
movq %rcx, -0x180(%rbp)
movq 0x8(%rax), %rsi
leaq -0x190(%rbp), %rcx
movq %rsi, 0x8(%rcx)
movq %rdx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %r15b
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5470
xorl %r15d, %r15d
leaq 0xfb60(%rip), %rsi      # 0x22d78
leaq -0xdc39(%rip), %rdx     # 0x55e6
movq %r14, %rdi
callq 0x33d0
jmp 0x13286
movq %rcx, -0x170(%rbp)
movq (%rdx), %rcx
movq %rcx, -0x160(%rbp)
movq 0x8(%rax), %rsi
leaq -0x170(%rbp), %rcx
movq %rsi, 0x8(%rcx)
movq %rdx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %r15b
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5470
xorl %r15d, %r15d
leaq 0xfb01(%rip), %rsi      # 0x22d78
leaq -0xdc98(%rip), %rdx     # 0x55e6
movq %r14, %rdi
callq 0x33d0
movq %rax, %rbx
movq -0x170(%rbp), %rdi
cmpq %r12, %rdi
je 0x132ac
movq -0x160(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x132ac
movq %rax, %rbx
movb $0x1, %r15b
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x13368
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x13368
movq %rax, %rbx
movq -0x190(%rbp), %rdi
cmpq %r12, %rdi
je 0x132f4
movq -0x180(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x132f4
movq %rax, %rbx
movb $0x1, %r15b
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x13424
movq -0x88(%rbp), %rsi
jmp 0x13414
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
cmpq %r15, %rdi
je 0x1333a
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x1333a
movq %rax, %rbx
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x13477
movq -0xe0(%rbp), %rsi
jmp 0x1346a
jmp 0x13474
movq %rax, %rbx
movb $0x1, %r15b
testb %r15b, %r15b
je 0x13477
movq %r14, %rdi
callq 0x31a0
jmp 0x13477
jmp 0x1341e
movq %rax, %rbx
movq -0x1d0(%rbp), %rdi
cmpq %r12, %rdi
je 0x13424
movq -0x1c0(%rbp), %rsi
jmp 0x13414
jmp 0x1341e
movq %rax, %rbx
movq -0x130(%rbp), %rdi
cmpq %r15, %rdi
je 0x13477
movq -0x120(%rbp), %rsi
jmp 0x1346a
jmp 0x13474
movq %rax, %rbx
movq -0x150(%rbp), %rdi
cmpq %r15, %rdi
je 0x13499
movq -0x140(%rbp), %rsi
jmp 0x13491
movq %rax, %rbx
movq -0x1f0(%rbp), %rdi
cmpq %r12, %rdi
je 0x13424
movq -0x1e0(%rbp), %rsi
jmp 0x13414
jmp 0x1341e
movq %rax, %rbx
movq -0x210(%rbp), %rdi
cmpq %r12, %rdi
je 0x13424
movq -0x200(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x13424
movq %rax, %rbx
movb $0x1, %r15b
testb %r15b, %r15b
je 0x13499
movq %r14, %rdi
callq 0x31a0
jmp 0x13499
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x13450
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x13450
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x13477
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x13477
movq %rax, %rbx
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x13499
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x33f0