// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/CasHMCWrapper.cpp
// Function: CasHMC::CasHMCWrapper::DataScaling[abi:cxx11](double)
string CasHMCWrapper::DataScaling(double dataScale)
{
	string outStr;
	char unitChar[5] = {' ','K','M','G','T'};
	
	int unitScale = 0;
	while(dataScale > 1024) {
		unitScale++;
		dataScale /= 1024;
		if(unitScale > 4)	break;
	}
	
	stringstream scaledData;
	scaledData<<ALI(7)<<dataScale;
	outStr = scaledData.str() + " " + unitChar[unitScale] + "B";
	return outStr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movapd %xmm0, %xmm2
xorl %r13d, %r13d
ucomisd 0x1efd9(%rip), %xmm0    # 0x310d0
jbe 0x1211e
movsd 0x1efd7(%rip), %xmm0    # 0x310d8
movsd 0x1efc7(%rip), %xmm1    # 0x310d0
mulsd %xmm0, %xmm2
movl %r13d, %eax
incq %r13
cmpl $0x3, %eax
ja 0x1211e
ucomisd %xmm1, %xmm2
ja 0x12109
movsd %xmm2, (%rsp)
leaq 0x88(%rsp), %rdi
callq 0x4200
movq 0x98(%rsp), %rax
movq -0x18(%rax), %rcx
movq $0x7, 0xa8(%rsp,%rcx)
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %r14
addq $0x98, %r14
cmpb $0x0, 0xe1(%r14)
jne 0x1217d
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r14)
movb $0x1, 0xe1(%r14)
leaq 0x98(%rsp), %rdi
movb $0x20, 0xe0(%r14)
movsd (%rsp), %xmm0
callq 0x4460
leaq 0xa0(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x4450
leaq 0x208cc(%rip), %rsi     # 0x32a7c
leaq 0x48(%rsp), %rdi
callq 0x4580
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x121e2
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x121ec
movupd (%rcx), %xmm0
movupd %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1ef15(%rip), %rax     # 0x31124
movsbl (%r13,%rax), %r8d
movq 0x8(%rdi), %rsi
movl $0x1, %ecx
xorl %edx, %edx
callq 0x4570
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1224c
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x12256
movupd (%rcx), %xmm0
movupd %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x20af0(%rip), %rsi     # 0x32d69
callq 0x4580
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x122a5
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x122ae
movupd (%rcx), %xmm0
movupd %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x68(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4370
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x122ea
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x12301
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x12318
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12333
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x29c5e(%rip), %rsi     # 0x3bf98
leaq 0x88(%rsp), %rdi
callq 0x4220
leaq 0x108(%rsp), %rdi
callq 0x4120
movq %rbx, %rax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x12387
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x12387
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x123a3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x123a3
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x123ca
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x123ca
jmp 0x123c7
movq %rax, %r14
jmp 0x123eb
movq %rax, %r14
movq 0x29bc7(%rip), %rsi     # 0x3bf98
leaq 0x88(%rsp), %rdi
callq 0x4220
leaq 0x108(%rsp), %rdi
callq 0x4120
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x123fe
movq (%r15), %rsi
incq %rsi
callq 0x4300
movq %r14, %rdi
callq 0x4540