	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alcor_trf_block_pio
_alcor_trf_block_pio:                   ## @alcor_trf_block_pio
	.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
	cmpl	$0, 24(%rdi)
	je	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, 40(%rdi)
	je	LBB0_2
## %bb.10:
	movl	28(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_2:
	movl	%esi, %r14d
	movq	48(%rbx), %r13
	movq	32(%rbx), %rax
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	testl	%ecx, (%rax)
	setne	%dl
	cmpl	%esi, %edx
	je	LBB0_4
## %bb.3:
	movl	28(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_4:
	movq	%rbx, %rdi
	callq	_sg_miter_next
	testl	%eax, %eax
	je	LBB0_9
## %bb.5:
	movq	32(%rbx), %rax
	movq	8(%rax), %r12
	movl	16(%rbx), %edi
	movq	%r12, %rsi
	callq	_min
	movq	%rax, %r15
	movl	28(%rbx), %edi
	testl	%r14d, %r14d
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.3(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rcx
	callq	_dev_dbg
	movq	%r15, (%rbx)
	decl	24(%rbx)
	movq	_AU6601_REG_BUFFER@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r13), %rdi
	shrq	$2, %r15
	movq	8(%rbx), %rsi
	movq	%r15, %rdx
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.6:
	callq	_ioread32_rep
	jmp	LBB0_8
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	_iowrite32_rep
LBB0_8:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sg_miter_stop                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"configured DMA but got PIO request.\n"

	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
L_.str.1:                               ## @.str.1
	.asciz	"got unexpected direction %i != %i\n"

L_.str.2:                               ## @.str.2
	.asciz	"PIO, %s block size: 0x%zx\n"

L_.str.3:                               ## @.str.3
	.asciz	"read"

L_.str.4:                               ## @.str.4
	.asciz	"write"

	.comm	_AU6601_REG_BUFFER,8,3          ## @AU6601_REG_BUFFER
	.no_dead_strip	_alcor_trf_block_pio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alcor_trf_block_pio
_alcor_trf_block_pio:                   ; @alcor_trf_block_pio
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	w0, [x19, #28]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	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
	add	sp, sp, #80
	b	_dev_err
LBB0_3:
	mov	x20, x1
	ldr	x23, [x19, #48]
	ldr	x8, [x19, #32]
	ldr	w8, [x8]
Lloh2:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	cmp	w8, w1
	b.eq	LBB0_5
; %bb.4:
	ldr	w0, [x19, #28]
	stp	x8, x20, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_5:
	mov	x0, x19
	bl	_sg_miter_next
	cbz	w0, LBB0_8
; %bb.6:
	ldr	x8, [x19, #32]
	ldr	x21, [x8, #8]
	ldr	w0, [x19, #16]
	mov	x1, x21
	bl	_min
	mov	x22, x0
	ldr	w0, [x19, #28]
Lloh7:
	adrp	x8, l_.str.3@PAGE
Lloh8:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh9:
	adrp	x9, l_.str.4@PAGE
Lloh10:
	add	x9, x9, l_.str.4@PAGEOFF
	cmp	w20, #0
	csel	x2, x9, x8, eq
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x3, x21
	bl	_dev_dbg
	str	x22, [x19]
	ldr	w8, [x19, #24]
	sub	w8, w8, #1
	str	w8, [x19, #24]
	ldr	x1, [x19, #8]
	ldr	x8, [x23]
Lloh13:
	adrp	x9, _AU6601_REG_BUFFER@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AU6601_REG_BUFFER@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	add	x0, x9, x8
	lsr	x2, x22, #2
	cbz	w20, LBB0_9
; %bb.7:
	bl	_ioread32_rep
	b	LBB0_10
LBB0_8:
	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
	add	sp, sp, #80
	ret
LBB0_9:
	bl	_iowrite32_rep
LBB0_10:
	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
	add	sp, sp, #80
	b	_sg_miter_stop
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"configured DMA but got PIO request.\n"

	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
l_.str.1:                               ; @.str.1
	.asciz	"got unexpected direction %i != %i\n"

l_.str.2:                               ; @.str.2
	.asciz	"PIO, %s block size: 0x%zx\n"

l_.str.3:                               ; @.str.3
	.asciz	"read"

l_.str.4:                               ; @.str.4
	.asciz	"write"

	.comm	_AU6601_REG_BUFFER,8,3          ; @AU6601_REG_BUFFER
	.no_dead_strip	_alcor_trf_block_pio
.subsections_via_symbols
