	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_scsi_rw_xlat
_ata_scsi_rw_xlat:                      ## @ata_scsi_rw_xlat
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	24(%rdi), %r14
	movq	(%r14), %rbx
	movl	(%rbx), %eax
	addl	$-128, %eax
	xorl	%r15d, %r15d
	cmpl	$3, %eax
	jae	LBB0_2
## %bb.1:
	movq	_ATA_TFLAG_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
LBB0_2:
	cmpl	$5, %eax
	ja	LBB0_23
## %bb.3:
	movl	$9, %ecx
	btl	%eax, %ecx
	jb	LBB0_13
## %bb.4:
	movl	$18, %ecx
	xorl	%edi, %edi
	btl	%eax, %ecx
	jae	LBB0_5
## %bb.20:
	cmpl	$16, 8(%r14)
	setl	%dil
	callq	_unlikely
	testl	%eax, %eax
	jne	LBB0_18
## %bb.21:
	leaq	-40(%rbp), %rsi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_scsi_16_lba_len
	jmp	LBB0_7
LBB0_13:
	xorl	%edi, %edi
	cmpl	$6, 8(%r14)
	setl	%dil
	callq	_unlikely
	testl	%eax, %eax
	jne	LBB0_18
## %bb.14:
	leaq	-40(%rbp), %rsi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_scsi_6_lba_len
	movl	-36(%rbp), %ecx
	testl	%ecx, %ecx
	jne	LBB0_16
## %bb.15:
	movl	$256, -36(%rbp)                 ## imm = 0x100
	movl	$256, %ecx                      ## imm = 0x100
	jmp	LBB0_16
LBB0_5:
	cmpl	$10, 8(%r14)
	setl	%dil
	callq	_unlikely
	testl	%eax, %eax
	jne	LBB0_18
## %bb.6:
	leaq	-40(%rbp), %rsi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_scsi_10_lba_len
LBB0_7:
	movl	4(%rbx), %edi
	andl	$8, %edi
	callq	_unlikely
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	_ATA_TFLAG_FUA@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
LBB0_9:
	movl	-36(%rbp), %ecx
	testl	%ecx, %ecx
	je	LBB0_10
LBB0_16:
	movq	_ATA_QCFLAG_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r12)
	movq	16(%r14), %rax
	movl	(%rax), %eax
	imull	%ecx, %eax
	movl	%eax, (%r12)
	leaq	12(%r12), %rdi
	movl	4(%r12), %r9d
	movl	8(%r12), %esi
	movl	-40(%rbp), %edx
	movl	%r15d, %r8d
	callq	_ata_build_rw_tf
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_likely
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_12
## %bb.17:
	movq	_ERANGE@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	jne	LBB0_18
## %bb.22:
	movq	_ILLEGAL_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$33, %edx
	jmp	LBB0_19
LBB0_23:
	leaq	L_.str(%rip), %rdi
	callq	_DPRINTK
LBB0_18:
	movq	_ILLEGAL_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$36, %edx
LBB0_19:
	xorl	%ecx, %ecx
	callq	_ata_scsi_set_sense
LBB0_11:
	movl	$1, %eax
LBB0_12:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_SAM_STAT_GOOD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_TFLAG_WRITE,4,2            ## @ATA_TFLAG_WRITE
	.comm	_ATA_TFLAG_FUA,4,2              ## @ATA_TFLAG_FUA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no-byte command\n"

	.comm	_ATA_QCFLAG_IO,4,2              ## @ATA_QCFLAG_IO
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_ILLEGAL_REQUEST,4,2            ## @ILLEGAL_REQUEST
	.comm	_SAM_STAT_GOOD,4,2              ## @SAM_STAT_GOOD
	.no_dead_strip	_ata_scsi_rw_xlat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_scsi_rw_xlat
_ata_scsi_rw_xlat:                      ; @ata_scsi_rw_xlat
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x19, [x0, #24]
	ldr	x22, [x19]
	ldr	w8, [x22]
	sub	w8, w8, #128
Lloh0:
	adrp	x9, _ATA_TFLAG_WRITE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_TFLAG_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, #3
	csel	w21, w9, wzr, lo
	cmp	w8, #5
	b.hi	LBB0_15
; %bb.1:
	mov	x20, x0
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #9
	tst	w8, w9
	b.ne	LBB0_5
; %bb.2:
	mov	w9, #18
	tst	w8, w9
	b.eq	LBB0_8
; %bb.3:
	ldr	w8, [x19, #8]
	cmp	w8, #16
	cset	w0, lt
	bl	_unlikely
	cbnz	w0, LBB0_18
; %bb.4:
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x22
	bl	_scsi_16_lba_len
	b	LBB0_10
LBB0_5:
	ldr	w8, [x19, #8]
	cmp	w8, #6
	cset	w0, lt
	bl	_unlikely
	cbnz	w0, LBB0_18
; %bb.6:
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x22
	bl	_scsi_6_lba_len
	ldr	w3, [sp, #8]
	cbnz	w3, LBB0_13
; %bb.7:
	mov	w3, #256
	str	w3, [sp, #8]
	b	LBB0_13
LBB0_8:
	ldr	w8, [x19, #8]
	cmp	w8, #10
	cset	w0, lt
	bl	_unlikely
	cbnz	w0, LBB0_18
; %bb.9:
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x22
	bl	_scsi_10_lba_len
LBB0_10:
	ldr	w8, [x22, #4]
	and	w0, w8, #0x8
	bl	_unlikely
	cbz	w0, LBB0_12
; %bb.11:
Lloh3:
	adrp	x8, _ATA_TFLAG_FUA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATA_TFLAG_FUA@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_12:
	ldr	w3, [sp, #8]
	cbz	w3, LBB0_22
LBB0_13:
Lloh6:
	adrp	x8, _ATA_QCFLAG_IO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATA_QCFLAG_IO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x20, #16]
	orr	w8, w9, w8
	str	w8, [x20, #16]
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	mul	w8, w8, w3
	str	w8, [x20]
	add	x0, x20, #12
	ldr	w2, [sp, #12]
	ldp	w5, w1, [x20, #4]
	mov	x4, x21
	bl	_ata_build_rw_tf
	mov	x20, x0
	cmp	w0, #0
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_16
; %bb.14:
	mov	w0, #0
	b	LBB0_21
LBB0_15:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINTK
	b	LBB0_18
LBB0_16:
Lloh11:
	adrp	x8, _ERANGE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmn	w20, w8
	b.ne	LBB0_18
; %bb.17:
Lloh14:
	adrp	x8, _ILLEGAL_REQUEST@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ILLEGAL_REQUEST@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #33
	b	LBB0_19
LBB0_18:
Lloh17:
	adrp	x8, _ILLEGAL_REQUEST@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ILLEGAL_REQUEST@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #36
LBB0_19:
	mov	w3, #0
	bl	_ata_scsi_set_sense
LBB0_20:
	mov	w0, #1
LBB0_21:
	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
	add	sp, sp, #64
	ret
LBB0_22:
Lloh20:
	adrp	x8, _SAM_STAT_GOOD@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SAM_STAT_GOOD@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_TFLAG_WRITE,4,2            ; @ATA_TFLAG_WRITE
	.comm	_ATA_TFLAG_FUA,4,2              ; @ATA_TFLAG_FUA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no-byte command\n"

	.comm	_ATA_QCFLAG_IO,4,2              ; @ATA_QCFLAG_IO
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_ILLEGAL_REQUEST,4,2            ; @ILLEGAL_REQUEST
	.comm	_SAM_STAT_GOOD,4,2              ; @SAM_STAT_GOOD
	.no_dead_strip	_ata_scsi_rw_xlat
.subsections_via_symbols
