	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function choose_output_device
_choose_output_device:                  ## @choose_output_device
	.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	$1080, %rsp                     ## imm = 0x438
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -1112(%rbp)               ## 8-byte Spill
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$0, -1076(%rbp)
	movq	_kAudioHardwarePropertyDevices@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -1088(%rbp)
	movq	_kAudioObjectPropertyScopeGlobal@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -1084(%rbp)
	movq	_kAudioObjectPropertyElementMaster@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -1080(%rbp)
	movq	_kAudioObjectSystemObject@GOTPCREL(%rip), %r15
	movsbl	(%r15), %edi
	leaq	-1088(%rbp), %rsi
	leaq	-1076(%rbp), %r8
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_AudioObjectGetPropertyDataSize
	movq	_noErr@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_10
## %bb.1:
	movq	%rbx, -1104(%rbp)               ## 8-byte Spill
	movl	-1076(%rbp), %r13d
	movl	%r13d, %edi
	callq	_malloc
	movq	%rax, -1096(%rbp)               ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:
	movsbl	(%r15), %edi
	leaq	-1088(%rbp), %rsi
	leaq	-1076(%rbp), %r8
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	-1096(%rbp), %r9                ## 8-byte Reload
	callq	_AudioObjectGetPropertyData
	cmpq	(%r14), %rax
	jne	LBB0_9
## %bb.3:
	movq	_kAudioDevicePropertyScopeOutput@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -1084(%rbp)
	movq	_kAudioDevicePropertyDeviceName@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -1088(%rbp)
	testq	%r13, %r13
	je	LBB0_9
## %bb.4:
	leaq	-1076(%rbp), %r15
	leaq	-1072(%rbp), %r12
	movq	-1096(%rbp), %rbx               ## 8-byte Reload
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	decq	%r13
	je	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movb	$0, -1072(%rbp)
	movl	$1024, -1076(%rbp)              ## imm = 0x400
	movsbl	(%rbx), %edi
	leaq	-1088(%rbp), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r15, %r8
	movq	%r12, %r9
	callq	_AudioObjectGetPropertyData
	cmpq	(%r14), %rax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	movq	-1112(%rbp), %rsi               ## 8-byte Reload
	callq	_string_is_equal
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	-1104(%rbp), %rax               ## 8-byte Reload
	movl	(%rax), %edi
	movq	_kAudioOutputUnitProperty_CurrentDevice@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_kAudioUnitScope_Global@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	movl	$1, %r9d
	callq	_AudioUnitSetProperty
LBB0_9:
	movq	-1096(%rbp), %rdi               ## 8-byte Reload
	callq	_free
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	addq	$1080, %rsp                     ## imm = 0x438
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_kAudioHardwarePropertyDevices,4,2 ## @kAudioHardwarePropertyDevices
	.comm	_kAudioObjectPropertyScopeGlobal,4,2 ## @kAudioObjectPropertyScopeGlobal
	.comm	_kAudioObjectPropertyElementMaster,4,2 ## @kAudioObjectPropertyElementMaster
	.comm	_kAudioObjectSystemObject,1,0   ## @kAudioObjectSystemObject
	.comm	_noErr,8,3                      ## @noErr
	.comm	_kAudioDevicePropertyScopeOutput,4,2 ## @kAudioDevicePropertyScopeOutput
	.comm	_kAudioDevicePropertyDeviceName,4,2 ## @kAudioDevicePropertyDeviceName
	.comm	_kAudioOutputUnitProperty_CurrentDevice,4,2 ## @kAudioOutputUnitProperty_CurrentDevice
	.comm	_kAudioUnitScope_Global,4,2     ## @kAudioUnitScope_Global
	.comm	_kAudioObjectPropertyScopeOutput,4,2 ## @kAudioObjectPropertyScopeOutput
	.no_dead_strip	_choose_output_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function choose_output_device
_choose_output_device:                  ; @choose_output_device
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #1056
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	str	wzr, [sp, #4]
Lloh3:
	adrp	x8, _kAudioHardwarePropertyDevices@GOTPAGE
Lloh4:
	ldr	x8, [x8, _kAudioHardwarePropertyDevices@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _kAudioObjectPropertyScopeGlobal@GOTPAGE
Lloh7:
	ldr	x9, [x9, _kAudioObjectPropertyScopeGlobal@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _kAudioObjectPropertyElementMaster@GOTPAGE
Lloh10:
	ldr	x10, [x10, _kAudioObjectPropertyElementMaster@GOTPAGEOFF]
	stp	w8, w9, [sp, #8]
Lloh11:
	ldr	w8, [x10]
	str	w8, [sp, #16]
Lloh12:
	adrp	x23, _kAudioObjectSystemObject@GOTPAGE
Lloh13:
	ldr	x23, [x23, _kAudioObjectSystemObject@GOTPAGEOFF]
	ldrsb	w0, [x23]
	add	x1, sp, #8
	add	x4, sp, #4
	mov	w2, #0
	mov	w3, #0
	bl	_AudioObjectGetPropertyDataSize
Lloh14:
	adrp	x24, _noErr@GOTPAGE
Lloh15:
	ldr	x24, [x24, _noErr@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.1:
	ldr	w22, [sp, #4]
	mov	x0, x22
	bl	_malloc
	mov	x21, x0
	cbz	x0, LBB0_9
; %bb.2:
	ldrsb	w0, [x23]
	add	x1, sp, #8
	add	x4, sp, #4
	mov	w2, #0
	mov	w3, #0
	mov	x5, x21
	bl	_AudioObjectGetPropertyData
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.3:
Lloh16:
	adrp	x8, _kAudioDevicePropertyScopeOutput@GOTPAGE
Lloh17:
	ldr	x8, [x8, _kAudioDevicePropertyScopeOutput@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _kAudioDevicePropertyDeviceName@GOTPAGE
Lloh20:
	ldr	x9, [x9, _kAudioDevicePropertyDeviceName@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #8]
	cbz	w22, LBB0_9
; %bb.4:
	mov	w25, #1024
	mov	x23, x21
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #1
	subs	x22, x22, #1
	b.eq	LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	strb	wzr, [sp, #24]
	str	w25, [sp, #4]
	ldrsb	w0, [x23]
	add	x1, sp, #8
	add	x4, sp, #4
	add	x5, sp, #24
	mov	w2, #0
	mov	w3, #0
	bl	_AudioObjectGetPropertyData
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x0, sp, #24
	mov	x1, x20
	bl	_string_is_equal
	cbz	x0, LBB0_5
; %bb.8:
	ldr	w0, [x19]
Lloh22:
	adrp	x8, _kAudioOutputUnitProperty_CurrentDevice@GOTPAGE
Lloh23:
	ldr	x8, [x8, _kAudioOutputUnitProperty_CurrentDevice@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
Lloh25:
	adrp	x8, _kAudioUnitScope_Global@GOTPAGE
Lloh26:
	ldr	x8, [x8, _kAudioUnitScope_Global@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	w3, #0
	mov	x4, x23
	mov	w5, #1
	bl	_AudioUnitSetProperty
LBB0_9:
	mov	x0, x21
	bl	_free
LBB0_10:
	ldur	x8, [x29, #-72]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	add	sp, sp, #1056
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_kAudioHardwarePropertyDevices,4,2 ; @kAudioHardwarePropertyDevices
	.comm	_kAudioObjectPropertyScopeGlobal,4,2 ; @kAudioObjectPropertyScopeGlobal
	.comm	_kAudioObjectPropertyElementMaster,4,2 ; @kAudioObjectPropertyElementMaster
	.comm	_kAudioObjectSystemObject,1,0   ; @kAudioObjectSystemObject
	.comm	_noErr,8,3                      ; @noErr
	.comm	_kAudioDevicePropertyScopeOutput,4,2 ; @kAudioDevicePropertyScopeOutput
	.comm	_kAudioDevicePropertyDeviceName,4,2 ; @kAudioDevicePropertyDeviceName
	.comm	_kAudioOutputUnitProperty_CurrentDevice,4,2 ; @kAudioOutputUnitProperty_CurrentDevice
	.comm	_kAudioUnitScope_Global,4,2     ; @kAudioUnitScope_Global
	.comm	_kAudioObjectPropertyScopeOutput,4,2 ; @kAudioObjectPropertyScopeOutput
	.no_dead_strip	_choose_output_device
.subsections_via_symbols
