// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cpp.cpp
// Function: spirv_cross::CompilerCPP::emit_interface_block(spirv_cross::SPIRVariable const&)
void CompilerCPP::emit_interface_block(const SPIRVariable &var)
{
	add_resource_name(var.self);

	auto &type = get<SPIRType>(var.basetype);

	const char *qual = var.storage == StorageClassInput ? "StageInput" : "StageOutput";
	const char *lowerqual = var.storage == StorageClassInput ? "stage_input" : "stage_output";
	auto instance_name = to_name(var.self);
	uint32_t location = ir.meta[var.self].decoration.location;

	string buffer_name;
	auto flags = ir.meta[type.self].decoration.decoration_flags;
	if (flags.get(DecorationBlock))
	{
		emit_block_struct(type);
		buffer_name = to_name(type.self);
	}
	else
		buffer_name = type_to_glsl(type);

	statement("internal::", qual, "<", buffer_name, type_to_array_glsl(type), "> ", instance_name, "__;");
	statement_no_indent("#define ", instance_name, " __res->", instance_name, "__.get()");
	resource_registrations.push_back(join("s.register_", lowerqual, "(", instance_name, "__", ", ", location, ");"));
	statement("");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rsi), %esi
callq 0x281be
movl 0xc(%rbx), %esi
movq %r14, %rdi
callq 0xa3ea
movq %rax, %r12
cmpl $0x1, 0x10(%rbx)
leaq 0xabd2f(%rip), %rax     # 0xb421f
leaq 0xabd33(%rip), %rcx     # 0xb422a
cmoveq %rax, %rcx
leaq 0xb5680(%rip), %rax     # 0xbdb82
leaq 0xabd2d(%rip), %rdx     # 0xb4236
cmoveq %rax, %rdx
movq %rcx, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movl 0x8(%rbx), %edx
movq (%r14), %rax
leaq 0x58(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
movl 0x8(%rbx), %eax
movq 0x38(%r14), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
movl 0xa4(%rcx,%rax), %eax
movl %eax, 0x24(%rsp)
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
xorl %eax, %eax
movq %rax, -0x8(%rbp)
movb $0x0, (%rbp)
movl 0x8(%r12), %edx
imulq $0x148, %rdx, %rdx      # imm = 0x148
leaq (%rcx,%rdx), %rsi
addq $0x68, %rsi
movq -0x8(%rsi), %rcx
leaq 0x80(%rsp), %rbx
movq %rcx, -0x8(%rbx)
movq %rax, (%rbx)
movq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq 0x18(%rsi), %rcx
movq %rcx, 0x18(%rbx)
movups 0x20(%rsi), %xmm0
movups %xmm0, 0x20(%rbx)
movq %rax, 0x30(%rbx)
movq %rsp, %rdx
movq %rbx, (%rdx)
movq %rbx, %rdi
callq 0xd3c2
testb $0x4, 0x78(%rsp)
jne 0x85ce
movq (%r14), %rax
movq %rsp, %rdi
movq %r14, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq *0x98(%rax)
jmp 0x8606
movl 0x8(%r12), %esi
movq %r14, %rdi
callq 0xa3ea
movl $0x0, 0x98(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x27fa4
movl 0x8(%r12), %edx
movq (%r14), %rax
movq %rsp, %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
leaq 0x28(%rsp), %rdi
movq %rsp, %r13
movq %r13, %rsi
callq 0x6310
movq (%r13), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8631
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rsp, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2b55a
subq $0x8, %rsp
leaq 0xabb9e(%rip), %rax     # 0xb41e8
leaq 0xabb94(%rip), %r10     # 0xb41e5
leaq 0xabbeb(%rip), %rsi     # 0xb4243
leaq 0xafa8e(%rip), %rcx     # 0xb80ed
leaq 0x58(%rsp), %rdx
leaq 0x30(%rsp), %r8
leaq 0x8(%rsp), %r9
movq %r14, %rdi
pushq %rax
pushq %r15
pushq %r10
callq 0xa7ca
addq $0x20, %rsp
leaq 0x10(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x869a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x638(%r14), %r12d
movl $0x0, 0x638(%r14)
leaq 0xabb39(%rip), %rsi     # 0xb41ec
leaq 0xabb3b(%rip), %rcx     # 0xb41f5
leaq 0xabb3d(%rip), %r9      # 0xb41fe
leaq 0x58(%rsp), %rdx
movq %r14, %rdi
movq %rdx, %r8
callq 0xe6d6
movl %r12d, 0x638(%r14)
subq $0x8, %rsp
leaq 0xb640d(%rip), %rax     # 0xbeaf0
leaq 0x2c(%rsp), %r10
leaq 0xb19bc(%rip), %r11     # 0xba0ab
leaq 0xabb58(%rip), %rsi     # 0xb424e
leaq 0xba574(%rip), %rcx     # 0xc2c71
leaq 0xabb18(%rip), %r9      # 0xb421c
leaq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rdx
leaq 0x60(%rsp), %r8
pushq %rax
pushq %r10
pushq %r11
callq 0xa946
addq $0x20, %rsp
leaq 0x788(%r14), %rdi
movq %rsp, %rsi
callq 0xebc2
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x8746
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xac162(%rip), %rsi     # 0xb48af
movq %r14, %rdi
callq 0xa6c4
movq %rbx, %rdi
callq 0xd570
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8774
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x878f
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x87dc
jmp 0x87dc
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
jne 0x87c6
jmp 0x87df
jmp 0x87dc
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x87df
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x87df
jmp 0x87dc
movq %rax, %r14
jmp 0x87e7
movq %rax, %r14
movq %rbx, %rdi
callq 0xd570
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x87fe
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8819
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
nop