	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_replace_message_text0          ## -- Begin function replace_message_text0
	.p2align	4, 0x90
_replace_message_text0:                 ## @replace_message_text0
	.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
	movq	%rdi, %r13
	movl	(%rdi), %eax
	movq	_LEV_TX_REPLACE_TEXT_LONG@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	leaq	8(%r13), %rax
	movl	16(%r13), %r14d
	jmp	LBB0_3
LBB0_2:
	andl	$-4096, %eax                    ## imm = 0xF000
	movq	_LEV_TX_REPLACE_TEXT@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	sete	%dil
	callq	_assert
	movl	$4095, %r14d                    ## imm = 0xFFF
	andl	(%r13), %r14d
	movq	%r13, %rax
LBB0_3:
	movq	(%rax), %r12
	movl	20(%r13), %edi
	callq	_conv_uid
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	%eax, %r15d
	movq	_User@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r15d, %ebx
	movl	(%rax,%rbx,4), %edi
	callq	_assert
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_preprocess_text
	movq	_search_enabled@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.6:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_compute_message_distinct_words
	movq	_tot_search_words@GOTPCREL(%rip), %rcx
	addl	%eax, (%rcx)
	cltq
	movq	_UserSearchWords@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	(%rcx,%rbx,8), %rax
	movq	%rax, (%rcx,%rbx,8)
	movq	_max_user_search_words@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_8
## %bb.7:
	movq	%rax, (%rcx)
	movl	20(%r13), %eax
	movq	_max_user_search_id@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_8:
	movq	_msgs_read@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	_msgs_bytes@GOTPCREL(%rip), %rax
	addl	%r14d, (%rax)
	movq	_max_uid@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	(%rax), %r15d
	setle	%dil
	callq	_assert
	movq	_UserMsgCnt@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	incl	(%rax,%rbx,4)
	shlq	$2, %rbx
	movq	_UserMsgBytes@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	jmp	LBB0_9
LBB0_4:
	movl	$1, %r14d
	movq	_discarded_rec@GOTPCREL(%rip), %rbx
LBB0_9:
	addl	%r14d, (%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LEV_TX_REPLACE_TEXT_LONG,4,2   ## @LEV_TX_REPLACE_TEXT_LONG
	.comm	_LEV_TX_REPLACE_TEXT,4,2        ## @LEV_TX_REPLACE_TEXT
	.comm	_discarded_rec,4,2              ## @discarded_rec
	.comm	_User,8,3                       ## @User
	.comm	_search_enabled,8,3             ## @search_enabled
	.comm	_tot_search_words,4,2           ## @tot_search_words
	.comm	_UserSearchWords,8,3            ## @UserSearchWords
	.comm	_max_user_search_words,8,3      ## @max_user_search_words
	.comm	_max_user_search_id,4,2         ## @max_user_search_id
	.comm	_msgs_read,4,2                  ## @msgs_read
	.comm	_msgs_bytes,4,2                 ## @msgs_bytes
	.comm	_max_uid,4,2                    ## @max_uid
	.comm	_UserMsgCnt,8,3                 ## @UserMsgCnt
	.comm	_UserMsgBytes,8,3               ## @UserMsgBytes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_replace_message_text0          ; -- Begin function replace_message_text0
	.p2align	2
_replace_message_text0:                 ; @replace_message_text0
	.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, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _LEV_TX_REPLACE_TEXT_LONG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LEV_TX_REPLACE_TEXT_LONG@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	add	x8, x20, #8
	ldr	w19, [x20, #16]
	b	LBB0_3
LBB0_2:
	and	w8, w8, #0xfffff000
Lloh3:
	adrp	x9, _LEV_TX_REPLACE_TEXT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LEV_TX_REPLACE_TEXT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w0, eq
	bl	_assert
	ldr	w8, [x20]
	and	w19, w8, #0xfff
	mov	x8, x20
LBB0_3:
	ldr	x22, [x8]
	ldr	w0, [x20, #20]
	bl	_conv_uid
	tbnz	w0, #31, LBB0_8
; %bb.4:
	mov	x21, x0
Lloh6:
	adrp	x8, _User@GOTPAGE
Lloh7:
	ldr	x8, [x8, _User@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	mov	w23, w0
	ldr	w0, [x8, w0, uxtw #2]
	bl	_assert
	mov	x0, x22
	mov	x1, x19
	bl	_preprocess_text
Lloh9:
	adrp	x8, _search_enabled@GOTPAGE
Lloh10:
	ldr	x8, [x8, _search_enabled@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.5:
	mov	x0, x22
	mov	x1, x19
	bl	_compute_message_distinct_words
Lloh12:
	adrp	x8, _tot_search_words@GOTPAGE
Lloh13:
	ldr	x8, [x8, _tot_search_words@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, w0
Lloh14:
	adrp	x10, _UserSearchWords@GOTPAGE
Lloh15:
	ldr	x10, [x10, _UserSearchWords@GOTPAGEOFF]
	str	w9, [x8]
Lloh16:
	ldr	x9, [x10]
	lsl	x10, x23, #3
	ldr	x8, [x9, x10]
	add	x8, x8, w0, sxtw
	str	x8, [x9, x10]
Lloh17:
	adrp	x9, _max_user_search_words@GOTPAGE
Lloh18:
	ldr	x9, [x9, _max_user_search_words@GOTPAGEOFF]
	ldr	x10, [x9]
	cmp	x8, x10
	b.le	LBB0_7
; %bb.6:
	str	x8, [x9]
	ldr	w8, [x20, #20]
Lloh19:
	adrp	x9, _max_user_search_id@GOTPAGE
Lloh20:
	ldr	x9, [x9, _max_user_search_id@GOTPAGEOFF]
Lloh21:
	str	w8, [x9]
LBB0_7:
Lloh22:
	adrp	x8, _msgs_read@GOTPAGE
Lloh23:
	ldr	x8, [x8, _msgs_read@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
Lloh24:
	adrp	x8, _msgs_bytes@GOTPAGE
Lloh25:
	ldr	x8, [x8, _msgs_bytes@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, w19
	str	w9, [x8]
Lloh26:
	adrp	x8, _max_uid@GOTPAGE
Lloh27:
	ldr	x8, [x8, _max_uid@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	cmp	w21, w8
	cset	w0, le
	bl	_assert
Lloh29:
	adrp	x8, _UserMsgCnt@GOTPAGE
Lloh30:
	ldr	x8, [x8, _UserMsgCnt@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	lsl	x9, x23, #2
	ldr	w10, [x8, x9]
	add	w10, w10, #1
	str	w10, [x8, x9]
Lloh32:
	adrp	x8, _UserMsgBytes@GOTPAGE
Lloh33:
	ldr	x8, [x8, _UserMsgBytes@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	add	x8, x8, x9
	b	LBB0_9
LBB0_8:
	mov	w19, #1
Lloh35:
	adrp	x8, _discarded_rec@GOTPAGE
Lloh36:
	ldr	x8, [x8, _discarded_rec@GOTPAGEOFF]
LBB0_9:
	ldr	w9, [x8]
	add	w9, w9, w19
	str	w9, [x8]
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_LEV_TX_REPLACE_TEXT_LONG,4,2   ; @LEV_TX_REPLACE_TEXT_LONG
	.comm	_LEV_TX_REPLACE_TEXT,4,2        ; @LEV_TX_REPLACE_TEXT
	.comm	_discarded_rec,4,2              ; @discarded_rec
	.comm	_User,8,3                       ; @User
	.comm	_search_enabled,8,3             ; @search_enabled
	.comm	_tot_search_words,4,2           ; @tot_search_words
	.comm	_UserSearchWords,8,3            ; @UserSearchWords
	.comm	_max_user_search_words,8,3      ; @max_user_search_words
	.comm	_max_user_search_id,4,2         ; @max_user_search_id
	.comm	_msgs_read,4,2                  ; @msgs_read
	.comm	_msgs_bytes,4,2                 ; @msgs_bytes
	.comm	_max_uid,4,2                    ; @max_uid
	.comm	_UserMsgCnt,8,3                 ; @UserMsgCnt
	.comm	_UserMsgBytes,8,3               ; @UserMsgBytes
.subsections_via_symbols
