	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r852_read_buf
_r852_read_buf:                         ## @r852_read_buf
	.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	%edx, %r15d
	movq	%rsi, %r13
	callq	_nand_to_mtd
	movl	%eax, %edi
	callq	_r852_get_dev
	cmpq	$0, 8(%rax)
	je	LBB0_1
## %bb.10:
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memset                         ## TAILCALL
LBB0_1:
	movq	%rax, %r14
	movq	_R852_DMA_LEN@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_3
## %bb.2:
	cmpq	$0, (%r14)
	je	LBB0_3
## %bb.11:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	$1, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_r852_do_dma                    ## TAILCALL
LBB0_3:
	cmpl	$4, %r15d
	jl	LBB0_6
## %bb.4:
	movq	_R852_DATALINE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %ebx
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_r852_read_reg_dword
	movzbl	%al, %ecx
	movl	%ecx, (%r13)
	movzbl	%ah, %ecx
	movl	%ecx, 4(%r13)
	movl	%eax, %ecx
	shrl	$16, %ecx
	movzbl	%cl, %ecx
	movl	%ecx, 8(%r13)
	shrl	$24, %eax
	movl	%eax, 12(%r13)
	addq	$16, %r13
	leal	-4(%rbx), %r15d
	cmpl	$7, %ebx
	ja	LBB0_5
LBB0_6:
	testl	%r15d, %r15d
	je	LBB0_9
## %bb.7:
	movl	%r15d, %r15d
	xorl	%ebx, %ebx
	movq	_R852_DATALINE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_r852_read_reg
	movl	%eax, (%r13,%rbx,4)
	incq	%rbx
	cmpl	%ebx, %r15d
	jne	LBB0_8
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R852_DMA_LEN,4,2               ## @R852_DMA_LEN
	.comm	_R852_DATALINE,4,2              ## @R852_DATALINE
	.no_dead_strip	_r852_read_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function r852_read_buf
lCPI0_0:
	.long	4294967288                      ; 0xfffffff8
	.long	4294967280                      ; 0xfffffff0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_r852_read_buf:                         ; @r852_read_buf
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [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 b8, -72
	.cfi_offset b9, -80
	mov	x21, x2
	mov	x19, x1
	bl	_nand_to_mtd
	bl	_r852_get_dev
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	mov	x2, x21
	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	d9, d8, [sp], #80               ; 16-byte Folded Reload
	b	_memset
LBB0_2:
	mov	x20, x0
Lloh0:
	adrp	x8, _R852_DMA_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R852_DMA_LEN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x20]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #1
	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	d9, d8, [sp], #80               ; 16-byte Folded Reload
	b	_r852_do_dma
LBB0_5:
	cmp	w21, #4
	b.lt	LBB0_9
; %bb.6:
Lloh3:
	adrp	x22, _R852_DATALINE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _R852_DATALINE@GOTPAGEOFF]
Lloh5:
	adrp	x8, lCPI0_0@PAGE
Lloh6:
	ldr	d8, [x8, lCPI0_0@PAGEOFF]
	movi	d9, #0x0000ff000000ff
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x23, x21
	ldr	w1, [x22]
	mov	x0, x20
	bl	_r852_read_reg_dword
	and	w8, w0, #0xff
	str	w8, [x19]
	dup.2s	v0, w0
	ushl.2s	v0, v0, v8
	and.8b	v0, v0, v9
	stur	d0, [x19, #4]
	lsr	w9, w0, #24
	add	x8, x19, #16
	str	w9, [x19, #12]
	sub	w21, w21, #4
	mov	x19, x8
	cmp	w23, #7
	b.hi	LBB0_7
; %bb.8:
	mov	x19, x8
LBB0_9:
	cbz	w21, LBB0_12
; %bb.10:
Lloh7:
	adrp	x22, _R852_DATALINE@GOTPAGE
Lloh8:
	ldr	x22, [x22, _R852_DATALINE@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	sub	w21, w21, #1
	ldr	w1, [x22]
	mov	x0, x20
	bl	_r852_read_reg
	str	w0, [x19], #4
	cbnz	w21, LBB0_11
LBB0_12:
	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	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_R852_DMA_LEN,4,2               ; @R852_DMA_LEN
	.comm	_R852_DATALINE,4,2              ; @R852_DATALINE
	.no_dead_strip	_r852_read_buf
.subsections_via_symbols
