	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sha1_pos                       ## -- Begin function sha1_pos
	.p2align	4, 0x90
_sha1_pos:                              ## @sha1_pos
	.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	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	$-1, %eax
	testq	%rdx, %rdx
	je	LBB0_21
## %bb.1:
	movq	%rdx, %r13
	cmpq	$1, %rdx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.3:
	movq	_the_hash_algo@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$2, (%rax)
	jne	LBB0_5
LBB0_2:
	xorl	%ebx, %ebx
LBB0_14:
	xorl	%r12d, %r12d
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_17 Depth=1
	incq	%rbx
	movq	%rbx, %r12
	movq	%r13, %rbx
LBB0_16:                                ##   in Loop: Header=BB0_17 Depth=1
	subq	%r12, %rbx
	shrq	%rbx
	addq	%r12, %rbx
	cmpq	%r12, %r13
	jbe	LBB0_22
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	*%r14
	movl	%eax, %edi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_hashcmp
	testl	%eax, %eax
	je	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	jle	LBB0_15
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%rbx, %r13
	jmp	LBB0_16
LBB0_20:
	movl	%ebx, %eax
LBB0_21:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	%r12, %rdi
LBB0_23:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_index_pos_to_insert_pos        ## TAILCALL
LBB0_5:
	leaq	-1(%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r12d
	movl	%eax, %ebx
	cmpq	%r13, %rbx
	jb	LBB0_14
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_BUG
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	addq	$2, %r15
	movq	_the_hash_algo@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rax), %rax
	addq	$-2, %rax
	cmpq	%rax, %r15
	jae	LBB0_14
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	callq	*%r12
	movslq	%eax, %rdi
	addq	%r15, %rdi
	callq	_take2
	movq	%rax, %r14
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	*%r12
	movslq	%eax, %rdi
	addq	%r15, %rdi
	callq	_take2
	movq	%rax, %r12
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15), %rdi
	callq	_take2
	movq	%rax, %rcx
	subq	%r14, %rax
	jb	LBB0_24
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpq	%rcx, %r12
	jb	LBB0_25
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	subq	%r14, %r12
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	imulq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	movq	%rax, %rcx
	orq	%r12, %rcx
	shrq	$32, %rcx
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	xorl	%edx, %edx
	divq	%r12
	movq	%rax, %rbx
	cmpq	%r13, %rbx
	jae	LBB0_12
	jmp	LBB0_14
LBB0_24:
	movl	$-1, %eax
	jmp	LBB0_21
LBB0_25:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_the_hash_algo,8,3              ## @the_hash_algo
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"assertion failed in binary search"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sha1_pos                       ; -- Begin function sha1_pos
	.p2align	2
_sha1_pos:                              ; @sha1_pos
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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 w27, -88
	.cfi_offset w28, -96
	cbz	x2, LBB0_16
; %bb.1:
	mov	x20, x3
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	subs	x24, x2, #1
	b.eq	LBB0_3
; %bb.2:
Lloh0:
	adrp	x28, _the_hash_algo@GOTPAGE
Lloh1:
	ldr	x28, [x28, _the_hash_algo@GOTPAGEOFF]
	ldr	x8, [x28]
	ldr	w8, [x8]
	cmp	w8, #2
	b.ne	LBB0_9
LBB0_3:
	mov	x23, #0
LBB0_4:
	mov	x24, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x21
	blr	x20
	mov	x1, x22
	bl	_hashcmp
	cbz	w0, LBB0_17
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w0, #0
	csinc	x24, x24, x23, gt
	csel	x19, x23, x19, gt
	subs	x8, x19, x24
	add	x23, x24, x8, lsr #1
	b.hi	LBB0_5
; %bb.7:
	mov	x0, x24
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_index_pos_to_insert_pos
LBB0_9:
	mov	x25, #0
	mov	x23, #0
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BUG
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x25, x25, #2
	ldr	x8, [x28]
	ldrsw	x8, [x8]
	sub	x8, x8, #2
	cmp	x25, x8
	b.hs	LBB0_4
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, #0
	mov	x1, x21
	blr	x20
	add	x0, x25, w0, sxtw
	bl	_take2
	mov	x26, x0
	mov	x0, x24
	mov	x1, x21
	blr	x20
	add	x0, x25, w0, sxtw
	bl	_take2
	mov	x27, x0
	add	x0, x22, x25
	bl	_take2
	subs	x8, x0, x26
	b.lo	LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	cmp	x27, x0
	b.lo	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	subs	x9, x27, x26
	b.eq	LBB0_11
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	mul	x8, x8, x24
	udiv	x23, x8, x9
	cmp	x23, x19
	b.hs	LBB0_10
	b	LBB0_4
LBB0_16:
	mov	w23, #-1
LBB0_17:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_18:
	mov	x0, x19
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_the_hash_algo,8,3              ; @the_hash_algo
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"assertion failed in binary search"

.subsections_via_symbols
