	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function change_item
_change_item:                           ## @change_item
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r13d
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%r12d, %r12d
	movl	$0, %edi
	testq	%r15, %r15
	je	LBB0_3
## %bb.1:
	movl	$0, %edi
	cmpl	$65535, %r14d                   ## imm = 0xFFFF
	ja	LBB0_3
## %bb.2:
	movl	%r14d, %eax
	xorl	%edi, %edi
	cmpb	$0, (%r15,%rax)
	sete	%dil
LBB0_3:
	callq	_assert
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setg	%dil
	callq	_assert
	movq	%rbx, %rdi
	callq	_fits
	testl	%eax, %eax
	je	LBB0_19
## %bb.4:
	movq	_import_only_mode@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_18
## %bb.5:
	subq	$8, %rsp
	leaq	L_.str(%rip), %rsi
	movl	$4, %edi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	movq	%rbx, %r8
	movl	-68(%rbp), %r9d                 ## 4-byte Reload
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	pushq	%r13
	callq	_vkprintf
	addq	$16, %rsp
	movq	%rbx, %rdi
	callq	_get_idx_item
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_mod_items@GOTPCREL(%rip), %rcx
	incl	(%rcx)
	movq	_FLAG_DELETED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%rax)
LBB0_7:
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	_ONLY_FIND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_get_item_f
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	%rax, %r13
	movq	_FLAG_DELETED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_10
## %bb.9:
	movq	_del_items@GOTPCREL(%rip), %rcx
	decl	(%rcx)
	xorl	%eax, (%r13)
LBB0_10:
	movq	%r13, %rsi
	addq	$8, %rsi
	movq	%r13, %rdi
	callq	_item_clear_wordlist
	jmp	LBB0_12
LBB0_11:
	movq	_ADD_NOT_FOUND_ITEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_get_item_f
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_19
LBB0_12:
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.13:
	movq	%r13, %rdi
	callq	_move_item_rates
LBB0_14:
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -64(%rbp)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, -60(%rbp)
	movq	_creation_date@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_16
## %bb.15:
	movl	$3, %r12d
	testb	$4, 4(%r13)
	jne	LBB0_17
LBB0_16:
	movq	_log_last_ts@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movl	$7, %r12d
LBB0_17:
	xorl	%eax, %eax
	callq	_clear_cur_wordlist
	movq	_Q@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_universal@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_tag_owner@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-92(%rbp), %rax
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	$65536, %ecx                    ## imm = 0x10000
	pushq	%rax
	pushq	%rbx
	callq	_searchy_extract_words
	addq	$16, %rsp
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_item_add_words
	movq	_cur_wordlist_head@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r13)
	leaq	-64(%rbp), %rdx
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_set_multiple_rates_item
LBB0_18:
	movl	$1, %r12d
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_import_only_mode,8,3           ## @import_only_mode
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"change_item: text=%s, len = %d, item_id = %016llx, rate = %d, rate2 = %d\n"

	.comm	_mod_items,4,2                  ## @mod_items
	.comm	_FLAG_DELETED,4,2               ## @FLAG_DELETED
	.comm	_ONLY_FIND,4,2                  ## @ONLY_FIND
	.comm	_del_items,4,2                  ## @del_items
	.comm	_ADD_NOT_FOUND_ITEM,4,2         ## @ADD_NOT_FOUND_ITEM
	.comm	_creation_date,4,2              ## @creation_date
	.comm	_log_last_ts,4,2                ## @log_last_ts
	.comm	_Q,4,2                          ## @Q
	.comm	_universal,4,2                  ## @universal
	.comm	_tag_owner,4,2                  ## @tag_owner
	.comm	_cur_wordlist_head,4,2          ## @cur_wordlist_head
	.no_dead_strip	_change_item
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function change_item
_change_item:                           ; @change_item
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x4
	mov	x23, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	w0, #0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	cbz	x21, LBB0_3
; %bb.1:
	lsr	w8, w20, #16
	cbnz	w8, LBB0_3
; %bb.2:
	ldrb	w8, [x21, w20, uxtw]
	cmp	w8, #0
	cset	w0, eq
LBB0_3:
	bl	_assert
	cmp	x19, #0
	cset	w0, gt
	bl	_assert
	mov	x0, x19
	bl	_fits
	cbz	w0, LBB0_20
; %bb.4:
Lloh3:
	adrp	x8, _import_only_mode@GOTPAGE
Lloh4:
	ldr	x8, [x8, _import_only_mode@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbnz	x8, LBB0_19
; %bb.5:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #4
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	mov	x5, x23
	mov	x6, x22
	bl	_vkprintf
	mov	x0, x19
	bl	_get_idx_item
	mov	x25, x0
Lloh8:
	adrp	x26, _FLAG_DELETED@GOTPAGE
Lloh9:
	ldr	x26, [x26, _FLAG_DELETED@GOTPAGEOFF]
	cbz	x0, LBB0_7
; %bb.6:
Lloh10:
	adrp	x8, _mod_items@GOTPAGE
Lloh11:
	ldr	x8, [x8, _mod_items@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	ldr	w8, [x26]
	ldr	w9, [x25]
	orr	w8, w9, w8
	str	w8, [x25]
LBB0_7:
Lloh12:
	adrp	x8, _ONLY_FIND@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ONLY_FIND@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_get_item_f
	cbz	x0, LBB0_11
; %bb.8:
	mov	x24, x0
	ldr	w9, [x0]
	ldr	w8, [x26]
	tst	w8, w9
	b.eq	LBB0_10
; %bb.9:
Lloh15:
	adrp	x9, _del_items@GOTPAGE
Lloh16:
	ldr	x9, [x9, _del_items@GOTPAGEOFF]
	ldr	w10, [x9]
	sub	w10, w10, #1
	str	w10, [x9]
	ldr	w9, [x24]
	eor	w8, w9, w8
	str	w8, [x24]
LBB0_10:
	add	x1, x24, #8
	mov	x0, x24
	bl	_item_clear_wordlist
	b	LBB0_12
LBB0_11:
Lloh17:
	adrp	x8, _ADD_NOT_FOUND_ITEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ADD_NOT_FOUND_ITEM@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_get_item_f
	mov	x24, x0
	cbz	x0, LBB0_20
LBB0_12:
	cbz	x25, LBB0_14
; %bb.13:
	mov	x0, x24
	mov	x1, x25
	bl	_move_item_rates
LBB0_14:
	stp	w23, w22, [sp, #8]
Lloh20:
	adrp	x8, _creation_date@GOTPAGE
Lloh21:
	ldr	x8, [x8, _creation_date@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cbz	w8, LBB0_16
; %bb.15:
	ldrb	w8, [x24, #4]
	tbnz	w8, #2, LBB0_17
LBB0_16:
Lloh23:
	adrp	x8, _log_last_ts@GOTPAGE
Lloh24:
	ldr	x8, [x8, _log_last_ts@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	mov	w22, #7
	b	LBB0_18
LBB0_17:
	mov	w22, #3
LBB0_18:
	bl	_clear_cur_wordlist
Lloh26:
	adrp	x8, _Q@GOTPAGE
Lloh27:
	ldr	x8, [x8, _Q@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
Lloh29:
	adrp	x8, _universal@GOTPAGE
Lloh30:
	ldr	x8, [x8, _universal@GOTPAGEOFF]
Lloh31:
	ldr	w4, [x8]
Lloh32:
	adrp	x8, _tag_owner@GOTPAGE
Lloh33:
	ldr	x8, [x8, _tag_owner@GOTPAGEOFF]
Lloh34:
	ldr	w5, [x8]
	add	x7, sp, #4
	mov	x0, x21
	mov	x1, x20
	mov	w3, #65536
	mov	x6, x19
	bl	_searchy_extract_words
	mov	x1, x0
	mov	x0, x24
	bl	_item_add_words
Lloh35:
	adrp	x8, _cur_wordlist_head@GOTPAGE
Lloh36:
	ldr	x8, [x8, _cur_wordlist_head@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	str	w8, [x24, #8]
	add	x2, sp, #8
	mov	x0, x24
	mov	x1, x22
	bl	_set_multiple_rates_item
LBB0_19:
	mov	w0, #1
LBB0_20:
	ldr	x8, [sp, #24]
Lloh38:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh39:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_import_only_mode,8,3           ; @import_only_mode
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"change_item: text=%s, len = %d, item_id = %016llx, rate = %d, rate2 = %d\n"

	.comm	_mod_items,4,2                  ; @mod_items
	.comm	_FLAG_DELETED,4,2               ; @FLAG_DELETED
	.comm	_ONLY_FIND,4,2                  ; @ONLY_FIND
	.comm	_del_items,4,2                  ; @del_items
	.comm	_ADD_NOT_FOUND_ITEM,4,2         ; @ADD_NOT_FOUND_ITEM
	.comm	_creation_date,4,2              ; @creation_date
	.comm	_log_last_ts,4,2                ; @log_last_ts
	.comm	_Q,4,2                          ; @Q
	.comm	_universal,4,2                  ; @universal
	.comm	_tag_owner,4,2                  ; @tag_owner
	.comm	_cur_wordlist_head,4,2          ; @cur_wordlist_head
	.no_dead_strip	_change_item
.subsections_via_symbols
