// File: /workspace/github_cpp_makefile_star2_O1/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::remap_num_workgroups_builtin()
uint32_t CompilerHLSL::remap_num_workgroups_builtin()
{
	update_active_builtins();

	if (!active_input_builtins.get(BuiltInNumWorkgroups))
		return 0;

	// Create a new, fake UBO.
	uint32_t offset = ir.increase_bound_by(4);

	uint32_t uint_type_id = offset;
	uint32_t block_type_id = offset + 1;
	uint32_t block_pointer_type_id = offset + 2;
	uint32_t variable_id = offset + 3;

	SPIRType uint_type;
	uint_type.basetype = SPIRType::UInt;
	uint_type.width = 32;
	uint_type.vecsize = 3;
	uint_type.columns = 1;
	set<SPIRType>(uint_type_id, uint_type);

	SPIRType block_type;
	block_type.basetype = SPIRType::Struct;
	block_type.member_types.push_back(uint_type_id);
	set<SPIRType>(block_type_id, block_type);
	set_decoration(block_type_id, DecorationBlock);
	set_member_name(block_type_id, 0, "count");
	set_member_decoration(block_type_id, 0, DecorationOffset, 0);

	SPIRType block_pointer_type = block_type;
	block_pointer_type.pointer = true;
	block_pointer_type.storage = StorageClassUniform;
	block_pointer_type.parent_type = block_type_id;
	auto &ptr_type = set<SPIRType>(block_pointer_type_id, block_pointer_type);

	// Preserve self.
	ptr_type.self = block_type_id;

	set<SPIRVariable>(variable_id, block_pointer_type_id, StorageClassUniform);
	ir.meta[variable_id].decoration.alias = "SPIRV_Cross_NumWorkgroups";

	num_workgroups_builtin = variable_id;
	return variable_id;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2a0, %rsp            # imm = 0x2A0
movq %rdi, %r14
callq 0x1a798
xorl %ebx, %ebx
testb $0x1, 0x2d3(%r14)
je 0x73d65
leaq 0x8(%r14), %rdi
movl $0x4, %esi
callq 0x2561c
movl %eax, %ebx
movl %eax, 0x10(%rsp)
leal 0x2(%rbx), %eax
movl %eax, 0xc(%rsp)
xorl %r12d, %r12d
leaq 0x298(%rsp), %rax
movl %r12d, -0xc8(%rax)
leaq 0x89a4f(%rip), %r15     # 0xfd3b0
addq $0x10, %r15
movq %r15, -0xd0(%rax)
movq %r12, -0xc4(%rax)
movq %r12, -0x88(%rax)
movl %r12d, -0x80(%rax)
movq %r12, -0x78(%rax)
movb $0x0, -0x70(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0xb0(%rax)
movups %xmm0, -0xa0(%rax)
movl %r12d, -0x90(%rax)
movl $0x8, -0x6c(%rax)
movups %xmm0, -0x68(%rax)
movq %r12, -0x58(%rax)
movq %r12, -0x38(%rax)
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movabsq $0x100000003, %rcx      # imm = 0x100000003
movq %rcx, -0xbc(%rax)
movabsq $0x2000000005, %rcx     # imm = 0x2000000005
movq %rcx, -0xc4(%rax)
leaq 0x1c8(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7cf58
leaq 0x1c0(%rsp), %rax
movl %r12d, -0xc8(%rax)
movq %r15, -0xd0(%rax)
movaps 0x421e3(%rip), %xmm0    # 0xb5c00
movups %xmm0, -0xc4(%rax)
movq %r12, -0x88(%rax)
movl %r12d, -0x80(%rax)
movq %r12, -0x78(%rax)
movb $0x0, -0x70(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0xb0(%rax)
movups %xmm0, -0xa0(%rax)
movl %r12d, -0x90(%rax)
movl $0x8, -0x6c(%rax)
movups %xmm0, -0x68(%rax)
movq %r12, -0x58(%rax)
movq %r12, -0x38(%rax)
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movl $0xc, -0xc4(%rax)
movq -0x60(%rax), %rsi
cmpq -0x58(%rax), %rsi
je 0x73aa5
movl 0x10(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x160(%rsp)
jmp 0x73ab7
leaq 0x158(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x7a00
leal 0x1(%rbx), %ebp
leaq 0xf0(%rsp), %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x7cf58
movq %r14, %rdi
movl %ebp, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x14ea4
leaq 0x28(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x42a63(%rip), %rsi     # 0xb6551
leaq 0x42a61(%rip), %rdx     # 0xb6556
leaq 0x18(%rsp), %rdi
callq 0x7c64
leaq 0x18(%rsp), %rcx
movq %r14, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x14ce0
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x73b27
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
movl %ebp, %esi
xorl %edx, %edx
movl $0x23, %ecx
xorl %r8d, %r8d
callq 0x14cd6
leaq 0x18(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x1f216
leaq 0x18(%rsp), %rdx
movb $0x1, 0x60(%rdx)
movl $0x2, 0x64(%rdx)
movl %ebp, 0x9c(%rdx)
movl 0xc(%rsp), %esi
movq %r14, %rdi
callq 0x7cf58
addl $0x3, %ebx
movl %ebp, 0x8(%rax)
leaq 0x14(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7cf9a
movl %ebx, %eax
movq 0x38(%r14), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
leaq (%rcx,%rax), %rdi
movq 0x8(%rcx,%rax), %rdx
leaq 0x4c009(%rip), %rcx     # 0xbfbb5
movl $0x19, %r8d
xorl %esi, %esi
callq 0x63f0
movl %ebx, 0x7c8(%r14)
leaq 0xb8(%rsp), %r14
movq %r15, -0xa0(%r14)
movq %r14, %rdi
callq 0xdeb6
movq -0x38(%r14), %rdi
testq %rdi, %rdi
je 0x73bf0
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x73c20
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0x50(%rsp)
movl %eax, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movl %eax, 0x68(%rsp)
movq %rax, 0x70(%rsp)
leaq 0x190(%rsp), %r14
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x73c3f
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq %r15, 0xf0(%rsp)
movq %r14, %rdi
callq 0xdeb6
movq 0x158(%rsp), %rdi
testq %rdi, %rdi
je 0x73c6c
movq 0x168(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x73cb1
movq 0x148(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0x128(%rsp)
movl %eax, 0x130(%rsp)
movq %rax, 0x138(%rsp)
movl %eax, 0x140(%rsp)
movq %rax, 0x148(%rsp)
leaq 0x268(%rsp), %r14
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x73cd6
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq %r15, 0x1c8(%rsp)
movq %r14, %rdi
callq 0xdeb6
movq 0x230(%rsp), %rdi
testq %rdi, %rdi
je 0x73d03
movq 0x240(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x200(%rsp), %rdi
testq %rdi, %rdi
je 0x73d48
movq 0x220(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0x200(%rsp)
movl %eax, 0x208(%rsp)
movq %rax, 0x210(%rsp)
movl %eax, 0x218(%rsp)
movq %rax, 0x220(%rsp)
movq 0x1e8(%rsp), %rdi
testq %rdi, %rdi
je 0x73d65
movq 0x1f8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movl %ebx, %eax
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x73d9e
jmp 0x73dad
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x73db0
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x73db0
jmp 0x73dad
movq %rax, %rbx
jmp 0x73dbd
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x1c438
jmp 0x73db0
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x1c438
leaq 0x1c8(%rsp), %rdi
callq 0x1c438
movq %rbx, %rdi
callq 0x64a0