	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SndMixerSelect                 ## -- Begin function SndMixerSelect
	.p2align	4, 0x90
_SndMixerSelect:                        ## @SndMixerSelect
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	%rsi, (%rdi)
	jle	LBB0_9
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_SndMixerClose
	leaq	16(%rbx), %r15
	movl	32(%rbx), %edx
	movq	_CALLBACK_WINDOW@GOTPCREL(%rip), %r13
	movq	_MIXER_OBJECTF_MIXER@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	orl	(%r13), %r8d
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	callq	_mixerOpen
	movq	_MMSYSERR_NOERROR@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	je	LBB0_4
## %bb.2:
	movl	32(%rbx), %edx
	movl	(%r13), %r8d
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	callq	_mixerOpen
	cmpq	(%r12), %rax
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_mixerOpen
	cmpq	(%r12), %rax
	jne	LBB0_8
LBB0_4:
	leaq	24(%rbx), %rsi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_mixerGetDevCaps
	cmpq	(%r12), %rax
	jne	LBB0_7
## %bb.5:
	movq	%r14, 8(%rbx)
	movq	%rbx, %rdi
	callq	_ClearMixerCache
	movq	%rbx, %rdi
	callq	_SndMixerQueryDestinations
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	movq	%rbx, %rdi
	callq	_ClearMixerCache
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_7:
	movq	(%r15), %rdi
	callq	_mixerClose
LBB0_8:
	movq	$0, 16(%rbx)
	movq	_NO_MIXER_SELECTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
LBB0_9:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_CALLBACK_WINDOW,4,2            ## @CALLBACK_WINDOW
	.comm	_MIXER_OBJECTF_MIXER,4,2        ## @MIXER_OBJECTF_MIXER
	.comm	_MMSYSERR_NOERROR,8,3           ## @MMSYSERR_NOERROR
	.comm	_NO_MIXER_SELECTED,8,3          ## @NO_MIXER_SELECTED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SndMixerSelect                 ; -- Begin function SndMixerSelect
	.p2align	2
_SndMixerSelect:                        ; @SndMixerSelect
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x0]
	cmp	x8, x1
	b.le	LBB0_9
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	bl	_SndMixerClose
	add	x21, x19, #16
Lloh0:
	adrp	x23, _CALLBACK_WINDOW@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CALLBACK_WINDOW@GOTPAGEOFF]
	ldr	w2, [x19, #32]
	ldr	w8, [x23]
Lloh2:
	adrp	x9, _MIXER_OBJECTF_MIXER@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MIXER_OBJECTF_MIXER@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w4, w9, w8
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_mixerOpen
Lloh5:
	adrp	x22, _MMSYSERR_NOERROR@GOTPAGE
Lloh6:
	ldr	x22, [x22, _MMSYSERR_NOERROR@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_4
; %bb.2:
	ldr	w2, [x19, #32]
	ldr	w4, [x23]
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_mixerOpen
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x21
	mov	x1, x20
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_mixerOpen
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_8
LBB0_4:
	add	x1, x19, #24
	mov	x0, x20
	mov	w2, #4
	bl	_mixerGetDevCaps
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.5:
	str	x20, [x19, #8]
	mov	x0, x19
	bl	_ClearMixerCache
	mov	x0, x19
	bl	_SndMixerQueryDestinations
	cbnz	w0, LBB0_10
; %bb.6:
	mov	x0, x19
	bl	_ClearMixerCache
	mov	w0, #0
	b	LBB0_10
LBB0_7:
	ldr	x0, [x21]
	bl	_mixerClose
LBB0_8:
Lloh7:
	adrp	x8, _NO_MIXER_SELECTED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NO_MIXER_SELECTED@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	stp	x8, xzr, [x19, #8]
LBB0_9:
Lloh10:
	adrp	x8, _FALSE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_CALLBACK_WINDOW,4,2            ; @CALLBACK_WINDOW
	.comm	_MIXER_OBJECTF_MIXER,4,2        ; @MIXER_OBJECTF_MIXER
	.comm	_MMSYSERR_NOERROR,8,3           ; @MMSYSERR_NOERROR
	.comm	_NO_MIXER_SELECTED,8,3          ; @NO_MIXER_SELECTED
.subsections_via_symbols
