	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_i2c_dma_submit
_tegra_i2c_dma_submit:                  ## @tegra_i2c_dma_submit
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	callq	_dev_dbg
	leaq	32(%rbx), %rdi
	callq	_reinit_completion
	xorl	%eax, %eax
	cmpq	$0, 24(%rbx)
	setne	%dl
	jne	LBB0_1
## %bb.2:
	movq	_DMA_MEM_TO_DEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_DMA_DEV_TO_MEM@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %ecx
	movb	%dl, %al
	movq	8(%rbx,%rax,8), %r15
	movl	4(%rbx), %esi
	movq	_DMA_PREP_INTERRUPT@GOTPCREL(%rip), %rax
	movq	_DMA_CTRL_ACK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	orl	(%rax), %r8d
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_dmaengine_prep_slave_single
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	_tegra_i2c_dma_complete@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movq	%rbx, (%rax)
	movq	%rax, %rdi
	callq	_dmaengine_submit
	movq	%r15, %rdi
	callq	_dma_async_issue_pending
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"starting DMA for length: %zu\n"

	.comm	_DMA_DEV_TO_MEM,4,2             ## @DMA_DEV_TO_MEM
	.comm	_DMA_MEM_TO_DEV,4,2             ## @DMA_MEM_TO_DEV
	.comm	_DMA_PREP_INTERRUPT,4,2         ## @DMA_PREP_INTERRUPT
	.comm	_DMA_CTRL_ACK,4,2               ## @DMA_CTRL_ACK
L_.str.1:                               ## @.str.1
	.asciz	"failed to get DMA descriptor\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_tegra_i2c_dma_complete,4,2     ## @tegra_i2c_dma_complete
	.no_dead_strip	_tegra_i2c_dma_submit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_i2c_dma_submit
_tegra_i2c_dma_submit:                  ; @tegra_i2c_dma_submit
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_dbg
	add	x0, x19, #32
	bl	_reinit_completion
	ldr	x8, [x19, #24]
Lloh2:
	adrp	x9, _DMA_DEV_TO_MEM@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DMA_DEV_TO_MEM@GOTPAGEOFF]
Lloh4:
	adrp	x10, _DMA_MEM_TO_DEV@GOTPAGE
Lloh5:
	ldr	x10, [x10, _DMA_MEM_TO_DEV@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w3, [x8]
	mov	w8, #16
	mov	w9, #8
	csel	x8, x9, x8, eq
	ldr	x20, [x19, x8]
Lloh6:
	adrp	x8, _DMA_PREP_INTERRUPT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_PREP_INTERRUPT@GOTPAGEOFF]
	ldr	w1, [x19, #4]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _DMA_CTRL_ACK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DMA_CTRL_ACK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w4, w9, w8
	mov	x0, x20
	mov	x2, x21
	bl	_dmaengine_prep_slave_single
	cbz	x0, LBB0_2
; %bb.1:
Lloh12:
	adrp	x8, _tegra_i2c_dma_complete@GOTPAGE
Lloh13:
	ldr	x8, [x8, _tegra_i2c_dma_complete@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	str	x19, [x0]
	bl	_dmaengine_submit
	mov	x0, x20
	bl	_dma_async_issue_pending
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	w0, [x19]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"starting DMA for length: %zu\n"

	.comm	_DMA_DEV_TO_MEM,4,2             ; @DMA_DEV_TO_MEM
	.comm	_DMA_MEM_TO_DEV,4,2             ; @DMA_MEM_TO_DEV
	.comm	_DMA_PREP_INTERRUPT,4,2         ; @DMA_PREP_INTERRUPT
	.comm	_DMA_CTRL_ACK,4,2               ; @DMA_CTRL_ACK
l_.str.1:                               ; @.str.1
	.asciz	"failed to get DMA descriptor\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_tegra_i2c_dma_complete,4,2     ; @tegra_i2c_dma_complete
	.no_dead_strip	_tegra_i2c_dma_submit
.subsections_via_symbols
