// File: rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::types_are_logically_equivalent(spirv_cross::SPIRType const&, spirv_cross::SPIRType const&) const
bool Compiler::types_are_logically_equivalent(const SPIRType &a, const SPIRType &b) const
{
	if (a.basetype != b.basetype)
		return false;
	if (a.width != b.width)
		return false;
	if (a.vecsize != b.vecsize)
		return false;
	if (a.columns != b.columns)
		return false;
	if (a.array.size() != b.array.size())
		return false;

	size_t array_count = a.array.size();
	if (array_count && memcmp(a.array.data(), b.array.data(), array_count * sizeof(uint32_t)) != 0)
		return false;

	if (a.basetype == SPIRType::Image || a.basetype == SPIRType::SampledImage)
	{
		if (memcmp(&a.image, &b.image, sizeof(SPIRType::Image)) != 0)
			return false;
	}

	if (a.member_types.size() != b.member_types.size())
		return false;

	size_t member_types = a.member_types.size();
	for (size_t i = 0; i < member_types; i++)
	{
		if (!types_are_logically_equivalent(get<SPIRType>(a.member_types[i]), get<SPIRType>(b.member_types[i])))
			return false;
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0xc(%rcx), %eax
je 0x24e15
movb $0x0, -0x1(%rbp)
jmp 0x24ff0
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x10(%rcx), %eax
je 0x24e2e
movb $0x0, -0x1(%rbp)
jmp 0x24ff0
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x14(%rcx), %eax
je 0x24e47
movb $0x0, -0x1(%rbp)
jmp 0x24ff0
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x18(%rcx), %eax
je 0x24e60
movb $0x0, -0x1(%rbp)
jmp 0x24ff0
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x8650
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
callq 0x8650
movq %rax, %rcx
movq -0x48(%rbp), %rax
cmpq %rcx, %rax
je 0x24e93
movb $0x0, -0x1(%rbp)
jmp 0x24ff0
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x8650
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x24eeb
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x300b0
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
callq 0x300b0
movq -0x50(%rbp), %rdi
movq %rax, %rsi
movq -0x28(%rbp), %rdx
shlq $0x2, %rdx
callq 0x7190
cmpl $0x0, %eax
je 0x24eeb
movb $0x0, -0x1(%rbp)
jmp 0x24ff0
movq -0x18(%rbp), %rax
cmpl $0xd, 0xc(%rax)
je 0x24eff
movq -0x18(%rbp), %rax
cmpl $0xe, 0xc(%rax)
jne 0x24f30
movq -0x18(%rbp), %rax
addq $0x80, %rax
movq -0x20(%rbp), %rcx
addq $0x80, %rcx
movl (%rcx), %ecx
movl (%rax), %eax
subl %ecx, %eax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x24f2e
movb $0x0, -0x1(%rbp)
jmp 0x24ff0
jmp 0x24f30
movq -0x18(%rbp), %rdi
addq $0x68, %rdi
callq 0x8650
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rdi
addq $0x68, %rdi
callq 0x8650
movq %rax, %rcx
movq -0x58(%rbp), %rax
cmpq %rcx, %rax
je 0x24f63
movb $0x0, -0x1(%rbp)
jmp 0x24ff0
movq -0x18(%rbp), %rdi
addq $0x68, %rdi
callq 0x8650
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x24fec
movq -0x18(%rbp), %rdi
addq $0x68, %rdi
movq -0x38(%rbp), %rsi
callq 0x8570
movq -0x40(%rbp), %rdi
movl (%rax), %esi
callq 0x2e6b0
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rdi
addq $0x68, %rdi
movq -0x38(%rbp), %rsi
callq 0x8570
movq -0x40(%rbp), %rdi
movl (%rax), %esi
callq 0x2e6b0
movq -0x40(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq %rax, %rdx
callq 0x24de0
testb $0x1, %al
jne 0x24fdc
movb $0x0, -0x1(%rbp)
jmp 0x24ff0
jmp 0x24fde
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x24f7c
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)