// File: /workspace/github_c_makefile_star2_O1/phluid61[P]hsf/main.c
// Function: do_sh_innerlist
void do_sh_innerlist() {
	SH_List* list;
	SH_InnerList* innerlist;

	SH_BareItem* list_bi;
	SH_Item* list_item;

	SH_Boolean* b;
	SH_BareItem* bi;
	SH_Item* item;

	SH_Key  *key1;
	SH_Item *val1;

	int err = 0;

	list = SH_List__init(&err);
	if (err) {
		printf("* unable to init SH_List\n");
		return;
	}
	b = SH_Boolean__init(SH_FALSE, &err);
	if (err) {
		printf("* unable to init SH_Boolean\n");
		SH_List__destroy(list, SH_FALSE, 0);
		return;
	}
	bi = SH_BareItem__init_boolean(b, &err);
	if (err) {
		printf("* unable to init_boolean SH_BareItem\n");
		SH_Boolean__destroy(b, 0);
		SH_List__destroy(list, SH_FALSE, 0);
		return;
	}
	item = SH_Item__init(bi, (SH_dict*)0, &err);
	if (err) {
		printf("* unable to init SH_Item\n");
		SH_BareItem__destroy(bi, SH_TRUE, 0);
		SH_List__destroy(list, SH_FALSE, 0);
		return;
	}

	innerlist = SH_InnerList__init(&err);
	if ((SH_InnerList*)0 == innerlist || err) {
		printf("* unable to init SH_InnerList: [%llX] 0x%08X\n", (long long)innerlist, err);
	} else {
		printf("+ init SH_InnerList: [%llX]\n", (long long)innerlist);

		_print_innerlist(innerlist);

		SH_InnerList__add(innerlist, item, &err);
		if (err) {
			printf("  * unable to add to SH_InnerList: 0x%08X\n", err);
		} else {
			_print_innerlist(innerlist);
		}

		SH_InnerList__add(innerlist, item, &err);
		if (err) {
			printf("  * unable to add to SH_InnerList: 0x%08X\n", err);
		} else {
			_print_innerlist(innerlist);
		}

		SH_InnerList__add(innerlist, item, &err);
		if (err) {
			printf("  * unable to add to SH_InnerList: 0x%08X\n", err);
		} else {
			_print_innerlist(innerlist);
		}

		list_bi = SH_BareItem__init_innerlist(innerlist, &err);
		if (err) {
			printf("  * unable to init SH_BareItem from innerlist: 0x%08X\n", err);
		} else {
			list_item = SH_Item__init(list_bi, (SH_dict*)0, 0);

			SH_List__add(list, item, 0);
			SH_List__add(list, list_item, 0);
			SH_List__add(list, item, 0);

			_print_list(list);

			/* FIXME: catch errors here: */
			key1 = SH_Key__init((unsigned char*)"test", 4, &err);
			val1 = SH_Item__init(SH_BareItem__init_integer(SH_Integer__init(SH_INT_C(42), &err), &err), 0, &err);
			if (err) {
				printf("    x [%llX]=[%llX] 0x%08X\n", (long long)key1, (long long)val1, err);
			}
			SH_Item__add_param(list_item, key1, val1, &err);
			if (err) {
				printf("    x [%llX]=[%llX] 0x%08X\n", (long long)key1, (long long)val1, err);
			} else {
				_print_list(list);
			}

			SH_Key__destroy(key1, 0);
			SH_Item__destroy(val1, SH_TRUE, 0);

			SH_Item__destroy(list_item, SH_FALSE, 0);
			SH_BareItem__destroy(list_bi, SH_FALSE, 0);
		}

		SH_InnerList__destroy(innerlist, SH_FALSE, 0);
	}

	SH_Item__destroy(item, SH_TRUE, 0);
	SH_List__destroy(list, SH_FALSE, 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x4(%rsp), %r14
movl $0x0, (%r14)
movq %r14, %rdi
callq 0x48b8
cmpl $0x0, (%r14)
je 0x2624
leaq 0x3230(%rip), %rdi      # 0x584a
callq 0x1040
jmp 0x291c
movq %rax, %rbx
leaq 0x4(%rsp), %r15
xorl %edi, %edi
movq %r15, %rsi
callq 0x33c4
cmpl $0x0, (%r15)
je 0x264d
leaq 0x31eb(%rip), %rdi      # 0x582e
callq 0x1040
jmp 0x2910
movq %rax, %r14
leaq 0x4(%rsp), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x39d6
cmpl $0x0, (%r12)
je 0x2682
leaq 0x319b(%rip), %rdi      # 0x5809
callq 0x1040
movq %r14, %rdi
xorl %esi, %esi
callq 0x340e
jmp 0x2910
movq %rax, %r15
leaq 0x4(%rsp), %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x3d64
cmpl $0x0, (%r12)
je 0x26be
leaq 0x314b(%rip), %rdi      # 0x57f0
callq 0x1040
movq %r15, %rdi
movl $0xff, %esi
xorl %edx, %edx
callq 0x3a6c
jmp 0x2910
movq %rax, %r14
leaq 0x4(%rsp), %r12
movq %r12, %rdi
callq 0x34e0
movq %rax, %r15
testq %rax, %rax
sete %al
movl (%r12), %edx
testl %edx, %edx
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x26fd
leaq 0x3033(%rip), %rdi      # 0x5721
movq %r15, %rsi
xorl %eax, %eax
callq 0x1060
jmp 0x2901
leaq 0x304b(%rip), %rdi      # 0x574f
movq %r15, %rsi
xorl %eax, %eax
callq 0x1060
movq %r15, %rdi
callq 0x2569
leaq 0x4(%rsp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x35bd
movl (%r12), %esi
testl %esi, %esi
je 0x2741
leaq 0x3034(%rip), %rdi      # 0x576c
xorl %eax, %eax
callq 0x1060
jmp 0x2749
movq %r15, %rdi
callq 0x2569
leaq 0x4(%rsp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x35bd
movl (%r12), %esi
testl %esi, %esi
je 0x2774
leaq 0x3001(%rip), %rdi      # 0x576c
xorl %eax, %eax
callq 0x1060
jmp 0x277c
movq %r15, %rdi
callq 0x2569
leaq 0x4(%rsp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x35bd
movl (%r12), %esi
testl %esi, %esi
je 0x27a7
leaq 0x2fce(%rip), %rdi      # 0x576c
xorl %eax, %eax
callq 0x1060
jmp 0x27af
movq %r15, %rdi
callq 0x2569
leaq 0x4(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x3a21
movl (%r13), %esi
testl %esi, %esi
je 0x27da
leaq 0x2fc9(%rip), %rdi      # 0x5797
xorl %eax, %eax
callq 0x1060
jmp 0x28f5
movq %rax, 0x10(%rsp)
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3d64
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x4995
movq %rbx, %rdi
movq %r12, 0x8(%rsp)
movq %r12, %rsi
xorl %edx, %edx
callq 0x4995
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x4995
movq %rbx, %rdi
callq 0x22ed
leaq 0x2dda(%rip), %rdi      # 0x5603
leaq 0x4(%rsp), %r12
movl $0x4, %esi
movq %r12, %rdx
callq 0x41a4
movq %rax, %rbp
movl $0x2a, %edi
movq %r12, %rsi
callq 0x292c
movq %rax, %rdi
movq %r12, %rsi
callq 0x385f
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x3d64
movq %rax, %r13
movl (%r12), %ecx
testl %ecx, %ecx
je 0x2882
leaq 0x2d95(%rip), %rdi      # 0x560a
movq %rbp, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x1060
leaq 0x4(%rsp), %r12
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x3ea0
movl (%r12), %ecx
testl %ecx, %ecx
je 0x28b8
leaq 0x2d61(%rip), %rdi      # 0x560a
movq %rbp, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x1060
jmp 0x28c0
movq %rbx, %rdi
callq 0x22ed
movq %rbp, %rdi
xorl %esi, %esi
callq 0x42ac
movq %r13, %rdi
movl $0xff, %esi
xorl %edx, %edx
callq 0x3df2
movq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3df2
movq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3a6c
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3520
movq %r14, %rdi
movl $0xff, %esi
xorl %edx, %edx
callq 0x3df2
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x48f8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop