// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::convert_double_to_string[abi:cxx11](spirv_cross::SPIRConstant const&, unsigned int, unsigned int)
std::string CompilerGLSL::convert_double_to_string(const SPIRConstant &c, uint32_t col, uint32_t row)
{
	string res;
	double double_value = c.scalar_f64(col, row);

	if (std::isnan(double_value) || std::isinf(double_value))
	{
		// Use special representation.
		if (!is_legacy())
		{
			SPIRType out_type;
			SPIRType in_type;
			out_type.basetype = SPIRType::Double;
			in_type.basetype = SPIRType::UInt64;
			out_type.vecsize = 1;
			in_type.vecsize = 1;
			out_type.width = 64;
			in_type.width = 64;

			uint64_t u64_value = c.scalar_u64(col, row);

			if (options.es)
				SPIRV_CROSS_THROW("64-bit integers/float not supported in ES profile.");
			require_extension_internal("GL_ARB_gpu_shader_int64");

			char print_buffer[64];
			sprintf(print_buffer, "0x%llx%s", static_cast<unsigned long long>(u64_value),
			        backend.long_long_literal_suffix ? "ull" : "ul");
			res = join(bitcast_glsl_op(out_type, in_type), "(", print_buffer, ")");
		}
		else
		{
			if (options.es)
				SPIRV_CROSS_THROW("FP64 not supported in ES profile.");
			if (options.version < 400)
				require_extension_internal("GL_ARB_gpu_shader_fp64");

			if (double_value == numeric_limits<double>::infinity())
			{
				if (backend.double_literal_suffix)
					res = "(1.0lf / 0.0lf)";
				else
					res = "(1.0 / 0.0)";
			}
			else if (double_value == -numeric_limits<double>::infinity())
			{
				if (backend.double_literal_suffix)
					res = "(-1.0lf / 0.0lf)";
				else
					res = "(-1.0 / 0.0)";
			}
			else if (std::isnan(double_value))
			{
				if (backend.double_literal_suffix)
					res = "(0.0lf / 0.0lf)";
				else
					res = "(0.0 / 0.0)";
			}
			else
				SPIRV_CROSS_THROW("Cannot represent non-finite floating point constant.");
		}
	}
	else
	{
		res = convert_to_string(double_value);
		if (backend.double_literal_suffix)
			res += "lf";
	}

	return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
movl %ecx, %eax
imulq $0x38, %rax, %r12
leaq (%rdx,%r12), %rax
movl %r8d, %r13d
movq 0x10(%rax,%r13,8), %xmm0
movq %xmm0, %rax
ucomisd %xmm0, %xmm0
setnp %cl
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rdx # imm = 0x7FF0000000000000
cmpq %rdx, %rax
setne %al
testb %al, %cl
jne 0x2ddea
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
callq 0x41b9c
testb %al, %al
je 0x2de34
cmpb $0x1, 0x43c(%r14)
je 0x2e0b9
cmpl $0x18f, 0x438(%r14) # imm = 0x18F
ja 0x2ddc3
leaq 0x637a2(%rip), %rsi     # 0x91533
leaq 0x98(%rsp), %rdi
leaq 0x170(%rsp), %rdx
callq 0x6100
leaq 0x98(%rsp), %rsi
movq %r14, %rdi
callq 0x21390
leaq 0x98(%rsp), %rdi
callq 0x6548
movsd 0x8(%rsp), %xmm1
ucomisd 0x636bf(%rip), %xmm1    # 0x91490
jb 0x2e05a
leaq 0x6546f(%rip), %rax     # 0x9324d
leaq 0x653d2(%rip), %rsi     # 0x931b7
jmp 0x2e090
leaq 0x98(%rsp), %rdi
callq 0x4341e
leaq 0x98(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6320
movq %r15, %rdi
callq 0x6548
cmpb $0x1, 0x601(%r14)
jne 0x2e0a4
leaq 0x64a76(%rip), %rsi     # 0x9289d
movq %rbx, %rdi
callq 0x64d0
jmp 0x2e0a4
leaq 0x98(%rsp), %rax
andl $0x0, 0x8(%rax)
leaq 0xb95a9(%rip), %rsi     # 0xe73f0
addq $0x10, %rsi
movq %rsi, (%rax)
pushq $0x1
popq %rcx
movl %ecx, 0x18(%rax)
andq $0x0, 0x48(%rax)
andl $0x0, 0x50(%rax)
andq $0x0, 0x58(%rax)
xorl %edi, %edi
movb %dil, 0x60(%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x30(%rax)
andl $0x0, 0x40(%rax)
pushq $0x8
popq %r9
movl %r9d, 0x64(%rax)
andq $0x0, 0x78(%rax)
movupd %xmm0, 0x68(%rax)
andq $0x0, 0x98(%rax)
movl $0xd0, %r8d
leaq (%rax,%r8), %rdx
movq %rdx, 0xa0(%rax)
leaq 0x170(%rsp), %rdx
andl $0x0, 0x8(%rdx)
movq %rsi, (%rdx)
movl %ecx, 0x18(%rdx)
andq $0x0, 0x48(%rdx)
pushq $0x1
popq %rsi
andl $0x0, 0x50(%rdx)
movq %rsi, 0xa8(%rax)
andq $0x0, 0x58(%rdx)
movupd %xmm0, 0xb0(%rax)
movl $0x3f800000, %r10d      # imm = 0x3F800000
movb %dil, 0x60(%rdx)
movupd %xmm0, 0x20(%rdx)
movupd %xmm0, 0x30(%rdx)
andl $0x0, 0x40(%rdx)
movl %r9d, 0x64(%rdx)
andq $0x0, 0x78(%rdx)
movupd %xmm0, 0x68(%rdx)
andq $0x0, 0x98(%rdx)
movl %r10d, 0xc0(%rax)
movupd %xmm0, 0xc8(%rax)
addq %rdx, %r8
movq %r8, 0xa0(%rdx)
movq %rsi, 0xa8(%rdx)
movupd %xmm0, 0xb0(%rdx)
movl %r10d, 0xc0(%rdx)
movupd %xmm0, 0xc8(%rdx)
movabsq $0x400000000b, %rsi     # imm = 0x400000000B
movq %rsi, 0xc(%rax)
movl $0x7, 0xc(%rdx)
movl %ecx, 0x14(%rax)
movabsq $0x100000040, %rax      # imm = 0x100000040
movq %rax, 0x10(%rdx)
cmpb $0x1, 0x43c(%r14)
je 0x2e110
leaq (%r15,%r12), %rax
addq $0x10, %rax
movq (%rax,%r13,8), %r15
leaq 0x635f4(%rip), %rsi     # 0x91577
leaq 0x10(%rsp), %rdi
leaq 0x78(%rsp), %rdx
callq 0x6100
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x21390
leaq 0x10(%rsp), %rdi
callq 0x6548
leaq 0x65299(%rip), %rax     # 0x93249
leaq 0x65d4a(%rip), %rcx     # 0x93d01
cmpb $0x0, 0x603(%r14)
cmovneq %rax, %rcx
leaq 0x65276(%rip), %rsi     # 0x93240
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x6060
movq (%r14), %rax
leaq 0x58(%rsp), %rdi
leaq 0x98(%rsp), %rdx
leaq 0x170(%rsp), %rcx
movq %r14, %rsi
callq *0x168(%rax)
leaq 0x6fc28(%rip), %rdx     # 0x9dc29
leaq 0x679ed(%rip), %r8      # 0x959f5
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x10(%rsp), %rcx
callq 0x433a2
leaq 0x78(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6320
movq %r14, %rdi
callq 0x6548
leaq 0x58(%rsp), %rdi
callq 0x6548
leaq 0x170(%rsp), %rdi
callq 0x17a3e
leaq 0x98(%rsp), %rdi
callq 0x17a3e
jmp 0x2e0a4
movsd 0x63436(%rip), %xmm0    # 0x91498
ucomisd %xmm1, %xmm0
jb 0x2e078
leaq 0x651ee(%rip), %rax     # 0x9325d
leaq 0x6514d(%rip), %rsi     # 0x931c3
jmp 0x2e090
ucomisd %xmm1, %xmm1
jnp 0x2e15b
leaq 0x651e5(%rip), %rax     # 0x9326e
leaq 0x65140(%rip), %rsi     # 0x931d0
cmpb $0x0, 0x601(%r14)
cmovneq %rax, %rsi
movq %rbx, %rdi
callq 0x64e0
movq %rbx, %rax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %r15
leaq 0x63446(%rip), %rsi     # 0x91511
leaq 0x98(%rsp), %rdi
leaq 0x170(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x98(%rsp), %rsi
movq %r15, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xb8cc4(%rip), %rsi     # 0xe6dc0
movq 0xb9edd(%rip), %rdx     # 0xe7fe0
movq %r15, %rdi
callq 0x6490
jmp 0x2e1ad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %r15
leaq 0x650eb(%rip), %rsi     # 0x9320d
leaq 0x10(%rsp), %rdi
leaq 0x78(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xb8c76(%rip), %rsi     # 0xe6dc0
movq 0xb9e8f(%rip), %rdx     # 0xe7fe0
movq %r15, %rdi
callq 0x6490
jmp 0x2e1ad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %r15
leaq 0x65015(%rip), %rsi     # 0x93182
leaq 0x98(%rsp), %rdi
leaq 0x170(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x98(%rsp), %rsi
movq %r15, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xb8c22(%rip), %rsi     # 0xe6dc0
movq 0xb9e3b(%rip), %rdx     # 0xe7fe0
movq %r15, %rdi
callq 0x6490
jmp 0x2e1df
jmp 0x2e203
movq %rax, %r14
leaq 0x98(%rsp), %rdi
callq 0x6548
jmp 0x2e24f
jmp 0x2e24c
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x2e1f9
jmp 0x2e22e
movq %rax, %r14
leaq 0x98(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x2e206
jmp 0x2e24f
movq %rax, %r14
movq %r15, %rdi
callq 0x6200
jmp 0x2e22e
movq %rax, %r14
movq %r15, %rdi
callq 0x6200
jmp 0x2e24f
movq %rax, %r14
leaq 0x58(%rsp), %rdi
jmp 0x2e224
jmp 0x2e22b
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
jmp 0x2e22e
movq %rax, %r14
leaq 0x170(%rsp), %rdi
callq 0x17a3e
leaq 0x98(%rsp), %rdi
callq 0x17a3e
jmp 0x2e24f
jmp 0x2e24c
movq %rax, %r14
movq %rbx, %rdi
callq 0x6548
movq %r14, %rdi
callq 0x64b0
nop