	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_davinci_hwctl_4bit
_nand_davinci_hwctl_4bit:               ## @nand_davinci_hwctl_4bit
	.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
	movl	%esi, %r14d
	callq	_to_davinci_nand
	movq	%rax, %r12
	movq	_davinci_nand_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	_NANDFCR_OFFSET@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_davinci_nand_readl
	movl	%eax, %r13d
	andl	$-49, %r13d
	movl	(%r12), %ebx
	shll	$4, %ebx
	movl	$12, %edi
	callq	_BIT
	orl	%eax, %ebx
	orl	%r13d, %ebx
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_davinci_nand_writel
	movq	_NAND_ECC_READ@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	%r14d, (%rax)
	sete	%cl
	movl	%ecx, 4(%r12)
	movq	_davinci_nand_lock@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_davinci_nand_lock,4,2          ## @davinci_nand_lock
	.comm	_NANDFCR_OFFSET,4,2             ## @NANDFCR_OFFSET
	.comm	_NAND_ECC_READ,4,2              ## @NAND_ECC_READ
	.no_dead_strip	_nand_davinci_hwctl_4bit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nand_davinci_hwctl_4bit
_nand_davinci_hwctl_4bit:               ; @nand_davinci_hwctl_4bit
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	bl	_to_davinci_nand
	mov	x20, x0
Lloh0:
	adrp	x21, _davinci_nand_lock@GOTPAGE
Lloh1:
	ldr	x21, [x21, _davinci_nand_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh2:
	adrp	x22, _NANDFCR_OFFSET@GOTPAGE
Lloh3:
	ldr	x22, [x22, _NANDFCR_OFFSET@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_davinci_nand_readl
	and	w23, w0, #0xffffffcf
	ldr	w24, [x20]
	mov	w0, #12
	bl	_BIT
	orr	w8, w0, w23
	orr	w2, w8, w24, lsl #4
	ldr	w1, [x22]
	mov	x0, x20
	bl	_davinci_nand_writel
Lloh4:
	adrp	x8, _NAND_ECC_READ@GOTPAGE
Lloh5:
	ldr	x8, [x8, _NAND_ECC_READ@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w8, w19
	cset	w8, eq
	str	w8, [x20, #4]
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_davinci_nand_lock,4,2          ; @davinci_nand_lock
	.comm	_NANDFCR_OFFSET,4,2             ; @NANDFCR_OFFSET
	.comm	_NAND_ECC_READ,4,2              ; @NAND_ECC_READ
	.no_dead_strip	_nand_davinci_hwctl_4bit
.subsections_via_symbols
