	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu_v11_0_set_allowed_mask
_smu_v11_0_set_allowed_mask:            ## @smu_v11_0_set_allowed_mask
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	8(%rbx), %edi
	movq	_SMU_FEATURE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bitmap_empty
	xorl	%r15d, %r15d
	testq	%rax, %rax
	jne	LBB0_4
## %bb.1:
	cmpl	$64, (%rbx)
	jl	LBB0_4
## %bb.2:
	movl	8(%rbx), %esi
	leaq	-32(%rbp), %rdi
	movl	$64, %edx
	callq	_bitmap_copy
	movq	_SMU_MSG_SetAllowedFeaturesMaskHigh@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-28(%rbp), %edx
	movq	%rbx, %rdi
	callq	_smu_send_smc_msg_with_param
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_SMU_MSG_SetAllowedFeaturesMaskLow@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-32(%rbp), %edx
	movq	%rbx, %rdi
	callq	_smu_send_smc_msg_with_param
	movl	%eax, %r15d
LBB0_4:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMU_FEATURE_MAX,4,2            ## @SMU_FEATURE_MAX
	.comm	_SMU_MSG_SetAllowedFeaturesMaskHigh,4,2 ## @SMU_MSG_SetAllowedFeaturesMaskHigh
	.comm	_SMU_MSG_SetAllowedFeaturesMaskLow,4,2 ## @SMU_MSG_SetAllowedFeaturesMaskLow
	.no_dead_strip	_smu_v11_0_set_allowed_mask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smu_v11_0_set_allowed_mask
_smu_v11_0_set_allowed_mask:            ; @smu_v11_0_set_allowed_mask
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	w0, [x20, #8]
Lloh0:
	adrp	x8, _SMU_FEATURE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMU_FEATURE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_bitmap_empty
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, #64
	b.ge	LBB0_4
LBB0_2:
	mov	w21, #0
LBB0_3:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_4:
	ldr	w1, [x20, #8]
	add	x0, sp, #8
	mov	w2, #64
	bl	_bitmap_copy
Lloh3:
	adrp	x8, _SMU_MSG_SetAllowedFeaturesMaskHigh@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMU_MSG_SetAllowedFeaturesMaskHigh@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_smu_send_smc_msg_with_param
	mov	x21, x0
	cbnz	w0, LBB0_3
; %bb.5:
Lloh6:
	adrp	x8, _SMU_MSG_SetAllowedFeaturesMaskLow@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SMU_MSG_SetAllowedFeaturesMaskLow@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [sp, #8]
	mov	x0, x20
	bl	_smu_send_smc_msg_with_param
	mov	x21, x0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SMU_FEATURE_MAX,4,2            ; @SMU_FEATURE_MAX
	.comm	_SMU_MSG_SetAllowedFeaturesMaskHigh,4,2 ; @SMU_MSG_SetAllowedFeaturesMaskHigh
	.comm	_SMU_MSG_SetAllowedFeaturesMaskLow,4,2 ; @SMU_MSG_SetAllowedFeaturesMaskLow
	.no_dead_strip	_smu_v11_0_set_allowed_mask
.subsections_via_symbols
