	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunxi_nfc_hw_ecc_enable
_sunxi_nfc_hw_ecc_enable:               ## @sunxi_nfc_hw_ecc_enable
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	16(%rdi), %edi
	callq	_to_sunxi_nfc
	movq	%rax, %r14
	movq	8(%r15), %r12
	movq	_NFC_REG_ECC_CTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movq	_NFC_ECC_MODE_MSK@GOTPCREL(%rip), %rcx
	movq	_NFC_ECC_PIPELINE@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	orl	(%rcx), %ebx
	movq	_NFC_ECC_BLOCK_SIZE_MSK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movq	_NFC_ECC_EN@GOTPCREL(%rip), %rax
	movl	(%r12), %edi
	orl	(%rax), %ebx
	callq	_NFC_ECC_MODE
	movq	_NFC_ECC_EXCEPTION@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpl	$512, (%r15)                    ## imm = 0x200
	jne	LBB0_2
## %bb.1:
	movq	_NFC_ECC_BLOCK_512@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_2:
	orl	%eax, %ebx
	orl	(%rdx), %ebx
	orl	(%r13), %ebx
	orl	%ecx, %ebx
	movq	_NFC_REG_ECC_CTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NFC_REG_ECC_CTL,8,3            ## @NFC_REG_ECC_CTL
	.comm	_NFC_ECC_MODE_MSK,4,2           ## @NFC_ECC_MODE_MSK
	.comm	_NFC_ECC_PIPELINE,4,2           ## @NFC_ECC_PIPELINE
	.comm	_NFC_ECC_BLOCK_SIZE_MSK,4,2     ## @NFC_ECC_BLOCK_SIZE_MSK
	.comm	_NFC_ECC_EN,4,2                 ## @NFC_ECC_EN
	.comm	_NFC_ECC_EXCEPTION,4,2          ## @NFC_ECC_EXCEPTION
	.comm	_NFC_ECC_BLOCK_512,4,2          ## @NFC_ECC_BLOCK_512
	.no_dead_strip	_sunxi_nfc_hw_ecc_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunxi_nfc_hw_ecc_enable
_sunxi_nfc_hw_ecc_enable:               ; @sunxi_nfc_hw_ecc_enable
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_to_sunxi_nfc
	mov	x20, x0
	ldr	x21, [x19, #8]
	ldr	x8, [x0]
Lloh0:
	adrp	x22, _NFC_REG_ECC_CTL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _NFC_REG_ECC_CTL@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
Lloh2:
	adrp	x8, _NFC_ECC_MODE_MSK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NFC_ECC_MODE_MSK@GOTPAGEOFF]
Lloh4:
	adrp	x23, _NFC_ECC_PIPELINE@GOTPAGE
Lloh5:
	ldr	x23, [x23, _NFC_ECC_PIPELINE@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x23]
	orr	w8, w9, w8
Lloh7:
	adrp	x9, _NFC_ECC_BLOCK_SIZE_MSK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _NFC_ECC_BLOCK_SIZE_MSK@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w8, w9
	bic	w24, w0, w8
Lloh10:
	adrp	x8, _NFC_ECC_EN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NFC_ECC_EN@GOTPAGEOFF]
Lloh12:
	ldr	w25, [x8]
	ldr	w0, [x21]
	bl	_NFC_ECC_MODE
Lloh13:
	adrp	x8, _NFC_ECC_EXCEPTION@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NFC_ECC_EXCEPTION@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [x23]
	ldr	w10, [x19]
Lloh16:
	adrp	x11, _NFC_ECC_BLOCK_512@GOTPAGE
Lloh17:
	ldr	x11, [x11, _NFC_ECC_BLOCK_512@GOTPAGEOFF]
Lloh18:
	ldr	w11, [x11]
	cmp	w10, #512
	csel	w10, w11, wzr, eq
	orr	w11, w24, w25
	orr	w11, w11, w0
	orr	w8, w11, w8
	orr	w8, w8, w9
	orr	w0, w8, w10
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x1, x9, x8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_writel
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_NFC_REG_ECC_CTL,8,3            ; @NFC_REG_ECC_CTL
	.comm	_NFC_ECC_MODE_MSK,4,2           ; @NFC_ECC_MODE_MSK
	.comm	_NFC_ECC_PIPELINE,4,2           ; @NFC_ECC_PIPELINE
	.comm	_NFC_ECC_BLOCK_SIZE_MSK,4,2     ; @NFC_ECC_BLOCK_SIZE_MSK
	.comm	_NFC_ECC_EN,4,2                 ; @NFC_ECC_EN
	.comm	_NFC_ECC_EXCEPTION,4,2          ; @NFC_ECC_EXCEPTION
	.comm	_NFC_ECC_BLOCK_512,4,2          ; @NFC_ECC_BLOCK_512
	.no_dead_strip	_sunxi_nfc_hw_ecc_enable
.subsections_via_symbols
