// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rcx, 0x128(%rsp)
movl %edx, %ebx
movq %rsi, 0x120(%rsp)
movq %rdi, %rbp
xorl %r12d, %r12d
leaq 0x28(%rsp), %r14
movq %r12, (%r14)
leaq 0x50(%rsp), %r15
movq %r12, (%r15)
leaq 0xe8(%rsp), %r13
movq %r12, (%r13)
callq 0x2240
leaq 0x130(%rsp), %rcx
movq %rbp, 0xc8(%rsp)
movq %rbp, %rdi
movl %ebx, %esi
movq %r14, %rdx
movq %r15, %r8
movq %r13, %r9
callq 0x4cac
movl %eax, %ebp
callq 0x2240
movl $0x0, %ebx
testb %bpl, %bpl
je 0x42db
cmpq $0x0, 0xe8(%rsp)
je 0x42b8
movb $0x1, %r12b
jmp 0x42db
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x42c7
callq 0x2230
movq 0x50(%rsp), %rdi
movb $0x1, %bl
testq %rdi, %rdi
je 0x42d8
callq 0x2230
xorl %r12d, %r12d
testb %r12b, %r12b
je 0x4a6c
leaq 0x100(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x5df0(%rip), %rdx      # 0xa0e7
leaq 0xf0(%rsp), %rdi
movq %rdx, %rsi
callq 0x85d2
leaq 0x99ba(%rip), %rax      # 0xdcc8
leaq 0x140(%rsp), %rdi
movq %rax, -0x8(%rdi)
leaq 0x150(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0xf0(%rsp), %rsi
movq 0xf8(%rsp), %rdx
addq %rsi, %rdx
callq 0x3c1e
leaq 0x99a3(%rip), %rax      # 0xdce8
leaq 0x160(%rsp), %rdi
movq %rax, -0x28(%rdi)
movl $0x82, %edx
xorl %esi, %esi
callq 0x2100
movq 0xf0(%rsp), %rdi
cmpq %r14, %rdi
je 0x437a
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x21a0
leaq 0xf8(%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, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq 0xe8(%rsp), %rbx
movq 0x128(%rsp), %r14
cmpl $0x2, %r14d
movq %rbx, 0xc0(%rsp)
jl 0x451b
leal -0x1(%r14), %eax
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movl %eax, %r13d
movq %rsp, %rdi
movq %r13, %rsi
callq 0x4d10
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x4d10
movl %r14d, %ecx
movq %rbx, %rax
cqto
idivq %rcx
movq %rax, %rbx
leaq -0x1(%rax), %rbp
xorl %r14d, %r14d
leaq 0x30(%rsp), %r15
leaq 0xa8(%rsp), %r12
movq 0x28(%rsp), %rdi
movq 0x50(%rsp), %rsi
leaq (%r14,%rbp), %rcx
movq %r14, %rdx
callq 0x4da6
movq %rax, 0xa8(%rsp)
movq 0x38(%rsp), %rsi
cmpq 0x40(%rsp), %rsi
je 0x444f
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x38(%rsp)
jmp 0x445a
movq %r15, %rdi
movq %r12, %rdx
callq 0x7a18
addq %rbx, %r14
decq %r13
jne 0x4417
movq 0x30(%rsp), %rsi
cmpq %rsi, 0x38(%rsp)
je 0x44ab
xorl %r14d, %r14d
leaq 0xf0(%rsp), %rbx
xorl %r15d, %r15d
cmpq $-0x1, (%rsi,%r14)
je 0x448e
addq %r14, %rsi
movq %rbx, %rdi
callq 0x7b38
incq %r15
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rax
subq %rsi, %rax
sarq $0x3, %rax
addq $0x8, %r14
cmpq %rax, %r15
jb 0x447c
movq 0x108(%rsp), %rbx
leaq 0xf8(%rsp), %r15
cmpq %r15, %rbx
je 0x44fc
movq %rsp, %r14
leaq 0x20(%rbx), %rdx
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x44e4
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x44ec
movq %r14, %rdi
callq 0x7c4a
movq %rbx, %rdi
callq 0x21f0
movq %rax, %rbx
cmpq %r15, %rax
jne 0x44c3
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x4513
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq 0xc0(%rsp), %rbx
movq 0x8(%rsp), %rsi
subq (%rsp), %rsi
sarq $0x3, %rsi
incq %rsi
leaq 0xa8(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x30(%rsp), %rdi
leaq 0x90(%rsp), %rcx
callq 0x4e32
movq 0x8(%rsp), %rsi
subq (%rsp), %rsi
sarq $0x3, %rsi
incq %rsi
leaq 0xa8(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x4f4a
movq 0x8(%rsp), %rsi
subq (%rsp), %rsi
sarq $0x3, %rsi
incq %rsi
leaq 0x90(%rsp), %rdi
leaq 0xd0(%rsp), %rdx
callq 0x4fde
movq 0x8(%rsp), %rsi
subq (%rsp), %rsi
sarq $0x3, %rsi
incq %rsi
leaq 0x78(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0xd0(%rsp), %rdi
leaq 0x58(%rsp), %rcx
callq 0x5056
movq (%rsp), %rcx
movq %rbx, %rax
cmpq 0x8(%rsp), %rcx
je 0x45d7
movq (%rcx), %rax
incq %rax
leaq 0x78(%rsp), %r8
movq %rax, (%r8)
movq 0xa8(%rsp), %rax
leaq 0x88(%rsp), %r9
movq %rax, (%r9)
xorl %eax, %eax
leaq 0x68(%rsp), %r14
movl %eax, (%r14)
leaq 0x24(%rsp), %r11
movl %eax, (%r11)
movq 0x30(%rsp), %rax
leaq 0x80(%rsp), %r10
movq %rax, (%r10)
movq 0xd0(%rsp), %rax
leaq 0x70(%rsp), %r15
movq %rax, (%r15)
leaq 0xb9f(%rip), %rsi       # 0x51ca
leaq 0x58(%rsp), %rdi
leaq 0x28(%rsp), %rdx
leaq 0x50(%rsp), %rcx
pushq %r15
pushq %r10
pushq %r11
pushq %r14
callq 0x5f9c
addq $0x20, %rsp
movq 0x90(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x4ad7
movq 0x58(%rsp), %rcx
movq %rcx, (%rax)
movq (%rsp), %rcx
movq 0x8(%rsp), %rsi
movq %rsi, %rdx
subq %rcx, %rdx
movq %rdx, %rax
sarq $0x3, %rax
cmpq $0x2, %rax
jb 0x478f
movl $0x1, %r12d
xorl %r13d, %r13d
leaq 0x28(%rsp), %rbp
leaq 0x88(%rsp), %r14
leaq 0x78(%rsp), %rbx
leaq 0x80(%rsp), %r15
leaq (,%r12,8), %rax
movq (%rcx,%r12,8), %rdx
subq -0x8(%rcx,%r12,8), %rdx
movq %rdx, 0x78(%rsp)
movq 0x50(%rsp), %rdx
movq -0x8(%rcx,%r12,8), %rcx
leaq (%rdx,%rcx,8), %rcx
addq $0x8, %rcx
movq %rcx, 0x88(%rsp)
imulq $0xb0, %r12, %rcx
addq 0xa8(%rsp), %rcx
movq %rcx, 0x80(%rsp)
movl %r13d, 0x24(%rsp)
movl %r13d, 0x64(%rsp)
addq 0x30(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq (,%r12,4), %rax
addq 0xd0(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0xaa6(%rip), %rsi       # 0x51ca
movq %rbp, %rdx
movq %r14, %rcx
movq %rbx, %r8
movq %r15, %r9
leaq 0x68(%rsp), %rax
pushq %rax
leaq 0x78(%rsp), %rax
pushq %rax
leaq 0x74(%rsp), %rax
pushq %rax
leaq 0x3c(%rsp), %rax
pushq %rax
callq 0x607a
addq $0x20, %rsp
movq 0x90(%rsp), %rax
cmpq $0x0, (%rax,%r12,8)
jne 0x4a83
movq 0x58(%rsp), %rcx
movq %rcx, (%rax,%r12,8)
incq %r12
movq (%rsp), %rcx
movq 0x8(%rsp), %rsi
movq %rsi, %rdx
subq %rcx, %rdx
movq %rdx, %rax
sarq $0x3, %rax
cmpq %rax, %r12
jb 0x46a8
cmpq %rcx, %rsi
je 0x4864
movq -0x8(%rsi), %rcx
notq %rcx
movq 0xc0(%rsp), %rdi
addq %rcx, %rdi
leaq 0x78(%rsp), %r8
movq %rdi, (%r8)
movq 0x50(%rsp), %rcx
movq -0x8(%rsi), %rsi
leaq (%rcx,%rsi,8), %rsi
addq $0x8, %rsi
leaq 0x88(%rsp), %rcx
movq %rsi, (%rcx)
imulq $0xb0, %rax, %rsi
addq 0xa8(%rsp), %rsi
leaq 0x80(%rsp), %r9
movq %rsi, (%r9)
xorl %esi, %esi
movl %esi, 0x24(%rsp)
leaq 0x64(%rsp), %r10
movl %esi, (%r10)
addq 0x30(%rsp), %rdx
movq %rdx, 0x70(%rsp)
shlq $0x2, %rax
addq 0xd0(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x9b2(%rip), %rsi       # 0x51ca
leaq 0x58(%rsp), %rdi
leaq 0x28(%rsp), %rdx
leaq 0x68(%rsp), %rax
pushq %rax
leaq 0x78(%rsp), %rax
pushq %rax
pushq %r10
leaq 0x3c(%rsp), %rax
pushq %rax
callq 0x607a
addq $0x20, %rsp
movq 0x8(%rsp), %rax
subq (%rsp), %rax
movq 0x90(%rsp), %rcx
cmpq $0x0, (%rcx,%rax)
jne 0x4ae3
movq 0x58(%rsp), %rdx
movq %rdx, (%rcx,%rax)
movq 0x90(%rsp), %rdi
cmpq %rdi, 0x98(%rsp)
je 0x48a6
xorl %ebx, %ebx
xorl %r14d, %r14d
addq %rbx, %rdi
callq 0x22b0
incq %r14
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rax
subq %rdi, %rax
sarq $0x3, %rax
addq $0x8, %rbx
cmpq %rax, %r14
jb 0x487b
movq 0xa8(%rsp), %rcx
movq 0x60(%rcx), %rax
cmpq %rax, 0x68(%rcx)
je 0x48d3
movq (%rax), %rdi
addq $0x8, %rdi
leaq 0x5873(%rip), %rsi      # 0xa139
callq 0x2080
testl %eax, %eax
je 0x4ae8
movq 0x38(%rsp), %rax
movq -0x8(%rax), %rax
cmpq $0x0, 0x28(%rax)
jne 0x4adc
movq 0xa8(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x138(%rsp), %rdi
xorl %ecx, %ecx
callq 0x6158
cmpl $-0x1, %eax
je 0x4ab1
cmpl $0x1, %eax
jne 0x4920
movq (%rsp), %rax
cmpq %rax, 0x8(%rsp)
je 0x4ab1
movq 0x8(%rsp), %rax
subq (%rsp), %rax
sarq $0x3, %rax
decq %rax
cmpq $-0x3, %rax
ja 0x49ad
movl $0x1, %ebx
movl $0xb0, %r14d
movl $0x8, %r15d
movq 0x30(%rsp), %rdx
movq -0x8(%rdx,%rbx,8), %rdi
movq 0xa8(%rsp), %rsi
addq %r14, %rsi
addq %r15, %rdx
xorl %ecx, %ecx
callq 0x6158
cmpl $-0x1, %eax
je 0x4a88
cmpl $0x1, %eax
jne 0x498a
movq 0x8(%rsp), %rax
subq (%rsp), %rax
sarq $0x3, %rax
cmpq %rax, %rbx
je 0x4a8f
incq %rbx
movq 0x8(%rsp), %rax
subq (%rsp), %rax
sarq $0x3, %rax
incq %rax
addq $0xb0, %r14
addq $0x8, %r15
cmpq %rax, %rbx
jb 0x4947
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x49ca
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
leaq 0x90(%rsp), %rdi
callq 0x6374
leaq 0xa8(%rsp), %rdi
callq 0x63b0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x49fb
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4a11
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
leaq 0xf0(%rsp), %rdi
callq 0x9798
movq 0xc8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x4a3b
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x4a3b
callq 0x2230
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x4a4a
callq 0x2230
leaq 0x138(%rsp), %rbx
movq 0x120(%rsp), %rdi
movq %rbx, %rsi
callq 0x4c6c
movq %rbx, %rdi
callq 0x36c8
movb $0x1, %bl
andb $0x1, %bl
movl %ebx, %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 0x4a94
movl $0x5, %ebx
movl $0x4, %edi
callq 0x20d0
movl %ebx, (%rax)
movq 0x9509(%rip), %rsi      # 0xdfb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x22c0
movl $0x4, %edi
callq 0x20d0
movl $0x3, (%rax)
movq 0x94e8(%rip), %rsi      # 0xdfb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x22c0
jmp 0x4bd6
callq 0x2070
movl $0x2, %ebx
jmp 0x4aed
callq 0x2070
movl $0x1, %ebx
movl $0x4, %edi
callq 0x20d0
movl %ebx, (%rax)
movq 0x94b0(%rip), %rsi      # 0xdfb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x22c0
jmp 0x4b67
jmp 0x4b67
movq %rax, %rbx
jmp 0x4bfb
movq %rax, %rbx
jmp 0x4c08
jmp 0x4b6c
movq %rax, %rbx
jmp 0x4c2c
jmp 0x4b6c
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
cmpq %r14, %rdi
je 0x4c5c
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x21a0
jmp 0x4c5c
movq %rax, %rbx
jmp 0x4c5c
jmp 0x4b74
jmp 0x4b74
jmp 0x4b6c
jmp 0x4b6c
jmp 0x4b74
jmp 0x4b67
movq %rax, %rbx
jmp 0x4bde
movq %rax, %rbx
jmp 0x4c15
movq %rax, %rdi
callq 0x20b0
movq 0xc8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x4b99
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x4b99
callq 0x2230
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x4ba8
callq 0x2230
movq $0x0, 0x28(%rsp)
movl $0x8, %edi
callq 0x20d0
leaq 0x55c7(%rip), %rcx      # 0xa189
movq %rcx, (%rax)
movq 0x93f4(%rip), %rsi      # 0xdfc0
movq %rax, %rdi
xorl %edx, %edx
callq 0x22c0
movq %rax, %rbx
callq 0x22a0
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x4bfb
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
leaq 0x90(%rsp), %rdi
callq 0x6374
leaq 0xa8(%rsp), %rdi
callq 0x63b0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x4c2c
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4c42
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
leaq 0xf0(%rsp), %rdi
callq 0x9798
leaq 0x138(%rsp), %rdi
callq 0x36c8
movq %rbx, %rdi
callq 0x22d0
movq %rax, %rdi
callq 0x38a5