	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_nand_page_xfer
_tegra_nand_page_xfer:                  ## @tegra_nand_page_xfer
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, -88(%rbp)                 ## 4-byte Spill
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	8(%rsi), %edi
	callq	_to_tegra_ctrl
	cmpl	$0, 16(%rbp)
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	cmoveq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movq	%rax, %r13
	movl	(%rcx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	4(%r12), %esi
	movq	_NAND_CMD_READ0@GOTPCREL(%rip), %rbx
	cmoveq	_NAND_CMD_SEQIN@GOTPCREL(%rip), %rbx
	movq	_NAND_CMD_READSTART@GOTPCREL(%rip), %r14
	cmoveq	_NAND_CMD_PAGEPROG@GOTPCREL(%rip), %r14
	movq	%r12, %rdi
	callq	_tegra_nand_select_target
	movl	(%rbx), %edi
	movq	_CMD_REG1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r13), %rsi
	callq	_writel_relaxed
	movl	(%r14), %edi
	movq	_CMD_REG2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	addq	16(%r13), %rsi
	callq	_writel_relaxed
	movq	_COMMAND_CLE@GOTPCREL(%rip), %rax
	movq	_COMMAND_SEC_CMD@GOTPCREL(%rip), %rcx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%edi, %r14d
	shll	$16, %edi
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_3
LBB0_2:
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, %r13
	orl	(%rdx), %edi
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, -100(%rbp)                ## 4-byte Spill
	movl	(%rcx), %r15d
	movq	_ADDR_REG1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	addq	16(%rbx), %rsi
	callq	_writel_relaxed
	movq	_NAND_ROW_ADDR_3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_4
## %bb.5:
	sarl	$16, %r14d
	movq	_ADDR_REG2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	movl	%r14d, %edi
	callq	_writel_relaxed
	movl	$5, %edi
	jmp	LBB0_6
LBB0_4:
	movl	$4, %edi
LBB0_6:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	_COMMAND_ALE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
	callq	_COMMAND_ALE_SIZE
	movl	%eax, -96(%rbp)                 ## 4-byte Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$0, %r14d
	testq	%rbx, %rbx
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	je	LBB0_10
## %bb.7:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	movl	(%r13), %edx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %ecx
	callq	_dma_map_single
	movl	%eax, %r14d
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_37
LBB0_9:
	movl	(%r13), %edi
	decl	%edi
	movq	_DMA_CFG_A@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	callq	_writel_relaxed
	movq	_DATA_PTR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	movl	%r14d, %edi
	callq	_writel_relaxed
LBB0_10:
	movl	%r14d, -84(%rbp)                ## 4-byte Spill
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	movl	16(%rbp), %r14d
	je	LBB0_14
## %bb.11:
	movq	%r13, %rax
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13), %edi
	movl	4(%rax), %edx
	movq	%rbx, %r14
	movq	%rbx, %rsi
	movl	%r12d, %ecx
	callq	_dma_map_single
	movl	%eax, %ebx
	movl	(%r13), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_35
LBB0_13:
	movl	-88(%rbp), %edi                 ## 4-byte Reload
	decl	%edi
	movq	_DMA_CFG_B@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r13), %rsi
	callq	_writel_relaxed
	movq	_TAG_PTR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r13), %rsi
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_writel_relaxed
	movq	%r14, %rbx
	movl	16(%rbp), %r14d
LBB0_14:
	movq	_DMA_MST_CTRL_GO@GOTPCREL(%rip), %rax
	movq	_DMA_MST_CTRL_PERF_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_DMA_MST_CTRL_IE_DONE@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_DMA_MST_CTRL_IS_DONE@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_DMA_MST_CTRL_BURST_16@GOTPCREL(%rip), %rcx
	movl	$0, %eax
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	testq	%r12, %r12
	je	LBB0_16
## %bb.15:
	movq	_DMA_MST_CTRL_EN_A@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_16:
	orl	(%rcx), %edi
	movl	$0, %ecx
	testq	%rbx, %rbx
	je	LBB0_18
## %bb.17:
	movq	_DMA_MST_CTRL_EN_B@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_18:
	orl	%ecx, %eax
	orl	%eax, %edi
	movl	-96(%rbp), %ebx                 ## 4-byte Reload
	orl	-92(%rbp), %ebx                 ## 4-byte Folded Reload
	testl	%r14d, %r14d
	jne	LBB0_19
## %bb.20:
	movq	_DMA_MST_CTRL_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_21
LBB0_19:
	movq	_DMA_MST_CTRL_IN@GOTPCREL(%rip), %rcx
	movq	_DMA_MST_CTRL_REUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
LBB0_21:
	orl	%eax, %edi
	movq	_DMA_MST_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	addq	16(%r13), %rsi
	callq	_writel_relaxed
	movq	_COMMAND_GO@GOTPCREL(%rip), %rax
	movq	_COMMAND_RBSY_CHK@GOTPCREL(%rip), %rcx
	orl	-100(%rbp), %r15d               ## 4-byte Folded Reload
	orl	%ebx, %r15d
	orl	(%rax), %r15d
	orl	(%rcx), %r15d
	movl	$9, %edi
	callq	_COMMAND_TRANS_SIZE
	movl	%eax, %ebx
	movl	24(%r13), %edi
	callq	_COMMAND_CE
	movl	$0, %ecx
	testq	%r12, %r12
	je	LBB0_23
## %bb.22:
	movq	_COMMAND_A_VALID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_23:
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	movl	$0, %edi
	je	LBB0_25
## %bb.24:
	movq	_COMMAND_B_VALID@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
LBB0_25:
	testl	%r14d, %r14d
	je	LBB0_26
## %bb.27:
	movq	_COMMAND_RX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	jmp	LBB0_28
LBB0_26:
	movq	_COMMAND_TX@GOTPCREL(%rip), %rsi
	movq	_COMMAND_AFT_DAT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rsi), %edx
LBB0_28:
	orl	%eax, %ebx
	orl	%ecx, %ebx
	orl	%edi, %ebx
	orl	%ebx, %r15d
	orl	%edx, %r15d
	movq	_COMMAND@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r13), %rsi
	movl	%r15d, %edi
	callq	_writel_relaxed
	leaq	8(%r13), %rbx
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	je	LBB0_29
## %bb.30:
	movq	%r13, %rbx
	addq	$4, %rbx
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_33
## %bb.31:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_32
LBB0_29:
	leaq	L_.str.1(%rip), %rsi
LBB0_32:
	movl	(%r13), %edi
	callq	_dev_err
	movq	%r13, %rdi
	callq	_tegra_nand_dump_reg
	movq	%r13, %rdi
	callq	_tegra_nand_controller_abort
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_33:
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_35
## %bb.34:
	movl	(%r13), %edi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_dma_unmap_single
LBB0_35:
	testq	%r12, %r12
	je	LBB0_37
## %bb.36:
	movl	(%r13), %edi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movl	-84(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_dma_unmap_single
LBB0_37:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_NAND_CMD_READ0,4,2             ## @NAND_CMD_READ0
	.comm	_CMD_REG1,8,3                   ## @CMD_REG1
	.comm	_NAND_CMD_READSTART,4,2         ## @NAND_CMD_READSTART
	.comm	_CMD_REG2,8,3                   ## @CMD_REG2
	.comm	_NAND_CMD_SEQIN,4,2             ## @NAND_CMD_SEQIN
	.comm	_NAND_CMD_PAGEPROG,4,2          ## @NAND_CMD_PAGEPROG
	.comm	_COMMAND_CLE,4,2                ## @COMMAND_CLE
	.comm	_COMMAND_SEC_CMD,4,2            ## @COMMAND_SEC_CMD
	.comm	_ADDR_REG1,8,3                  ## @ADDR_REG1
	.comm	_NAND_ROW_ADDR_3,4,2            ## @NAND_ROW_ADDR_3
	.comm	_ADDR_REG2,8,3                  ## @ADDR_REG2
	.comm	_COMMAND_ALE,4,2                ## @COMMAND_ALE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dma mapping error\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DMA_CFG_A,8,3                  ## @DMA_CFG_A
	.comm	_DATA_PTR,8,3                   ## @DATA_PTR
	.comm	_DMA_CFG_B,8,3                  ## @DMA_CFG_B
	.comm	_TAG_PTR,8,3                    ## @TAG_PTR
	.comm	_DMA_MST_CTRL_GO,4,2            ## @DMA_MST_CTRL_GO
	.comm	_DMA_MST_CTRL_PERF_EN,4,2       ## @DMA_MST_CTRL_PERF_EN
	.comm	_DMA_MST_CTRL_IE_DONE,4,2       ## @DMA_MST_CTRL_IE_DONE
	.comm	_DMA_MST_CTRL_IS_DONE,4,2       ## @DMA_MST_CTRL_IS_DONE
	.comm	_DMA_MST_CTRL_BURST_16,4,2      ## @DMA_MST_CTRL_BURST_16
	.comm	_DMA_MST_CTRL_EN_A,4,2          ## @DMA_MST_CTRL_EN_A
	.comm	_DMA_MST_CTRL_EN_B,4,2          ## @DMA_MST_CTRL_EN_B
	.comm	_DMA_MST_CTRL_IN,4,2            ## @DMA_MST_CTRL_IN
	.comm	_DMA_MST_CTRL_REUSE,4,2         ## @DMA_MST_CTRL_REUSE
	.comm	_DMA_MST_CTRL_OUT,4,2           ## @DMA_MST_CTRL_OUT
	.comm	_DMA_MST_CTRL,8,3               ## @DMA_MST_CTRL
	.comm	_COMMAND_GO,4,2                 ## @COMMAND_GO
	.comm	_COMMAND_RBSY_CHK,4,2           ## @COMMAND_RBSY_CHK
	.comm	_COMMAND_A_VALID,4,2            ## @COMMAND_A_VALID
	.comm	_COMMAND_B_VALID,4,2            ## @COMMAND_B_VALID
	.comm	_COMMAND_RX,4,2                 ## @COMMAND_RX
	.comm	_COMMAND_TX,4,2                 ## @COMMAND_TX
	.comm	_COMMAND_AFT_DAT,4,2            ## @COMMAND_AFT_DAT
	.comm	_COMMAND,8,3                    ## @COMMAND
L_.str.1:                               ## @.str.1
	.asciz	"COMMAND timeout\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.2:                               ## @.str.2
	.asciz	"DMA timeout\n"

	.no_dead_strip	_tegra_nand_page_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_nand_page_xfer
_tegra_nand_page_xfer:                  ; @tegra_nand_page_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x6
	mov	x25, x5
	str	w4, [sp, #4]                    ; 4-byte Folded Spill
	mov	x23, x3
	mov	x20, x2
	mov	x26, x1
	mov	x19, x0
	ldr	w0, [x1, #8]
	bl	_to_tegra_ctrl
	mov	x21, x0
Lloh0:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh2:
	adrp	x9, _DMA_TO_DEVICE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DMA_TO_DEVICE@GOTPAGEOFF]
	cmp	w24, #0
	csel	x8, x9, x8, eq
	ldr	w22, [x8]
	ldr	w1, [x26, #4]
Lloh4:
	adrp	x8, _NAND_CMD_SEQIN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _NAND_CMD_SEQIN@GOTPAGEOFF]
Lloh6:
	adrp	x9, _NAND_CMD_READ0@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NAND_CMD_READ0@GOTPAGEOFF]
Lloh8:
	adrp	x10, _NAND_CMD_PAGEPROG@GOTPAGE
Lloh9:
	ldr	x10, [x10, _NAND_CMD_PAGEPROG@GOTPAGEOFF]
	csel	x27, x8, x9, eq
Lloh10:
	adrp	x8, _NAND_CMD_READSTART@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NAND_CMD_READSTART@GOTPAGEOFF]
	csel	x28, x10, x8, eq
	mov	x0, x26
	bl	_tegra_nand_select_target
	ldr	w0, [x27]
	ldr	x8, [x21, #16]
Lloh12:
	adrp	x9, _CMD_REG1@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CMD_REG1@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	w0, [x28]
	ldr	x8, [x21, #16]
Lloh15:
	adrp	x9, _CMD_REG2@GOTPAGE
Lloh16:
	ldr	x9, [x9, _CMD_REG2@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
Lloh18:
	adrp	x8, _COMMAND_CLE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _COMMAND_CLE@GOTPAGEOFF]
Lloh20:
	adrp	x9, _COMMAND_SEC_CMD@GOTPAGE
Lloh21:
	ldr	x9, [x9, _COMMAND_SEC_CMD@GOTPAGEOFF]
	lsl	w0, w25, #16
	cbnz	x20, LBB0_2
; %bb.1:
	ldr	w10, [x19]
	orr	w0, w10, w0
LBB0_2:
	ldr	w10, [x8]
	ldr	w8, [x9]
	stp	w8, w10, [sp, #8]               ; 8-byte Folded Spill
	ldr	x8, [x21, #16]
Lloh22:
	adrp	x9, _ADDR_REG1@GOTPAGE
Lloh23:
	ldr	x9, [x9, _ADDR_REG1@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	w8, [x26]
Lloh25:
	adrp	x9, _NAND_ROW_ADDR_3@GOTPAGE
Lloh26:
	ldr	x9, [x9, _NAND_ROW_ADDR_3@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	asr	w0, w25, #16
	ldr	x8, [x21, #16]
Lloh28:
	adrp	x9, _ADDR_REG2@GOTPAGE
Lloh29:
	ldr	x9, [x9, _ADDR_REG2@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	mov	w0, #5
	b	LBB0_5
LBB0_4:
	mov	w0, #4
LBB0_5:
Lloh31:
	adrp	x8, _COMMAND_ALE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _COMMAND_ALE@GOTPAGEOFF]
Lloh33:
	ldr	w27, [x8]
	bl	_COMMAND_ALE_SIZE
	mov	x28, x0
	cbz	x20, LBB0_8
; %bb.6:
	ldr	w0, [x21]
	ldr	w2, [x19]
	mov	x1, x20
	mov	x3, x22
	bl	_dma_map_single
	mov	x25, x0
	ldr	w0, [x21]
	mov	x1, x25
	bl	_dma_mapping_error
	cbz	w0, LBB0_11
; %bb.7:
	ldr	w0, [x21]
Lloh34:
	adrp	x1, l_.str@PAGE
Lloh35:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh36:
	adrp	x8, _EINVAL@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_23
LBB0_8:
	mov	w25, #0
	cbz	x23, LBB0_12
LBB0_9:
	ldr	w0, [x21]
	ldr	w2, [x19, #4]
	mov	x1, x23
	mov	x3, x22
	bl	_dma_map_single
	mov	x26, x0
	ldr	w0, [x21]
	mov	x1, x26
	bl	_dma_mapping_error
	cbz	w0, LBB0_13
; %bb.10:
	ldr	w0, [x21]
Lloh39:
	adrp	x1, l_.str@PAGE
Lloh40:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh41:
	adrp	x8, _EINVAL@GOTPAGE
Lloh42:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_21
LBB0_11:
	ldr	w8, [x19]
	sub	w0, w8, #1
	ldr	x8, [x21, #16]
Lloh44:
	adrp	x9, _DMA_CFG_A@GOTPAGE
Lloh45:
	ldr	x9, [x9, _DMA_CFG_A@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	x8, [x21, #16]
Lloh47:
	adrp	x9, _DATA_PTR@GOTPAGE
Lloh48:
	ldr	x9, [x9, _DATA_PTR@GOTPAGEOFF]
Lloh49:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x25
	bl	_writel_relaxed
	cbnz	x23, LBB0_9
LBB0_12:
	stp	w22, wzr, [sp]                  ; 8-byte Folded Spill
	b	LBB0_14
LBB0_13:
	str	w22, [sp]                       ; 4-byte Folded Spill
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	sub	w0, w8, #1
	ldr	x8, [x21, #16]
Lloh50:
	adrp	x9, _DMA_CFG_B@GOTPAGE
Lloh51:
	ldr	x9, [x9, _DMA_CFG_B@GOTPAGEOFF]
Lloh52:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	x8, [x21, #16]
Lloh53:
	adrp	x9, _TAG_PTR@GOTPAGE
Lloh54:
	ldr	x9, [x9, _TAG_PTR@GOTPAGEOFF]
Lloh55:
	ldr	x9, [x9]
	add	x1, x9, x8
	str	w26, [sp, #4]                   ; 4-byte Folded Spill
	mov	x0, x26
	bl	_writel_relaxed
LBB0_14:
Lloh56:
	adrp	x8, _DMA_MST_CTRL_GO@GOTPAGE
Lloh57:
	ldr	x8, [x8, _DMA_MST_CTRL_GO@GOTPAGEOFF]
	orr	w28, w28, w27
Lloh58:
	ldr	w8, [x8]
Lloh59:
	adrp	x9, _DMA_MST_CTRL_PERF_EN@GOTPAGE
Lloh60:
	ldr	x9, [x9, _DMA_MST_CTRL_PERF_EN@GOTPAGEOFF]
Lloh61:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh62:
	adrp	x9, _DMA_MST_CTRL_IE_DONE@GOTPAGE
Lloh63:
	ldr	x9, [x9, _DMA_MST_CTRL_IE_DONE@GOTPAGEOFF]
Lloh64:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh65:
	adrp	x9, _DMA_MST_CTRL_IS_DONE@GOTPAGE
Lloh66:
	ldr	x9, [x9, _DMA_MST_CTRL_IS_DONE@GOTPAGEOFF]
Lloh67:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh68:
	adrp	x9, _DMA_MST_CTRL_BURST_16@GOTPAGE
Lloh69:
	ldr	x9, [x9, _DMA_MST_CTRL_BURST_16@GOTPAGEOFF]
Lloh70:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh71:
	adrp	x9, _DMA_MST_CTRL_EN_A@GOTPAGE
Lloh72:
	ldr	x9, [x9, _DMA_MST_CTRL_EN_A@GOTPAGEOFF]
Lloh73:
	ldr	w9, [x9]
	cmp	x20, #0
	csel	w9, wzr, w9, eq
	orr	w8, w8, w9
Lloh74:
	adrp	x9, _DMA_MST_CTRL_EN_B@GOTPAGE
Lloh75:
	ldr	x9, [x9, _DMA_MST_CTRL_EN_B@GOTPAGEOFF]
Lloh76:
	ldr	w9, [x9]
	cmp	x23, #0
	csel	w9, wzr, w9, eq
	orr	w8, w8, w9
Lloh77:
	adrp	x9, _DMA_MST_CTRL_IN@GOTPAGE
Lloh78:
	ldr	x9, [x9, _DMA_MST_CTRL_IN@GOTPAGEOFF]
Lloh79:
	ldr	w9, [x9]
Lloh80:
	adrp	x10, _DMA_MST_CTRL_REUSE@GOTPAGE
Lloh81:
	ldr	x10, [x10, _DMA_MST_CTRL_REUSE@GOTPAGEOFF]
Lloh82:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh83:
	adrp	x10, _DMA_MST_CTRL_OUT@GOTPAGE
Lloh84:
	ldr	x10, [x10, _DMA_MST_CTRL_OUT@GOTPAGEOFF]
Lloh85:
	ldr	w10, [x10]
	cmp	w24, #0
	csel	w9, w10, w9, eq
	orr	w0, w8, w9
	ldr	x8, [x21, #16]
Lloh86:
	adrp	x9, _DMA_MST_CTRL@GOTPAGE
Lloh87:
	ldr	x9, [x9, _DMA_MST_CTRL@GOTPAGEOFF]
Lloh88:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
Lloh89:
	adrp	x8, _COMMAND_GO@GOTPAGE
Lloh90:
	ldr	x8, [x8, _COMMAND_GO@GOTPAGEOFF]
Lloh91:
	ldr	w26, [x8]
Lloh92:
	adrp	x8, _COMMAND_RBSY_CHK@GOTPAGE
Lloh93:
	ldr	x8, [x8, _COMMAND_RBSY_CHK@GOTPAGEOFF]
Lloh94:
	ldr	w22, [x8]
	mov	w0, #9
	bl	_COMMAND_TRANS_SIZE
	mov	x27, x0
	ldr	w0, [x21, #24]
	bl	_COMMAND_CE
	cmp	x20, #0
Lloh95:
	adrp	x8, _COMMAND_A_VALID@GOTPAGE
Lloh96:
	ldr	x8, [x8, _COMMAND_A_VALID@GOTPAGEOFF]
Lloh97:
	ldr	w8, [x8]
	csel	w8, wzr, w8, eq
	cmp	x23, #0
Lloh98:
	adrp	x9, _COMMAND_B_VALID@GOTPAGE
Lloh99:
	ldr	x9, [x9, _COMMAND_B_VALID@GOTPAGEOFF]
Lloh100:
	ldr	w9, [x9]
Lloh101:
	adrp	x10, _COMMAND_TX@GOTPAGE
Lloh102:
	ldr	x10, [x10, _COMMAND_TX@GOTPAGEOFF]
Lloh103:
	ldr	w10, [x10]
Lloh104:
	adrp	x11, _COMMAND_AFT_DAT@GOTPAGE
Lloh105:
	ldr	x11, [x11, _COMMAND_AFT_DAT@GOTPAGEOFF]
Lloh106:
	ldr	w11, [x11]
	orr	w10, w11, w10
Lloh107:
	adrp	x11, _COMMAND_RX@GOTPAGE
Lloh108:
	ldr	x11, [x11, _COMMAND_RX@GOTPAGEOFF]
	csel	w9, wzr, w9, eq
Lloh109:
	ldr	w11, [x11]
	cmp	w24, #0
	csel	w10, w10, w11, eq
	ldp	w12, w11, [sp, #8]              ; 8-byte Folded Reload
	orr	w11, w12, w11
	orr	w11, w11, w28
	orr	w11, w11, w26
	orr	w11, w11, w22
	orr	w11, w11, w27
	orr	w11, w11, w0
	orr	w8, w11, w8
	orr	w8, w8, w9
	orr	w0, w8, w10
	ldr	x8, [x21, #16]
Lloh110:
	adrp	x9, _COMMAND@GOTPAGE
Lloh111:
	ldr	x9, [x9, _COMMAND@GOTPAGEOFF]
Lloh112:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	add	x24, x21, #8
	mov	w0, #500
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x24
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_17
; %bb.15:
	add	x24, x21, #4
	mov	w0, #500
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x24
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_18
; %bb.16:
	mov	w24, #0
	ldp	w22, w26, [sp]                  ; 8-byte Folded Reload
	cbnz	x23, LBB0_20
	b	LBB0_21
LBB0_17:
Lloh113:
	adrp	x1, l_.str.1@PAGE
Lloh114:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_19
LBB0_18:
Lloh115:
	adrp	x1, l_.str.2@PAGE
Lloh116:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_19:
	ldp	w22, w26, [sp]                  ; 8-byte Folded Reload
	ldr	w0, [x21]
	bl	_dev_err
	mov	x0, x21
	bl	_tegra_nand_dump_reg
	mov	x0, x21
	bl	_tegra_nand_controller_abort
Lloh117:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh118:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh119:
	ldr	w8, [x8]
	neg	w24, w8
	cbz	x23, LBB0_21
LBB0_20:
	ldr	w0, [x21]
	ldr	w2, [x19, #4]
	mov	x1, x26
	mov	x3, x22
	bl	_dma_unmap_single
LBB0_21:
	cbz	x20, LBB0_23
; %bb.22:
	ldr	w0, [x21]
	ldr	w2, [x19]
	mov	x1, x25
	mov	x3, x22
	bl	_dma_unmap_single
LBB0_23:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh110, Lloh111, Lloh112
	.loh AdrpLdrGotLdr	Lloh107, Lloh108, Lloh109
	.loh AdrpLdrGotLdr	Lloh104, Lloh105, Lloh106
	.loh AdrpLdrGotLdr	Lloh101, Lloh102, Lloh103
	.loh AdrpLdrGotLdr	Lloh98, Lloh99, Lloh100
	.loh AdrpLdrGotLdr	Lloh95, Lloh96, Lloh97
	.loh AdrpLdrGotLdr	Lloh92, Lloh93, Lloh94
	.loh AdrpLdrGotLdr	Lloh89, Lloh90, Lloh91
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh85
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpAdd	Lloh113, Lloh114
	.loh AdrpAdd	Lloh115, Lloh116
	.loh AdrpLdrGotLdr	Lloh117, Lloh118, Lloh119
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_NAND_CMD_READ0,4,2             ; @NAND_CMD_READ0
	.comm	_CMD_REG1,8,3                   ; @CMD_REG1
	.comm	_NAND_CMD_READSTART,4,2         ; @NAND_CMD_READSTART
	.comm	_CMD_REG2,8,3                   ; @CMD_REG2
	.comm	_NAND_CMD_SEQIN,4,2             ; @NAND_CMD_SEQIN
	.comm	_NAND_CMD_PAGEPROG,4,2          ; @NAND_CMD_PAGEPROG
	.comm	_COMMAND_CLE,4,2                ; @COMMAND_CLE
	.comm	_COMMAND_SEC_CMD,4,2            ; @COMMAND_SEC_CMD
	.comm	_ADDR_REG1,8,3                  ; @ADDR_REG1
	.comm	_NAND_ROW_ADDR_3,4,2            ; @NAND_ROW_ADDR_3
	.comm	_ADDR_REG2,8,3                  ; @ADDR_REG2
	.comm	_COMMAND_ALE,4,2                ; @COMMAND_ALE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dma mapping error\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DMA_CFG_A,8,3                  ; @DMA_CFG_A
	.comm	_DATA_PTR,8,3                   ; @DATA_PTR
	.comm	_DMA_CFG_B,8,3                  ; @DMA_CFG_B
	.comm	_TAG_PTR,8,3                    ; @TAG_PTR
	.comm	_DMA_MST_CTRL_GO,4,2            ; @DMA_MST_CTRL_GO
	.comm	_DMA_MST_CTRL_PERF_EN,4,2       ; @DMA_MST_CTRL_PERF_EN
	.comm	_DMA_MST_CTRL_IE_DONE,4,2       ; @DMA_MST_CTRL_IE_DONE
	.comm	_DMA_MST_CTRL_IS_DONE,4,2       ; @DMA_MST_CTRL_IS_DONE
	.comm	_DMA_MST_CTRL_BURST_16,4,2      ; @DMA_MST_CTRL_BURST_16
	.comm	_DMA_MST_CTRL_EN_A,4,2          ; @DMA_MST_CTRL_EN_A
	.comm	_DMA_MST_CTRL_EN_B,4,2          ; @DMA_MST_CTRL_EN_B
	.comm	_DMA_MST_CTRL_IN,4,2            ; @DMA_MST_CTRL_IN
	.comm	_DMA_MST_CTRL_REUSE,4,2         ; @DMA_MST_CTRL_REUSE
	.comm	_DMA_MST_CTRL_OUT,4,2           ; @DMA_MST_CTRL_OUT
	.comm	_DMA_MST_CTRL,8,3               ; @DMA_MST_CTRL
	.comm	_COMMAND_GO,4,2                 ; @COMMAND_GO
	.comm	_COMMAND_RBSY_CHK,4,2           ; @COMMAND_RBSY_CHK
	.comm	_COMMAND_A_VALID,4,2            ; @COMMAND_A_VALID
	.comm	_COMMAND_B_VALID,4,2            ; @COMMAND_B_VALID
	.comm	_COMMAND_RX,4,2                 ; @COMMAND_RX
	.comm	_COMMAND_TX,4,2                 ; @COMMAND_TX
	.comm	_COMMAND_AFT_DAT,4,2            ; @COMMAND_AFT_DAT
	.comm	_COMMAND,8,3                    ; @COMMAND
l_.str.1:                               ; @.str.1
	.asciz	"COMMAND timeout\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.2:                               ; @.str.2
	.asciz	"DMA timeout\n"

	.no_dead_strip	_tegra_nand_page_xfer
.subsections_via_symbols
