	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtip_hw_exit
_mtip_hw_exit:                          ## @mtip_hw_exit
	.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
	movq	_MTIP_DDF_CLEANUP_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	32(%rbx), %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	_MTIP_PF_REBUILD_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rsi
	addq	$12, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movq	(%rbx), %rdi
	callq	_mtip_standby_immediate
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_4:
	movq	(%rbx), %rdi
	callq	_mtip_deinit_port
	movq	_HOST_CTL@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	24(%rbx), %rdi
	callq	_readl
	movq	_HOST_IRQ_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%r14), %rsi
	addq	24(%rbx), %rsi
	callq	_writel
LBB0_5:
	movq	(%rbx), %rdi
	addq	$8, %rdi
	callq	_del_timer_sync
	movq	8(%rbx), %rdi
	movl	4(%rdi), %esi
	movq	%rbx, %rdx
	callq	_devm_free_irq
	leaq	16(%rbx), %rdi
	callq	_tasklet_kill
	movq	(%rbx), %rax
	movq	8(%rbx), %rdi
	movq	_HW_PORT_PRIV_DMA_SZ@GOTPCREL(%rip), %rcx
	movq	_ATA_SECT_SIZE@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rsi
	shlq	$2, %rsi
	addq	(%rcx), %rsi
	movl	(%rax), %ecx
	movl	4(%rax), %edx
	callq	_dmam_free_coherent
	movq	(%rbx), %rdi
	callq	_kfree
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTIP_DDF_CLEANUP_BIT,4,2       ## @MTIP_DDF_CLEANUP_BIT
	.comm	_MTIP_PF_REBUILD_BIT,4,2        ## @MTIP_PF_REBUILD_BIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"STANDBY IMMEDIATE failed\n"

	.comm	_HOST_CTL,8,3                   ## @HOST_CTL
	.comm	_HOST_IRQ_EN,4,2                ## @HOST_IRQ_EN
	.comm	_HW_PORT_PRIV_DMA_SZ,8,3        ## @HW_PORT_PRIV_DMA_SZ
	.comm	_ATA_SECT_SIZE,4,2              ## @ATA_SECT_SIZE
	.no_dead_strip	_mtip_hw_exit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtip_hw_exit
_mtip_hw_exit:                          ; @mtip_hw_exit
	.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
Lloh0:
	adrp	x8, _MTIP_DDF_CLEANUP_BIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTIP_DDF_CLEANUP_BIT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #32
	bl	_test_bit
	cbnz	w0, LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _MTIP_PF_REBUILD_BIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MTIP_PF_REBUILD_BIT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	x8, [x19]
	add	x1, x8, #12
	bl	_test_bit
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	x0, [x19]
	bl	_mtip_standby_immediate
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x0, [x19, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_4:
	ldr	x0, [x19]
	bl	_mtip_deinit_port
	ldr	x8, [x19, #24]
Lloh8:
	adrp	x20, _HOST_CTL@GOTPAGE
Lloh9:
	ldr	x20, [x20, _HOST_CTL@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
Lloh10:
	adrp	x8, _HOST_IRQ_EN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HOST_IRQ_EN@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	bic	w0, w0, w8
	ldr	x8, [x19, #24]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
LBB0_5:
	ldr	x8, [x19]
	add	x0, x8, #8
	bl	_del_timer_sync
	ldr	x0, [x19, #8]
	ldr	w1, [x0, #4]
	mov	x2, x19
	bl	_devm_free_irq
	add	x0, x19, #16
	bl	_tasklet_kill
Lloh13:
	adrp	x8, _HW_PORT_PRIV_DMA_SZ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HW_PORT_PRIV_DMA_SZ@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
Lloh16:
	adrp	x9, _ATA_SECT_SIZE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ATA_SECT_SIZE@GOTPAGEOFF]
Lloh18:
	ldrsw	x9, [x9]
	add	x1, x8, x9, lsl #2
	ldp	x8, x0, [x19]
	ldp	w3, w2, [x8]
	bl	_dmam_free_coherent
	ldr	x0, [x19]
	bl	_kfree
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MTIP_DDF_CLEANUP_BIT,4,2       ; @MTIP_DDF_CLEANUP_BIT
	.comm	_MTIP_PF_REBUILD_BIT,4,2        ; @MTIP_PF_REBUILD_BIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"STANDBY IMMEDIATE failed\n"

	.comm	_HOST_CTL,8,3                   ; @HOST_CTL
	.comm	_HOST_IRQ_EN,4,2                ; @HOST_IRQ_EN
	.comm	_HW_PORT_PRIV_DMA_SZ,8,3        ; @HW_PORT_PRIV_DMA_SZ
	.comm	_ATA_SECT_SIZE,4,2              ; @ATA_SECT_SIZE
	.no_dead_strip	_mtip_hw_exit
.subsections_via_symbols
