// File: /workspace/github_cpp_makefile_star2_O1/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::make_constant_null(unsigned int, unsigned int)
void Compiler::make_constant_null(uint32_t id, uint32_t type)
{
	auto &constant_type = get<SPIRType>(type);

	if (!constant_type.array.empty())
	{
		assert(constant_type.parent_type);
		uint32_t parent_id = ir.increase_bound_by(1);
		make_constant_null(parent_id, constant_type.parent_type);

		if (!constant_type.array_size_literal.back())
			SPIRV_CROSS_THROW("Array size of OpConstantNull must be a literal.");

		vector<uint32_t> elements(constant_type.array.back());
		for (uint32_t i = 0; i < constant_type.array.back(); i++)
			elements[i] = parent_id;
		set<SPIRConstant>(id, type, elements.data(), uint32_t(elements.size()), false);
	}
	else if (!constant_type.member_types.empty())
	{
		uint32_t member_ids = ir.increase_bound_by(uint32_t(constant_type.member_types.size()));
		vector<uint32_t> elements(constant_type.member_types.size());
		for (uint32_t i = 0; i < constant_type.member_types.size(); i++)
		{
			make_constant_null(member_ids + i, constant_type.member_types[i]);
			elements[i] = member_ids + i;
		}
		set<SPIRConstant>(id, type, elements.data(), uint32_t(elements.size()), false);
	}
	else
	{
		auto &constant = set<SPIRConstant>(id, type);
		constant.make_null(constant_type);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movl %esi, %ebx
movq %rdi, %r14
movl %edx, 0xc(%rsp)
movl %edx, %esi
callq 0xa426
movq %rax, %r15
movq 0x20(%rax), %rax
cmpq 0x28(%r15), %rax
je 0x1b41a
cmpl $0x0, 0x9c(%r15)
je 0x1b58f
leaq 0x8(%r14), %rdi
movl $0x1, %esi
callq 0x2561c
movl %eax, %ebp
movl 0x9c(%r15), %edx
movq %r14, %rdi
movl %eax, %esi
callq 0x1b2fe
movl 0x50(%r15), %eax
leaq -0x1(%rax), %rcx
addq $0x3e, %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x6, %rax
shlq $0x3, %rax
addq 0x48(%r15), %rax
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
leaq 0x3f(%rdx), %rsi
andq %rcx, %rsi
xorl %edi, %edi
cmpq %rdx, %rsi
setbe %dil
movq -0x8(%rax,%rdi,8), %rax
btq %rcx, %rax
jae 0x1b5ae
movq 0x28(%r15), %rax
movl -0x4(%rax), %esi
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x1c7b6
movq 0x28(%r15), %rax
cmpl $0x0, -0x4(%rax)
je 0x1b3dc
movq 0x20(%rsp), %rcx
xorl %edx, %edx
movl %ebp, (%rcx,%rdx,4)
incq %rdx
movl -0x4(%rax), %esi
cmpq %rsi, %rdx
jb 0x1b3ce
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
subq %rax, %rdx
shrq $0x2, %rdx
leaq 0x1c(%rsp), %r8
movl %edx, (%r8)
leaq 0xb(%rsp), %r9
movb $0x0, (%r9)
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x1c840
jmp 0x1b4d7
movq 0x68(%r15), %rax
movq 0x70(%r15), %rsi
cmpq %rsi, %rax
je 0x1b4f7
leaq 0x8(%r14), %rdi
subq %rax, %rsi
shrq $0x2, %rsi
callq 0x2561c
movl %eax, %ebp
movq 0x70(%r15), %rsi
subq 0x68(%r15), %rsi
sarq $0x2, %rsi
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x1c7b6
movq 0x68(%r15), %rax
cmpq %rax, 0x70(%r15)
je 0x1b49e
movl $0x1, %r12d
xorl %r13d, %r13d
movl (%rax,%r13,4), %edx
movq %r14, %rdi
movl %ebp, %esi
callq 0x1b2fe
movq 0x20(%rsp), %rax
movl %ebp, (%rax,%r13,4)
movl %r12d, %r13d
movq 0x68(%r15), %rax
movq 0x70(%r15), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
incl %ebp
incl %r12d
cmpq %r13, %rcx
ja 0x1b46b
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
subq %rax, %rdx
shrq $0x2, %rdx
leaq 0x1c(%rsp), %r8
movl %edx, (%r8)
leaq 0xb(%rsp), %r9
movb $0x0, (%r9)
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x1c840
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1b57d
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
jmp 0x1b57d
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x1c88a
movq %rax, %rbx
xorl %eax, %eax
xorps %xmm0, %xmm0
movl $0x1, 0x50(%rsp,%rax)
movups %xmm0, 0x20(%rsp,%rax)
movups %xmm0, 0x30(%rsp,%rax)
movups %xmm0, 0x40(%rsp,%rax)
addq $0x38, %rax
cmpq $0xe0, %rax
jne 0x1b50e
leaq 0x20(%rsp), %rsi
movl $0x1, 0xf0(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0xe0(%rsi)
movq %rbx, %rdi
addq $0x10, %rdi
movl $0xf4, %edx
callq 0x6220
movl 0x18(%r15), %eax
movl %eax, 0x100(%rbx)
movl 0x14(%r15), %eax
movq $-0xe0, %rcx
movl %eax, 0x120(%rbx,%rcx)
addq $0x38, %rcx
jne 0x1b570
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9ac05(%rip), %rdi     # 0xb619b
leaq 0x9a76c(%rip), %rsi     # 0xb5d09
leaq 0x9ac11(%rip), %rcx     # 0xb61b5
movl $0xdd3, %edx            # imm = 0xDD3
callq 0x61b0
movl $0x10, %edi
callq 0x6140
movq %rax, %r14
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x9ac2d(%rip), %rsi     # 0xb61f8
leaq 0x9ac55(%rip), %rdx     # 0xb6227
leaq 0x20(%rsp), %rdi
callq 0x7c64
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x6320
leaq 0xe17a5(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0xe177d(%rip), %rsi     # 0xfcd80
movq 0xe29ce(%rip), %rdx     # 0xfdfd8
movq %r14, %rdi
callq 0x6470
jmp 0x1b64e
jmp 0x1b649
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x1b638
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x1b638
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x1b668
movq %r14, %rdi
callq 0x6200
jmp 0x1b668
jmp 0x1b64e
movq %rax, %rbx
jmp 0x1b668
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1b668
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0