// File: /workspace/github_c_makefile_star2_O1/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 0x2b24
movq %rax, %rbx
testq %rax, %rax
sete %al
movl (%r14), %edx
testl %edx, %edx
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x169c
leaq 0x3b82(%rip), %rdi      # 0x5209
movsd 0x8(%rsp), %xmm0
movq %rbx, %rsi
movb $0x1, %al
callq 0x1060
jmp 0x17f5
leaq 0x3b98(%rip), %rdi      # 0x523b
movsd 0x8(%rsp), %xmm0
movq %rbx, %rsi
movb $0x1, %al
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2c5c
leaq 0x3b98(%rip), %rdi      # 0x525c
movb $0x1, %al
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2c75
leaq 0x3b93(%rip), %rdi      # 0x526f
movb $0x1, %al
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2c95
movzbl %al, %esi
leaq 0x3aeb(%rip), %rdi      # 0x51e2
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2cac
leaq 0x3b71(%rip), %rdi      # 0x5280
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2cc4
movzwl %ax, %esi
leaq 0x3b6d(%rip), %rdi      # 0x529a
xorl %eax, %eax
callq 0x1060
leaq 0x4(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2cdc
movq %rax, %r14
testq %rax, %rax
sete %al
movl (%r15), %edx
testl %edx, %edx
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x176f
leaq 0x39ab(%rip), %rdi      # 0x510e
movq %r14, %rsi
xorl %eax, %eax
callq 0x1060
jmp 0x178b
leaq 0x405a(%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 0x38aa
movq %rax, %r14
testq %rax, %rax
sete %al
movl (%r15), %edx
testl %edx, %edx
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x17c6
leaq 0x3977(%rip), %rdi      # 0x5131
movq %r14, %rsi
xorl %eax, %eax
callq 0x1060
jmp 0x17eb
leaq 0x3993(%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 0x3a6c
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2c3d
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq