	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DMAbuf_init                    ## -- Begin function DMAbuf_init
	.p2align	4, 0x90
_DMAbuf_init:                           ## @DMAbuf_init
	.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	_audio_devs@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movslq	%edi, %rcx
	movq	(%rax,%rcx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.1:
	cmpq	$0, 8(%rbx)
	jne	LBB0_13
## %bb.2:
	movl	%edx, %r14d
	movl	%esi, %r15d
	cmpq	$0, 32(%rbx)
	jne	LBB0_4
## %bb.3:
	movl	%edi, %esi
	leaq	L_.str(%rip), %rdi
	callq	_panic
LBB0_4:
	movslq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	(%r12), %rcx
	movq	-8(%rcx,%rax,8), %rdx
	movq	8(%rdx), %rdi
	movq	%rdi, 8(%rbx)
	movq	-8(%rcx,%rax,8), %rax
	movq	16(%rax), %rax
	movq	%rax, 16(%rbx)
	jmp	LBB0_9
LBB0_6:
	movq	24(%rbx), %rdi
	movq	%rdi, 16(%rbx)
	movq	%rdi, 8(%rbx)
	movl	%r15d, (%rdi)
	movq	_DMA_DUPLEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_7
## %bb.8:
	leaq	16(%rdi), %rax
	movq	%rax, 16(%rbx)
	movl	%r14d, 16(%rdi)
	jmp	LBB0_9
LBB0_7:
	movq	%rdi, %rax
LBB0_9:
	movq	_sound_dmap_flag@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_DMAP_KEEP_ON_CLOSE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_13
## %bb.10:
	cmpq	$0, 8(%rax)
	je	LBB0_11
## %bb.12:
	cmpq	$0, 8(%rdi)
	je	LBB0_14
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%rax, %rdi
	callq	_sound_alloc_dmap
	movq	8(%rbx), %rdi
	cmpq	$0, 8(%rdi)
	jne	LBB0_13
LBB0_14:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sound_alloc_dmap               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_audio_devs,8,3                 ## @audio_devs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OSS: audio_devs[%d]->d == NULL\n"

	.comm	_DMA_DUPLEX,4,2                 ## @DMA_DUPLEX
	.comm	_sound_dmap_flag,8,3            ## @sound_dmap_flag
	.comm	_DMAP_KEEP_ON_CLOSE,8,3         ## @DMAP_KEEP_ON_CLOSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DMAbuf_init                    ; -- Begin function DMAbuf_init
	.p2align	2
_DMAbuf_init:                           ; @DMAbuf_init
	.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
Lloh0:
	adrp	x22, _audio_devs@GOTPAGE
Lloh1:
	ldr	x22, [x22, _audio_devs@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x21, [x8, w0, sxtw #3]
	cbz	x21, LBB0_12
; %bb.1:
	ldr	x8, [x21, #8]
	cbnz	x8, LBB0_12
; %bb.2:
	mov	x19, x2
	mov	x20, x1
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	w8, [x21]
	cbz	w8, LBB0_6
LBB0_4:
	sub	w8, w8, #1
	ldr	x9, [x22]
	sbfiz	x8, x8, #3, #32
	ldr	x10, [x9, x8]
	ldr	x0, [x10, #8]
	str	x0, [x21, #8]
	ldr	x8, [x9, x8]
	ldr	x8, [x8, #16]
	b	LBB0_8
LBB0_5:
	mov	x1, x0
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
	ldr	w8, [x21]
	cbnz	w8, LBB0_4
LBB0_6:
	ldr	x0, [x21, #24]
	stp	x0, x0, [x21, #8]
	str	w20, [x0]
	ldr	w8, [x21, #4]
Lloh4:
	adrp	x9, _DMA_DUPLEX@GOTPAGE
Lloh5:
	ldr	x9, [x9, _DMA_DUPLEX@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.7:
	mov	x8, x0
	str	w19, [x8, #16]!
LBB0_8:
	str	x8, [x21, #16]
LBB0_9:
Lloh7:
	adrp	x9, _sound_dmap_flag@GOTPAGE
Lloh8:
	ldr	x9, [x9, _sound_dmap_flag@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
Lloh10:
	adrp	x10, _DMAP_KEEP_ON_CLOSE@GOTPAGE
Lloh11:
	ldr	x10, [x10, _DMAP_KEEP_ON_CLOSE@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_12
; %bb.10:
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_13
; %bb.11:
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_14
LBB0_12:
	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
LBB0_13:
	mov	x0, x8
	bl	_sound_alloc_dmap
	ldr	x0, [x21, #8]
	ldr	x8, [x0, #8]
	cbnz	x8, LBB0_12
LBB0_14:
	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
	b	_sound_alloc_dmap
LBB0_15:
	mov	x8, x0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_audio_devs,8,3                 ; @audio_devs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OSS: audio_devs[%d]->d == NULL\n"

	.comm	_DMA_DUPLEX,4,2                 ; @DMA_DUPLEX
	.comm	_sound_dmap_flag,8,3            ; @sound_dmap_flag
	.comm	_DMAP_KEEP_ON_CLOSE,8,3         ; @DMAP_KEEP_ON_CLOSE
.subsections_via_symbols
