	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function binsearch
_binsearch:                             ## @binsearch
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
                                        ## kill: def $ecx killed $ecx def $rcx
	movl	%edx, %ebx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	%rcx, %rax
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	leal	4(%rcx), %r15d
	movslq	%r15d, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %r12d
	shrl	$31, %ebx
	addl	%r12d, %ebx
	sarl	%ebx
	movl	%ebx, %eax
	imull	%r15d, %eax
	cltq
	leaq	(,%rax,4), %r14
	addq	%r13, %r14
	movq	%r14, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcmp
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, %eax
	jg	LBB0_1
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%r14,%rax,4), %r13
	subl	%ebx, %r12d
	movl	%r12d, %ebx
	jmp	LBB0_1
LBB0_2:
	movslq	-48(%rbp), %rax                 ## 4-byte Folded Reload
	movl	(%r14,%rax,4), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_5:
	movl	$-1, %eax
LBB0_3:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_binsearch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function binsearch
_binsearch:                             ; @binsearch
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x4
	mov	x20, x3
	mov	x23, x2
	mov	x21, x1
	mov	x22, x0
	add	w8, w3, #4
	sxtw	x25, w8
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x26, x23
	cmp	w23, #0
	cinc	w8, w23, lt
	asr	w23, w8, #1
	mul	w8, w23, w25
	add	x24, x22, w8, sxtw #2
	mov	x0, x24
	mov	x1, x21
	mov	x2, x20
	bl	_memcmp
	cbz	w0, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cbz	w26, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, #0
	b.gt	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x22, x24, x25, lsl #2
	sub	w23, w26, w23
	b	LBB0_1
LBB0_5:
	ldr	w8, [x24, w20, sxtw #2]
	str	w8, [x19]
	b	LBB0_7
LBB0_6:
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_binsearch
.subsections_via_symbols
