	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu_v11_0_gfx_off_control
_smu_v11_0_gfx_off_control:             ## @smu_v11_0_gfx_off_control
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	8(%rdi), %rax
	movl	$-129, %ecx
	addl	(%rax), %ecx
	cmpl	$2, %ecx
	ja	LBB0_6
## %bb.1:
	movq	_PP_GFXOFF_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%rax)
	je	LBB0_6
## %bb.2:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_mutex_lock
	testl	%r14d, %r14d
	jne	LBB0_3
## %bb.4:
	movq	_SMU_MSG_DisallowGfxOff@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_3:
	movq	_SMU_MSG_AllowGfxOff@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_smu_send_smc_msg
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PP_GFXOFF_MASK,4,2             ## @PP_GFXOFF_MASK
	.comm	_SMU_MSG_AllowGfxOff,4,2        ## @SMU_MSG_AllowGfxOff
	.comm	_SMU_MSG_DisallowGfxOff,4,2     ## @SMU_MSG_DisallowGfxOff
	.no_dead_strip	_smu_v11_0_gfx_off_control
.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_gfx_off_control
_smu_v11_0_gfx_off_control:             ; @smu_v11_0_gfx_off_control
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0, #8]
	ldr	w9, [x8]
	sub	w9, w9, #129
	cmp	w9, #2
	b.hi	LBB0_3
; %bb.1:
	ldr	w8, [x8, #4]
Lloh0:
	adrp	x9, _PP_GFXOFF_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PP_GFXOFF_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	x20, x1
	mov	x19, x0
	bl	_mutex_lock
Lloh3:
	adrp	x8, _SMU_MSG_DisallowGfxOff@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMU_MSG_DisallowGfxOff@GOTPAGEOFF]
Lloh5:
	adrp	x9, _SMU_MSG_AllowGfxOff@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SMU_MSG_AllowGfxOff@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x8, x9, eq
	ldr	w1, [x8]
	mov	x0, x19
	bl	_smu_send_smc_msg
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	b	LBB0_4
LBB0_3:
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PP_GFXOFF_MASK,4,2             ; @PP_GFXOFF_MASK
	.comm	_SMU_MSG_AllowGfxOff,4,2        ; @SMU_MSG_AllowGfxOff
	.comm	_SMU_MSG_DisallowGfxOff,4,2     ; @SMU_MSG_DisallowGfxOff
	.no_dead_strip	_smu_v11_0_gfx_off_control
.subsections_via_symbols
