	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atapi_pio_bytes
_atapi_pio_bytes:                       ## @atapi_pio_bytes
	.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, %rbx
	movq	32(%rdi), %r14
	movq	24(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	16(%rdi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_ATA_TFLAG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	8(%r14), %rax
	leaq	4(%rdi), %rsi
	movq	%r14, %rdi
	callq	*(%rax)
	movl	4(%rbx), %r13d
	movl	12(%rbx), %r15d
	shll	$8, %r15d
	orl	8(%rbx), %r15d
	movl	%r13d, %edi
	andl	$1, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	xorl	%edi, %edi
	testl	%r12d, -44(%rbp)                ## 4-byte Folded Reload
	sete	%dil
	movl	%r13d, %eax
	shrl	%eax
	andl	$1, %eax
	xorl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	xorl	%edi, %edi
	testl	%r15d, %r15d
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %edx
	movl	%r15d, %ecx
	callq	_ata_ehi_push_desc
LBB0_6:
	movq	_AC_ERR_HSM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	movq	_HSM_ST_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	4(%r14), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %edx
	callq	_VPRINTK
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	___atapi_pio_bytes
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ata_sff_sync                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_TFLAG_WRITE,4,2            ## @ATA_TFLAG_WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ata%u: xfering %d bytes\n"

L_.str.1:                               ## @.str.1
	.asciz	"ATAPI check failed (ireason=0x%x bytes=%u)"

	.comm	_AC_ERR_HSM,4,2                 ## @AC_ERR_HSM
	.comm	_HSM_ST_ERR,4,2                 ## @HSM_ST_ERR
	.no_dead_strip	_atapi_pio_bytes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atapi_pio_bytes
_atapi_pio_bytes:                       ; @atapi_pio_bytes
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	ldp	x8, x19, [x0, #24]
	ldr	x21, [x8]
	ldr	w24, [x0, #16]
Lloh0:
	adrp	x8, _ATA_TFLAG_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATA_TFLAG_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	add	x1, x0, #4
	mov	x0, x19
	blr	x8
	ldp	w23, w8, [x20, #4]
	ldr	w9, [x20, #12]
	orr	w22, w8, w9, lsl #8
	and	w0, w23, #0x1
	bl	_unlikely
	cbnz	x0, LBB0_3
; %bb.1:
	tst	w25, w24
	cset	w8, eq
	ubfx	w9, w23, #1, #1
	eor	w0, w9, w8
	bl	_unlikely
	cbnz	x0, LBB0_3
; %bb.2:
	cmp	w22, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_5
LBB0_3:
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x23
	mov	x3, x22
	bl	_ata_ehi_push_desc
LBB0_4:
Lloh5:
	adrp	x8, _AC_ERR_HSM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AC_ERR_HSM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
Lloh8:
	adrp	x8, _HSM_ST_ERR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HSM_ST_ERR@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w1, [x19, #4]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x22
	bl	_VPRINTK
	mov	x0, x20
	mov	x1, x22
	bl	___atapi_pio_bytes
	bl	_unlikely
	cbnz	x0, LBB0_4
; %bb.6:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ata_sff_sync
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_TFLAG_WRITE,4,2            ; @ATA_TFLAG_WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ata%u: xfering %d bytes\n"

l_.str.1:                               ; @.str.1
	.asciz	"ATAPI check failed (ireason=0x%x bytes=%u)"

	.comm	_AC_ERR_HSM,4,2                 ; @AC_ERR_HSM
	.comm	_HSM_ST_ERR,4,2                 ; @HSM_ST_ERR
	.no_dead_strip	_atapi_pio_bytes
.subsections_via_symbols
