	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_dma_slave_config
_tegra_dma_slave_config:                ## @tegra_dma_slave_config
	.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
	callq	_to_tegra_dma_chan
	movq	%rax, %rbx
	leaq	16(%rax), %rdi
	callq	_list_empty
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	addq	$12, %rdi
	movq	%r14, %rsi
	movl	$16, %edx
	callq	_memcpy
	movq	(%rbx), %rax
	movq	_TEGRA_APBDMA_SLAVE_ID_INVALID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.3:
	cmpq	$0, 8(%r14)
	je	LBB0_8
## %bb.4:
	movq	(%r14), %rax
	movq	_TEGRA_APBDMA_CSR_REQ_SEL_MASK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_7
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_1:
	movq	%rbx, %rdi
	callq	_tdc2dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_7:
	movq	%rax, (%rbx)
LBB0_8:
	movl	$1, 8(%rbx)
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Configuration not allowed\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_TEGRA_APBDMA_SLAVE_ID_INVALID,8,3 ## @TEGRA_APBDMA_SLAVE_ID_INVALID
	.comm	_TEGRA_APBDMA_CSR_REQ_SEL_MASK,8,3 ## @TEGRA_APBDMA_CSR_REQ_SEL_MASK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_tegra_dma_slave_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_dma_slave_config
_tegra_dma_slave_config:                ; @tegra_dma_slave_config
	.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
	bl	_to_tegra_dma_chan
	mov	x19, x0
	add	x0, x0, #16
	bl	_list_empty
	cbz	w0, LBB0_5
; %bb.1:
	add	x0, x19, #12
	mov	x1, x20
	mov	w2, #16
	bl	_memcpy
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _TEGRA_APBDMA_SLAVE_ID_INVALID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TEGRA_APBDMA_SLAVE_ID_INVALID@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.2:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_8
; %bb.3:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _TEGRA_APBDMA_CSR_REQ_SEL_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TEGRA_APBDMA_CSR_REQ_SEL_MASK@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_7
; %bb.4:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_tdc2dev
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh10:
	adrp	x8, _EBUSY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_7:
	str	x8, [x19]
LBB0_8:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Configuration not allowed\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_TEGRA_APBDMA_SLAVE_ID_INVALID,8,3 ; @TEGRA_APBDMA_SLAVE_ID_INVALID
	.comm	_TEGRA_APBDMA_CSR_REQ_SEL_MASK,8,3 ; @TEGRA_APBDMA_CSR_REQ_SEL_MASK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_tegra_dma_slave_config
.subsections_via_symbols
