// File: /workspace/github_c_makefile_star2_O3/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 0x4ae4
cmpl $0x0, (%r14)
je 0x2637
leaq 0x321d(%rip), %rdi      # 0x584a
callq 0x1040
jmp 0x292f
movq %rax, %rbx
leaq 0x4(%rsp), %r15
xorl %edi, %edi
movq %r15, %rsi
callq 0x3450
cmpl $0x0, (%r15)
je 0x2660
leaq 0x31d8(%rip), %rdi      # 0x582e
callq 0x1040
jmp 0x2923
movq %rax, %r14
leaq 0x4(%rsp), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x3b38
cmpl $0x0, (%r12)
je 0x2695
leaq 0x3188(%rip), %rdi      # 0x5809
callq 0x1040
movq %r14, %rdi
xorl %esi, %esi
callq 0x34a1
jmp 0x2923
movq %rax, %r15
leaq 0x4(%rsp), %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x3ed0
cmpl $0x0, (%r12)
je 0x26d1
leaq 0x3138(%rip), %rdi      # 0x57f0
callq 0x1040
movq %r15, %rdi
movl $0xff, %esi
xorl %edx, %edx
callq 0x3bfc
jmp 0x2923
movq %rax, %r14
leaq 0x4(%rsp), %r12
movq %r12, %rdi
callq 0x3554
movq %rax, %r15
testq %rax, %rax
sete %al
movl (%r12), %edx
testl %edx, %edx
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x2710
leaq 0x3020(%rip), %rdi      # 0x5721
movq %r15, %rsi
xorl %eax, %eax
callq 0x1060
jmp 0x2914
leaq 0x3038(%rip), %rdi      # 0x574f
movq %r15, %rsi
xorl %eax, %eax
callq 0x1060
movq %r15, %rdi
callq 0x257c
leaq 0x4(%rsp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3665
movl (%r12), %esi
testl %esi, %esi
je 0x2754
leaq 0x3021(%rip), %rdi      # 0x576c
xorl %eax, %eax
callq 0x1060
jmp 0x275c
movq %r15, %rdi
callq 0x257c
leaq 0x4(%rsp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3665
movl (%r12), %esi
testl %esi, %esi
je 0x2787
leaq 0x2fee(%rip), %rdi      # 0x576c
xorl %eax, %eax
callq 0x1060
jmp 0x278f
movq %r15, %rdi
callq 0x257c
leaq 0x4(%rsp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3665
movl (%r12), %esi
testl %esi, %esi
je 0x27ba
leaq 0x2fbb(%rip), %rdi      # 0x576c
xorl %eax, %eax
callq 0x1060
jmp 0x27c2
movq %r15, %rdi
callq 0x257c
leaq 0x4(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x3b9a
movl (%r13), %esi
testl %esi, %esi
je 0x27ed
leaq 0x2fb6(%rip), %rdi      # 0x5797
xorl %eax, %eax
callq 0x1060
jmp 0x2908
movq %rax, 0x10(%rsp)
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3ed0
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x4bf5
movq %rbx, %rdi
movq %r12, 0x8(%rsp)
movq %r12, %rsi
xorl %edx, %edx
callq 0x4bf5
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x4bf5
movq %rbx, %rdi
callq 0x2300
leaq 0x2dc7(%rip), %rdi      # 0x5603
leaq 0x4(%rsp), %r12
movl $0x4, %esi
movq %r12, %rdx
callq 0x4364
movq %rax, %rbp
movl $0x2a, %edi
movq %r12, %rsi
callq 0x2940
movq %rax, %rdi
movq %r12, %rsi
callq 0x394e
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x3ed0
movq %rax, %r13
movl (%r12), %ecx
testl %ecx, %ecx
je 0x2895
leaq 0x2d82(%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 0x4030
movl (%r12), %ecx
testl %ecx, %ecx
je 0x28cb
leaq 0x2d4e(%rip), %rdi      # 0x560a
movq %rbp, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x1060
jmp 0x28d3
movq %rbx, %rdi
callq 0x2300
movq %rbp, %rdi
xorl %esi, %esi
callq 0x447c
movq %r13, %rdi
movl $0xff, %esi
xorl %edx, %edx
callq 0x3f7a
movq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3f7a
movq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3bfc
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x35aa
movq %r14, %rdi
movl $0xff, %esi
xorl %edx, %edx
callq 0x3f7a
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4b3a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop