	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtip_pause_ncq
_mtip_pause_ncq:                        ## @mtip_pause_ncq
	.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	%rsi, %r12
	movq	%rdi, %r15
	movq	_PORT_TFDATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	24(%r15), %rdi
	callq	_readl
	movq	%rax, %rbx
	movl	(%r12), %eax
	movq	_ATA_CMD_SEC_ERASE_UNIT@GOTPCREL(%rip), %r13
	cmpl	(%r13), %eax
	jne	LBB0_2
## %bb.1:
	movq	_MTIP_DDF_SEC_LOCK_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r15), %rsi
	callq	_clear_bit
LBB0_2:
	xorl	%r14d, %r14d
	testb	$1, %bl
	jne	LBB0_15
## %bb.3:
	movl	(%r12), %eax
	movq	_ATA_CMD_SEC_ERASE_PREP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.4:
	movq	_MTIP_PF_SE_ACTIVE_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r15), %rsi
	callq	_set_bit
	movq	_MTIP_DDF_SEC_LOCK_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r15), %rsi
LBB0_8:
	callq	_set_bit
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movl	$1, %r14d
	jmp	LBB0_15
LBB0_5:
	movq	_ATA_CMD_DOWNLOAD_MICRO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.6:
	cmpl	$3, 4(%r12)
	jne	LBB0_9
## %bb.7:
	movq	_MTIP_PF_DM_ACTIVE_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r15), %rsi
	jmp	LBB0_8
LBB0_9:
	cmpl	(%r13), %eax
	jne	LBB0_10
LBB0_14:
	movq	%r15, %rdi
	callq	_mtip_restart_port
	jmp	LBB0_15
LBB0_10:
	cmpl	$252, %eax
	jne	LBB0_15
## %bb.11:
	movl	4(%r12), %eax
	leal	-38(%rax), %ecx
	cmpl	$2, %ecx
	jb	LBB0_14
## %bb.12:
	cmpl	$114, %eax
	je	LBB0_14
## %bb.13:
	cmpl	$98, %eax
	je	LBB0_14
LBB0_15:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RX_FIS_D2H_REG,4,2             ## @RX_FIS_D2H_REG
	.comm	_PORT_TFDATA,8,3                ## @PORT_TFDATA
	.comm	_ATA_CMD_SEC_ERASE_UNIT,4,2     ## @ATA_CMD_SEC_ERASE_UNIT
	.comm	_MTIP_DDF_SEC_LOCK_BIT,4,2      ## @MTIP_DDF_SEC_LOCK_BIT
	.comm	_ATA_CMD_SEC_ERASE_PREP,4,2     ## @ATA_CMD_SEC_ERASE_PREP
	.comm	_MTIP_PF_SE_ACTIVE_BIT,4,2      ## @MTIP_PF_SE_ACTIVE_BIT
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_ATA_CMD_DOWNLOAD_MICRO,4,2     ## @ATA_CMD_DOWNLOAD_MICRO
	.comm	_MTIP_PF_DM_ACTIVE_BIT,4,2      ## @MTIP_PF_DM_ACTIVE_BIT
	.no_dead_strip	_mtip_pause_ncq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtip_pause_ncq
_mtip_pause_ncq:                        ; @mtip_pause_ncq
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #24]
Lloh0:
	adrp	x9, _PORT_TFDATA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PORT_TFDATA@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	ldr	w8, [x20]
Lloh3:
	adrp	x22, _ATA_CMD_SEC_ERASE_UNIT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _ATA_CMD_SEC_ERASE_UNIT@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _MTIP_DDF_SEC_LOCK_BIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MTIP_DDF_SEC_LOCK_BIT@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	x1, [x19, #16]
	bl	_clear_bit
LBB0_2:
	tbnz	w21, #0, LBB0_15
; %bb.3:
	ldr	w8, [x20]
Lloh8:
	adrp	x9, _ATA_CMD_SEC_ERASE_PREP@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ATA_CMD_SEC_ERASE_PREP@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.4:
Lloh11:
	adrp	x8, _MTIP_PF_SE_ACTIVE_BIT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MTIP_PF_SE_ACTIVE_BIT@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_set_bit
Lloh14:
	adrp	x8, _MTIP_DDF_SEC_LOCK_BIT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MTIP_DDF_SEC_LOCK_BIT@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	x1, [x19, #16]
LBB0_5:
	bl	_set_bit
Lloh17:
	adrp	x8, _jiffies@GOTPAGE
Lloh18:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	w0, #1
	b	LBB0_16
LBB0_6:
Lloh20:
	adrp	x9, _ATA_CMD_DOWNLOAD_MICRO@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ATA_CMD_DOWNLOAD_MICRO@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.7:
	ldr	w9, [x20, #4]
	cmp	w9, #3
	b.ne	LBB0_9
; %bb.8:
Lloh23:
	adrp	x8, _MTIP_PF_DM_ACTIVE_BIT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MTIP_PF_DM_ACTIVE_BIT@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	add	x1, x19, #8
	b	LBB0_5
LBB0_9:
	ldr	w9, [x22]
	cmp	w8, w9
	b.ne	LBB0_11
LBB0_10:
	mov	x0, x19
	bl	_mtip_restart_port
	b	LBB0_15
LBB0_11:
	cmp	w8, #252
	b.ne	LBB0_15
; %bb.12:
	ldr	w8, [x20, #4]
	sub	w9, w8, #38
	cmp	w9, #2
	b.lo	LBB0_10
; %bb.13:
	cmp	w8, #114
	b.eq	LBB0_10
; %bb.14:
	cmp	w8, #98
	b.eq	LBB0_10
LBB0_15:
	mov	w0, #0
LBB0_16:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_RX_FIS_D2H_REG,4,2             ; @RX_FIS_D2H_REG
	.comm	_PORT_TFDATA,8,3                ; @PORT_TFDATA
	.comm	_ATA_CMD_SEC_ERASE_UNIT,4,2     ; @ATA_CMD_SEC_ERASE_UNIT
	.comm	_MTIP_DDF_SEC_LOCK_BIT,4,2      ; @MTIP_DDF_SEC_LOCK_BIT
	.comm	_ATA_CMD_SEC_ERASE_PREP,4,2     ; @ATA_CMD_SEC_ERASE_PREP
	.comm	_MTIP_PF_SE_ACTIVE_BIT,4,2      ; @MTIP_PF_SE_ACTIVE_BIT
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_ATA_CMD_DOWNLOAD_MICRO,4,2     ; @ATA_CMD_DOWNLOAD_MICRO
	.comm	_MTIP_PF_DM_ACTIVE_BIT,4,2      ; @MTIP_PF_DM_ACTIVE_BIT
	.no_dead_strip	_mtip_pause_ncq
.subsections_via_symbols
