	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_scsi_qc_complete
_ata_scsi_qc_complete:                  ## @ata_scsi_qc_complete
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	32(%rdi), %r15
	movq	(%rdi), %r12
	movq	24(%rdi), %r14
	movq	(%r14), %rax
	movl	(%rax), %ecx
	movq	_ATA_16@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_2
## %bb.1:
	movq	_ATA_12@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_4
LBB0_2:
	testb	$32, 8(%rax)
	jne	LBB0_7
## %bb.3:
	testq	%r12, %r12
	jne	LBB0_7
LBB0_4:
	testq	%r12, %r12
	je	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	callq	_ata_gen_ata_sense
	jmp	LBB0_8
LBB0_5:
	movq	_SAM_STAT_GOOD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	jmp	LBB0_10
LBB0_7:
	movq	%rbx, %rdi
	callq	_ata_gen_passthru_sense
	testq	%r12, %r12
	je	LBB0_10
LBB0_8:
	movq	8(%r15), %rax
	cmpl	$0, (%rax)
	jne	LBB0_10
## %bb.9:
	movl	(%r15), %edi
	leaq	16(%rbx), %rsi
	callq	_ata_dump_status
LBB0_10:
	movq	%r14, %rdi
	callq	*8(%rbx)
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ata_qc_free                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_16,4,2                     ## @ATA_16
	.comm	_ATA_12,4,2                     ## @ATA_12
	.comm	_SAM_STAT_GOOD,4,2              ## @SAM_STAT_GOOD
	.no_dead_strip	_ata_scsi_qc_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_scsi_qc_complete
_ata_scsi_qc_complete:                  ; @ata_scsi_qc_complete
	.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	x19, x0
	ldp	x20, x21, [x0, #24]
	ldr	x8, [x20]
	ldr	x22, [x0]
	ldr	w9, [x8]
Lloh0:
	adrp	x10, _ATA_16@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ATA_16@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
Lloh3:
	adrp	x11, _ATA_12@GOTPAGE
Lloh4:
	ldr	x11, [x11, _ATA_12@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	cmp	w9, w10
	ccmp	w9, w11, #4, ne
	b.ne	LBB0_3
; %bb.1:
	ldrb	w8, [x8, #8]
	tbnz	w8, #5, LBB0_6
; %bb.2:
	cbnz	x22, LBB0_6
LBB0_3:
	cbz	x22, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_ata_gen_ata_sense
	b	LBB0_7
LBB0_5:
Lloh6:
	adrp	x8, _SAM_STAT_GOOD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SAM_STAT_GOOD@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	b	LBB0_9
LBB0_6:
	mov	x0, x19
	bl	_ata_gen_passthru_sense
	cbz	x22, LBB0_9
LBB0_7:
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	cbnz	w8, LBB0_9
; %bb.8:
	ldr	w0, [x21]
	add	x1, x19, #16
	bl	_ata_dump_status
LBB0_9:
	ldr	x8, [x19, #8]
	mov	x0, x20
	blr	x8
	mov	x0, x19
	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
	b	_ata_qc_free
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_16,4,2                     ; @ATA_16
	.comm	_ATA_12,4,2                     ; @ATA_12
	.comm	_SAM_STAT_GOOD,4,2              ; @SAM_STAT_GOOD
	.no_dead_strip	_ata_scsi_qc_complete
.subsections_via_symbols
