// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %rdi, %r14
callq 0x1a12a
xorl %ebx, %ebx
testb $0x1, 0x2d3(%r14)
je 0x73351
leaq 0x8(%r14), %rdi
movl $0x4, %esi
callq 0x24f8a
movl %eax, %ebx
movl %eax, 0x8(%rsp)
leal 0x2(%rbx), %ebp
movl %ebp, 0x4(%rsp)
xorl %r15d, %r15d
leaq 0x290(%rsp), %rax
movl %r15d, -0xc8(%rax)
leaq 0x89451(%rip), %r12     # 0xfc3e0
addq $0x10, %r12
movq %r12, -0xd0(%rax)
movq %r15, -0x88(%rax)
movl %r15d, -0x80(%rax)
movq %r15, -0x78(%rax)
movb $0x0, -0x70(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0xb0(%rax)
movups %xmm0, -0xa0(%rax)
movl %r15d, -0x90(%rax)
movl $0x8, -0x6c(%rax)
movups %xmm0, -0x68(%rax)
movq %r15, -0x58(%rax)
movq %r15, -0x38(%rax)
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movaps 0x48936(%rip), %xmm0    # 0xbb930
movups %xmm0, -0xc4(%rax)
leaq 0x1c0(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7c44c
leaq 0x150(%rsp), %rdi
movl %r15d, -0x60(%rdi)
movq %r12, -0x68(%rdi)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, -0x58(%rdi)
movl $0x1, -0x50(%rdi)
movq %r15, -0x20(%rdi)
movl %r15d, -0x18(%rdi)
movq %r15, -0x10(%rdi)
movb $0x0, -0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, -0x48(%rdi)
movups %xmm0, -0x38(%rdi)
movl %r15d, -0x28(%rdi)
movl $0x8, -0x4(%rdi)
movups %xmm0, (%rdi)
movq %r15, 0x10(%rdi)
movq %r15, 0x30(%rdi)
leaq 0x1b8(%rsp), %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, -0x5c(%rdi)
leaq 0x8(%rsp), %rdx
xorl %esi, %esi
callq 0x797e
leal 0x1(%rbx), %r15d
leaq 0xe8(%rsp), %rdx
movq %r14, %rdi
movl %r15d, %esi
callq 0x7c44c
movq %r14, %rdi
movl %r15d, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x14d16
leaq 0x20(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x42469(%rip), %rsi     # 0xb5541
leaq 0x42467(%rip), %rdx     # 0xb5546
leaq 0x10(%rsp), %rdi
callq 0x7be0
leaq 0x10(%rsp), %rcx
movq %r14, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x14b52
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x73112
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
movl %r15d, %esi
xorl %edx, %edx
movl $0x23, %ecx
xorl %r8d, %r8d
callq 0x14b48
leaq 0x10(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x1eafa
leaq 0x10(%rsp), %rdx
movb $0x1, 0x60(%rdx)
movl $0x2, 0x64(%rdx)
movl %r15d, 0x9c(%rdx)
movq %r14, %rdi
movl %ebp, %esi
callq 0x7c44c
addl $0x3, %ebx
movl %r15d, 0x8(%rax)
leaq 0xc(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x4(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x7c48e
movl %ebx, %eax
movq 0x38(%r14), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
leaq (%rcx,%rax), %rdi
movq 0x8(%rcx,%rax), %rdx
leaq 0x4ba25(%rip), %rcx     # 0xbebbd
movl $0x19, %r8d
xorl %esi, %esi
callq 0x63f0
movl %ebx, 0x7c8(%r14)
leaq 0xb0(%rsp), %r14
movq %r12, -0xa0(%r14)
movq %r14, %rdi
callq 0xde80
movq -0x38(%r14), %rdi
testq %rdi, %rdi
je 0x731dc
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x7320c
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0x48(%rsp)
movl %eax, 0x50(%rsp)
movq %rax, 0x58(%rsp)
movl %eax, 0x60(%rsp)
movq %rax, 0x68(%rsp)
leaq 0x188(%rsp), %r14
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x7322b
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq %r12, 0xe8(%rsp)
movq %r14, %rdi
callq 0xde80
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0x73258
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x120(%rsp), %rdi
testq %rdi, %rdi
je 0x7329d
movq 0x140(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0x120(%rsp)
movl %eax, 0x128(%rsp)
movq %rax, 0x130(%rsp)
movl %eax, 0x138(%rsp)
movq %rax, 0x140(%rsp)
leaq 0x260(%rsp), %r14
movq 0x108(%rsp), %rdi
testq %rdi, %rdi
je 0x732c2
movq 0x118(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq %r12, 0x1c0(%rsp)
movq %r14, %rdi
callq 0xde80
movq 0x228(%rsp), %rdi
testq %rdi, %rdi
je 0x732ef
movq 0x238(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x1f8(%rsp), %rdi
testq %rdi, %rdi
je 0x73334
movq 0x218(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0x1f8(%rsp)
movl %eax, 0x200(%rsp)
movq %rax, 0x208(%rsp)
movl %eax, 0x210(%rsp)
movq %rax, 0x218(%rsp)
movq 0x1e0(%rsp), %rdi
testq %rdi, %rdi
je 0x73351
movq 0x1f0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movl %ebx, %eax
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7338c
jmp 0x7339b
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x7339e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x7339e
jmp 0x7339b
movq %rax, %rbx
jmp 0x733ab
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1be02
jmp 0x7339e
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x1be02
leaq 0x1c0(%rsp), %rdi
callq 0x1be02
movq %rbx, %rdi
callq 0x64a0