// File: /workspace/github_cpp_makefile_star2_O3/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, -0x88(%rbp)
movq %rsi, -0x90(%rbp)
movq 0x8(%rdi), %rax
movq (%rdi), %rcx
xorl %edx, %edx
movq %rdx, -0xb8(%rbp)
movq %rdx, -0x60(%rbp)
subq %rcx, %rax
je 0x12e7e
movq %rdi, %rbx
sarq $0x4, %rax
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r12
leaq -0x3(%r12), %rax
movq %rax, -0xc8(%rbp)
leaq -0x40(%rbp), %r13
xorl %ecx, %ecx
xorl %r14d, %r14d
movq %r12, -0xc0(%rbp)
movq (%rbx), %rsi
leaq (%r14,%r14,2), %r15
shlq $0x4, %r15
movl 0x20(%rsi,%r15), %eax
addq %r15, %rsi
cmpl $0x1, %eax
je 0x129b0
cmpl $0x39, %eax
je 0x1299c
cmpl $0x37, %eax
jne 0x12afa
movq %r14, -0xb8(%rbp)
movb $0x1, %cl
jmp 0x12afa
decq %r14
movq %r14, -0x60(%rbp)
movq %rbx, %rdi
callq 0x139f4
jmp 0x12af8
testb $0x1, %cl
je 0x12af8
movq %rsi, %rdi
leaq 0x8dcc(%rip), %rsi      # 0x1b78f
callq 0x30a0
movb $0x1, %cl
testl %eax, %eax
jne 0x12afa
cmpq -0xc8(%rbp), %r14
jae 0x12e90
movq (%rbx), %rax
cmpl $0x39, 0x80(%rax,%r15)
jne 0x12efc
incq %r14
leaq (%r14,%r14,2), %rcx
shlq $0x4, %rcx
movq %rcx, -0x58(%rbp)
movl 0x20(%rax,%rcx), %ecx
cmpl $0x38, %ecx
leaq -0xe8(%rbp), %r12
je 0x12b13
cmpl $0x1c, %ecx
leaq -0x138(%rbp), %r14
jne 0x12f68
addq -0x58(%rbp), %rax
leaq -0x198(%rbp), %r15
movq %r15, -0x1a8(%rbp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x1a8(%rbp), %rdi
callq 0x4d52
movq -0x1a8(%rbp), %rdi
movl $0x4, %esi
callq 0x33b0
movl %eax, %r13d
movq -0x1a8(%rbp), %rdi
cmpq %r15, %rdi
je 0x12a7b
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x3230
testl %r13d, %r13d
jne 0x12fd4
movq (%rbx), %rax
movq %r14, -0x148(%rbp)
movq -0x58(%rbp), %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
addq %rsi, %rdx
leaq -0x148(%rbp), %r15
movq %r15, %rdi
callq 0x4d52
movq %rbx, %rdi
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq %r15, %rcx
leaq -0xb8(%rbp), %r8
leaq -0x60(%rbp), %r9
callq 0x1338f
leaq -0x40(%rbp), %r13
movq -0x148(%rbp), %rdi
cmpq %r14, %rdi
movq -0xc0(%rbp), %r12
je 0x12995
movq -0x138(%rbp), %rsi
jmp 0x12e71
xorl %ecx, %ecx
movq -0x60(%rbp), %r14
incq %r14
movq %r14, -0x60(%rbp)
cmpq %r12, %r14
jb 0x12968
jmp 0x12e7e
leaq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
movq $0x0, -0x78(%rbp)
movb $0x0, -0x70(%rbp)
cmpq $0x0, -0x90(%rbp)
je 0x12ddd
xorl %r14d, %r14d
movq -0x88(%rbp), %rax
movq (%rax,%r14,8), %rsi
leaq -0xb0(%rbp), %r12
movq %r12, %rdi
leaq -0x108(%rbp), %rdx
callq 0xf618
movq %r12, %rdi
leaq 0x92d8(%rip), %rsi      # 0x1be3b
callq 0x3430
movq %r13, -0x50(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x12b88
movq %rdx, -0x50(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x40(%rbp)
jmp 0x12b90
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, -0x48(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rbx), %rax
movq -0x58(%rbp), %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
leaq -0x50(%rbp), %rdi
callq 0x30b0
leaq -0x118(%rbp), %r12
movq %r12, -0x128(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x12bf0
movq %rdx, -0x128(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x118(%rbp)
jmp 0x12bf8
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, -0x120(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x128(%rbp), %rdi
movl $0x4, %esi
callq 0x33b0
movl %eax, %r13d
movq -0x128(%rbp), %rdi
cmpq %r12, %rdi
je 0x12c41
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x3230
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
leaq -0xe8(%rbp), %r12
je 0x12c61
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3230
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x12c83
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x3230
testl %r13d, %r13d
je 0x12ca1
incq %r14
cmpq %r14, -0x90(%rbp)
leaq -0x40(%rbp), %r13
jne 0x12b38
jmp 0x12ddd
movq -0x88(%rbp), %rax
movq (%rax,%r14,8), %rsi
leaq -0x108(%rbp), %r14
movq %r14, %rdi
leaq -0x29(%rbp), %rdx
callq 0xf618
movq %r14, %rdi
leaq 0x9172(%rip), %rsi      # 0x1be3b
callq 0x3430
leaq -0x40(%rbp), %r13
leaq -0xa0(%rbp), %r14
movq %r14, -0xb0(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x12d02
movq %rdx, -0xb0(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xa0(%rbp)
jmp 0x12d09
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, -0xa8(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rbx), %rax
movq -0x58(%rbp), %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
leaq -0xb0(%rbp), %rdi
callq 0x30b0
movq %r13, -0x50(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x12d5f
movq %rdx, -0x50(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x40(%rbp)
jmp 0x12d67
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, -0x48(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x80(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x32b0
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x12da0
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3230
movq -0xb0(%rbp), %rdi
cmpq %r14, %rdi
je 0x12dbb
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x3230
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x12ddd
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x3230
leaq -0x80(%rbp), %rdi
leaq 0x86fc(%rip), %rsi      # 0x1b4e4
callq 0x30a0
testl %eax, %eax
je 0x1302d
leaq -0xd8(%rbp), %r14
movq %r14, -0xe8(%rbp)
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x4d52
movq %r12, %rcx
movq -0xc0(%rbp), %r12
movq %rbx, %rdi
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
leaq -0xb8(%rbp), %r8
leaq -0x60(%rbp), %r9
callq 0x1338f
movq -0xe8(%rbp), %rdi
cmpq %r14, %rdi
je 0x12e5c
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x3230
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x12995
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x12995
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 -0x1f8(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x88e8(%rip), %rsi      # 0x1b797
leaq 0x8902(%rip), %rdx      # 0x1b7b8
leaq -0x208(%rbp), %rdi
callq 0x4336
movb $0x1, %r12b
leaq -0x208(%rbp), %rcx
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5470
xorl %r12d, %r12d
leaq 0xfe90(%rip), %rsi      # 0x22d78
leaq -0xd909(%rip), %rdx     # 0x55e6
movq %r14, %rdi
callq 0x33d0
jmp 0x13146
movl $0x50, %edi
callq 0x3120
movq %rax, %r14
leaq -0x1d8(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x889e(%rip), %rsi      # 0x1b7b9
leaq 0x88bd(%rip), %rdx      # 0x1b7df
leaq -0x1e8(%rbp), %rdi
callq 0x4336
movb $0x1, %r12b
leaq -0x1e8(%rbp), %rcx
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5470
xorl %r12d, %r12d
leaq 0xfe24(%rip), %rsi      # 0x22d78
leaq -0xd975(%rip), %rdx     # 0x55e6
movq %r14, %rdi
callq 0x33d0
jmp 0x13146
movl $0x50, %edi
callq 0x3120
movq %rax, %r14
leaq -0x1b8(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x886f(%rip), %rsi      # 0x1b7f6
leaq 0x8885(%rip), %rdx      # 0x1b813
leaq -0x1c8(%rbp), %rdi
callq 0x4336
movb $0x1, %r12b
leaq -0x1c8(%rbp), %rcx
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5470
xorl %r12d, %r12d
leaq 0xfdb8(%rip), %rsi      # 0x22d78
leaq -0xd9e1(%rip), %rdx     # 0x55e6
movq %r14, %rdi
callq 0x33d0
jmp 0x13146
movl $0x50, %edi
callq 0x3120
movq %rax, %r14
movq -0x58(%rbp), %rdx
addq (%rbx), %rdx
leaq 0x87f1(%rip), %rsi      # 0x1b7e0
leaq -0x80(%rbp), %rdi
callq 0x40f1
leaq 0x87e7(%rip), %rsi      # 0x1b7e6
leaq -0x80(%rbp), %rdi
callq 0x3430
leaq -0x178(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rcx
movq %rax, %rdx
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0x1308a
movups (%rdx), %xmm0
movups %xmm0, (%r12)
jmp 0x1309b
movl $0x50, %edi
callq 0x3120
movq %rax, %r14
movq (%rbx), %rax
leaq (%rax,%r15), %rdx
addq $0x30, %rdx
leaq 0x8794(%rip), %rsi      # 0x1b7e0
leaq -0x50(%rbp), %rdi
callq 0x40f1
leaq 0x878a(%rip), %rsi      # 0x1b7e6
leaq -0x50(%rbp), %rdi
callq 0x3430
leaq -0x158(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rcx
movq %rax, %rdx
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0x130e9
movups (%rdx), %xmm0
movups %xmm0, (%r12)
jmp 0x130fa
movq %rcx, -0x188(%rbp)
movq (%rdx), %rcx
movq %rcx, -0x178(%rbp)
movq 0x8(%rax), %rsi
leaq -0x188(%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 0xfca0(%rip), %rsi      # 0x22d78
leaq -0xdaf9(%rip), %rdx     # 0x55e6
movq %r14, %rdi
callq 0x33d0
jmp 0x13146
movq %rcx, -0x168(%rbp)
movq (%rdx), %rcx
movq %rcx, -0x158(%rbp)
movq 0x8(%rax), %rsi
leaq -0x168(%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 0xfc41(%rip), %rsi      # 0x22d78
leaq -0xdb58(%rip), %rdx     # 0x55e6
movq %r14, %rdi
callq 0x33d0
movq %rax, %rbx
movq -0x168(%rbp), %rdi
cmpq %r12, %rdi
je 0x13164
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x3230
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x1317d
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3230
testb %r15b, %r15b
jne 0x13268
jmp 0x1336e
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x13268
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x13268
movq %rax, %rbx
movq -0x188(%rbp), %rdi
cmpq %r12, %rdi
je 0x131ce
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x3230
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x131e7
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x3230
testb %r15b, %r15b
jne 0x13320
jmp 0x13387
movq %rax, %rbx
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x13320
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x13320
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
cmpq %r14, %rdi
je 0x1323d
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x1323d
movq %rax, %rbx
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x1336e
movq -0xf8(%rbp), %rsi
jmp 0x13361
jmp 0x1336b
movq %rax, %rbx
movq %r14, %rdi
callq 0x31a0
jmp 0x1336e
jmp 0x1331d
movq %rax, %rbx
movq -0x1c8(%rbp), %rdi
cmpq %r15, %rdi
je 0x13316
movq -0x1b8(%rbp), %rsi
jmp 0x1330e
jmp 0x1331d
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
cmpq %r14, %rdi
je 0x1336e
movq -0xd8(%rbp), %rsi
jmp 0x13361
jmp 0x1336b
movq %rax, %rbx
movq -0x148(%rbp), %rdi
cmpq %r14, %rdi
je 0x13387
movq -0x138(%rbp), %rsi
jmp 0x1337f
movq %rax, %rbx
movq -0x1e8(%rbp), %rdi
cmpq %r15, %rdi
je 0x13316
movq -0x1d8(%rbp), %rsi
jmp 0x1330e
jmp 0x1331d
movq %rax, %rbx
movq -0x208(%rbp), %rdi
cmpq %r15, %rdi
je 0x13316
movq -0x1f8(%rbp), %rsi
incq %rsi
callq 0x3230
testb %r12b, %r12b
jne 0x13320
jmp 0x13387
movq %rax, %rbx
movq %r14, %rdi
callq 0x31a0
jmp 0x13387
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x13347
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x13347
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x1336e
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x3230
jmp 0x1336e
movq %rax, %rbx
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x13387
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x33f0