// File: /workspace/github_cpp_makefile_star2_O3/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 0x3637d
testl %edx, %edx
jne 0x36368
testl %edi, %edi
je 0x36390
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 0x36395
shll $0x1f, %eax
testl %edi, %edi
je 0x36389
shll $0xd, %ecx
orl %ecx, %eax
orl $0x7f800000, %eax       # imm = 0x7F800000
jmp 0x36393
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 0x36400
testq %rax, %rax
je 0x364c5
ucomiss 0x800f4(%rip), %xmm1    # 0xb64c4
jb 0x36792
leaq 0x81dae(%rip), %rsi     # 0xb818b
leaq 0x81dac(%rip), %rcx     # 0xb8190
leaq 0x8462a(%rip), %r9      # 0xbaa15
leaq 0x70(%rsp), %rdi
movq %r14, %rdx
movq %r14, %r8
callq 0x534a6
jmp 0x36897
testq %rax, %rax
je 0x3659c
cvtss2sd %xmm1, %xmm0
leaq 0x8490f(%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 0x3645f
leaq 0x70(%rsp), %rdi
movl $0x65, %esi
callq 0x60e0
testq %rax, %rax
jne 0x3645f
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 0x7be0
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 0x367cd
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x367d4
xorl %eax, %eax
leaq 0x140(%rsp), %rcx
movl %eax, -0xc8(%rcx)
leaq 0xc5f04(%rip), %r15     # 0xfc3e0
addq $0x10, %r15
movq %r15, -0xd0(%rcx)
movl %eax, -0xc0(%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)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, -0xbc(%rcx)
ucomiss 0x7ff5e(%rip), %xmm1    # 0xb64c4
jb 0x36828
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rdx
xorl %ecx, %ecx
callq *0x98(%rax)
leaq 0x81c4f(%rip), %rdx     # 0xb81d7
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x5360e
jmp 0x368ff
movss %xmm1, 0x2c(%rsp)
xorl %eax, %eax
leaq 0x140(%rsp), %rcx
movl %eax, -0xc8(%rcx)
leaq 0xc5e27(%rip), %r15     # 0xfc3e0
addq $0x10, %r15
movq %r15, -0xd0(%rcx)
movl %eax, -0xc0(%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)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, -0xbc(%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 0x846bf(%rip), %rsi     # 0xbad23
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movb $0x1, %al
callq 0x6060
movq %r14, %rdi
movl $0x2e, %esi
callq 0x60e0
testq %rax, %rax
jne 0x366af
leaq 0x30(%rsp), %rdi
movl $0x65, %esi
callq 0x60e0
testq %rax, %rax
jne 0x366af
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 0x7be0
leaq 0x8c58a(%rip), %rdx     # 0xc2c71
leaq 0x84327(%rip), %r8      # 0xbaa15
leaq 0x8(%rsp), %rdi
leaq 0x168(%rsp), %rsi
leaq 0x148(%rsp), %rcx
callq 0x53726
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x36732
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x148(%rsp), %rdi
cmpq %r13, %rdi
je 0x3674f
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x110(%rsp), %r14
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36778
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r15, 0x70(%rsp)
movq %r14, %rdi
callq 0xde80
movq 0xd8(%rsp), %rdi
jmp 0x3695f
movss 0x7fd2e(%rip), %xmm0    # 0xb64c8
ucomiss %xmm1, %xmm0
jb 0x36869
leaq 0x819ed(%rip), %rsi     # 0xb8197
leaq 0x819df(%rip), %rcx     # 0xb8190
leaq 0x8425d(%rip), %r9      # 0xbaa15
leaq 0x70(%rsp), %rdi
movq %r14, %rdx
movq %r14, %r8
callq 0x5355a
jmp 0x36897
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 0x36810
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x369d6
movq 0x18(%rsp), %rsi
jmp 0x368c3
movss 0x7fc98(%rip), %xmm0    # 0xb64c8
ucomiss %xmm1, %xmm0
jb 0x368cb
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rdx
xorl %ecx, %ecx
callq *0x98(%rax)
leaq 0x8198e(%rip), %rdx     # 0xb81e3
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x5369a
jmp 0x368ff
ucomiss %xmm1, %xmm1
jnp 0x369eb
leaq 0x81924(%rip), %rsi     # 0xb819d
leaq 0x81910(%rip), %rcx     # 0xb8190
leaq 0x8418e(%rip), %r9      # 0xbaa15
leaq 0x70(%rsp), %rdi
movq %r14, %rdx
movq %r14, %r8
callq 0x534a6
leaq 0x70(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x369d6
movq 0x80(%rsp), %rsi
incq %rsi
jmp 0x369d1
ucomiss %xmm1, %xmm1
jnp 0x36a54
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rdx
xorl %ecx, %ecx
callq *0x98(%rax)
leaq 0x81900(%rip), %rdx     # 0xb81f0
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x5360e
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x36929
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36944
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x110(%rsp), %r14
movq %r15, -0xa0(%r14)
movq %r14, %rdi
callq 0xde80
movq -0x38(%r14), %rdi
testq %rdi, %rdi
je 0x36974
movq 0xe8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x369b9
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 0x369d6
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 0x81797(%rip), %rsi     # 0xb81a2
leaq 0x817c4(%rip), %rdx     # 0xb81d6
leaq 0x70(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x70(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xc5395(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xc536d(%rip), %rsi     # 0xfbdb0
movq 0xc658e(%rip), %rdx     # 0xfcfd8
movq %r15, %rdi
callq 0x6470
jmp 0x36ab8
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x81731(%rip), %rsi     # 0xb81a2
leaq 0x8175e(%rip), %rdx     # 0xb81d6
leaq 0x30(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xc532f(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xc5307(%rip), %rsi     # 0xfbdb0
movq 0xc6528(%rip), %rdx     # 0xfcfd8
movq %r15, %rdi
callq 0x6470
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x36ad2
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x36adf
jmp 0x36b9a
movq %rax, %r14
movq %r15, %rdi
callq 0x6200
jmp 0x36b9a
movq %rax, %r14
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x36b09
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x36b16
jmp 0x36bc7
movq %rax, %r14
movq %r15, %rdi
callq 0x6200
jmp 0x36bc7
jmp 0x36b35
jmp 0x36b97
jmp 0x36bc4
jmp 0x36b35
jmp 0x36b97
jmp 0x36bc4
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36b9a
movq 0x18(%rsp), %rsi
jmp 0x36b8d
jmp 0x36b97
movq %rax, %r14
movq 0x148(%rsp), %rdi
cmpq %r13, %rdi
je 0x36b74
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x36b74
movq %rax, %r14
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36b9a
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x36b9a
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0x1be02
jmp 0x36bc7
jmp 0x36bc4
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x36bc7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x36bc7
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x36bdb
movq (%r12), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
nop