	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gma_power_suspend              ## -- Begin function gma_power_suspend
	.p2align	4, 0x90
_gma_power_suspend:                     ## @gma_power_suspend
	.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
	callq	_to_pci_dev
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_pci_get_drvdata
	movq	%rax, %r15
	movq	8(%rax), %rbx
	movq	_power_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	cmpl	$0, 8(%rbx)
	je	LBB0_1
LBB0_4:
	movq	_power_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	cmpq	$0, (%rbx)
	je	LBB0_3
## %bb.2:
	movq	_power_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r15, %rdi
	callq	_psb_irq_uninstall
	movq	%r15, %rdi
	callq	_gma_suspend_display
	movq	%r14, %rdi
	callq	_gma_suspend_pci
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_power_mutex,4,2                ## @power_mutex
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GPU hardware busy, cannot suspend\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gma_power_suspend              ; -- Begin function gma_power_suspend
	.p2align	2
_gma_power_suspend:                     ; @gma_power_suspend
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_to_pci_dev
	mov	x19, x0
	bl	_pci_get_drvdata
	mov	x20, x0
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x0, _power_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _power_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	w8, [x21, #8]
	cbz	w8, LBB0_2
LBB0_1:
Lloh2:
	adrp	x0, _power_mutex@GOTPAGE
Lloh3:
	ldr	x0, [x0, _power_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_4
LBB0_2:
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.3:
Lloh4:
	adrp	x0, _power_mutex@GOTPAGE
Lloh5:
	ldr	x0, [x0, _power_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	ldr	w0, [x20]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh8:
	adrp	x8, _EBUSY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x0, x20
	bl	_psb_irq_uninstall
	mov	x0, x20
	bl	_gma_suspend_display
	mov	x0, x19
	bl	_gma_suspend_pci
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_power_mutex,4,2                ; @power_mutex
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GPU hardware busy, cannot suspend\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
