	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_php_worker_run_mc_query_packet ## -- Begin function php_worker_run_mc_query_packet
	.p2align	4, 0x90
_php_worker_run_mc_query_packet:        ## @php_worker_run_mc_query_packet
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rax
	movq	_query_stats@GOTPCREL(%rip), %r13
	movq	%rax, (%r13)
	movl	16(%rsi), %eax
	movl	%eax, 12(%r13)
	movq	_php_script@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_php_script_query_readed
	xorl	%eax, %eax
	callq	_mc_ansgen_packet_create
	movq	%rax, %r15
	movq	(%rax), %rax
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	*(%rax)
	movl	4(%rbx), %r14d
	testl	%r14d, %r14d
	js	LBB0_2
## %bb.1:
	movq	_MAX_TARGETS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jge	LBB0_2
## %bb.4:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	_Targets@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	testq	%r12, %r12
	je	LBB0_5
## %bb.6:
	leaq	(%r12,%r14,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	4(%r12,%r14,8), %edi
	callq	_inet_ntoa
	movl	(%r12,%r14,8), %edx
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	callq	_qmem_pstr
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
	movl	(%r12,%r14,8), %eax
	movl	%eax, 8(%r13)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_get_target_connection_force
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	_conn_connecting@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.10:
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	jne	LBB0_12
## %bb.11:
	xorl	%eax, %eax
	callq	_alloc_head_buffer
	movq	%rax, %rdi
	movq	%rax, 8(%r12)
LBB0_12:
	movl	12(%rbx), %edx
	movl	16(%rbx), %esi
	callq	_write_out
	jmp	LBB0_13
LBB0_2:
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_3
LBB0_5:
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_3
LBB0_7:
	leaq	L_.str.4(%rip), %rdx
LBB0_3:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_net_error                      ## TAILCALL
LBB0_9:
	movq	%r12, %rdi
	addq	$16, %rdi
	movl	12(%rbx), %edx
	movl	16(%rbx), %esi
	callq	_write_out
	movq	%r12, %rdi
	callq	_MCC_FUNC
	movq	%r12, %rdi
	callq	*(%rax)
LBB0_13:
	movl	8(%rbx), %edi
	callq	_fix_timeout
	movq	_precise_now@GOTPCREL(%rip), %rax
	addsd	(%rax), %xmm0
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_create_pnet_query
	movq	_PNETF_IMMEDIATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_14
## %bb.17:
	movq	%rax, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pnet_query_timeout             ## TAILCALL
LBB0_14:
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	_conn_wait_net@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MC"

	.comm	_query_stats,16,3               ## @query_stats
	.comm	_php_script,4,2                 ## @php_script
	.comm	_MAX_TARGETS,4,2                ## @MAX_TARGETS
L_.str.1:                               ## @.str.1
	.asciz	"Invalid connection_id (1)"

	.comm	_Targets,8,3                    ## @Targets
L_.str.2:                               ## @.str.2
	.asciz	"Invalid connection_id (2)"

L_.str.3:                               ## @.str.3
	.asciz	"[%s:%d]"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to establish connection [probably reconnect timeout is not expired]"

	.comm	_conn_connecting,8,3            ## @conn_connecting
	.comm	_precise_now,8,3                ## @precise_now
	.comm	_PNETF_IMMEDIATE,4,2            ## @PNETF_IMMEDIATE
	.comm	_conn_wait_net,4,2              ## @conn_wait_net
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_php_worker_run_mc_query_packet ; -- Begin function php_worker_run_mc_query_packet
	.p2align	2
_php_worker_run_mc_query_packet:        ; @php_worker_run_mc_query_packet
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _query_stats@GOTPAGE
Lloh1:
	ldr	x23, [x23, _query_stats@GOTPAGEOFF]
Lloh2:
	adrp	x8, l_.str@PAGE
Lloh3:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x23]
	ldr	w8, [x1, #16]
	str	w8, [x23, #12]
Lloh4:
	adrp	x8, _php_script@GOTPAGE
Lloh5:
	ldr	x8, [x8, _php_script@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_php_script_query_readed
	bl	_mc_ansgen_packet_create
	mov	x21, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	w1, [x19]
	blr	x8
	ldr	w8, [x19, #4]
	tbnz	w8, #31, LBB0_8
; %bb.1:
Lloh7:
	adrp	x9, _MAX_TARGETS@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MAX_TARGETS@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_8
; %bb.2:
Lloh10:
	adrp	x9, _Targets@GOTPAGE
Lloh11:
	ldr	x9, [x9, _Targets@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cbz	x9, LBB0_9
; %bb.3:
	add	x22, x9, x8, lsl #3
	ldr	x8, [x21]
	ldr	x24, [x8]
	ldr	w0, [x22, #4]
	bl	_inet_ntoa
	mov	x1, x0
	ldr	w2, [x22]
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_qmem_pstr
	mov	x1, x0
	mov	x0, x21
	blr	x24
	ldr	w8, [x22]
	str	w8, [x23, #8]
	mov	x0, x22
	bl	_get_target_connection_force
	cbz	x0, LBB0_10
; %bb.4:
	mov	x22, x0
	ldr	x8, [x0]
Lloh15:
	adrp	x9, _conn_connecting@GOTPAGE
Lloh16:
	ldr	x9, [x9, _conn_connecting@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.5:
	ldr	x0, [x22, #8]
	cbnz	x0, LBB0_7
; %bb.6:
	bl	_alloc_head_buffer
	str	x0, [x22, #8]
LBB0_7:
	ldp	w2, w1, [x19, #12]
	bl	_write_out
	b	LBB0_13
LBB0_8:
Lloh18:
	adrp	x2, l_.str.1@PAGE
Lloh19:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_9:
Lloh20:
	adrp	x2, l_.str.2@PAGE
Lloh21:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh22:
	adrp	x2, l_.str.4@PAGE
Lloh23:
	add	x2, x2, l_.str.4@PAGEOFF
LBB0_11:
	mov	x0, x21
	mov	x1, x19
	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
	b	_net_error
LBB0_12:
	add	x0, x22, #16
	ldp	w2, w1, [x19, #12]
	bl	_write_out
	mov	x0, x22
	bl	_MCC_FUNC
	ldr	x8, [x0]
	mov	x0, x22
	blr	x8
LBB0_13:
	ldr	w0, [x19, #8]
	bl	_fix_timeout
Lloh24:
	adrp	x8, _precise_now@GOTPAGE
Lloh25:
	ldr	x8, [x8, _precise_now@GOTPAGEOFF]
Lloh26:
	ldr	d1, [x8]
	fadd	d0, d0, d1
	ldr	x0, [x20]
	mov	x1, x22
	mov	x2, x21
	bl	_create_pnet_query
	ldr	w8, [x19]
Lloh27:
	adrp	x9, _PNETF_IMMEDIATE@GOTPAGE
Lloh28:
	ldr	x9, [x9, _PNETF_IMMEDIATE@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:
	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
	b	_pnet_query_timeout
LBB0_15:
	ldr	x8, [x20]
	cbz	x8, LBB0_17
; %bb.16:
Lloh30:
	adrp	x9, _conn_wait_net@GOTPAGE
Lloh31:
	ldr	x9, [x9, _conn_wait_net@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	str	w9, [x8]
LBB0_17:
	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	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MC"

	.comm	_query_stats,16,3               ; @query_stats
	.comm	_php_script,4,2                 ; @php_script
	.comm	_MAX_TARGETS,4,2                ; @MAX_TARGETS
l_.str.1:                               ; @.str.1
	.asciz	"Invalid connection_id (1)"

	.comm	_Targets,8,3                    ; @Targets
l_.str.2:                               ; @.str.2
	.asciz	"Invalid connection_id (2)"

l_.str.3:                               ; @.str.3
	.asciz	"[%s:%d]"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to establish connection [probably reconnect timeout is not expired]"

	.comm	_conn_connecting,8,3            ; @conn_connecting
	.comm	_precise_now,8,3                ; @precise_now
	.comm	_PNETF_IMMEDIATE,4,2            ; @PNETF_IMMEDIATE
	.comm	_conn_wait_net,4,2              ; @conn_wait_net
.subsections_via_symbols
