	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_request_chan_by_mask       ## -- Begin function dma_request_chan_by_mask
	.p2align	4, 0x90
_dma_request_chan_by_mask:              ## @dma_request_chan_by_mask
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	___dma_request_channel
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	movq	_dma_list_mutex@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_dma_device_list@GOTPCREL(%rip), %rdi
	callq	_list_empty
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_7:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_3:
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_dma_list_mutex,4,2             ## @dma_list_mutex
	.comm	_dma_device_list,4,2            ## @dma_device_list
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_request_chan_by_mask       ; -- Begin function dma_request_chan_by_mask
	.p2align	2
_dma_request_chan_by_mask:              ; @dma_request_chan_by_mask
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_4
; %bb.1:
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	bl	___dma_request_channel
	cbnz	x0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x19, _dma_list_mutex@GOTPAGE
Lloh1:
	ldr	x19, [x19, _dma_list_mutex@GOTPAGEOFF]
	mov	x0, x19
	bl	_mutex_lock
Lloh2:
	adrp	x0, _dma_device_list@GOTPAGE
Lloh3:
	ldr	x0, [x0, _dma_device_list@GOTPAGEOFF]
	bl	_list_empty
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh6:
	adrp	x9, _EPROBE_DEFER@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EPROBE_DEFER@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ERR_PTR
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_dma_list_mutex,4,2             ; @dma_list_mutex
	.comm	_dma_device_list,4,2            ; @dma_device_list
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
.subsections_via_symbols
