	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function channel_calculate_freq
_channel_calculate_freq:                ## @channel_calculate_freq
	.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, %r14
	movl	4(%rdi), %ebx
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	addl	(%rdi), %ebx
	cmpq	$0, 8(%rax)
	je	LBB0_2
## %bb.1:
	movl	8(%r14), %ecx
	shll	$6, %ecx
	subl	%ecx, %ebx
	movl	(%rax), %r15d
	sarl	$4, %r15d
	movl	$4608, %eax                     ## imm = 0x1200
	subl	%ebx, %eax
	addl	$-7681, %ebx                    ## imm = 0xE1FF
	cmpl	$-7653, %ebx                    ## imm = 0xE21B
	movl	$-3072, %edx                    ## imm = 0xF400
	cmovael	%eax, %edx
	movq	_FP_SHIFT@GOTPCREL(%rip), %rbx
	movb	(%rbx), %cl
	shll	%cl, %edx
	movslq	%edx, %rax
	imulq	$715827883, %rax, %rdi          ## imm = 0x2AAAAAAB
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$39, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_exp_2
	imull	%r15d, %eax
	movb	(%rbx), %cl
	addb	$-4, %cl
	sarl	%cl, %eax
	jmp	LBB0_3
LBB0_2:
	cmpl	$29021, %ebx                    ## imm = 0x715D
	movl	$29021, %r15d                   ## imm = 0x715D
	cmovgel	%r15d, %ebx
	movq	_FP_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movl	8(%r14), %eax
	shll	%cl, %eax
	cltq
	imulq	$715827883, %rax, %rdi          ## imm = 0x2AAAAAAB
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$33, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_exp_2
	movl	%eax, %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	movl	%eax, %ecx
	cmpl	$28, %eax
	cmovll	%r15d, %ecx
	movq	16(%r14), %rax
	movq	(%rax), %rax
	imull	$1712, (%rax), %eax             ## imm = 0x6B0
	cltd
	idivl	%ecx
LBB0_3:
	movl	%eax, 12(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FP_SHIFT,4,2                   ## @FP_SHIFT
	.no_dead_strip	_channel_calculate_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function channel_calculate_freq
_channel_calculate_freq:                ; @channel_calculate_freq
	.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	x19, x0
	ldp	w8, w9, [x0]
	add	w8, w9, w8
	ldr	x9, [x0, #16]
	ldr	x9, [x9]
	ldr	x10, [x9, #8]
	cbz	x10, LBB0_2
; %bb.1:
	ldr	w10, [x19, #8]
	sub	w8, w8, w10, lsl #6
	mov	w10, #-7681
	ldr	w9, [x9]
	asr	w20, w9, #4
	mov	w9, #4608
	sub	w9, w9, w8
	mov	w11, #-7653
	add	w8, w8, w10
	cmp	w8, w11
	mov	w8, #-3072
	csel	w8, w8, w9, lo
Lloh0:
	adrp	x21, _FP_SHIFT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FP_SHIFT@GOTPAGEOFF]
	ldr	w9, [x21]
	lsl	w8, w8, w9
	mov	w9, #43691
	movk	w9, #10922, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #39
	add	w0, w8, w9
	bl	_exp_2
	mul	w8, w0, w20
	ldr	w9, [x21]
	sub	w9, w9, #4
	asr	w8, w8, w9
	b	LBB0_3
LBB0_2:
	mov	w20, #29021
	cmp	w8, w20
	csel	w8, w8, w20, lt
Lloh2:
	adrp	x9, _FP_SHIFT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _FP_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	lsl	w21, w8, w9
	ldr	w8, [x19, #8]
	lsl	w8, w8, w9
	mov	w9, #43691
	movk	w9, #10922, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w0, w8, w9
	bl	_exp_2
	sdiv	w8, w21, w0
	cmp	w8, #28
	csel	w8, w20, w8, lt
	ldr	x9, [x19, #16]
	ldr	x9, [x9]
	ldr	w9, [x9]
	mov	w10, #1712
	mul	w9, w9, w10
	sdiv	w8, w9, w8
LBB0_3:
	str	w8, [x19, #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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_FP_SHIFT,4,2                   ; @FP_SHIFT
	.no_dead_strip	_channel_calculate_freq
.subsections_via_symbols
