	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pdc_atapi_pkt
_pdc_atapi_pkt:                         ## @pdc_atapi_pkt
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	48(%rdi), %r13
	movl	16(%r13), %r14d
	movq	40(%rdi), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%rdi), %r15
	movq	8(%r13), %rax
	movq	(%rax), %rbx
	movl	8(%rdi), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_7
## %bb.2:
	movq	_ATA_TFLAG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 12(%r12)
	je	LBB0_3
## %bb.5:
	movq	$0, (%rbx)
	jmp	LBB0_8
LBB0_6:
	movq	_PDC_PKT_NODATA@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_7:
	xorl	%eax, %eax
	callq	_BUG
	jmp	LBB0_8
LBB0_3:
	movq	_PDC_PKT_READ@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, (%rbx)
LBB0_8:
	movl	%r14d, %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%rbx)
	movq	$0, 16(%rbx)
	movq	%r13, %rdi
	callq	_sata_scr_valid
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	_PDC_DEVICE_SATA@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	leaq	16(%r12), %rax
LBB0_11:
	movq	%r15, %r14
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	(%rax), %eax
	movq	_ATA_REG_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	orl	$32, %edx
	movl	%edx, 48(%rbx)
	movl	%eax, 52(%rbx)
	movq	_PDC_PKT_CLEAR_BSY@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%ecx, %edx
	orl	$32, %edx
	movl	%edx, 56(%rbx)
	movl	%eax, 60(%rbx)
	movq	_ATA_REG_NSECT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	$32, %edx
	movl	%edx, 64(%rbx)
	movl	20(%r12), %edx
	movl	%edx, 68(%rbx)
	movq	_ATA_REG_LBAL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	$32, %edx
	movl	%edx, 72(%rbx)
	movl	24(%r12), %edx
	movl	%edx, 76(%rbx)
	cmpl	$129, 8(%r12)
	jne	LBB0_12
## %bb.13:
	movq	_PDC_FEATURE_ATAPI_DMA@GOTPCREL(%rip), %rdx
	jmp	LBB0_14
LBB0_12:
	movq	_PDC_FEATURE_ATAPI_PIO@GOTPCREL(%rip), %rdx
LBB0_14:
	movl	(%rdx), %edx
	movq	_ATA_REG_FEATURE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	$32, %esi
	movl	%esi, 80(%rbx)
	movl	%edx, 84(%rbx)
	movq	_ATA_REG_BYTEL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	$32, %edx
	movl	%edx, 88(%rbx)
	movl	28(%r12), %edx
	movl	%edx, 92(%rbx)
	movq	_ATA_REG_BYTEH@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	$32, %edx
	movl	%edx, 96(%rbx)
	movl	32(%r12), %edx
	movl	%edx, 100(%rbx)
	movq	_ATA_REG_CMD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	$32, %edx
	movl	%edx, 104(%rbx)
	movl	36(%r12), %edx
	movl	%edx, 108(%rbx)
	movq	_PDC_PKT_WAIT_DRDY@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	orl	$32, %ecx
	movl	%ecx, 112(%rbx)
	movl	%eax, 116(%rbx)
	movl	%r15d, %edi
	andl	$-31, %edi
	callq	_BUG_ON
	movl	%r15d, %eax
	andl	$14, %eax
	shll	$4, %eax
	movq	_ATA_REG_DATA@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_PDC_LAST_REG@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 120(%rbx)
	addq	$124, %rbx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memcpy                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_TFLAG_WRITE,4,2            ## @ATA_TFLAG_WRITE
	.comm	_PDC_PKT_READ,4,2               ## @PDC_PKT_READ
	.comm	_PDC_PKT_NODATA,4,2             ## @PDC_PKT_NODATA
	.comm	_PDC_DEVICE_SATA,4,2            ## @PDC_DEVICE_SATA
	.comm	_ATA_REG_DEVICE,4,2             ## @ATA_REG_DEVICE
	.comm	_PDC_PKT_CLEAR_BSY,4,2          ## @PDC_PKT_CLEAR_BSY
	.comm	_ATA_REG_NSECT,4,2              ## @ATA_REG_NSECT
	.comm	_ATA_REG_LBAL,4,2               ## @ATA_REG_LBAL
	.comm	_PDC_FEATURE_ATAPI_PIO,4,2      ## @PDC_FEATURE_ATAPI_PIO
	.comm	_PDC_FEATURE_ATAPI_DMA,4,2      ## @PDC_FEATURE_ATAPI_DMA
	.comm	_ATA_REG_FEATURE,4,2            ## @ATA_REG_FEATURE
	.comm	_ATA_REG_BYTEL,4,2              ## @ATA_REG_BYTEL
	.comm	_ATA_REG_BYTEH,4,2              ## @ATA_REG_BYTEH
	.comm	_ATA_REG_CMD,4,2                ## @ATA_REG_CMD
	.comm	_PDC_PKT_WAIT_DRDY,4,2          ## @PDC_PKT_WAIT_DRDY
	.comm	_ATA_REG_DATA,4,2               ## @ATA_REG_DATA
	.comm	_PDC_LAST_REG,4,2               ## @PDC_LAST_REG
	.no_dead_strip	_pdc_atapi_pkt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pdc_atapi_pkt
_pdc_atapi_pkt:                         ; @pdc_atapi_pkt
	.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	x21, x0
	ldp	x8, x22, [x0, #40]
	ldr	w23, [x22, #16]
	ldr	w19, [x8]
	ldr	x20, [x0]
	ldr	x8, [x22, #8]
	ldr	x24, [x8]
	ldr	w8, [x0, #8]
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_5
; %bb.2:
	ldr	w8, [x21, #12]
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_6
; %bb.3:
	str	xzr, [x24]
	b	LBB0_8
LBB0_4:
Lloh3:
	adrp	x8, _PDC_PKT_NODATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PDC_PKT_NODATA@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	bl	_BUG
	b	LBB0_8
LBB0_6:
Lloh5:
	adrp	x8, _PDC_PKT_READ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PDC_PKT_READ@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	x0, [x24]
LBB0_8:
	mov	x0, x23
	bl	_cpu_to_le32
	stp	x0, xzr, [x24, #8]
	mov	x0, x22
	bl	_sata_scr_valid
	add	x8, x21, #16
Lloh7:
	adrp	x9, _PDC_DEVICE_SATA@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PDC_DEVICE_SATA@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _ATA_REG_DEVICE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ATA_REG_DEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w10, w9, #0x20
	stp	w10, w8, [x24, #48]
Lloh12:
	adrp	x10, _PDC_PKT_CLEAR_BSY@GOTPAGE
Lloh13:
	ldr	x10, [x10, _PDC_PKT_CLEAR_BSY@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w10, w9, w10
	orr	w10, w10, #0x20
	stp	w10, w8, [x24, #56]
Lloh15:
	adrp	x10, _ATA_REG_NSECT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _ATA_REG_NSECT@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	orr	w10, w10, #0x20
	str	w10, [x24, #64]
	ldr	w10, [x21, #20]
Lloh18:
	adrp	x11, _ATA_REG_LBAL@GOTPAGE
Lloh19:
	ldr	x11, [x11, _ATA_REG_LBAL@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	orr	w11, w11, #0x20
	stp	w10, w11, [x24, #68]
	ldr	w10, [x21, #24]
	str	w10, [x24, #76]
	ldr	w10, [x21, #8]
Lloh21:
	adrp	x11, _PDC_FEATURE_ATAPI_DMA@GOTPAGE
Lloh22:
	ldr	x11, [x11, _PDC_FEATURE_ATAPI_DMA@GOTPAGEOFF]
Lloh23:
	adrp	x12, _PDC_FEATURE_ATAPI_PIO@GOTPAGE
Lloh24:
	ldr	x12, [x12, _PDC_FEATURE_ATAPI_PIO@GOTPAGEOFF]
	cmp	w10, #129
	csel	x10, x11, x12, eq
	ldr	w10, [x10]
Lloh25:
	adrp	x11, _ATA_REG_FEATURE@GOTPAGE
Lloh26:
	ldr	x11, [x11, _ATA_REG_FEATURE@GOTPAGEOFF]
Lloh27:
	ldr	w11, [x11]
	orr	w11, w11, #0x20
	stp	w11, w10, [x24, #80]
Lloh28:
	adrp	x10, _ATA_REG_BYTEL@GOTPAGE
Lloh29:
	ldr	x10, [x10, _ATA_REG_BYTEL@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	orr	w10, w10, #0x20
	str	w10, [x24, #88]
	ldr	w10, [x21, #28]
Lloh31:
	adrp	x11, _ATA_REG_BYTEH@GOTPAGE
Lloh32:
	ldr	x11, [x11, _ATA_REG_BYTEH@GOTPAGEOFF]
Lloh33:
	ldr	w11, [x11]
	orr	w11, w11, #0x20
	stp	w10, w11, [x24, #92]
	ldr	w10, [x21, #32]
Lloh34:
	adrp	x11, _ATA_REG_CMD@GOTPAGE
Lloh35:
	ldr	x11, [x11, _ATA_REG_CMD@GOTPAGEOFF]
Lloh36:
	ldr	w11, [x11]
	orr	w11, w11, #0x20
	stp	w10, w11, [x24, #100]
	ldr	w10, [x21, #36]
Lloh37:
	adrp	x11, _PDC_PKT_WAIT_DRDY@GOTPAGE
Lloh38:
	ldr	x11, [x11, _PDC_PKT_WAIT_DRDY@GOTPAGEOFF]
Lloh39:
	ldr	w11, [x11]
	orr	w9, w9, w11
	orr	w9, w9, #0x20
	stp	w10, w9, [x24, #108]
	str	w8, [x24, #116]
	and	w0, w19, #0xffffffe1
	bl	_BUG_ON
	lsl	w8, w19, #4
Lloh40:
	adrp	x9, _ATA_REG_DATA@GOTPAGE
Lloh41:
	ldr	x9, [x9, _ATA_REG_DATA@GOTPAGEOFF]
	and	w8, w8, #0xe0
Lloh42:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh43:
	adrp	x9, _PDC_LAST_REG@GOTPAGE
Lloh44:
	ldr	x9, [x9, _PDC_LAST_REG@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x24, #120]
	add	x0, x24, #124
	mov	x1, x20
	mov	x2, x19
	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	_memcpy
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_TFLAG_WRITE,4,2            ; @ATA_TFLAG_WRITE
	.comm	_PDC_PKT_READ,4,2               ; @PDC_PKT_READ
	.comm	_PDC_PKT_NODATA,4,2             ; @PDC_PKT_NODATA
	.comm	_PDC_DEVICE_SATA,4,2            ; @PDC_DEVICE_SATA
	.comm	_ATA_REG_DEVICE,4,2             ; @ATA_REG_DEVICE
	.comm	_PDC_PKT_CLEAR_BSY,4,2          ; @PDC_PKT_CLEAR_BSY
	.comm	_ATA_REG_NSECT,4,2              ; @ATA_REG_NSECT
	.comm	_ATA_REG_LBAL,4,2               ; @ATA_REG_LBAL
	.comm	_PDC_FEATURE_ATAPI_PIO,4,2      ; @PDC_FEATURE_ATAPI_PIO
	.comm	_PDC_FEATURE_ATAPI_DMA,4,2      ; @PDC_FEATURE_ATAPI_DMA
	.comm	_ATA_REG_FEATURE,4,2            ; @ATA_REG_FEATURE
	.comm	_ATA_REG_BYTEL,4,2              ; @ATA_REG_BYTEL
	.comm	_ATA_REG_BYTEH,4,2              ; @ATA_REG_BYTEH
	.comm	_ATA_REG_CMD,4,2                ; @ATA_REG_CMD
	.comm	_PDC_PKT_WAIT_DRDY,4,2          ; @PDC_PKT_WAIT_DRDY
	.comm	_ATA_REG_DATA,4,2               ; @ATA_REG_DATA
	.comm	_PDC_LAST_REG,4,2               ; @PDC_LAST_REG
	.no_dead_strip	_pdc_atapi_pkt
.subsections_via_symbols
