	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_perform_query               ## -- Begin function do_perform_query
	.p2align	4, 0x90
_do_perform_query:                      ## @do_perform_query
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_LAST_SEARCH_QUERY_BUFF_SIZE@GOTPCREL(%rip), %rax
	movq	_last_search_query@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	cmpl	%esi, (%rax)
	jle	LBB0_2
## %bb.1:
	movl	%esi, %ebx
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movq	(%r15), %rax
	movslq	%ebx, %rcx
	movq	$0, (%rax,%rcx,8)
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
LBB0_3:
	leaq	-28(%rbp), %r15
	movq	%r15, %rdi
	callq	_search_query_start
	xorl	%eax, %eax
	callq	_perform_query
	movl	%eax, %ebx
	movq	_copy_key@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_search_query_end
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movl	%ebx, %edx
	callq	_vkprintf
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LAST_SEARCH_QUERY_BUFF_SIZE,4,2 ## @LAST_SEARCH_QUERY_BUFF_SIZE
	.comm	_last_search_query,8,3          ## @last_search_query
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TOO LONG QUERY"

	.comm	_copy_key,4,2                   ## @copy_key
L_.str.1:                               ## @.str.1
	.asciz	"perform_query result = %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_perform_query               ; -- Begin function do_perform_query
	.p2align	2
_do_perform_query:                      ; @do_perform_query
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _LAST_SEARCH_QUERY_BUFF_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LAST_SEARCH_QUERY_BUFF_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x21, _last_search_query@GOTPAGE
Lloh4:
	ldr	x21, [x21, _last_search_query@GOTPAGEOFF]
	ldr	x0, [x21]
	cmp	w8, w1
	b.le	LBB0_2
; %bb.1:
	mov	x20, x1
	mov	x1, x19
	mov	x2, x20
	bl	_memcpy
	ldr	x8, [x21]
	str	xzr, [x8, w20, sxtw #3]
	b	LBB0_3
LBB0_2:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
LBB0_3:
	add	x0, sp, #12
	bl	_search_query_start
	bl	_perform_query
	mov	x20, x0
Lloh7:
	adrp	x8, _copy_key@GOTPAGE
Lloh8:
	ldr	x8, [x8, _copy_key@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
	add	x0, sp, #12
	mov	x1, x20
	mov	x2, x19
	bl	_search_query_end
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	bl	_vkprintf
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_LAST_SEARCH_QUERY_BUFF_SIZE,4,2 ; @LAST_SEARCH_QUERY_BUFF_SIZE
	.comm	_last_search_query,8,3          ; @last_search_query
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TOO LONG QUERY"

	.comm	_copy_key,4,2                   ; @copy_key
l_.str.1:                               ; @.str.1
	.asciz	"perform_query result = %d\n"

.subsections_via_symbols
