	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtip_hba_reset
_mtip_hba_reset:                        ## @mtip_hba_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_HOST_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HOST_CTL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	(%r14), %rsi
	callq	_writel
	movq	(%rbx), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movq	_jiffies@GOTPCREL(%rip), %r12
	movq	(%r12), %r15
	movl	$2000, %edi                     ## imm = 0x7D0
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	addq	%r15, %rbx
	leaq	8(%r14), %r15
	movq	_MTIP_DDF_REMOVE_PENDING_BIT@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_mdelay
	movl	(%r13), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_HOST_CTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movq	_HOST_RESET@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r12), %rdi
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	jne	LBB0_1
LBB0_5:
	movq	_HOST_CTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movl	%eax, %ecx
	movq	_HOST_RESET@GOTPCREL(%rip), %rax
	andl	(%rax), %ecx
	xorl	%eax, %eax
	negl	%ecx
	sbbl	%eax, %eax
	jmp	LBB0_6
LBB0_2:
	movl	$-1, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HOST_RESET,4,2                 ## @HOST_RESET
	.comm	_HOST_CTL,8,3                   ## @HOST_CTL
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_MTIP_DDF_REMOVE_PENDING_BIT,4,2 ## @MTIP_DDF_REMOVE_PENDING_BIT
	.no_dead_strip	_mtip_hba_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtip_hba_reset
_mtip_hba_reset:                        ; @mtip_hba_reset
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x22, _HOST_RESET@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HOST_RESET@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	x8, [x19]
Lloh2:
	adrp	x23, _HOST_CTL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _HOST_CTL@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x1, x9, x8
	bl	_writel
	mov	x20, x19
	ldr	x8, [x20], #8
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
Lloh4:
	adrp	x24, _jiffies@GOTPAGE
Lloh5:
	ldr	x24, [x24, _jiffies@GOTPAGEOFF]
	ldr	x21, [x24]
	mov	w0, #2000
	bl	_msecs_to_jiffies
	add	x21, x0, x21
Lloh6:
	adrp	x25, _MTIP_DDF_REMOVE_PENDING_BIT@GOTPAGE
Lloh7:
	ldr	x25, [x25, _MTIP_DDF_REMOVE_PENDING_BIT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_mdelay
	ldr	w0, [x25]
	mov	x1, x20
	bl	_test_bit
	cbnz	x0, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x19]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [x24]
	mov	x1, x21
	bl	_time_before
	cbnz	x0, LBB0_1
LBB0_4:
	ldr	x8, [x19]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x22]
	tst	w8, w0
	csetm	w0, ne
	b	LBB0_6
LBB0_5:
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_HOST_RESET,4,2                 ; @HOST_RESET
	.comm	_HOST_CTL,8,3                   ; @HOST_CTL
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_MTIP_DDF_REMOVE_PENDING_BIT,4,2 ; @MTIP_DDF_REMOVE_PENDING_BIT
	.no_dead_strip	_mtip_hba_reset
.subsections_via_symbols
