	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hl_device_suspend              ## -- Begin function hl_device_suspend
	.p2align	4, 0x90
_hl_device_suspend:                     ## @hl_device_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_pci_save_state
	leaq	28(%rbx), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_atomic_cmpxchg
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_5
LBB0_2:
	movl	$1, (%rbx)
	movq	16(%rbx), %rax
	movq	%rbx, %rdi
	callq	*16(%rax)
	movq	16(%rbx), %rax
	movq	%rbx, %rdi
	callq	*8(%rax)
	leaq	24(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	16(%rbx), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	8(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_4:
	movl	4(%rbx), %edi
	callq	_pci_disable_device
	movl	4(%rbx), %edi
	movq	_PCI_D3hot@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pci_set_power_state
	xorl	%r14d, %r14d
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't suspend while in reset\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Failed to disable PCI access of device CPU\n"

	.comm	_PCI_D3hot,4,2                  ## @PCI_D3hot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hl_device_suspend              ; -- Begin function hl_device_suspend
	.p2align	2
_hl_device_suspend:                     ; @hl_device_suspend
	.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
	mov	x19, x0
	ldr	w0, [x0, #4]
	bl	_pci_save_state
	add	x0, x19, #28
	mov	w20, #1
	mov	w1, #0
	mov	w2, #1
	bl	_atomic_cmpxchg
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	str	w20, [x19]
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #16]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	mov	x0, x19
	blr	x8
	add	x20, x19, #24
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x20
	bl	_mutex_unlock
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	cbz	w0, LBB0_4
; %bb.3:
	ldr	w0, [x19, #8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_4:
	ldr	w0, [x19, #4]
	bl	_pci_disable_device
	ldr	w0, [x19, #4]
Lloh7:
	adrp	x8, _PCI_D3hot@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PCI_D3hot@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_pci_set_power_state
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't suspend while in reset\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Failed to disable PCI access of device CPU\n"

	.comm	_PCI_D3hot,4,2                  ; @PCI_D3hot
.subsections_via_symbols
