	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32_mdma_start_transfer
_stm32_mdma_start_transfer:             ## @stm32_mdma_start_transfer
	.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	%rdi, %rbx
	callq	_stm32_mdma_get_dev
	movq	%rax, %r12
	movq	24(%rbx), %r15
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_vchan_next_desc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_to_stm32_mdma_desc
	movq	%rax, 8(%rbx)
	movq	8(%rax), %rax
	movq	(%rax), %r14
	movq	$0, 16(%rbx)
	movq	%r15, %rdi
	callq	_STM32_MDMA_CCR
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rcx
	movl	(%rcx), %edx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_stm32_mdma_write
	movq	%r15, %rdi
	callq	_STM32_MDMA_CTCR
	movl	(%r14), %edx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_stm32_mdma_write
	movq	%r15, %rdi
	callq	_STM32_MDMA_CBNDTR
	movl	4(%r14), %edx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_stm32_mdma_write
	movq	%r15, %rdi
	callq	_STM32_MDMA_CSAR
	movl	8(%r14), %edx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_stm32_mdma_write
	movq	%r15, %rdi
	callq	_STM32_MDMA_CDAR
	movl	12(%r14), %edx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_stm32_mdma_write
	movq	%r15, %rdi
	callq	_STM32_MDMA_CBRUR
	movl	16(%r14), %edx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_stm32_mdma_write
	movq	%r15, %rdi
	callq	_STM32_MDMA_CLAR
	movl	20(%r14), %edx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_stm32_mdma_write
	movq	%r15, %rdi
	callq	_STM32_MDMA_CTBR
	movl	24(%r14), %edx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_stm32_mdma_write
	movq	%r15, %rdi
	callq	_STM32_MDMA_CMAR
	movl	28(%r14), %edx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_stm32_mdma_write
	movq	%r15, %rdi
	callq	_STM32_MDMA_CMDR
	movl	32(%r14), %edx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_stm32_mdma_write
	movq	%r15, %rdi
	callq	_STM32_MDMA_CISR
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_stm32_mdma_read
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, %r13
	movq	%r15, %rdi
	callq	_STM32_MDMA_CIFCR
	movq	%r12, %rdi
	movq	%rax, %rsi
	movq	%r13, %rdx
	callq	_stm32_mdma_set_bits
LBB0_3:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_stm32_mdma_dump_reg
	movq	%r15, %rdi
	callq	_STM32_MDMA_CCR
	movq	_STM32_MDMA_CCR_EN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_stm32_mdma_set_bits
	movq	_STM32_MDMA_CTCR_SWRM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_STM32_MDMA_CCR
	movq	_STM32_MDMA_CCR_SWRQ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_stm32_mdma_set_bits
LBB0_5:
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	callq	_chan2dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
LBB0_6:
	movq	$0, 8(%rbx)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STM32_MDMA_CCR_EN,8,3          ## @STM32_MDMA_CCR_EN
	.comm	_STM32_MDMA_CTCR_SWRM,4,2       ## @STM32_MDMA_CTCR_SWRM
	.comm	_STM32_MDMA_CCR_SWRQ,8,3        ## @STM32_MDMA_CCR_SWRQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vchan %pK: started\n"

	.no_dead_strip	_stm32_mdma_start_transfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm32_mdma_start_transfer
_stm32_mdma_start_transfer:             ; @stm32_mdma_start_transfer
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	bl	_stm32_mdma_get_dev
	mov	x21, x0
	ldr	x22, [x19, #24]
	add	x20, x19, #4
	mov	x0, x20
	bl	_vchan_next_desc
	cbz	x0, LBB0_6
; %bb.1:
	bl	_to_stm32_mdma_desc
	ldr	x8, [x0, #8]
	ldr	x24, [x8]
	stp	x0, xzr, [x19, #8]
	mov	x0, x22
	bl	_STM32_MDMA_CCR
	mov	x1, x0
	ldr	x8, [x19, #8]
	ldr	w2, [x8]
	mov	x0, x21
	bl	_stm32_mdma_write
	mov	x0, x22
	bl	_STM32_MDMA_CTCR
	mov	x1, x0
	ldr	w2, [x24]
	mov	x0, x21
	bl	_stm32_mdma_write
	mov	x0, x22
	bl	_STM32_MDMA_CBNDTR
	mov	x1, x0
	ldr	w2, [x24, #4]
	mov	x0, x21
	bl	_stm32_mdma_write
	mov	x0, x22
	bl	_STM32_MDMA_CSAR
	mov	x1, x0
	ldr	w2, [x24, #8]
	mov	x0, x21
	bl	_stm32_mdma_write
	mov	x0, x22
	bl	_STM32_MDMA_CDAR
	mov	x1, x0
	ldr	w2, [x24, #12]
	mov	x0, x21
	bl	_stm32_mdma_write
	mov	x0, x22
	bl	_STM32_MDMA_CBRUR
	mov	x1, x0
	ldr	w2, [x24, #16]
	mov	x0, x21
	bl	_stm32_mdma_write
	mov	x0, x22
	bl	_STM32_MDMA_CLAR
	mov	x1, x0
	ldr	w2, [x24, #20]
	mov	x0, x21
	bl	_stm32_mdma_write
	mov	x0, x22
	bl	_STM32_MDMA_CTBR
	mov	x1, x0
	ldr	w2, [x24, #24]
	mov	x0, x21
	bl	_stm32_mdma_write
	mov	x0, x22
	bl	_STM32_MDMA_CMAR
	mov	x1, x0
	ldr	w2, [x24, #28]
	mov	x0, x21
	bl	_stm32_mdma_write
	mov	x0, x22
	bl	_STM32_MDMA_CMDR
	mov	x1, x0
	ldr	w2, [x24, #32]
	mov	x0, x21
	bl	_stm32_mdma_write
	mov	x0, x22
	bl	_STM32_MDMA_CISR
	mov	x1, x0
	mov	x0, x21
	bl	_stm32_mdma_read
	cbz	x0, LBB0_3
; %bb.2:
	mov	x23, x0
	mov	x0, x22
	bl	_STM32_MDMA_CIFCR
	mov	x1, x0
	mov	x0, x21
	mov	x2, x23
	bl	_stm32_mdma_set_bits
LBB0_3:
	mov	x0, x19
	bl	_stm32_mdma_dump_reg
	mov	x0, x22
	bl	_STM32_MDMA_CCR
	mov	x1, x0
Lloh0:
	adrp	x8, _STM32_MDMA_CCR_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STM32_MDMA_CCR_EN@GOTPAGEOFF]
Lloh2:
	ldr	x2, [x8]
	mov	x0, x21
	bl	_stm32_mdma_set_bits
	ldr	w8, [x24]
Lloh3:
	adrp	x9, _STM32_MDMA_CTCR_SWRM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STM32_MDMA_CTCR_SWRM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x22
	bl	_STM32_MDMA_CCR
	mov	x1, x0
Lloh6:
	adrp	x8, _STM32_MDMA_CCR_SWRQ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STM32_MDMA_CCR_SWRQ@GOTPAGEOFF]
Lloh8:
	ldr	x2, [x8]
	mov	x0, x21
	bl	_stm32_mdma_set_bits
LBB0_5:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_chan2dev
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_dev_dbg
LBB0_6:
	str	xzr, [x19, #8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_STM32_MDMA_CCR_EN,8,3          ; @STM32_MDMA_CCR_EN
	.comm	_STM32_MDMA_CTCR_SWRM,4,2       ; @STM32_MDMA_CTCR_SWRM
	.comm	_STM32_MDMA_CCR_SWRQ,8,3        ; @STM32_MDMA_CCR_SWRQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vchan %pK: started\n"

	.no_dead_strip	_stm32_mdma_start_transfer
.subsections_via_symbols
