	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3c2412_nand_calculate_ecc
_s3c2412_nand_calculate_ecc:            ## @s3c2412_nand_calculate_ecc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdx, %rbx
	callq	_s3c2410_nand_mtd_toinfo
	movq	_S3C2412_NFMECC0@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	addq	(%rax), %rdi
	callq	_readl
	movq	%rax, (%rbx)
	movq	%rax, %rdx
	shrq	$8, %rdx
	movq	%rdx, 8(%rbx)
	movq	%rax, %rcx
	shrq	$16, %rcx
	movq	%rcx, 16(%rbx)
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	callq	_pr_debug
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_S3C2412_NFMECC0,8,3            ## @S3C2412_NFMECC0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"calculate_ecc: returning ecc %02x,%02x,%02x\n"

	.no_dead_strip	_s3c2412_nand_calculate_ecc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3c2412_nand_calculate_ecc
_s3c2412_nand_calculate_ecc:            ; @s3c2412_nand_calculate_ecc
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	bl	_s3c2410_nand_mtd_toinfo
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _S3C2412_NFMECC0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _S3C2412_NFMECC0@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x1, x0
	lsr	x2, x0, #8
	stp	x0, x2, [x19]
	lsr	x3, x0, #16
	str	x3, [x19, #16]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_S3C2412_NFMECC0,8,3            ; @S3C2412_NFMECC0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"calculate_ecc: returning ecc %02x,%02x,%02x\n"

	.no_dead_strip	_s3c2412_nand_calculate_ecc
.subsections_via_symbols
