	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda9875_s_ctrl
_tda9875_s_ctrl:                        ## @tda9875_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	%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	%rsi, %r13
	movq	%rdi, %r14
	callq	_to_state
	movq	%rax, %rdx
	movl	(%r13), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_5
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_6:
	imull	$606, (%rdx), %r12d             ## imm = 0x25E
	addl	$50904, %r12d                   ## imm = 0xC6D8
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	imull	$606, 4(%rdx), %r14d            ## imm = 0x25E
	addl	$50904, %r14d                   ## imm = 0xC6D8
	movl	%r12d, %edi
	movl	%r14d, %esi
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	callq	_max
	movl	%eax, %ebx
	movl	%r12d, %edi
	movl	%r14d, %esi
	callq	_min
	shll	$15, %eax
	testl	%ebx, %ebx
	movl	$1, %ecx
	cmovnel	%ebx, %ecx
	cltd
	idivl	%ecx
	movl	$65535, %r15d                   ## imm = 0xFFFF
	subl	%eax, %r15d
	cmpl	%r14d, %r12d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	cmovgel	%eax, %r15d
	movl	4(%r13), %r12d
	jmp	LBB0_7
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_4:
	movslq	4(%r13), %rax
	imulq	$-1037155065, %rax, %rcx        ## imm = 0xC22E4507
	shrq	$32, %rcx
	addl	%eax, %ecx
	movl	%ecx, %eax
	shrl	$11, %eax
	shrl	$31, %ecx
	addl	%ecx, %eax
	addl	$244, %eax
	movzbl	%al, %eax
	cmpl	$12, %eax
	movl	$12, %ecx
	cmovbl	%eax, %ecx
	movl	%ecx, 12(%rdx)
	jmp	LBB0_8
LBB0_3:
	movslq	4(%r13), %rax
	imulq	$458129845, %rax, %rax          ## imm = 0x1B4E81B5
	movq	%rax, %rcx
	shrq	$40, %rcx
	shrq	$63, %rax
	addl	%ecx, %eax
	addl	$244, %eax
	movzbl	%al, %eax
	cmpl	$15, %eax
	movl	$15, %ecx
	cmovbl	%eax, %ecx
	movl	%ecx, 8(%rdx)
	jmp	LBB0_8
LBB0_2:
	imull	$606, (%rdx), %edi              ## imm = 0x25E
	addl	$50904, %edi                    ## imm = 0xC6D8
	imull	$606, 4(%rdx), %esi             ## imm = 0x25E
	addl	$50904, %esi                    ## imm = 0xC6D8
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	callq	_max
	movl	%eax, %r12d
	movl	4(%r13), %r15d
LBB0_7:
	movl	$65536, %edi                    ## imm = 0x10000
	subl	%r15d, %edi
	movl	$32768, %esi                    ## imm = 0x8000
	callq	_min
	movl	%eax, %ebx
	imull	%r12d, %ebx
	movl	%r15d, %edi
	movl	$32768, %esi                    ## imm = 0x8000
	callq	_min
	imull	%r12d, %eax
	movslq	%ebx, %rcx
	imulq	$226796953, %rcx, %rcx          ## imm = 0xD84A599
	movq	%rcx, %rdx
	shrq	$52, %rdx
	shrq	$63, %rcx
	addl	%edx, %ecx
	addl	$172, %ecx
	movzbl	%cl, %ecx
	cmpl	$24, %ecx
	movl	$24, %edx
	cmovael	%edx, %ecx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%ecx, (%rsi)
	cltq
	imulq	$226796953, %rax, %rax          ## imm = 0xD84A599
	movq	%rax, %rcx
	shrq	$52, %rcx
	shrq	$63, %rax
	addl	%ecx, %eax
	addl	$172, %eax
	movzbl	%al, %eax
	cmpl	$24, %eax
	cmovbl	%eax, %edx
	movl	%edx, 4(%rsi)
LBB0_8:
	movq	%r14, %rdi
	callq	_tda9875_set
	xorl	%eax, %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_4
	.long	L0_0_set_3
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_tda9875_s_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda9875_s_ctrl
_tda9875_s_ctrl:                        ; @tda9875_s_ctrl
	.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	x21, x1
	mov	x19, x0
	bl	_to_state
	ldr	w8, [x21]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_3
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	w8, #606
	mov	w9, #50904
	ldp	w10, w11, [x20]
	madd	w22, w10, w8, w9
	madd	w23, w11, w8, w9
	mov	x0, x22
	mov	x1, x23
	bl	_max
	mov	x24, x0
	mov	x0, x22
	mov	x1, x23
	bl	_min
	lsl	w8, w0, #15
	cmp	w24, #0
	csinc	w9, w24, wzr, ne
	sdiv	w8, w8, w9
	mov	w9, #65535
	sub	w9, w9, w8
	cmp	w22, w23
	csel	w23, w9, w8, lt
	ldr	w22, [x21, #4]
	b	LBB0_7
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_4:
	ldrsw	x8, [x21, #4]
	mov	x9, #-47865
	movk	x9, #49710, lsl #16
	mul	x9, x8, x9
	lsr	x9, x9, #32
	add	w8, w9, w8
	lsr	w9, w8, #11
	add	w8, w9, w8, lsr #31
	add	w8, w8, #244
	and	w8, w8, #0xff
	mov	w9, #12
	cmp	w8, #12
	csel	w8, w8, w9, lo
	str	w8, [x20, #12]
	b	LBB0_8
LBB0_5:
	ldrsw	x8, [x21, #4]
	mov	w9, #33205
	movk	w9, #6990, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	lsr	x8, x8, #40
	add	w8, w8, w9
	add	w8, w8, #244
	and	w8, w8, #0xff
	mov	w9, #15
	cmp	w8, #15
	csel	w8, w8, w9, lo
	str	w8, [x20, #8]
	b	LBB0_8
LBB0_6:
	mov	w8, #606
	mov	w9, #50904
	ldp	w10, w11, [x20]
	madd	w0, w10, w8, w9
	madd	w1, w11, w8, w9
	bl	_max
	mov	x22, x0
	ldr	w23, [x21, #4]
LBB0_7:
	mov	w8, #65536
	sub	w0, w8, w23
	mov	w1, #32768
	bl	_min
	mul	w21, w0, w22
	mov	x0, x23
	mov	w1, #32768
	bl	_min
	mul	w8, w0, w22
	mov	w9, #42393
	movk	w9, #3460, lsl #16
	smull	x10, w21, w9
	lsr	x11, x10, #63
	lsr	x10, x10, #52
	add	w10, w10, w11
	add	w10, w10, #172
	and	w10, w10, #0xff
	mov	w11, #24
	cmp	w10, #24
	csel	w10, w10, w11, lo
	smull	x8, w8, w9
	lsr	x9, x8, #63
	lsr	x8, x8, #52
	add	w8, w8, w9
	add	w8, w8, #172
	and	w8, w8, #0xff
	cmp	w8, #24
	csel	w8, w8, w11, lo
	stp	w10, w8, [x20]
LBB0_8:
	mov	x0, x19
	bl	_tda9875_set
	mov	w0, #0
LBB0_9:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_tda9875_s_ctrl
.subsections_via_symbols
