	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_i2c_init_dma
_tegra_i2c_init_dma:                    ## @tegra_i2c_init_dma
	.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	40(%rdi), %rax
	xorl	%r14d, %r14d
	cmpl	$0, (%rax)
	je	LBB0_10
## %bb.1:
	movq	%rdi, %r15
	movq	_CONFIG_TEGRA20_APB_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	movl	(%r15), %edi
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	callq	_dma_request_slave_channel_reason
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:
	movq	%rbx, 32(%r15)
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dma_request_slave_channel_reason
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
LBB0_4:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %r14d
LBB0_8:
	movq	%r15, %rdi
	callq	_tegra_i2c_release_dma
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r14d, %eax
	je	LBB0_10
## %bb.9:
	movl	(%r15), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	(%r15), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	xorl	%r14d, %r14d
	jmp	LBB0_10
LBB0_2:
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rbx, 24(%r15)
	movl	(%r15), %edi
	movl	16(%r15), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movq	___GFP_NOWARN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	-28(%rbp), %rdx
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_7
## %bb.11:
	movq	%rax, 8(%r15)
	movl	-28(%rbp), %eax
	movl	%eax, 4(%r15)
	jmp	LBB0_10
LBB0_7:
	movl	(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_TEGRA20_APB_DMA,4,2     ## @CONFIG_TEGRA20_APB_DMA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Support for APB DMA not enabled!\n"

L_.str.1:                               ## @.str.1
	.asciz	"rx"

L_.str.2:                               ## @.str.2
	.asciz	"tx"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	___GFP_NOWARN,4,2               ## @__GFP_NOWARN
L_.str.3:                               ## @.str.3
	.asciz	"failed to allocate the DMA buffer\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
L_.str.4:                               ## @.str.4
	.asciz	"cannot use DMA: %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"falling back to PIO\n"

	.no_dead_strip	_tegra_i2c_init_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_i2c_init_dma
_tegra_i2c_init_dma:                    ; @tegra_i2c_init_dma
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	x8, [x0, #40]
	ldr	w8, [x8]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _CONFIG_TEGRA20_APB_DMA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_TEGRA20_APB_DMA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	mov	x8, x0
	ldr	w0, [x19]
	cbz	w8, LBB0_7
; %bb.2:
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dma_request_slave_channel_reason
	mov	x20, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_4
; %bb.3:
	str	x20, [x19, #32]
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dma_request_slave_channel_reason
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_10
LBB0_4:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x20, x0
LBB0_5:
	mov	x0, x19
	bl	_tegra_i2c_release_dma
Lloh7:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmn	w20, w8
	b.eq	LBB0_9
; %bb.6:
	ldr	w0, [x19]
	str	x20, [sp]
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
	ldr	w0, [x19]
Lloh12:
	adrp	x1, l_.str.5@PAGE
Lloh13:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_7:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
LBB0_8:
	mov	w20, #0
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_10:
	str	x20, [x19, #24]
	ldr	w0, [x19]
Lloh16:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x19, #16]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, ___GFP_NOWARN@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___GFP_NOWARN@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w3, w9, w8
	add	x2, sp, #12
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_12
; %bb.11:
	mov	w20, #0
	str	x0, [x19, #8]
	ldr	w8, [sp, #12]
	str	w8, [x19, #4]
	b	LBB0_9
LBB0_12:
	ldr	w0, [x19]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_TEGRA20_APB_DMA,4,2     ; @CONFIG_TEGRA20_APB_DMA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Support for APB DMA not enabled!\n"

l_.str.1:                               ; @.str.1
	.asciz	"rx"

l_.str.2:                               ; @.str.2
	.asciz	"tx"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	___GFP_NOWARN,4,2               ; @__GFP_NOWARN
l_.str.3:                               ; @.str.3
	.asciz	"failed to allocate the DMA buffer\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
l_.str.4:                               ; @.str.4
	.asciz	"cannot use DMA: %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"falling back to PIO\n"

	.no_dead_strip	_tegra_i2c_init_dma
.subsections_via_symbols
