	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_azf3328_put_mixer
_snd_azf3328_put_mixer:                 ## @snd_azf3328_put_mixer
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_snd_kcontrol_chip
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_snd_azf3328_dbgcallenter
	movl	(%rbx), %esi
	leaq	-80(%rbp), %rdi
	callq	_snd_azf3328_mixer_reg_decode
	movl	-68(%rbp), %esi
	movq	%r14, %rdi
	callq	_snd_azf3328_mixer_inw
	movq	(%r12), %rdx
	movl	-80(%rbp), %r8d
	movl	(%rdx), %ecx
	andl	%r8d, %ecx
	movq	-64(%rbp), %rsi
	movl	%r8d, %ebx
	subl	%ecx, %ebx
	testq	%rsi, %rsi
	cmovel	%ecx, %ebx
	movb	-76(%rbp), %cl
	movl	%r8d, %edi
	shll	%cl, %edi
	notl	%edi
	shll	%cl, %ebx
	andl	%eax, %edi
	orl	%edi, %ebx
	cmpq	$0, -56(%rbp)
	je	LBB0_2
## %bb.1:
	movl	4(%rdx), %ecx
	andl	%r8d, %ecx
	movl	%r8d, %edx
	subl	%ecx, %edx
	testq	%rsi, %rsi
	cmovel	%ecx, %edx
	movb	-72(%rbp), %cl
	movl	%r8d, %esi
	shll	%cl, %esi
	notl	%esi
	andl	%esi, %ebx
	shll	%cl, %edx
	orl	%edx, %ebx
LBB0_2:
	movl	-68(%rbp), %esi
	cmpl	$7, %r8d
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jl	LBB0_4
## %bb.3:
	movl	%ebx, %edx
	sarl	$8, %edx
	movzbl	%bl, %ecx
	movq	_SET_CHAN_LEFT@GOTPCREL(%rip), %rax
	movq	_SET_CHAN_RIGHT@GOTPCREL(%rip), %rdi
	movl	(%rdi), %r8d
	orl	(%rax), %r8d
	movq	%r14, %rdi
	xorl	%r9d, %r9d
	callq	_snd_azf3328_mixer_write_volume_gradually
	jmp	LBB0_5
LBB0_4:
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_snd_azf3328_mixer_outw
LBB0_5:
	movq	%r14, %rdi
	movl	-68(%rbp), %r13d
	movq	(%r12), %rax
	movl	(%rax), %r12d
	movl	4(%rax), %r14d
	movl	-76(%rbp), %r15d
	movl	-72(%rbp), %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	%r13d, %esi
	callq	_snd_azf3328_mixer_inw
                                        ## kill: def $eax killed $eax def $rax
	subq	$8, %rsp
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %r8d
	movl	%r15d, %r9d
	pushq	%rax
	pushq	%rbx
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	callq	_snd_azf3328_dbgmixer
	addq	$32, %rsp
	xorl	%eax, %eax
	callq	_snd_azf3328_dbgcallleave
	xorl	%eax, %eax
	cmpl	%r14d, %ebx
	setne	%al
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SET_CHAN_LEFT,4,2              ## @SET_CHAN_LEFT
	.comm	_SET_CHAN_RIGHT,4,2             ## @SET_CHAN_RIGHT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"put: %02x to %02lx|%02lx, oreg %04x; shift %02d|%02d -> nreg %04x; after: %04x\n"

	.no_dead_strip	_snd_azf3328_put_mixer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_azf3328_put_mixer
_snd_azf3328_put_mixer:                 ; @snd_azf3328_put_mixer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x1
	mov	x19, x0
	bl	_snd_kcontrol_chip
	mov	x20, x0
	bl	_snd_azf3328_dbgcallenter
	ldr	w1, [x19]
	add	x0, sp, #16
	bl	_snd_azf3328_mixer_reg_decode
	ldr	w1, [sp, #28]
	mov	x0, x20
	bl	_snd_azf3328_mixer_inw
	mov	x19, x0
	ldr	x9, [x21]
	ldr	w10, [x9]
	ldp	w8, w11, [sp, #16]
	and	w12, w8, w10
	sub	w13, w8, w12
	ldp	x10, x14, [sp, #32]
	cmp	x10, #0
	csel	w12, w12, w13, eq
	lsl	w12, w12, w11
	lsl	w11, w8, w11
	bic	w11, w0, w11
	orr	w22, w11, w12
	cbz	x14, LBB0_2
; %bb.1:
	ldr	w9, [x9, #4]
	and	w9, w9, w8
	sub	w11, w8, w9
	cmp	x10, #0
	csel	w9, w9, w11, eq
	ldr	w10, [sp, #24]
	lsl	w11, w8, w10
	bic	w11, w22, w11
	lsl	w9, w9, w10
	orr	w22, w9, w11
LBB0_2:
	ldr	w1, [sp, #28]
	cmp	w8, #7
	b.lt	LBB0_4
; %bb.3:
	asr	w2, w22, #8
Lloh0:
	adrp	x8, _SET_CHAN_LEFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SET_CHAN_LEFT@GOTPAGEOFF]
	and	w3, w22, #0xff
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SET_CHAN_RIGHT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SET_CHAN_RIGHT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w4, w9, w8
	mov	x0, x20
	mov	w5, #0
	bl	_snd_azf3328_mixer_write_volume_gradually
	b	LBB0_5
LBB0_4:
	mov	x0, x20
	mov	x2, x22
	bl	_snd_azf3328_mixer_outw
LBB0_5:
	ldp	w26, w23, [sp, #24]
	ldr	x8, [x21]
	ldp	w21, w24, [x8]
	ldr	w25, [sp, #20]
	mov	x0, x20
	mov	x1, x23
	bl	_snd_azf3328_mixer_inw
	str	w0, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	mov	x2, x21
	mov	x3, x24
	mov	x4, x19
	mov	x5, x25
	mov	x6, x26
	mov	x7, x22
	bl	_snd_azf3328_dbgmixer
	bl	_snd_azf3328_dbgcallleave
	cmp	w22, w19
	cset	w0, ne
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SET_CHAN_LEFT,4,2              ; @SET_CHAN_LEFT
	.comm	_SET_CHAN_RIGHT,4,2             ; @SET_CHAN_RIGHT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"put: %02x to %02lx|%02lx, oreg %04x; shift %02d|%02d -> nreg %04x; after: %04x\n"

	.no_dead_strip	_snd_azf3328_put_mixer
.subsections_via_symbols
