	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rebuild_hashmap                ## -- Begin function rebuild_hashmap
	.p2align	4, 0x90
_rebuild_hashmap:                       ## @rebuild_hashmap
	.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	_rebuild_hashmap_calls@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	_hm@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	_Q_limit@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	callq	_vkprintf
	movl	4(%r13), %eax
	addl	%eax, %eax
	movq	_MAX_RES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	addl	$10, %ebx
	cmpl	%ebx, %eax
	cmovll	%eax, %ebx
	movq	%r13, %rdi
	callq	_hashmap_ll_int_free
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_hashmap_ll_int_init
	testl	%eax, %eax
	je	LBB0_10
## %bb.1:
	movq	_R_cnt@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_9
## %bb.2:
	movl	$1, %r14d
	movq	_R@GOTPCREL(%rip), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %eax
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_RS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx,%r14,4)
	leaq	1(%r14), %rax
	movslq	(%r12), %rcx
	cmpq	%rcx, %r14
	movq	%rax, %r14
	jge	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movl	(%rax,%r14,4), %edi
	callq	_extract_hash_item
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rbx
	movq	%r13, %rdi
	movq	%rax, %rsi
	leaq	-44(%rbp), %rdx
	callq	_hashmap_ll_int_get
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %r13
	movq	%r15, %r12
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_log_cur_pos
	movl	%r15d, %edi
	movq	%r12, %r15
	movq	%r13, %r12
	movq	_hm@GOTPCREL(%rip), %r13
	leaq	L_.str.2(%rip), %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_last_search_query@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	xorl	%edi, %edi
	callq	_assert
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%r13), %rax
	movslq	-44(%rbp), %rcx
	shlq	$4, %rcx
	movq	%rbx, (%rax,%rcx)
	movl	%r14d, 8(%rax,%rcx)
	incl	8(%r13)
	movl	-44(%rbp), %eax
	jmp	LBB0_8
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$2, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_rebuild_hashmap_calls,4,2      ## @rebuild_hashmap_calls
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rebuild_hashmap: old hashmap size = %d, Q_limit = %d\n"

	.comm	_hm,24,3                        ## @hm
	.comm	_Q_limit,4,2                    ## @Q_limit
	.comm	_MAX_RES,4,2                    ## @MAX_RES
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"Not enough memory for allocate hash table for storing %d entries.\n"

	.comm	_R_cnt,4,2                      ## @R_cnt
	.comm	_R,8,3                          ## @R
L_.str.2:                               ## @.str.2
	.asciz	"log_cur_pos ()\t%lld\n"

L_.str.3:                               ## @.str.3
	.asciz	"last_search_query\t%s\n"

	.comm	_last_search_query,8,3          ## @last_search_query
	.comm	_RS,8,3                         ## @RS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rebuild_hashmap                ; -- Begin function rebuild_hashmap
	.p2align	2
_rebuild_hashmap:                       ; @rebuild_hashmap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, _rebuild_hashmap_calls@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rebuild_hashmap_calls@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
Lloh2:
	adrp	x19, _hm@GOTPAGE
Lloh3:
	ldr	x19, [x19, _hm@GOTPAGEOFF]
	ldr	w2, [x19]
Lloh4:
	adrp	x8, _Q_limit@GOTPAGE
Lloh5:
	ldr	x8, [x8, _Q_limit@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_vkprintf
	ldr	w8, [x19, #4]
	lsl	w8, w8, #1
Lloh9:
	adrp	x9, _MAX_RES@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MAX_RES@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	add	w9, w9, #10
	cmp	w8, w9
	csel	w20, w8, w9, lt
	mov	x0, x19
	bl	_hashmap_ll_int_free
	mov	x0, x19
	mov	x1, x20
	bl	_hashmap_ll_int_init
	cbz	w0, LBB0_10
; %bb.1:
Lloh12:
	adrp	x24, _R_cnt@GOTPAGE
Lloh13:
	ldr	x24, [x24, _R_cnt@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.2:
	mov	w25, #1
Lloh14:
	adrp	x26, _R@GOTPAGE
Lloh15:
	ldr	x26, [x26, _R@GOTPAGEOFF]
Lloh16:
	adrp	x27, _RS@GOTPAGE
Lloh17:
	ldr	x27, [x27, _RS@GOTPAGEOFF]
Lloh18:
	adrp	x28, _stderr@GOTPAGE
Lloh19:
	ldr	x28, [x28, _stderr@GOTPAGEOFF]
Lloh20:
	adrp	x20, l_.str.2@PAGE
Lloh21:
	add	x20, x20, l_.str.2@PAGEOFF
Lloh22:
	adrp	x21, l_.str.3@PAGE
Lloh23:
	add	x21, x21, l_.str.3@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x27]
	str	w8, [x9, x25, lsl #2]
	add	x8, x25, #1
	ldrsw	x9, [x24]
	cmp	x25, x9
	mov	x25, x8
	b.ge	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	ldr	w0, [x8, x25, lsl #2]
	bl	_extract_hash_item
	cbz	x0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x22, x0
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x22
	bl	_hashmap_ll_int_get
	cbz	w0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w23, [x28]
	bl	_log_cur_pos
	str	x0, [sp]
	mov	x0, x23
	mov	x1, x20
	bl	_fprintf
	ldr	w0, [x28]
Lloh24:
	adrp	x8, _last_search_query@GOTPAGE
Lloh25:
	ldr	x8, [x8, _last_search_query@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	str	x8, [sp]
	mov	x1, x21
	bl	_fprintf
	mov	w0, #0
	bl	_assert
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #16]
	ldrsw	x9, [sp, #12]
	add	x8, x8, x9, lsl #4
	str	x22, [x8]
	str	w25, [x8, #8]
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	ldr	w8, [sp, #12]
	b	LBB0_4
LBB0_9:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_10:
Lloh27:
	adrp	x8, _stderr@GOTPAGE
Lloh28:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	str	x20, [sp]
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	mov	w0, #2
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_rebuild_hashmap_calls,4,2      ; @rebuild_hashmap_calls
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rebuild_hashmap: old hashmap size = %d, Q_limit = %d\n"

	.comm	_hm,24,3                        ; @hm
	.comm	_Q_limit,4,2                    ; @Q_limit
	.comm	_MAX_RES,4,2                    ; @MAX_RES
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"Not enough memory for allocate hash table for storing %d entries.\n"

	.comm	_R_cnt,4,2                      ; @R_cnt
	.comm	_R,8,3                          ; @R
l_.str.2:                               ; @.str.2
	.asciz	"log_cur_pos ()\t%lld\n"

l_.str.3:                               ; @.str.3
	.asciz	"last_search_query\t%s\n"

	.comm	_last_search_query,8,3          ; @last_search_query
	.comm	_RS,8,3                         ; @RS
.subsections_via_symbols
