	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hl_device_resume               ## -- Begin function hl_device_resume
	.p2align	4, 0x90
_hl_device_resume:                      ## @hl_device_resume
	.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
	movq	_PCI_D0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pci_set_power_state
	movl	4(%rbx), %edi
	callq	_pci_restore_state
	movl	4(%rbx), %edi
	callq	_pci_enable_device_mem
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r14d
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_7
LBB0_2:
	movl	4(%rbx), %edi
	callq	_pci_set_master
	movq	16(%rbx), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_4:
	movl	$0, (%rbx)
	leaq	12(%rbx), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_atomic_set
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_hl_device_reset
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %r14d
LBB0_6:
	movl	8(%rbx), %edi
	callq	_dev_err
	movl	4(%rbx), %edi
	callq	_pci_clear_master
	movl	4(%rbx), %edi
	callq	_pci_disable_device
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_D0,4,2                     ## @PCI_D0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to enable PCI device in resume\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to resume device after suspend\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to reset device during resume\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hl_device_resume               ; -- Begin function hl_device_resume
	.p2align	2
_hl_device_resume:                      ; @hl_device_resume
	.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]
Lloh0:
	adrp	x8, _PCI_D0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_D0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_pci_set_power_state
	ldr	w0, [x19, #4]
	bl	_pci_restore_state
	ldr	w0, [x19, #4]
	bl	_pci_enable_device_mem
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_7
LBB0_2:
	ldr	w0, [x19, #4]
	bl	_pci_set_master
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	str	wzr, [x0], #12
	mov	w1, #0
	bl	_atomic_set
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_hl_device_reset
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.5:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	ldr	w0, [x19, #8]
	bl	_dev_err
	ldr	w0, [x19, #4]
	bl	_pci_clear_master
	ldr	w0, [x19, #4]
	bl	_pci_disable_device
LBB0_7:
	mov	x0, x20
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_D0,4,2                     ; @PCI_D0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to enable PCI device in resume\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to resume device after suspend\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to reset device during resume\n"

.subsections_via_symbols
