// File: /workspace/github_cpp_makefile_star2_O3/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 %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rbp
movq %rbp, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl %ecx, %eax
imulq $0x38, %rax, %rax
addq %rdx, %rax
movl %r8d, %ecx
movsd 0x10(%rax,%rcx,8), %xmm0
ucomisd %xmm0, %xmm0
movq %xmm0, %r13
setnp %al
movq %r13, %rcx
btrq $0x3f, %rcx
movabsq $0x7ff0000000000000, %rdx # imm = 0x7FF0000000000000
cmpq %rdx, %rcx
setne %cl
testb %cl, %al
jne 0x375e0
movsd %xmm0, 0x8(%rsp)
movb 0x43c(%r14), %al
testb %al, %al
movl $0x12b, %ecx            # imm = 0x12B
movl $0x81, %edx
cmovnel %ecx, %edx
cmpl %edx, 0x438(%r14)
jbe 0x376b1
movq %rbp, (%rsp)
xorl %edx, %edx
leaq 0x70(%rsp), %r15
movl %edx, 0x8(%r15)
leaq 0xc5181(%rip), %r10     # 0xfc3e0
addq $0x10, %r10
movq %r10, (%r15)
movl $0x1, %ecx
movl %ecx, 0x18(%r15)
movq %rdx, 0x48(%r15)
movl %edx, 0x50(%r15)
movq %rdx, 0x58(%r15)
movb %dl, 0x60(%r15)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x20(%r15)
movupd %xmm0, 0x30(%r15)
movl %edx, 0x40(%r15)
movl $0x8, %esi
movl %esi, 0x64(%r15)
movupd %xmm0, 0x68(%r15)
movq %rdx, 0x78(%r15)
movq %rdx, 0x98(%r15)
movl $0xd0, %edi
leaq (%r15,%rdi), %r8
movq %r8, 0xa0(%r15)
movl $0x1, %r8d
movq %r8, 0xa8(%r15)
movupd %xmm0, 0xb0(%r15)
movl $0x3f800000, %r9d       # imm = 0x3F800000
movl %r9d, 0xc0(%r15)
movupd %xmm0, 0xc8(%r15)
leaq 0x170(%rsp), %r12
movl %edx, 0x8(%r12)
movq %r10, 0x8(%rsp)
movq %r10, (%r12)
movl %ecx, 0x18(%r12)
movq %rdx, 0x48(%r12)
movl %edx, 0x50(%r12)
movq %rdx, 0x58(%r12)
movb %dl, 0x60(%r12)
movupd %xmm0, 0x20(%r12)
movupd %xmm0, 0x30(%r12)
movl %edx, 0x40(%r12)
movl %esi, 0x64(%r12)
movupd %xmm0, 0x68(%r12)
movq %rdx, 0x78(%r12)
movq %rdx, 0x98(%r12)
addq %r12, %rdi
movq %rdi, 0xa0(%r12)
movq %r8, 0xa8(%r12)
movupd %xmm0, 0xb0(%r12)
movl %r9d, 0xc0(%r12)
movupd %xmm0, 0xc8(%r12)
movabsq $0x400000000b, %rdx     # imm = 0x400000000B
movq %rdx, 0xc(%r15)
movl $0x7, 0xc(%r12)
movl %ecx, 0x14(%r15)
movabsq $0x100000040, %rcx      # imm = 0x100000040
movq %rcx, 0x10(%r12)
testb %al, %al
jne 0x377b5
leaq 0x20(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x7f1e2(%rip), %rsi     # 0xb6597
leaq 0x7f1f2(%rip), %rdx     # 0xb65ae
leaq 0x10(%rsp), %rdi
callq 0x7be0
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x26356
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x373ea
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x80e78(%rip), %rax     # 0xb8269
leaq 0x81929(%rip), %rcx     # 0xb8d21
cmpb $0x0, 0x603(%r14)
cmovneq %rax, %rcx
leaq 0x80e55(%rip), %rsi     # 0xb8260
leaq 0x10(%rsp), %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x6060
movq (%r14), %rax
leaq 0x50(%rsp), %rdi
leaq 0x70(%rsp), %rdx
leaq 0x170(%rsp), %rcx
movq %r14, %rsi
callq *0x168(%rax)
leaq 0x8b832(%rip), %rdx     # 0xc2c71
leaq 0x835cf(%rip), %r8      # 0xbaa15
leaq 0x150(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x10(%rsp), %rcx
callq 0x5387c
movl $0xa0, %r13d
leaq 0x150(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
leaq 0x160(%rsp), %rax
cmpq %rax, %rdi
je 0x37496
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x6260
addq %r13, %r12
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
movq 0x8(%rsp), %r14
je 0x374b9
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r14, 0x170(%rsp)
movq %r12, %rdi
callq 0xde80
movq 0x1d8(%rsp), %rdi
testq %rdi, %rdi
je 0x374e6
movq 0x1e8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x1a8(%rsp), %rdi
testq %rdi, %rdi
je 0x3752b
movq 0x1c8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0x1a8(%rsp)
movl %eax, 0x1b0(%rsp)
movq %rax, 0x1b8(%rsp)
movl %eax, 0x1c0(%rsp)
movq %rax, 0x1c8(%rsp)
addq %r13, %r15
movq 0x190(%rsp), %rdi
testq %rdi, %rdi
je 0x3754b
movq 0x1a0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq %r14, 0x70(%rsp)
movq %r15, %rdi
callq 0xde80
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x37575
movq 0xe8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x375ba
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0xa8(%rsp)
movl %eax, 0xb0(%rsp)
movq %rax, 0xb8(%rsp)
movl %eax, 0xc0(%rsp)
movq %rax, 0xc8(%rsp)
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x3777b
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
jmp 0x3777b
leaq 0x8373c(%rip), %rsi     # 0xbad23
leaq 0x70(%rsp), %r15
movq %r15, %rdi
movb $0x1, %al
callq 0x6060
movq %r15, %rdi
movl $0x2e, %esi
callq 0x60e0
testq %rax, %rax
jne 0x37632
leaq 0x70(%rsp), %rdi
movl $0x65, %esi
callq 0x60e0
testq %rax, %rax
jne 0x37632
leaq 0x70(%rsp), %rdi
callq 0x6120
movw $0x302e, 0x70(%rsp,%rax) # imm = 0x302E
movb $0x0, 0x72(%rsp,%rax)
leaq 0x180(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x70(%rsp), %r15
movq %r15, %rdi
callq 0x6120
leaq (%rsp,%rax), %rdx
addq $0x70, %rdx
leaq 0x170(%rsp), %rdi
movq %r15, %rsi
callq 0x7be0
leaq 0x170(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6310
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x3768f
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x6260
cmpb $0x1, 0x601(%r14)
jne 0x3777b
leaq 0x80219(%rip), %rsi     # 0xb78bd
movq %rbx, %rdi
callq 0x64e0
jmp 0x3777b
testb %al, %al
jne 0x3781f
leaq 0x80(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x7ee86(%rip), %rsi     # 0xb6553
leaq 0x7ee95(%rip), %rdx     # 0xb6569
leaq 0x70(%rsp), %rdi
callq 0x7be0
leaq 0x70(%rsp), %rsi
movq %r14, %rdi
callq 0x26356
movq 0x70(%rsp), %rdi
cmpq %r12, %rdi
je 0x37705
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x6260
movsd 0x8(%rsp), %xmm1
ucomisd 0x7ed9d(%rip), %xmm1    # 0xb64b0
jb 0x3773b
movzbl 0x601(%r14), %eax
leaq 0x80b49(%rip), %rdx     # 0xb826d
leaq 0x80aac(%rip), %rcx     # 0xb81d7
testl %eax, %eax
cmovneq %rdx, %rcx
leaq 0xb(,%rax,4), %r8
jmp 0x3776d
movsd 0x7ed75(%rip), %xmm0    # 0xb64b8
ucomisd %xmm1, %xmm0
jb 0x37790
movzbl 0x601(%r14), %eax
leaq 0x80b25(%rip), %rdx     # 0xb827d
leaq 0x80a84(%rip), %rcx     # 0xb81e3
testl %eax, %eax
cmovneq %rdx, %rcx
leaq 0xc(,%rax,4), %r8
movq 0x8(%rbx), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x63f0
movq %rbx, %rax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
ucomisd %xmm1, %xmm1
jnp 0x3788d
movzbl 0x601(%r14), %eax
leaq 0x80ae5(%rip), %rdx     # 0xb828e
leaq 0x80a40(%rip), %rcx     # 0xb81f0
jmp 0x3772b
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x80a5a(%rip), %rsi     # 0xb822d
leaq 0x80a85(%rip), %rdx     # 0xb825f
leaq 0x10(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xc45cd(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xc45a5(%rip), %rsi     # 0xfbdb0
movq 0xc57c6(%rip), %rdx     # 0xfcfd8
movq %r15, %rdi
callq 0x6470
jmp 0x378ef
movq %rbp, (%rsp)
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x80(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x7eced(%rip), %rsi     # 0xb6531
leaq 0x7ed07(%rip), %rdx     # 0xb6552
leaq 0x70(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x70(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xc455c(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xc4534(%rip), %rsi     # 0xfbdb0
movq 0xc5755(%rip), %rdx     # 0xfcfd8
movq %r15, %rdi
callq 0x6470
jmp 0x378ef
movq %rbp, (%rsp)
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x70(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x808f5(%rip), %rsi     # 0xb81a2
leaq 0x80922(%rip), %rdx     # 0xb81d6
callq 0x7be0
movb $0x1, %bpl
leaq 0x70(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xc44f8(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xc44d0(%rip), %rsi     # 0xfbdb0
movq 0xc56f1(%rip), %rdx     # 0xfcfd8
movq %r15, %rdi
callq 0x6470
jmp 0x378f3
jmp 0x3793b
movq %rax, %r14
movq 0x70(%rsp), %rdi
cmpq %r12, %rdi
je 0x37910
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x3793e
jmp 0x379d8
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x37934
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x3794e
jmp 0x379b6
movq %rax, %r14
movq %r15, %rdi
callq 0x6200
jmp 0x379d8
movq %rax, %r14
movq %r15, %rdi
callq 0x6200
jmp 0x379b6
movq %rax, %r14
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x379b6
movq 0x60(%rsp), %rsi
jmp 0x379a7
jmp 0x379b3
movq %rbp, (%rsp)
movq %rax, %r14
movq 0x70(%rsp), %rdi
cmpq %r12, %rdi
je 0x379d8
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x379d8
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x379b6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x379b6
jmp 0x379d1
movq %rax, %r14
leaq 0x170(%rsp), %rdi
callq 0x1be02
leaq 0x70(%rsp), %rdi
callq 0x1be02
jmp 0x379d8
jmp 0x379d1
movq %rbp, (%rsp)
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x379f0
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0