// File: /workspace/github_cpp_makefile_star2_O1/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::convert_half_to_string[abi:cxx11](spirv_cross::SPIRConstant const&, unsigned int, unsigned int)
string CompilerGLSL::convert_half_to_string(const SPIRConstant &c, uint32_t col, uint32_t row)
{
	string res;
	float float_value = c.scalar_f16(col, row);

	if (std::isnan(float_value) || std::isinf(float_value))
	{
		if (backend.half_literal_suffix)
		{
			// There is no uintBitsToFloat for 16-bit, so have to rely on legacy fallback here.
			if (float_value == numeric_limits<float>::infinity())
				res = join("(1.0", backend.half_literal_suffix, " / 0.0", backend.half_literal_suffix, ")");
			else if (float_value == -numeric_limits<float>::infinity())
				res = join("(-1.0", backend.half_literal_suffix, " / 0.0", backend.half_literal_suffix, ")");
			else if (std::isnan(float_value))
				res = join("(0.0", backend.half_literal_suffix, " / 0.0", backend.half_literal_suffix, ")");
			else
				SPIRV_CROSS_THROW("Cannot represent non-finite floating point constant.");
		}
		else
		{
			SPIRType type;
			type.basetype = SPIRType::Half;
			type.vecsize = 1;
			type.columns = 1;

			if (float_value == numeric_limits<float>::infinity())
				res = join(type_to_glsl(type), "(1.0 / 0.0)");
			else if (float_value == -numeric_limits<float>::infinity())
				res = join(type_to_glsl(type), "(-1.0 / 0.0)");
			else if (std::isnan(float_value))
				res = join(type_to_glsl(type), "(0.0 / 0.0)");
			else
				SPIRV_CROSS_THROW("Cannot represent non-finite floating point constant.");
		}
	}
	else
	{
		if (backend.half_literal_suffix)
			res = convert_to_string(float_value) + backend.half_literal_suffix;
		else
		{
			// In HLSL (FXC), it's important to cast the literals to half precision right away.
			// There is no literal for it.
			SPIRType type;
			type.basetype = SPIRType::Half;
			type.vecsize = 1;
			type.columns = 1;
			res = join(type_to_glsl(type), "(", convert_to_string(float_value), ")");
		}
	}

	return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl %ecx, %eax
imulq $0x38, %rax, %rax
addq %rdx, %rax
movl %r8d, %ecx
movl 0x10(%rax,%rcx,8), %edi
movzwl %di, %ecx
movl %ecx, %eax
shrl $0xf, %eax
movl %edi, %edx
shrl $0xa, %edx
andl $0x1f, %edx
andl $0x3ff, %edi            # imm = 0x3FF
cmpl $0x1f, %edx
je 0x36afd
testl %edx, %edx
jne 0x36ae8
testl %edi, %edi
je 0x36b10
bsrl %edi, %ecx
movl %ecx, %edx
notb %cl
addb $0xb, %cl
shll %cl, %edi
xorl $-0x20, %edx
addl $0x17, %edx
andl $0x1fffbfe, %edi        # imm = 0x1FFFBFE
shll $0xd, %edi
shll $0x1f, %eax
orl %edi, %eax
shll $0x17, %edx
addl $0x38000000, %edx       # imm = 0x38000000
orl %eax, %edx
jmp 0x36b15
shll $0x1f, %eax
testl %edi, %edi
je 0x36b09
shll $0xd, %ecx
orl %ecx, %eax
orl $0x7f800000, %eax       # imm = 0x7F800000
jmp 0x36b13
shll $0x1f, %eax
movl %eax, %edx
movd %edx, %xmm1
ucomiss %xmm1, %xmm1
setnp %cl
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmpl $0x7f800000, %edx       # imm = 0x7F800000
setne %dl
leaq 0x618(%rsi), %r14
movq 0x618(%rsi), %rax
testb %dl, %cl
jne 0x36b80
testq %rax, %rax
je 0x36c45
ucomiss 0x80984(%rip), %xmm1    # 0xb74d4
jb 0x36f00
leaq 0x8263e(%rip), %rsi     # 0xb919b
leaq 0x8263c(%rip), %rcx     # 0xb91a0
leaq 0x84eba(%rip), %r9      # 0xbba25
leaq 0x70(%rsp), %rdi
movq %r14, %rdx
movq %r14, %r8
callq 0x53ca0
jmp 0x37005
testq %rax, %rax
je 0x36d13
cvtss2sd %xmm1, %xmm0
leaq 0x8519f(%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 0x36bdf
leaq 0x70(%rsp), %rdi
movl $0x65, %esi
callq 0x60e0
testq %rax, %rax
jne 0x36bdf
leaq 0x70(%rsp), %rdi
callq 0x6120
movw $0x302e, 0x70(%rsp,%rax) # imm = 0x302E
movb $0x0, 0x72(%rsp,%rax)
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x70(%rsp), %r15
movq %r15, %rdi
callq 0x6120
leaq (%rsp,%rax), %rdx
addq $0x70, %rdx
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x7c64
movq (%r14), %rsi
leaq 0x8(%rsp), %rdi
callq 0x64e0
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x36f3b
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x36f42
xorl %eax, %eax
leaq 0x140(%rsp), %rcx
movl %eax, -0xc8(%rcx)
leaq 0xc6754(%rip), %r15     # 0xfd3b0
addq $0x10, %r15
movq %r15, -0xd0(%rcx)
movaps 0x7ef92(%rip), %xmm0    # 0xb5c00
movups %xmm0, -0xc4(%rcx)
movq %rax, -0x88(%rcx)
movl %eax, -0x80(%rcx)
movq %rax, -0x78(%rcx)
movb $0x0, -0x70(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, -0xb0(%rcx)
movups %xmm0, -0xa0(%rcx)
movl %eax, -0x90(%rcx)
movl $0x8, -0x6c(%rcx)
movups %xmm0, -0x68(%rcx)
movq %rax, -0x58(%rcx)
movq %rax, -0x38(%rcx)
movq %rcx, -0x30(%rcx)
movq $0x1, -0x28(%rcx)
movups %xmm0, -0x20(%rcx)
movl $0x3f800000, -0x10(%rcx) # imm = 0x3F800000
movups %xmm0, -0x8(%rcx)
movl $0x9, -0xc4(%rcx)
ucomiss 0x807f7(%rip), %xmm1    # 0xb74d4
jb 0x36f96
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rdx
xorl %ecx, %ecx
callq *0x98(%rax)
leaq 0x824e8(%rip), %rdx     # 0xb91e7
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x53e08
jmp 0x3706d
movss %xmm1, 0x2c(%rsp)
xorl %eax, %eax
leaq 0x140(%rsp), %rcx
movl %eax, -0xc8(%rcx)
leaq 0xc6680(%rip), %r15     # 0xfd3b0
addq $0x10, %r15
movq %r15, -0xd0(%rcx)
movaps 0x7eebe(%rip), %xmm0    # 0xb5c00
movups %xmm0, -0xc4(%rcx)
movq %rax, -0x88(%rcx)
movl %eax, -0x80(%rcx)
movq %rax, -0x78(%rcx)
movb $0x0, -0x70(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, -0xb0(%rcx)
movups %xmm0, -0xa0(%rcx)
movl %eax, -0x90(%rcx)
movl $0x8, -0x6c(%rcx)
movups %xmm0, -0x68(%rcx)
movq %rax, -0x58(%rcx)
movq %rax, -0x38(%rcx)
movq %rcx, -0x30(%rcx)
movq $0x1, -0x28(%rcx)
movups %xmm0, -0x20(%rcx)
movl $0x3f800000, -0x10(%rcx) # imm = 0x3F800000
movups %xmm0, -0x8(%rcx)
movl $0x9, -0xc4(%rcx)
movq (%rsi), %rax
leaq 0x168(%rsp), %rdi
leaq 0x70(%rsp), %rdx
xorl %ecx, %ecx
callq *0x98(%rax)
xorps %xmm0, %xmm0
cvtss2sd 0x2c(%rsp), %xmm0
leaq 0x84f61(%rip), %rsi     # 0xbbd33
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movb $0x1, %al
callq 0x6060
movq %r14, %rdi
movl $0x2e, %esi
callq 0x60e0
testq %rax, %rax
jne 0x36e1d
leaq 0x30(%rsp), %rdi
movl $0x65, %esi
callq 0x60e0
testq %rax, %rax
jne 0x36e1d
leaq 0x30(%rsp), %rdi
callq 0x6120
movw $0x302e, 0x30(%rsp,%rax) # imm = 0x302E
movb $0x0, 0x32(%rsp,%rax)
leaq 0x158(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x6120
leaq (%rsp,%rax), %rdx
addq $0x30, %rdx
leaq 0x148(%rsp), %rdi
movq %r14, %rsi
callq 0x7c64
leaq 0x8ce4c(%rip), %rdx     # 0xc3ca1
leaq 0x84bc9(%rip), %r8      # 0xbba25
leaq 0x8(%rsp), %rdi
leaq 0x168(%rsp), %rsi
leaq 0x148(%rsp), %rcx
callq 0x53f20
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x36ea0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x148(%rsp), %rdi
cmpq %r13, %rdi
je 0x36ebd
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x110(%rsp), %r14
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36ee6
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r15, 0x70(%rsp)
movq %r14, %rdi
callq 0xdeb6
movq 0xd8(%rsp), %rdi
jmp 0x370cd
movss 0x805d0(%rip), %xmm0    # 0xb74d8
ucomiss %xmm1, %xmm0
jb 0x36fd7
leaq 0x8228f(%rip), %rsi     # 0xb91a7
leaq 0x82281(%rip), %rcx     # 0xb91a0
leaq 0x84aff(%rip), %r9      # 0xbba25
leaq 0x70(%rsp), %rdi
movq %r14, %rdx
movq %r14, %r8
callq 0x53d54
jmp 0x37005
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x30(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x36f7e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x37144
movq 0x18(%rsp), %rsi
jmp 0x37031
movss 0x8053a(%rip), %xmm0    # 0xb74d8
ucomiss %xmm1, %xmm0
jb 0x37039
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rdx
xorl %ecx, %ecx
callq *0x98(%rax)
leaq 0x82230(%rip), %rdx     # 0xb91f3
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x53e94
jmp 0x3706d
ucomiss %xmm1, %xmm1
jnp 0x37159
leaq 0x821c6(%rip), %rsi     # 0xb91ad
leaq 0x821b2(%rip), %rcx     # 0xb91a0
leaq 0x84a30(%rip), %r9      # 0xbba25
leaq 0x70(%rsp), %rdi
movq %r14, %rdx
movq %r14, %r8
callq 0x53ca0
leaq 0x70(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x37144
movq 0x80(%rsp), %rsi
incq %rsi
jmp 0x3713f
ucomiss %xmm1, %xmm1
jnp 0x371c2
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rdx
xorl %ecx, %ecx
callq *0x98(%rax)
leaq 0x821a2(%rip), %rdx     # 0xb9200
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x53e08
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x37097
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x370b2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x110(%rsp), %r14
movq %r15, -0xa0(%r14)
movq %r14, %rdi
callq 0xdeb6
movq -0x38(%r14), %rdi
testq %rdi, %rdi
je 0x370e2
movq 0xe8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x37127
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 0x37144
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x80(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x82039(%rip), %rsi     # 0xb91b2
leaq 0x82066(%rip), %rdx     # 0xb91e6
leaq 0x70(%rsp), %rdi
callq 0x7c64
movb $0x1, %bpl
leaq 0x70(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xc5bf7(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xc5bcf(%rip), %rsi     # 0xfcd80
movq 0xc6e20(%rip), %rdx     # 0xfdfd8
movq %r15, %rdi
callq 0x6470
jmp 0x37226
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x81fd3(%rip), %rsi     # 0xb91b2
leaq 0x82000(%rip), %rdx     # 0xb91e6
leaq 0x30(%rsp), %rdi
callq 0x7c64
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xc5b91(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xc5b69(%rip), %rsi     # 0xfcd80
movq 0xc6dba(%rip), %rdx     # 0xfdfd8
movq %r15, %rdi
callq 0x6470
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x37248
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x37248
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x37310
movq %r15, %rdi
callq 0x6200
jmp 0x37310
movq %rax, %r14
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x37283
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x37283
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x3733d
movq %r15, %rdi
callq 0x6200
jmp 0x3733d
jmp 0x372ab
jmp 0x3730d
jmp 0x3733a
jmp 0x372ab
jmp 0x3730d
jmp 0x3733a
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37310
movq 0x18(%rsp), %rsi
jmp 0x37303
jmp 0x3730d
movq %rax, %r14
movq 0x148(%rsp), %rdi
cmpq %r13, %rdi
je 0x372ea
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x372ea
movq %rax, %r14
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37310
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x37310
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0x1c438
jmp 0x3733d
jmp 0x3733a
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x3733d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3733d
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x37351
movq (%r12), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
nop