	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function RangeEnc_EncodeBit
_RangeEnc_EncodeBit:                    ## @RangeEnc_EncodeBit
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %r8
	movq	_kNumBitModelTotalBits@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	%r8, %rax
	sarq	%cl, %rax
	movq	(%rsi), %r9
	imulq	%r9, %rax
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	addl	%eax, 8(%rdi)
	subq	%rax, %r8
	movq	%r8, (%rdi)
	movq	_kNumMoveBits@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	%r9, %rax
	sarq	%cl, %rax
	subq	%rax, %r9
	movq	%r9, %rdx
	jmp	LBB0_3
LBB0_1:
	movq	%rax, (%rdi)
	movq	_kBitModelTotal@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	subq	%r9, %rdx
	movq	_kNumMoveBits@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarq	%cl, %rdx
	addq	%r9, %rdx
LBB0_3:
	movq	%rdx, (%rsi)
	movq	(%rdi), %rax
	movq	_kTopValue@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_4
## %bb.5:
	shlq	$8, %rax
	movq	%rax, (%rdi)
	popq	%rbp
	jmp	_RangeEnc_ShiftLow              ## TAILCALL
LBB0_4:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kNumBitModelTotalBits,8,3      ## @kNumBitModelTotalBits
	.comm	_kBitModelTotal,8,3             ## @kBitModelTotal
	.comm	_kNumMoveBits,8,3               ## @kNumMoveBits
	.comm	_kTopValue,8,3                  ## @kTopValue
	.no_dead_strip	_RangeEnc_EncodeBit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function RangeEnc_EncodeBit
_RangeEnc_EncodeBit:                    ; @RangeEnc_EncodeBit
	.cfi_startproc
; %bb.0:
	ldr	x8, [x1]
	ldr	x9, [x0]
Lloh0:
	adrp	x10, _kNumBitModelTotalBits@GOTPAGE
Lloh1:
	ldr	x10, [x10, _kNumBitModelTotalBits@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	asr	x10, x9, x10
	mul	x10, x10, x8
	cbz	x2, LBB0_2
; %bb.1:
	ldr	w11, [x0, #8]
	add	w11, w11, w10
	str	w11, [x0, #8]
	sub	x9, x9, x10
	str	x9, [x0]
Lloh3:
	adrp	x9, _kNumMoveBits@GOTPAGE
Lloh4:
	ldr	x9, [x9, _kNumMoveBits@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	asr	x9, x8, x9
	sub	x8, x8, x9
	b	LBB0_3
LBB0_2:
	str	x10, [x0]
Lloh6:
	adrp	x9, _kBitModelTotal@GOTPAGE
Lloh7:
	ldr	x9, [x9, _kBitModelTotal@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	sub	x9, x9, x8
Lloh9:
	adrp	x10, _kNumMoveBits@GOTPAGE
Lloh10:
	ldr	x10, [x10, _kNumMoveBits@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	asr	x9, x9, x10
	add	x8, x9, x8
LBB0_3:
	str	x8, [x1]
	ldr	x8, [x0]
Lloh12:
	adrp	x9, _kTopValue@GOTPAGE
Lloh13:
	ldr	x9, [x9, _kTopValue@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_5
; %bb.4:
	lsl	x8, x8, #8
	str	x8, [x0]
	b	_RangeEnc_ShiftLow
LBB0_5:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_kNumBitModelTotalBits,8,3      ; @kNumBitModelTotalBits
	.comm	_kBitModelTotal,8,3             ; @kBitModelTotal
	.comm	_kNumMoveBits,8,3               ; @kNumMoveBits
	.comm	_kTopValue,8,3                  ; @kTopValue
	.no_dead_strip	_RangeEnc_EncodeBit
.subsections_via_symbols
