	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UI_SoundOptionsMenu_Event
_UI_SoundOptionsMenu_Event:             ## @UI_SoundOptionsMenu_Event
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_QM_ACTIVATED@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_9
## %bb.1:
	movl	$-129, %eax
	addl	(%rdi), %eax
	cmpl	$4, %eax
	ja	LBB0_9
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_5:
	xorl	%eax, %eax
	callq	_UI_PopMenu
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_UI_NetworkOptionsMenu          ## TAILCALL
LBB0_7:
	movq	_soundOptionsInfo@GOTPCREL(%rip), %rbx
	movslq	28(%rbx), %rax
	imulq	$1717986919, %rax, %rsi         ## imm = 0x66666667
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$34, %rsi
	addl	%eax, %esi
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_trap_Cvar_SetValue
	movl	28(%rbx), %eax
	movl	%eax, (%rbx)
	movslq	24(%rbx), %rax
	imulq	$1717986919, %rax, %rsi         ## imm = 0x66666667
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$34, %rsi
	addl	%eax, %esi
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_trap_Cvar_SetValue
	movl	24(%rbx), %eax
	movl	%eax, 4(%rbx)
	movl	16(%rbx), %eax
	cmpl	%eax, 20(%rbx)
	jne	LBB0_10
## %bb.8:
	movl	12(%rbx), %ecx
	cmpl	8(%rbx), %ecx
	jne	LBB0_10
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	xorl	%eax, %eax
	callq	_UI_PopMenu
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_UI_GraphicsOptionsMenu         ## TAILCALL
LBB0_4:
	xorl	%eax, %eax
	callq	_UI_PopMenu
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_UI_DisplayOptionsMenu          ## TAILCALL
LBB0_6:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_UI_PopMenu                     ## TAILCALL
LBB0_10:
	cmpl	$1, %eax
	movl	$22050, %ecx                    ## imm = 0x5622
	movl	$11025, %edx                    ## imm = 0x2B11
	cmovel	%ecx, %edx
	cmpl	$2, %eax
	movl	$44100, %esi                    ## imm = 0xAC44
	cmovnel	%edx, %esi
	movq	_DEFAULT_SDL_SND_SPEED@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	(%rax), %esi
	cmovel	%ecx, %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_trap_Cvar_SetValue
	movl	8(%rbx), %eax
	movl	16(%rbx), %ecx
	movl	%ecx, 20(%rbx)
	movq	_UISND_OPENAL@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpl	(%rcx), %eax
	sete	%sil
	leaq	L_.str.3(%rip), %rdi
	callq	_trap_Cvar_SetValue
	movl	8(%rbx), %eax
	movl	%eax, 12(%rbx)
	xorl	%eax, %eax
	callq	_UI_ForceMenuOff
	movq	_EXEC_APPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_trap_Cmd_ExecuteText           ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_3
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.comm	_QM_ACTIVATED,4,2               ## @QM_ACTIVATED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"s_volume"

	.comm	_soundOptionsInfo,32,2          ## @soundOptionsInfo
L_.str.1:                               ## @.str.1
	.asciz	"s_musicvolume"

	.comm	_DEFAULT_SDL_SND_SPEED,4,2      ## @DEFAULT_SDL_SND_SPEED
L_.str.2:                               ## @.str.2
	.asciz	"s_sdlSpeed"

L_.str.3:                               ## @.str.3
	.asciz	"s_useOpenAL"

	.comm	_UISND_OPENAL,4,2               ## @UISND_OPENAL
	.comm	_EXEC_APPEND,4,2                ## @EXEC_APPEND
L_.str.4:                               ## @.str.4
	.asciz	"snd_restart\n"

	.no_dead_strip	_UI_SoundOptionsMenu_Event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UI_SoundOptionsMenu_Event
_UI_SoundOptionsMenu_Event:             ; @UI_SoundOptionsMenu_Event
	.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
Lloh0:
	adrp	x8, _QM_ACTIVATED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QM_ACTIVATED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_6
; %bb.1:
	ldr	w8, [x0]
	sub	w8, w8, #129
	cmp	w8, #4
	b.hi	LBB0_6
; %bb.2:
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	bl	_UI_PopMenu
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_UI_NetworkOptionsMenu
LBB0_4:
Lloh5:
	adrp	x19, _soundOptionsInfo@GOTPAGE
Lloh6:
	ldr	x19, [x19, _soundOptionsInfo@GOTPAGEOFF]
	ldrsw	x8, [x19, #28]
	mov	w20, #26215
	movk	w20, #26214, lsl #16
	mul	x8, x8, x20
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w1, w8, w9
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_trap_Cvar_SetValue
	ldp	w9, w8, [x19, #24]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	str	w8, [x19]
	mul	x8, x9, x20
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w1, w8, w9
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_trap_Cvar_SetValue
	ldp	w9, w8, [x19, #20]
	str	w8, [x19, #4]
	ldr	w8, [x19, #16]
	cmp	w9, w8
	b.ne	LBB0_10
; %bb.5:
	ldp	w10, w9, [x19, #8]
	cmp	w9, w10
	b.ne	LBB0_10
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	bl	_UI_PopMenu
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_UI_GraphicsOptionsMenu
LBB0_8:
	bl	_UI_PopMenu
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_UI_DisplayOptionsMenu
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_UI_PopMenu
LBB0_10:
	mov	w9, #11025
	mov	w10, #22050
	cmp	w8, #1
	csel	w9, w10, w9, eq
	mov	w10, #44100
	cmp	w8, #2
	csel	w8, w10, w9, eq
Lloh11:
	adrp	x9, _DEFAULT_SDL_SND_SPEED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DEFAULT_SDL_SND_SPEED@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w1, wzr, w8, eq
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_trap_Cvar_SetValue
	ldr	w8, [x19, #16]
	str	w8, [x19, #20]
	ldr	w8, [x19, #8]
Lloh16:
	adrp	x9, _UISND_OPENAL@GOTPAGE
Lloh17:
	ldr	x9, [x9, _UISND_OPENAL@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w1, eq
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_trap_Cvar_SetValue
	ldr	w8, [x19, #8]
	str	w8, [x19, #12]
	bl	_UI_ForceMenuOff
Lloh21:
	adrp	x8, _EXEC_APPEND@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EXEC_APPEND@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_trap_Cmd_ExecuteText
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
                                        ; -- End function
	.comm	_QM_ACTIVATED,4,2               ; @QM_ACTIVATED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"s_volume"

	.comm	_soundOptionsInfo,32,2          ; @soundOptionsInfo
l_.str.1:                               ; @.str.1
	.asciz	"s_musicvolume"

	.comm	_DEFAULT_SDL_SND_SPEED,4,2      ; @DEFAULT_SDL_SND_SPEED
l_.str.2:                               ; @.str.2
	.asciz	"s_sdlSpeed"

l_.str.3:                               ; @.str.3
	.asciz	"s_useOpenAL"

	.comm	_UISND_OPENAL,4,2               ; @UISND_OPENAL
	.comm	_EXEC_APPEND,4,2                ; @EXEC_APPEND
l_.str.4:                               ; @.str.4
	.asciz	"snd_restart\n"

	.no_dead_strip	_UI_SoundOptionsMenu_Event
.subsections_via_symbols
