	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32_mdma_set_xfer_param
_stm32_mdma_set_xfer_param:             ## @stm32_mdma_set_xfer_param
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -76(%rbp)                 ## 4-byte Spill
	movq	%r8, -136(%rbp)                 ## 8-byte Spill
	movq	%rcx, -128(%rbp)                ## 8-byte Spill
	movq	%rdx, -120(%rbp)                ## 8-byte Spill
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	callq	_stm32_mdma_get_dev
	movq	%rax, %rbx
	movl	8(%r15), %edi
	movl	12(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	16(%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	20(%r15), %r14d
	movl	24(%r15), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	callq	_STM32_MDMA_CCR
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_stm32_mdma_read
	movl	%eax, -88(%rbp)                 ## 4-byte Spill
	movl	8(%r15), %edi
	callq	_STM32_MDMA_CTCR
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_stm32_mdma_read
	movl	%eax, %r13d
	movl	8(%r15), %edi
	callq	_STM32_MDMA_CTBR
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_stm32_mdma_read
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_STM32_MDMA_CTCR_SWRM@GOTPCREL(%rip), %rax
	movq	_STM32_MDMA_CTCR_CFG_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	movl	(%rax), %eax
	orl	%r12d, %eax
	notl	%eax
	andl	%r13d, %eax
	movq	%r15, %rbx
	andl	36(%r15), %r12d
	orl	%eax, %r12d
	movl	%r12d, %edi
	callq	_STM32_MDMA_CTCR_LEN2_GET
                                        ## kill: def $eax killed $eax def $rax
	movq	_STM32_MDMA_CTCR_LEN2_MSK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	leal	-1(%rax), %edi
	callq	_STM32_MDMA_CTCR_TLEN
	movl	-72(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	imull	-44(%rbp), %r14d                ## 4-byte Folded Reload
	movq	_STM32_MDMA_MAX_BURST@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	cmpl	%edi, %r14d
	ja	LBB0_2
## %bb.1:
	movl	%esi, %ecx
	imull	%edx, %ecx
	cmpl	%edi, %ecx
	ja	LBB0_2
## %bb.3:
	movl	%eax, %r14d
	movq	_STM32_MDMA_CTCR_PKE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_is_power_of_2
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	jg	LBB0_7
LBB0_5:
	movl	-72(%rbp), %edi                 ## 4-byte Reload
	callq	_is_power_of_2
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_10
LBB0_7:
	movq	%rbx, %rdi
	callq	_chan2dev
	leaq	L_.str.1(%rip), %rsi
LBB0_8:
	xorl	%r12d, %r12d
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_9
LBB0_2:
	movq	%rbx, %rdi
	callq	_chan2dev
	movl	(%r13), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_21:
	movl	%r12d, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	%r13d, %edx
	notl	%r15d
	andl	%r15d, %r12d
	orl	%r14d, %r12d
	movq	_STM32_MDMA_CCR_SWRQ@GOTPCREL(%rip), %rax
	movq	_STM32_MDMA_CCR_WEX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	orl	(%rax), %r15d
	notl	%edx
	movq	_STM32_MDMA_CCR_HEX@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	andl	%r12d, %edx
	movl	%edx, -84(%rbp)                 ## 4-byte Spill
	movq	_STM32_MDMA_CCR_BEX@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	_STM32_MDMA_CCR_PL_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	%rbx, %r12
	movl	44(%rbx), %edi
	callq	_STM32_MDMA_CCR_PL
	movl	%eax, %r14d
	movq	_STM32_MDMA_CTBR_TSEL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	andl	%eax, %ebx
	movl	40(%r12), %edi
	callq	_STM32_MDMA_CTBR_TSEL
	orl	%ebx, %eax
	movl	%eax, -80(%rbp)
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	cmpl	$129, %eax
	je	LBB0_18
## %bb.11:
	cmpl	$128, %eax
	jne	LBB0_25
## %bb.12:
	movl	32(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %esi
	callq	_stm32_mdma_get_width
	movq	%r12, %rbx
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_21
## %bb.13:
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	movq	_STM32_MDMA_CTCR_DSIZE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%r12d, %edi
	callq	_STM32_MDMA_CTCR_DSIZE
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	16(%rbp), %edi
	movq	-104(%rbp), %r14                ## 8-byte Reload
	movl	%r14d, %esi
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	movl	%r13d, %ecx
	callq	_stm32_mdma_get_best_burst
	movl	%eax, (%rbx)
	movq	_STM32_MDMA_CTCR_DBURST_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	movl	%eax, %edi
	callq	_ilog2
	movl	%eax, %edi
	callq	_STM32_MDMA_CTCR_DBURST
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	-76(%rbp), %edi                 ## 4-byte Reload
	movl	16(%rbp), %esi
	movl	%r14d, %edx
	callq	_stm32_mdma_get_max_width
	movl	%eax, %r14d
	movl	%eax, 4(%rbx)
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_stm32_mdma_get_width
	testl	%eax, %eax
	js	LBB0_20
## %bb.14:
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	notl	%edx
	movl	-84(%rbp), %ecx                 ## 4-byte Reload
	andl	%edx, %ecx
	orl	-56(%rbp), %ecx                 ## 4-byte Folded Reload
	notl	%r13d
	andl	%ecx, %r13d
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	orl	%r13d, %edx
	movq	_STM32_MDMA_CTCR_SSIZE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	movq	_STM32_MDMA_CTCR_SINCOS_MASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	andl	%edx, %ebx
	movl	%eax, %r13d
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movl	%eax, %edi
	callq	_STM32_MDMA_CTCR_SSIZE
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%r13d, %edi
	callq	_STM32_MDMA_CTCR_SINCOS
	movl	%eax, %r13d
	orl	-48(%rbp), %r13d                ## 4-byte Folded Reload
	orl	%ebx, %r13d
	movq	_STM32_MDMA_MAX_BUF_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	divl	%r14d
	movl	16(%rbp), %edi
	movq	-104(%rbp), %rsi                ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%eax, %edx
	movl	%r14d, %ecx
	callq	_stm32_mdma_get_best_burst
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	_STM32_MDMA_CTCR_SBURST_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%r13d, %ebx
	movl	%eax, %edi
	callq	_ilog2
	movl	%eax, %edi
	callq	_STM32_MDMA_CTCR_SBURST
	movl	%eax, %r13d
	movq	_STM32_MDMA_CTBR_DBUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-80(%rbp), %rsi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_stm32_mdma_set_bus
	xorl	%eax, %eax
	cmpl	-76(%rbp), %r12d                ## 4-byte Folded Reload
	je	LBB0_16
## %bb.15:
	movq	_STM32_MDMA_CTCR_PKE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_16:
	orl	%eax, %ebx
	orl	%ebx, %r13d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	callq	_STM32_MDMA_CDAR
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_17
LBB0_18:
	movl	28(%r12), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %esi
	callq	_stm32_mdma_get_width
	movq	%r12, %rbx
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_21
## %bb.19:
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	movq	_STM32_MDMA_CTCR_SSIZE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	%r12d, %edi
	callq	_STM32_MDMA_CTCR_SSIZE
	movl	%eax, -108(%rbp)                ## 4-byte Spill
	movl	16(%rbp), %edi
	movq	-104(%rbp), %r14                ## 8-byte Reload
	movl	%r14d, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	%r13d, %ecx
	callq	_stm32_mdma_get_best_burst
	movq	_STM32_MDMA_CTCR_SBURST_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	movl	%eax, %edi
	callq	_ilog2
	movl	%eax, %edi
	callq	_STM32_MDMA_CTCR_SBURST
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	-76(%rbp), %edi                 ## 4-byte Reload
	movl	16(%rbp), %esi
	movl	%r14d, %edx
	callq	_stm32_mdma_get_max_width
	movl	%eax, %r14d
	movl	%eax, 4(%rbx)
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_stm32_mdma_get_width
	testl	%eax, %eax
	js	LBB0_20
## %bb.22:
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	notl	%edx
	movl	-84(%rbp), %ecx                 ## 4-byte Reload
	andl	%edx, %ecx
	orl	-108(%rbp), %ecx                ## 4-byte Folded Reload
	notl	%r13d
	andl	%ecx, %r13d
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	orl	%r13d, %esi
	movq	_STM32_MDMA_CTCR_DSIZE_MASK@GOTPCREL(%rip), %rdx
	movq	_STM32_MDMA_CTCR_DINCOS_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rdx), %ebx
	notl	%ebx
	andl	%esi, %ebx
	movl	%eax, %r13d
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%eax, %edi
	callq	_STM32_MDMA_CTCR_DSIZE
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, %edi
	callq	_STM32_MDMA_CTCR_DINCOS
	movl	%eax, %r13d
	orl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	orl	%ebx, %r13d
	movq	_STM32_MDMA_MAX_BUF_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	divl	%r14d
	movl	16(%rbp), %edi
	movq	-104(%rbp), %rsi                ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%eax, %edx
	movl	%r14d, %ecx
	callq	_stm32_mdma_get_best_burst
	movq	_STM32_MDMA_CTCR_DBURST_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%r13d, %ebx
	movl	%eax, %edi
	callq	_ilog2
	movl	%eax, %edi
	callq	_STM32_MDMA_CTCR_DBURST
	movl	%eax, %r13d
	movq	_STM32_MDMA_CTBR_SBUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-80(%rbp), %rsi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_stm32_mdma_set_bus
	xorl	%eax, %eax
	cmpl	%r12d, -52(%rbp)                ## 4-byte Folded Reload
	je	LBB0_24
## %bb.23:
	movq	_STM32_MDMA_CTCR_PKE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_24:
	orl	%eax, %ebx
	orl	%ebx, %r13d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	callq	_STM32_MDMA_CSAR
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
LBB0_17:
	callq	_stm32_mdma_write
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movq	-120(%rbp), %rdx                ## 8-byte Reload
	movl	-88(%rbp), %esi                 ## 4-byte Reload
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	notl	%r15d
	andl	%r15d, %esi
	orl	%edi, %esi
	movl	%esi, (%rdx)
	movl	%r13d, (%rax)
	movl	-80(%rbp), %eax
	movl	%eax, (%rcx)
	xorl	%r12d, %r12d
	jmp	LBB0_21
LBB0_25:
	movq	%r12, %rdi
	callq	_chan2dev
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_8
LBB0_20:
	movl	%eax, %r12d
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_STM32_MDMA_CTCR_SWRM,4,2       ## @STM32_MDMA_CTCR_SWRM
	.comm	_STM32_MDMA_CTCR_CFG_MASK,4,2   ## @STM32_MDMA_CTCR_CFG_MASK
	.comm	_STM32_MDMA_CTCR_LEN2_MSK,4,2   ## @STM32_MDMA_CTCR_LEN2_MSK
	.comm	_STM32_MDMA_CTCR_PKE,4,2        ## @STM32_MDMA_CTCR_PKE
	.comm	_STM32_MDMA_MAX_BURST,4,2       ## @STM32_MDMA_MAX_BURST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"burst size * bus width higher than %d bytes\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"burst size must be a power of 2\n"

	.comm	_STM32_MDMA_CCR_SWRQ,4,2        ## @STM32_MDMA_CCR_SWRQ
	.comm	_STM32_MDMA_CCR_WEX,4,2         ## @STM32_MDMA_CCR_WEX
	.comm	_STM32_MDMA_CCR_HEX,4,2         ## @STM32_MDMA_CCR_HEX
	.comm	_STM32_MDMA_CCR_BEX,4,2         ## @STM32_MDMA_CCR_BEX
	.comm	_STM32_MDMA_CCR_PL_MASK,4,2     ## @STM32_MDMA_CCR_PL_MASK
	.comm	_STM32_MDMA_CTBR_TSEL_MASK,4,2  ## @STM32_MDMA_CTBR_TSEL_MASK
	.comm	_STM32_MDMA_CTCR_DSIZE_MASK,4,2 ## @STM32_MDMA_CTCR_DSIZE_MASK
	.comm	_STM32_MDMA_CTCR_DBURST_MASK,4,2 ## @STM32_MDMA_CTCR_DBURST_MASK
	.comm	_STM32_MDMA_CTCR_SSIZE_MASK,4,2 ## @STM32_MDMA_CTCR_SSIZE_MASK
	.comm	_STM32_MDMA_CTCR_SINCOS_MASK,4,2 ## @STM32_MDMA_CTCR_SINCOS_MASK
	.comm	_STM32_MDMA_MAX_BUF_LEN,4,2     ## @STM32_MDMA_MAX_BUF_LEN
	.comm	_STM32_MDMA_CTCR_SBURST_MASK,4,2 ## @STM32_MDMA_CTCR_SBURST_MASK
	.comm	_STM32_MDMA_CTBR_DBUS,4,2       ## @STM32_MDMA_CTBR_DBUS
	.comm	_STM32_MDMA_CTCR_DINCOS_MASK,4,2 ## @STM32_MDMA_CTCR_DINCOS_MASK
	.comm	_STM32_MDMA_CTBR_SBUS,4,2       ## @STM32_MDMA_CTBR_SBUS
L_.str.2:                               ## @.str.2
	.asciz	"Dma direction is not supported\n"

	.no_dead_strip	_stm32_mdma_set_xfer_param
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm32_mdma_set_xfer_param
_stm32_mdma_set_xfer_param:             ; @stm32_mdma_set_xfer_param
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	stp	w5, w6, [sp, #76]               ; 8-byte Folded Spill
	stp	x3, x4, [sp, #56]               ; 16-byte Folded Spill
	str	x2, [sp, #48]                   ; 8-byte Folded Spill
	str	w1, [sp, #84]                   ; 4-byte Folded Spill
	mov	x24, x0
	bl	_stm32_mdma_get_dev
	mov	x25, x0
	ldp	w22, w28, [x24, #16]
	ldr	w20, [x24, #24]
	ldp	w0, w21, [x24, #8]
	bl	_STM32_MDMA_CCR
	mov	x1, x0
	mov	x0, x25
	bl	_stm32_mdma_read
	str	w0, [sp, #72]                   ; 4-byte Folded Spill
	ldr	w0, [x24, #8]
	bl	_STM32_MDMA_CTCR
	mov	x1, x0
	mov	x0, x25
	bl	_stm32_mdma_read
	mov	x26, x0
	ldr	w0, [x24, #8]
	bl	_STM32_MDMA_CTBR
	mov	x1, x0
	mov	x0, x25
	bl	_stm32_mdma_read
	str	w0, [sp, #88]                   ; 4-byte Folded Spill
Lloh0:
	adrp	x8, _STM32_MDMA_CTCR_SWRM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STM32_MDMA_CTCR_SWRM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _STM32_MDMA_CTCR_CFG_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STM32_MDMA_CTCR_CFG_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w8, w26, w8
	ldr	w10, [x24, #36]
	and	w9, w10, w9
	orr	w26, w8, w9
	mov	x0, x26
	bl	_STM32_MDMA_CTCR_LEN2_GET
	mov	x19, x0
Lloh6:
	adrp	x8, _STM32_MDMA_CTCR_LEN2_MSK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STM32_MDMA_CTCR_LEN2_MSK@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
	sub	w0, w0, #1
	bl	_STM32_MDMA_CTCR_TLEN
	mov	x11, x22
	mul	w8, w28, w21
Lloh9:
	adrp	x27, _STM32_MDMA_MAX_BURST@GOTPAGE
Lloh10:
	ldr	x27, [x27, _STM32_MDMA_MAX_BURST@GOTPAGEOFF]
	ldr	w9, [x27]
	mul	w10, w20, w22
	cmp	w8, w9
	ccmp	w10, w9, #2, ls
	b.ls	LBB0_2
; %bb.1:
	mov	x0, x24
	bl	_chan2dev
	ldr	w8, [x27]
	str	x8, [sp]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_2:
	mov	x22, x20
	mov	x27, x0
	ldr	w20, [sp, #88]                  ; 4-byte Folded Reload
	stp	w21, w11, [sp, #40]             ; 8-byte Folded Spill
	str	x25, [sp, #32]                  ; 8-byte Folded Spill
Lloh13:
	adrp	x8, _STM32_MDMA_CTCR_PKE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _STM32_MDMA_CTCR_PKE@GOTPAGEOFF]
Lloh15:
	ldr	w25, [x8]
	mov	x0, x28
	bl	_is_power_of_2
	mov	x21, x28
	cbnz	w0, LBB0_4
; %bb.3:
	cmp	w21, #0
	b.gt	LBB0_6
LBB0_4:
	mov	x0, x22
	bl	_is_power_of_2
	cbnz	w0, LBB0_9
; %bb.5:
	cmp	w22, #1
	b.lt	LBB0_9
LBB0_6:
	mov	x0, x24
	bl	_chan2dev
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	bl	_dev_err
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w28, w8
LBB0_8:
	mov	x0, x28
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_9:
	bic	w8, w26, w23
	orr	w8, w8, w27
	bic	w8, w8, w25
	str	w8, [sp, #16]                   ; 4-byte Folded Spill
Lloh21:
	adrp	x8, _STM32_MDMA_CCR_SWRQ@GOTPAGE
Lloh22:
	ldr	x8, [x8, _STM32_MDMA_CCR_SWRQ@GOTPAGEOFF]
Lloh23:
	adrp	x9, _STM32_MDMA_CCR_WEX@GOTPAGE
Lloh24:
	ldr	x9, [x9, _STM32_MDMA_CCR_WEX@GOTPAGEOFF]
Lloh25:
	ldr	w26, [x8]
Lloh26:
	ldr	w27, [x9]
Lloh27:
	adrp	x8, _STM32_MDMA_CCR_HEX@GOTPAGE
Lloh28:
	ldr	x8, [x8, _STM32_MDMA_CCR_HEX@GOTPAGEOFF]
Lloh29:
	adrp	x9, _STM32_MDMA_CCR_BEX@GOTPAGE
Lloh30:
	ldr	x9, [x9, _STM32_MDMA_CCR_BEX@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
Lloh32:
	ldr	w28, [x9]
Lloh33:
	adrp	x8, _STM32_MDMA_CCR_PL_MASK@GOTPAGE
Lloh34:
	ldr	x8, [x8, _STM32_MDMA_CCR_PL_MASK@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	str	w8, [sp, #24]                   ; 4-byte Folded Spill
	ldr	w0, [x24, #44]
	bl	_STM32_MDMA_CCR_PL
	str	w0, [sp, #20]                   ; 4-byte Folded Spill
Lloh36:
	adrp	x8, _STM32_MDMA_CTBR_TSEL_MASK@GOTPAGE
Lloh37:
	ldr	x8, [x8, _STM32_MDMA_CTBR_TSEL_MASK@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	bic	w23, w20, w8
	ldr	w0, [x24, #40]
	bl	_STM32_MDMA_CTBR_TSEL
	orr	w8, w23, w0
	stur	w8, [x29, #-84]
	ldr	w8, [sp, #84]                   ; 4-byte Folded Reload
	cmp	w8, #129
	b.eq	LBB0_14
; %bb.10:
	cmp	w8, #128
	b.ne	LBB0_18
; %bb.11:
	str	w28, [sp, #88]                  ; 4-byte Folded Spill
	ldr	w21, [x24, #32]
	mov	x0, x24
	ldr	w23, [sp, #44]                  ; 4-byte Folded Reload
	mov	x1, x23
	bl	_stm32_mdma_get_width
	mov	x28, x0
	tbnz	w0, #31, LBB0_8
; %bb.12:
	str	w21, [sp, #40]                  ; 4-byte Folded Spill
	str	w27, [sp, #12]                  ; 4-byte Folded Spill
	str	w26, [sp, #84]                  ; 4-byte Folded Spill
Lloh39:
	adrp	x8, _STM32_MDMA_CTCR_DSIZE_MASK@GOTPAGE
Lloh40:
	ldr	x8, [x8, _STM32_MDMA_CTCR_DSIZE_MASK@GOTPAGEOFF]
Lloh41:
	ldr	w26, [x8]
	mov	x0, x28
	bl	_STM32_MDMA_CTCR_DSIZE
	str	w0, [sp, #8]                    ; 4-byte Folded Spill
	ldr	w27, [sp, #80]                  ; 4-byte Folded Reload
	mov	x0, x27
	mov	x21, x19
	mov	x1, x19
	mov	x2, x22
	mov	x3, x23
	bl	_stm32_mdma_get_best_burst
	str	w0, [x24]
Lloh42:
	adrp	x8, _STM32_MDMA_CTCR_DBURST_MASK@GOTPAGE
Lloh43:
	ldr	x8, [x8, _STM32_MDMA_CTCR_DBURST_MASK@GOTPAGEOFF]
Lloh44:
	ldr	w19, [x8]
	bl	_ilog2
	bl	_STM32_MDMA_CTCR_DBURST
	mov	x25, x0
	ldr	w0, [sp, #76]                   ; 4-byte Folded Reload
	mov	x1, x27
	mov	x2, x21
	bl	_stm32_mdma_get_max_width
	mov	x20, x0
	str	w0, [x24, #4]
	mov	x0, x24
	mov	x1, x20
	bl	_stm32_mdma_get_width
	mov	x23, x0
	tbnz	w0, #31, LBB0_19
; %bb.13:
	ldr	w8, [sp, #16]                   ; 4-byte Folded Reload
	bic	w8, w8, w26
	ldr	w9, [sp, #8]                    ; 4-byte Folded Reload
	orr	w8, w8, w9
	bic	w8, w8, w19
	orr	w8, w25, w8
Lloh45:
	adrp	x9, _STM32_MDMA_CTCR_SSIZE_MASK@GOTPAGE
Lloh46:
	ldr	x9, [x9, _STM32_MDMA_CTCR_SSIZE_MASK@GOTPAGEOFF]
Lloh47:
	ldr	w9, [x9]
Lloh48:
	adrp	x10, _STM32_MDMA_CTCR_SINCOS_MASK@GOTPAGE
Lloh49:
	ldr	x10, [x10, _STM32_MDMA_CTCR_SINCOS_MASK@GOTPAGEOFF]
Lloh50:
	ldr	w10, [x10]
	orn	w9, w10, w9
	and	w19, w9, w8
	mov	x0, x23
	bl	_STM32_MDMA_CTCR_SSIZE
	mov	x25, x0
	mov	x0, x23
	bl	_STM32_MDMA_CTCR_SINCOS
	orr	w8, w0, w25
	orr	w19, w8, w19
Lloh51:
	adrp	x8, _STM32_MDMA_MAX_BUF_LEN@GOTPAGE
Lloh52:
	ldr	x8, [x8, _STM32_MDMA_MAX_BUF_LEN@GOTPAGEOFF]
Lloh53:
	ldr	w8, [x8]
	udiv	w2, w8, w20
	mov	x0, x27
	mov	x1, x21
	mov	x3, x20
	bl	_stm32_mdma_get_best_burst
	str	w0, [x24]
Lloh54:
	adrp	x8, _STM32_MDMA_CTCR_SBURST_MASK@GOTPAGE
Lloh55:
	ldr	x8, [x8, _STM32_MDMA_CTCR_SBURST_MASK@GOTPAGEOFF]
Lloh56:
	ldr	w8, [x8]
	bic	w20, w19, w8
	bl	_ilog2
	bl	_STM32_MDMA_CTCR_SBURST
	orr	w20, w0, w20
Lloh57:
	adrp	x8, _STM32_MDMA_CTBR_DBUS@GOTPAGE
Lloh58:
	ldr	x8, [x8, _STM32_MDMA_CTBR_DBUS@GOTPAGEOFF]
Lloh59:
	ldr	w2, [x8]
	sub	x1, x29, #84
	ldr	x21, [sp, #32]                  ; 8-byte Folded Reload
	mov	x0, x21
	ldr	w19, [sp, #40]                  ; 4-byte Folded Reload
	mov	x3, x19
	bl	_stm32_mdma_set_bus
Lloh60:
	adrp	x8, _STM32_MDMA_CTCR_PKE@GOTPAGE
Lloh61:
	ldr	x8, [x8, _STM32_MDMA_CTCR_PKE@GOTPAGEOFF]
Lloh62:
	ldr	w8, [x8]
	cmp	w28, w23
	csel	w8, wzr, w8, eq
	orr	w20, w20, w8
	ldr	w0, [x24, #8]
	bl	_STM32_MDMA_CDAR
	mov	x1, x0
	mov	x0, x21
	b	LBB0_17
LBB0_14:
	str	w28, [sp, #88]                  ; 4-byte Folded Spill
	ldr	w8, [x24, #28]
	str	w8, [sp, #44]                   ; 4-byte Folded Spill
	mov	x0, x24
	ldr	w22, [sp, #40]                  ; 4-byte Folded Reload
	mov	x1, x22
	bl	_stm32_mdma_get_width
	mov	x28, x0
	ldr	w23, [sp, #80]                  ; 4-byte Folded Reload
	tbnz	w0, #31, LBB0_8
; %bb.15:
	str	w27, [sp, #12]                  ; 4-byte Folded Spill
	str	w26, [sp, #84]                  ; 4-byte Folded Spill
Lloh63:
	adrp	x8, _STM32_MDMA_CTCR_SSIZE_MASK@GOTPAGE
Lloh64:
	ldr	x8, [x8, _STM32_MDMA_CTCR_SSIZE_MASK@GOTPAGEOFF]
Lloh65:
	ldr	w26, [x8]
	mov	x0, x28
	bl	_STM32_MDMA_CTCR_SSIZE
	str	w0, [sp, #8]                    ; 4-byte Folded Spill
	mov	x0, x23
	mov	x27, x19
	mov	x1, x19
	mov	x2, x21
	mov	x3, x22
	bl	_stm32_mdma_get_best_burst
Lloh66:
	adrp	x8, _STM32_MDMA_CTCR_SBURST_MASK@GOTPAGE
Lloh67:
	ldr	x8, [x8, _STM32_MDMA_CTCR_SBURST_MASK@GOTPAGEOFF]
Lloh68:
	ldr	w19, [x8]
	bl	_ilog2
	bl	_STM32_MDMA_CTCR_SBURST
	mov	x25, x0
	ldr	w0, [sp, #76]                   ; 4-byte Folded Reload
	mov	x1, x23
	mov	x2, x27
	bl	_stm32_mdma_get_max_width
	mov	x21, x0
	str	w0, [x24, #4]
	mov	x0, x24
	mov	x1, x21
	bl	_stm32_mdma_get_width
	mov	x20, x0
	tbnz	w0, #31, LBB0_20
; %bb.16:
	ldr	w8, [sp, #16]                   ; 4-byte Folded Reload
	bic	w8, w8, w26
	ldr	w9, [sp, #8]                    ; 4-byte Folded Reload
	orr	w8, w8, w9
	bic	w8, w8, w19
	orr	w8, w25, w8
Lloh69:
	adrp	x9, _STM32_MDMA_CTCR_DSIZE_MASK@GOTPAGE
Lloh70:
	ldr	x9, [x9, _STM32_MDMA_CTCR_DSIZE_MASK@GOTPAGEOFF]
Lloh71:
	ldr	w9, [x9]
Lloh72:
	adrp	x10, _STM32_MDMA_CTCR_DINCOS_MASK@GOTPAGE
Lloh73:
	ldr	x10, [x10, _STM32_MDMA_CTCR_DINCOS_MASK@GOTPAGEOFF]
Lloh74:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bic	w26, w8, w9
	mov	x0, x20
	bl	_STM32_MDMA_CTCR_DSIZE
	mov	x25, x0
	mov	x0, x20
	bl	_STM32_MDMA_CTCR_DINCOS
	orr	w8, w0, w25
	orr	w25, w8, w26
Lloh75:
	adrp	x8, _STM32_MDMA_MAX_BUF_LEN@GOTPAGE
Lloh76:
	ldr	x8, [x8, _STM32_MDMA_MAX_BUF_LEN@GOTPAGEOFF]
Lloh77:
	ldr	w8, [x8]
	udiv	w2, w8, w21
	mov	x0, x23
	mov	x1, x27
	mov	x3, x21
	bl	_stm32_mdma_get_best_burst
Lloh78:
	adrp	x8, _STM32_MDMA_CTCR_DBURST_MASK@GOTPAGE
Lloh79:
	ldr	x8, [x8, _STM32_MDMA_CTCR_DBURST_MASK@GOTPAGEOFF]
Lloh80:
	ldr	w8, [x8]
	bic	w21, w25, w8
	bl	_ilog2
	bl	_STM32_MDMA_CTCR_DBURST
	orr	w21, w0, w21
Lloh81:
	adrp	x8, _STM32_MDMA_CTBR_SBUS@GOTPAGE
Lloh82:
	ldr	x8, [x8, _STM32_MDMA_CTBR_SBUS@GOTPAGEOFF]
Lloh83:
	ldr	w2, [x8]
	sub	x1, x29, #84
	ldr	x23, [sp, #32]                  ; 8-byte Folded Reload
	mov	x0, x23
	ldr	w19, [sp, #44]                  ; 4-byte Folded Reload
	mov	x3, x19
	bl	_stm32_mdma_set_bus
Lloh84:
	adrp	x8, _STM32_MDMA_CTCR_PKE@GOTPAGE
Lloh85:
	ldr	x8, [x8, _STM32_MDMA_CTCR_PKE@GOTPAGEOFF]
Lloh86:
	ldr	w8, [x8]
	cmp	w20, w28
	csel	w8, wzr, w8, eq
	orr	w20, w21, w8
	ldr	w0, [x24, #8]
	bl	_STM32_MDMA_CSAR
	mov	x1, x0
	mov	x0, x23
LBB0_17:
	mov	x2, x19
	bl	_stm32_mdma_write
	mov	w28, #0
	ldr	w8, [sp, #84]                   ; 4-byte Folded Reload
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	orr	w8, w9, w8
	ldr	w9, [sp, #28]                   ; 4-byte Folded Reload
	orr	w8, w8, w9
	ldr	w9, [sp, #88]                   ; 4-byte Folded Reload
	orr	w8, w8, w9
	ldr	w9, [sp, #24]                   ; 4-byte Folded Reload
	orr	w8, w8, w9
	ldr	w9, [sp, #72]                   ; 4-byte Folded Reload
	bic	w8, w9, w8
	ldr	w9, [sp, #20]                   ; 4-byte Folded Reload
	orr	w8, w8, w9
	ldr	x9, [sp, #48]                   ; 8-byte Folded Reload
	str	w8, [x9]
	ldp	x8, x9, [sp, #56]               ; 16-byte Folded Reload
	str	w20, [x8]
	ldur	w8, [x29, #-84]
	str	w8, [x9]
	b	LBB0_8
LBB0_18:
	mov	x0, x24
	bl	_chan2dev
Lloh87:
	adrp	x1, l_.str.2@PAGE
Lloh88:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_19:
	mov	x28, x23
	b	LBB0_8
LBB0_20:
	mov	x28, x20
	b	LBB0_8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh31
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh25
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpAdd	Lloh87, Lloh88
	.cfi_endproc
                                        ; -- End function
	.comm	_STM32_MDMA_CTCR_SWRM,4,2       ; @STM32_MDMA_CTCR_SWRM
	.comm	_STM32_MDMA_CTCR_CFG_MASK,4,2   ; @STM32_MDMA_CTCR_CFG_MASK
	.comm	_STM32_MDMA_CTCR_LEN2_MSK,4,2   ; @STM32_MDMA_CTCR_LEN2_MSK
	.comm	_STM32_MDMA_CTCR_PKE,4,2        ; @STM32_MDMA_CTCR_PKE
	.comm	_STM32_MDMA_MAX_BURST,4,2       ; @STM32_MDMA_MAX_BURST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"burst size * bus width higher than %d bytes\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"burst size must be a power of 2\n"

	.comm	_STM32_MDMA_CCR_SWRQ,4,2        ; @STM32_MDMA_CCR_SWRQ
	.comm	_STM32_MDMA_CCR_WEX,4,2         ; @STM32_MDMA_CCR_WEX
	.comm	_STM32_MDMA_CCR_HEX,4,2         ; @STM32_MDMA_CCR_HEX
	.comm	_STM32_MDMA_CCR_BEX,4,2         ; @STM32_MDMA_CCR_BEX
	.comm	_STM32_MDMA_CCR_PL_MASK,4,2     ; @STM32_MDMA_CCR_PL_MASK
	.comm	_STM32_MDMA_CTBR_TSEL_MASK,4,2  ; @STM32_MDMA_CTBR_TSEL_MASK
	.comm	_STM32_MDMA_CTCR_DSIZE_MASK,4,2 ; @STM32_MDMA_CTCR_DSIZE_MASK
	.comm	_STM32_MDMA_CTCR_DBURST_MASK,4,2 ; @STM32_MDMA_CTCR_DBURST_MASK
	.comm	_STM32_MDMA_CTCR_SSIZE_MASK,4,2 ; @STM32_MDMA_CTCR_SSIZE_MASK
	.comm	_STM32_MDMA_CTCR_SINCOS_MASK,4,2 ; @STM32_MDMA_CTCR_SINCOS_MASK
	.comm	_STM32_MDMA_MAX_BUF_LEN,4,2     ; @STM32_MDMA_MAX_BUF_LEN
	.comm	_STM32_MDMA_CTCR_SBURST_MASK,4,2 ; @STM32_MDMA_CTCR_SBURST_MASK
	.comm	_STM32_MDMA_CTBR_DBUS,4,2       ; @STM32_MDMA_CTBR_DBUS
	.comm	_STM32_MDMA_CTCR_DINCOS_MASK,4,2 ; @STM32_MDMA_CTCR_DINCOS_MASK
	.comm	_STM32_MDMA_CTBR_SBUS,4,2       ; @STM32_MDMA_CTBR_SBUS
l_.str.2:                               ; @.str.2
	.asciz	"Dma direction is not supported\n"

	.no_dead_strip	_stm32_mdma_set_xfer_param
.subsections_via_symbols
