	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atapi_mode_sense
_atapi_mode_sense:                      ## @atapi_mode_sense
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r15
	leaq	284(%rdx), %rdi
	callq	_be16dec
	movl	264(%rbx), %eax
	movq	_ATA_SENSE_ILLEGAL_REQUEST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%r15)
	shll	$12, %ecx
	movq	_ATA_S_READY@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_ATA_S_ERROR@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	cmpl	$192, %eax
	movl	$36, %eax
	movl	$57, %edx
	cmovbl	%eax, %edx
	movl	%edx, 4(%r15)
	movl	16(%rbx), %eax
	andl	$-8, %eax
	movq	_ATA_I_CMD@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movq	_ATA_I_IN@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, 16(%rbx)
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ahci_write_fis_d2h             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_S_READY,4,2                ## @ATA_S_READY
	.comm	_ATA_S_DSC,4,2                  ## @ATA_S_DSC
	.comm	_ATA_SENSE_ILLEGAL_REQUEST,8,3  ## @ATA_SENSE_ILLEGAL_REQUEST
	.comm	_ATA_S_ERROR,4,2                ## @ATA_S_ERROR
	.comm	_ATA_I_CMD,4,2                  ## @ATA_I_CMD
	.comm	_ATA_I_IN,4,2                   ## @ATA_I_IN
	.no_dead_strip	_atapi_mode_sense
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atapi_mode_sense
_atapi_mode_sense:                      ; @atapi_mode_sense
	.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, x2
	mov	x20, x1
	mov	x21, x0
	add	x0, x2, #284
	bl	_be16dec
	ldr	w8, [x19, #264]
Lloh0:
	adrp	x9, _ATA_SENSE_ILLEGAL_REQUEST@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_SENSE_ILLEGAL_REQUEST@GOTPAGEOFF]
	mov	w10, #57
	mov	w11, #36
	cmp	w8, #192
	csel	w8, w11, w10, lo
Lloh2:
	adrp	x10, _ATA_S_READY@GOTPAGE
Lloh3:
	ldr	x10, [x10, _ATA_S_READY@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	str	w9, [x21]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w10, w9, lsl #12
Lloh6:
	adrp	x10, _ATA_S_ERROR@GOTPAGE
Lloh7:
	ldr	x10, [x10, _ATA_S_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w3, w9, w10
	str	w8, [x21, #4]
	ldr	w8, [x19, #16]
Lloh9:
	adrp	x9, _ATA_I_CMD@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ATA_I_CMD@GOTPAGEOFF]
	and	w8, w8, #0xfffffff8
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _ATA_I_IN@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ATA_I_IN@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #16]
	mov	x0, x21
	mov	x1, x20
	mov	x2, 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	_ahci_write_fis_d2h
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_S_READY,4,2                ; @ATA_S_READY
	.comm	_ATA_S_DSC,4,2                  ; @ATA_S_DSC
	.comm	_ATA_SENSE_ILLEGAL_REQUEST,8,3  ; @ATA_SENSE_ILLEGAL_REQUEST
	.comm	_ATA_S_ERROR,4,2                ; @ATA_S_ERROR
	.comm	_ATA_I_CMD,4,2                  ; @ATA_I_CMD
	.comm	_ATA_I_IN,4,2                   ; @ATA_I_IN
	.no_dead_strip	_atapi_mode_sense
.subsections_via_symbols
