	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function hdcd_analyze_prepare
LCPI0_0:
	.quad	0x3fb999999999999a              ## double 0.10000000000000001
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_hdcd_analyze_prepare:                  ## @hdcd_analyze_prepare
	.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
	imull	%ecx, %edx
	testl	%edx, %edx
	jle	LBB0_3
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movslq	(%rdi), %rax
	imulq	$458129845, %rax, %r15          ## imm = 0x1B4E81B5
	movq	%r15, %rax
	shrq	$63, %rax
	sarq	$37, %r15
	addl	%eax, %r15d
	movslq	%ecx, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%r12,4), %edi
	callq	_abs
	xorl	%ecx, %ecx
	movq	_PEAK_EXT_LEVEL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	setge	%cl
	movl	(%r14,%r12,4), %eax
	andl	$1, %eax
	leal	(%rax,%rcx,2), %r13d
	movl	(%rbx), %edx
	movl	4(%rbx), %edi
	movl	$300, %esi                      ## imm = 0x12C
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	callq	_TONEGEN16
	andl	$-4, %eax
	orl	%r13d, %eax
	movl	%eax, (%r14,%r12,4)
	movl	4(%rbx), %eax
	leal	1(%rax), %ecx
	cmpl	%r15d, %eax
	movl	$0, %eax
	cmovgel	%eax, %ecx
	movl	%ecx, 4(%rbx)
	addq	-56(%rbp), %r12                 ## 8-byte Folded Reload
	cmpq	-48(%rbp), %r12                 ## 8-byte Folded Reload
	jl	LBB0_2
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PEAK_EXT_LEVEL,8,3             ## @PEAK_EXT_LEVEL
	.no_dead_strip	_hdcd_analyze_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdcd_analyze_prepare
_hdcd_analyze_prepare:                  ; @hdcd_analyze_prepare
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
                                        ; kill: def $w3 killed $w3 def $x3
	mul	w21, w3, w2
	cmp	w21, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	x22, #0
	ldrsw	x8, [x0]
	mov	w9, #33205
	movk	w9, #6990, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w23, w8, w9
	sxtw	x24, w3
Lloh0:
	adrp	x25, _PEAK_EXT_LEVEL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PEAK_EXT_LEVEL@GOTPAGEOFF]
	mov	x26, #-7378697629483820647
	movk	x26, #39322
	movk	x26, #16313, lsl #48
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x27, x22, #2
	ldr	w0, [x19, x27]
	bl	_abs
	ldr	x8, [x25]
	cmp	x0, x8
	cset	w8, ge
	ldr	w9, [x19, x27]
	and	w28, w9, #0x1
	bfi	w28, w8, #1, #1
	ldp	w2, w0, [x20]
	fmov	d0, x26
	mov	w1, #300
	bl	_TONEGEN16
	and	w8, w0, #0xfffffffc
	orr	w8, w28, w8
	str	w8, [x19, x27]
	ldr	w8, [x20, #4]
	cmp	w8, w23
	csinc	w8, wzr, w8, ge
	str	w8, [x20, #4]
	add	x22, x22, x24
	cmp	x22, x21
	b.lt	LBB0_2
LBB0_3:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PEAK_EXT_LEVEL,8,3             ; @PEAK_EXT_LEVEL
	.no_dead_strip	_hdcd_analyze_prepare
.subsections_via_symbols
