// File: /workspace/github_cpp_makefile_star2_O3/ClauParser[P]ClauParser/./include/clau_parser.h
// Function: clau_parser::LoadData::_LoadData(clau_parser::InFileReserver&, clau_parser::UserType&, int, int)
static bool _LoadData(InFileReserver& reserver, UserType& global, const int lex_thr_num, const int parse_num) // first, strVec.empty() must be true!!
		{
			const int pivot_num = parse_num - 1;
			char* buffer = nullptr;
			int64_t* token_arr = nullptr;
			size_t buffer_total_len;
			size_t token_arr_len = 0;

			{

				auto a = std::chrono::steady_clock::now();

				bool success = reserver(lex_thr_num, buffer, &buffer_total_len, token_arr, &token_arr_len);


				auto b = std::chrono::steady_clock::now();
				auto dur = std::chrono::duration_cast<std::chrono::milliseconds>(b - a);
				//std::cout << "scan " << dur.count() << "ms\n";

				//	{
				//		for (int64_t i = 0; i < token_arr_len; ++i) {
				//			std::string(buffer + Utility::GetIdx(token_arr[i]), Utility::GetLength(token_arr[i]));
			//				if (0 == Utility::GetIdx(token_arr[i])) {
				//				//std::cout << "chk";
				//			}
				//		}
				//	}

				if (!success) {
					return false;
				}
				if (token_arr_len <= 0) {
					if (buffer) {
						delete[] buffer;
					}
					if (token_arr) {
						delete[] token_arr;
					}
					return true;
				}
			}

			UserType* before_next = nullptr;
			UserType _global;

			{
				std::set<int64_t> _pivots;
				std::vector<int64_t> pivots;
				const int64_t num = token_arr_len; //

				if (pivot_num > 0) {
					std::vector<int64_t> pivot;
					pivots.reserve(pivot_num);
					pivot.reserve(pivot_num);

					for (int i = 0; i < pivot_num; ++i) {
						pivot.push_back(FindDivisionPlace(buffer, token_arr, (num / (pivot_num + 1)) * (i), (num / (pivot_num + 1)) * (i + 1) - 1));
					}

					for (size_t i = 0; i < pivot.size(); ++i) {
						if (pivot[i] != -1) {
							_pivots.insert(pivot[i]);
						}
					}

					for (auto& x : _pivots) {
						pivots.push_back(x);
					}
				}

				std::vector<UserType*> next(pivots.size() + 1, nullptr);

				{
					std::vector<UserType> __global(pivots.size() + 1);

					std::vector<std::thread> thr(pivots.size() + 1);
					std::vector<int> err(pivots.size() + 1, 0);
					{
						int64_t idx = pivots.empty() ? num - 1 : pivots[0];
						int64_t _token_arr_len = idx - 0 + 1;

						thr[0] = std::thread(__LoadData, buffer, token_arr, _token_arr_len, &__global[0], 0, 0, &next[0], &err[0]);
					}

					for (size_t i = 1; i < pivots.size(); ++i) {
						int64_t _token_arr_len = pivots[i] - (pivots[i - 1] + 1) + 1;

						thr[i] = std::thread(__LoadData, buffer, token_arr + pivots[i - 1] + 1, _token_arr_len, &__global[i], 0, 0, &next[i], &err[i]);

					}

					if (pivots.size() >= 1) {
						int64_t _token_arr_len = num - 1 - (pivots.back() + 1) + 1;

						thr[pivots.size()] = std::thread(__LoadData, buffer, token_arr + pivots.back() + 1, _token_arr_len, &__global[pivots.size()],
							0, 0, &next[pivots.size()], &err[pivots.size()]);
					}


					//	auto a = std::chrono::steady_clock::now();

						// wait
					for (size_t i = 0; i < thr.size(); ++i) {
						thr[i].join();
					}


					//	auto b = std::chrono::steady_clock::now();
					//	auto dur = std::chrono::duration_cast<std::chrono::milliseconds>(b - a);
						////std::cout << "parse1 " << dur.count() << "ms\n";

					for (size_t i = 0; i < err.size(); ++i) {
						switch (err[i]) {
						case 0:
							break;
						case -1:
						case -4:
							//std::cout << "Syntax Error\n";
							break;
						case -2:
							//std::cout << "error final state is not last_state!\n";
							break;
						case -3:
							//std::cout << "error x > buffer + buffer_len:\n";
							break;
						default:
							//std::cout << "unknown parser error\n";
							break;
						}
					}

					// Merge
					try {
						if (__global[0].GetUserTypeListSize() > 0 && __global[0].GetUserTypeList(0)->GetName() == "#") {
							//std::cout << "not valid file1\n";
							throw 1;
						}
						if (next.back()->GetParent() != nullptr) {
							//std::cout << "not valid file2\n";
							throw 2;
						}

						int err = Merge(&_global, &__global[0], &next[0]);
						if (-1 == err || (pivots.size() == 0 && 1 == err)) {
							//std::cout << "not valid file3\n";
							throw 3;
						}

						for (size_t i = 1; i < pivots.size() + 1; ++i) {
							// linearly merge and error check...
							int err = Merge(next[i - 1], &__global[i], &next[i]);
							if (-1 == err) {
								//std::cout << "not valid file4\n";
								throw 4;
							}
							else if (i == pivots.size() && 1 == err) {
								//std::cout << "not valid file5\n";
								throw 5;
							}
						}
					}
					catch (...) {
						if (reserver.use_file()) {
							delete[] buffer;
						}
						delete[] token_arr;
						buffer = nullptr;
						throw "in Merge, error";
					}

					before_next = next.back();

					//auto c = std::chrono::steady_clock::now();
					//auto dur2 = std::chrono::duration_cast<std::chrono::nanoseconds>(c - b);
					////std::cout << "parse2 " << dur2.count() << "ns\n";
				}
			}

			if (reserver.use_file()) {
				delete[] buffer;
			}
			delete[] token_arr;

			global = std::move(_global);
			//	chk(&global);
			return true;
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movl %ecx, %r12d
movl %edx, %ebx
movq %rsi, 0x128(%rsp)
movq %rdi, %rbp
xorl %eax, %eax
leaq 0x38(%rsp), %r14
movq %rax, (%r14)
leaq 0x58(%rsp), %r15
movq %rax, (%r15)
leaq 0xf0(%rsp), %r13
movq %rax, (%r13)
callq 0x2230
leaq 0x130(%rsp), %rcx
movq %rbp, %rdi
movl %ebx, %esi
movq %r14, %rdx
movq %r15, %r8
movq %r13, %r9
callq 0x4c86
movl %eax, %r14d
callq 0x2230
testb %r14b, %r14b
je 0x4a47
cmpq $0x0, 0xf0(%rsp)
je 0x4a29
movb %r14b, 0xf(%rsp)
leaq 0x108(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x5e58(%rip), %rdx      # 0xa0e7
leaq 0xf8(%rsp), %rdi
movq %rdx, %rsi
callq 0x8698
leaq 0x9a22(%rip), %rax      # 0xdcc8
leaq 0x140(%rsp), %rdi
movq %rax, -0x8(%rdi)
leaq 0x150(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0xf8(%rsp), %rsi
movq 0x100(%rsp), %rdx
addq %rsi, %rdx
callq 0x3bf8
leaq 0x9a0b(%rip), %rax      # 0xdce8
leaq 0x160(%rsp), %rdi
movq %rax, -0x28(%rdi)
movl $0x82, %edx
xorl %esi, %esi
callq 0x2100
movq 0xf8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4312
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x21a0
leaq 0x100(%rsp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq %rax, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0xf0(%rsp), %rbx
movl $0x1, %esi
cmpl $0x2, %r12d
movq %rbp, 0xc8(%rsp)
movq %rbx, 0xd0(%rsp)
jl 0x44db
leal -0x1(%r12), %eax
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movl %eax, %r13d
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x4cea
leaq 0x40(%rsp), %rdi
movq %r13, %rsi
callq 0x4cea
movl %r12d, %ecx
movq %rbx, %rax
cqto
idivq %rcx
movq %rax, %rbx
leaq -0x1(%rax), %rbp
xorl %r14d, %r14d
leaq 0x40(%rsp), %r15
leaq 0x98(%rsp), %r12
movq 0x38(%rsp), %rdi
movq 0x58(%rsp), %rsi
leaq (%r14,%rbp), %rcx
movq %r14, %rdx
callq 0x4d86
movq %rax, 0x98(%rsp)
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0x43f0
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x48(%rsp)
jmp 0x43fb
movq %r15, %rdi
movq %r12, %rdx
callq 0x7b74
addq %rbx, %r14
decq %r13
jne 0x43b8
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rax
cmpq %rsi, %rax
je 0x4452
xorl %r14d, %r14d
leaq 0xf8(%rsp), %rbx
xorl %r15d, %r15d
cmpq $-0x1, (%rsi,%r14)
je 0x443c
addq %r14, %rsi
movq %rbx, %rdi
callq 0x7c94
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rax
incq %r15
movq %rax, %rcx
subq %rsi, %rcx
sarq $0x3, %rcx
addq $0x8, %r14
cmpq %rcx, %r15
jb 0x4420
movq 0x110(%rsp), %rbx
leaq 0x100(%rsp), %r15
cmpq %r15, %rbx
je 0x44aa
leaq 0x10(%rsp), %r14
leaq 0x20(%rbx), %rdx
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x448d
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x4495
movq %r14, %rdi
callq 0x7da6
movq %rbx, %rdi
callq 0x21e0
movq %rax, %rbx
cmpq %r15, %rax
jne 0x446c
movq 0x40(%rsp), %rsi
testq %rsi, %rsi
je 0x44c2
movq 0x50(%rsp), %rax
subq %rsi, %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x21a0
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
sarq $0x3, %rsi
incq %rsi
movq 0xd0(%rsp), %rbx
leaq 0x98(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x40(%rsp), %rdi
leaq 0xb0(%rsp), %rcx
callq 0x4ddc
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
sarq $0x3, %rsi
incq %rsi
leaq 0x98(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x4f0a
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
sarq $0x3, %rsi
incq %rsi
leaq 0xb0(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
callq 0x4f9e
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
sarq $0x3, %rsi
incq %rsi
leaq 0x80(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0xd8(%rsp), %rdi
leaq 0x60(%rsp), %rcx
callq 0x500c
movq 0x10(%rsp), %rcx
movq %rbx, %rax
cmpq 0x18(%rsp), %rcx
je 0x458e
movq (%rcx), %rax
incq %rax
leaq 0x80(%rsp), %r8
movq %rax, (%r8)
movq 0x98(%rsp), %rax
leaq 0x90(%rsp), %r9
movq %rax, (%r9)
xorl %eax, %eax
leaq 0x70(%rsp), %r14
movl %eax, (%r14)
leaq 0x34(%rsp), %r11
movl %eax, (%r11)
movq 0x40(%rsp), %rax
leaq 0x88(%rsp), %r10
movq %rax, (%r10)
movq 0xd8(%rsp), %rax
leaq 0x78(%rsp), %r15
movq %rax, (%r15)
leaq 0xba3(%rip), %rsi       # 0x5188
leaq 0x60(%rsp), %rdi
leaq 0x38(%rsp), %rdx
leaq 0x58(%rsp), %rcx
pushq %r15
pushq %r10
pushq %r11
pushq %r14
callq 0x5f64
addq $0x20, %rsp
movq 0xb0(%rsp), %rdi
cmpq $0x0, (%rdi)
jne 0x4ab0
movq 0x60(%rsp), %rax
movq %rax, (%rdi)
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rsi
movq %rsi, %rdx
subq %rcx, %rdx
movq %rdx, %rax
sarq $0x3, %rax
cmpq $0x2, %rax
jb 0x4754
movl $0x1, %r12d
xorl %r13d, %r13d
leaq 0x38(%rsp), %r14
leaq 0x90(%rsp), %rbx
leaq 0x80(%rsp), %r15
leaq 0x88(%rsp), %rbp
leaq (,%r12,8), %rax
movq (%rcx,%r12,8), %rdx
subq -0x8(%rcx,%r12,8), %rdx
movq %rdx, 0x80(%rsp)
movq 0x58(%rsp), %rdx
movq -0x8(%rcx,%r12,8), %rcx
leaq (%rdx,%rcx,8), %rcx
addq $0x8, %rcx
movq %rcx, 0x90(%rsp)
imulq $0xb0, %r12, %rcx
addq 0x98(%rsp), %rcx
movq %rcx, 0x88(%rsp)
movl %r13d, 0x34(%rsp)
movl %r13d, 0x6c(%rsp)
addq 0x40(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq (,%r12,4), %rax
addq 0xd8(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0xaa3(%rip), %rsi       # 0x5188
movq %r14, %rdx
movq %rbx, %rcx
movq %r15, %r8
movq %rbp, %r9
leaq 0x70(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
leaq 0x7c(%rsp), %rax
pushq %rax
leaq 0x4c(%rsp), %rax
pushq %rax
callq 0x6032
addq $0x20, %rsp
movq 0xb0(%rsp), %rdi
cmpq $0x0, (%rdi,%r12,8)
jne 0x4a5c
movq 0x60(%rsp), %rax
movq %rax, (%rdi,%r12,8)
incq %r12
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rsi
movq %rsi, %rdx
subq %rcx, %rdx
movq %rdx, %rax
sarq $0x3, %rax
cmpq %rax, %r12
jb 0x4666
cmpq %rcx, %rsi
movq 0xc8(%rsp), %r12
je 0x4838
movq -0x8(%rsi), %rcx
notq %rcx
movq 0xd0(%rsp), %rdi
addq %rcx, %rdi
leaq 0x80(%rsp), %r8
movq %rdi, (%r8)
movq 0x58(%rsp), %rcx
movq -0x8(%rsi), %rsi
leaq (%rcx,%rsi,8), %rsi
addq $0x8, %rsi
leaq 0x90(%rsp), %rcx
movq %rsi, (%rcx)
imulq $0xb0, %rax, %rsi
addq 0x98(%rsp), %rsi
leaq 0x88(%rsp), %r9
movq %rsi, (%r9)
xorl %esi, %esi
movl %esi, 0x34(%rsp)
leaq 0x6c(%rsp), %r10
movl %esi, (%r10)
addq 0x40(%rsp), %rdx
movq %rdx, 0x78(%rsp)
shlq $0x2, %rax
addq 0xd8(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x9a0(%rip), %rsi       # 0x5188
leaq 0x60(%rsp), %rdi
leaq 0x38(%rsp), %rdx
leaq 0x70(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
pushq %r10
leaq 0x4c(%rsp), %rax
pushq %rax
callq 0x6032
addq $0x20, %rsp
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
movq 0xb0(%rsp), %rdi
cmpq $0x0, (%rdi,%rax)
jne 0x4abc
movq 0x60(%rsp), %rcx
movq %rcx, (%rdi,%rax)
cmpq %rdi, 0xb8(%rsp)
je 0x4872
xorl %ebx, %ebx
xorl %r14d, %r14d
addq %rbx, %rdi
callq 0x22a0
incq %r14
movq 0xb0(%rsp), %rdi
movq 0xb8(%rsp), %rax
subq %rdi, %rax
sarq $0x3, %rax
addq $0x8, %rbx
cmpq %rax, %r14
jb 0x4847
movq 0x98(%rsp), %rcx
movq 0x60(%rcx), %rax
cmpq %rax, 0x68(%rcx)
je 0x489f
movq (%rax), %rdi
addq $0x8, %rdi
leaq 0x58a7(%rip), %rsi      # 0xa139
callq 0x2080
testl %eax, %eax
je 0x4ac1
movq 0x48(%rsp), %rax
movq -0x8(%rax), %rax
cmpq $0x0, 0x28(%rax)
jne 0x4ab5
movq 0x98(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0x138(%rsp), %rdi
xorl %ecx, %ecx
callq 0x6100
cmpl $-0x1, %eax
je 0x4a8a
movq 0x18(%rsp), %rcx
subq 0x10(%rsp), %rcx
sete %dl
cmpl $0x1, %eax
sete %al
testb %dl, %al
jne 0x4a8a
sarq $0x3, %rcx
decq %rcx
cmpq $-0x3, %rcx
ja 0x496b
movl $0x1, %ebx
movl $0xb0, %r14d
movl $0x8, %r15d
movq 0x40(%rsp), %rdx
movq -0x8(%rdx,%rbx,8), %rdi
addq %r15, %rdx
movq 0x98(%rsp), %rsi
addq %r14, %rsi
xorl %ecx, %ecx
callq 0x6100
cmpl $-0x1, %eax
je 0x4a61
movq 0x18(%rsp), %rcx
subq 0x10(%rsp), %rcx
sarq $0x3, %rcx
cmpl $0x1, %eax
jne 0x4955
cmpq %rcx, %rbx
je 0x4a68
incq %rbx
incq %rcx
addq $0xb0, %r14
addq $0x8, %r15
cmpq %rcx, %rbx
jb 0x4911
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x4988
movq 0xe8(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
leaq 0xb0(%rsp), %rdi
callq 0x62ce
leaq 0x98(%rsp), %rdi
callq 0x630a
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
movb 0xf(%rsp), %r14b
je 0x49be
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x49d5
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
leaq 0xf8(%rsp), %rdi
callq 0x988e
cmpq $0x0, (%r12)
je 0x49f8
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x49f8
callq 0x2220
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x4a07
callq 0x2220
leaq 0x138(%rsp), %rbx
movq 0x128(%rsp), %rdi
movq %rbx, %rsi
callq 0x4c46
movq %rbx, %rdi
callq 0x369a
jmp 0x4a47
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x4a38
callq 0x2220
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x4a47
callq 0x2220
movl %r14d, %eax
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2070
movl $0x4, %ebx
jmp 0x4a6d
movl $0x5, %ebx
movl $0x4, %edi
callq 0x20d0
movl %ebx, (%rax)
movq 0x9530(%rip), %rsi      # 0xdfb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x22b0
movl $0x4, %edi
callq 0x20d0
movl $0x3, (%rax)
movq 0x950f(%rip), %rsi      # 0xdfb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x22b0
jmp 0x4baf
callq 0x2070
movl $0x2, %ebx
jmp 0x4ac6
callq 0x2070
movl $0x1, %ebx
movl $0x4, %edi
callq 0x20d0
movl %ebx, (%rax)
movq 0x94d7(%rip), %rsi      # 0xdfb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x22b0
jmp 0x4b40
jmp 0x4b40
movq %rax, %rbx
jmp 0x4bd4
movq %rax, %rbx
jmp 0x4be1
jmp 0x4b45
movq %rax, %rbx
jmp 0x4c05
jmp 0x4b45
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4c36
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x21a0
jmp 0x4c36
movq %rax, %rbx
jmp 0x4c36
jmp 0x4b4d
jmp 0x4b4d
jmp 0x4b45
jmp 0x4b45
jmp 0x4b4d
jmp 0x4b40
movq %rax, %rbx
jmp 0x4bb7
movq %rax, %rbx
jmp 0x4bee
movq %rax, %rdi
callq 0x20b0
movq 0xc8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x4b72
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x4b72
callq 0x2220
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x4b81
callq 0x2220
movq $0x0, 0x38(%rsp)
movl $0x8, %edi
callq 0x20d0
leaq 0x55ee(%rip), %rcx      # 0xa189
movq %rcx, (%rax)
movq 0x941b(%rip), %rsi      # 0xdfc0
movq %rax, %rdi
xorl %edx, %edx
callq 0x22b0
movq %rax, %rbx
callq 0x2290
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x4bd4
movq 0xe8(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
leaq 0xb0(%rsp), %rdi
callq 0x62ce
leaq 0x98(%rsp), %rdi
callq 0x630a
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x4c05
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4c1c
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
leaq 0xf8(%rsp), %rdi
callq 0x988e
leaq 0x138(%rsp), %rdi
callq 0x369a
movq %rbx, %rdi
callq 0x22c0
movq %rax, %rdi
callq 0x3877