	.file	"extr_php-engine.c_php_worker_run_mc_query_packet.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"MC"
.LC1:
	.string	"Invalid connection_id (1)"
.LC2:
	.string	"Invalid connection_id (2)"
.LC3:
	.string	"[%s:%d]"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC4:
	.string	"Failed to establish connection [probably reconnect timeout is not expired]"
	.text
	.p2align 4
	.globl	php_worker_run_mc_query_packet
	.type	php_worker_run_mc_query_packet, @function
php_worker_run_mc_query_packet:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	rax, .LC0[rip]
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	QWORD PTR query_stats[rip], rax
	mov	edi, DWORD PTR php_script[rip]
	mov	eax, DWORD PTR 16[rsi]
	mov	DWORD PTR query_stats[rip+12], eax
	call	php_script_query_readed@PLT
	xor	eax, eax
	call	mc_ansgen_packet_create@PLT
	mov	esi, DWORD PTR 0[rbp]
	mov	r12, rax
	mov	rax, QWORD PTR [rax]
	mov	rdi, r12
	call	[QWORD PTR [rax]]
	movsx	rax, DWORD PTR 4[rbp]
	test	eax, eax
	js	.L2
	cmp	DWORD PTR MAX_TARGETS[rip], eax
	jle	.L2
	mov	rdx, QWORD PTR Targets[rip]
	lea	r13, [rdx+rax*8]
	test	r13, r13
	je	.L17
	mov	edi, DWORD PTR 4[r13]
	mov	rax, QWORD PTR [r12]
	mov	r15d, DWORD PTR 0[r13]
	mov	r14, QWORD PTR [rax]
	call	inet_ntoa@PLT
	mov	edx, r15d
	lea	rdi, .LC3[rip]
	mov	esi, eax
	call	qmem_pstr@PLT
	mov	rdi, r12
	mov	esi, eax
	call	r14
	mov	eax, DWORD PTR 0[r13]
	mov	rdi, r13
	mov	DWORD PTR query_stats[rip+8], eax
	call	get_target_connection_force@PLT
	lea	rdx, .LC4[rip]
	mov	r13, rax
	test	rax, rax
	je	.L15
	mov	rax, QWORD PTR conn_connecting[rip]
	cmp	QWORD PTR 0[r13], rax
	je	.L6
	mov	edx, DWORD PTR 12[rbp]
	mov	esi, DWORD PTR 16[rbp]
	lea	rdi, 16[r13]
	call	write_out@PLT
	mov	rdi, r13
	call	MCC_FUNC@PLT
	mov	rdi, r13
	call	[QWORD PTR [rax]]
.L7:
	mov	edi, DWORD PTR 8[rbp]
	call	fix_timeout@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	rdx, r12
	mov	rsi, r13
	addsd	xmm0, QWORD PTR precise_now[rip]
	call	create_pnet_query@PLT
	mov	edx, DWORD PTR 0[rbp]
	test	DWORD PTR PNETF_IMMEDIATE[rip], edx
	jne	.L18
	mov	rax, QWORD PTR [rbx]
	test	rax, rax
	je	.L1
	mov	edx, DWORD PTR conn_wait_net[rip]
	mov	DWORD PTR [rax], edx
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	lea	rdx, .LC2[rip]
.L15:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rsi, rbp
	mov	rdi, r12
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	net_error@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	lea	rdx, .LC1[rip]
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, QWORD PTR 8[r13]
	test	rdi, rdi
	je	.L19
.L8:
	mov	edx, DWORD PTR 12[rbp]
	mov	esi, DWORD PTR 16[rbp]
	call	write_out@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L18:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, rax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	pnet_query_timeout@PLT
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	xor	eax, eax
	call	alloc_head_buffer@PLT
	mov	QWORD PTR 8[r13], rax
	mov	rdi, rax
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	php_worker_run_mc_query_packet, .-php_worker_run_mc_query_packet
	.comm	query_stats,16,16
	.comm	precise_now,8,8
	.comm	php_script,4,4
	.comm	conn_wait_net,4,4
	.comm	conn_connecting,8,8
	.comm	Targets,8,8
	.comm	PNETF_IMMEDIATE,4,4
	.comm	MAX_TARGETS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_php-engine.c_php_worker_run_mc_query_packet.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"MC\000"
	.align	2
.LC1:
	.ascii	"Invalid connection_id (1)\000"
	.align	2
.LC2:
	.ascii	"Invalid connection_id (2)\000"
	.align	2
.LC3:
	.ascii	"[%s:%d]\000"
	.align	2
.LC4:
	.ascii	"Failed to establish connection [probably reconnect "
	.ascii	"timeout is not expired]\000"
	.global	__aeabi_dadd
	.text
	.align	2
	.global	php_worker_run_mc_query_packet
	.syntax unified
	.arm
	.fpu softvfp
	.type	php_worker_run_mc_query_packet, %function
php_worker_run_mc_query_packet:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r1
	ldr	r1, .L21
	ldr	r2, [r4, #16]
	ldr	r3, .L21+4
	ldr	r8, .L21+8
	sub	sp, sp, #12
	mov	r7, r0
	ldr	r0, [r1]
	str	r2, [r8, #8]
	str	r3, [r8]
	bl	php_script_query_readed
	bl	mc_ansgen_packet_create
	ldr	r3, [r0]
	ldr	r1, [r4]
	ldr	r3, [r3]
	mov	r5, r0
	blx	r3
	ldr	r6, [r4, #4]
	cmp	r6, #0
	blt	.L2
	ldr	r3, .L21+12
	ldr	r3, [r3]
	cmp	r3, r6
	ble	.L2
	ldr	r3, .L21+16
	ldr	r9, [r3]
	adds	r10, r9, r6, lsl #3
	beq	.L17
	ldr	r3, [r5]
	ldr	r0, [r10, #4]
	ldr	fp, [r3]
	bl	inet_ntoa
	ldr	r2, [r9, r6, lsl #3]
	mov	r1, r0
	ldr	r0, .L21+20
	bl	qmem_pstr
	mov	r1, r0
	mov	r0, r5
	blx	fp
	ldr	r3, [r9, r6, lsl #3]
	mov	r0, r10
	str	r3, [r8, #4]
	bl	get_target_connection_force
	subs	r6, r0, #0
	beq	.L18
	ldr	r3, .L21+24
	ldr	r2, [r6]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L6
	ldr	r2, [r4, #12]
	ldr	r1, [r4, #16]
	add	r0, r6, #8
	bl	write_out
	mov	r0, r6
	bl	MCC_FUNC
	mov	r3, r0
	mov	r0, r6
	ldr	r3, [r3]
	blx	r3
.L7:
	ldr	r0, [r4, #8]
	bl	fix_timeout
	ldr	r3, .L21+28
	ldr	r8, [r7]
	ldmia	r3, {r2-r3}
	bl	__aeabi_dadd
	mov	r2, r5
	stm	sp, {r0-r1}
	mov	r1, r6
	mov	r0, r8
	bl	create_pnet_query
	ldr	r3, .L21+32
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L19
	ldr	r3, [r7]
	cmp	r3, #0
	ldrne	r2, .L21+36
	ldrne	r2, [r2]
	strne	r2, [r3]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r1, r4
	mov	r0, r5
	ldr	r2, .L21+40
.L15:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	net_error
.L6:
	ldr	r0, [r6, #4]
	cmp	r0, #0
	beq	.L20
.L8:
	ldr	r2, [r4, #12]
	ldr	r1, [r4, #16]
	bl	write_out
	b	.L7
.L17:
	mov	r1, r4
	mov	r0, r5
	ldr	r2, .L21+44
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	net_error
.L19:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	pnet_query_timeout
.L20:
	bl	alloc_head_buffer
	str	r0, [r6, #4]
	b	.L8
.L18:
	mov	r1, r4
	mov	r0, r5
	ldr	r2, .L21+48
	b	.L15
.L22:
	.align	2
.L21:
	.word	php_script
	.word	.LC0
	.word	query_stats
	.word	MAX_TARGETS
	.word	Targets
	.word	.LC3
	.word	conn_connecting
	.word	precise_now
	.word	PNETF_IMMEDIATE
	.word	conn_wait_net
	.word	.LC1
	.word	.LC2
	.word	.LC4
	.size	php_worker_run_mc_query_packet, .-php_worker_run_mc_query_packet
	.comm	query_stats,12,4
	.comm	precise_now,8,8
	.comm	php_script,4,4
	.comm	conn_wait_net,4,4
	.comm	conn_connecting,4,4
	.comm	Targets,4,4
	.comm	PNETF_IMMEDIATE,4,4
	.comm	MAX_TARGETS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
