// File: rossy[P]crossc/SPIRV-Cross/spirv_common.hpp
// Function: spirv_cross::SPIRConstant::SPIRConstant(unsigned int, spirv_cross::SPIRConstant const* const*, unsigned int, bool)
SPIRConstant(uint32_t constant_type_, const SPIRConstant *const *vector_elements, uint32_t num_elements,
	             bool specialized)
	    : constant_type(constant_type_)
	    , specialization(specialized)
	{
		bool matrix = vector_elements[0]->m.c[0].vecsize > 1;

		if (matrix)
		{
			m.columns = num_elements;

			for (uint32_t i = 0; i < num_elements; i++)
			{
				m.c[i] = vector_elements[i]->m.c[0];
				if (vector_elements[i]->specialization)
					m.id[i] = vector_elements[i]->self;
			}
		}
		else
		{
			m.c[0].vecsize = num_elements;
			m.columns = 1;

			for (uint32_t i = 0; i < num_elements; i++)
			{
				m.c[0].r[i] = vector_elements[i]->m.c[0].r[0];
				if (vector_elements[i]->specialization)
					m.c[0].id[i] = vector_elements[i]->self;
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
andb $0x1, %al
movb %al, -0x1d(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x3d3f0
movq -0x40(%rbp), %rdi
leaq 0x77482(%rip), %rax     # 0x1ae548
addq $0x10, %rax
movq %rax, (%rdi)
movl -0xc(%rbp), %eax
movl %eax, 0xc(%rdi)
addq $0x10, %rdi
callq 0x41450
jmp 0x1370de
movq -0x40(%rbp), %rdi
movb -0x1d(%rbp), %al
andb $0x1, %al
movb %al, 0x108(%rdi)
movb $0x0, 0x109(%rdi)
movb $0x0, 0x10a(%rdi)
addq $0x110, %rdi            # imm = 0x110
callq 0x8210
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpl $0x1, 0x40(%rax)
seta %al
andb $0x1, %al
movb %al, -0x2d(%rbp)
testb $0x1, -0x2d(%rbp)
je 0x1371cd
movq -0x40(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, 0x100(%rax)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x1371cb
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rax
movl -0x34(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
addq $0x10, %rsi
addq $0x10, %rdi
movl -0x34(%rbp), %eax
imulq $0x38, %rax, %rax
addq %rax, %rdi
movl $0x34, %edx
callq 0x72e0
movq -0x18(%rbp), %rax
movl -0x34(%rbp), %ecx
movq (%rax,%rcx,8), %rax
testb $0x1, 0x108(%rax)
je 0x1371bb
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movl -0x34(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movl 0x8(%rcx), %edx
movl -0x34(%rbp), %ecx
movl %edx, 0xf0(%rax,%rcx,4)
jmp 0x1371bb
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3d510
jmp 0x13724d
jmp 0x1371bd
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x137138
jmp 0x137247
movq -0x40(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, 0x40(%rax)
movl $0x1, 0x100(%rax)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x137245
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movl -0x38(%rbp), %edx
movq (%rcx,%rdx,8), %rdx
movl -0x38(%rbp), %ecx
movq 0x10(%rdx), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movq -0x18(%rbp), %rax
movl -0x38(%rbp), %ecx
movq (%rax,%rcx,8), %rax
testb $0x1, 0x108(%rax)
je 0x137238
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movl -0x38(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movl 0x8(%rcx), %edx
movl -0x38(%rbp), %ecx
movl %edx, 0x30(%rax,%rcx,4)
jmp 0x13723a
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x1371e8
jmp 0x137247
addq $0x40, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)