	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function BinarySearchRange
_BinarySearchRange:                     ## @BinarySearchRange
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
	xorl	%r8d, %r8d
	testl	%esi, %esi
	js	LBB0_13
## %bb.1:
	movl	%esi, %r9d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	leal	(%r8,%r9), %esi
	cmpl	%r9d, %r8d
	jg	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	sarl	%esi
	movslq	%esi, %rax
	movzwl	(%rdi,%rax,8), %ecx
	cmpw	%dx, %cx
	ja	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpw	%dx, 8(%rdi,%rax,8)
	ja	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	1(%rsi), %r8d
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpw	%dx, %cx
	jbe	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	decl	%esi
	movl	%esi, %r9d
	jmp	LBB0_7
LBB0_9:
	movl	4(%rdi,%rax,8), %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.10:
	movzwl	%dx, %edx
	movl	%edx, %esi
	andl	$65280, %esi                    ## imm = 0xFF00
	movl	%ecx, %edi
	andl	$65280, %edi                    ## imm = 0xFF00
	subl	%edi, %esi
	cmpl	$41280, %edx                    ## imm = 0xA140
	jb	LBB0_12
## %bb.11:
	sarl	$8, %esi
	movzbl	%cl, %ecx
	imull	$157, %esi, %r9d
	xorl	%r8d, %r8d
	cmpl	$161, %ecx
	movl	$-34, %edi
	cmovael	%r8d, %edi
	movl	$34, %esi
	cmovbl	%r8d, %esi
	movzbl	%dl, %edx
	cmpl	$161, %edx
	cmovael	%edi, %esi
	movzbl	%al, %edi
	subl	%ecx, %edx
	addl	%r9d, %edx
	addl	%esi, %edx
	leal	(%rdi,%rdx), %ecx
	addl	$-33, %ecx
                                        ## kill: def $edx killed $edx killed $rdx def $rdx
	addl	%edi, %edx
	andl	$65280, %eax                    ## imm = 0xFF00
	movslq	%ecx, %rcx
	imulq	$-1370734243, %rcx, %rsi        ## imm = 0xAE4C415D
	shrq	$32, %rsi
	addl	%esi, %edx
	addl	$-33, %edx
	movl	%edx, %esi
	shrl	$31, %esi
	sarl	$6, %edx
	addl	%esi, %edx
	imull	$94, %edx, %esi
	shll	$8, %edx
	subl	%esi, %ecx
	addl	%eax, %ecx
	leal	(%rdx,%rcx), %r8d
	addl	$33, %r8d
	jmp	LBB0_13
LBB0_8:
	xorl	%r8d, %r8d
LBB0_13:
	movzwl	%r8w, %eax
	popq	%rbp
	retq
LBB0_12:
	shrl	$8, %esi
	imull	$94, %esi, %esi
	movzbl	%dl, %edx
	movzbl	%cl, %ecx
	subl	%ecx, %edx
	addl	%esi, %edx
	movzbl	%al, %ecx
	cmpl	$161, %ecx
	leal	65438(%rcx,%rdx), %esi
	leal	65472(%rcx,%rdx), %ecx
	cmovael	%esi, %ecx
	andl	$65280, %eax                    ## imm = 0xFF00
	movswl	%cx, %edx
	imull	$6679, %edx, %edx               ## imm = 0x1A17
	movl	%edx, %esi
	shrl	$31, %esi
	sarl	$20, %edx
	addl	%esi, %edx
	imull	$157, %edx, %esi
	subl	%esi, %ecx
	shll	$8, %edx
	addl	%eax, %edx
	cmpw	$63, %cx
	movl	$98, %eax
	movl	$64, %r8d
	cmovgel	%eax, %r8d
	orl	%edx, %r8d
	addl	%ecx, %r8d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_BinarySearchRange
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function BinarySearchRange
_BinarySearchRange:                     ; @BinarySearchRange
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w1 killed $w1 def $x1
	tbnz	w1, #31, LBB0_8
; %bb.1:
	mov	w9, #0
	mov	x8, x1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	sub	w11, w11, #1
	cmp	w10, w2
	csel	w8, w11, w8, hi
	add	w1, w9, w8
	cmp	w9, w8
	b.gt	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	asr	w10, w1, #1
	sbfx	x11, x1, #1, #31
	sbfiz	x10, x10, #3, #32
	ldrh	w10, [x0, x10]
	cmp	w10, w2
	b.hi	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x11, #1
	lsl	x12, x9, #3
	ldrh	w12, [x0, x12]
	cmp	w12, w2
	b.ls	LBB0_2
; %bb.5:
	add	x8, x0, x11, lsl #3
	ldr	w8, [x8, #4]
	cbz	w8, LBB0_9
; %bb.6:
	and	w9, w2, #0xff00
	and	w11, w10, #0xff00
	sub	w9, w9, w11
	lsr	w11, w2, #6
	cmp	w11, #645
	b.lo	LBB0_10
; %bb.7:
	asr	w9, w9, #8
	and	w11, w2, #0xff
	and	w10, w10, #0xff
	mov	w12, #157
	mov	w13, #-34
	cmp	w10, #160
	csel	w13, wzr, w13, hi
	mov	w14, #34
	csel	w14, w14, wzr, hi
	cmp	w11, #160
	csel	w13, w13, w14, hi
	sub	w10, w11, w10
	madd	w9, w9, w12, w10
	add	w9, w9, w13
	add	w9, w9, w8, uxtb
	sub	w9, w9, #33
	and	w8, w8, #0xff00
	mov	w10, #16733
	movk	w10, #44620, lsl #16
	smull	x10, w9, w10
	lsr	x10, x10, #32
	add	w10, w10, w9
	asr	w11, w10, #6
	add	w10, w11, w10, lsr #31
	mov	w11, #94
	msub	w9, w10, w11, w9
	add	w8, w9, w8
	add	w8, w8, w10, lsl #8
	add	w8, w8, #33
	and	w0, w8, #0xffff
	ret
LBB0_8:
	mov	w8, #0
LBB0_9:
	and	w0, w8, #0xffff
	ret
LBB0_10:
	lsr	w9, w9, #8
	mov	w11, #94
	and	w12, w2, #0xff
	sub	w10, w12, w10, uxtb
	madd	w9, w9, w11, w10
	and	w10, w8, #0xff
	mov	w11, #65472
	mov	w12, #65438
	cmp	w10, #160
	csel	w11, w12, w11, hi
	add	w9, w9, w10
	add	w9, w9, w11
	sxth	w10, w9
	mov	w11, #6679
	mul	w10, w10, w11
	asr	w11, w10, #20
	add	w10, w11, w10, lsr #31
	mov	w11, #157
	msub	w9, w10, w11, w9
	sxth	w11, w9
	and	w8, w8, #0xff00
	add	w8, w8, w10, lsl #8
	mov	w10, #64
	mov	w12, #98
	cmp	w11, #62
	csel	w10, w12, w10, gt
	orr	w8, w8, w10
	add	w8, w9, w8
	and	w0, w8, #0xffff
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_BinarySearchRange
.subsections_via_symbols
