	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function put_ak_reg
_put_ak_reg:                            ## @put_ak_reg
	.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	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r13
	callq	_snd_kcontrol_chip
	movq	%rax, %rbx
	movl	(%r13), %edi
	callq	_AK_GET_MASK
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	(%r13), %edi
	callq	_AK_GET_CHIP
	movl	%eax, %r12d
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	callq	_snd_akm4xxx_get_vol
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpb	%r14b, %cl
	je	LBB0_5
## %bb.1:
	movq	%rbx, %rdi
	movzbl	%r14b, %ebx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	callq	_snd_akm4xxx_set_vol
	movl	(%r13), %edi
	callq	_AK_GET_VOL_CVT
	testb	%r14b, %r14b
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	js	LBB0_4
## %bb.2:
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_vol_cvt_datt@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movb	(%rax,%rbx), %r14b
LBB0_4:
	movl	(%r13), %edi
	callq	_AK_GET_IPGA
	testq	%rax, %rax
	setne	%al
	testb	%r14b, %r14b
	sets	%bl
	andb	%al, %bl
	addb	%r14b, %bl
	movl	(%r13), %edi
	callq	_AK_GET_INVERT
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	subb	%bl, %cl
	testq	%rax, %rax
	movzbl	%bl, %eax
	movzbl	%cl, %ebx
	cmovel	%eax, %ebx
	movl	(%r13), %edi
	callq	_AK_GET_NEEDSMSB
	movl	%ebx, %ecx
	orb	$-128, %cl
	testq	%rax, %rax
	movzbl	%cl, %eax
	cmovel	%ebx, %eax
	movzbl	%al, %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_snd_akm4xxx_write
	movl	$1, %eax
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vol_cvt_datt,8,3               ## @vol_cvt_datt
	.no_dead_strip	_put_ak_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function put_ak_reg
_put_ak_reg:                            ; @put_ak_reg
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x23, x2
	mov	x19, x1
	mov	x21, x0
	bl	_snd_kcontrol_chip
	mov	x20, x0
	ldr	w0, [x21]
	bl	_AK_GET_MASK
	mov	x24, x0
	ldr	w0, [x21]
	bl	_AK_GET_CHIP
	mov	x22, x0
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	bl	_snd_akm4xxx_get_vol
	cmp	w0, w23
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_6
LBB0_2:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	mov	x3, x23
	bl	_snd_akm4xxx_set_vol
	ldr	w0, [x21]
	bl	_AK_GET_VOL_CVT
	tbnz	w23, #7, LBB0_5
; %bb.3:
	cbz	x0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _vol_cvt_datt@GOTPAGE
Lloh1:
	ldr	x8, [x8, _vol_cvt_datt@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldrb	w23, [x8, w23, uxtw]
LBB0_5:
	ldr	w0, [x21]
	bl	_AK_GET_IPGA
	cmp	x0, #0
	sxtb	w8, w23
	ccmp	w8, #0, #0, ne
	cinc	w23, w23, lt
	ldr	w0, [x21]
	bl	_AK_GET_INVERT
	sub	w8, w24, w23
	cmp	x0, #0
	csel	w23, w23, w8, eq
	ldr	w0, [x21]
	bl	_AK_GET_NEEDSMSB
	orr	w8, w23, #0x80
	cmp	x0, #0
	csel	w8, w23, w8, eq
	and	w3, w8, #0xff
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	bl	_snd_akm4xxx_write
	mov	w0, #1
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_vol_cvt_datt,8,3               ; @vol_cvt_datt
	.no_dead_strip	_put_ak_reg
.subsections_via_symbols
