	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_dma_configure_for_next
_tegra_dma_configure_for_next:          ## @tegra_dma_configure_for_next
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorl	%esi, %esi
	callq	_tegra_dma_pause
	movq	_TEGRA_APBDMA_CHAN_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_tdc_read
	movq	_TEGRA_APBDMA_STATUS_ISE_EOC@GOTPCREL(%rip), %rcx
	testq	%rax, (%rcx)
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_tdc2dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	jmp	LBB0_2
LBB0_3:
	movq	_TEGRA_APBDMA_CHAN_APBPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r14), %edx
	movq	%rbx, %rdi
	callq	_tdc_write
	movq	_TEGRA_APBDMA_CHAN_AHBPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	20(%r14), %edx
	movq	%rbx, %rdi
	callq	_tdc_write
	movq	(%rbx), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	movq	_TEGRA_APBDMA_CHAN_WCOUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	24(%r14), %edx
	movq	%rbx, %rdi
	callq	_tdc_write
LBB0_5:
	movq	_TEGRA_APBDMA_CHAN_CSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TEGRA_APBDMA_CSR_ENB@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	28(%r14), %edx
	movq	%rbx, %rdi
	callq	_tdc_write
	movl	$1, (%r14)
	movq	$0, 8(%r14)
LBB0_2:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_tegra_dma_resume               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TEGRA_APBDMA_CHAN_STATUS,4,2   ## @TEGRA_APBDMA_CHAN_STATUS
	.comm	_TEGRA_APBDMA_STATUS_ISE_EOC,8,3 ## @TEGRA_APBDMA_STATUS_ISE_EOC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Skipping new configuration as interrupt is pending\n"

	.comm	_TEGRA_APBDMA_CHAN_APBPTR,4,2   ## @TEGRA_APBDMA_CHAN_APBPTR
	.comm	_TEGRA_APBDMA_CHAN_AHBPTR,4,2   ## @TEGRA_APBDMA_CHAN_AHBPTR
	.comm	_TEGRA_APBDMA_CHAN_WCOUNT,4,2   ## @TEGRA_APBDMA_CHAN_WCOUNT
	.comm	_TEGRA_APBDMA_CHAN_CSR,4,2      ## @TEGRA_APBDMA_CHAN_CSR
	.comm	_TEGRA_APBDMA_CSR_ENB,4,2       ## @TEGRA_APBDMA_CSR_ENB
	.no_dead_strip	_tegra_dma_configure_for_next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_dma_configure_for_next
_tegra_dma_configure_for_next:          ; @tegra_dma_configure_for_next
	.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	x20, x1
	mov	x19, x0
	mov	w1, #0
	bl	_tegra_dma_pause
Lloh0:
	adrp	x8, _TEGRA_APBDMA_CHAN_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TEGRA_APBDMA_CHAN_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tdc_read
Lloh3:
	adrp	x8, _TEGRA_APBDMA_STATUS_ISE_EOC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TEGRA_APBDMA_STATUS_ISE_EOC@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	tst	x8, x0
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_tdc2dev
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_5
LBB0_2:
Lloh8:
	adrp	x8, _TEGRA_APBDMA_CHAN_APBPTR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TEGRA_APBDMA_CHAN_APBPTR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	w2, [x20, #16]
	mov	x0, x19
	bl	_tdc_write
Lloh11:
	adrp	x8, _TEGRA_APBDMA_CHAN_AHBPTR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TEGRA_APBDMA_CHAN_AHBPTR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w2, [x20, #20]
	mov	x0, x19
	bl	_tdc_write
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh14:
	adrp	x8, _TEGRA_APBDMA_CHAN_WCOUNT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TEGRA_APBDMA_CHAN_WCOUNT@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	w2, [x20, #24]
	mov	x0, x19
	bl	_tdc_write
LBB0_4:
Lloh17:
	adrp	x8, _TEGRA_APBDMA_CHAN_CSR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TEGRA_APBDMA_CHAN_CSR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w8, [x20, #28]
Lloh20:
	adrp	x9, _TEGRA_APBDMA_CSR_ENB@GOTPAGE
Lloh21:
	ldr	x9, [x9, _TEGRA_APBDMA_CSR_ENB@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_tdc_write
	mov	w8, #1
	str	w8, [x20]
	str	xzr, [x20, #8]
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_tegra_dma_resume
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_TEGRA_APBDMA_CHAN_STATUS,4,2   ; @TEGRA_APBDMA_CHAN_STATUS
	.comm	_TEGRA_APBDMA_STATUS_ISE_EOC,8,3 ; @TEGRA_APBDMA_STATUS_ISE_EOC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Skipping new configuration as interrupt is pending\n"

	.comm	_TEGRA_APBDMA_CHAN_APBPTR,4,2   ; @TEGRA_APBDMA_CHAN_APBPTR
	.comm	_TEGRA_APBDMA_CHAN_AHBPTR,4,2   ; @TEGRA_APBDMA_CHAN_AHBPTR
	.comm	_TEGRA_APBDMA_CHAN_WCOUNT,4,2   ; @TEGRA_APBDMA_CHAN_WCOUNT
	.comm	_TEGRA_APBDMA_CHAN_CSR,4,2      ; @TEGRA_APBDMA_CHAN_CSR
	.comm	_TEGRA_APBDMA_CSR_ENB,4,2       ; @TEGRA_APBDMA_CSR_ENB
	.no_dead_strip	_tegra_dma_configure_for_next
.subsections_via_symbols
