	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_adma_set_xfer_params
_tegra_adma_set_xfer_params:            ## @tegra_adma_set_xfer_params
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rsi), %rdi
	movq	_ADMA_CH_CONFIG_MAX_BUFS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jg	LBB0_9
## %bb.1:
	movl	%ecx, %r14d
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	16(%r15), %rax
	movq	(%rax), %r13
	cmpl	$129, %ecx
	je	LBB0_4
## %bb.2:
	cmpl	$128, %r14d
	jne	LBB0_8
## %bb.3:
	movq	_ADMA_CH_CTRL_DIR_MEM2AHUB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	decq	%rdi
	callq	_ADMA_CH_CONFIG_SRC_BUF
	movl	%eax, 28(%rbx)
	movl	(%r15), %edi
	movl	28(%r13), %esi
	movl	32(%r13), %edx
	callq	_ADMA_CH_REG_FIELD_VAL
	movl	%eax, 16(%rbx)
	leaq	40(%rbx), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_ADMA_CH_CTRL_DIR_AHUB2MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	8(%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	decq	%rdi
	callq	_ADMA_CH_CONFIG_TRG_BUF
	movl	%eax, 28(%rbx)
	movl	(%r15), %edi
	movl	24(%r13), %edx
	movl	28(%r13), %esi
	callq	_ADMA_CH_REG_FIELD_VAL
	movl	%eax, 16(%rbx)
	leaq	32(%rbx), %rax
LBB0_5:
	movq	%r12, (%rax)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_ADMA_CH_CTRL_DIR
	movq	_ADMA_CH_CTRL_MODE_CONTINUOUS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_ADMA_CH_CTRL_FLOWCTRL_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	orl	%eax, 16(%rbx)
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	*16(%r13)
	orl	%eax, 28(%rbx)
	movl	$1, %edi
	callq	_ADMA_CH_CONFIG_WEIGHT_FOR_WRR
	orl	%eax, 28(%rbx)
	cmpq	$0, 8(%r13)
	je	LBB0_7
## %bb.6:
	movl	$8, %edi
	callq	_TEGRA186_ADMA_CH_CONFIG_OUTSTANDING_REQS
	orl	%eax, 28(%rbx)
LBB0_7:
	movl	(%r13), %eax
	movl	%eax, 24(%rbx)
	movq	_ADMA_CH_TC_COUNT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	8(%rbx), %eax
	movl	%eax, 20(%rbx)
	movq	%r15, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tegra_adma_request_alloc       ## TAILCALL
LBB0_8:
	movq	%r15, %rdi
	callq	_tdc2dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADMA_CH_CONFIG_MAX_BUFS,8,3    ## @ADMA_CH_CONFIG_MAX_BUFS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ADMA_CH_CTRL_DIR_MEM2AHUB,4,2  ## @ADMA_CH_CTRL_DIR_MEM2AHUB
	.comm	_ADMA_CH_CTRL_DIR_AHUB2MEM,4,2  ## @ADMA_CH_CTRL_DIR_AHUB2MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA direction is not supported\n"

	.comm	_ADMA_CH_CTRL_MODE_CONTINUOUS,4,2 ## @ADMA_CH_CTRL_MODE_CONTINUOUS
	.comm	_ADMA_CH_CTRL_FLOWCTRL_EN,4,2   ## @ADMA_CH_CTRL_FLOWCTRL_EN
	.comm	_ADMA_CH_TC_COUNT_MASK,4,2      ## @ADMA_CH_TC_COUNT_MASK
	.no_dead_strip	_tegra_adma_set_xfer_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_adma_set_xfer_params
_tegra_adma_set_xfer_params:            ; @tegra_adma_set_xfer_params
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _ADMA_CH_CONFIG_MAX_BUFS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ADMA_CH_CONFIG_MAX_BUFS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.gt	LBB0_9
; %bb.1:
	mov	x19, x3
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x9, [x0, #16]
	ldr	x25, [x9]
	cmp	w3, #129
	b.eq	LBB0_4
; %bb.2:
	cmp	w19, #128
	b.ne	LBB0_8
; %bb.3:
Lloh3:
	adrp	x9, _ADMA_CH_CTRL_DIR_MEM2AHUB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ADMA_CH_CTRL_DIR_MEM2AHUB@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x9]
	ldr	w23, [x20, #4]
	sub	x0, x8, #1
	bl	_ADMA_CH_CONFIG_SRC_BUF
	str	w0, [x21, #28]
	ldr	w0, [x20]
	ldp	w1, w2, [x25, #28]
	bl	_ADMA_CH_REG_FIELD_VAL
	str	w0, [x21, #16]
	add	x8, x21, #40
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x9, _ADMA_CH_CTRL_DIR_AHUB2MEM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ADMA_CH_CTRL_DIR_AHUB2MEM@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x9]
	ldr	w23, [x20, #8]
	sub	x0, x8, #1
	bl	_ADMA_CH_CONFIG_TRG_BUF
	str	w0, [x21, #28]
	ldr	w0, [x20]
	ldp	w2, w1, [x25, #24]
	bl	_ADMA_CH_REG_FIELD_VAL
	str	w0, [x21, #16]
	add	x8, x21, #32
LBB0_5:
	str	x22, [x8]
	mov	x0, x24
	bl	_ADMA_CH_CTRL_DIR
Lloh9:
	adrp	x8, _ADMA_CH_CTRL_MODE_CONTINUOUS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ADMA_CH_CTRL_MODE_CONTINUOUS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh12:
	adrp	x9, _ADMA_CH_CTRL_FLOWCTRL_EN@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ADMA_CH_CTRL_FLOWCTRL_EN@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x21, #16]
	orr	w8, w8, w9
	str	w8, [x21, #16]
	ldr	x8, [x25, #16]
	mov	x0, x23
	blr	x8
	ldr	w8, [x21, #28]
	orr	w8, w8, w0
	str	w8, [x21, #28]
	mov	w0, #1
	bl	_ADMA_CH_CONFIG_WEIGHT_FOR_WRR
	ldr	w8, [x21, #28]
	orr	w8, w8, w0
	str	w8, [x21, #28]
	ldr	x8, [x25, #8]
	cbz	x8, LBB0_7
; %bb.6:
	mov	w0, #8
	bl	_TEGRA186_ADMA_CH_CONFIG_OUTSTANDING_REQS
	ldr	w8, [x21, #28]
	orr	w8, w8, w0
	str	w8, [x21, #28]
LBB0_7:
	ldr	w8, [x25]
	ldr	w9, [x21, #8]
Lloh15:
	adrp	x10, _ADMA_CH_TC_COUNT_MASK@GOTPAGE
Lloh16:
	ldr	x10, [x10, _ADMA_CH_TC_COUNT_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	and	w9, w10, w9
	stp	w9, w8, [x21, #20]
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_tegra_adma_request_alloc
LBB0_8:
	mov	x0, x20
	bl	_tdc2dev
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_9:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ADMA_CH_CONFIG_MAX_BUFS,8,3    ; @ADMA_CH_CONFIG_MAX_BUFS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ADMA_CH_CTRL_DIR_MEM2AHUB,4,2  ; @ADMA_CH_CTRL_DIR_MEM2AHUB
	.comm	_ADMA_CH_CTRL_DIR_AHUB2MEM,4,2  ; @ADMA_CH_CTRL_DIR_AHUB2MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA direction is not supported\n"

	.comm	_ADMA_CH_CTRL_MODE_CONTINUOUS,4,2 ; @ADMA_CH_CTRL_MODE_CONTINUOUS
	.comm	_ADMA_CH_CTRL_FLOWCTRL_EN,4,2   ; @ADMA_CH_CTRL_FLOWCTRL_EN
	.comm	_ADMA_CH_TC_COUNT_MASK,4,2      ; @ADMA_CH_TC_COUNT_MASK
	.no_dead_strip	_tegra_adma_set_xfer_params
.subsections_via_symbols
