	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_phase_step
_calc_phase_step:                       ## @calc_phase_step
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testl	%edi, %edi
	je	LBB0_2
## %bb.1:
	movq	%rdx, %rbx
	movl	%esi, %edx
	testl	%esi, %esi
	je	LBB0_2
## %bb.4:
	movl	%edi, %esi
	movq	_DOWN_SCALE_RATIO_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	%edx, %eax
	cmpl	%edi, %eax
	jge	LBB0_6
## %bb.5:
	movq	_EOVERFLOW@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_6:
	movq	_PHASE_STEP_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %edi
	shll	%cl, %edi
	callq	_mult_frac
	movl	%eax, (%rbx)
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DOWN_SCALE_RATIO_MAX,4,2       ## @DOWN_SCALE_RATIO_MAX
	.comm	_EOVERFLOW,4,2                  ## @EOVERFLOW
	.comm	_PHASE_STEP_SHIFT,4,2           ## @PHASE_STEP_SHIFT
	.no_dead_strip	_calc_phase_step
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_phase_step
_calc_phase_step:                       ; @calc_phase_step
	.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
	cbz	w0, LBB0_4
; %bb.1:
	mov	x19, x2
	mov	x2, x1
	cbz	w1, LBB0_4
; %bb.2:
	mov	x1, x0
Lloh0:
	adrp	x8, _DOWN_SCALE_RATIO_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DOWN_SCALE_RATIO_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mul	w8, w8, w2
	cmp	w8, w0
	b.ge	LBB0_6
; %bb.3:
Lloh3:
	adrp	x8, _EOVERFLOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOVERFLOW@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
Lloh7:
	adrp	x8, _PHASE_STEP_SHIFT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PHASE_STEP_SHIFT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w0, w9, w8
	bl	_mult_frac
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DOWN_SCALE_RATIO_MAX,4,2       ; @DOWN_SCALE_RATIO_MAX
	.comm	_EOVERFLOW,4,2                  ; @EOVERFLOW
	.comm	_PHASE_STEP_SHIFT,4,2           ; @PHASE_STEP_SHIFT
	.no_dead_strip	_calc_phase_step
.subsections_via_symbols
