	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _ish_hw_reset
__ish_hw_reset:                         ## @_ish_hw_reset
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.3:
	movq	%rdi, %r14
	movq	%rbx, %rdi
	callq	_pci_reset_function
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	cmpq	$0, (%rbx)
	je	LBB0_6
LBB0_7:
	movq	%r14, %rdi
	callq	_ish_disable_dma
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	addq	$12, %rbx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	_ISHTP_DEV_RESETTING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	cmpq	$0, (%rbx)
	jne	LBB0_7
LBB0_6:
	addq	$12, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_PCI_PM_CTRL@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	(%rbx), %rsi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_word
	movq	_PCI_PM_CTRL_STATE_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	notl	%edx
	andl	-36(%rbp), %edx
	movq	_PCI_D3hot@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, -36(%rbp)
	movq	(%r15), %rsi
	addq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_pci_write_config_word
	movl	8(%rbx), %edi
	callq	_mdelay
	movl	(%r12), %edx
	notl	%edx
	andl	-36(%rbp), %edx
	movq	_PCI_D0@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, -36(%rbp)
	movq	(%r15), %rsi
	addq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_pci_write_config_word
	movq	%r14, %rdi
	callq	_ish_wakeup
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ISHTP_DEV_RESETTING,4,2        ## @ISHTP_DEV_RESETTING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't reset - no PM caps\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Can't reset - stuck with DMA in-progress\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_PCI_PM_CTRL,8,3                ## @PCI_PM_CTRL
	.comm	_PCI_PM_CTRL_STATE_MASK,4,2     ## @PCI_PM_CTRL_STATE_MASK
	.comm	_PCI_D3hot,4,2                  ## @PCI_D3hot
	.comm	_PCI_D0,4,2                     ## @PCI_D0
	.no_dead_strip	__ish_hw_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _ish_hw_reset
__ish_hw_reset:                         ; @_ish_hw_reset
	.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
	ldr	x20, [x0, #8]
	cbz	x20, LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	bl	_pci_reset_function
	cbz	w0, LBB0_6
; %bb.2:
	ldr	x8, [x20]
	cbz	x8, LBB0_7
LBB0_3:
	mov	x0, x19
	bl	_ish_disable_dma
	cbz	x0, LBB0_10
; %bb.4:
	add	x0, x20, #12
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh6:
	adrp	x8, _ISHTP_DEV_RESETTING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ISHTP_DEV_RESETTING@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	x8, [x20]
	cbnz	x8, LBB0_3
LBB0_7:
	add	x0, x20, #12
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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_10:
	ldr	x8, [x20]
Lloh13:
	adrp	x21, _PCI_PM_CTRL@GOTPAGE
Lloh14:
	ldr	x21, [x21, _PCI_PM_CTRL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_word
Lloh15:
	adrp	x22, _PCI_PM_CTRL_STATE_MASK@GOTPAGE
Lloh16:
	ldr	x22, [x22, _PCI_PM_CTRL_STATE_MASK@GOTPAGEOFF]
	ldr	w8, [x22]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
Lloh17:
	adrp	x9, _PCI_D3hot@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PCI_D3hot@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	x0, x20
	bl	_pci_write_config_word
	ldr	w0, [x20, #8]
	bl	_mdelay
	ldr	w8, [x22]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
Lloh20:
	adrp	x9, _PCI_D0@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PCI_D0@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	x0, x20
	bl	_pci_write_config_word
	mov	x0, x19
	bl	_ish_wakeup
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ISHTP_DEV_RESETTING,4,2        ; @ISHTP_DEV_RESETTING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't reset - no PM caps\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Can't reset - stuck with DMA in-progress\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_PCI_PM_CTRL,8,3                ; @PCI_PM_CTRL
	.comm	_PCI_PM_CTRL_STATE_MASK,4,2     ; @PCI_PM_CTRL_STATE_MASK
	.comm	_PCI_D3hot,4,2                  ; @PCI_D3hot
	.comm	_PCI_D0,4,2                     ; @PCI_D0
	.no_dead_strip	__ish_hw_reset
.subsections_via_symbols
