	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_cqdma_start
_mtk_cqdma_start:                       ## @mtk_cqdma_start
	.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	$1, %esi
	callq	_mtk_cqdma_poll_engine_done
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	movl	12(%r14), %edi
	callq	_to_cqdma_dev
	movl	%eax, %edi
	callq	_cqdma2dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
LBB0_2:
	movq	_MTK_CQDMA_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MTK_CQDMA_WARM_RST_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_mtk_dma_set
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_mtk_cqdma_poll_engine_done
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	movl	12(%r14), %edi
	callq	_to_cqdma_dev
	movl	%eax, %edi
	callq	_cqdma2dev
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
LBB0_4:
	movq	_MTK_CQDMA_SRC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MTK_CQDMA_ADDR_LIMIT@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	andl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_mtk_dma_set
	movq	_MTK_CQDMA_SRC2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mtk_dma_set
	movq	_MTK_CQDMA_DST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	andl	4(%r14), %edx
	movq	%rbx, %rdi
	callq	_mtk_dma_set
	movq	_MTK_CQDMA_DST2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mtk_dma_set
	movq	_MTK_CQDMA_LEN1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	movq	%rbx, %rdi
	callq	_mtk_dma_set
	movq	_MTK_CQDMA_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MTK_CQDMA_EN_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtk_dma_set                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cqdma wait transaction timeout\n"

	.comm	_MTK_CQDMA_RESET,4,2            ## @MTK_CQDMA_RESET
	.comm	_MTK_CQDMA_WARM_RST_BIT,4,2     ## @MTK_CQDMA_WARM_RST_BIT
L_.str.1:                               ## @.str.1
	.asciz	"cqdma warm reset timeout\n"

	.comm	_MTK_CQDMA_SRC,4,2              ## @MTK_CQDMA_SRC
	.comm	_MTK_CQDMA_ADDR_LIMIT,4,2       ## @MTK_CQDMA_ADDR_LIMIT
	.comm	_MTK_CQDMA_SRC2,4,2             ## @MTK_CQDMA_SRC2
	.comm	_MTK_CQDMA_DST,4,2              ## @MTK_CQDMA_DST
	.comm	_MTK_CQDMA_DST2,4,2             ## @MTK_CQDMA_DST2
	.comm	_MTK_CQDMA_LEN1,4,2             ## @MTK_CQDMA_LEN1
	.comm	_MTK_CQDMA_EN,4,2               ## @MTK_CQDMA_EN
	.comm	_MTK_CQDMA_EN_BIT,4,2           ## @MTK_CQDMA_EN_BIT
	.comm	_MTK_CQDMA_ADDR2_SHFIT,4,2      ## @MTK_CQDMA_ADDR2_SHFIT
	.no_dead_strip	_mtk_cqdma_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_cqdma_start
_mtk_cqdma_start:                       ; @mtk_cqdma_start
	.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	x20, x1
	mov	x19, x0
	mov	w1, #1
	bl	_mtk_cqdma_poll_engine_done
	tbz	x0, #63, LBB0_2
; %bb.1:
	ldr	w0, [x20, #12]
	bl	_to_cqdma_dev
	bl	_cqdma2dev
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_2:
Lloh2:
	adrp	x8, _MTK_CQDMA_RESET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MTK_CQDMA_RESET@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _MTK_CQDMA_WARM_RST_BIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MTK_CQDMA_WARM_RST_BIT@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mtk_dma_set
	mov	x0, x19
	mov	w1, #1
	bl	_mtk_cqdma_poll_engine_done
	tbz	x0, #63, LBB0_4
; %bb.3:
	ldr	w0, [x20, #12]
	bl	_to_cqdma_dev
	bl	_cqdma2dev
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_4:
Lloh10:
	adrp	x8, _MTK_CQDMA_SRC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MTK_CQDMA_SRC@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w8, [x20]
Lloh13:
	adrp	x21, _MTK_CQDMA_ADDR_LIMIT@GOTPAGE
Lloh14:
	ldr	x21, [x21, _MTK_CQDMA_ADDR_LIMIT@GOTPAGEOFF]
	ldr	w9, [x21]
	and	w2, w9, w8
	mov	x0, x19
	bl	_mtk_dma_set
Lloh15:
	adrp	x8, _MTK_CQDMA_SRC2@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MTK_CQDMA_SRC2@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_mtk_dma_set
Lloh18:
	adrp	x8, _MTK_CQDMA_DST@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MTK_CQDMA_DST@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldr	w8, [x20, #4]
	ldr	w9, [x21]
	and	w2, w9, w8
	mov	x0, x19
	bl	_mtk_dma_set
Lloh21:
	adrp	x8, _MTK_CQDMA_DST2@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MTK_CQDMA_DST2@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_mtk_dma_set
Lloh24:
	adrp	x8, _MTK_CQDMA_LEN1@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MTK_CQDMA_LEN1@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	ldr	w2, [x20, #8]
	mov	x0, x19
	bl	_mtk_dma_set
Lloh27:
	adrp	x8, _MTK_CQDMA_EN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MTK_CQDMA_EN@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x8, _MTK_CQDMA_EN_BIT@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MTK_CQDMA_EN_BIT@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	mov	x0, x19
	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
	b	_mtk_dma_set
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cqdma wait transaction timeout\n"

	.comm	_MTK_CQDMA_RESET,4,2            ; @MTK_CQDMA_RESET
	.comm	_MTK_CQDMA_WARM_RST_BIT,4,2     ; @MTK_CQDMA_WARM_RST_BIT
l_.str.1:                               ; @.str.1
	.asciz	"cqdma warm reset timeout\n"

	.comm	_MTK_CQDMA_SRC,4,2              ; @MTK_CQDMA_SRC
	.comm	_MTK_CQDMA_ADDR_LIMIT,4,2       ; @MTK_CQDMA_ADDR_LIMIT
	.comm	_MTK_CQDMA_SRC2,4,2             ; @MTK_CQDMA_SRC2
	.comm	_MTK_CQDMA_DST,4,2              ; @MTK_CQDMA_DST
	.comm	_MTK_CQDMA_DST2,4,2             ; @MTK_CQDMA_DST2
	.comm	_MTK_CQDMA_LEN1,4,2             ; @MTK_CQDMA_LEN1
	.comm	_MTK_CQDMA_EN,4,2               ; @MTK_CQDMA_EN
	.comm	_MTK_CQDMA_EN_BIT,4,2           ; @MTK_CQDMA_EN_BIT
	.comm	_MTK_CQDMA_ADDR2_SHFIT,4,2      ; @MTK_CQDMA_ADDR2_SHFIT
	.no_dead_strip	_mtk_cqdma_start
.subsections_via_symbols
