// File: /workspace/github_cpp_makefile_star2_O1/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 0x287ea
movl 0xc(%rbx), %esi
movq %r14, %rdi
callq 0xa426
movq %rax, %r12
cmpl $0x1, 0x10(%rbx)
leaq 0xaccb3(%rip), %rax     # 0xb521f
leaq 0xaccb7(%rip), %rcx     # 0xb522a
cmoveq %rax, %rcx
leaq 0xb65fc(%rip), %rax     # 0xbeb7a
leaq 0xaccb1(%rip), %rdx     # 0xb5236
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 0xd402
testb $0x4, 0x78(%rsp)
jne 0x864a
movq (%r14), %rax
movq %rsp, %rdi
movq %r14, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq *0x98(%rax)
jmp 0x8682
movl 0x8(%r12), %esi
movq %r14, %rdi
callq 0xa426
movl $0x0, 0x98(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x285ee
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 0x86ad
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rsp, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2bb66
subq $0x8, %rsp
leaq 0xacb22(%rip), %rax     # 0xb51e8
leaq 0xacb18(%rip), %r10     # 0xb51e5
leaq 0xacb6f(%rip), %rsi     # 0xb5243
leaq 0xb0a22(%rip), %rcx     # 0xb90fd
leaq 0x58(%rsp), %rdx
leaq 0x30(%rsp), %r8
leaq 0x8(%rsp), %r9
movq %r14, %rdi
pushq %rax
pushq %r15
pushq %r10
callq 0xa806
addq $0x20, %rsp
leaq 0x10(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x8716
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x638(%r14), %r12d
movl $0x0, 0x638(%r14)
leaq 0xacabd(%rip), %rsi     # 0xb51ec
leaq 0xacabf(%rip), %rcx     # 0xb51f5
leaq 0xacac1(%rip), %r9      # 0xb51fe
leaq 0x58(%rsp), %rdx
movq %r14, %rdi
movq %rdx, %r8
callq 0xe6fa
movl %r12d, 0x638(%r14)
subq $0x8, %rsp
leaq 0xb7389(%rip), %rax     # 0xbfae8
leaq 0x2c(%rsp), %r10
leaq 0xb2950(%rip), %r11     # 0xbb0bb
leaq 0xacadc(%rip), %rsi     # 0xb524e
leaq 0xbb528(%rip), %rcx     # 0xc3ca1
leaq 0xaca9c(%rip), %r9      # 0xb521c
leaq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rdx
leaq 0x60(%rsp), %r8
pushq %rax
pushq %r10
pushq %r11
callq 0xa982
addq $0x20, %rsp
leaq 0x788(%r14), %rdi
movq %rsp, %rsi
callq 0xebe6
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x87c2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xad0e6(%rip), %rsi     # 0xb58af
movq %r14, %rdi
callq 0xa700
movq %rbx, %rdi
callq 0xd5b0
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x87f0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x880b
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 0x8858
jmp 0x8858
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
jne 0x8842
jmp 0x885b
jmp 0x8858
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x885b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x885b
jmp 0x8858
movq %rax, %r14
jmp 0x8863
movq %rax, %r14
movq %rbx, %rdi
callq 0xd5b0
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x887a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8895
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
nop