	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_adma_prep_dma_cyclic
_tegra_adma_prep_dma_cyclic:            ## @tegra_adma_prep_dma_cyclic
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, %rbx
	movq	%rdx, %r14
	movl	%esi, %r12d
	callq	_to_tegra_adma_chan
	movq	%rax, %r13
	testq	%r14, %r14
	je	LBB0_3
## %bb.1:
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.2:
	movq	_ADMA_CH_TC_COUNT_MASK@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jb	LBB0_3
## %bb.5:
	movq	%r14, %rax
	orq	%rbx, %rax
	shrq	$32, %rax
	je	LBB0_6
## %bb.7:
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%rbx
	testq	%rdx, %rdx
	je	LBB0_10
LBB0_9:
	movq	%r13, %rdi
	callq	_tdc2dev
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_3:
	movq	%r13, %rdi
	callq	_tdc2dev
	leaq	L_.str(%rip), %rsi
LBB0_4:
	movl	%eax, %edi
	callq	_dev_err
LBB0_15:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $edx killed $edx def $rdx
                                        ## kill: def $eax killed $eax def $rax
	testq	%rdx, %rdx
	jne	LBB0_9
LBB0_10:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, %edi
	movl	$4, %esi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	_GFP_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	movq	%rax, %r15
	movq	%r14, (%rax)
	movq	%rbx, 8(%rax)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r15)
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_tegra_adma_set_xfer_params
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_15
LBB0_11:
	movq	%r13, %rdi
	callq	_tdc2dev
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_4
LBB0_16:
	addq	$24, %r15
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vchan_tx_prep                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ADMA_CH_TC_COUNT_MASK,8,3      ## @ADMA_CH_TC_COUNT_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid buffer/period len\n"

L_.str.1:                               ## @.str.1
	.asciz	"buf_len not a multiple of period_len\n"

L_.str.2:                               ## @.str.2
	.asciz	"invalid buffer alignment\n"

	.comm	_GFP_NOWAIT,4,2                 ## @GFP_NOWAIT
	.no_dead_strip	_tegra_adma_prep_dma_cyclic
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_adma_prep_dma_cyclic
_tegra_adma_prep_dma_cyclic:            ; @tegra_adma_prep_dma_cyclic
	.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
	mov	x19, x5
	mov	x21, x4
	mov	x23, x3
	mov	x24, x2
	mov	x22, x1
	bl	_to_tegra_adma_chan
	mov	x20, x0
	cbz	x24, LBB0_5
; %bb.1:
	cbz	x23, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _ADMA_CH_TC_COUNT_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADMA_CH_TC_COUNT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x23
	b.lo	LBB0_5
; %bb.3:
	udiv	x26, x24, x23
	msub	x8, x26, x23, x24
	cbz	x8, LBB0_8
; %bb.4:
	mov	x0, x20
	bl	_tdc2dev
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:
	mov	x0, x20
	bl	_tdc2dev
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
LBB0_6:
	bl	_dev_err
LBB0_7:
	mov	x0, #0
	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
LBB0_8:
	mov	x0, x22
	mov	w1, #4
	bl	_IS_ALIGNED
	cbz	w0, LBB0_12
; %bb.9:
Lloh7:
	adrp	x8, _GFP_NOWAIT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_NOWAIT@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.10:
	mov	x25, x0
	stp	x24, x23, [x0]
	str	x26, [x0, #16]
	mov	x0, x20
	mov	x1, x25
	mov	x2, x22
	mov	x3, x21
	bl	_tegra_adma_set_xfer_params
	cbz	x0, LBB0_13
; %bb.11:
	mov	x0, x25
	bl	_kfree
	b	LBB0_7
LBB0_12:
	mov	x0, x20
	bl	_tdc2dev
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_13:
	add	x1, x25, #24
	mov	x0, x20
	mov	x2, 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	_vchan_tx_prep
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ADMA_CH_TC_COUNT_MASK,8,3      ; @ADMA_CH_TC_COUNT_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid buffer/period len\n"

l_.str.1:                               ; @.str.1
	.asciz	"buf_len not a multiple of period_len\n"

l_.str.2:                               ; @.str.2
	.asciz	"invalid buffer alignment\n"

	.comm	_GFP_NOWAIT,4,2                 ; @GFP_NOWAIT
	.no_dead_strip	_tegra_adma_prep_dma_cyclic
.subsections_via_symbols
