	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxc_v2_ooblayout_free
_mxc_v2_ooblayout_free:                 ## @mxc_v2_ooblayout_free
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_mtd_to_nand
	cmpl	$9, (%rax)
	movl	$16, %edx
	movl	$26, %ecx
	cmovel	%edx, %ecx
	cmpl	%ebx, 4(%rax)
	jle	LBB0_3
## %bb.1:
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.2:
	imull	%ebx, %ecx
	movl	%ecx, (%r14)
	movl	$7, 4(%r14)
	jmp	LBB0_8
LBB0_3:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_4:
	cmpl	$512, (%r15)                    ## imm = 0x200
	jg	LBB0_6
## %bb.5:
	movabsq	$21474836480, %rax              ## imm = 0x500000000
	jmp	LBB0_7
LBB0_6:
	movabsq	$17179869186, %rax              ## imm = 0x400000002
LBB0_7:
	movq	%rax, (%r14)
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERANGE,4,2                     ## @ERANGE
	.no_dead_strip	_mxc_v2_ooblayout_free
.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 mxc_v2_ooblayout_free
lCPI0_0:
	.long	2                               ; 0x2
	.long	4                               ; 0x4
lCPI0_1:
	.long	0                               ; 0x0
	.long	5                               ; 0x5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_mxc_v2_ooblayout_free:                 ; @mxc_v2_ooblayout_free
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_mtd_to_nand
	mov	w8, #26
	mov	w9, #16
	ldp	w10, w11, [x0]
	cmp	w10, #9
	csel	w8, w9, w8, eq
	cmp	w11, w20
	b.le	LBB0_3
; %bb.1:
	cbz	w20, LBB0_5
; %bb.2:
	mov	w0, #0
	mul	w8, w8, w20
	mov	w9, #7
	stp	w8, w9, [x19]
	b	LBB0_4
LBB0_3:
Lloh0:
	adrp	x8, _ERANGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w8, [x21]
	cmp	w8, #512
	b.gt	LBB0_7
; %bb.6:
	mov	w0, #0
Lloh3:
	adrp	x8, lCPI0_1@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [x19]
	b	LBB0_4
LBB0_7:
	mov	w0, #0
Lloh5:
	adrp	x8, lCPI0_0@PAGE
Lloh6:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdr	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ERANGE,4,2                     ; @ERANGE
	.no_dead_strip	_mxc_v2_ooblayout_free
.subsections_via_symbols
