// File: /workspace/github_c_makefile_star2_O0/phluid61[P]hsf/main.c
// Function: do_sh_item
void do_sh_item() {
	sh_char_t value[4] = "foo";

	SH_Token* obj;
	SH_BareItem* bi;
	SH_Item* item;

	SH_dict* params;

	SH_Key  *key1;
	SH_Item *val1;

	int err = 0;

	obj = SH_Token__init(value, 3, &err);
	if ((SH_Token*)0 == obj || err) {
		printf("* unable to init SH_Token(%s): [%llX] 0x%08X\n", (char*)value, (long long)obj, err);
	} else {
		printf("+ init SH_Token(%s): [%llX]\n", (char*)value, (long long)obj);
		bi = SH_BareItem__init_token(obj, &err);
		if ((SH_BareItem*)0 == bi || err) {
			printf("  * unable to init SH_BareItem: [%llX] 0x%08X\n", (long long)bi, err);
		} else {
			printf("  + init SH_BareItem: [%llX]\n", (long long)bi);

			printf("  %c[36m--- create an item without any parameters -----%c[0m\n", 0x1b, 0x1b);
			item = SH_Item__init(bi, (SH_dict*)0, &err);
			if ((SH_Item*)0 == item || err) {
				printf("    * unable to init SH_Item: [%llX] 0x%08X\n", (long long)item, err);
			} else {
				printf("    + init SH_Item: [%llX]\n", (long long)item);
				__do_sh_item(item);

				SH_Item__destroy(item, SH_FALSE, 0);
			}

			printf("  %c[36m--- create an item with explicit parameters ---%c[0m\n", 0x1b, 0x1b);
			params = SH_dict__init(&err);
			if ((SH_dict*)0 == params || err) {
				printf("    * unable to init SH_dict: [%llX] 0x%08X\n", (long long)params, err);
			} else {
				printf("    + init SH_dict: [%llX]\n", (long long)params);

				item = SH_Item__init(bi, params, &err);
				if ((SH_Item*)0 == item || err) {
					printf("      * unable to init SH_Item: [%llX] 0x%08X\n", (long long)item, err);
				} else {
					printf("      + init SH_Item: [%llX]\n", (long long)item);
					__do_sh_item(item);

					SH_Item__destroy(item, SH_FALSE, 0);
				}

				SH_dict__destroy(params, SH_TRUE, 0);
			}

			printf("  %c[36m--- create an item with defined parameters ----%c[0m\n", 0x1b, 0x1b);
			params = SH_dict__init(&err);
			if ((SH_dict*)0 == params || err) {
				printf("    * unable to init SH_dict: [%llX] 0x%08X\n", (long long)params, err);
			} else {
				printf("    + init SH_dict: [%llX]\n", (long long)params);

				/* 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_dict__add(params, key1, val1, &err);

				item = SH_Item__init(bi, params, &err);
				if ((SH_Item*)0 == item || err) {
					printf("      * unable to init SH_Item: [%llX] 0x%08X\n", (long long)item, err);
				} else {
					printf("      + init SH_Item: [%llX]\n", (long long)item);
					__do_sh_item(item);

					SH_Item__destroy(item, SH_FALSE, 0);
				}

				SH_dict__destroy(params, SH_TRUE, 0);
			}

			SH_BareItem__destroy(bi, SH_FALSE, 0);
		}

		SH_Token__destroy(obj, 0);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x630a(%rip), %eax      # 0x8488
movl %eax, -0x4(%rbp)
movl $0x0, -0x3c(%rbp)
leaq -0x4(%rbp), %rdi
movl $0x3, %esi
leaq -0x3c(%rbp), %rdx
callq 0x38d0
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
je 0x21ac
cmpl $0x0, -0x3c(%rbp)
je 0x21ca
leaq -0x4(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x3c(%rbp), %ecx
leaq 0x62ce(%rip), %rdi      # 0x848c
movb $0x0, %al
callq 0x1050
jmp 0x24df
leaq -0x4(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0x62e1(%rip), %rdi      # 0x84ba
movb $0x0, %al
callq 0x1050
movq -0x10(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0x4c30
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x21ff
cmpl $0x0, -0x3c(%rbp)
je 0x2219
movq -0x18(%rbp), %rsi
movl -0x3c(%rbp), %edx
leaq 0x5f40(%rip), %rdi      # 0x814d
movb $0x0, %al
callq 0x1050
jmp 0x24d2
movq -0x18(%rbp), %rsi
leaq 0x5f58(%rip), %rdi      # 0x817c
movb $0x0, %al
callq 0x1050
leaq 0x62a5(%rip), %rdi      # 0x84d7
movl $0x1b, %edx
movl %edx, %esi
movb $0x0, %al
callq 0x1050
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0x3c(%rbp), %rdx
callq 0x5610
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x20(%rbp), %rax
je 0x2263
cmpl $0x0, -0x3c(%rbp)
je 0x227a
movq -0x20(%rbp), %rsi
movl -0x3c(%rbp), %edx
leaq 0x632d(%rip), %rdi      # 0x859e
movb $0x0, %al
callq 0x1050
jmp 0x22a4
movq -0x20(%rbp), %rsi
leaq 0x6348(%rip), %rdi      # 0x85cd
movb $0x0, %al
callq 0x1050
movq -0x20(%rbp), %rdi
callq 0x2020
movq -0x20(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x56f0
leaq 0x626a(%rip), %rdi      # 0x8515
movl $0x1b, %edx
movl %edx, %esi
movb $0x0, %al
callq 0x1050
leaq -0x3c(%rbp), %rdi
callq 0x6470
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq -0x28(%rbp), %rax
je 0x22d4
cmpl $0x0, -0x3c(%rbp)
je 0x22ee
movq -0x28(%rbp), %rsi
movl -0x3c(%rbp), %edx
leaq 0x6271(%rip), %rdi      # 0x8553
movb $0x0, %al
callq 0x1050
jmp 0x2376
movq -0x28(%rbp), %rsi
leaq 0x6287(%rip), %rdi      # 0x8580
movb $0x0, %al
callq 0x1050
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x3c(%rbp), %rdx
callq 0x5610
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x20(%rbp), %rax
je 0x2323
cmpl $0x0, -0x3c(%rbp)
je 0x233a
movq -0x20(%rbp), %rsi
movl -0x3c(%rbp), %edx
leaq 0x626b(%rip), %rdi      # 0x859c
movb $0x0, %al
callq 0x1050
jmp 0x2364
movq -0x20(%rbp), %rsi
leaq 0x6286(%rip), %rdi      # 0x85cb
movb $0x0, %al
callq 0x1050
movq -0x20(%rbp), %rdi
callq 0x2020
movq -0x20(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x56f0
movq -0x28(%rbp), %rdi
movl $0xff, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x6500
leaq 0x626c(%rip), %rdi      # 0x85e9
movl $0x1b, %edx
movl %edx, %esi
movb $0x0, %al
callq 0x1050
leaq -0x3c(%rbp), %rdi
callq 0x6470
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq -0x28(%rbp), %rax
je 0x23a6
cmpl $0x0, -0x3c(%rbp)
je 0x23c0
movq -0x28(%rbp), %rsi
movl -0x3c(%rbp), %edx
leaq 0x619f(%rip), %rdi      # 0x8553
movb $0x0, %al
callq 0x1050
jmp 0x24c3
movq -0x28(%rbp), %rsi
leaq 0x61b5(%rip), %rdi      # 0x8580
movb $0x0, %al
callq 0x1050
leaq 0x624e(%rip), %rdi      # 0x8627
movl $0x4, %esi
leaq -0x3c(%rbp), %rdx
callq 0x5ce0
movq %rax, -0x30(%rbp)
movl $0x2a, %edi
leaq -0x3c(%rbp), %rsi
callq 0x2b80
movq %rax, %rdi
leaq -0x3c(%rbp), %rsi
callq 0x4a50
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0x3c(%rbp), %rdx
callq 0x5610
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x2438
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movl -0x3c(%rbp), %ecx
leaq 0x61fb(%rip), %rdi      # 0x862c
movb $0x0, %al
callq 0x1050
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
callq 0x6710
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x3c(%rbp), %rdx
callq 0x5610
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x20(%rbp), %rax
je 0x2470
cmpl $0x0, -0x3c(%rbp)
je 0x2487
movq -0x20(%rbp), %rsi
movl -0x3c(%rbp), %edx
leaq 0x611e(%rip), %rdi      # 0x859c
movb $0x0, %al
callq 0x1050
jmp 0x24b1
movq -0x20(%rbp), %rsi
leaq 0x6139(%rip), %rdi      # 0x85cb
movb $0x0, %al
callq 0x1050
movq -0x20(%rbp), %rdi
callq 0x2020
movq -0x20(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x56f0
movq -0x28(%rbp), %rdi
movl $0xff, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x6500
movq -0x18(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x4eb0
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3b40
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)