// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movl %esi, %ebx
movq %rdi, %r14
movq 0x2164f(%rip), %r15     # 0x33fd8
leaq 0x1674a(%rip), %rsi     # 0x290da
movl $0x39, %edx
movq %r15, %rdi
callq 0x122f0
leaq 0x16770(%rip), %rax     # 0x29114
leaq 0x1676e(%rip), %rsi     # 0x29119
testl %ebx, %ebx
cmovneq %rax, %rsi
movl %ebx, %edx
xorq $0x5, %rdx
movq %r15, %rdi
callq 0x122f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
xorl %eax, %eax
movq %rax, -0x8(%r12)
movb %al, (%r12)
movl %eax, 0x10(%r12)
leaq 0x70(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq %rax, -0x8(%rbp)
movb %al, (%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbp)
movl %eax, 0x20(%rbp)
leaq 0xa8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x28(%rsp), %r13
movq %rax, -0x20(%r13)
movl %eax, -0x18(%r13)
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq 0x166d3(%rip), %rsi     # 0x2911f
movl $0x1d, %edx
movq %r15, %rdi
callq 0x122f0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq 0x21561(%rip), %rdi     # 0x33fd8
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq (%r14), %rdi
leaq 0x166af(%rip), %rsi     # 0x2913d
callq 0x21ff8
movzbl %bl, %ecx
leaq 0xe8(%rsp), %rdi
leaq 0x38(%rsp), %rdx
movq %rax, %rsi
callq 0x15932
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12acc
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x122a0
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12aed
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x122a0
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12b0e
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x122a0
movq 0x214c3(%rip), %rdi     # 0x33fd8
leaq 0x16624(%rip), %rsi     # 0x29140
movl $0xb, %edx
callq 0x122f0
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x2149b(%rip), %rdi     # 0x33fd8
callq 0x122f0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq 0x21465(%rip), %rdi     # 0x33fd8
leaq 0x165d2(%rip), %rsi     # 0x2914c
movl $0xb, %edx
callq 0x122f0
movl 0x90(%rsp), %esi
movq 0x21446(%rip), %rdi     # 0x33fd8
callq 0x12420
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq 0x21410(%rip), %rdi     # 0x33fd8
leaq 0x16589(%rip), %rsi     # 0x29158
movl $0xb, %edx
callq 0x122f0
movsd 0x88(%rsp), %xmm0
movq 0x213ef(%rip), %rdi     # 0x33fd8
callq 0x123c0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq 0x213b9(%rip), %rdi     # 0x33fd8
leaq 0x1653e(%rip), %rsi     # 0x29164
movl $0xb, %edx
callq 0x122f0
movq 0x80(%rsp), %rsi
movq 0x21399(%rip), %rdi     # 0x33fd8
callq 0x12180
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq 0x21363(%rip), %rdi     # 0x33fd8
leaq 0x164f4(%rip), %rsi     # 0x29170
movl $0xb, %edx
callq 0x122f0
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x21341(%rip), %rdi     # 0x33fd8
callq 0x122f0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq 0x2130b(%rip), %rdi     # 0x33fd8
leaq 0x164a8(%rip), %rsi     # 0x2917c
movl $0xb, %edx
callq 0x122f0
movl 0x58(%rsp), %esi
movq 0x212ef(%rip), %rdi     # 0x33fd8
callq 0x12420
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq 0x212b9(%rip), %rdi     # 0x33fd8
leaq 0x16462(%rip), %rsi     # 0x29188
movl $0xb, %edx
callq 0x122f0
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x21297(%rip), %rdi     # 0x33fd8
callq 0x122f0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq 0x21261(%rip), %r15     # 0x33fd8
leaq 0x1643a(%rip), %rsi     # 0x291b8
movl $0x1d, %edx
movq %r15, %rdi
callq 0x122f0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq 0x2122f(%rip), %rdi     # 0x33fd8
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq (%r14), %rdi
leaq 0x1637d(%rip), %rsi     # 0x2913d
callq 0x21ff8
movzbl %bl, %ecx
leaq 0xb8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rax, %rsi
callq 0x15b14
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12dfe
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x122a0
movq 0x211d3(%rip), %rdi     # 0x33fd8
leaq 0x16334(%rip), %rsi     # 0x29140
movl $0xb, %edx
callq 0x122f0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x211b1(%rip), %rdi     # 0x33fd8
callq 0x122f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %rbx, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq 0x2117b(%rip), %rdi     # 0x33fd8
leaq 0x162e8(%rip), %rsi     # 0x2914c
movl $0xb, %edx
callq 0x122f0
movl 0x10(%rsp), %esi
movq 0x2115f(%rip), %rdi     # 0x33fd8
callq 0x12180
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %rbx, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq 0x21129(%rip), %rdi     # 0x33fd8
leaq 0x162a2(%rip), %rsi     # 0x29158
movl $0xb, %edx
callq 0x122f0
cvtss2sd 0xc(%rsp), %xmm0
movq 0x2110b(%rip), %rdi     # 0x33fd8
callq 0x123c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %rbx, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq 0x210d5(%rip), %rdi     # 0x33fd8
leaq 0x1625a(%rip), %rsi     # 0x29164
movl $0xb, %edx
callq 0x122f0
movl 0x8(%rsp), %esi
movq 0x210b9(%rip), %rdi     # 0x33fd8
callq 0x12420
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %rbx, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0x12f65
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x122a0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x12f8a
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x122a0
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x12fa1
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x122a0
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x12fb8
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x122a0
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0x12fe4
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x122a0
leaq 0x38(%rsp), %rdi
callq 0x15aba
movq %r15, %rdi
callq 0x12430
movq %rax, %r15
cmpl $0x1, %edx
jne 0x12fcd
movq %r15, %rdi
callq 0x120d0
movq 0x20fcb(%rip), %rdi     # 0x33fd8
leaq 0x16180(%rip), %rsi     # 0x29194
movl $0x23, %edx
callq 0x122f0
movq 0x20fb3(%rip), %rdi     # 0x33fd8
callq 0x12100
callq 0x123f0
jmp 0x12f4e
jmp 0x12fca
movq %rax, %r15
callq 0x123f0
jmp 0x12fcd
movq %rax, %r15
cmpl $0x1, %edx
jne 0x12fcd
movq %r15, %rdi
callq 0x120d0
movq 0x20f81(%rip), %rdi     # 0x33fd8
leaq 0x16136(%rip), %rsi     # 0x29194
movl $0x23, %edx
callq 0x122f0
movq 0x20f69(%rip), %rdi     # 0x33fd8
callq 0x12100
callq 0x123f0
jmp 0x12d70
jmp 0x12fca
movq %rax, %r15
callq 0x123f0
jmp 0x12fcd
movq %rax, %rdi
callq 0x15b08