// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_struct_member(spirv_cross::SPIRType const&, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int)
void CompilerGLSL::emit_struct_member(const SPIRType &type, uint32_t member_type_id, uint32_t index,
                                      const string &qualifier, uint32_t)
{
	auto &membertype = get<SPIRType>(member_type_id);

	Bitset memberflags;
	auto &memb = ir.meta[type.self].members;
	if (index < memb.size())
		memberflags = memb[index].decoration_flags;

	string qualifiers;
	bool is_block = ir.meta[type.self].decoration.decoration_flags.get(DecorationBlock) ||
	                ir.meta[type.self].decoration.decoration_flags.get(DecorationBufferBlock);

	if (is_block)
		qualifiers = to_interpolation_qualifiers(memberflags);

	statement(layout_for_member(type, index), qualifiers, qualifier,
	          flags_to_precision_qualifiers_glsl(membertype, memberflags),
	          variable_decl(membertype, to_member_name(type, index)), ";");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x148(%rbp)
movl -0x14(%rbp), %esi
callq 0xea90
movq %rax, -0x30(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x10710
movq -0x148(%rbp), %rdi
addq $0x8, %rdi
addq $0x30, %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0xead0
addq $0xd0, %rax
movq %rax, -0x78(%rbp)
movl -0x18(%rbp), %eax
movq %rax, -0x140(%rbp)
movq -0x78(%rbp), %rdi
callq 0x2eca0
movq %rax, %rcx
movq -0x140(%rbp), %rax
cmpq %rcx, %rax
jae 0x95810
movq -0x78(%rbp), %rdi
movl -0x18(%rbp), %eax
movl %eax, %esi
callq 0x2fa30
movq %rax, %rsi
addq $0x60, %rsi
leaq -0x70(%rbp), %rdi
callq 0x38560
jmp 0x957fa
jmp 0x95810
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x95a9d
leaq -0xa8(%rbp), %rdi
callq 0x7530
movq -0x148(%rbp), %rdi
addq $0x38, %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0xead0
movq %rax, %rdi
addq $0x60, %rdi
movl $0x2, %esi
callq 0xef50
movb %al, -0x149(%rbp)
jmp 0x9584e
movb -0x149(%rbp), %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x14a(%rbp)
jne 0x958a3
jmp 0x95863
movq -0x148(%rbp), %rdi
addq $0x38, %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0xead0
movq %rax, %rdi
addq $0x60, %rdi
movl $0x3, %esi
callq 0xef50
movb %al, -0x14b(%rbp)
jmp 0x95895
movb -0x14b(%rbp), %al
movb %al, -0x14a(%rbp)
jmp 0x958a3
movb -0x14a(%rbp), %al
andb $0x1, %al
movb %al, -0xa9(%rbp)
testb $0x1, -0xa9(%rbp)
je 0x9590f
movq -0x148(%rbp), %rsi
movq (%rsi), %rax
movq 0x140(%rax), %rax
leaq -0xd0(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq *%rax
jmp 0x958da
leaq -0xa8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x7430
leaq -0xd0(%rbp), %rdi
callq 0x7708
jmp 0x9590f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x95a91
movq -0x148(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x18(%rbp), %ecx
movq (%rsi), %rax
movq 0x138(%rax), %rax
leaq -0xf0(%rbp), %rdi
callq *%rax
jmp 0x95932
movq -0x148(%rbp), %rdi
movq -0x20(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x30(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x61830
movq %rax, -0x158(%rbp)
jmp 0x9595a
movq -0x148(%rbp), %rsi
movq -0x158(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x10(%rbp), %rdx
movl -0x18(%rbp), %ecx
leaq -0x138(%rbp), %rdi
callq 0x62230
jmp 0x9598f
movq -0x168(%rbp), %rdx
movq -0x148(%rbp), %rsi
movq (%rsi), %rax
movq 0xc8(%rax), %rax
leaq -0x118(%rbp), %rdi
leaq -0x138(%rbp), %rcx
xorl %r8d, %r8d
callq *%rax
jmp 0x959bc
movq -0x160(%rbp), %rcx
movq -0x148(%rbp), %rdi
leaq 0xb36d5(%rip), %rdx     # 0x1490a6
movq %rsp, %rax
movq %rdx, (%rax)
leaq -0xf0(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
leaq -0xf8(%rbp), %r8
leaq -0x118(%rbp), %r9
callq 0xa7200
jmp 0x959fa
leaq -0x118(%rbp), %rdi
callq 0x7708
leaq -0x138(%rbp), %rdi
callq 0x7708
leaq -0xf0(%rbp), %rdi
callq 0x7708
leaq -0xa8(%rbp), %rdi
callq 0x7708
leaq -0x70(%rbp), %rdi
callq 0xf250
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x95a85
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x95a79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x7708
leaq -0x138(%rbp), %rdi
callq 0x7708
leaq -0xf0(%rbp), %rdi
callq 0x7708
leaq -0xa8(%rbp), %rdi
callq 0x7708
leaq -0x70(%rbp), %rdi
callq 0xf250
movq -0x80(%rbp), %rdi
callq 0x7640
nop