// File: /workspace/github_cpp_makefile_star2_O1/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), %r13
movq %r13, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl %ecx, %eax
imulq $0x38, %rax, %rax
leaq (%rdx,%rax), %rsi
movl %r8d, %ecx
movq 0x10(%rsi,%rcx,8), %xmm0
movq %xmm0, %rsi
ucomisd %xmm0, %xmm0
setnp %dil
btrq $0x3f, %rsi
movabsq $0x7ff0000000000000, %r8 # imm = 0x7FF0000000000000
cmpq %r8, %rsi
setne %sil
testb %sil, %dil
jne 0x37d8f
movsd %xmm0, 0x8(%rsp)
movb 0x43c(%r14), %sil
movl 0x438(%r14), %edi
testb %sil, %sil
movl $0x12b, %r8d            # imm = 0x12B
movl $0x81, %r9d
cmovnel %r8d, %r9d
cmpl %r9d, %edi
jbe 0x37e60
movq %r13, (%rsp)
xorl %edi, %edi
leaq 0x70(%rsp), %r15
movl %edi, 0x8(%r15)
leaq 0xc59bb(%rip), %r13     # 0xfd3b0
addq $0x10, %r13
movq %r13, (%r15)
movapd 0x7e1fc(%rip), %xmm1    # 0xb5c00
movupd %xmm1, 0xc(%r15)
movq %rdi, 0x48(%r15)
movl %edi, 0x50(%r15)
movq %rdi, 0x58(%r15)
movb %dil, 0x60(%r15)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x20(%r15)
movupd %xmm0, 0x30(%r15)
movl %edi, 0x40(%r15)
movl $0x8, %r8d
movl %r8d, 0x64(%r15)
movupd %xmm0, 0x68(%r15)
movq %rdi, 0x78(%r15)
movq %rdi, 0x98(%r15)
movl $0xd0, %r9d
leaq (%r15,%r9), %r10
movq %r10, 0xa0(%r15)
movl $0x1, %r10d
movq %r10, 0xa8(%r15)
movupd %xmm0, 0xb0(%r15)
movl $0x3f800000, %r11d      # imm = 0x3F800000
movl %r11d, 0xc0(%r15)
movupd %xmm0, 0xc8(%r15)
leaq 0x170(%rsp), %r12
movl %edi, 0x8(%r12)
movq %r13, 0x8(%rsp)
movq %r13, (%r12)
movupd %xmm1, 0xc(%r12)
movq %rdi, 0x48(%r12)
movl %edi, 0x50(%r12)
movq %rdi, 0x58(%r12)
movb %dil, 0x60(%r12)
movupd %xmm0, 0x20(%r12)
movupd %xmm0, 0x30(%r12)
movl %edi, 0x40(%r12)
movl %r8d, 0x64(%r12)
movupd %xmm0, 0x68(%r12)
movq %rdi, 0x78(%r12)
movq %rdi, 0x98(%r12)
addq %r12, %r9
movq %r9, 0xa0(%r12)
movq %r10, 0xa8(%r12)
movupd %xmm0, 0xb0(%r12)
movl %r11d, 0xc0(%r12)
movupd %xmm0, 0xc8(%r12)
movabsq $0x400000000b, %rdi     # imm = 0x400000000B
movq %rdi, 0xc(%r15)
movl $0x7, 0xc(%r12)
movl $0x1, 0x14(%r15)
movabsq $0x100000040, %rdi      # imm = 0x100000040
movq %rdi, 0x10(%r12)
testb %sil, %sil
jne 0x37f6c
addq %rdx, %rax
addq $0x10, %rax
movq (%rax,%rcx,8), %r13
leaq 0x20(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x7fa43(%rip), %rsi     # 0xb75a7
leaq 0x7fa53(%rip), %rdx     # 0xb75be
leaq 0x10(%rsp), %rdi
callq 0x7c64
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x26a0a
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x37b99
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x816d9(%rip), %rax     # 0xb9279
leaq 0x8218a(%rip), %rcx     # 0xb9d31
cmpb $0x0, 0x603(%r14)
cmovneq %rax, %rcx
leaq 0x816b6(%rip), %rsi     # 0xb9270
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 0x8c0b3(%rip), %rdx     # 0xc3ca1
leaq 0x83e30(%rip), %r8      # 0xbba25
leaq 0x150(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x10(%rsp), %rcx
callq 0x54076
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 0x37c45
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 0x37c68
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r14, 0x170(%rsp)
movq %r12, %rdi
callq 0xdeb6
movq 0x1d8(%rsp), %rdi
testq %rdi, %rdi
je 0x37c95
movq 0x1e8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x1a8(%rsp), %rdi
testq %rdi, %rdi
je 0x37cda
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 0x37cfa
movq 0x1a0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq %r14, 0x70(%rsp)
movq %r15, %rdi
callq 0xdeb6
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x37d24
movq 0xe8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x37d69
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 0x37f32
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
jmp 0x37f32
leaq 0x83f9d(%rip), %rsi     # 0xbbd33
leaq 0x70(%rsp), %r15
movq %r15, %rdi
movb $0x1, %al
callq 0x6060
movq %r15, %rdi
movl $0x2e, %esi
callq 0x60e0
testq %rax, %rax
jne 0x37de1
leaq 0x70(%rsp), %rdi
movl $0x65, %esi
callq 0x60e0
testq %rax, %rax
jne 0x37de1
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 0x7c64
leaq 0x170(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6310
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x37e3e
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x6260
cmpb $0x1, 0x601(%r14)
jne 0x37f32
leaq 0x80a7a(%rip), %rsi     # 0xb88cd
movq %rbx, %rdi
callq 0x64e0
jmp 0x37f32
testb %sil, %sil
jne 0x37fd6
cmpl $0x18f, %edi            # imm = 0x18F
ja 0x37ebc
leaq 0x80(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7f6df(%rip), %rsi     # 0xb7563
leaq 0x7f6ee(%rip), %rdx     # 0xb7579
leaq 0x70(%rsp), %rdi
callq 0x7c64
leaq 0x70(%rsp), %rsi
movq %r14, %rdi
callq 0x26a0a
movq 0x70(%rsp), %rdi
cmpq %r15, %rdi
je 0x37ebc
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x6260
movsd 0x8(%rsp), %xmm1
ucomisd 0x7f5f6(%rip), %xmm1    # 0xb74c0
jb 0x37ef2
movzbl 0x601(%r14), %eax
leaq 0x813a2(%rip), %rdx     # 0xb927d
leaq 0x81305(%rip), %rcx     # 0xb91e7
testl %eax, %eax
cmovneq %rdx, %rcx
leaq 0xb(,%rax,4), %r8
jmp 0x37f24
movsd 0x7f5ce(%rip), %xmm0    # 0xb74c8
ucomisd %xmm1, %xmm0
jb 0x37f47
movzbl 0x601(%r14), %eax
leaq 0x8137e(%rip), %rdx     # 0xb928d
leaq 0x812dd(%rip), %rcx     # 0xb91f3
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 0x38044
movzbl 0x601(%r14), %eax
leaq 0x8133e(%rip), %rdx     # 0xb929e
leaq 0x81299(%rip), %rcx     # 0xb9200
jmp 0x37ee2
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x812b3(%rip), %rsi     # 0xb923d
leaq 0x812de(%rip), %rdx     # 0xb926f
leaq 0x10(%rsp), %rdi
callq 0x7c64
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xc4de6(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xc4dbe(%rip), %rsi     # 0xfcd80
movq 0xc600f(%rip), %rdx     # 0xfdfd8
movq %r15, %rdi
callq 0x6470
jmp 0x380b0
movq %r13, (%rsp)
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x80(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x7f546(%rip), %rsi     # 0xb7541
leaq 0x7f560(%rip), %rdx     # 0xb7562
leaq 0x70(%rsp), %rdi
callq 0x7c64
movb $0x1, %bpl
leaq 0x70(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xc4d75(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xc4d4d(%rip), %rsi     # 0xfcd80
movq 0xc5f9e(%rip), %rdx     # 0xfdfd8
movq %r15, %rdi
callq 0x6470
jmp 0x380b0
movq %r13, (%rsp)
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x80(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x81149(%rip), %rsi     # 0xb91b2
leaq 0x81176(%rip), %rdx     # 0xb91e6
leaq 0x70(%rsp), %rdi
callq 0x7c64
movb $0x1, %bpl
leaq 0x70(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xc4d07(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xc4cdf(%rip), %rsi     # 0xfcd80
movq 0xc5f30(%rip), %rdx     # 0xfdfd8
movq %r15, %rdi
callq 0x6470
jmp 0x380e3
jmp 0x3811e
movq %r13, (%rsp)
movq %rax, %r14
movq 0x70(%rsp), %rdi
cmpq %r15, %rdi
je 0x381a3
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x381a3
jmp 0x3819c
movq %rax, %r14
movq 0x70(%rsp), %rdi
cmpq %r12, %rdi
je 0x38124
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x38124
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x38139
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x38139
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x381a3
movq %r15, %rdi
callq 0x6200
jmp 0x381a3
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x38181
movq %r15, %rdi
callq 0x6200
jmp 0x38181
movq %rax, %r14
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x38181
movq 0x60(%rsp), %rsi
jmp 0x38174
jmp 0x3817e
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x38181
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x38181
movq %rax, %r14
leaq 0x170(%rsp), %rdi
callq 0x1c438
leaq 0x70(%rsp), %rdi
callq 0x1c438
jmp 0x381a3
jmp 0x3819c
movq %r13, (%rsp)
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x381bb
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
nop