// File: /workspace/github_c_makefile_star2_O2/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
andl $0x0, (%r14)
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
callq 0x2a64
movq %rax, %rbx
testq %rax, %rax
sete %al
movl (%r14), %edx
testl %edx, %edx
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x1662
leaq 0x3bbc(%rip), %rdi      # 0x5209
movsd 0x8(%rsp), %xmm0
movq %rbx, %rsi
movb $0x1, %al
callq 0x1060
jmp 0x17bb
leaq 0x3bd2(%rip), %rdi      # 0x523b
movsd 0x8(%rsp), %xmm0
movq %rbx, %rsi
movb $0x1, %al
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2b7f
leaq 0x3bd2(%rip), %rdi      # 0x525c
movb $0x1, %al
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2b92
leaq 0x3bcd(%rip), %rdi      # 0x526f
movb $0x1, %al
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2bac
movzbl %al, %esi
leaq 0x3b25(%rip), %rdi      # 0x51e2
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2bbd
leaq 0x3bab(%rip), %rdi      # 0x5280
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2bcf
movzwl %ax, %esi
leaq 0x3ba7(%rip), %rdi      # 0x529a
xorl %eax, %eax
callq 0x1060
leaq 0x4(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2be1
movq %rax, %r14
testq %rax, %rax
sete %al
movl (%r15), %edx
testl %edx, %edx
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x1735
leaq 0x39e5(%rip), %rdi      # 0x510e
movq %r14, %rsi
xorl %eax, %eax
callq 0x1060
jmp 0x1751
leaq 0x4094(%rip), %rdi      # 0x57d0
callq 0x1040
movq %r14, %rdi
callq 0x130e
movq %r14, %rdi
callq 0x1030
leaq 0x4(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3710
movq %rax, %r14
testq %rax, %rax
sete %al
movl (%r15), %edx
testl %edx, %edx
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x178c
leaq 0x39b1(%rip), %rdi      # 0x5131
movq %r14, %rsi
xorl %eax, %eax
callq 0x1060
jmp 0x17b1
leaq 0x39cd(%rip), %rdi      # 0x5160
movq %r14, %rsi
xorl %eax, %eax
callq 0x1060
movq %r14, %rdi
callq 0x11c9
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x38c6
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2b63
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq