	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sm_correct_sector
_sm_correct_sector:                     ## @sm_correct_sector
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SM_SMALL_PAGE@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	movq	_CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_IS_ENABLED
	leaq	-60(%rbp), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	___nand_calculate_ecc
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	4(%r12), %ebx
	movl	(%r13), %r13d
	movl	(%r14), %edi
	callq	_IS_ENABLED
	movq	%r15, %rdi
	leaq	-60(%rbp), %rsi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	movl	%eax, %r8d
	callq	___nand_correct_data
	testq	%rax, %rax
	js	LBB0_2
## %bb.1:
	movq	_SM_SMALL_PAGE@GOTPCREL(%rip), %r14
	movslq	(%r14), %rbx
	leaq	(%r15,%rbx,4), %r15
	movq	_CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_IS_ENABLED
	leaq	-60(%rbp), %r12
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r12, %rdx
	movl	%eax, %ecx
	callq	___nand_calculate_ecc
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ebx
	movl	(%r14), %r14d
	movl	(%r13), %edi
	callq	_IS_ENABLED
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	movl	%eax, %r8d
	callq	___nand_correct_data
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jns	LBB0_3
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SM_SMALL_PAGE,4,2              ## @SM_SMALL_PAGE
	.comm	_CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC,4,2 ## @CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_sm_correct_sector
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sm_correct_sector
_sm_correct_sector:                     ; @sm_correct_sector
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x23, _SM_SMALL_PAGE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SM_SMALL_PAGE@GOTPAGEOFF]
	ldr	w21, [x23]
Lloh5:
	adrp	x24, _CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC@GOTPAGE
Lloh6:
	ldr	x24, [x24, _CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_IS_ENABLED
	mov	x3, x0
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x21
	bl	___nand_calculate_ecc
	ldr	w21, [x19, #4]
	ldr	w22, [x23]
	ldr	w0, [x24]
	bl	_IS_ENABLED
	mov	x4, x0
	add	x1, sp, #12
	mov	x0, x20
	mov	x2, x21
	mov	x3, x22
	bl	___nand_correct_data
	tbnz	x0, #63, LBB0_3
; %bb.1:
	ldrsw	x21, [x23]
	add	x20, x20, x21, lsl #2
	ldr	w0, [x24]
	bl	_IS_ENABLED
	mov	x3, x0
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x21
	bl	___nand_calculate_ecc
	ldr	w19, [x19]
	ldr	w21, [x23]
	ldr	w0, [x24]
	bl	_IS_ENABLED
	mov	x4, x0
	add	x1, sp, #12
	mov	x0, x20
	mov	x2, x19
	mov	x3, x21
	bl	___nand_correct_data
	tbnz	x0, #63, LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldr	x8, [sp, #24]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SM_SMALL_PAGE,4,2              ; @SM_SMALL_PAGE
	.comm	_CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC,4,2 ; @CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_sm_correct_sector
.subsections_via_symbols
