// File: /workspace/github_cpp_makefile_star2_O3/Nallantli[P]Rossa/main/rossa/tokenizer/tokenizer.cpp
// Function: lexString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::filesystem::__cxx11::path const&)
const std::vector<token_t> lexString(const std::string &INPUT, const std::filesystem::path &filename)
{
	std::vector<std::string> LINES;
	std::stringstream ss(INPUT);
	std::string item;

	while (std::getline(ss, item, '\n'))
	{
		LINES.push_back(item);
	}

	std::vector<token_t> tokens;
	size_t INPUT_INDEX = 0;
	size_t LINE_INDEX = 0;
	size_t TOKEN_DIST = 0;
	std::string ID_STRING;

	bool in_sig = false;

	while (true)
	{
		int token = getToken(INPUT, INPUT_INDEX, LINE_INDEX, TOKEN_DIST, ID_STRING);
		if (token == TOK_EOF)
			break;
		if (token == '#')
			continue;
		token_t t = {filename, LINES[LINE_INDEX], LINE_INDEX, TOKEN_DIST, ID_STRING, token};
		if (t.type == TOK_DEF)
		{
			in_sig = true;
			tokens.push_back(t);
		}
		else
		{
			if (in_sig)
			{
				if (t.type == '(' && tokens.back().type == TOK_DEF)
				{
					tokens.back().type = TOK_LAMBDA;
				}
				if (t.type != TOK_IDF && t.valueString == ">>")
				{
					tokens.push_back({t.filename, t.line, t.lineNumber, t.distance, ">", '>'});
					tokens.push_back({t.filename, t.line, t.lineNumber, t.distance, ">", '>'});
				}
				else if (t.type != TOK_IDF && t.valueString == "<<")
				{
					tokens.push_back({t.filename, t.line, t.lineNumber, t.distance, "<", '<'});
					tokens.push_back({t.filename, t.line, t.lineNumber, t.distance, "<", '<'});
				}
				else if (t.type != TOK_IDF && t.valueString == "<>")
				{
					tokens.push_back({t.filename, t.line, t.lineNumber, t.distance, "<", '<'});
					tokens.push_back({t.filename, t.line, t.lineNumber, t.distance, ">", '>'});
				}
				else
				{
					tokens.push_back(t);
				}
				if (tokens.back().type == ')')
				{
					in_sig = false;
				}
			}
			else
			{
				tokens.push_back(t);
			}
		}
	}

	for (auto &t : tokens)
	{
		while (!t.line.empty() && isspace(t.line[0]))
		{
			t.line = t.line.substr(1);
			t.distance--;
		}
	}

	return tokens;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x140(%rsp)
movq $0x0, 0x150(%rsp)
leaq 0x180(%rsp), %rdi
movl $0x18, %edx
callq 0x10630
leaq 0x170(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x180(%rsp), %rbx
leaq 0x160(%rsp), %r14
leaq 0x140(%rsp), %r12
movq %rbx, %rdi
movq %r14, %rsi
movl $0xa, %edx
callq 0x10720
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x23864
movq %r12, %rdi
movq %r14, %rsi
callq 0x20cde
jmp 0x23839
xorps %xmm0, %xmm0
movq 0x8(%rsp), %rax
movups %xmm0, (%rax)
xorl %r12d, %r12d
movq %r12, 0x10(%rax)
leaq 0x158(%rsp), %rax
movq %r12, (%rax)
leaq 0x118(%rsp), %rax
movq %r12, (%rax)
leaq 0x110(%rsp), %rax
movq %r12, (%rax)
leaq 0x130(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r12, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x90(%rsp), %rbp
movq %r15, %rdi
leaq 0x158(%rsp), %rsi
leaq 0x118(%rsp), %rdx
leaq 0x110(%rsp), %rcx
leaq 0x120(%rsp), %r8
callq 0x21eb7
movl %eax, %ebx
cmpl $0x23, %eax
je 0x238b2
cmpl $-0x1, %ebx
je 0x23ed4
movq %rbp, %r14
movq %rbp, %rdi
movq %r13, %rbp
movq %r13, %rsi
callq 0x1e566
movq 0x118(%rsp), %r13
movq 0x140(%rsp), %rax
movq %r13, %rcx
shlq $0x5, %rcx
leaq 0xc8(%rsp), %rdx
movq %rdx, 0xb8(%rsp)
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
addq %rsi, %rdx
leaq 0xb8(%rsp), %rdi
callq 0x1ded4
movq %r13, 0xd8(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0xe0(%rsp)
leaq 0xf8(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rdx
addq %rsi, %rdx
leaq 0xe8(%rsp), %rdi
callq 0x1ded4
movl %ebx, 0x108(%rsp)
cmpl $-0xe, %ebx
movq %rbp, %r13
jne 0x239aa
movb $0x1, %r12b
movq 0x8(%rsp), %rdi
movq %r14, %rbp
movq %r14, %rsi
callq 0x241ce
jmp 0x23e7d
testb $0x1, %r12b
movq %r14, %rbp
je 0x23a54
cmpl $0x28, %ebx
jne 0x239d9
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
cmpl $-0xe, -0x8(%rax)
jne 0x239de
movl $0xffffffca, -0x8(%rax) # imm = 0xFFFFFFCA
movl 0x108(%rsp), %ebx
cmpl $-0x2, %ebx
je 0x23a42
leaq 0xe8(%rsp), %rdi
leaq 0x5fada(%rip), %rsi     # 0x834c7
callq 0x10110
testl %eax, %eax
je 0x23a69
cmpl $-0x2, 0x108(%rsp)
je 0x23a42
leaq 0xe8(%rsp), %rdi
leaq 0x5fab5(%rip), %rsi     # 0x834c4
callq 0x10110
testl %eax, %eax
je 0x23bab
cmpl $-0x2, 0x108(%rsp)
je 0x23a42
leaq 0xe8(%rsp), %rdi
leaq 0x5fa95(%rip), %rsi     # 0x834ca
callq 0x10110
testl %eax, %eax
je 0x23ced
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x241ce
jmp 0x23e6c
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x241ce
xorl %r12d, %r12d
jmp 0x23e7d
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x1e566
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x1ded4
movups 0xd8(%rsp), %xmm0
movups %xmm0, 0x58(%rsp)
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x5f868(%rip), %rsi     # 0x83328
leaq 0x5f862(%rip), %rdx     # 0x83329
callq 0x1e698
movl $0x3e, 0x88(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x24644
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x23b02
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x23b1e
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x103d0
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x1d5ee
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x1e566
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x1ded4
movups 0xd8(%rsp), %xmm0
movups %xmm0, 0x58(%rsp)
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x5f7a8(%rip), %rsi     # 0x83328
leaq 0x5f7a2(%rip), %rdx     # 0x83329
callq 0x1e698
movl $0x3e, 0x88(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x24644
jmp 0x23e2a
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x1e566
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x1ded4
movups 0xd8(%rsp), %xmm0
movups %xmm0, 0x58(%rsp)
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x5f75d(%rip), %rsi     # 0x8335f
leaq 0x5f757(%rip), %rdx     # 0x83360
callq 0x1e698
movl $0x3c, 0x88(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x24644
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x23c44
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x23c60
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x103d0
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x1d5ee
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x1e566
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x1ded4
movups 0xd8(%rsp), %xmm0
movups %xmm0, 0x58(%rsp)
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x5f69d(%rip), %rsi     # 0x8335f
leaq 0x5f697(%rip), %rdx     # 0x83360
callq 0x1e698
movl $0x3c, 0x88(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x24644
jmp 0x23e2a
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x1e566
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x1ded4
movups 0xd8(%rsp), %xmm0
movups %xmm0, 0x58(%rsp)
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x5f61b(%rip), %rsi     # 0x8335f
leaq 0x5f615(%rip), %rdx     # 0x83360
callq 0x1e698
movl $0x3c, 0x88(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x24644
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x23d86
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x23da2
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x103d0
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x1d5ee
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x1e566
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x1ded4
movups 0xd8(%rsp), %xmm0
movups %xmm0, 0x58(%rsp)
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x5f524(%rip), %rsi     # 0x83328
leaq 0x5f51e(%rip), %rdx     # 0x83329
callq 0x1e698
movl $0x3e, 0x88(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x24644
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x23e46
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x23e62
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x103d0
leaq 0x10(%rsp), %rdi
callq 0x1d5ee
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
cmpl $0x29, -0x8(%rax)
setne %r12b
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x23ea2
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x23ec7
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x103d0
movq %rbp, %rdi
callq 0x1d5ee
jmp 0x238b2
movq 0x8(%rsp), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
cmpq %r12, %r15
je 0x23f62
leaq 0xa0(%rsp), %r13
leaq 0x90(%rsp), %rbx
cmpq $0x0, 0x30(%r15)
je 0x23f59
leaq 0x28(%r15), %r14
movq (%r14), %rax
movsbl (%rax), %edi
callq 0x10060
testl %eax, %eax
je 0x23f59
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x10410
movq %r14, %rdi
movq %rbx, %rsi
callq 0x104f0
movq 0x90(%rsp), %rdi
cmpq %r13, %rdi
je 0x23f4e
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x103d0
decq 0x50(%r15)
cmpq $0x0, 0x30(%r15)
jne 0x23f00
subq $-0x80, %r15
cmpq %r12, %r15
jne 0x23ef5
movq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %rax
cmpq %rax, %rdi
je 0x23f87
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x23fac
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x90f9d(%rip), %rsi     # 0xb4f50
leaq 0x180(%rsp), %rdi
callq 0x102e0
leaq 0x200(%rsp), %rdi
callq 0x10150
leaq 0x140(%rsp), %rdi
callq 0x1db60
movq 0x8(%rsp), %rax
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x24019
jmp 0x24028
jmp 0x24049
jmp 0x2405a
jmp 0x24019
jmp 0x24028
jmp 0x24049
jmp 0x2405a
jmp 0x24019
jmp 0x24028
jmp 0x24049
jmp 0x2405a
jmp 0x24019
jmp 0x24028
jmp 0x24049
jmp 0x2405a
jmp 0x24019
jmp 0x24028
jmp 0x24049
jmp 0x2405a
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x2108a
jmp 0x2405d
movq %rax, %r14
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x2404c
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x2404c
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x1d5ee
jmp 0x2405d
jmp 0x2405a
movq %rax, %r14
leaq 0x90(%rsp), %rdi
callq 0x2108a
jmp 0x240b9
movq %rax, %r14
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x24099
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x24099
movq %rax, %r14
leaq 0x90(%rsp), %rdi
callq 0x1d5ee
jmp 0x240b9
jmp 0x240b6
movq %rax, %r14
jmp 0x2412e
jmp 0x240b6
movq %rax, %r14
jmp 0x240e8
movq %rax, %r14
movq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %rax
cmpq %rax, %rdi
je 0x240de
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x8(%rsp), %rdi
callq 0x20a7e
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x2410d
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x90e3c(%rip), %rsi     # 0xb4f50
leaq 0x180(%rsp), %rdi
callq 0x102e0
leaq 0x200(%rsp), %rdi
callq 0x10150
leaq 0x140(%rsp), %rdi
callq 0x1db60
movq %r14, %rdi
callq 0x106f0