	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmu_flash_read
_vmu_flash_read:                        ## @vmu_flash_read
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.3:
	movq	%rcx, %rbx
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	8(%rax), %rdi
	movslq	(%rax), %r13
	callq	_maple_get_drvdata
	movq	8(%rax), %r8
	movq	%r13, -104(%rbp)                ## 8-byte Spill
	movq	%r13, %rcx
	shlq	$4, %rcx
	movslq	(%r8,%rcx), %rdx
	leaq	(%r14,%r15), %rsi
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movslq	(%rax), %rdi
	imulq	%rdx, %rdi
	movq	%rdi, %r13
	subq	%r15, %r13
	cmpq	%rdi, %rsi
	cmovbeq	%r14, %r13
	testq	%r13, %r13
	je	LBB0_1
## %bb.4:
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r8,%rcx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	subl	%esi, %ebx
	addq	8(%rdx), %rsi
	movl	%ebx, %edx
	callq	_memcpy
	addl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
                                        ## kill: def $ebx killed $ebx killed $rbx
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %r13
	movq	%r14, %rdi
	callq	_kfree
	movslq	%ebx, %rax
	cmpq	%rax, %r12
	jbe	LBB0_17
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %r12
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %r13
	addq	%r13, %r15
	movq	%r15, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	-104(%rbp), %rdx                ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_ofs_to_block
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r14
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 24(%rax)
	je	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_jiffies@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_HZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	16(%rax), %rsi
	callq	_time_before
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rdx), %rax
	cmpq	(%r14), %rax
	jne	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movslq	(%rax), %rbx
	movq	8(%r14), %rsi
	movq	%r12, %rax
	subq	%r13, %rax
	addq	%rsi, %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%r13,4), %rdi
	cmpq	%rbx, %rax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jae	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	addq	8(%rdx), %rsi
	movl	%r12d, %edx
	subl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	callq	_memcpy
	movl	%r12d, %ebx
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	leaq	-48(%rbp), %rsi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	callq	_vmu_flash_read_char
	cmpl	$0, -48(%rbp)
	jne	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%r13,4), %rdi
	movzbl	%al, %esi
	movl	$1, %edx
	callq	_memset
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	incl	%ebx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_17:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%ebx, %ebx
	jmp	LBB0_18
LBB0_14:
	movzbl	%al, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_HZ,8,3                         ## @HZ
	.no_dead_strip	_vmu_flash_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmu_flash_read
_vmu_flash_read:                        ; @vmu_flash_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	x2, LBB0_3
; %bb.1:
	mov	x20, x4
	mov	x19, x3
	mov	x25, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x8, [x0]
	ldr	x0, [x8, #8]
	ldrsw	x23, [x8]
	bl	_maple_get_drvdata
	ldr	x8, [x0, #8]
	lsl	x9, x23, #4
	ldrsw	x9, [x8, x9]
	ldrsw	x10, [x0]
	mul	x9, x10, x9
	sub	x10, x9, x21
	add	x11, x25, x21
	cmp	x11, x9
	csel	x27, x10, x25, hi
	cbz	x27, LBB0_3
; %bb.2:
	mov	x24, x0
	str	x19, [sp]                       ; 8-byte Folded Spill
	mov	w19, #0
	add	x8, x8, x23, lsl #4
	ldr	x28, [x8, #8]
	b	LBB0_8
LBB0_3:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w26, w8
LBB0_5:
	mov	x0, x26
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	sub	w26, w9, w8
	add	x0, x20, x19, lsl #2
	ldr	x9, [x28, #8]
	add	x1, x9, x8
	mov	x2, x26
	bl	_memcpy
	add	w19, w26, w19
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x25
	bl	_kfree
	sxtw	x8, w19
	cmp	x27, x8
	b.ls	LBB0_17
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	sxtw	x19, w19
	add	x26, x19, x21
	mov	x0, x26
	mov	x1, x22
	mov	x2, x23
	bl	_ofs_to_block
	cbz	x0, LBB0_16
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x25, x0
	ldr	x8, [x28, #24]
	cbz	x8, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh2:
	adrp	x8, _jiffies@GOTPAGE
Lloh3:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	x8, [x28, #16]
Lloh5:
	adrp	x9, _HZ@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_time_before
	cbz	x0, LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x28]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	ldrsw	x9, [x24]
	ldr	x8, [x25, #8]
	sub	x10, x27, x19
	add	x10, x10, x8
	cmp	x10, x9
	b.hs	LBB0_6
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x0, x20, x19, lsl #2
	ldr	x9, [x28, #8]
	add	x1, x9, x8
	sub	w2, w27, w19
	bl	_memcpy
	mov	x19, x27
	b	LBB0_7
LBB0_14:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x1, sp, #12
	mov	x0, x26
	mov	x2, x22
	bl	_vmu_flash_read_char
	mov	x26, x0
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x0, x20, x19, lsl #2
	mov	x1, x26
	mov	w2, #1
	bl	_memset
	add	w19, w19, #1
	b	LBB0_7
LBB0_16:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_17:
	mov	w26, #0
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	str	x8, [x9]
	b	LBB0_5
LBB0_18:
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	str	x19, [x8]
	mov	x0, x25
	bl	_kfree
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_HZ,8,3                         ; @HZ
	.no_dead_strip	_vmu_flash_read
.subsections_via_symbols
