// File: /workspace/github_c_makefile_star2_O0/phluid61[P]hsf/main.c
// Function: do_sh_token
void do_sh_token(sh_char_t* value, size_t n) {
	SH_Token* obj;
	SH_BareItem* bi;

	/* used to printf() value, looks like "%#{n}s" */
	char template[8];

	sh_char_t* s;

	int err = 0;

	snprintf(template, 8, "%%%lus", n);

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

		s = SH_Token__to_s(obj, &err);
		if ((sh_char_t*)0 == s || err) {
			printf("  * unable to to_s: [%llX] 0x%08X\n", (long long)s, err);
		} else {
			printf("  - to_s =:\n");
			hexdump_string(s);
			free(s);
		}

		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);
			do_sh_bareitem(bi);
			SH_BareItem__destroy(bi, SH_FALSE, 0);
		}

		SH_Token__destroy(obj, 0);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x8, %esi
leaq 0x6797(%rip), %rdx      # 0x82d2
movb $0x0, %al
callq 0x1060
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x38d0
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x1b65
cmpl $0x0, -0x34(%rbp)
je 0x1ba0
leaq 0x67d9(%rip), %rdi      # 0x8345
movb $0x0, %al
callq 0x1050
leaq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
movb $0x0, %al
callq 0x1050
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x34(%rbp), %ecx
leaq 0x6762(%rip), %rdi      # 0x82f6
movb $0x0, %al
callq 0x1050
jmp 0x1c96
leaq 0x67ba(%rip), %rdi      # 0x8361
movb $0x0, %al
callq 0x1050
leaq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
movb $0x0, %al
callq 0x1050
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0x6755(%rip), %rdi      # 0x8321
movb $0x0, %al
callq 0x1050
movq -0x18(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x3ba0
movq %rax, -0x30(%rbp)
xorl %eax, %eax
cmpq -0x30(%rbp), %rax
je 0x1bf2
cmpl $0x0, -0x34(%rbp)
je 0x1c09
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %edx
leaq 0x650e(%rip), %rdi      # 0x810e
movb $0x0, %al
callq 0x1050
jmp 0x1c29
leaq 0x6523(%rip), %rdi      # 0x8133
movb $0x0, %al
callq 0x1050
movq -0x30(%rbp), %rdi
callq 0x1380
movq -0x30(%rbp), %rdi
callq 0x1030
movq -0x18(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x4c30
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x20(%rbp), %rax
je 0x1c48
cmpl $0x0, -0x34(%rbp)
je 0x1c5f
movq -0x20(%rbp), %rsi
movl -0x34(%rbp), %edx
leaq 0x64f7(%rip), %rdi      # 0x814d
movb $0x0, %al
callq 0x1050
jmp 0x1c89
movq -0x20(%rbp), %rsi
leaq 0x6512(%rip), %rdi      # 0x817c
movb $0x0, %al
callq 0x1050
movq -0x20(%rbp), %rdi
callq 0x11e0
movq -0x20(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x4eb0
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3b40
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)