	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function RangeEnc_Encode
_RangeEnc_Encode:                       ## @RangeEnc_Encode
	.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
	movl	%edx, %ebx
	movl	4(%rdi), %eax
	cltd
	idivl	%ecx
	imull	%eax, %esi
	addl	%esi, (%rdi)
	imull	%eax, %ebx
	movl	%ebx, 4(%rdi)
	movq	_kTopValue@GOTPCREL(%rip), %r15
	cmpl	(%r15), %ebx
	jge	LBB0_3
## %bb.1:
	movq	%rdi, %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	shll	$8, %ebx
	movl	%ebx, 4(%r14)
	movq	%r14, %rdi
	callq	_RangeEnc_ShiftLow
	movl	4(%r14), %ebx
	cmpl	(%r15), %ebx
	jl	LBB0_2
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kTopValue,4,2                  ## @kTopValue
	.no_dead_strip	_RangeEnc_Encode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function RangeEnc_Encode
_RangeEnc_Encode:                       ; @RangeEnc_Encode
	.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
	ldp	w9, w8, [x0]
	sdiv	w8, w8, w3
	madd	w9, w8, w1, w9
	mul	w8, w8, w2
	stp	w9, w8, [x0]
Lloh0:
	adrp	x20, _kTopValue@GOTPAGE
Lloh1:
	ldr	x20, [x20, _kTopValue@GOTPAGEOFF]
	ldr	w9, [x20]
	cmp	w8, w9
	b.ge	LBB0_3
; %bb.1:
	mov	x19, x0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	w8, w8, #8
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_RangeEnc_ShiftLow
	ldr	w8, [x19, #4]
	ldr	w9, [x20]
	cmp	w8, w9
	b.lt	LBB0_2
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_kTopValue,4,2                  ; @kTopValue
	.no_dead_strip	_RangeEnc_Encode
.subsections_via_symbols
