	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_m3_update_hw_volume
_snd_m3_update_hw_volume:               ## @snd_m3_update_hw_volume
	.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	%rdi, %r12
	movq	_SHADOW_MIX_REG_VOICE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	24(%r12), %rdi
	callq	_inb
	movl	%eax, %r14d
	movq	(%rbx), %rsi
	addq	24(%r12), %rsi
	movl	$136, %edi
	callq	_outb
	movq	_HW_VOL_COUNTER_VOICE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%r12), %rsi
	movl	$136, %edi
	callq	_outb
	movq	_SHADOW_MIX_REG_MASTER@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%r12), %rsi
	movl	$136, %edi
	callq	_outb
	movq	_HW_VOL_COUNTER_MASTER@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%r12), %rsi
	movl	$136, %edi
	callq	_outb
	cmpq	$0, 48(%r12)
	je	LBB0_1
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpq	$0, 40(%r12)
	je	LBB0_12
## %bb.2:
	cmpq	$0, 8(%r12)
	je	LBB0_12
## %bb.3:
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	32(%r12), %rax
	movq	(%rax), %rcx
	movq	_AC97_MASTER_VOL@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	movl	(%rcx,%rdx,4), %edi
	andb	$-18, %r14b
	cmpb	$102, %r14b
	je	LBB0_8
## %bb.4:
	cmpb	$-86, %r14b
	je	LBB0_7
## %bb.5:
	cmpb	$-120, %r14b
	jne	LBB0_11
## %bb.6:
	xorl	$32768, %edi                    ## imm = 0x8000
	movl	%edi, (%rcx,%rdx,4)
	movq	_CODEC_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%r12), %rsi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_outw
	movq	(%r15), %rdi
	movq	_CODEC_COMMAND@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%r12), %rsi
	callq	_outb
	movl	16(%r12), %edi
	movq	_SNDRV_CTL_EVENT_MASK_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	40(%r12), %rdx
	jmp	LBB0_10
LBB0_8:
	movl	%edi, %eax
	andl	$127, %eax
	cmpl	$31, %eax
	adcl	$0, %edi
	movl	%edi, %esi
	andl	$32512, %esi                    ## imm = 0x7F00
	leal	256(%rdi), %eax
	cmpl	$7936, %esi                     ## imm = 0x1F00
	cmovael	%edi, %eax
	jmp	LBB0_9
LBB0_7:
	movl	%edi, %eax
	andl	$127, %eax
	cmpl	$1, %eax
	adcl	$-1, %edi
	leal	-256(%rdi), %eax
	testl	$32512, %edi                    ## imm = 0x7F00
	cmovel	%edi, %eax
LBB0_9:
	movl	%eax, (%rcx,%rdx,4)
	movq	_CODEC_DATA@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	24(%r12), %rsi
	movl	%eax, %edi
	callq	_outw
	movq	(%r15), %rdi
	movq	_CODEC_COMMAND@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%r12), %rsi
	callq	_outb
	movl	16(%r12), %edi
	movq	_SNDRV_CTL_EVENT_MASK_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r12), %rdx
LBB0_10:
	callq	_snd_ctl_notify
LBB0_11:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SHADOW_MIX_REG_VOICE,8,3       ## @SHADOW_MIX_REG_VOICE
	.comm	_HW_VOL_COUNTER_VOICE,8,3       ## @HW_VOL_COUNTER_VOICE
	.comm	_SHADOW_MIX_REG_MASTER,8,3      ## @SHADOW_MIX_REG_MASTER
	.comm	_HW_VOL_COUNTER_MASTER,8,3      ## @HW_VOL_COUNTER_MASTER
	.comm	_AC97_MASTER_VOL,8,3            ## @AC97_MASTER_VOL
	.comm	_CODEC_DATA,8,3                 ## @CODEC_DATA
	.comm	_CODEC_COMMAND,8,3              ## @CODEC_COMMAND
	.comm	_SNDRV_CTL_EVENT_MASK_VALUE,4,2 ## @SNDRV_CTL_EVENT_MASK_VALUE
	.no_dead_strip	_snd_m3_update_hw_volume
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_m3_update_hw_volume
_snd_m3_update_hw_volume:               ; @snd_m3_update_hw_volume
	.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
	mov	x19, x0
	ldr	x8, [x0, #24]
Lloh0:
	adrp	x21, _SHADOW_MIX_REG_VOICE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SHADOW_MIX_REG_VOICE@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_inb
	mov	x20, x0
	ldr	x8, [x19, #24]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	w0, #136
	bl	_outb
	ldr	x8, [x19, #24]
Lloh2:
	adrp	x9, _HW_VOL_COUNTER_VOICE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HW_VOL_COUNTER_VOICE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #136
	bl	_outb
	ldr	x8, [x19, #24]
Lloh5:
	adrp	x9, _SHADOW_MIX_REG_MASTER@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SHADOW_MIX_REG_MASTER@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #136
	bl	_outb
	ldr	x8, [x19, #24]
Lloh8:
	adrp	x9, _HW_VOL_COUNTER_MASTER@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HW_VOL_COUNTER_MASTER@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #136
	bl	_outb
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_2
LBB0_1:
	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_2:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_1
; %bb.3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_1
; %bb.4:
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
Lloh11:
	adrp	x21, _AC97_MASTER_VOL@GOTPAGE
Lloh12:
	ldr	x21, [x21, _AC97_MASTER_VOL@GOTPAGEOFF]
	ldr	x9, [x21]
	ldr	w10, [x8, x9, lsl #2]
	mov	w11, #238
	and	w11, w20, w11
	cmp	w11, #102
	b.eq	LBB0_8
; %bb.5:
	cmp	w11, #170
	b.eq	LBB0_9
; %bb.6:
	cmp	w11, #136
	b.ne	LBB0_12
; %bb.7:
	eor	w0, w10, #0x8000
	str	w0, [x8, x9, lsl #2]
	ldr	x8, [x19, #24]
Lloh13:
	adrp	x9, _CODEC_DATA@GOTPAGE
Lloh14:
	ldr	x9, [x9, _CODEC_DATA@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_outw
	ldr	x0, [x21]
	ldr	x8, [x19, #24]
Lloh16:
	adrp	x9, _CODEC_COMMAND@GOTPAGE
Lloh17:
	ldr	x9, [x9, _CODEC_COMMAND@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_outb
	ldr	w0, [x19, #16]
Lloh19:
	adrp	x8, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	x2, [x19, #40]
	b	LBB0_11
LBB0_8:
	and	w11, w10, #0x7f
	cmp	w11, #31
	cinc	w10, w10, lo
	add	w11, w10, #256
	ubfx	w12, w10, #8, #7
	cmp	w12, #31
	csel	w0, w11, w10, lo
	b	LBB0_10
LBB0_9:
	tst	w10, #0x7f
	cset	w11, ne
	sub	w10, w10, w11
	sub	w11, w10, #256
	tst	w10, #0x7f00
	csel	w0, w10, w11, eq
LBB0_10:
	str	w0, [x8, x9, lsl #2]
	ldr	x8, [x19, #24]
Lloh22:
	adrp	x9, _CODEC_DATA@GOTPAGE
Lloh23:
	ldr	x9, [x9, _CODEC_DATA@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_outw
	ldr	x0, [x21]
	ldr	x8, [x19, #24]
Lloh25:
	adrp	x9, _CODEC_COMMAND@GOTPAGE
Lloh26:
	ldr	x9, [x9, _CODEC_COMMAND@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_outb
	ldr	w0, [x19, #16]
Lloh28:
	adrp	x8, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	ldr	x2, [x19, #8]
LBB0_11:
	bl	_snd_ctl_notify
LBB0_12:
	mov	x0, x19
	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	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_SHADOW_MIX_REG_VOICE,8,3       ; @SHADOW_MIX_REG_VOICE
	.comm	_HW_VOL_COUNTER_VOICE,8,3       ; @HW_VOL_COUNTER_VOICE
	.comm	_SHADOW_MIX_REG_MASTER,8,3      ; @SHADOW_MIX_REG_MASTER
	.comm	_HW_VOL_COUNTER_MASTER,8,3      ; @HW_VOL_COUNTER_MASTER
	.comm	_AC97_MASTER_VOL,8,3            ; @AC97_MASTER_VOL
	.comm	_CODEC_DATA,8,3                 ; @CODEC_DATA
	.comm	_CODEC_COMMAND,8,3              ; @CODEC_COMMAND
	.comm	_SNDRV_CTL_EVENT_MASK_VALUE,4,2 ; @SNDRV_CTL_EVENT_MASK_VALUE
	.no_dead_strip	_snd_m3_update_hw_volume
.subsections_via_symbols
