	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function marvell_nand_ooblayout_free
_marvell_nand_ooblayout_free:           ## @marvell_nand_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, %r15d
	movq	%rdi, %rbx
	callq	_mtd_to_nand
	movq	%rax, %rdi
	callq	_to_marvell_nand
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.1:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_2:
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movq	_SZ_4K@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.3:
	movq	(%rax), %rcx
	movq	_SZ_2K@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.4:
	movl	$-6, %ecx
	movl	$6, %edx
	jmp	LBB0_6
LBB0_5:
	movl	$-2, %ecx
	movl	$2, %edx
LBB0_6:
	movl	%edx, (%r14)
	movl	12(%rax), %edx
	imull	8(%rax), %edx
	addl	16(%rax), %edx
	addl	%ecx, %edx
	movl	%edx, 4(%r14)
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_SZ_4K,8,3                      ## @SZ_4K
	.comm	_SZ_2K,8,3                      ## @SZ_2K
	.no_dead_strip	_marvell_nand_ooblayout_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function marvell_nand_ooblayout_free
_marvell_nand_ooblayout_free:           ; @marvell_nand_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	x21, x1
	mov	x20, x0
	bl	_mtd_to_nand
	bl	_to_marvell_nand
	cbz	w21, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ERANGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_2:
	ldr	x8, [x0]
	ldr	x9, [x20]
Lloh3:
	adrp	x10, _SZ_4K@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SZ_4K@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.3:
	ldr	x9, [x8]
Lloh6:
	adrp	x10, _SZ_2K@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SZ_2K@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.4:
	mov	w9, #-6
	mov	w10, #6
	b	LBB0_6
LBB0_5:
	mov	w9, #-2
	mov	w10, #2
LBB0_6:
	mov	w0, #0
	ldp	w11, w12, [x8, #8]
	ldr	w8, [x8, #16]
	madd	w8, w12, w11, w8
	add	w8, w9, w8
	stp	w10, w8, [x19]
LBB0_7:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_SZ_4K,8,3                      ; @SZ_4K
	.comm	_SZ_2K,8,3                      ; @SZ_2K
	.no_dead_strip	_marvell_nand_ooblayout_free
.subsections_via_symbols
