	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function waveartist_mixer_update
_waveartist_mixer_update:               ## @waveartist_mixer_update
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movslq	%esi, %r14
	movl	(%rax,%r14,4), %r12d
	movzbl	%r12b, %r15d
	sarl	$8, %r12d
	cmpl	$100, %r15d
	movl	$100, %eax
	cmovael	%eax, %r15d
	cmpl	$100, %r12d
	cmovael	%eax, %r12d
	xorl	%eax, %eax
	callq	_machine_is_netwinder
	movq	_SOUND_MIXER_PHONEOUT@GOTPCREL(%rip), %rdx
	movl	%ebx, %ecx
	cmpl	%r14d, (%rdx)
	jne	LBB0_2
## %bb.1:
	movq	_SOUND_MIXER_VOLUME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_2:
	testq	%rax, %rax
	cmovnel	%ecx, %ebx
	movq	_mix_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movslq	%ebx, %r13
	shlq	$4, %r13
	movl	(%r14,%r13), %esi
	testl	%esi, %esi
	jne	LBB0_4
## %bb.3:
	cmpl	$0, 4(%r14,%r13)
	je	LBB0_5
LBB0_4:
	movl	8(%r14,%r13), %eax
	movb	12(%r14,%r13), %cl
	movl	%eax, %edx
	shll	%cl, %edx
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	imull	%eax, %r15d
	imull	%eax, %r12d
	imulq	$1374389535, %r15, %r15         ## imm = 0x51EB851F
	shrq	$37, %r15
	shll	%cl, %r15d
	imulq	$1374389535, %r12, %rbx         ## imm = 0x51EB851F
	shrq	$37, %rbx
	shll	%cl, %ebx
	movq	_WACMD_GET_LEVEL@GOTPCREL(%rip), %rax
	shll	$8, %esi
	orl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_waveartist_cmd1_r
	movl	%eax, %r12d
	movl	4(%r14,%r13), %esi
	shll	$8, %esi
	movq	_WACMD_GET_LEVEL@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_waveartist_cmd1_r
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, %ecx
	notl	%ecx
	andl	%ecx, %r12d
	andl	%edx, %r15d
	orl	%r12d, %r15d
	andl	%eax, %ecx
	andl	%edx, %ebx
	orl	%ecx, %ebx
	movq	_WACMD_SET_MIXER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	movl	%ebx, %ecx
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_waveartist_cmd3                ## TAILCALL
LBB0_5:
	cmpl	$128, %ebx
	je	LBB0_10
## %bb.6:
	cmpl	$129, %ebx
	jne	LBB0_11
## %bb.7:
	movq	_WACMD_SET_LEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_8
LBB0_10:
	movq	_WACMD_SET_LEVEL@GOTPCREL(%rip), %rax
	movl	$256, %esi                      ## imm = 0x100
	orl	(%rax), %esi
LBB0_8:
	movl	%r15d, %eax
	shll	$15, %eax
	subl	%r15d, %eax
	imulq	$1374389535, %rax, %rdx         ## imm = 0x51EB851F
	shrq	$37, %rdx
	movl	%r12d, %eax
	shll	$15, %eax
	subl	%r12d, %eax
	imulq	$1374389535, %rax, %rcx         ## imm = 0x51EB851F
	shrq	$37, %rcx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	jmp	LBB0_9
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SOUND_MIXER_PHONEOUT,4,2       ## @SOUND_MIXER_PHONEOUT
	.comm	_SOUND_MIXER_VOLUME,4,2         ## @SOUND_MIXER_VOLUME
	.comm	_mix_devs,8,3                   ## @mix_devs
	.comm	_WACMD_GET_LEVEL,4,2            ## @WACMD_GET_LEVEL
	.comm	_WACMD_SET_MIXER,4,2            ## @WACMD_SET_MIXER
	.comm	_WACMD_SET_LEVEL,4,2            ## @WACMD_SET_LEVEL
	.no_dead_strip	_waveartist_mixer_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function waveartist_mixer_update
_waveartist_mixer_update:               ; @waveartist_mixer_update
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	w8, [x8, w1, sxtw #2]
	and	w9, w8, #0xff
	asr	w8, w8, #8
	mov	w10, #100
	cmp	w9, #100
	csel	w22, w9, w10, lo
	cmp	w8, #100
	csel	w21, w8, w10, lo
	bl	_machine_is_netwinder
Lloh0:
	adrp	x8, _SOUND_MIXER_PHONEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SOUND_MIXER_PHONEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	ccmp	x0, #0, #4, eq
Lloh3:
	adrp	x8, _SOUND_MIXER_VOLUME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOUND_MIXER_VOLUME@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _mix_devs@GOTPAGE
Lloh7:
	ldr	x9, [x9, _mix_devs@GOTPAGEOFF]
	csel	w8, w8, w20, ne
Lloh8:
	ldr	x10, [x9]
	sxtw	x9, w8
	sbfiz	x8, x8, #4, #32
	ldr	w8, [x10, x8]
	cbnz	w8, LBB0_2
; %bb.1:
	add	x11, x10, x9, lsl #4
	ldr	w11, [x11, #4]
	cbz	w11, LBB0_4
LBB0_2:
	add	x23, x10, x9, lsl #4
	ldp	w9, w10, [x23, #8]
	lsl	w24, w9, w10
	mul	w11, w9, w22
	mov	w12, #34079
	movk	w12, #20971, lsl #16
	umull	x11, w11, w12
	lsr	x11, x11, #37
	lsl	w22, w11, w10
	mul	w9, w9, w21
	umull	x9, w9, w12
	lsr	x9, x9, #37
	lsl	w21, w9, w10
Lloh9:
	adrp	x25, _WACMD_GET_LEVEL@GOTPAGE
Lloh10:
	ldr	x25, [x25, _WACMD_GET_LEVEL@GOTPAGEOFF]
	ldr	w9, [x25]
	orr	w1, w9, w8, lsl #8
	mov	x0, x19
	bl	_waveartist_cmd1_r
	mov	x20, x0
	ldr	w8, [x25]
	ldr	w9, [x23, #4]
	orr	w1, w8, w9, lsl #8
	mov	x0, x19
	bl	_waveartist_cmd1_r
	bic	w8, w20, w24
	and	w9, w22, w24
	orr	w2, w8, w9
	bic	w8, w0, w24
	and	w9, w21, w24
Lloh11:
	adrp	x10, _WACMD_SET_MIXER@GOTPAGE
Lloh12:
	ldr	x10, [x10, _WACMD_SET_MIXER@GOTPAGEOFF]
	orr	w3, w8, w9
Lloh13:
	ldr	w1, [x10]
	mov	x0, x19
LBB0_3:
	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
	b	_waveartist_cmd3
LBB0_4:
	cmp	w9, #128
	b.eq	LBB0_7
; %bb.5:
	cmp	w9, #129
	b.ne	LBB0_9
; %bb.6:
Lloh14:
	adrp	x8, _WACMD_SET_LEVEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WACMD_SET_LEVEL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	b	LBB0_8
LBB0_7:
Lloh17:
	adrp	x8, _WACMD_SET_LEVEL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _WACMD_SET_LEVEL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	orr	w1, w8, #0x100
LBB0_8:
	lsl	w8, w22, #15
	sub	w8, w8, w22
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	umull	x8, w8, w9
	lsr	x2, x8, #37
	lsl	w8, w21, #15
	sub	w8, w8, w21
	umull	x8, w8, w9
	lsr	x3, x8, #37
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
                                        ; kill: def $w3 killed $w3 killed $x3
	b	LBB0_3
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_SOUND_MIXER_PHONEOUT,4,2       ; @SOUND_MIXER_PHONEOUT
	.comm	_SOUND_MIXER_VOLUME,4,2         ; @SOUND_MIXER_VOLUME
	.comm	_mix_devs,8,3                   ; @mix_devs
	.comm	_WACMD_GET_LEVEL,4,2            ; @WACMD_GET_LEVEL
	.comm	_WACMD_SET_MIXER,4,2            ; @WACMD_SET_MIXER
	.comm	_WACMD_SET_LEVEL,4,2            ; @WACMD_SET_LEVEL
	.no_dead_strip	_waveartist_mixer_update
.subsections_via_symbols
