	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_shdma_chan_filter              ## -- Begin function shdma_chan_filter
	.p2align	4, 0x90
_shdma_chan_filter:                     ## @shdma_chan_filter
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	_shdma_alloc_chan_resources@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_to_shdma_chan
	movq	%rax, %r15
	movq	(%rbx), %rdi
	callq	_to_shdma_dev
	movq	8(%r15), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_4
## %bb.2:
	movq	(%rax), %rax
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	*(%rax)
	testl	%eax, %eax
	js	LBB0_10
## %bb.3:
	movl	4(%r15), %eax
	movl	%eax, (%r15)
	jmp	LBB0_9
LBB0_4:
	testl	%r14d, %r14d
	js	LBB0_5
## %bb.6:
	movq	_slave_num@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jle	LBB0_10
## %bb.7:
	movq	(%rax), %rax
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	*(%rax)
	testl	%eax, %eax
	js	LBB0_10
## %bb.8:
	movl	%r14d, (%r15)
	jmp	LBB0_9
LBB0_5:
	movl	8(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_9:
	movl	$1, %r12d
LBB0_10:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_shdma_alloc_chan_resources,8,3 ## @shdma_alloc_chan_resources
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid slave ID passed to dma_request_slave\n"

	.comm	_slave_num,4,2                  ## @slave_num
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_shdma_chan_filter              ; -- Begin function shdma_chan_filter
	.p2align	2
_shdma_chan_filter:                     ; @shdma_chan_filter
	.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
	ldr	x8, [x0]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _shdma_alloc_chan_resources@GOTPAGE
Lloh1:
	ldr	x9, [x9, _shdma_alloc_chan_resources@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.1:
	mov	x19, x1
	mov	x21, x0
	bl	_to_shdma_chan
	mov	x20, x0
	ldr	x0, [x21]
	bl	_to_shdma_dev
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	x8, [x0]
	ldr	x8, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	mov	w3, #1
	blr	x8
	tbnz	w0, #31, LBB0_8
; %bb.3:
	ldr	w8, [x20, #4]
	str	w8, [x20]
	b	LBB0_10
LBB0_4:
	tbnz	w19, #31, LBB0_9
; %bb.5:
Lloh3:
	adrp	x8, _slave_num@GOTPAGE
Lloh4:
	ldr	x8, [x8, _slave_num@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w19
	b.le	LBB0_8
; %bb.6:
	ldr	x8, [x0]
	ldr	x8, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	mov	w3, #1
	blr	x8
	tbnz	w0, #31, LBB0_8
; %bb.7:
	str	w19, [x20]
	b	LBB0_10
LBB0_8:
	mov	w0, #0
	b	LBB0_11
LBB0_9:
	ldr	w0, [x0, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_10:
	mov	w0, #1
LBB0_11:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_shdma_alloc_chan_resources,8,3 ; @shdma_alloc_chan_resources
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid slave ID passed to dma_request_slave\n"

	.comm	_slave_num,4,2                  ; @slave_num
.subsections_via_symbols
