	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_insert_bookmark                ## -- Begin function insert_bookmark
	.p2align	4, 0x90
_insert_bookmark:                       ## @insert_bookmark
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %ebx
	movq	%rsi, %r15
	movl	%edi, %r12d
	movq	_index_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ALLOW_OLD_INDEX_MODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_next_bookmark_ptr
	movl	%eax, %r13d
	testl	%r14d, %r14d
	setne	%al
	cmpl	$-1073741824, %r13d             ## imm = 0xC0000000
	setae	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	_bookmarks@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r13d, %rcx
	andl	$1, %ebx
	leal	(%rbx,%rcx,2), %edx
	shlq	$4, %rcx
	movl	%r12d, (%rax,%rcx)
	movl	%edx, 4(%rax,%rcx)
	movq	%r15, 8(%rax,%rcx)
	movl	$1, %eax
	jmp	LBB0_20
LBB0_2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	_new_users@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movq	_new_users_number@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	%r12d, %edi
	callq	_binary_search
	movl	%eax, %r13d
	testl	%eax, %eax
	jns	LBB0_7
## %bb.3:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_18
## %bb.4:
	movl	%r12d, %edi
	callq	_insert_new_users
	movl	%eax, %r13d
	movq	_new_users@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	(%rbx), %edx
	movl	%r12d, %edi
	callq	_binary_search
	xorl	%edi, %edi
	cmpl	%eax, %r13d
	sete	%dil
	callq	_assert
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpl	$4, (%rax)
	jl	LBB0_6
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_fprintf
LBB0_6:
	movq	_new_users@GOTPCREL(%rip), %r14
LBB0_7:
	movq	(%r14), %rax
	movslq	%r13d, %rcx
	movl	(%rax,%rcx,4), %eax
	movq	_bookmarks@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	_NIL_BOOKMARK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r13d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%eax, %rbx
	shlq	$4, %rbx
	movl	(%rcx,%rbx), %eax
	cmpl	%r13d, %eax
	je	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movslq	%eax, %rdx
	shlq	$4, %rdx
	cmpq	%r15, 8(%rcx,%rdx)
	jg	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	jne	LBB0_8
## %bb.11:
	movl	4(%rcx,%rdx), %esi
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_19
## %bb.12:
	movl	$1, %eax
	cmpl	%r14d, %esi
	je	LBB0_20
## %bb.13:
	addq	%rdx, %rcx
	addq	$4, %rcx
	movl	%r14d, (%rcx)
	jmp	LBB0_20
LBB0_14:
	movl	%eax, %r13d
LBB0_15:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_18
## %bb.16:
	xorl	%eax, %eax
	callq	_next_bookmark_ptr
	movq	(%r12), %rcx
	cltq
	movq	%rax, %rdx
	shlq	$4, %rdx
	movl	%r13d, (%rcx,%rdx)
	movq	%r15, 8(%rcx,%rdx)
	movl	%r14d, 4(%rcx,%rdx)
	movl	%eax, (%rcx,%rbx)
	movl	$1, %eax
	jmp	LBB0_20
LBB0_18:
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_19:
	xorl	%eax, %eax
	cmpl	%r14d, %esi
	sete	%al
LBB0_20:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_index_mode,8,3                 ## @index_mode
	.comm	_ALLOW_OLD_INDEX_MODE,8,3       ## @ALLOW_OLD_INDEX_MODE
	.comm	_bookmarks,8,3                  ## @bookmarks
	.comm	_new_users,8,3                  ## @new_users
	.comm	_new_users_number,4,2           ## @new_users_number
	.comm	_verbosity,4,2                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Inserted user %d (total %d new users)\n"

	.comm	_NIL_BOOKMARK,4,2               ## @NIL_BOOKMARK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_insert_bookmark                ; -- Begin function insert_bookmark
	.p2align	2
_insert_bookmark:                       ; @insert_bookmark
	.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	x21, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _index_mode@GOTPAGE
Lloh1:
	ldr	x8, [x8, _index_mode@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _ALLOW_OLD_INDEX_MODE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ALLOW_OLD_INDEX_MODE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_2
; %bb.1:
	bl	_next_bookmark_ptr
	mov	x23, x0
	cmp	w21, #0
	lsr	w8, w0, #30
	ccmp	w8, #2, #0, ne
	cset	w0, hi
	bl	_assert
Lloh6:
	adrp	x8, _bookmarks@GOTPAGE
Lloh7:
	ldr	x8, [x8, _bookmarks@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	add	x8, x8, w23, sxtw #4
	bfi	w19, w23, #1, #31
	stp	w22, w19, [x8]
	str	x20, [x8, #8]
	b	LBB0_16
LBB0_2:
Lloh9:
	adrp	x24, _new_users@GOTPAGE
Lloh10:
	ldr	x24, [x24, _new_users@GOTPAGEOFF]
	ldr	x1, [x24]
Lloh11:
	adrp	x25, _new_users_number@GOTPAGE
Lloh12:
	ldr	x25, [x25, _new_users_number@GOTPAGEOFF]
	ldr	w2, [x25]
	mov	x0, x22
	bl	_binary_search
	mov	x23, x0
	tbnz	w0, #31, LBB0_10
LBB0_3:
	ldr	x8, [x24]
	ldr	w8, [x8, w23, sxtw #2]
Lloh13:
	adrp	x22, _bookmarks@GOTPAGE
Lloh14:
	ldr	x22, [x22, _bookmarks@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh15:
	adrp	x10, _NIL_BOOKMARK@GOTPAGE
Lloh16:
	ldr	x10, [x10, _NIL_BOOKMARK@GOTPAGEOFF]
Lloh17:
	ldr	w23, [x10]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x10, x8
	sbfiz	x8, x10, #4, #32
	ldr	w8, [x9, x8]
	cmp	w8, w23
	b.eq	LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	sxtw	x11, w8
	add	x12, x9, x11, lsl #4
	ldr	x12, [x12, #8]
	cmp	x12, x20
	b.gt	LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	b.ne	LBB0_4
; %bb.7:
	add	x8, x9, x11, lsl #4
	ldr	w9, [x8, #4]!
	cbz	w21, LBB0_19
; %bb.8:
	cmp	w9, w19
	b.eq	LBB0_16
; %bb.9:
	str	w19, [x8]
	b	LBB0_16
LBB0_10:
	cbz	w21, LBB0_18
; %bb.11:
	mov	x0, x22
	bl	_insert_new_users
	mov	x23, x0
	ldr	x1, [x24]
	ldr	w2, [x25]
	mov	x0, x22
	bl	_binary_search
	cmp	w23, w0
	cset	w0, eq
	bl	_assert
Lloh18:
	adrp	x8, _verbosity@GOTPAGE
Lloh19:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, #4
	b.lt	LBB0_3
; %bb.12:
Lloh21:
	adrp	x8, _stderr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldr	w3, [x25]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_fprintf
	b	LBB0_3
LBB0_13:
	mov	x23, x8
LBB0_14:
	cbz	w21, LBB0_18
; %bb.15:
	sxtw	x21, w10
	bl	_next_bookmark_ptr
	ldr	x8, [x22]
	add	x9, x8, w0, sxtw #4
	str	x20, [x9, #8]
	stp	w23, w19, [x9]
	lsl	x9, x21, #4
	str	w0, [x8, x9]
LBB0_16:
	mov	w0, #1
LBB0_17:
	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
LBB0_18:
	mov	w0, #0
	b	LBB0_17
LBB0_19:
	cmp	w9, w19
	cset	w0, eq
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_index_mode,8,3                 ; @index_mode
	.comm	_ALLOW_OLD_INDEX_MODE,8,3       ; @ALLOW_OLD_INDEX_MODE
	.comm	_bookmarks,8,3                  ; @bookmarks
	.comm	_new_users,8,3                  ; @new_users
	.comm	_new_users_number,4,2           ; @new_users_number
	.comm	_verbosity,4,2                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Inserted user %d (total %d new users)\n"

	.comm	_NIL_BOOKMARK,4,2               ; @NIL_BOOKMARK
.subsections_via_symbols
