	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function binary_search_ranges
_binary_search_ranges:                  ## @binary_search_ranges
	.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	%eax, %eax
	cmpl	$1114111, %edx                  ## imm = 0x10FFFF
	ja	LBB0_16
## %bb.1:
	xorl	%r8d, %r8d
	testl	%esi, %esi
	jg	LBB0_2
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, %r8d
	cmpl	%esi, %r8d
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r8,%rsi), %ecx
	addl	$2, %ecx
	sarl	%ecx
	andl	$-2, %ecx
	movslq	%ecx, %rax
	cmpl	%edx, (%rdi,%rax,4)
	jle	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	addl	$-2, %ecx
	movl	%ecx, %esi
	cmpl	%esi, %r8d
	jl	LBB0_2
LBB0_6:
	movslq	%r8d, %rcx
	movl	4(%rdi,%rcx,4), %eax
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	cmpl	$1114112, %eax                  ## imm = 0x110000
	jb	LBB0_16
## %bb.9:
	cmpl	$2097154, %eax                  ## imm = 0x200002
	je	LBB0_13
## %bb.10:
	cmpl	$2097153, %eax                  ## imm = 0x200001
	je	LBB0_14
## %bb.11:
	cmpl	$2097152, %eax                  ## imm = 0x200000
	jne	LBB0_17
## %bb.12:
	andl	$-2, %edx
	jmp	LBB0_15
LBB0_7:
	notl	%eax
	addl	%edx, %eax
	subl	(%rdi,%rcx,4), %eax
	popq	%rbp
	retq
LBB0_13:
	decl	%edx
LBB0_14:
	orl	$1, %edx
LBB0_15:
	movl	%edx, %eax
LBB0_16:
	popq	%rbp
	retq
LBB0_17:
	xorl	%edi, %edi
	callq	_assert
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_binary_search_ranges
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function binary_search_ranges
_binary_search_ranges:                  ; @binary_search_ranges
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	lsr	w8, w2, #16
	cmp	w8, #16
	b.ls	LBB0_2
; %bb.1:
	mov	w8, #0
	b	LBB0_15
LBB0_2:
	cmp	w1, #1
	b.lt	LBB0_5
; %bb.3:
	mov	w9, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w9, w1
	add	w8, w8, #2
	asr	w8, w8, #1
	and	w8, w8, #0xfffffffe
	ldr	w10, [x0, w8, sxtw #2]
	sub	w11, w8, #2
	cmp	w10, w2
	csel	w9, w9, w8, gt
	csel	w1, w11, w1, gt
	cmp	w9, w1
	b.lt	LBB0_4
	b	LBB0_6
LBB0_5:
	mov	w9, #0
LBB0_6:
	add	x8, x0, w9, sxtw #2
	ldr	w8, [x8, #4]
	tbnz	w8, #31, LBB0_12
; %bb.7:
	cmp	w8, #272, lsl #12               ; =1114112
	b.lo	LBB0_15
; %bb.8:
	mov	w9, #2
	movk	w9, #32, lsl #16
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.9:
	mov	w9, #1
	movk	w9, #32, lsl #16
	cmp	w8, w9
	b.eq	LBB0_14
; %bb.10:
	cmp	w8, #512, lsl #12               ; =2097152
	b.ne	LBB0_16
; %bb.11:
	and	w8, w2, #0xfffffffe
	b	LBB0_15
LBB0_12:
	sxtw	x9, w9
	ldr	w9, [x0, x9, lsl #2]
	mvn	w8, w8
	add	w8, w8, w2
	sub	w8, w8, w9
	b	LBB0_15
LBB0_13:
	sub	w8, w2, #1
	orr	w8, w8, #0x1
	b	LBB0_15
LBB0_14:
	orr	w8, w2, #0x1
LBB0_15:
	mov	x0, x8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_16:
	mov	w0, #0
	bl	_assert
	mov	w0, #1
	bl	_exit
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_binary_search_ranges
.subsections_via_symbols
