// File: /workspace/github_c_makefile_star2_O3/phluid61[P]hsf/main.c
// Function: do_sh_decimal
void do_sh_decimal(sh_float_t value) {
	SH_Decimal* obj;
	SH_BareItem* bi;

	sh_float_t f;
	sh_bool_t b;
	sh_int_t i;
	uint16_t u;
	sh_char_t* s;

	int err = 0;

	obj = SH_Decimal__init(value, &err);
	if ((SH_Decimal*)0 == obj || err) {
		printf("* unable to init SH_Decimal(%.4F): [%llX] 0x%08X\n", (double)value, (long long)obj, err);
	} else {
		printf("+ init SH_Decimal(%.4F): [%llX]\n", (double)value, (long long)obj);

		f = SH_Decimal__float(obj, 0);
		printf("  - float =: %.4F\n", (double)f);

		f = SH_Decimal__abs(obj, 0);
		printf("  - abs =: %.4F\n", (double)f);

		b = SH_Decimal__negative(obj, 0);
		printf("  - negative =: %hhu\n", (unsigned char)b);

		i = SH_Decimal__integer_part(obj, 0);
		printf("  - integer_part =: %lld\n", (long long)i);

		u = SH_Decimal__fractional_part(obj, 0);
		printf("  - fractional_part =: %hu\n", u);

		s = SH_Decimal__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_decimal(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_Decimal__destroy(obj, 0);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x4(%rsp), %r14
movl $0x0, (%r14)
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
callq 0x2b5c
movq %rax, %rbx
testq %rax, %rax
sete %al
movl (%r14), %edx
testl %edx, %edx
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x16af
leaq 0x3b6f(%rip), %rdi      # 0x5209
movsd 0x8(%rsp), %xmm0
movq %rbx, %rsi
movb $0x1, %al
callq 0x1060
jmp 0x1808
leaq 0x3b85(%rip), %rdi      # 0x523b
movsd 0x8(%rsp), %xmm0
movq %rbx, %rsi
movb $0x1, %al
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2cc6
leaq 0x3b85(%rip), %rdi      # 0x525c
movb $0x1, %al
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2cd9
leaq 0x3b80(%rip), %rdi      # 0x526f
movb $0x1, %al
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2cf3
movzbl %al, %esi
leaq 0x3ad8(%rip), %rdi      # 0x51e2
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2d04
leaq 0x3b5e(%rip), %rdi      # 0x5280
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2d16
movzwl %ax, %esi
leaq 0x3b5a(%rip), %rdi      # 0x529a
xorl %eax, %eax
callq 0x1060
leaq 0x4(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2d28
movq %rax, %r14
testq %rax, %rax
sete %al
movl (%r15), %edx
testl %edx, %edx
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x1782
leaq 0x3998(%rip), %rdi      # 0x510e
movq %r14, %rsi
xorl %eax, %eax
callq 0x1060
jmp 0x179e
leaq 0x4047(%rip), %rdi      # 0x57d0
callq 0x1040
movq %r14, %rdi
callq 0x131d
movq %r14, %rdi
callq 0x1030
leaq 0x4(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x39b0
movq %rax, %r14
testq %rax, %rax
sete %al
movl (%r15), %edx
testl %edx, %edx
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x17d9
leaq 0x3964(%rip), %rdi      # 0x5131
movq %r14, %rsi
xorl %eax, %eax
callq 0x1060
jmp 0x17fe
leaq 0x3980(%rip), %rdi      # 0x5160
movq %r14, %rsi
xorl %eax, %eax
callq 0x1060
movq %r14, %rdi
callq 0x11ce
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3bfc
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2ca7
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq