	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdricoh_blockio
_sdricoh_blockio:                       ## @sdricoh_blockio
	.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
	movl	%ecx, %r14d
	movq	%rdx, %r12
	movq	%rdi, %r15
	testl	%esi, %esi
	je	LBB0_13
## %bb.1:
	movq	_STATUS_READY_TO_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TRANSFER_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_sdricoh_query_status
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:
	movq	_R21C_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$24, %edx
	callq	_sdricoh_writel
	testl	%r14d, %r14d
	je	LBB0_24
## %bb.4:
	movq	_R230_DATA@GOTPCREL(%rip), %r13
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	testl	%r14d, %r14d
	je	LBB0_24
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
                                        ##     Child Loop BB0_12 Depth 2
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_sdricoh_readl
	movl	%eax, %ebx
	movl	%r14d, %edi
	movl	$4, %esi
	callq	_min
                                        ## kill: def $eax killed $eax def $rax
	subl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	leal	-1(%rax), %ecx
	testb	$3, %al
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, %edx
	andl	$3, %edx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	%bl, %edi
	movl	%edi, (%r12)
	addq	$4, %r12
	sarl	$8, %ebx
	incq	%rsi
	cmpl	%esi, %edx
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	subl	%esi, %eax
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$3, %ecx
	jb	LBB0_5
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	%bl, %ecx
	movl	%ecx, (%r12)
	movzbl	%bh, %ecx
	movl	%ecx, 4(%r12)
	movl	%ebx, %ecx
	shrl	$16, %ecx
	movzbl	%cl, %ecx
	movl	%ecx, 8(%r12)
	movl	%ebx, %ecx
	shrl	$24, %ecx
	movl	%ecx, 12(%r12)
	addq	$16, %r12
	sarl	$31, %ebx
	addl	$-4, %eax
	jne	LBB0_12
	jmp	LBB0_5
LBB0_13:
	movq	_STATUS_READY_TO_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TRANSFER_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_sdricoh_query_status
	testq	%rax, %rax
	je	LBB0_14
LBB0_2:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_25
LBB0_14:
	movq	_R21C_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$24, %edx
	callq	_sdricoh_writel
	testl	%r14d, %r14d
	je	LBB0_24
## %bb.15:
	xorl	%ebx, %ebx
	movq	_R230_DATA@GOTPCREL(%rip), %r13
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_sdricoh_writel
	testl	%r14d, %r14d
	je	LBB0_24
LBB0_16:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_19 Depth 2
                                        ##     Child Loop BB0_22 Depth 2
	movl	%r14d, %edi
	movl	$4, %esi
	callq	_min
                                        ## kill: def $eax killed $eax def $rax
	subl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_23
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	leal	-1(%rax), %ecx
	testb	$3, %al
	je	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%eax, %edx
	andl	$3, %edx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_16 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %edi
	sarl	$8, %edi
	movl	(%r12), %ebx
	shll	$24, %ebx
	orl	%edi, %ebx
	addq	$4, %r12
	incq	%rsi
	cmpl	%esi, %edx
	jne	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_16 Depth=1
	subl	%esi, %eax
LBB0_21:                                ##   in Loop: Header=BB0_16 Depth=1
	cmpl	$3, %ecx
	jb	LBB0_23
	.p2align	4, 0x90
LBB0_22:                                ##   Parent Loop BB0_16 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movsbl	(%r12), %ecx
	sarl	$16, %ebx
	shll	$16, %ecx
	orl	%ebx, %ecx
	movl	4(%r12), %edx
	movl	12(%r12), %ebx
	shll	$24, %edx
	orl	%ecx, %edx
	movsbl	8(%r12), %ecx
	sarl	$16, %edx
	shll	$16, %ecx
	shll	$24, %ebx
	orl	%ecx, %ebx
	orl	%edx, %ebx
	addq	$16, %r12
	addl	$-4, %eax
	jne	LBB0_22
	jmp	LBB0_23
LBB0_24:
	xorl	%eax, %eax
LBB0_25:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STATUS_READY_TO_READ,4,2       ## @STATUS_READY_TO_READ
	.comm	_TRANSFER_TIMEOUT,4,2           ## @TRANSFER_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_R21C_STATUS,4,2                ## @R21C_STATUS
	.comm	_R230_DATA,4,2                  ## @R230_DATA
	.comm	_STATUS_READY_TO_WRITE,4,2      ## @STATUS_READY_TO_WRITE
	.no_dead_strip	_sdricoh_blockio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdricoh_blockio
_sdricoh_blockio:                       ; @sdricoh_blockio
	.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, x3
	mov	x20, x2
	mov	x21, x0
	cbz	w1, LBB0_7
; %bb.1:
Lloh0:
	adrp	x8, _STATUS_READY_TO_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STATUS_READY_TO_READ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _TRANSFER_TIMEOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TRANSFER_TIMEOUT@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_sdricoh_query_status
	cbnz	x0, LBB0_8
; %bb.2:
Lloh6:
	adrp	x8, _R21C_STATUS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R21C_STATUS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #24
	bl	_sdricoh_writel
	cbz	w19, LBB0_16
; %bb.3:
Lloh9:
	adrp	x23, _R230_DATA@GOTPAGE
Lloh10:
	ldr	x23, [x23, _R230_DATA@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	cbz	w19, LBB0_16
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w1, [x23]
	mov	x0, x21
	bl	_sdricoh_readl
	mov	x22, x0
	mov	x0, x19
	mov	w1, #4
	bl	_min
	sub	w19, w19, w0
	cbz	w0, LBB0_4
LBB0_6:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	and	w8, w22, #0xff
	str	w8, [x20], #4
	asr	w22, w22, #8
	subs	w0, w0, #1
	b.ne	LBB0_6
	b	LBB0_4
LBB0_7:
Lloh11:
	adrp	x8, _STATUS_READY_TO_WRITE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STATUS_READY_TO_WRITE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _TRANSFER_TIMEOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TRANSFER_TIMEOUT@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_sdricoh_query_status
	cbz	x0, LBB0_9
LBB0_8:
Lloh17:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_9:
Lloh20:
	adrp	x8, _R21C_STATUS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _R21C_STATUS@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #24
	bl	_sdricoh_writel
	cbz	w19, LBB0_16
; %bb.10:
	mov	w22, #0
Lloh23:
	adrp	x23, _R230_DATA@GOTPAGE
Lloh24:
	ldr	x23, [x23, _R230_DATA@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w1, [x23]
	mov	x0, x21
	mov	x2, x22
	bl	_sdricoh_writel
	cbz	w19, LBB0_16
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	mov	x0, x19
	mov	w1, #4
	bl	_min
	sub	w19, w19, w0
	cbz	w0, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	sub	w8, w0, #1
	mov	x9, x20
LBB0_14:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w10, [x9], #4
	lsl	w10, w10, #24
	orr	w22, w10, w22, asr #8
	subs	w0, w0, #1
	b.ne	LBB0_14
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x8, x20, x8, lsl #2
	add	x20, x8, #4
	b	LBB0_11
LBB0_16:
	mov	w0, #0
LBB0_17:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_STATUS_READY_TO_READ,4,2       ; @STATUS_READY_TO_READ
	.comm	_TRANSFER_TIMEOUT,4,2           ; @TRANSFER_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_R21C_STATUS,4,2                ; @R21C_STATUS
	.comm	_R230_DATA,4,2                  ; @R230_DATA
	.comm	_STATUS_READY_TO_WRITE,4,2      ; @STATUS_READY_TO_WRITE
	.no_dead_strip	_sdricoh_blockio
.subsections_via_symbols
