	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pdc_pkt_header
_pdc_pkt_header:                        ## @pdc_pkt_header
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %r14
	movl	(%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, 4(%r14)
	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	%r12d, %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%rbx)
	movq	$0, 16(%rbx)
	movq	_ATA_DEVICE_OBS@GOTPCREL(%rip), %rax
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.9:
	movq	_ATA_DEV1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
LBB0_10:
	orl	(%rax), %r15d
	movq	_PDC_PKT_CLEAR_BSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ATA_REG_DEVICE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	orl	$32, %eax
	movl	%eax, 48(%rbx)
	movl	%r15d, 52(%rbx)
	movq	_PDC_REG_DEVCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	$32, %eax
	movl	%eax, 56(%rbx)
	movl	8(%r14), %eax
	movl	%eax, 60(%rbx)
	movl	$16, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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	_ATA_DEVICE_OBS,4,2             ## @ATA_DEVICE_OBS
	.comm	_ATA_DEV1,4,2                   ## @ATA_DEV1
	.comm	_PDC_PKT_CLEAR_BSY,4,2          ## @PDC_PKT_CLEAR_BSY
	.comm	_ATA_REG_DEVICE,4,2             ## @ATA_REG_DEVICE
	.comm	_PDC_REG_DEVCTL,4,2             ## @PDC_REG_DEVCTL
	.no_dead_strip	_pdc_pkt_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pdc_pkt_header
_pdc_pkt_header:                        ; @pdc_pkt_header
	.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, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_5
; %bb.2:
	ldr	w8, [x20, #4]
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, [x19]
	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, [x19]
LBB0_8:
	mov	x0, x22
	bl	_cpu_to_le32
	stp	x0, xzr, [x19, #8]
Lloh7:
	adrp	x8, _ATA_DEVICE_OBS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ATA_DEVICE_OBS@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _ATA_DEV1@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ATA_DEV1@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	w21, #0
	csel	w9, wzr, w9, eq
	orr	w8, w9, w8
Lloh13:
	adrp	x9, _PDC_PKT_CLEAR_BSY@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PDC_PKT_CLEAR_BSY@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _ATA_REG_DEVICE@GOTPAGE
Lloh17:
	ldr	x10, [x10, _ATA_REG_DEVICE@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	orr	w9, w9, w10
	orr	w9, w9, #0x20
	stp	w9, w8, [x19, #48]
Lloh19:
	adrp	x8, _PDC_REG_DEVCTL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PDC_REG_DEVCTL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	orr	w8, w8, #0x20
	str	w8, [x19, #56]
	ldr	w8, [x20, #8]
	str	w8, [x19, #60]
	mov	w0, #16
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.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	_ATA_DEVICE_OBS,4,2             ; @ATA_DEVICE_OBS
	.comm	_ATA_DEV1,4,2                   ; @ATA_DEV1
	.comm	_PDC_PKT_CLEAR_BSY,4,2          ; @PDC_PKT_CLEAR_BSY
	.comm	_ATA_REG_DEVICE,4,2             ; @ATA_REG_DEVICE
	.comm	_PDC_REG_DEVCTL,4,2             ; @PDC_REG_DEVCTL
	.no_dead_strip	_pdc_pkt_header
.subsections_via_symbols
