// File: /workspace/github_cpp_makefile_star2_O1/menhits[P]phplus/src/PhplusStdLib.cpp
// Function: addToProgDoubleToStr(CppProgram*)
void addToProgDoubleToStr(CppProgram * prog)
{
	if (!prog->hasFunc("$doubleToStr"))
	{
		addToProgIntToStr(prog);
		addToProgConcatStr(prog);
		addToProgPpStr(prog);
		
		string intToStr=prog->ppToCpp("$intToStr");
		string concat=prog->ppToCpp("$concatStr");
		string ppStr=prog->ppToCpp("$ppStr");
		
		prog->addFunc("$doubleToStr", {{"double", "in"}}, prog->getTypeCode(String),
			
			"long long b = (in - (long long)in) * 10000000000 * (in>=0 ? 1 : -1);\n"
			"if (b % 10 == 9)\n\tb += 1;\n"
			"while (b>0 && !(b % 10))\n\tb /= 10;\n"
			"return "+concat+"("+concat+"("+intToStr+"((int)in), "+ppStr+"(\".\")), "+intToStr+"(b));\n"
		);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rdi, %rbx
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x4a46c(%rip), %rsi     # 0x7964c
leaq 0x4a471(%rip), %rdx     # 0x79658
leaq 0x10(%rsp), %rdi
callq 0xdf6a
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1c806
movl %eax, %ebp
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x2f20f
callq 0xa2b0
testb %bpl, %bpl
jne 0x2f8f1
movq %rbx, %rdi
callq 0x2e58d
movq %rbx, %rdi
callq 0x2ee34
movq %rbx, %rdi
callq 0x2dbc6
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x49f13(%rip), %rsi     # 0x79152
leaq 0x49f15(%rip), %rdx     # 0x7915b
callq 0xdf6a
movq 0xa0(%rbx), %rsi
leaq 0x120(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x18f84
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x2f273
callq 0xa2b0
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x4a2f5(%rip), %rsi     # 0x79577
leaq 0x4a2f8(%rip), %rdx     # 0x79581
callq 0xdf6a
movq 0xa0(%rbx), %rsi
leaq 0x1c0(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x18f84
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x2f2b6
callq 0xa2b0
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x49d34(%rip), %rsi     # 0x78ff9
leaq 0x49d33(%rip), %rdx     # 0x78fff
callq 0xdf6a
movq 0xa0(%rbx), %rsi
leaq 0x1f8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x18f84
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x2f2f9
callq 0xa2b0
leaq 0x110(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x4a340(%rip), %rsi     # 0x7964c
leaq 0x4a345(%rip), %rdx     # 0x79658
leaq 0x100(%rsp), %rdi
callq 0xdf6a
leaq 0x478e1(%rip), %rsi     # 0x76c08
leaq 0x47b7f(%rip), %rdx     # 0x76ead
leaq 0x10(%rsp), %rdi
callq 0x4e4d4
leaq 0x1e0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x4e2a2
leaq 0x6a105(%rip), %rax     # 0x99460
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rcx, 0x50(%rsp)
movq %rax, 0x58(%rsp)
testq %rax, %rax
je 0x2f386
movq 0x69c30(%rip), %rcx     # 0x98fa8
cmpb $0x0, (%rcx)
je 0x2f382
incl 0x8(%rax)
jmp 0x2f386
lock
incl 0x8(%rax)
leaq 0x238(%rsp), %rdi
leaq 0x50(%rsp), %rdx
movq %rbx, %rsi
callq 0x1a7f4
leaq 0x4a2b7(%rip), %rsi     # 0x79659
leaq 0x218(%rsp), %rdi
leaq 0x1c0(%rsp), %rdx
callq 0xdbef
leaq 0x4c63a(%rip), %rsi     # 0x7b9f8
leaq 0x218(%rsp), %rdi
callq 0xa560
leaq 0x150(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2f3fb
movq %rdx, 0x140(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x150(%rsp)
jmp 0x2f403
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x140(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x1c0(%rsp), %rsi
movq 0x1c8(%rsp), %rdx
callq 0xa110
leaq 0x70(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2f45e
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x2f464
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x60(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x4c571(%rip), %rsi     # 0x7b9f8
callq 0xa560
leaq 0x90(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2f4bc
movq %rdx, 0x80(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x90(%rsp)
jmp 0x2f4c2
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x80(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rdx
callq 0xa110
leaq 0xb0(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2f526
movq %rdx, 0xa0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb0(%rsp)
jmp 0x2f52c
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0xa0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x4a191(%rip), %rsi     # 0x796e3
callq 0xa560
leaq 0xd0(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2f587
movq %rdx, 0xc0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd0(%rsp)
jmp 0x2f58d
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0xc0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x1f8(%rsp), %rsi
movq 0x200(%rsp), %rdx
callq 0xa110
leaq 0xf0(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2f5f1
movq %rdx, 0xe0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf0(%rsp)
jmp 0x2f5f7
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0xe0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x4a0d2(%rip), %rsi     # 0x796ef
callq 0xa560
leaq 0x170(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2f652
movq %rdx, 0x160(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x170(%rsp)
jmp 0x2f659
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x160(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rdx
callq 0xa110
leaq 0x190(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2f6bd
movq %rdx, 0x180(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x190(%rsp)
jmp 0x2f6c4
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x180(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x4a00e(%rip), %rsi     # 0x796f8
callq 0xa560
leaq 0x1b0(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2f720
movq %rdx, 0x1a0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1b0(%rsp)
jmp 0x2f728
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x1a0(%rsp), %r8
movq %rdx, 0x8(%r8)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x100(%rsp), %rsi
leaq 0x1e0(%rsp), %rdx
leaq 0x238(%rsp), %rcx
movq %rbx, %rdi
callq 0x1c826
movq 0x1a0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2f779
callq 0xa2b0
movq 0x180(%rsp), %rdi
cmpq %r14, %rdi
leaq 0x110(%rsp), %rbx
je 0x2f793
callq 0xa2b0
movq 0x160(%rsp), %rdi
cmpq %rbp, %rdi
leaq 0x70(%rsp), %r14
je 0x2f7aa
callq 0xa2b0
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x2f7c4
callq 0xa2b0
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x2f7de
callq 0xa2b0
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x2f7f8
callq 0xa2b0
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x2f812
callq 0xa2b0
movq 0x60(%rsp), %rdi
cmpq %r14, %rdi
je 0x2f821
callq 0xa2b0
movq 0x140(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f833
callq 0xa2b0
leaq 0x228(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f849
callq 0xa2b0
leaq 0x248(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f85f
callq 0xa2b0
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x2f86e
callq 0xdcba
leaq 0x1e0(%rsp), %rdi
callq 0x4e2e4
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f88e
callq 0xa2b0
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x2f89d
callq 0xa2b0
movq 0x100(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2f8af
callq 0xa2b0
leaq 0x208(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f8c5
callq 0xa2b0
leaq 0x1d0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f8db
callq 0xa2b0
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f8f1
callq 0xa2b0
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x1a0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2f91d
callq 0xa2b0
jmp 0x2f91d
movq %rax, %rbx
movq 0x180(%rsp), %rdi
cmpq %r14, %rdi
je 0x2f934
callq 0xa2b0
jmp 0x2f934
movq %rax, %rbx
movq 0x160(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2f94b
callq 0xa2b0
jmp 0x2f94b
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x2f96a
callq 0xa2b0
jmp 0x2f96a
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x2f989
callq 0xa2b0
jmp 0x2f989
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x2f9a8
callq 0xa2b0
jmp 0x2f9a8
movq %rax, %rbx
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x2f9c7
callq 0xa2b0
jmp 0x2f9c7
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2f9e0
callq 0xa2b0
jmp 0x2f9e0
movq %rax, %rbx
movq 0x140(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f9f2
callq 0xa2b0
leaq 0x228(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2fa08
callq 0xa2b0
leaq 0x248(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2fa1e
callq 0xa2b0
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x2fa2d
callq 0xdcba
leaq 0x1e0(%rsp), %rdi
callq 0x4e2e4
leaq 0x10(%rsp), %rdi
callq 0x4e278
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x2fa5e
callq 0xa2b0
leaq 0x208(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2fa74
callq 0xa2b0
leaq 0x1d0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2fa8a
callq 0xa2b0
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2fb0d
callq 0xa2b0
jmp 0x2fb0d
movq %rax, %rbx
jmp 0x2f9f2
movq %rax, %rbx
jmp 0x2fa08
movq %rax, %rbx
jmp 0x2fa1e
movq %rax, %rbx
jmp 0x2fa3a
movq %rax, %rbx
jmp 0x2fa44
movq %rax, %rbx
jmp 0x2fa5e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
jne 0x2fa6f
jmp 0x2fa74
movq %rax, %rbx
jmp 0x2fa74
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
jne 0x2fa85
jmp 0x2fa8a
movq %rax, %rbx
jmp 0x2fa8a
jmp 0x2fafb
jmp 0x2fb0a
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
jne 0x2fa9b
jmp 0x2fb0d
movq %rax, %rbx
movq %rbx, %rdi
callq 0xa510