// File: /workspace/github_cpp_makefile_star2_O3/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 0x1e213(%rip), %xmm0    # 0x300d0
jbe 0x11ee4
movsd 0x1e211(%rip), %xmm0    # 0x300d8
movsd 0x1e201(%rip), %xmm1    # 0x300d0
mulsd %xmm0, %xmm2
movl %r13d, %eax
incq %r13
cmpl $0x3, %eax
ja 0x11ee4
ucomisd %xmm1, %xmm2
ja 0x11ecf
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 0x11f3c
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
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 0x1fb7d(%rip), %rsi     # 0x31aec
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 0x11fa1
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x11fab
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 0x1e1b6(%rip), %rax     # 0x30184
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 0x1200b
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x12015
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 0x1fda1(%rip), %rsi     # 0x31dd9
callq 0x4580
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x12064
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x1206d
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 0x120a9
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x120c0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x120d7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x120f2
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x28e9f(%rip), %rsi     # 0x3af98
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 0x12146
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x12146
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x12162
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x12162
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12189
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x12189
jmp 0x12186
movq %rax, %r14
jmp 0x121aa
movq %rax, %r14
movq 0x28e08(%rip), %rsi     # 0x3af98
leaq 0x88(%rsp), %rdi
callq 0x4220
leaq 0x108(%rsp), %rdi
callq 0x4120
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x121bd
movq (%r15), %rsi
incq %rsi
callq 0x4300
movq %r14, %rdi
callq 0x4540