	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ish_device_disable             ## -- Begin function ish_device_disable
	.p2align	4, 0x90
_ish_device_disable:                    ## @ish_device_disable
	.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), %r14
	testq	%r14, %r14
	je	LBB0_3
## %bb.1:
	movq	%rdi, %rbx
	callq	_ish_disable_dma
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	_PCI_D3hot@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pci_set_power_state
	movq	_ISHTP_DEV_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ish_clr_host_rdy               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't reset - stuck with DMA in-progress\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ish_device_disable             ; -- Begin function ish_device_disable
	.p2align	2
_ish_device_disable:                    ; @ish_device_disable
	.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	x20, [x0, #8]
	cbz	x20, LBB0_3
; %bb.1:
	mov	x19, x0
	bl	_ish_disable_dma
	cbz	x0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dev_err
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh2:
	adrp	x8, _PCI_D3hot@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PCI_D3hot@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pci_set_power_state
Lloh5:
	adrp	x8, _ISHTP_DEV_DISABLED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ISHTP_DEV_DISABLED@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ish_clr_host_rdy
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't reset - stuck with DMA in-progress\n"

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