	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rpc_query_alloc
_rpc_query_alloc:                       ## @rpc_query_alloc
	.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
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	movq	_tree_insert@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_ADD_CNT
	movl	(%r14), %edi
	callq	_START_TIMER
	movq	_total_working_qid@GOTPCREL(%rip), %rdx
	movq	_RPC_MAX_QUERIES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, (%rdx)
	jle	LBB0_2
## %bb.1:
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_2:
	movq	_last_qid@GOTPCREL(%rip), %r8
	movq	(%r8), %rbx
	movq	_queries@GOTPCREL(%rip), %r12
	movq	(%r12), %r9
	movq	_first_qid@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	_RPC_QUERIES_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	$1, %eax
	subq	%rsi, %rax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdx
	incq	%rbx
	movq	%rbx, (%r8)
	addq	%rax, %rdx
	andq	%rdi, %rdx
	leaq	(%rdx,%rdx,2), %rcx
	cmpq	%rsi, (%r9,%rcx,8)
	jae	LBB0_3
## %bb.4:
	movq	_max_query_id@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jg	LBB0_6
## %bb.5:
	incl	%edx
	movl	%edx, (%rax)
LBB0_6:
	xorl	%eax, %eax
	callq	_update_precise_now
	movq	(%r12), %r13
	movq	%rbx, %rax
	subq	(%r15), %rax
	movq	_RPC_QUERIES_MASK@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rax
	leaq	(%rax,%rax,2), %r15
	leaq	(,%r15,8), %r12
	addq	%r13, %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	%rbx, (%r13,%r15,8)
	movq	_precise_now@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r13,%r15,8)
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movsd	%xmm0, 8(%r13,%r15,8)
	movq	_total_working_qid@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	_total_queries@GOTPCREL(%rip), %rax
	incl	(%rax)
LBB0_7:
	movl	(%r14), %edi
	callq	_END_TIMER
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tree_insert,4,2                ## @tree_insert
	.comm	_total_working_qid,4,2          ## @total_working_qid
	.comm	_RPC_MAX_QUERIES,4,2            ## @RPC_MAX_QUERIES
	.comm	_last_qid,8,3                   ## @last_qid
	.comm	_queries,8,3                    ## @queries
	.comm	_first_qid,8,3                  ## @first_qid
	.comm	_RPC_QUERIES_MASK,8,3           ## @RPC_QUERIES_MASK
	.comm	_max_query_id,4,2               ## @max_query_id
	.comm	_precise_now,4,2                ## @precise_now
	.comm	_total_queries,4,2              ## @total_queries
	.no_dead_strip	_rpc_query_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rpc_query_alloc
_rpc_query_alloc:                       ; @rpc_query_alloc
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-80]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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 b8, -72
	.cfi_offset b9, -80
	fmov	d8, d0
Lloh0:
	adrp	x20, _tree_insert@GOTPAGE
Lloh1:
	ldr	x20, [x20, _tree_insert@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_ADD_CNT
	ldr	w0, [x20]
	bl	_START_TIMER
Lloh2:
	adrp	x21, _total_working_qid@GOTPAGE
Lloh3:
	ldr	x21, [x21, _total_working_qid@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh4:
	adrp	x9, _RPC_MAX_QUERIES@GOTPAGE
Lloh5:
	ldr	x9, [x9, _RPC_MAX_QUERIES@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w9, #0
	cinc	w9, w9, lt
	cmp	w8, w9, asr #1
	b.le	LBB0_2
; %bb.1:
	mov	x19, #0
	b	LBB0_7
LBB0_2:
Lloh7:
	adrp	x8, _last_qid@GOTPAGE
Lloh8:
	ldr	x8, [x8, _last_qid@GOTPAGEOFF]
	ldr	x22, [x8]
Lloh9:
	adrp	x19, _queries@GOTPAGE
Lloh10:
	ldr	x19, [x19, _queries@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh11:
	adrp	x23, _first_qid@GOTPAGE
Lloh12:
	ldr	x23, [x23, _first_qid@GOTPAGEOFF]
	ldr	x10, [x23]
Lloh13:
	adrp	x24, _RPC_QUERIES_MASK@GOTPAGE
Lloh14:
	ldr	x24, [x24, _RPC_QUERIES_MASK@GOTPAGEOFF]
	ldr	x11, [x24]
	mov	w12, #1
	sub	x12, x12, x10
	mov	w14, #24
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x13, x22
	add	x22, x22, #1
	str	x22, [x8]
	add	x13, x12, x13
	and	x13, x13, x11
	mul	x15, x13, x14
	ldr	x15, [x9, x15]
	cmp	x15, x10
	b.hs	LBB0_3
; %bb.4:
Lloh15:
	adrp	x8, _max_query_id@GOTPAGE
Lloh16:
	ldr	x8, [x8, _max_query_id@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, w13
	b.gt	LBB0_6
; %bb.5:
	add	w9, w13, #1
	str	w9, [x8]
LBB0_6:
	bl	_update_precise_now
	ldr	x8, [x19]
	ldr	x9, [x23]
	ldr	x10, [x24]
	sub	x9, x22, x9
	and	x9, x9, x10
	mov	w10, #24
	madd	x19, x9, x10, x8
	mov	x0, x19
	mov	w1, #0
	mov	w2, #24
	bl	_memset
Lloh17:
	adrp	x8, _precise_now@GOTPAGE
Lloh18:
	ldr	x8, [x8, _precise_now@GOTPAGEOFF]
	str	x22, [x19]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	str	d8, [x19, #8]
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
Lloh20:
	adrp	x8, _total_queries@GOTPAGE
Lloh21:
	ldr	x8, [x8, _total_queries@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_7:
	ldr	w0, [x20]
	bl	_END_TIMER
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_tree_insert,4,2                ; @tree_insert
	.comm	_total_working_qid,4,2          ; @total_working_qid
	.comm	_RPC_MAX_QUERIES,4,2            ; @RPC_MAX_QUERIES
	.comm	_last_qid,8,3                   ; @last_qid
	.comm	_queries,8,3                    ; @queries
	.comm	_first_qid,8,3                  ; @first_qid
	.comm	_RPC_QUERIES_MASK,8,3           ; @RPC_QUERIES_MASK
	.comm	_max_query_id,4,2               ; @max_query_id
	.comm	_precise_now,4,2                ; @precise_now
	.comm	_total_queries,4,2              ; @total_queries
	.no_dead_strip	_rpc_query_alloc
.subsections_via_symbols
