	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function make_rate_with_tolerance
_make_rate_with_tolerance:              ## @make_rate_with_tolerance
	.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	_DBG_QOS@GOTPCREL(%rip), %rbx
	movq	_DBG_FLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rbx), %eax
	movq	_round_up@GOTPCREL(%rip), %r10
	movq	_round_down@GOTPCREL(%rip), %rbx
	cmpq	%rdx, (%rbx)
	leaq	L_.str.2(%rip), %r11
	leaq	L_.str.3(%rip), %rbx
	cmoveq	%r11, %rbx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	cmpq	%rdx, (%r10)
	movq	%r9, %r12
	movq	%r8, %r15
	movl	%ecx, %r8d
	movl	%esi, %r13d
	leaq	L_.str.1(%rip), %rcx
	cmovneq	%rbx, %rcx
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%r13d, %edx
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	callq	_PRINTD
	testq	%r12, %r12
	leaq	-60(%rbp), %r14
	cmovneq	%r12, %r14
	movq	_round_nearest@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movq	%r15, %rcx
	movq	%r14, %r8
	callq	_make_rate
	movl	%eax, %ecx
	movl	$-1, %eax
	testl	%ecx, %ecx
	jne	LBB0_4
## %bb.1:
	movl	%r13d, %eax
	subl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movl	(%r14), %ecx
	cmpl	%ecx, %eax
	ja	LBB0_3
## %bb.2:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	addl	%r13d, %edx
	xorl	%eax, %eax
	cmpl	%edx, %ecx
	jbe	LBB0_4
LBB0_3:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%r15, %rcx
	movq	%r14, %r8
	callq	_make_rate
LBB0_4:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DBG_QOS,4,2                    ## @DBG_QOS
	.comm	_DBG_FLOW,4,2                   ## @DBG_FLOW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"make_rate_with_tolerance c=%u, %s, tol=%u"

	.comm	_round_up,8,3                   ## @round_up
L_.str.1:                               ## @.str.1
	.asciz	"up"

	.comm	_round_down,8,3                 ## @round_down
L_.str.2:                               ## @.str.2
	.asciz	"down"

L_.str.3:                               ## @.str.3
	.asciz	"nearest"

	.comm	_round_nearest,8,3              ## @round_nearest
	.no_dead_strip	_make_rate_with_tolerance
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function make_rate_with_tolerance
_make_rate_with_tolerance:              ; @make_rate_with_tolerance
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x24, x5
	mov	x19, x4
	mov	x23, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _DBG_QOS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DBG_QOS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DBG_FLOW@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DBG_FLOW@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w0, w9, w8
Lloh6:
	adrp	x8, _round_up@GOTPAGE
Lloh7:
	ldr	x8, [x8, _round_up@GOTPAGEOFF]
Lloh8:
	adrp	x9, _round_down@GOTPAGE
Lloh9:
	ldr	x9, [x9, _round_down@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, l_.str.3@PAGE
Lloh13:
	add	x10, x10, l_.str.3@PAGEOFF
Lloh14:
	adrp	x11, l_.str.2@PAGE
Lloh15:
	add	x11, x11, l_.str.2@PAGEOFF
	cmp	x9, x2
	csel	x9, x11, x10, eq
Lloh16:
	adrp	x10, l_.str.1@PAGE
Lloh17:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	x8, x2
	csel	x3, x10, x9, eq
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	x4, x23
	bl	_PRINTD
	add	x8, sp, #12
	cmp	x24, #0
	csel	x24, x8, x24, eq
Lloh20:
	adrp	x8, _round_nearest@GOTPAGE
Lloh21:
	ldr	x8, [x8, _round_nearest@GOTPAGEOFF]
Lloh22:
	ldr	x2, [x8]
	mov	x0, x22
	mov	x1, x21
	mov	x3, x19
	mov	x4, x24
	bl	_make_rate
	cbz	w0, LBB0_2
; %bb.1:
	mov	w0, #-1
	b	LBB0_6
LBB0_2:
	ldr	w8, [x24]
	sub	w9, w21, w23
	cmp	w9, w8
	b.hi	LBB0_5
; %bb.3:
	add	w9, w23, w21
	cmp	w8, w9
	b.hi	LBB0_5
; %bb.4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	mov	x4, x24
	bl	_make_rate
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DBG_QOS,4,2                    ; @DBG_QOS
	.comm	_DBG_FLOW,4,2                   ; @DBG_FLOW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"make_rate_with_tolerance c=%u, %s, tol=%u"

	.comm	_round_up,8,3                   ; @round_up
l_.str.1:                               ; @.str.1
	.asciz	"up"

	.comm	_round_down,8,3                 ; @round_down
l_.str.2:                               ; @.str.2
	.asciz	"down"

l_.str.3:                               ; @.str.3
	.asciz	"nearest"

	.comm	_round_nearest,8,3              ; @round_nearest
	.no_dead_strip	_make_rate_with_tolerance
.subsections_via_symbols
