	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function ChooseContextMap
LCPI0_0:
	.long	1127219200                      ## 0x43300000
	.long	1160773632                      ## 0x45300000
	.long	0                               ## 0x0
	.long	0                               ## 0x0
LCPI0_1:
	.quad	0x4330000000000000              ## double 4503599627370496
	.quad	0x4530000000000000              ## double 1.9342813113834067E+25
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_2:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_3:
	.quad	0x4024000000000000              ## double 10
LCPI0_4:
	.quad	0x3fc999999999999a              ## double 0.20000000000000001
LCPI0_5:
	.quad	0x3f947ae147ae147b              ## double 0.02
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_ChooseContextMap:                      ## @ChooseContextMap
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -128(%rbp)                ## 8-byte Spill
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movq	%rsi, %rbx
	movl	%edi, -116(%rbp)                ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rsi), %edx
	movl	4(%rsi), %ecx
	movl	8(%rsi), %eax
	movl	12(%rsi), %esi
	leal	(%rdx,%rsi), %edi
	movl	%esi, -84(%rbp)
	movl	16(%rbx), %r9d
	movl	%r9d, -80(%rbp)
	movl	20(%rbx), %r8d
	movl	%r8d, -76(%rbp)
	movl	24(%rbx), %esi
	addl	%esi, %edi
	movl	%edi, -60(%rbp)
	addl	%esi, %edx
	leal	(%rcx,%r9), %esi
	movl	%edx, -96(%rbp)
	movl	28(%rbx), %edx
	addl	%edx, %esi
	movl	%esi, -56(%rbp)
	addl	%edx, %ecx
	leal	(%rax,%r8), %edx
	movl	%ecx, -92(%rbp)
	movl	32(%rbx), %ecx
	addl	%ecx, %edx
	movl	%edx, -52(%rbp)
	leaq	12(%rbx), %r15
	addl	%ecx, %eax
	leaq	-84(%rbp), %r12
	movl	%eax, -88(%rbp)
	leaq	24(%rbx), %r13
	leaq	-60(%rbp), %rdi
	leaq	-176(%rbp), %r14
	movl	$3, %esi
	movq	%r14, %rdx
	callq	_ShannonEntropy
	movsd	%xmm0, -168(%rbp)               ## 8-byte Spill
	leaq	-96(%rbp), %rdi
	movl	$3, %esi
	movq	%r14, %rdx
	callq	_ShannonEntropy
	movsd	%xmm0, -160(%rbp)               ## 8-byte Spill
	movq	%r12, %rdi
	movl	$3, %esi
	movq	%r14, %rdx
	callq	_ShannonEntropy
	movsd	%xmm0, -112(%rbp)               ## 8-byte Spill
	movq	%rbx, %rdi
	movl	$3, %esi
	movq	%r14, %rdx
	callq	_ShannonEntropy
	movsd	%xmm0, -152(%rbp)               ## 8-byte Spill
	movq	%r15, %rdi
	movl	$3, %esi
	movq	%r14, %rdx
	callq	_ShannonEntropy
	movsd	%xmm0, -144(%rbp)               ## 8-byte Spill
	movq	%r13, %rdi
	movl	$3, %esi
	movq	%r14, %rdx
	callq	_ShannonEntropy
	movsd	%xmm0, -136(%rbp)               ## 8-byte Spill
	movsd	-112(%rbp), %xmm0               ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	addsd	-160(%rbp), %xmm0               ## 8-byte Folded Reload
	movsd	%xmm0, -112(%rbp)               ## 8-byte Spill
	movslq	-60(%rbp), %rax
	movslq	-56(%rbp), %rcx
	addq	%rax, %rcx
	movslq	-52(%rbp), %rbx
	addq	%rcx, %rbx
	xorl	%edi, %edi
	testl	%ebx, %ebx
	setne	%dil
	callq	_assert
	movsd	-112(%rbp), %xmm3               ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	movsd	-168(%rbp), %xmm2               ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	movq	%rbx, %xmm0
	punpckldq	LCPI0_0(%rip), %xmm0    ## xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
	subpd	LCPI0_1(%rip), %xmm0
	movapd	%xmm0, %xmm1
	unpckhpd	%xmm0, %xmm1                    ## xmm1 = xmm1[1],xmm0[1]
	addsd	%xmm0, %xmm1
	movsd	LCPI0_2(%rip), %xmm0            ## xmm0 = mem[0],zero
	divsd	%xmm1, %xmm0
	mulsd	%xmm0, %xmm2
	mulsd	%xmm0, %xmm3
	movq	_MIN_QUALITY_FOR_HQ_CONTEXT_MODELING@GOTPCREL(%rip), %rax
	movl	-116(%rbp), %ecx                ## 4-byte Reload
	cmpl	%ecx, (%rax)
	jg	LBB0_1
## %bb.2:
	xorpd	%xmm1, %xmm1
	movsd	-152(%rbp), %xmm4               ## 8-byte Reload
                                        ## xmm4 = mem[0],zero
	addsd	%xmm1, %xmm4
	addsd	-144(%rbp), %xmm4               ## 8-byte Folded Reload
	addsd	-136(%rbp), %xmm4               ## 8-byte Folded Reload
	mulsd	%xmm0, %xmm4
	jmp	LBB0_3
LBB0_1:
	movsd	LCPI0_3(%rip), %xmm4            ## xmm4 = mem[0],zero
	mulsd	%xmm2, %xmm4
LBB0_3:
	movapd	%xmm2, %xmm1
	subsd	%xmm3, %xmm1
	movsd	LCPI0_4(%rip), %xmm0            ## xmm0 = mem[0],zero
	ucomisd	%xmm1, %xmm0
	jbe	LBB0_6
## %bb.4:
	subsd	%xmm4, %xmm2
	ucomisd	%xmm2, %xmm0
	jbe	LBB0_6
## %bb.5:
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	$1, (%rax)
	jmp	LBB0_10
LBB0_6:
	subsd	%xmm4, %xmm3
	movsd	LCPI0_5(%rip), %xmm0            ## xmm0 = mem[0],zero
	ucomisd	%xmm3, %xmm0
	jbe	LBB0_8
## %bb.7:
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	$2, (%rax)
	leaq	_ChooseContextMap.kStaticContextMapSimpleUTF8(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	$3, (%rax)
	leaq	_ChooseContextMap.kStaticContextMapContinuation(%rip), %rax
LBB0_9:
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	movq	%rax, (%rcx)
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @ChooseContextMap.kStaticContextMapContinuation
_ChooseContextMap.kStaticContextMapContinuation:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.space	240

	.p2align	4                               ## @ChooseContextMap.kStaticContextMapSimpleUTF8
_ChooseContextMap.kStaticContextMapSimpleUTF8:
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.space	240

	.comm	_MIN_QUALITY_FOR_HQ_CONTEXT_MODELING,4,2 ## @MIN_QUALITY_FOR_HQ_CONTEXT_MODELING
	.no_dead_strip	_ChooseContextMap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ChooseContextMap
_ChooseContextMap:                      ; @ChooseContextMap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	d11, d10, [sp, #64]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #80]               ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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 b8, -88
	.cfi_offset b9, -96
	.cfi_offset b10, -104
	.cfi_offset b11, -112
	mov	x19, x3
	mov	x20, x2
	mov	x23, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldp	w8, w9, [x1]
	ldr	w10, [x1, #8]
	mov	x22, x1
	ldr	w11, [x22, #12]!
	ldp	w12, w13, [x1, #16]
	mov	x24, x1
	ldr	w14, [x24, #24]!
	add	w15, w8, w11
	add	w15, w15, w14
	add	w8, w8, w14
	ldp	w14, w16, [x1, #28]
	add	w17, w9, w12
	add	w17, w17, w14
	stp	w15, w17, [sp, #44]
	add	x15, sp, #20
	add	x25, x15, #12
	stp	w12, w13, [sp, #36]
	add	w9, w9, w14
	stp	w8, w9, [sp, #20]
	add	w8, w10, w13
	add	w8, w8, w16
	str	w8, [sp, #52]
	add	w8, w10, w16
	stp	w8, w11, [sp, #28]
	add	x0, sp, #44
	add	x2, sp, #8
	mov	w1, #3
	bl	_ShannonEntropy
	fmov	d8, d0
	add	x0, sp, #20
	add	x2, sp, #8
	mov	w1, #3
	bl	_ShannonEntropy
	fmov	d9, d0
	add	x2, sp, #8
	mov	x0, x25
	mov	w1, #3
	bl	_ShannonEntropy
	fmov	d10, d0
	add	x2, sp, #8
	mov	x0, x23
	mov	w1, #3
	bl	_ShannonEntropy
	movi	d1, #0000000000000000
	fadd	d11, d0, d1
	add	x2, sp, #8
	mov	x0, x22
	mov	w1, #3
	bl	_ShannonEntropy
	fadd	d11, d11, d0
	add	x2, sp, #8
	mov	x0, x24
	mov	w1, #3
	bl	_ShannonEntropy
	fadd	d11, d11, d0
	fadd	d9, d9, d10
	ldpsw	x8, x9, [sp, #44]
	ldrsw	x10, [sp, #52]
	add	x8, x9, x8
	add	x22, x8, x10
	cmp	w22, #0
	cset	w0, ne
	bl	_assert
	ucvtf	d0, x22
	fmov	d1, #1.00000000
	fdiv	d1, d1, d0
	fmul	d2, d8, d1
	fmul	d0, d9, d1
	fmul	d1, d11, d1
Lloh3:
	adrp	x8, _MIN_QUALITY_FOR_HQ_CONTEXT_MODELING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MIN_QUALITY_FOR_HQ_CONTEXT_MODELING@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	fmov	d3, #10.00000000
	fmul	d3, d2, d3
	cmp	w8, w21
	fcsel	d1, d3, d1, gt
	fsub	d3, d2, d0
	fsub	d2, d2, d1
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #16329, lsl #48
	fmov	d4, x8
	fcmp	d3, d4
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #16329, lsl #48
	fmov	d3, x8
	fccmp	d2, d3, #0, mi
	b.mi	LBB0_3
; %bb.1:
	fsub	d0, d0, d1
	mov	x8, #5243
	movk	x8, #18350, lsl #16
	movk	x8, #31457, lsl #32
	movk	x8, #16276, lsl #48
	fmov	d1, x8
	fcmp	d0, d1
	b.pl	LBB0_4
; %bb.2:
	mov	w8, #2
	str	x8, [x20]
Lloh6:
	adrp	x8, _ChooseContextMap.kStaticContextMapSimpleUTF8@PAGE
Lloh7:
	add	x8, x8, _ChooseContextMap.kStaticContextMapSimpleUTF8@PAGEOFF
	b	LBB0_5
LBB0_3:
	mov	w8, #1
	str	x8, [x20]
	b	LBB0_6
LBB0_4:
	mov	w8, #3
	str	x8, [x20]
Lloh8:
	adrp	x8, _ChooseContextMap.kStaticContextMapContinuation@PAGE
Lloh9:
	add	x8, x8, _ChooseContextMap.kStaticContextMapContinuation@PAGEOFF
LBB0_5:
	str	x8, [x19]
LBB0_6:
	ldr	x8, [sp, #56]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #80]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @ChooseContextMap.kStaticContextMapContinuation
_ChooseContextMap.kStaticContextMapContinuation:
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	2                               ; 0x2
	.space	240

	.p2align	2                               ; @ChooseContextMap.kStaticContextMapSimpleUTF8
_ChooseContextMap.kStaticContextMapSimpleUTF8:
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.space	240

	.comm	_MIN_QUALITY_FOR_HQ_CONTEXT_MODELING,4,2 ; @MIN_QUALITY_FOR_HQ_CONTEXT_MODELING
	.no_dead_strip	_ChooseContextMap
.subsections_via_symbols
