	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_ooblayout_free_lp_hamming
_nand_ooblayout_free_lp_hamming:        ## @nand_ooblayout_free_lp_hamming
	.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
	cmpl	$2, %r15d
	jb	LBB0_3
## %bb.1:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movl	(%rbx), %ecx
	cmpl	$64, %ecx
	je	LBB0_4
## %bb.5:
	cmpl	$128, %ecx
	jne	LBB0_12
## %bb.6:
	movl	$80, %edx
	testl	%r15d, %r15d
	je	LBB0_8
LBB0_9:
	addl	(%rax), %edx
	movl	%edx, (%r14)
	subl	%edx, %ecx
	movl	%ecx, 4(%r14)
	jmp	LBB0_10
LBB0_4:
	movl	$40, %edx
	testl	%r15d, %r15d
	jne	LBB0_9
LBB0_8:
	movl	$2, (%r14)
	addl	$-2, %edx
	movl	%edx, 4(%r14)
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_nand_ooblayout_free_lp_hamming
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nand_ooblayout_free_lp_hamming
_nand_ooblayout_free_lp_hamming:        ; @nand_ooblayout_free_lp_hamming
	.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
	cmp	w20, #2
	b.lo	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ERANGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
	b	LBB0_9
LBB0_2:
	ldr	w9, [x21]
	cmp	w9, #64
	b.eq	LBB0_6
; %bb.3:
	cmp	w9, #128
	b.ne	LBB0_8
; %bb.4:
	mov	w10, #80
	mov	w8, #0
	cbz	w20, LBB0_7
LBB0_5:
	ldr	w11, [x0]
	add	w10, w11, w10
	sub	w9, w9, w10
	stp	w10, w9, [x19]
	b	LBB0_10
LBB0_6:
	mov	w10, #40
	mov	w8, #0
	cbnz	w20, LBB0_5
LBB0_7:
	mov	w9, #2
	sub	w10, w10, #2
	stp	w9, w10, [x19]
	b	LBB0_10
LBB0_8:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w8, w8
LBB0_10:
	mov	x0, x8
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_nand_ooblayout_free_lp_hamming
.subsections_via_symbols
