	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sil24_qc_prep
_sil24_qc_prep:                         ## @sil24_qc_prep
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	32(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	movl	28(%rdi), %edi
	callq	_sil24_tag
	leaq	(%rax,%rax,4), %rbx
	leaq	(%r12,%rbx,8), %r15
	leaq	16(%r14), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	20(%r14), %edi
	callq	_ata_is_atapi
	testl	%eax, %eax
	je	LBB0_1
## %bb.9:
	leaq	(%r12,%rbx,8), %r13
	addq	$16, %r13
	movq	8(%r12,%rbx,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%r15), %edi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movl	(%r15), %edi
	movl	24(%r14), %esi
	movq	8(%r14), %rax
	movl	8(%rax), %edx
	callq	_memcpy
	movl	20(%r14), %edi
	callq	_ata_is_data
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	_ATA_TFLAG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	testl	%eax, (%rbx)
	je	LBB0_13
## %bb.12:
	movq	_PRB_CTRL_PACKET_WRITE@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_1:
	leaq	(%r12,%rbx,8), %r13
	addq	$8, %r13
	movq	(%r15), %r15
	movl	20(%r14), %edi
	callq	_ata_is_data
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	_PRB_CTRL_PROTOCOL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	20(%r14), %edi
	callq	_ata_is_ncq
	xorl	%edi, %edi
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_PRB_PROT_NCQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_5:
	movq	_ATA_TFLAG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	16(%r14), %eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_6
## %bb.7:
	movq	_PRB_PROT_READ@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_10:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_13:
	movq	_PRB_CTRL_PACKET_READ@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %r12d
LBB0_15:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_2:
	xorl	%r12d, %r12d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_6:
	movq	_PRB_PROT_WRITE@GOTPCREL(%rip), %rax
LBB0_8:
	orl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, 16(%r13)
LBB0_16:
	movl	%r12d, %edi
	callq	_cpu_to_le16
	movq	%rax, 8(%r13)
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	movl	(%r13), %ecx
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_ata_tf_to_fis
	movq	_ATA_QCFLAG_DMAMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_17
## %bb.18:
	movq	%r14, %rdi
	movq	%r15, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sil24_fill_sg                  ## TAILCALL
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PRB_CTRL_PROTOCOL,4,2          ## @PRB_CTRL_PROTOCOL
	.comm	_PRB_PROT_NCQ,4,2               ## @PRB_PROT_NCQ
	.comm	_ATA_TFLAG_WRITE,4,2            ## @ATA_TFLAG_WRITE
	.comm	_PRB_PROT_WRITE,4,2             ## @PRB_PROT_WRITE
	.comm	_PRB_PROT_READ,4,2              ## @PRB_PROT_READ
	.comm	_PRB_CTRL_PACKET_WRITE,4,2      ## @PRB_CTRL_PACKET_WRITE
	.comm	_PRB_CTRL_PACKET_READ,4,2       ## @PRB_CTRL_PACKET_READ
	.comm	_ATA_QCFLAG_DMAMAP,4,2          ## @ATA_QCFLAG_DMAMAP
	.no_dead_strip	_sil24_qc_prep
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sil24_qc_prep
_sil24_qc_prep:                         ; @sil24_qc_prep
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x8, [x0, #32]
	ldr	x8, [x8]
	ldr	x23, [x8]
	ldr	w0, [x0, #28]
	bl	_sil24_tag
	mov	x21, x0
	mov	w8, #40
	madd	x22, x0, x8, x23
	add	x20, x19, #16
	ldr	w0, [x19, #20]
	bl	_ata_is_atapi
	mov	w8, #40
	madd	x8, x21, x8, x23
	cbz	w0, LBB0_4
; %bb.1:
	add	x23, x8, #16
	ldr	x21, [x8, #8]
	ldr	w0, [x22]
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	ldr	w0, [x22]
	ldr	w1, [x19, #24]
	ldr	x8, [x19, #8]
	ldr	w2, [x8, #8]
	bl	_memcpy
	ldr	w0, [x19, #20]
	bl	_ata_is_data
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _ATA_TFLAG_WRITE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_TFLAG_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _PRB_CTRL_PACKET_WRITE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PRB_CTRL_PACKET_WRITE@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	add	x23, x8, #8
	ldr	x21, [x22]
	ldr	w0, [x19, #20]
	bl	_ata_is_data
	cbz	x0, LBB0_6
; %bb.5:
Lloh5:
	adrp	x8, _PRB_CTRL_PROTOCOL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PRB_CTRL_PROTOCOL@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
	ldr	w0, [x19, #20]
	bl	_ata_is_ncq
Lloh8:
	adrp	x8, _PRB_PROT_NCQ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PRB_PROT_NCQ@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	ldr	w9, [x19, #16]
Lloh11:
	adrp	x10, _ATA_TFLAG_WRITE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _ATA_TFLAG_WRITE@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
Lloh14:
	adrp	x11, _PRB_PROT_READ@GOTPAGE
Lloh15:
	ldr	x11, [x11, _PRB_PROT_READ@GOTPAGEOFF]
Lloh16:
	adrp	x12, _PRB_PROT_WRITE@GOTPAGE
Lloh17:
	ldr	x12, [x12, _PRB_PROT_WRITE@GOTPAGEOFF]
	tst	w10, w9
	csel	x9, x11, x12, eq
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_cpu_to_le16
	str	x0, [x23, #16]
	b	LBB0_9
LBB0_6:
	mov	w22, #0
	b	LBB0_9
LBB0_7:
Lloh18:
	adrp	x8, _PRB_CTRL_PACKET_READ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PRB_CTRL_PACKET_READ@GOTPAGEOFF]
LBB0_8:
	ldr	w22, [x8]
LBB0_9:
	mov	x0, x22
	bl	_cpu_to_le16
	str	x0, [x23, #8]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w1, [x8]
	ldr	w3, [x23]
	mov	x0, x20
	mov	w2, #1
	bl	_ata_tf_to_fis
	ldr	w8, [x19]
Lloh20:
	adrp	x9, _ATA_QCFLAG_DMAMAP@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ATA_QCFLAG_DMAMAP@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x19
	mov	x1, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_sil24_fill_sg
LBB0_11:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_PRB_CTRL_PROTOCOL,4,2          ; @PRB_CTRL_PROTOCOL
	.comm	_PRB_PROT_NCQ,4,2               ; @PRB_PROT_NCQ
	.comm	_ATA_TFLAG_WRITE,4,2            ; @ATA_TFLAG_WRITE
	.comm	_PRB_PROT_WRITE,4,2             ; @PRB_PROT_WRITE
	.comm	_PRB_PROT_READ,4,2              ; @PRB_PROT_READ
	.comm	_PRB_CTRL_PACKET_WRITE,4,2      ; @PRB_CTRL_PACKET_WRITE
	.comm	_PRB_CTRL_PACKET_READ,4,2       ; @PRB_CTRL_PACKET_READ
	.comm	_ATA_QCFLAG_DMAMAP,4,2          ; @ATA_QCFLAG_DMAMAP
	.no_dead_strip	_sil24_qc_prep
.subsections_via_symbols
