	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32_dma_of_xlate
_stm32_dma_of_xlate:                    ## @stm32_dma_of_xlate
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %rax
	movq	8(%rax), %r14
	cmpl	$3, (%rdi)
	jg	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	8(%rdi), %rdx
	movq	(%rdx), %rbx
	movq	%rbx, -56(%rbp)
	movq	8(%rdx), %rcx
	movups	8(%rdx), %xmm0
	movups	%xmm0, -48(%rbp)
	movq	24(%rdx), %rdx
	movq	%rdx, -32(%rbp)
	movq	_STM32_DMA_MAX_CHANNELS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rbx
	jae	LBB0_5
## %bb.4:
	movq	_STM32_DMA_MAX_REQUEST_ID@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jae	LBB0_5
## %bb.6:
	shlq	$2, %rbx
	addq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_dma_get_slave_channel
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r15
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_stm32_dma_set_config
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	movq	%r14, %rdi
	callq	_dev_err
	xorl	%r15d, %r15d
LBB0_9:
	movq	%r15, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bad number of cells\n"

	.comm	_STM32_DMA_MAX_CHANNELS,8,3     ## @STM32_DMA_MAX_CHANNELS
	.comm	_STM32_DMA_MAX_REQUEST_ID,8,3   ## @STM32_DMA_MAX_REQUEST_ID
L_.str.1:                               ## @.str.1
	.asciz	"Bad channel and/or request id\n"

L_.str.2:                               ## @.str.2
	.asciz	"No more channels available\n"

	.no_dead_strip	_stm32_dma_of_xlate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm32_dma_of_xlate
_stm32_dma_of_xlate:                    ; @stm32_dma_of_xlate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	ldr	x8, [x1]
	ldr	x19, [x8, #8]
	ldr	w9, [x0]
	cmp	w9, #3
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	x10, [x0, #8]
	ldr	x9, [x10]
	str	x9, [sp]
	ldur	q0, [x10, #8]
	stur	q0, [sp, #8]
	ldr	x10, [x10, #24]
	str	x10, [sp, #24]
Lloh2:
	adrp	x10, _STM32_DMA_MAX_CHANNELS@GOTPAGE
Lloh3:
	ldr	x10, [x10, _STM32_DMA_MAX_CHANNELS@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
Lloh5:
	adrp	x11, _STM32_DMA_MAX_REQUEST_ID@GOTPAGE
Lloh6:
	ldr	x11, [x11, _STM32_DMA_MAX_REQUEST_ID@GOTPAGEOFF]
Lloh7:
	ldr	x11, [x11]
	fmov	x12, d0
	cmp	x9, x10
	ccmp	x12, x11, #2, lo
	b.lo	LBB0_6
; %bb.3:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_dev_err
	mov	x20, #0
LBB0_5:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
LBB0_6:
	ldr	x8, [x8]
	add	x21, x8, x9, lsl #2
	mov	x0, x21
	bl	_dma_get_slave_channel
	mov	x20, x0
	cbz	x0, LBB0_8
; %bb.7:
	mov	x1, sp
	mov	x0, x21
	bl	_stm32_dma_set_config
	b	LBB0_5
LBB0_8:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bad number of cells\n"

	.comm	_STM32_DMA_MAX_CHANNELS,8,3     ; @STM32_DMA_MAX_CHANNELS
	.comm	_STM32_DMA_MAX_REQUEST_ID,8,3   ; @STM32_DMA_MAX_REQUEST_ID
l_.str.1:                               ; @.str.1
	.asciz	"Bad channel and/or request id\n"

l_.str.2:                               ; @.str.2
	.asciz	"No more channels available\n"

	.no_dead_strip	_stm32_dma_of_xlate
.subsections_via_symbols
