	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AT91F_MCI_ReadBlock            ## -- Begin function AT91F_MCI_ReadBlock
	.p2align	4, 0x90
_AT91F_MCI_ReadBlock:                   ## @AT91F_MCI_ReadBlock
	.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, %r12d
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	_AT91C_MCI_IDLE@GOTPCREL(%rip), %rcx
	movq	_AT91C_READ_ERROR@GOTPCREL(%rip), %r13
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.1:
	movq	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movl	12(%rax), %esi
	callq	_AT91F_MCI_GetStatus
	movq	_AT91C_SR_READY_FOR_DATA@GOTPCREL(%rip), %rcx
	notl	%eax
	testl	%eax, (%rcx)
	jne	LBB0_9
## %bb.2:
	leal	(%r12,%r14), %eax
	movq	8(%rbx), %rsi
	cmpl	(%rsi), %eax
	jg	LBB0_9
## %bb.3:
	movl	4(%rsi), %ecx
	movl	%r14d, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	LBB0_4
LBB0_9:
	movl	(%r13), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpl	%r12d, %ecx
	jle	LBB0_6
## %bb.5:
	cmpl	$0, 8(%rsi)
	jne	LBB0_7
	jmp	LBB0_9
LBB0_6:
	jl	LBB0_9
LBB0_7:
	shll	$16, %ecx
	movq	_AT91C_MCI_PDCMODE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_AT91C_BASE_MCI@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	orl	%ecx, (%rax)
	movl	%r12d, %eax
	andl	$3, %eax
	leal	3(%r12), %ecx
	testl	%r12d, %r12d
	cmovnsl	%r12d, %ecx
	sarl	$2, %ecx
	cmpl	$1, %eax
	sbbl	$-1, %ecx
	movq	_AT91C_PDC_TXTDIS@GOTPCREL(%rip), %rax
	movq	_AT91C_PDC_RXTDIS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rax), %edx
	movq	_AT91C_BASE_PDC_MCI@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	%edx, (%rax)
	movl	%r15d, 4(%rax)
	movl	%ecx, 8(%rax)
	movq	_AT91C_READ_SINGLE_BLOCK_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_AT91F_MCI_SendCommand
	movq	_AT91C_CMD_SEND_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	_AT91C_MCI_RX_SINGLE_BLOCK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	_AT91C_MCI_RXBUFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_AT91C_BASE_MCI@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, 4(%rcx)
	movq	_AT91C_PDC_RXTEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r12), %rcx
	movl	%eax, (%rcx)
	movq	_AT91C_READ_OK@GOTPCREL(%rip), %r13
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_AT91C_MCI_IDLE,8,3             ## @AT91C_MCI_IDLE
	.comm	_AT91C_READ_ERROR,4,2           ## @AT91C_READ_ERROR
	.comm	_AT91C_SR_READY_FOR_DATA,4,2    ## @AT91C_SR_READY_FOR_DATA
	.comm	_AT91C_MCI_PDCMODE,4,2          ## @AT91C_MCI_PDCMODE
	.comm	_AT91C_BASE_MCI,8,3             ## @AT91C_BASE_MCI
	.comm	_AT91C_PDC_TXTDIS,4,2           ## @AT91C_PDC_TXTDIS
	.comm	_AT91C_PDC_RXTDIS,4,2           ## @AT91C_PDC_RXTDIS
	.comm	_AT91C_BASE_PDC_MCI,8,3         ## @AT91C_BASE_PDC_MCI
	.comm	_AT91C_READ_SINGLE_BLOCK_CMD,4,2 ## @AT91C_READ_SINGLE_BLOCK_CMD
	.comm	_AT91C_CMD_SEND_OK,8,3          ## @AT91C_CMD_SEND_OK
	.comm	_AT91C_MCI_RX_SINGLE_BLOCK,8,3  ## @AT91C_MCI_RX_SINGLE_BLOCK
	.comm	_AT91C_MCI_RXBUFF,4,2           ## @AT91C_MCI_RXBUFF
	.comm	_AT91C_PDC_RXTEN,4,2            ## @AT91C_PDC_RXTEN
	.comm	_AT91C_READ_OK,4,2              ## @AT91C_READ_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AT91F_MCI_ReadBlock            ; -- Begin function AT91F_MCI_ReadBlock
	.p2align	2
_AT91F_MCI_ReadBlock:                   ; @AT91F_MCI_ReadBlock
	.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
	ldr	x8, [x0]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _AT91C_MCI_IDLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AT91C_MCI_IDLE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	w1, [x8, #12]
	bl	_AT91F_MCI_GetStatus
Lloh3:
	adrp	x8, _AT91C_SR_READY_FOR_DATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AT91C_SR_READY_FOR_DATA@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	bics	wzr, w8, w0
	b.ne	LBB0_4
; %bb.2:
	ldr	x9, [x19, #8]
	ldr	w8, [x9]
	add	w10, w22, w20
	cmp	w10, w8
	b.gt	LBB0_4
; %bb.3:
	ldr	w8, [x9, #4]
	sdiv	w10, w20, w8
	msub	w10, w10, w8, w20
	cbz	w10, LBB0_6
LBB0_4:
Lloh6:
	adrp	x8, _AT91C_READ_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AT91C_READ_ERROR@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	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
LBB0_6:
	cmp	w8, w22
	b.le	LBB0_8
; %bb.7:
	ldr	w9, [x9, #8]
	cbnz	w9, LBB0_9
	b	LBB0_4
LBB0_8:
	b.lt	LBB0_4
LBB0_9:
Lloh8:
	adrp	x9, _AT91C_MCI_PDCMODE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AT91C_MCI_PDCMODE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8, lsl #16
Lloh11:
	adrp	x23, _AT91C_BASE_MCI@GOTPAGE
Lloh12:
	ldr	x23, [x23, _AT91C_BASE_MCI@GOTPAGEOFF]
	ldr	x9, [x23]
	ldr	w10, [x9]
	orr	w8, w8, w10
	str	w8, [x9]
	add	w8, w22, #3
	cmp	w22, #0
	csel	w8, w8, w22, lt
	tst	w22, #0x3
	asr	w8, w8, #2
	cinc	w8, w8, ne
Lloh13:
	adrp	x9, _AT91C_PDC_TXTDIS@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AT91C_PDC_TXTDIS@GOTPAGEOFF]
Lloh15:
	adrp	x10, _AT91C_PDC_RXTDIS@GOTPAGE
Lloh16:
	ldr	x10, [x10, _AT91C_PDC_RXTDIS@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh19:
	adrp	x22, _AT91C_BASE_PDC_MCI@GOTPAGE
Lloh20:
	ldr	x22, [x22, _AT91C_BASE_PDC_MCI@GOTPAGEOFF]
	ldr	x10, [x22]
	stp	w9, w21, [x10]
	str	w8, [x10, #8]
Lloh21:
	adrp	x8, _AT91C_READ_SINGLE_BLOCK_CMD@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AT91C_READ_SINGLE_BLOCK_CMD@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_AT91F_MCI_SendCommand
Lloh24:
	adrp	x8, _AT91C_CMD_SEND_OK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AT91C_CMD_SEND_OK@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.10:
Lloh27:
	adrp	x8, _AT91C_MCI_RX_SINGLE_BLOCK@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AT91C_MCI_RX_SINGLE_BLOCK@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	ldr	x9, [x19]
	str	x8, [x9]
Lloh30:
	adrp	x8, _AT91C_MCI_RXBUFF@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AT91C_MCI_RXBUFF@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	ldr	x9, [x23]
Lloh33:
	adrp	x10, _AT91C_PDC_RXTEN@GOTPAGE
Lloh34:
	ldr	x10, [x10, _AT91C_PDC_RXTEN@GOTPAGEOFF]
	str	w8, [x9, #4]
Lloh35:
	ldr	w8, [x10]
	ldr	x9, [x22]
	str	w8, [x9]
Lloh36:
	adrp	x8, _AT91C_READ_OK@GOTPAGE
Lloh37:
	ldr	x8, [x8, _AT91C_READ_OK@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_AT91C_MCI_IDLE,8,3             ; @AT91C_MCI_IDLE
	.comm	_AT91C_READ_ERROR,4,2           ; @AT91C_READ_ERROR
	.comm	_AT91C_SR_READY_FOR_DATA,4,2    ; @AT91C_SR_READY_FOR_DATA
	.comm	_AT91C_MCI_PDCMODE,4,2          ; @AT91C_MCI_PDCMODE
	.comm	_AT91C_BASE_MCI,8,3             ; @AT91C_BASE_MCI
	.comm	_AT91C_PDC_TXTDIS,4,2           ; @AT91C_PDC_TXTDIS
	.comm	_AT91C_PDC_RXTDIS,4,2           ; @AT91C_PDC_RXTDIS
	.comm	_AT91C_BASE_PDC_MCI,8,3         ; @AT91C_BASE_PDC_MCI
	.comm	_AT91C_READ_SINGLE_BLOCK_CMD,4,2 ; @AT91C_READ_SINGLE_BLOCK_CMD
	.comm	_AT91C_CMD_SEND_OK,8,3          ; @AT91C_CMD_SEND_OK
	.comm	_AT91C_MCI_RX_SINGLE_BLOCK,8,3  ; @AT91C_MCI_RX_SINGLE_BLOCK
	.comm	_AT91C_MCI_RXBUFF,4,2           ; @AT91C_MCI_RXBUFF
	.comm	_AT91C_PDC_RXTEN,4,2            ; @AT91C_PDC_RXTEN
	.comm	_AT91C_READ_OK,4,2              ; @AT91C_READ_OK
.subsections_via_symbols
