	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_qc_issue                   ## -- Begin function ata_qc_issue
	.p2align	4, 0x90
_ata_qc_issue:                          ## @ata_qc_issue
	.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, %r13
	movq	40(%rdi), %r12
	movq	8(%rdi), %rax
	movq	8(%rax), %r14
	movl	32(%rdi), %r15d
	movq	8(%r12), %rax
	cmpq	$0, 16(%rax)
	je	LBB0_1
## %bb.2:
	movl	(%r14), %edi
	callq	_ata_tag_valid
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	jmp	LBB0_3
LBB0_1:
	xorl	%edi, %edi
LBB0_3:
	callq	_WARN_ON_ONCE
	movl	%r15d, %edi
	callq	_ata_is_ncq
	movl	4(%r14), %edi
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movb	(%r13), %cl
	movl	$1, %ebx
	movl	$1, %eax
	shll	%cl, %eax
	andl	%edi, %eax
	movl	%eax, %edi
	callq	_WARN_ON_ONCE
	movl	4(%r14), %eax
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	incl	16(%r12)
LBB0_6:
	movb	(%r13), %cl
	shll	%cl, %ebx
	btsl	%ecx, %eax
	movl	%eax, 4(%r14)
	jmp	LBB0_8
LBB0_7:
	callq	_WARN_ON_ONCE
	incl	16(%r12)
	movl	(%r13), %ecx
	movl	%ecx, (%r14)
	movl	$1, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
LBB0_8:
	movq	_ATA_QCFLAG_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 28(%r13)
	orl	%ebx, (%r12)
	movl	%r15d, %edi
	callq	_ata_is_data
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movl	$1, %edi
	cmpl	$0, 24(%r13)
	je	LBB0_13
## %bb.11:
	cmpl	$0, 20(%r13)
	je	LBB0_13
## %bb.12:
	xorl	%edi, %edi
	cmpl	$0, 16(%r13)
	sete	%dil
	jmp	LBB0_13
LBB0_9:
	xorl	%edi, %edi
LBB0_13:
	callq	_BUG_ON
	movl	%r15d, %edi
	callq	_ata_is_dma
	testq	%rax, %rax
	je	LBB0_14
LBB0_16:
	movq	%r13, %rdi
	callq	_ata_sg_setup
	testq	%rax, %rax
	je	LBB0_17
## %bb.20:
	movq	_AC_ERR_SYSTEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r13)
	jmp	LBB0_21
LBB0_14:
	movl	%r15d, %edi
	callq	_ata_is_pio
	testq	%rax, %rax
	je	LBB0_17
## %bb.15:
	movq	_ATA_FLAG_PIO_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	jne	LBB0_16
LBB0_17:
	movq	8(%r13), %rax
	movq	_ATA_DFLAG_SLEEPING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	andl	(%rax), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_18
## %bb.22:
	movq	_ATA_EH_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	8(%r14), %rdi
	orl	%eax, 8(%r14)
	leaq	L_.str(%rip), %rsi
	callq	_ata_ehi_push_desc
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ata_link_abort                 ## TAILCALL
LBB0_18:
	movq	8(%r12), %rax
	movq	%r13, %rdi
	callq	*8(%rax)
	movq	8(%r12), %rax
	movq	%r13, %rdi
	callq	*(%rax)
	orl	4(%r13), %eax
	movl	%eax, 4(%r13)
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_19
LBB0_21:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ata_qc_complete                ## TAILCALL
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_QCFLAG_ACTIVE,4,2          ## @ATA_QCFLAG_ACTIVE
	.comm	_ATA_FLAG_PIO_DMA,4,2           ## @ATA_FLAG_PIO_DMA
	.comm	_ATA_DFLAG_SLEEPING,4,2         ## @ATA_DFLAG_SLEEPING
	.comm	_ATA_EH_RESET,4,2               ## @ATA_EH_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"waking up from sleep"

	.comm	_AC_ERR_SYSTEM,4,2              ## @AC_ERR_SYSTEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_qc_issue                   ; -- Begin function ata_qc_issue
	.p2align	2
_ata_qc_issue:                          ; @ata_qc_issue
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x22, [x0, #40]
	ldr	x8, [x0, #8]
	ldr	x20, [x8, #8]
	ldr	w21, [x0, #32]
	ldr	x8, [x22, #8]
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x20]
	bl	_ata_tag_valid
	cmp	x0, #0
	cset	w0, ne
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_WARN_ON_ONCE
	mov	x0, x21
	bl	_ata_is_ncq
	mov	x8, x0
	ldr	w0, [x20, #4]
	cbz	x8, LBB0_7
; %bb.4:
	ldr	w8, [x19]
	mov	w23, #1
	lsl	w8, w23, w8
	and	w0, w8, w0
	bl	_WARN_ON_ONCE
	ldr	w9, [x20, #4]
	cbnz	w9, LBB0_6
; %bb.5:
	ldr	w8, [x22, #16]
	add	w8, w8, #1
	str	w8, [x22, #16]
LBB0_6:
	ldr	w8, [x19]
	lsl	w8, w23, w8
	orr	w9, w8, w9
	str	w9, [x20, #4]
	b	LBB0_8
LBB0_7:
	bl	_WARN_ON_ONCE
	ldr	w8, [x22, #16]
	add	w8, w8, #1
	str	w8, [x22, #16]
	ldr	w8, [x19]
	str	w8, [x20]
	mov	w9, #1
	lsl	w8, w9, w8
LBB0_8:
Lloh0:
	adrp	x9, _ATA_QCFLAG_ACTIVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_QCFLAG_ACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ldr	w10, [x19, #28]
	orr	w9, w10, w9
	str	w9, [x19, #28]
	ldr	w9, [x22]
	orr	w8, w9, w8
	str	w8, [x22]
	mov	x0, x21
	bl	_ata_is_data
	cbz	x0, LBB0_13
; %bb.9:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_12
; %bb.10:
	ldr	w8, [x19, #20]
	cbz	w8, LBB0_12
; %bb.11:
	ldr	w8, [x19, #16]
	cmp	w8, #0
	cset	w0, eq
	b	LBB0_13
LBB0_12:
	mov	w0, #1
LBB0_13:
	bl	_BUG_ON
	mov	x0, x21
	bl	_ata_is_dma
	cbz	x0, LBB0_16
LBB0_14:
	mov	x0, x19
	bl	_ata_sg_setup
	cbz	x0, LBB0_18
; %bb.15:
Lloh3:
	adrp	x8, _AC_ERR_SYSTEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AC_ERR_SYSTEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	b	LBB0_21
LBB0_16:
	mov	x0, x21
	bl	_ata_is_pio
	cbz	x0, LBB0_18
; %bb.17:
	ldr	w8, [x22, #4]
Lloh6:
	adrp	x9, _ATA_FLAG_PIO_DMA@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ATA_FLAG_PIO_DMA@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_14
LBB0_18:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _ATA_DFLAG_SLEEPING@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ATA_DFLAG_SLEEPING@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w0, w9, w8
	bl	_unlikely
	cbz	x0, LBB0_20
; %bb.19:
Lloh12:
	adrp	x8, _ATA_EH_RESET@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ATA_EH_RESET@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	mov	x0, x20
	ldr	w9, [x0, #8]!
	orr	w8, w9, w8
	str	w8, [x0]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ata_ehi_push_desc
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ata_link_abort
LBB0_20:
	ldr	x8, [x22, #8]
	ldr	x8, [x8, #8]
	mov	x0, x19
	blr	x8
	ldr	x8, [x22, #8]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	ldr	w8, [x19, #4]
	orr	w0, w8, w0
	str	w0, [x19, #4]
	bl	_unlikely
	cbz	x0, LBB0_22
LBB0_21:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ata_qc_complete
LBB0_22:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_QCFLAG_ACTIVE,4,2          ; @ATA_QCFLAG_ACTIVE
	.comm	_ATA_FLAG_PIO_DMA,4,2           ; @ATA_FLAG_PIO_DMA
	.comm	_ATA_DFLAG_SLEEPING,4,2         ; @ATA_DFLAG_SLEEPING
	.comm	_ATA_EH_RESET,4,2               ; @ATA_EH_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"waking up from sleep"

	.comm	_AC_ERR_SYSTEM,4,2              ; @AC_ERR_SYSTEM
.subsections_via_symbols
