	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm8775_set_audio
_wm8775_set_audio:                      ## @wm8775_set_audio
	.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, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	callq	_to_state
	movq	%rax, %r15
	movq	24(%rax), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r15), %rax
	movq	16(%r15), %rcx
	movl	(%rcx), %r13d
	movl	(%rax), %r12d
	movl	$65536, %edi                    ## imm = 0x10000
	subl	%r12d, %edi
	movl	$32768, %esi                    ## imm = 0x8000
	callq	_min
	movl	%eax, %ebx
	imull	%r13d, %ebx
	sarl	$23, %ebx
	movl	%r12d, %edi
	movl	$32768, %esi                    ## imm = 0x8000
	callq	_min
	movl	%eax, %r12d
	imull	%r13d, %r12d
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	sarl	$23, %r12d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_2
## %bb.1:
	testq	%r13, %r13
	je	LBB0_3
LBB0_2:
	movq	_R21@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$192, %edx
	orl	(%r15), %edx
	movq	%r14, %rdi
	callq	_wm8775_write
LBB0_3:
	movq	_R14@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	$256, %ebx                      ## imm = 0x100
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_wm8775_write
	movq	_R15@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	$256, %r12d                     ## imm = 0x100
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_wm8775_write
	testq	%r13, %r13
	je	LBB0_5
## %bb.4:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_R21@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wm8775_write                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_R21,4,2                        ## @R21
	.comm	_R14,4,2                        ## @R14
	.comm	_R15,4,2                        ## @R15
	.no_dead_strip	_wm8775_set_audio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm8775_set_audio
_wm8775_set_audio:                      ; @wm8775_set_audio
	.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	x21, x1
	mov	x19, x0
	bl	_to_state
	mov	x20, x0
	ldr	x8, [x0, #24]
	ldr	x23, [x8]
	ldp	x9, x8, [x0, #8]
	ldr	w25, [x8]
	ldr	w22, [x9]
	mov	w8, #65536
	sub	w0, w8, w22
	mov	w1, #32768
	bl	_min
	mul	w8, w0, w25
	asr	w24, w8, #23
	mov	x0, x22
	mov	w1, #32768
	bl	_min
	mul	w8, w0, w25
	asr	w22, w8, #23
	cbnz	w21, LBB0_2
; %bb.1:
	cbz	x23, LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _R21@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R21@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w8, [x20]
	orr	w2, w8, #0xc0
	mov	x0, x19
	bl	_wm8775_write
LBB0_3:
Lloh3:
	adrp	x8, _R14@GOTPAGE
Lloh4:
	ldr	x8, [x8, _R14@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	orr	w2, w24, #0x100
	mov	x0, x19
	bl	_wm8775_write
Lloh6:
	adrp	x8, _R15@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R15@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	orr	w2, w22, #0x100
	mov	x0, x19
	bl	_wm8775_write
	cbz	x23, LBB0_5
; %bb.4:
	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
LBB0_5:
Lloh9:
	adrp	x8, _R21@GOTPAGE
Lloh10:
	ldr	x8, [x8, _R21@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [x20]
	mov	x0, x19
	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	_wm8775_write
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_R21,4,2                        ; @R21
	.comm	_R14,4,2                        ; @R14
	.comm	_R15,4,2                        ; @R15
	.no_dead_strip	_wm8775_set_audio
.subsections_via_symbols
