	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_history_persistent
_update_history_persistent:             ## @update_history_persistent
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %r14
	testq	%rdi, %rdi
	setne	%al
	testl	%esi, %esi
	setg	%cl
	andb	%al, %cl
	cmpl	$6, %ebx
	setb	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	movq	_persistent_history_enabled@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_6
## %bb.1:
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movl	4(%rax), %esi
	cmpl	(%rax), %esi
	jne	LBB0_5
## %bb.4:
	shll	$4, %esi
	addl	$16, %esi
	movq	%rax, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_realloc
	movq	%rax, 8(%r14)
	movl	(%rax), %ecx
	shll	$3, %ecx
	movq	_incore_persistent_history_bytes@GOTPCREL(%rip), %rdx
	addl	%ecx, (%rdx)
	shll	(%rax)
	movl	4(%rax), %esi
	jmp	LBB0_5
LBB0_2:
	movq	_MIN_PERSISTENT_HISTORY_EVENTS@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	leal	16(,%rax,8), %edi
	callq	_malloc
	movq	%rax, 8(%r14)
	movl	(%r13), %ecx
	movl	%ecx, (%rax)
	movl	$0, 4(%rax)
	movq	_incore_persistent_history_bytes@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	leal	(%rsi,%rcx,8), %ecx
	addl	$16, %ecx
	movl	%ecx, (%rdx)
	movq	_incore_persistent_history_lists@GOTPCREL(%rip), %rcx
	incl	(%rcx)
	xorl	%esi, %esi
LBB0_5:
	movq	8(%rax), %rcx
	leal	1(%rsi), %edx
	movl	%edx, 4(%rax)
	addl	%esi, %esi
	movslq	%esi, %rax
	movl	%r12d, (%rcx,%rax,4)
	movzwl	%r15w, %edx
	shll	$24, %ebx
	orl	%edx, %ebx
	movl	%ebx, 4(%rcx,%rax,4)
	movq	_incore_persistent_history_events@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	(%r14), %rbx
	movq	%r14, %rdi
	callq	_USER_PCONN
	cmpq	%rax, %rbx
	jne	LBB0_7
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_process_user_persistent_query_queue2 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_persistent_history_enabled,4,2 ## @persistent_history_enabled
	.comm	_MIN_PERSISTENT_HISTORY_EVENTS,4,2 ## @MIN_PERSISTENT_HISTORY_EVENTS
	.comm	_incore_persistent_history_bytes,4,2 ## @incore_persistent_history_bytes
	.comm	_incore_persistent_history_lists,4,2 ## @incore_persistent_history_lists
	.comm	_incore_persistent_history_events,4,2 ## @incore_persistent_history_events
	.no_dead_strip	_update_history_persistent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_history_persistent
_update_history_persistent:             ; @update_history_persistent
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	cmp	x0, #0
	ccmp	w1, #0, #4, ne
	ccmp	w3, #6, #2, gt
	cset	w0, lo
	bl	_assert
Lloh0:
	adrp	x8, _persistent_history_enabled@GOTPAGE
Lloh1:
	ldr	x8, [x8, _persistent_history_enabled@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.1:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_4
; %bb.2:
	ldp	w9, w8, [x0]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:
	lsl	w8, w8, #4
	add	w1, w8, #16
	bl	_realloc
	str	x0, [x19, #8]
Lloh3:
	adrp	x9, _incore_persistent_history_bytes@GOTPAGE
Lloh4:
	ldr	x9, [x9, _incore_persistent_history_bytes@GOTPAGEOFF]
	ldr	w10, [x9]
	ldp	w11, w8, [x0]
	add	w10, w10, w11, lsl #3
	str	w10, [x9]
	ldr	w9, [x0]
	lsl	w9, w9, #1
	str	w9, [x0]
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x23, _MIN_PERSISTENT_HISTORY_EVENTS@GOTPAGE
Lloh6:
	ldr	x23, [x23, _MIN_PERSISTENT_HISTORY_EVENTS@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	w8, w8, #3
	add	w0, w8, #16
	bl	_malloc
	mov	w8, #0
	ldr	w9, [x23]
Lloh7:
	adrp	x10, _incore_persistent_history_bytes@GOTPAGE
Lloh8:
	ldr	x10, [x10, _incore_persistent_history_bytes@GOTPAGEOFF]
	str	w9, [x0]
	ldr	w11, [x10]
	add	w9, w11, w9, lsl #3
	str	x0, [x19, #8]
	str	wzr, [x0, #4]
	add	w9, w9, #16
	str	w9, [x10]
Lloh9:
	adrp	x9, _incore_persistent_history_lists@GOTPAGE
Lloh10:
	ldr	x9, [x9, _incore_persistent_history_lists@GOTPAGEOFF]
	ldr	w10, [x9]
	add	w10, w10, #1
	str	w10, [x9]
LBB0_5:
	ldr	x9, [x0, #8]
	add	w10, w8, #1
	str	w10, [x0, #4]
	lsl	w8, w8, #1
	add	x8, x9, w8, sxtw #2
	and	w9, w22, #0xffff
	bfi	w9, w20, #24, #8
	stp	w21, w9, [x8]
Lloh11:
	adrp	x8, _incore_persistent_history_events@GOTPAGE
Lloh12:
	ldr	x8, [x8, _incore_persistent_history_events@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	ldr	x20, [x19]
	mov	x0, x19
	bl	_USER_PCONN
	cmp	x20, x0
	b.ne	LBB0_7
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_process_user_persistent_query_queue2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_persistent_history_enabled,4,2 ; @persistent_history_enabled
	.comm	_MIN_PERSISTENT_HISTORY_EVENTS,4,2 ; @MIN_PERSISTENT_HISTORY_EVENTS
	.comm	_incore_persistent_history_bytes,4,2 ; @incore_persistent_history_bytes
	.comm	_incore_persistent_history_lists,4,2 ; @incore_persistent_history_lists
	.comm	_incore_persistent_history_events,4,2 ; @incore_persistent_history_events
	.no_dead_strip	_update_history_persistent
.subsections_via_symbols
