	.file	"extr_replication.c_syncCommand.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"-NOMASTERLINK Can't SYNC while not connected with my master\r\n"
	.align 8
.LC1:
	.string	"SYNC and PSYNC are invalid with pending output"
	.align 8
.LC2:
	.string	"Replica %s asks for synchronization"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"psync"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"Waiting for end of BGSAVE for SYNC"
	.align 8
.LC5:
	.string	"Can't attach the replica to the current BGSAVE. Waiting for next BGSAVE for SYNC"
	.align 8
.LC6:
	.string	"Current BGSAVE has socket target. Waiting for next BGSAVE for SYNC"
	.align 8
.LC7:
	.string	"Delay next BGSAVE for diskless SYNC"
	.align 8
.LC8:
	.string	"No BGSAVE in progress, but another BG operation is active. BGSAVE for replication delayed"
	.text
	.p2align 4
	.globl	syncCommand
	.type	syncCommand, @function
syncCommand:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rdi]
	test	DWORD PTR CLIENT_SLAVE[rip], eax
	jne	.L1
	cmp	QWORD PTR server[rip+80], 0
	mov	rbp, rdi
	je	.L4
	mov	rax, QWORD PTR REPL_STATE_CONNECTED[rip]
	cmp	QWORD PTR server[rip], rax
	jne	.L28
.L4:
	mov	rdi, rbp
	call	clientHasPendingReplies@PLT
	test	rax, rax
	jne	.L29
	mov	rdi, rbp
	call	replicationGetSlaveName@PLT
	mov	edi, DWORD PTR LL_NOTICE[rip]
	lea	rsi, .LC2[rip]
	mov	edx, eax
	xor	eax, eax
	call	serverLog@PLT
	mov	rax, QWORD PTR 32[rbp]
	lea	rsi, .LC3[rip]
	mov	rax, QWORD PTR [rax]
	mov	rdi, QWORD PTR [rax]
	call	strcasecmp@PLT
	test	eax, eax
	je	.L30
	mov	eax, DWORD PTR CLIENT_PRE_PSYNC[rip]
	or	DWORD PTR 0[rbp], eax
.L8:
	mov	rax, QWORD PTR SLAVE_STATE_WAIT_BGSAVE_START[rip]
	add	DWORD PTR server[rip+64], 1
	cmp	QWORD PTR server[rip+56], 0
	mov	QWORD PTR 8[rbp], rax
	jne	.L31
.L9:
	mov	eax, DWORD PTR CLIENT_SLAVE[rip]
	or	DWORD PTR 0[rbp], eax
	mov	rsi, rbp
	mov	DWORD PTR 16[rbp], -1
	mov	edi, DWORD PTR server[rip+40]
	call	listAddNodeTail@PLT
	mov	edi, DWORD PTR server[rip+40]
	call	listLength@PLT
	cmp	eax, 1
	je	.L32
.L10:
	cmp	DWORD PTR server[rip+8], -1
	je	.L11
	mov	rax, QWORD PTR server[rip+16]
	cmp	rax, QWORD PTR RDB_CHILD_TYPE_DISK[rip]
	je	.L33
	cmp	rax, QWORD PTR RDB_CHILD_TYPE_SOCKET[rip]
	je	.L34
.L11:
	cmp	QWORD PTR server[rip+32], 0
	je	.L18
	mov	eax, DWORD PTR 20[rbp]
	test	DWORD PTR SLAVE_CAPA_EOF[rip], eax
	je	.L18
	cmp	QWORD PTR server[rip+24], 0
	jne	.L35
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L36
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L29:
	.cfi_restore_state
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	addReplyError@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L28:
	lea	rdi, .LC0[rip]
	call	sdsnew@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	addReplySds@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	xor	eax, eax
	call	hasActiveChildProcess@PLT
	test	eax, eax
	jne	.L20
	mov	edi, DWORD PTR 20[rbp]
	call	startBgsaveForReplication@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L30:
	mov	rdi, rbp
	call	masterTryPartialResynchronization@PLT
	cmp	rax, QWORD PTR C_OK[rip]
	je	.L37
	mov	rax, QWORD PTR 32[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rax, QWORD PTR [rax]
	cmp	BYTE PTR [rax], 63
	je	.L8
	add	DWORD PTR server[rip+68], 1
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L32:
	cmp	QWORD PTR server[rip+48], 0
	jne	.L10
	xor	eax, eax
	call	changeReplicationId@PLT
	xor	eax, eax
	call	clearReplicationId2@PLT
	xor	eax, eax
	call	createReplicationBacklog@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L31:
	mov	edi, DWORD PTR 28[rbp]
	call	connDisableTcpNoDelay@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L20:
	mov	edi, DWORD PTR LL_NOTICE[rip]
	lea	rsi, .LC8[rip]
	xor	eax, eax
	call	serverLog@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L33:
	lea	r12, 4[rsp]
	mov	edi, DWORD PTR server[rip+40]
	mov	rsi, r12
	call	listRewind@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rbx, QWORD PTR [rax]
	mov	rax, QWORD PTR SLAVE_STATE_WAIT_BGSAVE_END[rip]
	cmp	QWORD PTR 8[rbx], rax
	je	.L14
.L13:
	mov	rdi, r12
	call	listNext@PLT
	test	rax, rax
	jne	.L15
.L16:
	mov	edi, DWORD PTR LL_NOTICE[rip]
	lea	rsi, .LC5[rip]
	xor	eax, eax
	call	serverLog@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L34:
	mov	edi, DWORD PTR LL_NOTICE[rip]
	lea	rsi, .LC6[rip]
	xor	eax, eax
	call	serverLog@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L35:
	mov	edi, DWORD PTR LL_NOTICE[rip]
	lea	rsi, .LC7[rip]
	xor	eax, eax
	call	serverLog@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	eax, DWORD PTR 20[rbx]
	mov	edx, DWORD PTR 20[rbp]
	and	edx, eax
	cmp	eax, edx
	jne	.L16
	mov	rsi, rbx
	mov	rdi, rbp
	call	copyClientOutputBuffer@PLT
	mov	esi, DWORD PTR 24[rbx]
	mov	rdi, rbp
	call	replicationSetupSlaveForFullResync@PLT
	mov	edi, DWORD PTR LL_NOTICE[rip]
	lea	rsi, .LC4[rip]
	xor	eax, eax
	call	serverLog@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L37:
	add	DWORD PTR server[rip+72], 1
	jmp	.L1
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	syncCommand, .-syncCommand
	.comm	server,88,32
	.comm	SLAVE_STATE_WAIT_BGSAVE_START,8,8
	.comm	SLAVE_STATE_WAIT_BGSAVE_END,8,8
	.comm	SLAVE_CAPA_EOF,4,4
	.comm	REPL_STATE_CONNECTED,8,8
	.comm	RDB_CHILD_TYPE_SOCKET,8,8
	.comm	RDB_CHILD_TYPE_DISK,8,8
	.comm	LL_NOTICE,4,4
	.comm	C_OK,8,8
	.comm	CLIENT_SLAVE,4,4
	.comm	CLIENT_PRE_PSYNC,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_replication.c_syncCommand.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"-NOMASTERLINK Can't SYNC while not connected with m"
	.ascii	"y master\015\012\000"
	.align	2
.LC1:
	.ascii	"SYNC and PSYNC are invalid with pending output\000"
	.align	2
.LC2:
	.ascii	"Replica %s asks for synchronization\000"
	.align	2
.LC3:
	.ascii	"psync\000"
	.align	2
.LC4:
	.ascii	"Waiting for end of BGSAVE for SYNC\000"
	.align	2
.LC5:
	.ascii	"Can't attach the replica to the current BGSAVE. Wai"
	.ascii	"ting for next BGSAVE for SYNC\000"
	.align	2
.LC6:
	.ascii	"Current BGSAVE has socket target. Waiting for next "
	.ascii	"BGSAVE for SYNC\000"
	.align	2
.LC7:
	.ascii	"Delay next BGSAVE for diskless SYNC\000"
	.align	2
.LC8:
	.ascii	"No BGSAVE in progress, but another BG operation is "
	.ascii	"active. BGSAVE for replication delayed\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	syncCommand
	.syntax unified
	.arm
	.fpu softvfp
	.type	syncCommand, %function
syncCommand:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, .L56
	ldr	r2, [r0]
	ldr	r3, [r6]
	ldr	r1, .L56+4
	sub	sp, sp, #8
	tst	r2, r3
	ldr	r1, [r1]
	str	r1, [sp, #4]
	mov	r1,#0
	bne	.L1
	ldr	r5, .L56+8
	mov	r4, r0
	ldr	r3, [r5, #44]
	cmp	r3, #0
	beq	.L4
	ldr	r3, .L56+12
	ldr	r2, [r5]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L46
.L4:
	mov	r0, r4
	bl	clientHasPendingReplies
	cmp	r0, #0
	bne	.L47
	ldr	r7, .L56+16
	mov	r0, r4
	ldr	r8, [r7]
	bl	replicationGetSlaveName
	ldr	r1, .L56+20
	mov	r2, r0
	mov	r0, r8
	bl	serverLog
	ldr	r3, [r4, #24]
	ldr	r1, .L56+24
	ldr	r3, [r3]
	ldr	r0, [r3]
	bl	strcasecmp
	cmp	r0, #0
	beq	.L48
	ldr	r2, .L56+28
	ldr	r3, [r4]
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r4]
.L8:
	ldr	r2, .L56+32
	ldr	r3, [r5, #32]
	ldr	r1, [r5, #28]
	ldr	r2, [r2]
	add	r3, r3, #1
	cmp	r1, #0
	str	r3, [r5, #32]
	str	r2, [r4, #4]
	bne	.L49
.L9:
	mvn	r1, #0
	ldr	r2, [r6]
	ldr	r3, [r4]
	str	r1, [r4, #8]
	orr	r3, r3, r2
	mov	r1, r4
	str	r3, [r4]
	ldr	r0, [r5, #20]
	bl	listAddNodeTail
	ldr	r0, [r5, #20]
	bl	listLength
	cmp	r0, #1
	beq	.L50
.L10:
	ldr	r3, [r5, #4]
	cmn	r3, #1
	beq	.L11
	ldr	r2, .L56+36
	ldr	r3, [r5, #8]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L51
	ldr	r2, .L56+40
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L52
.L11:
	ldr	r3, [r5, #16]
	cmp	r3, #0
	beq	.L18
	ldr	r3, .L56+44
	ldr	r2, [r4, #12]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L18
	ldr	r3, [r5, #12]
	cmp	r3, #0
	bne	.L53
.L1:
	ldr	r3, .L56+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L54
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L47:
	mov	r0, r4
	ldr	r1, .L56+48
	bl	addReplyError
	b	.L1
.L46:
	ldr	r0, .L56+52
	bl	sdsnew
	mov	r1, r0
	mov	r0, r4
	bl	addReplySds
	b	.L1
.L18:
	bl	hasActiveChildProcess
	cmp	r0, #0
	bne	.L20
	ldr	r0, [r4, #12]
	bl	startBgsaveForReplication
	b	.L1
.L48:
	mov	r0, r4
	bl	masterTryPartialResynchronization
	ldr	r3, .L56+56
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L55
	ldr	r3, [r4, #24]
	ldr	r3, [r3, #4]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #63
	ldrne	r3, [r5, #36]
	addne	r3, r3, #1
	strne	r3, [r5, #36]
	b	.L8
.L50:
	ldr	r3, [r5, #24]
	cmp	r3, #0
	bne	.L10
	bl	changeReplicationId
	bl	clearReplicationId2
	bl	createReplicationBacklog
	b	.L10
.L49:
	ldr	r0, [r4, #20]
	bl	connDisableTcpNoDelay
	b	.L9
.L20:
	ldr	r0, [r7]
	ldr	r1, .L56+60
	bl	serverLog
	b	.L1
.L51:
	mov	r1, sp
	ldr	r0, [r5, #20]
	bl	listRewind
	ldr	r6, .L56+64
	b	.L13
.L15:
	ldr	r5, [r0]
	ldr	r3, [r6]
	ldr	r2, [r5, #4]
	cmp	r2, r3
	beq	.L14
.L13:
	mov	r0, sp
	bl	listNext
	cmp	r0, #0
	bne	.L15
.L16:
	ldr	r0, [r7]
	ldr	r1, .L56+68
	bl	serverLog
	b	.L1
.L52:
	ldr	r0, [r7]
	ldr	r1, .L56+72
	bl	serverLog
	b	.L1
.L53:
	ldr	r0, [r7]
	ldr	r1, .L56+76
	bl	serverLog
	b	.L1
.L14:
	ldr	r3, [r5, #12]
	ldr	r2, [r4, #12]
	bics	r3, r3, r2
	bne	.L16
	mov	r1, r5
	mov	r0, r4
	bl	copyClientOutputBuffer
	ldr	r1, [r5, #16]
	mov	r0, r4
	bl	replicationSetupSlaveForFullResync
	ldr	r0, [r7]
	ldr	r1, .L56+80
	bl	serverLog
	b	.L1
.L55:
	ldr	r3, [r5, #40]
	add	r3, r3, #1
	str	r3, [r5, #40]
	b	.L1
.L54:
	bl	__stack_chk_fail
.L57:
	.align	2
.L56:
	.word	CLIENT_SLAVE
	.word	.LC9
	.word	server
	.word	REPL_STATE_CONNECTED
	.word	LL_NOTICE
	.word	.LC2
	.word	.LC3
	.word	CLIENT_PRE_PSYNC
	.word	SLAVE_STATE_WAIT_BGSAVE_START
	.word	RDB_CHILD_TYPE_DISK
	.word	RDB_CHILD_TYPE_SOCKET
	.word	SLAVE_CAPA_EOF
	.word	.LC1
	.word	.LC0
	.word	C_OK
	.word	.LC8
	.word	SLAVE_STATE_WAIT_BGSAVE_END
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC4
	.size	syncCommand, .-syncCommand
	.comm	server,48,4
	.comm	SLAVE_STATE_WAIT_BGSAVE_START,4,4
	.comm	SLAVE_STATE_WAIT_BGSAVE_END,4,4
	.comm	SLAVE_CAPA_EOF,4,4
	.comm	REPL_STATE_CONNECTED,4,4
	.comm	RDB_CHILD_TYPE_SOCKET,4,4
	.comm	RDB_CHILD_TYPE_DISK,4,4
	.comm	LL_NOTICE,4,4
	.comm	C_OK,4,4
	.comm	CLIENT_SLAVE,4,4
	.comm	CLIENT_PRE_PSYNC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
