	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_sff_hsm_move               ## -- Begin function ata_sff_hsm_move
	.p2align	4, 0x90
_ata_sff_hsm_move:                      ## @ata_sff_hsm_move
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r13
	leaq	12(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_ATA_QCFLAG_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%rsi), %eax
	sete	%dil
	callq	_WARN_ON_ONCE
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_ata_hsm_ok_in_wq
	xorl	%edi, %edi
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	cmpl	%r15d, %eax
	setne	%dil
	callq	_WARN_ON_ONCE
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
                                        ##       Child Loop BB0_3 Depth 3
	leaq	L_.str(%rip), %r15
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_3 Depth 3
	leaq	LJTI0_0(%rip), %r12
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_2 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	(%r13), %ecx
	movl	4(%r13), %esi
	movl	20(%rbx), %edx
	movq	%r15, %rdi
	movl	%r14d, %r8d
	xorl	%eax, %eax
	callq	_DPRINTK
	movl	(%r13), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_39
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=3
	movslq	(%r12,%rax,4), %rax
	addq	%r12, %rax
	jmpq	*%rax
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=3
	movl	%r14d, %edi
	callq	_ata_ok
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	testl	%eax, %eax
	je	LBB0_41
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=3
	movl	%r14d, %edi
	callq	___ac_err_mask
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=3
	orl	%eax, 4(%rbx)
	movl	$130, (%r13)
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=3
	movl	20(%rbx), %ecx
	movq	_ATA_DRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ATAPI_PROT_PIO@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=3
	testl	%r14d, %eax
	je	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=3
	movq	_ATA_DF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ATA_ERR@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	andl	%r14d, %edi
	callq	_unlikely
	testl	%eax, %eax
	je	LBB0_25
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=3
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_ata_ehi_push_desc
	movq	_AC_ERR_HSM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=3
	xorl	%edi, %edi
	testl	%r14d, %eax
	sete	%dil
	callq	_unlikely
	movq	_ATA_DF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_ATA_ERR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edi
	andl	%r14d, %edi
	testl	%eax, %eax
	je	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=3
	callq	_likely
	testl	%eax, %eax
	je	LBB0_26
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=3
	movl	4(%rbx), %eax
	movq	_AC_ERR_DEV@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 4(%rbx)
	movq	8(%rbx), %rcx
	movq	_ATA_HORKAGE_DIAGNOSTIC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx)
	je	LBB0_28
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=3
	movq	_AC_ERR_NODEV_HINT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jmp	LBB0_27
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=3
	movl	$128, (%r13)
	jmp	LBB0_3
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=3
	callq	_unlikely
	testl	%eax, %eax
	je	LBB0_29
## %bb.18:                              ##   in Loop: Header=BB0_3 Depth=3
	movq	_AC_ERR_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	movq	_ATA_TFLAG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%rbx)
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_3 Depth=3
	movq	%rbx, %rdi
	callq	_ata_pio_sectors
	movq	%r13, %rdi
	callq	_ata_wait_idle
	movl	%eax, %r14d
LBB0_20:                                ##   in Loop: Header=BB0_3 Depth=3
	movq	_ATA_DRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ATA_BUSY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	testl	%r14d, %eax
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_3 Depth=3
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.5(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_ata_ehi_push_desc
	movq	_AC_ERR_HSM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
LBB0_22:                                ##   in Loop: Header=BB0_3 Depth=3
	cmpl	$127, %r14d
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_3 Depth=3
	movq	_AC_ERR_NODEV_HINT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
LBB0_24:                                ##   in Loop: Header=BB0_3 Depth=3
	movl	$130, (%r13)
	jmp	LBB0_3
LBB0_25:                                ##   in Loop: Header=BB0_3 Depth=3
	movq	%rbx, %rdi
	callq	_atapi_pio_bytes
	xorl	%edi, %edi
	cmpl	$130, (%r13)
	sete	%dil
	callq	_unlikely
	testl	%eax, %eax
	jne	LBB0_3
	jmp	LBB0_50
LBB0_26:                                ##   in Loop: Header=BB0_3 Depth=3
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.4(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_ata_ehi_push_desc
	movq	_AC_ERR_NODEV_HINT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_AC_ERR_HSM@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	4(%rbx), %eax
LBB0_27:                                ##   in Loop: Header=BB0_3 Depth=3
	orl	%ecx, %eax
	movl	%eax, 4(%rbx)
LBB0_28:                                ##   in Loop: Header=BB0_3 Depth=3
	movl	$130, (%r13)
	jmp	LBB0_3
LBB0_29:                                ##   in Loop: Header=BB0_3 Depth=3
	movq	%rbx, %rdi
	callq	_ata_pio_sectors
	movl	$1, %r14d
	cmpl	$128, (%r13)
	jne	LBB0_51
## %bb.30:                              ##   in Loop: Header=BB0_3 Depth=3
	movq	_ATA_TFLAG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%rbx)
	jne	LBB0_51
## %bb.31:                              ##   in Loop: Header=BB0_3 Depth=3
	movq	%r13, %rdi
	callq	_ata_wait_idle
	movl	%eax, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	%rbx, %r12
	movl	16(%rbx), %ebx
	movq	_ATA_TFLAG_POLLING@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%edi, %edi
	movq	_ATA_DRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	sete	%dil
	callq	_unlikely
	movq	_ATA_DF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_ATA_ERR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edi
	andl	%r14d, %edi
	testl	%eax, %eax
	je	LBB0_36
## %bb.33:                              ##   in Loop: Header=BB0_2 Depth=2
	callq	_likely
	movq	_AC_ERR_DEV@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	leaq	L_.str(%rip), %r15
	jne	LBB0_35
## %bb.34:                              ##   in Loop: Header=BB0_2 Depth=2
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_ata_ehi_push_desc
	movq	_AC_ERR_HSM@GOTPCREL(%rip), %rcx
LBB0_35:                                ##   in Loop: Header=BB0_2 Depth=2
	movl	(%rcx), %eax
	movq	%r12, %rbx
	orl	%eax, 4(%r12)
	movl	$130, (%r13)
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_36:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	callq	_unlikely
	testl	%eax, %eax
	movq	%r12, %rbx
	je	LBB0_42
## %bb.37:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%rbx), %rax
	movq	_ATA_HORKAGE_STUCK_ERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_42
## %bb.38:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_ata_ehi_push_desc
	movq	_AC_ERR_HSM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	movl	$130, (%r13)
	jmp	LBB0_1
LBB0_39:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_BUG
	jmp	LBB0_51
LBB0_40:
	movq	_HSM_ST_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_ata_hsm_qc_complete
	xorl	%r14d, %r14d
	jmp	LBB0_51
LBB0_41:
	movl	4(%r13), %esi
	movq	8(%rbx), %rax
	movl	4(%rax), %edx
	leaq	L_.str.6(%rip), %rdi
	movl	%r14d, %ecx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DPRINTK
	movq	_AC_ERR_DEV@GOTPCREL(%rip), %rax
	movq	_AC_ERR_HSM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	andl	4(%rbx), %edi
	callq	_WARN_ON_ONCE
	movq	_HSM_ST_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_ata_hsm_qc_complete
	jmp	LBB0_51
LBB0_42:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	testl	%r14d, %r14d
	je	LBB0_44
## %bb.43:
	movl	8(%r13), %edi
	xorl	%esi, %esi
	callq	_spin_lock_irqsave
LBB0_44:
	movl	20(%rbx), %eax
	movq	_ATA_PROT_PIO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_46
## %bb.45:
	movl	$131, (%r13)
	movq	%rbx, %rdi
	callq	_ata_pio_sectors
	jmp	LBB0_47
LBB0_46:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_atapi_send_cdb
LBB0_47:
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	andl	%eax, -48(%rbp)                 ## 4-byte Folded Spill
	testl	%r14d, %r14d
	je	LBB0_49
## %bb.48:
	movl	8(%r13), %edi
	xorl	%esi, %esi
	callq	_spin_unlock_irqrestore
LBB0_49:
	movl	-48(%rbp), %r14d                ## 4-byte Reload
LBB0_51:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_50:
	movl	$1, %r14d
	jmp	LBB0_51
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_32, LBB0_32-LJTI0_0
.set L0_0_set_40, LBB0_40-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_32
	.long	L0_0_set_40
	.long	L0_0_set_8
	.end_data_region
                                        ## -- End function
	.comm	_ATA_QCFLAG_ACTIVE,4,2          ## @ATA_QCFLAG_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ata%u: protocol %d task_state %d (dev_stat 0x%X)\n"

	.comm	_ATA_TFLAG_POLLING,4,2          ## @ATA_TFLAG_POLLING
	.comm	_ATA_DRQ,4,2                    ## @ATA_DRQ
	.comm	_ATA_ERR,4,2                    ## @ATA_ERR
	.comm	_ATA_DF,4,2                     ## @ATA_DF
	.comm	_AC_ERR_DEV,4,2                 ## @AC_ERR_DEV
L_.str.1:                               ## @.str.1
	.asciz	"ST_FIRST: !(DRQ|ERR|DF)"

	.comm	_AC_ERR_HSM,4,2                 ## @AC_ERR_HSM
	.comm	_ATA_HORKAGE_STUCK_ERR,4,2      ## @ATA_HORKAGE_STUCK_ERR
L_.str.2:                               ## @.str.2
	.asciz	"ST_FIRST: DRQ=1 with device error, dev_stat 0x%X"

	.comm	_ATA_PROT_PIO,4,2               ## @ATA_PROT_PIO
	.comm	_ATAPI_PROT_PIO,4,2             ## @ATAPI_PROT_PIO
L_.str.3:                               ## @.str.3
	.asciz	"ST-ATAPI: DRQ=1 with device error, dev_stat 0x%X"

	.comm	_ATA_HORKAGE_DIAGNOSTIC,4,2     ## @ATA_HORKAGE_DIAGNOSTIC
	.comm	_AC_ERR_NODEV_HINT,4,2          ## @AC_ERR_NODEV_HINT
L_.str.4:                               ## @.str.4
	.asciz	"ST-ATA: DRQ=0 without device error, dev_stat 0x%X"

	.comm	_ATA_TFLAG_WRITE,4,2            ## @ATA_TFLAG_WRITE
	.comm	_ATA_BUSY,4,2                   ## @ATA_BUSY
L_.str.5:                               ## @.str.5
	.asciz	"ST-ATA: BUSY|DRQ persists on ERR|DF, dev_stat 0x%X"

L_.str.6:                               ## @.str.6
	.asciz	"ata%u: dev %u command complete, drv_stat 0x%x\n"

	.comm	_HSM_ST_IDLE,8,3                ## @HSM_ST_IDLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_sff_hsm_move               ; -- Begin function ata_sff_hsm_move
	.p2align	2
_ata_sff_hsm_move:                      ; @ata_sff_hsm_move
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x23, x2
	mov	x21, x1
	mov	x20, x0
	add	x22, x0, #12
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _ATA_QCFLAG_ACTIVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_QCFLAG_ACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	bl	_WARN_ON_ONCE
	mov	x0, x20
	mov	x1, x21
	bl	_ata_hsm_ok_in_wq
	str	w19, [sp, #12]                  ; 4-byte Folded Spill
	cmp	w0, w19
	cset	w0, ne
	bl	_WARN_ON_ONCE
Lloh3:
	adrp	x24, l_.str@PAGE
Lloh4:
	add	x24, x24, l_.str@PAGEOFF
Lloh5:
	adrp	x26, lJTI0_0@PAGE
Lloh6:
	add	x26, x26, lJTI0_0@PAGEOFF
Lloh7:
	adrp	x19, _ATA_DRQ@GOTPAGE
Lloh8:
	ldr	x19, [x19, _ATA_DRQ@GOTPAGEOFF]
	mov	w25, #130
	b	LBB0_5
LBB0_1:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, x23
	str	x8, [sp]
	mov	x0, x22
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_ata_ehi_push_desc
Lloh11:
	adrp	x8, _AC_ERR_HSM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AC_ERR_HSM@GOTPAGEOFF]
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x8]
	ldr	w9, [x21, #4]
	orr	w8, w9, w8
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	w8, [x21, #4]
	str	w25, [x20]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x21, #20]
	ldp	w3, w1, [x20]
	str	x23, [sp]
	mov	x0, x24
	bl	_DPRINTK
	ldr	w8, [x20]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_38
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	adr	x9, LBB0_7
	ldrb	w10, [x26, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	bl	_ata_ok
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	w0, LBB0_39
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	bl	___ac_err_mask
	ldr	w8, [x21, #4]
	orr	w8, w8, w0
	b	LBB0_4
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w27, [x21, #16]
Lloh13:
	adrp	x8, _ATA_TFLAG_POLLING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ATA_TFLAG_POLLING@GOTPAGEOFF]
Lloh15:
	ldr	w28, [x8]
	ldr	w8, [x19]
	tst	w8, w23
	cset	w0, eq
	bl	_unlikely
	mov	x8, x0
Lloh16:
	adrp	x9, _ATA_ERR@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ATA_ERR@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _ATA_DF@GOTPAGE
Lloh20:
	ldr	x10, [x10, _ATA_DF@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	orr	w9, w10, w9
	and	w0, w9, w23
	cbz	w8, LBB0_20
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	bl	_likely
Lloh22:
	adrp	x8, _AC_ERR_DEV@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AC_ERR_DEV@GOTPAGEOFF]
	cbnz	w0, LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x21, #20]
Lloh26:
	adrp	x8, _ATAPI_PROT_PIO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ATAPI_PROT_PIO@GOTPAGEOFF]
Lloh28:
	ldr	w10, [x8]
	ldr	w8, [x19]
	and	w8, w8, w23
	cmp	w9, w10
	b.ne	LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	cbz	w8, LBB0_23
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh29:
	adrp	x8, _ATA_ERR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ATA_ERR@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
Lloh32:
	adrp	x9, _ATA_DF@GOTPAGE
Lloh33:
	ldr	x9, [x9, _ATA_DF@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w8, w9, w8
	and	w0, w8, w23
	bl	_unlikely
	cbnz	w0, LBB0_1
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_atapi_pio_bytes
	ldr	w8, [x20]
	cmp	w8, #130
	cset	w0, eq
	bl	_unlikely
	cbnz	w0, LBB0_5
	b	LBB0_49
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, #0
	cset	w0, eq
	bl	_unlikely
	mov	x8, x0
Lloh35:
	adrp	x9, _ATA_ERR@GOTPAGE
Lloh36:
	ldr	x9, [x9, _ATA_ERR@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
Lloh38:
	adrp	x10, _ATA_DF@GOTPAGE
Lloh39:
	ldr	x10, [x10, _ATA_DF@GOTPAGEOFF]
Lloh40:
	ldr	w10, [x10]
	orr	w9, w10, w9
	and	w0, w9, w23
	cbz	w8, LBB0_24
; %bb.17:                               ;   in Loop: Header=BB0_5 Depth=1
	bl	_likely
	cbz	w0, LBB0_32
; %bb.18:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh41:
	adrp	x8, _AC_ERR_DEV@GOTPAGE
Lloh42:
	ldr	x8, [x8, _AC_ERR_DEV@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	ldr	w9, [x21, #4]
	orr	w8, w9, w8
	str	w8, [x21, #4]
	ldr	x9, [x21, #8]
	ldr	w9, [x9]
Lloh44:
	adrp	x10, _ATA_HORKAGE_DIAGNOSTIC@GOTPAGE
Lloh45:
	ldr	x10, [x10, _ATA_HORKAGE_DIAGNOSTIC@GOTPAGEOFF]
Lloh46:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_34
; %bb.19:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh47:
	adrp	x9, _AC_ERR_NODEV_HINT@GOTPAGE
Lloh48:
	ldr	x9, [x9, _AC_ERR_NODEV_HINT@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	b	LBB0_33
LBB0_20:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_unlikely
	cbz	w0, LBB0_43
; %bb.21:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
Lloh50:
	adrp	x9, _ATA_HORKAGE_STUCK_ERR@GOTPAGE
Lloh51:
	ldr	x9, [x9, _ATA_HORKAGE_STUCK_ERR@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_43
; %bb.22:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, x23
	str	x8, [sp]
	mov	x0, x22
Lloh53:
	adrp	x1, l_.str.2@PAGE
Lloh54:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_23:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w8, #128
	str	w8, [x20]
	b	LBB0_5
LBB0_24:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_unlikely
	cbz	w0, LBB0_35
; %bb.25:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh55:
	adrp	x8, _AC_ERR_DEV@GOTPAGE
Lloh56:
	ldr	x8, [x8, _AC_ERR_DEV@GOTPAGEOFF]
Lloh57:
	ldr	w8, [x8]
	ldr	w9, [x21, #4]
	orr	w8, w9, w8
	str	w8, [x21, #4]
	ldr	w8, [x21, #16]
Lloh58:
	adrp	x9, _ATA_TFLAG_WRITE@GOTPAGE
Lloh59:
	ldr	x9, [x9, _ATA_TFLAG_WRITE@GOTPAGEOFF]
Lloh60:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_27
; %bb.26:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_ata_pio_sectors
	mov	x0, x20
	bl	_ata_wait_idle
	mov	x23, x0
LBB0_27:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh61:
	adrp	x8, _ATA_BUSY@GOTPAGE
Lloh62:
	ldr	x8, [x8, _ATA_BUSY@GOTPAGEOFF]
Lloh63:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	tst	w8, w23
	b.eq	LBB0_29
; %bb.28:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, x23
	str	x8, [sp]
	mov	x0, x22
Lloh64:
	adrp	x1, l_.str.5@PAGE
Lloh65:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_ata_ehi_push_desc
Lloh66:
	adrp	x8, _AC_ERR_HSM@GOTPAGE
Lloh67:
	ldr	x8, [x8, _AC_ERR_HSM@GOTPAGEOFF]
Lloh68:
	ldr	w8, [x8]
	ldr	w9, [x21, #4]
	orr	w8, w9, w8
	str	w8, [x21, #4]
LBB0_29:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w23, #127
	b.ne	LBB0_31
; %bb.30:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh69:
	adrp	x8, _AC_ERR_NODEV_HINT@GOTPAGE
Lloh70:
	ldr	x8, [x8, _AC_ERR_NODEV_HINT@GOTPAGEOFF]
Lloh71:
	ldr	w8, [x8]
	ldr	w9, [x21, #4]
	orr	w8, w9, w8
	str	w8, [x21, #4]
LBB0_31:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w25, [x20]
	b	LBB0_5
LBB0_32:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, x23
	str	x8, [sp]
	mov	x0, x22
Lloh72:
	adrp	x1, l_.str.4@PAGE
Lloh73:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_ata_ehi_push_desc
Lloh74:
	adrp	x8, _AC_ERR_HSM@GOTPAGE
Lloh75:
	ldr	x8, [x8, _AC_ERR_HSM@GOTPAGEOFF]
Lloh76:
	ldr	w8, [x8]
Lloh77:
	adrp	x9, _AC_ERR_NODEV_HINT@GOTPAGE
Lloh78:
	ldr	x9, [x9, _AC_ERR_NODEV_HINT@GOTPAGEOFF]
Lloh79:
	ldr	w9, [x9]
	orr	w9, w9, w8
	ldr	w8, [x21, #4]
LBB0_33:                                ;   in Loop: Header=BB0_5 Depth=1
	orr	w8, w9, w8
	str	w8, [x21, #4]
LBB0_34:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w25, [x20]
	b	LBB0_5
LBB0_35:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_ata_pio_sectors
	ldr	w8, [x20]
	cmp	w8, #128
	b.ne	LBB0_49
; %bb.36:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21, #16]
Lloh80:
	adrp	x9, _ATA_TFLAG_WRITE@GOTPAGE
Lloh81:
	ldr	x9, [x9, _ATA_TFLAG_WRITE@GOTPAGEOFF]
Lloh82:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_49
; %bb.37:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_ata_wait_idle
	mov	x23, x0
	b	LBB0_5
LBB0_38:
	bl	_BUG
	b	LBB0_41
LBB0_39:
	ldr	w1, [x20, #4]
	ldr	x8, [x21, #8]
	ldr	w2, [x8, #4]
Lloh83:
	adrp	x0, l_.str.6@PAGE
Lloh84:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	x3, x23
	bl	_DPRINTK
	ldr	w8, [x21, #4]
Lloh85:
	adrp	x9, _AC_ERR_DEV@GOTPAGE
Lloh86:
	ldr	x9, [x9, _AC_ERR_DEV@GOTPAGEOFF]
Lloh87:
	ldr	w9, [x9]
Lloh88:
	adrp	x10, _AC_ERR_HSM@GOTPAGE
Lloh89:
	ldr	x10, [x10, _AC_ERR_HSM@GOTPAGEOFF]
Lloh90:
	ldr	w10, [x10]
	orr	w9, w10, w9
	and	w0, w9, w8
	bl	_WARN_ON_ONCE
LBB0_40:
Lloh91:
	adrp	x8, _HSM_ST_IDLE@GOTPAGE
Lloh92:
	ldr	x8, [x8, _HSM_ST_IDLE@GOTPAGEOFF]
Lloh93:
	ldr	x8, [x8]
	str	w8, [x20]
	mov	x0, x21
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	bl	_ata_hsm_qc_complete
LBB0_41:
	mov	w22, #0
LBB0_42:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_43:
	ldr	w19, [sp, #12]                  ; 4-byte Folded Reload
	cbz	w19, LBB0_45
; %bb.44:
	ldr	w0, [x20, #8]
	mov	x1, #0
	bl	_spin_lock_irqsave
LBB0_45:
	and	w22, w28, w27
	ldr	w8, [x21, #20]
Lloh94:
	adrp	x9, _ATA_PROT_PIO@GOTPAGE
Lloh95:
	ldr	x9, [x9, _ATA_PROT_PIO@GOTPAGEOFF]
Lloh96:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_47
; %bb.46:
	mov	w8, #131
	str	w8, [x20]
	mov	x0, x21
	bl	_ata_pio_sectors
	cbnz	w19, LBB0_48
	b	LBB0_42
LBB0_47:
	mov	x0, x20
	mov	x1, x21
	bl	_atapi_send_cdb
	cbz	w19, LBB0_42
LBB0_48:
	ldr	w0, [x20, #8]
	mov	x1, #0
	bl	_spin_unlock_irqrestore
	b	LBB0_42
LBB0_49:
	mov	w22, #1
	b	LBB0_42
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpAdd	Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.loh AdrpLdrGotLdr	Lloh88, Lloh89, Lloh90
	.loh AdrpLdrGotLdr	Lloh85, Lloh86, Lloh87
	.loh AdrpAdd	Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh91, Lloh92, Lloh93
	.loh AdrpLdrGotLdr	Lloh94, Lloh95, Lloh96
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_9-LBB0_7)>>2
	.byte	(LBB0_40-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
                                        ; -- End function
	.comm	_ATA_QCFLAG_ACTIVE,4,2          ; @ATA_QCFLAG_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ata%u: protocol %d task_state %d (dev_stat 0x%X)\n"

	.comm	_ATA_TFLAG_POLLING,4,2          ; @ATA_TFLAG_POLLING
	.comm	_ATA_DRQ,4,2                    ; @ATA_DRQ
	.comm	_ATA_ERR,4,2                    ; @ATA_ERR
	.comm	_ATA_DF,4,2                     ; @ATA_DF
	.comm	_AC_ERR_DEV,4,2                 ; @AC_ERR_DEV
l_.str.1:                               ; @.str.1
	.asciz	"ST_FIRST: !(DRQ|ERR|DF)"

	.comm	_AC_ERR_HSM,4,2                 ; @AC_ERR_HSM
	.comm	_ATA_HORKAGE_STUCK_ERR,4,2      ; @ATA_HORKAGE_STUCK_ERR
l_.str.2:                               ; @.str.2
	.asciz	"ST_FIRST: DRQ=1 with device error, dev_stat 0x%X"

	.comm	_ATA_PROT_PIO,4,2               ; @ATA_PROT_PIO
	.comm	_ATAPI_PROT_PIO,4,2             ; @ATAPI_PROT_PIO
l_.str.3:                               ; @.str.3
	.asciz	"ST-ATAPI: DRQ=1 with device error, dev_stat 0x%X"

	.comm	_ATA_HORKAGE_DIAGNOSTIC,4,2     ; @ATA_HORKAGE_DIAGNOSTIC
	.comm	_AC_ERR_NODEV_HINT,4,2          ; @AC_ERR_NODEV_HINT
l_.str.4:                               ; @.str.4
	.asciz	"ST-ATA: DRQ=0 without device error, dev_stat 0x%X"

	.comm	_ATA_TFLAG_WRITE,4,2            ; @ATA_TFLAG_WRITE
	.comm	_ATA_BUSY,4,2                   ; @ATA_BUSY
l_.str.5:                               ; @.str.5
	.asciz	"ST-ATA: BUSY|DRQ persists on ERR|DF, dev_stat 0x%X"

l_.str.6:                               ; @.str.6
	.asciz	"ata%u: dev %u command complete, drv_stat 0x%x\n"

	.comm	_HSM_ST_IDLE,8,3                ; @HSM_ST_IDLE
.subsections_via_symbols
