// File: /workspace/github_cpp_makefile_star2_O2/swxlion[P]swxJson/tests/swxJsonAdvancedTest_fetch.cpp
// Function: test_tuple(std::shared_ptr<swxJson::Json>, bool)
void test_tuple(JsonPtr json, bool compatibleMode)
{
	cout<<"[Test tuple] Pattern unmatched testing. Compatible mode: "<<(compatibleMode ? "True" : "False")<<endl;

	std::tuple<std::string, int, double, uint64_t, std::string, int, std::string> more;
	std::tuple<std::string, uint32_t, float, int> less;

	cout<<"---- more elements ----------"<<endl;
	try {
		(*json)["aa"].wantTuple(more, compatibleMode);

		cout<<"Element 1: "<<std::get<0>(more)<<endl;
		cout<<"Element 2: "<<std::get<1>(more)<<endl;
		cout<<"Element 3: "<<std::get<2>(more)<<endl;
		cout<<"Element 4: "<<std::get<3>(more)<<endl;
		cout<<"Element 5: "<<std::get<4>(more)<<endl;
		cout<<"Element 6: "<<std::get<5>(more)<<endl;
		cout<<"Element 7: "<<std::get<6>(more)<<endl;

	}
	catch (const JsonNodeTypeMissMatchError &e)
	{
		cout<<"[Expectant error]: Type miss match."<<endl;
	}

	cout<<"---- less elements ----------"<<endl;
	try {
		(*json)["aa"].wantTuple(less, compatibleMode);

		cout<<"Element 1: "<<std::get<0>(less)<<endl;
		cout<<"Element 2: "<<std::get<1>(less)<<endl;
		cout<<"Element 3: "<<std::get<2>(less)<<endl;
		cout<<"Element 4: "<<std::get<3>(less)<<endl;

	}
	catch (const JsonNodeTypeMissMatchError &e)
	{
		cout<<"[Expectant error]: Type miss match."<<endl;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movl %esi, %ebp
movq %rdi, %r14
movq 0x1e953(%rip), %r15     # 0x38fd8
leaq 0x11a4e(%rip), %rsi     # 0x2c0da
movq %r15, %rdi
callq 0x1a280
leaq 0x11a79(%rip), %rcx     # 0x2c114
leaq 0x11a77(%rip), %rsi     # 0x2c119
testl %ebp, %ebp
cmovneq %rcx, %rsi
movq %rax, %rdi
callq 0x1a280
movq %rax, %rdi
callq 0x1a100
leaq 0x38(%rsp), %rdi
callq 0x1c21e
leaq 0x18(%rsp), %rbx
andq $0x0, -0x10(%rbx)
andl $0x0, -0x8(%rbx)
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x11a37(%rip), %rsi     # 0x2c11f
movq %r15, %rdi
callq 0x1a280
movq %rax, %rdi
callq 0x1a100
movq (%r14), %rdi
leaq 0x11a3b(%rip), %rsi     # 0x2c13d
callq 0x2632a
movzbl %bpl, %ecx
leaq 0xe8(%rsp), %rdi
leaq 0x38(%rsp), %rdx
movq %rax, %rsi
callq 0x1c22e
leaq 0xe8(%rsp), %rdi
callq 0x1c36c
movq 0x1e8a4(%rip), %rdi     # 0x38fd8
leaq 0x11a05(%rip), %rsi     # 0x2c140
callq 0x1a280
leaq 0x98(%rsp), %rsi
movq %rax, %rdi
callq 0x1a240
movq %rax, %rdi
callq 0x1a100
movq 0x1e879(%rip), %rdi     # 0x38fd8
leaq 0x119e6(%rip), %rsi     # 0x2c14c
callq 0x1a280
movl 0x90(%rsp), %esi
movq %rax, %rdi
callq 0x1a400
movq %rax, %rdi
callq 0x1a100
movq 0x1e84f(%rip), %rdi     # 0x38fd8
leaq 0x119c8(%rip), %rsi     # 0x2c158
callq 0x1a280
movsd 0x88(%rsp), %xmm0
movq %rax, %rdi
callq 0x1a3b0
movq %rax, %rdi
callq 0x1a100
movq 0x1e823(%rip), %rdi     # 0x38fd8
leaq 0x119a8(%rip), %rsi     # 0x2c164
callq 0x1a280
movq 0x80(%rsp), %rsi
movq %rax, %rdi
callq 0x1a170
movq %rax, %rdi
callq 0x1a100
movq 0x1e7f8(%rip), %rdi     # 0x38fd8
leaq 0x11989(%rip), %rsi     # 0x2c170
callq 0x1a280
leaq 0x60(%rsp), %rsi
movq %rax, %rdi
callq 0x1a240
movq %rax, %rdi
callq 0x1a100
movq 0x1e7d0(%rip), %rdi     # 0x38fd8
leaq 0x1196d(%rip), %rsi     # 0x2c17c
callq 0x1a280
movl 0x58(%rsp), %esi
movq %rax, %rdi
callq 0x1a400
movq %rax, %rdi
callq 0x1a100
movq 0x1e7a9(%rip), %rdi     # 0x38fd8
leaq 0x11952(%rip), %rsi     # 0x2c188
callq 0x1a280
leaq 0x38(%rsp), %rsi
movq %rax, %rdi
callq 0x1a240
movq %rax, %rdi
callq 0x1a100
movq 0x1e781(%rip), %rdi     # 0x38fd8
leaq 0x1195a(%rip), %rsi     # 0x2c1b8
callq 0x1a280
movq %rax, %rdi
callq 0x1a100
movq (%r14), %rdi
leaq 0x118c8(%rip), %rsi     # 0x2c13d
callq 0x2632a
movzbl %bpl, %ecx
leaq 0xb8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rax, %rsi
callq 0x1c38e
leaq 0xc8(%rsp), %rdi
callq 0x1a458
movq 0x1e731(%rip), %rdi     # 0x38fd8
leaq 0x11892(%rip), %rsi     # 0x2c140
callq 0x1a280
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1a240
movq %rax, %rdi
callq 0x1a100
movq 0x1e70b(%rip), %rdi     # 0x38fd8
leaq 0x11878(%rip), %rsi     # 0x2c14c
callq 0x1a280
movl 0x10(%rsp), %esi
movq %rax, %rdi
callq 0x1a170
movq %rax, %rdi
callq 0x1a100
movq 0x1e6e4(%rip), %rdi     # 0x38fd8
leaq 0x1185d(%rip), %rsi     # 0x2c158
callq 0x1a280
movss 0xc(%rsp), %xmm0
movq %rax, %rdi
callq 0x1a1d0
movq %rax, %rdi
callq 0x1a100
movq 0x1e6bb(%rip), %rdi     # 0x38fd8
leaq 0x11840(%rip), %rsi     # 0x2c164
callq 0x1a280
movl 0x8(%rsp), %esi
movq %rax, %rdi
callq 0x1a400
movq %rax, %rdi
callq 0x1a100
movq %rbx, %rdi
callq 0x1a458
leaq 0x38(%rsp), %rdi
callq 0x1c36c
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %rbx, %rdi
callq 0x1a458
leaq 0x38(%rsp), %rdi
callq 0x1c36c
movq %r15, %rdi
callq 0x1a410
movq %rax, %r15
cmpl $0x1, %edx
jne 0x1a960
movq %r15, %rdi
callq 0x1a0c0
movq 0x1e647(%rip), %rdi     # 0x38fd8
leaq 0x117fc(%rip), %rsi     # 0x2c194
callq 0x1a280
movq %rax, %rdi
callq 0x1a100
callq 0x1a3e0
jmp 0x1a93d
jmp 0x1a95d
movq %rax, %r15
callq 0x1a3e0
jmp 0x1a960
movq %rax, %r15
cmpl $0x1, %edx
jne 0x1a960
movq %r15, %rdi
callq 0x1a0c0
movq 0x1e609(%rip), %rdi     # 0x38fd8
leaq 0x117be(%rip), %rsi     # 0x2c194
callq 0x1a280
movq %rax, %rdi
callq 0x1a100
callq 0x1a3e0
jmp 0x1a850
jmp 0x1a95d
movq %rax, %r15
callq 0x1a3e0
jmp 0x1a960
movq %rax, %rdi
callq 0x1c382