	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ac97_cvol_new
_snd_ac97_cvol_new:                     ## @snd_ac97_cvol_new
	.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
	movq	%r9, %r15
	movl	%r8d, %r12d
	movl	%ecx, %ebx
	movl	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	%r9, %rdi
	movl	%edx, %esi
	callq	_snd_ac97_valid_reg
	xorl	%ecx, %ecx
	testl	%eax, %eax
	je	LBB0_11
## %bb.1:
	testl	%r12d, %r12d
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	movl	%r13d, %esi
	je	LBB0_3
## %bb.2:
	movl	$8, %edx
	xorl	%ecx, %ecx
	movl	%ebx, %r8d
	movl	$1, %r9d
	callq	_AC97_DOUBLE
	movl	(%r15), %eax
	movl	%eax, -56(%rbp)
	leaq	-56(%rbp), %rdi
	jmp	LBB0_4
LBB0_3:
	xorl	%edx, %edx
	movl	%ebx, %ecx
	movl	$1, %r8d
	callq	_AC97_SINGLE
	movl	(%r15), %eax
	movl	%eax, -48(%rbp)
	leaq	-48(%rbp), %rdi
LBB0_4:
	movq	%r15, %rsi
	callq	_snd_ctl_new1
	movq	%rax, %r14
	movq	_AC97_PHONE@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jg	LBB0_7
## %bb.5:
	movq	_AC97_PCM@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jl	LBB0_7
## %bb.6:
	movq	_db_scale_5bit_12db_max@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_8
LBB0_7:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_find_db_scale
	movl	%eax, %esi
LBB0_8:
	movq	%r14, %rdi
	callq	_set_tlv_db_scale
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_snd_ctl_add
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_snd_ac97_read
	andl	$32896, %eax                    ## imm = 0x8080
	shll	$8, %r12d
	orl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	orl	%eax, %r12d
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_snd_ac97_write_cache
	xorl	%ecx, %ecx
	jmp	LBB0_11
LBB0_9:
	movl	%eax, %ecx
LBB0_11:
	movl	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AC97_PHONE,4,2                 ## @AC97_PHONE
	.comm	_AC97_PCM,4,2                   ## @AC97_PCM
	.comm	_db_scale_5bit_12db_max,4,2     ## @db_scale_5bit_12db_max
	.no_dead_strip	_snd_ac97_cvol_new
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ac97_cvol_new
_snd_ac97_cvol_new:                     ; @snd_ac97_cvol_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x5
	mov	x21, x4
	mov	x22, x3
	mov	x20, x2
	mov	x24, x1
	mov	x23, x0
	mov	x0, x5
	mov	x1, x2
	bl	_snd_ac97_valid_reg
	cbz	w0, LBB0_9
; %bb.1:
	mov	x0, x24
	mov	x1, x20
	cbz	w21, LBB0_3
; %bb.2:
	mov	w2, #8
	mov	w3, #0
	mov	x4, x22
	mov	w5, #1
	bl	_AC97_DOUBLE
	ldr	w8, [x19]
	str	w8, [sp, #8]
	add	x0, sp, #8
	b	LBB0_4
LBB0_3:
	mov	w2, #0
	mov	x3, x22
	mov	w4, #1
	bl	_AC97_SINGLE
	ldr	w8, [x19]
	str	w8, [sp]
	mov	x0, sp
LBB0_4:
	mov	x1, x19
	bl	_snd_ctl_new1
	mov	x24, x0
Lloh0:
	adrp	x8, _AC97_PHONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AC97_PHONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AC97_PCM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AC97_PCM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w20
	ccmp	w9, w20, #8, le
	b.ge	LBB0_6
; %bb.5:
	mov	x0, x22
	bl	_find_db_scale
	mov	x1, x0
	b	LBB0_7
LBB0_6:
Lloh6:
	adrp	x8, _db_scale_5bit_12db_max@GOTPAGE
Lloh7:
	ldr	x8, [x8, _db_scale_5bit_12db_max@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
LBB0_7:
	mov	x0, x24
	bl	_set_tlv_db_scale
	mov	x0, x23
	mov	x1, x24
	bl	_snd_ctl_add
	tbnz	w0, #31, LBB0_9
; %bb.8:
	mov	x0, x19
	mov	x1, x20
	bl	_snd_ac97_read
	mov	w8, #32896
	and	w8, w0, w8
	orr	w9, w22, w21, lsl #8
	orr	w2, w9, w8
	mov	x0, x19
	mov	x1, x20
	bl	_snd_ac97_write_cache
	mov	w0, #0
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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AC97_PHONE,4,2                 ; @AC97_PHONE
	.comm	_AC97_PCM,4,2                   ; @AC97_PCM
	.comm	_db_scale_5bit_12db_max,4,2     ; @db_scale_5bit_12db_max
	.no_dead_strip	_snd_ac97_cvol_new
.subsections_via_symbols
