	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda7432_s_ctrl
_tda7432_s_ctrl:                        ## @tda7432_s_ctrl
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_sd
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_to_state
	movl	(%rbx), %ecx
	cmpl	$128, %ecx
	je	LBB0_9
## %bb.1:
	cmpl	$130, %ecx
	je	LBB0_14
## %bb.2:
	cmpl	$129, %ecx
	jne	LBB0_15
## %bb.3:
	movq	24(%rax), %rcx
	movl	(%rcx), %ebx
	testl	%ebx, %ebx
	js	LBB0_4
## %bb.5:
	movq	_TDA7432_ATTEN_0DB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmovel	%ecx, %ebx
	movl	%ebx, %r15d
	movl	%ecx, %ebx
	jmp	LBB0_6
LBB0_9:
	movl	$111, %eax
	subl	4(%rbx), %eax
	movq	_loudness@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	%edx, %edx
	je	LBB0_11
## %bb.10:
	movq	_TDA7432_LD_ON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
LBB0_11:
	orl	%eax, %edx
	movq	_TDA7432_VL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_12
LBB0_14:
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movl	(%rax), %eax
	movl	(%rcx), %ecx
	movl	$22, %edi
	movl	$22, %edx
	subl	%eax, %edx
	cmpl	$8, %eax
	cmovll	%eax, %edx
	subl	%ecx, %edi
	cmpl	$8, %ecx
	cmovll	%ecx, %edi
	movq	_TDA7432_TN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$4, %edx
	orl	%edi, %edx
	orl	$16, %edx
LBB0_12:
	movq	%r14, %rdi
	jmp	LBB0_13
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_16
LBB0_4:
	negl	%ebx
	movq	_TDA7432_ATTEN_0DB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
LBB0_6:
	movq	16(%rax), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	_TDA7432_MUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	orl	%eax, %r15d
	orl	%eax, %ebx
	movq	_TDA7432_LF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_tda7432_write
	movq	_TDA7432_LR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_tda7432_write
	movq	_TDA7432_RF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_tda7432_write
	movq	_TDA7432_RR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
LBB0_13:
	callq	_tda7432_write
	xorl	%eax, %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TDA7432_ATTEN_0DB,4,2          ## @TDA7432_ATTEN_0DB
	.comm	_TDA7432_MUTE,4,2               ## @TDA7432_MUTE
	.comm	_TDA7432_LF,4,2                 ## @TDA7432_LF
	.comm	_TDA7432_LR,4,2                 ## @TDA7432_LR
	.comm	_TDA7432_RF,4,2                 ## @TDA7432_RF
	.comm	_TDA7432_RR,4,2                 ## @TDA7432_RR
	.comm	_loudness,4,2                   ## @loudness
	.comm	_TDA7432_LD_ON,4,2              ## @TDA7432_LD_ON
	.comm	_TDA7432_VL,4,2                 ## @TDA7432_VL
	.comm	_TDA7432_TN,4,2                 ## @TDA7432_TN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_tda7432_s_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda7432_s_ctrl
_tda7432_s_ctrl:                        ; @tda7432_s_ctrl
	.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	x20, x0
	bl	_to_sd
	mov	x19, x0
	bl	_to_state
	ldr	w8, [x20]
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #130
	b.eq	LBB0_6
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_8
; %bb.3:
	ldr	x8, [x0, #24]
	ldr	w9, [x8]
	tbnz	w9, #31, LBB0_9
; %bb.4:
Lloh0:
	adrp	x8, _TDA7432_ATTEN_0DB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TDA7432_ATTEN_0DB@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w9, #0
	csel	w9, w8, w9, eq
	b	LBB0_10
LBB0_5:
	ldr	w8, [x20, #4]
Lloh3:
	adrp	x9, _loudness@GOTPAGE
Lloh4:
	ldr	x9, [x9, _loudness@GOTPAGEOFF]
	mov	w10, #111
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x11, _TDA7432_LD_ON@GOTPAGE
Lloh7:
	ldr	x11, [x11, _TDA7432_LD_ON@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	cmp	w9, #0
	csel	w9, wzr, w11, eq
	sub	w8, w10, w8
	orr	w2, w9, w8
Lloh9:
	adrp	x8, _TDA7432_VL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TDA7432_VL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	b	LBB0_7
LBB0_6:
	ldp	x9, x8, [x0]
	ldr	w8, [x8]
	ldr	w9, [x9]
	mov	w10, #22
	sub	w11, w10, w8
	cmp	w8, #7
	csel	w8, w11, w8, gt
	sub	w10, w10, w9
	cmp	w9, #7
	csel	w9, w10, w9, gt
Lloh12:
	adrp	x10, _TDA7432_TN@GOTPAGE
Lloh13:
	ldr	x10, [x10, _TDA7432_TN@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x10]
	orr	w8, w9, w8, lsl #4
	orr	w2, w8, #0x10
LBB0_7:
	mov	x0, x19
	b	LBB0_11
LBB0_8:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_9:
	neg	w8, w9
Lloh18:
	adrp	x9, _TDA7432_ATTEN_0DB@GOTPAGE
Lloh19:
	ldr	x9, [x9, _TDA7432_ATTEN_0DB@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
LBB0_10:
	ldr	x10, [x0, #16]
	ldr	w10, [x10]
Lloh21:
	adrp	x11, _TDA7432_MUTE@GOTPAGE
Lloh22:
	ldr	x11, [x11, _TDA7432_MUTE@GOTPAGEOFF]
Lloh23:
	ldr	w11, [x11]
	cmp	w10, #0
	csel	w10, wzr, w11, eq
	orr	w20, w10, w9
	orr	w21, w10, w8
Lloh24:
	adrp	x8, _TDA7432_LF@GOTPAGE
Lloh25:
	ldr	x8, [x8, _TDA7432_LF@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_tda7432_write
Lloh27:
	adrp	x8, _TDA7432_LR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _TDA7432_LR@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_tda7432_write
Lloh30:
	adrp	x8, _TDA7432_RF@GOTPAGE
Lloh31:
	ldr	x8, [x8, _TDA7432_RF@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_tda7432_write
Lloh33:
	adrp	x8, _TDA7432_RR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _TDA7432_RR@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
LBB0_11:
	bl	_tda7432_write
	mov	w0, #0
LBB0_12:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_TDA7432_ATTEN_0DB,4,2          ; @TDA7432_ATTEN_0DB
	.comm	_TDA7432_MUTE,4,2               ; @TDA7432_MUTE
	.comm	_TDA7432_LF,4,2                 ; @TDA7432_LF
	.comm	_TDA7432_LR,4,2                 ; @TDA7432_LR
	.comm	_TDA7432_RF,4,2                 ; @TDA7432_RF
	.comm	_TDA7432_RR,4,2                 ; @TDA7432_RR
	.comm	_loudness,4,2                   ; @loudness
	.comm	_TDA7432_LD_ON,4,2              ; @TDA7432_LD_ON
	.comm	_TDA7432_VL,4,2                 ; @TDA7432_VL
	.comm	_TDA7432_TN,4,2                 ; @TDA7432_TN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_tda7432_s_ctrl
.subsections_via_symbols
