	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_scsi_start_stop_xlat
_ata_scsi_start_stop_xlat:              ## @ata_scsi_start_stop_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	48(%rdi), %r14
	cmpl	$5, 8(%r14)
	jl	LBB0_13
## %bb.1:
	movq	%rdi, %rbx
	movq	(%r14), %rcx
	movq	_ATA_TFLAG_DEVICE@GOTPCREL(%rip), %rdx
	movq	_ATA_TFLAG_ISADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rdx), %eax
	orl	16(%rdi), %eax
	movl	%eax, 16(%rdi)
	movq	_ATA_PROT_NODATA@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 44(%rdi)
	movl	16(%rcx), %ecx
	testb	$-14, %cl
	je	LBB0_2
LBB0_13:
	movq	_ILLEGAL_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$36, %edx
	xorl	%ecx, %ecx
	callq	_ata_scsi_set_sense
LBB0_15:
	movl	$1, %eax
LBB0_16:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	testb	$1, %cl
	jne	LBB0_3
## %bb.7:
	movq	(%rbx), %rax
	movl	(%rax), %eax
	movq	_ATA_FLAG_NO_POWEROFF_SPINDOWN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.8:
	movq	_system_state@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_SYSTEM_POWER_OFF@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_14
LBB0_9:
	movq	_ATA_FLAG_NO_HIBERNATE_SPINDOWN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.10:
	xorl	%eax, %eax
	callq	_system_entering_hibernation
	testq	%rax, %rax
	je	LBB0_11
LBB0_14:
	movq	_SAM_STAT_GOOD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	jmp	LBB0_15
LBB0_3:
	movl	$1, 20(%rbx)
	movq	8(%rbx), %rcx
	movq	_ATA_DFLAG_LBA@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx)
	je	LBB0_4
## %bb.5:
	movq	_ATA_TFLAG_LBA@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 16(%rbx)
	movq	_ATA_LBA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 40(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_11:
	movq	_ATA_CMD_STANDBYNOW1@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_4:
	movl	$1, %eax
LBB0_6:
	movl	%eax, 32(%rbx)
	movq	$0, 24(%rbx)
	movq	_ATA_CMD_VERIFY@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_TFLAG_DEVICE,4,2           ## @ATA_TFLAG_DEVICE
	.comm	_ATA_TFLAG_ISADDR,4,2           ## @ATA_TFLAG_ISADDR
	.comm	_ATA_PROT_NODATA,4,2            ## @ATA_PROT_NODATA
	.comm	_ATA_DFLAG_LBA,4,2              ## @ATA_DFLAG_LBA
	.comm	_ATA_TFLAG_LBA,4,2              ## @ATA_TFLAG_LBA
	.comm	_ATA_LBA,4,2                    ## @ATA_LBA
	.comm	_ATA_CMD_VERIFY,4,2             ## @ATA_CMD_VERIFY
	.comm	_ATA_FLAG_NO_POWEROFF_SPINDOWN,4,2 ## @ATA_FLAG_NO_POWEROFF_SPINDOWN
	.comm	_system_state,8,3               ## @system_state
	.comm	_SYSTEM_POWER_OFF,8,3           ## @SYSTEM_POWER_OFF
	.comm	_ATA_FLAG_NO_HIBERNATE_SPINDOWN,4,2 ## @ATA_FLAG_NO_HIBERNATE_SPINDOWN
	.comm	_ATA_CMD_STANDBYNOW1,4,2        ## @ATA_CMD_STANDBYNOW1
	.comm	_ILLEGAL_REQUEST,4,2            ## @ILLEGAL_REQUEST
	.comm	_SAM_STAT_GOOD,4,2              ## @SAM_STAT_GOOD
	.no_dead_strip	_ata_scsi_start_stop_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_start_stop_xlat
_ata_scsi_start_stop_xlat:              ; @ata_scsi_start_stop_xlat
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x20, [x0, #48]
	ldr	w8, [x20, #8]
	cmp	w8, #5
	b.lt	LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _ATA_TFLAG_DEVICE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_TFLAG_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _ATA_TFLAG_ISADDR@GOTPAGE
Lloh4:
	ldr	x10, [x10, _ATA_TFLAG_ISADDR@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w10, w9
	ldr	w10, [x0, #16]
	orr	w9, w9, w10
Lloh6:
	adrp	x10, _ATA_PROT_NODATA@GOTPAGE
Lloh7:
	ldr	x10, [x10, _ATA_PROT_NODATA@GOTPAGEOFF]
	str	w9, [x0, #16]
Lloh8:
	ldr	w10, [x10]
	str	w10, [x0, #44]
	ldr	w8, [x8, #16]
	mov	w10, #242
	tst	w8, w10
	b.eq	LBB0_5
LBB0_2:
Lloh9:
	adrp	x8, _ILLEGAL_REQUEST@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ILLEGAL_REQUEST@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #36
	mov	w3, #0
	bl	_ata_scsi_set_sense
LBB0_3:
	mov	w0, #1
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	tbnz	w8, #0, LBB0_11
; %bb.6:
	ldr	x8, [x19]
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _ATA_FLAG_NO_POWEROFF_SPINDOWN@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ATA_FLAG_NO_POWEROFF_SPINDOWN@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
Lloh15:
	adrp	x9, _system_state@GOTPAGE
Lloh16:
	ldr	x9, [x9, _system_state@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
Lloh18:
	adrp	x10, _SYSTEM_POWER_OFF@GOTPAGE
Lloh19:
	ldr	x10, [x10, _SYSTEM_POWER_OFF@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_10
LBB0_8:
Lloh21:
	adrp	x9, _ATA_FLAG_NO_HIBERNATE_SPINDOWN@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ATA_FLAG_NO_HIBERNATE_SPINDOWN@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.9:
	bl	_system_entering_hibernation
	cbz	x0, LBB0_14
LBB0_10:
Lloh24:
	adrp	x8, _SAM_STAT_GOOD@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SAM_STAT_GOOD@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	str	w8, [x20, #12]
	b	LBB0_3
LBB0_11:
	mov	w8, #1
	str	w8, [x19, #20]
	ldr	x10, [x19, #8]
	ldr	w10, [x10]
Lloh27:
	adrp	x11, _ATA_DFLAG_LBA@GOTPAGE
Lloh28:
	ldr	x11, [x11, _ATA_DFLAG_LBA@GOTPAGEOFF]
Lloh29:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_13
; %bb.12:
	mov	w8, #0
Lloh30:
	adrp	x10, _ATA_TFLAG_LBA@GOTPAGE
Lloh31:
	ldr	x10, [x10, _ATA_TFLAG_LBA@GOTPAGEOFF]
Lloh32:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x19, #16]
Lloh33:
	adrp	x9, _ATA_LBA@GOTPAGE
Lloh34:
	ldr	x9, [x9, _ATA_LBA@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	ldr	w10, [x19, #40]
	orr	w9, w10, w9
	str	w9, [x19, #40]
LBB0_13:
	mov	w0, #0
	str	xzr, [x19, #24]
Lloh36:
	adrp	x9, _ATA_CMD_VERIFY@GOTPAGE
Lloh37:
	ldr	x9, [x9, _ATA_CMD_VERIFY@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	stp	w8, w9, [x19, #32]
	b	LBB0_4
LBB0_14:
	mov	w0, #0
Lloh39:
	adrp	x8, _ATA_CMD_STANDBYNOW1@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ATA_CMD_STANDBYNOW1@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	str	w8, [x19, #36]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_TFLAG_DEVICE,4,2           ; @ATA_TFLAG_DEVICE
	.comm	_ATA_TFLAG_ISADDR,4,2           ; @ATA_TFLAG_ISADDR
	.comm	_ATA_PROT_NODATA,4,2            ; @ATA_PROT_NODATA
	.comm	_ATA_DFLAG_LBA,4,2              ; @ATA_DFLAG_LBA
	.comm	_ATA_TFLAG_LBA,4,2              ; @ATA_TFLAG_LBA
	.comm	_ATA_LBA,4,2                    ; @ATA_LBA
	.comm	_ATA_CMD_VERIFY,4,2             ; @ATA_CMD_VERIFY
	.comm	_ATA_FLAG_NO_POWEROFF_SPINDOWN,4,2 ; @ATA_FLAG_NO_POWEROFF_SPINDOWN
	.comm	_system_state,8,3               ; @system_state
	.comm	_SYSTEM_POWER_OFF,8,3           ; @SYSTEM_POWER_OFF
	.comm	_ATA_FLAG_NO_HIBERNATE_SPINDOWN,4,2 ; @ATA_FLAG_NO_HIBERNATE_SPINDOWN
	.comm	_ATA_CMD_STANDBYNOW1,4,2        ; @ATA_CMD_STANDBYNOW1
	.comm	_ILLEGAL_REQUEST,4,2            ; @ILLEGAL_REQUEST
	.comm	_SAM_STAT_GOOD,4,2              ; @SAM_STAT_GOOD
	.no_dead_strip	_ata_scsi_start_stop_xlat
.subsections_via_symbols
