	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_ooblayout_ecc_lp_hamming
_nand_ooblayout_ecc_lp_hamming:         ## @nand_ooblayout_ecc_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
	testl	%r15d, %r15d
	je	LBB0_1
LBB0_6:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
LBB0_7:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	(%rbx), %ecx
	cmpl	$64, %ecx
	je	LBB0_2
## %bb.3:
	cmpl	$128, %ecx
	jne	LBB0_9
## %bb.4:
	movl	$80, %edx
	jmp	LBB0_5
LBB0_2:
	movl	$40, %edx
LBB0_5:
	movl	%edx, (%r14)
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	addl	%eax, %edx
	xorl	%eax, %eax
	cmpl	%ecx, %edx
	jg	LBB0_6
	jmp	LBB0_8
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_nand_ooblayout_ecc_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_ecc_lp_hamming
_nand_ooblayout_ecc_lp_hamming:         ; @nand_ooblayout_ecc_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	x21, x1
	mov	x20, x0
	bl	_mtd_to_nand
	cbz	w21, LBB0_4
LBB0_1:
Lloh0:
	adrp	x8, _ERANGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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_4:
	ldr	w8, [x20]
	cmp	w8, #64
	b.eq	LBB0_7
; %bb.5:
	cmp	w8, #128
	b.ne	LBB0_10
; %bb.6:
	mov	w9, #80
	b	LBB0_8
LBB0_7:
	mov	w9, #40
LBB0_8:
	ldr	w10, [x0]
	stp	w9, w10, [x19]
	add	w9, w9, w10
	cmp	w9, w8
	b.gt	LBB0_1
; %bb.9:
	mov	w0, #0
	b	LBB0_3
LBB0_10:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_2
	.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_ecc_lp_hamming
.subsections_via_symbols
