	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d40_validate_conf
_d40_validate_conf:                     ## @d40_validate_conf
	.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	%rsi, %r13
	movq	(%rsi), %rbx
	movq	_STEDMA40_MODE_LOGICAL@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	xorl	%r12d, %r12d
	cmpq	%r14, %rbx
	sete	%cl
	xorl	%r15d, %r15d
	cmpq	$0, 8(%rsi)
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movb	%cl, -41(%rbp)                  ## 1-byte Spill
	callq	_chan_err
	movb	-41(%rbp), %cl                  ## 1-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_2:
	movq	16(%r13), %rdx
	movq	(%rdi), %rax
	cmpq	%r14, %rbx
	jne	LBB0_4
## %bb.3:
	movq	%rdi, %r14
	cmpq	(%rax), %rdx
	jle	LBB0_5
	jmp	LBB0_6
LBB0_4:
	movq	%rdi, %r14
	cmpq	8(%rax), %rdx
	jg	LBB0_6
LBB0_5:
	testq	%rdx, %rdx
	jns	LBB0_7
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	movl	%ecx, %ebx
	callq	_chan_err
	movl	%ebx, %ecx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_7:
	movb	%cl, %r12b
	movq	8(%r13), %rax
	movq	_DMA_DEV_TO_DEV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_chan_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_9:
	movl	36(%r13), %esi
	movl	%r12d, %edi
	callq	_d40_psize_2_burst_size
	movl	%eax, %ebx
	imull	32(%r13), %ebx
	movl	28(%r13), %esi
	movl	%r12d, %edi
	callq	_d40_psize_2_burst_size
	imull	24(%r13), %eax
	cmpl	%eax, %ebx
	je	LBB0_11
## %bb.10:
	leaq	L_.str.3(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_chan_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_11:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STEDMA40_MODE_LOGICAL,8,3      ## @STEDMA40_MODE_LOGICAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid direction.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Invalid device type (%d)\n"

	.comm	_DMA_DEV_TO_DEV,8,3             ## @DMA_DEV_TO_DEV
L_.str.2:                               ## @.str.2
	.asciz	"periph to periph not supported\n"

L_.str.3:                               ## @.str.3
	.asciz	"src (burst x width) != dst (burst x width)\n"

	.no_dead_strip	_d40_validate_conf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d40_validate_conf
_d40_validate_conf:                     ; @d40_validate_conf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _STEDMA40_MODE_LOGICAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STEDMA40_MODE_LOGICAL@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	ldp	x24, x8, [x1]
	cmp	x24, x23
	cset	w21, eq
	cbz	x8, LBB0_2
; %bb.1:
	mov	w22, #0
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_chan_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_3:
	ldr	x8, [x20, #16]
	ldr	x9, [x19]
	cmp	x24, x23
	b.ne	LBB0_5
; %bb.4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_6
	b	LBB0_7
LBB0_5:
	ldr	x9, [x9, #8]
	cmp	x8, x9
	b.gt	LBB0_7
LBB0_6:
	tbz	x8, #63, LBB0_8
LBB0_7:
	str	x8, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_chan_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_8:
	ldr	x8, [x20, #8]
Lloh13:
	adrp	x9, _DMA_DEV_TO_DEV@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DMA_DEV_TO_DEV@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_chan_err
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_10:
	ldr	w1, [x20, #36]
	mov	x0, x21
	bl	_d40_psize_2_burst_size
	ldp	w1, w8, [x20, #28]
	mul	w23, w8, w0
	mov	x0, x21
	bl	_d40_psize_2_burst_size
	ldr	w8, [x20, #24]
	mul	w8, w8, w0
	cmp	w23, w8
	b.eq	LBB0_12
; %bb.11:
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_chan_err
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_12:
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_STEDMA40_MODE_LOGICAL,8,3      ; @STEDMA40_MODE_LOGICAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid direction.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Invalid device type (%d)\n"

	.comm	_DMA_DEV_TO_DEV,8,3             ; @DMA_DEV_TO_DEV
l_.str.2:                               ; @.str.2
	.asciz	"periph to periph not supported\n"

l_.str.3:                               ; @.str.3
	.asciz	"src (burst x width) != dst (burst x width)\n"

	.no_dead_strip	_d40_validate_conf
.subsections_via_symbols
