// File: /workspace/github_cpp_makefile_star2_O3/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 0xa3ea
movq %rax, %r15
movq 0x20(%rax), %rax
cmpq 0x28(%r15), %rax
je 0x1ad3d
cmpl $0x0, 0x9c(%r15)
je 0x1aeb0
leaq 0x8(%r14), %rdi
movl $0x1, %esi
callq 0x24f8a
movl %eax, %ebp
movl 0x9c(%r15), %edx
movq %r14, %rdi
movl %eax, %esi
callq 0x1ac26
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 0x1aecf
movq 0x28(%r15), %rax
movl -0x4(%rax), %esi
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x1c17e
movq 0x28(%r15), %rcx
cmpl $0x0, -0x4(%rcx)
movq 0x20(%rsp), %rax
je 0x1ad04
xorl %edx, %edx
movl %ebp, (%rax,%rdx,4)
incq %rdx
movl -0x4(%rcx), %esi
cmpq %rsi, %rdx
jb 0x1acf6
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq 0x28(%rsp), %rdx
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 0x1c20a
jmp 0x1ae87
movq 0x68(%r15), %rax
movq 0x70(%r15), %rsi
cmpq %rsi, %rax
je 0x1adc6
leaq 0x8(%r14), %rdi
subq %rax, %rsi
shrq $0x2, %rsi
callq 0x24f8a
movl %eax, %ebp
movq 0x70(%r15), %rsi
subq 0x68(%r15), %rsi
sarq $0x2, %rsi
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x1c17e
movq 0x68(%r15), %rax
cmpq %rax, 0x70(%r15)
je 0x1ae4e
movl $0x1, %r12d
xorl %r13d, %r13d
movl (%rax,%r13,4), %edx
movq %r14, %rdi
movl %ebp, %esi
callq 0x1ac26
movq 0x20(%rsp), %rdx
movl %ebp, (%rdx,%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 0x1ad8e
jmp 0x1ae53
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x1c254
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 0x1addd
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 0x1ae3f
jmp 0x1ae9e
movq 0x20(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %rdx, (%rcx)
movq 0x28(%rsp), %rax
subq %rdx, %rax
shrq $0x2, %rax
leaq 0x1c(%rsp), %r8
movl %eax, (%r8)
leaq 0xb(%rsp), %r9
movb $0x0, (%r9)
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x1c20a
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1ae9e
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9a2e1(%rip), %rdi     # 0xb5198
leaq 0x99e48(%rip), %rsi     # 0xb4d06
leaq 0x9a2ed(%rip), %rcx     # 0xb51b2
movl $0xdd3, %edx            # imm = 0xDD3
callq 0x61b0
movl $0x10, %edi
callq 0x6140
movq %rax, %r14
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x9a309(%rip), %rsi     # 0xb51f5
leaq 0x9a331(%rip), %rdx     # 0xb5224
leaq 0x20(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x6320
leaq 0xe0eb4(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0xe0e8c(%rip), %rsi     # 0xfbdb0
movq 0xe20ad(%rip), %rdx     # 0xfcfd8
movq %r14, %rdi
callq 0x6470
jmp 0x1af6c
jmp 0x1af67
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x1af51
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x1af5b
jmp 0x1af86
movq %rax, %rbx
movq %r14, %rdi
callq 0x6200
jmp 0x1af86
jmp 0x1af6c
movq %rax, %rbx
jmp 0x1af86
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1af86
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0