	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_pitch
_calc_pitch:                            ## @calc_pitch
	.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
	movq	16(%rdi), %rax
	movq	48(%rdi), %rcx
	testq	%rax, %rax
	js	LBB0_2
## %bb.1:
	movslq	24(%r14), %rdx
	subq	%rdx, %rax
	shlq	$12, %rax
	movabsq	$3074457345618258603, %rdx      ## imm = 0x2AAAAAAAAAAAAAAB
	imulq	%rdx
	movq	%rdx, %rax
	shrq	$63, %rax
	shrq	%rdx
	jmp	LBB0_3
LBB0_2:
	movl	(%r14), %eax
	subl	24(%r14), %eax
	shll	$12, %eax
	cltq
	imulq	$715827883, %rax, %rdx          ## imm = 0x2AAAAAAB
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$33, %rdx
LBB0_3:
	addl	%eax, %edx
	imull	28(%r14), %edx
	movslq	%edx, %rax
	imulq	$1374389535, %rax, %rdx         ## imm = 0x51EB851F
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$37, %rdx
	addl	%eax, %edx
	movl	32(%r14), %eax
	shll	$12, %eax
	cltq
	imulq	$458129845, %rax, %rax          ## imm = 0x1B4E81B5
	movq	%rax, %rsi
	shrq	$63, %rsi
	sarq	$39, %rax
	addl	%esi, %eax
	addl	%edx, %eax
	movl	(%rcx), %edx
	testl	%edx, %edx
	je	LBB0_5
## %bb.4:
	imull	4(%rcx), %edx
	movslq	%edx, %rdx
	imulq	$715827883, %rdx, %rdx          ## imm = 0x2AAAAAAB
	movq	%rdx, %rsi
	shrq	$63, %rsi
	sarq	$41, %rdx
	addl	%esi, %edx
	addl	%eax, %edx
	movl	%edx, %eax
LBB0_5:
	movl	8(%rcx), %edx
	shll	$12, %edx
	movslq	%edx, %rdx
	imulq	$715827883, %rdx, %rdx          ## imm = 0x2AAAAAAB
	movq	%rdx, %rsi
	shrq	$63, %rsi
	sarq	$40, %rdx
	addl	%esi, %edx
	addl	%eax, %edx
	movslq	12(%rcx), %rax
	imulq	$715827883, %rax, %rax          ## imm = 0x2AAAAAAB
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$34, %rax
	addl	%ecx, %eax
	addl	%edx, %eax
	movq	8(%r14), %rcx
	movl	(%rcx), %ecx
	addl	40(%r14), %eax
	leal	(%rcx,%rax), %ebx
	addl	$57344, %ebx                    ## imm = 0xE000
	xorl	%r15d, %r15d
	movl	%ebx, %edi
	xorl	%esi, %esi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_LIMITVALUE
	cmpl	4(%r14), %ebx
	je	LBB0_7
## %bb.6:
	movl	%ebx, 4(%r14)
	movl	$1, %r15d
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EMUX_FX_INIT_PITCH,8,3         ## @EMUX_FX_INIT_PITCH
	.no_dead_strip	_calc_pitch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_pitch
_calc_pitch:                            ; @calc_pitch
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #48]
	ldr	x9, [x0, #16]
	tbnz	x9, #63, LBB0_2
; %bb.1:
	ldrsw	x10, [x19, #24]
	sub	x9, x9, x10
	lsl	x9, x9, #12
	mov	x10, #-6148914691236517206
	movk	x10, #43691
	movk	x10, #10922, lsl #48
	smulh	x9, x9, x10
	lsr	x10, x9, #63
	lsr	x9, x9, #1
	b	LBB0_3
LBB0_2:
	ldr	w9, [x19]
	ldr	w10, [x19, #24]
	sub	w9, w9, w10
	lsl	w9, w9, #12
	mov	w10, #43691
	movk	w10, #10922, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	asr	x9, x9, #33
LBB0_3:
	add	w9, w9, w10
	ldp	w10, w11, [x19, #28]
	mul	w9, w10, w9
	mov	w10, #34079
	movk	w10, #20971, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #32
	lsr	x9, x9, #63
	add	w9, w9, w10, asr #5
	lsl	w10, w11, #12
	mov	w11, #33205
	movk	w11, #6990, lsl #16
	smull	x10, w10, w11
	lsr	x11, x10, #63
	asr	x10, x10, #39
	add	w10, w10, w11
	add	w9, w10, w9
	ldr	w10, [x8]
	cbz	w10, LBB0_5
; %bb.4:
	ldr	w11, [x8, #4]
	mul	w10, w11, w10
	mov	w11, #43691
	movk	w11, #10922, lsl #16
	smull	x10, w10, w11
	lsr	x11, x10, #63
	asr	x10, x10, #41
	add	w10, w10, w11
	add	w9, w10, w9
LBB0_5:
	ldp	w10, w8, [x8, #8]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	lsl	w10, w10, #12
	mov	w11, #43691
	movk	w11, #10922, lsl #16
	smull	x10, w10, w11
	lsr	x12, x10, #63
	asr	x10, x10, #40
	mul	x8, x8, x11
	lsr	x11, x8, #63
	asr	x8, x8, #34
	ldr	w13, [x19, #40]
	add	w10, w10, w12
	add	w9, w9, w10
	ldr	x10, [x19, #8]
	ldr	w10, [x10]
	add	w8, w8, w11
	add	w8, w9, w8
	add	w8, w8, w13
	add	w8, w8, w10
	add	w20, w8, #14, lsl #12           ; =57344
	mov	x0, x20
	mov	w1, #0
	mov	w2, #65535
	bl	_LIMITVALUE
	mov	w0, #0
	ldr	w8, [x19, #4]
	cmp	w20, w8
	b.eq	LBB0_7
; %bb.6:
	str	w20, [x19, #4]
	mov	w0, #1
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.comm	_EMUX_FX_INIT_PITCH,8,3         ; @EMUX_FX_INIT_PITCH
	.no_dead_strip	_calc_pitch
.subsections_via_symbols
