	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __ata_scsi_queuecmd
___ata_scsi_queuecmd:                   ## @__ata_scsi_queuecmd
	.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	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r12
	movq	(%rdx), %rcx
	movq	_ATA_DEV_ATA@GOTPCREL(%rip), %rdx
	movl	8(%rdi), %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.1:
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	xorl	%edi, %edi
	cmpl	8(%r15), %eax
	setg	%dil
	jmp	LBB0_11
LBB0_4:
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_15
## %bb.5:
	movq	_ATA_16@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	setne	%al
	movq	_atapi_passthru16@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	%r12, %rdi
	callq	_COMMAND_SIZE
	movl	$1, %edi
	cmpl	8(%rbx), %eax
	jg	LBB0_8
## %bb.7:
	xorl	%edi, %edi
	cmpl	8(%r15), %eax
	setg	%dil
LBB0_8:
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_15
## %bb.9:
	movq	_atapi_xlat@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_13
LBB0_2:
	movl	$1, %edi
	jmp	LBB0_11
LBB0_10:
	xorl	%edi, %edi
	cmpl	$17, 8(%rbx)
	setge	%dil
LBB0_11:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_12
LBB0_15:
	movl	8(%rbx), %esi
	movl	8(%r15), %ecx
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rdx
	callq	_DPRINTK
	movq	_DID_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$16, %eax
	movl	%eax, 12(%rbx)
	movq	%rbx, %rdi
	callq	*%r14
LBB0_16:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ata_get_xlat_func
LBB0_13:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	testq	%rax, %rax
	je	LBB0_14
## %bb.17:
	movq	%rax, %rcx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ata_scsi_translate             ## TAILCALL
LBB0_14:
	callq	_ata_scsi_simulate
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_DEV_ATA,8,3                ## @ATA_DEV_ATA
	.comm	_ATA_16,8,3                     ## @ATA_16
	.comm	_atapi_passthru16,4,2           ## @atapi_passthru16
	.comm	_atapi_xlat,8,3                 ## @atapi_xlat
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad CDB len=%u, scsi_op=0x%02x, max=%u\n"

	.comm	_DID_ERROR,4,2                  ## @DID_ERROR
	.no_dead_strip	___ata_scsi_queuecmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __ata_scsi_queuecmd
___ata_scsi_queuecmd:                   ; @__ata_scsi_queuecmd
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x22, [x8]
	ldr	x9, [x2]
Lloh0:
	adrp	x8, _ATA_DEV_ATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATA_DEV_ATA@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x8]
	ldr	w8, [x0, #8]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.1:
	cbz	w8, LBB0_8
; %bb.2:
	ldr	w9, [x21, #8]
	cmp	w8, w9
LBB0_3:
	cset	w0, gt
	bl	_unlikely
	cbnz	x0, LBB0_15
	b	LBB0_9
LBB0_4:
	cmp	w8, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_15
; %bb.5:
Lloh3:
	adrp	x8, _ATA_16@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATA_16@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x22, x8
Lloh6:
	adrp	x8, _atapi_passthru16@GOTPAGE
Lloh7:
	ldr	x8, [x8, _atapi_passthru16@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ccmp	w8, #0, #4, eq
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_13
; %bb.6:
	mov	x0, x22
	bl	_COMMAND_SIZE
	ldr	w8, [x20, #8]
	cmp	w0, w8
	b.le	LBB0_14
; %bb.7:
	mov	w0, #1
	bl	_unlikely
	cbnz	x0, LBB0_15
	b	LBB0_17
LBB0_8:
	mov	w0, #1
	bl	_unlikely
	cbnz	x0, LBB0_15
LBB0_9:
	mov	x0, x21
	mov	x1, x22
	bl	_ata_get_xlat_func
	mov	x3, x0
LBB0_10:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	cbz	x3, LBB0_12
; %bb.11:
	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_scsi_translate
LBB0_12:
	bl	_ata_scsi_simulate
	b	LBB0_16
LBB0_13:
	ldr	w8, [x20, #8]
	cmp	w8, #16
	b	LBB0_3
LBB0_14:
	ldr	w8, [x21, #8]
	cmp	w0, w8
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_17
LBB0_15:
	ldr	w1, [x20, #8]
	ldr	w3, [x21, #8]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x22
	bl	_DPRINTK
Lloh11:
	adrp	x8, _DID_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DID_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	lsl	w8, w8, #16
	str	w8, [x20, #12]
	mov	x0, x20
	blr	x19
LBB0_16:
	mov	w0, #0
	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
LBB0_17:
Lloh14:
	adrp	x8, _atapi_xlat@GOTPAGE
Lloh15:
	ldr	x8, [x8, _atapi_xlat@GOTPAGEOFF]
Lloh16:
	ldr	x3, [x8]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_DEV_ATA,8,3                ; @ATA_DEV_ATA
	.comm	_ATA_16,8,3                     ; @ATA_16
	.comm	_atapi_passthru16,4,2           ; @atapi_passthru16
	.comm	_atapi_xlat,8,3                 ; @atapi_xlat
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad CDB len=%u, scsi_op=0x%02x, max=%u\n"

	.comm	_DID_ERROR,4,2                  ; @DID_ERROR
	.no_dead_strip	___ata_scsi_queuecmd
.subsections_via_symbols
