	.file	"extr_hastd.c_resource_reload.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"cmd"
.LC1:
	.string	"remoteaddr"
.LC2:
	.string	"sourceaddr"
.LC3:
	.string	"replication"
.LC4:
	.string	"checksum"
.LC5:
	.string	"compression"
.LC6:
	.string	"timeout"
.LC7:
	.string	"exec"
.LC8:
	.string	"metaflush"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC9:
	.string	"Unable to allocate header for reload message."
	.section	.rodata.str1.1
.LC10:
	.string	"Unable to send reload message"
	.section	.rodata.str1.8
	.align 8
.LC11:
	.string	"Unable to receive reload reply"
	.section	.rodata.str1.1
.LC12:
	.string	"error"
.LC13:
	.string	"Reload failed"
	.text
	.p2align 4
	.type	resource_reload, @function
resource_reload:
.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
	mov	rbx, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR HAST_ROLE_PRIMARY[rip]
	cmp	QWORD PTR [rdi], rax
	sete	dil
	movzx	edi, dil
	call	PJDLOG_ASSERT@PLT
	xor	eax, eax
	call	nv_alloc@PLT
	mov	esi, DWORD PTR CONTROL_RELOAD[rip]
	lea	rdx, .LC0[rip]
	mov	rdi, rax
	mov	rbp, rax
	call	nv_add_uint8@PLT
	mov	esi, DWORD PTR 68[rbx]
	lea	rdx, .LC1[rip]
	mov	rdi, rbp
	call	nv_add_string@PLT
	mov	esi, DWORD PTR 64[rbx]
	lea	rdx, .LC2[rip]
	mov	rdi, rbp
	call	nv_add_string@PLT
	mov	esi, DWORD PTR 56[rbx]
	lea	rdx, .LC3[rip]
	mov	rdi, rbp
	call	nv_add_int32@PLT
	mov	esi, DWORD PTR 48[rbx]
	lea	rdx, .LC4[rip]
	mov	rdi, rbp
	call	nv_add_int32@PLT
	mov	esi, DWORD PTR 40[rbx]
	lea	rdx, .LC5[rip]
	mov	rdi, rbp
	call	nv_add_int32@PLT
	mov	esi, DWORD PTR 32[rbx]
	lea	rdx, .LC6[rip]
	mov	rdi, rbp
	call	nv_add_int32@PLT
	mov	esi, DWORD PTR 24[rbx]
	lea	rdx, .LC7[rip]
	mov	rdi, rbp
	call	nv_add_string@PLT
	mov	esi, DWORD PTR 16[rbx]
	mov	rdi, rbp
	lea	rdx, .LC8[rip]
	call	nv_add_int32@PLT
	mov	rdi, rbp
	call	nv_error@PLT
	test	rax, rax
	jne	.L12
	mov	esi, DWORD PTR 8[rbx]
	xor	r8d, r8d
	xor	ecx, ecx
	mov	rdx, rbp
	mov	rdi, rbx
	call	hast_proto_send@PLT
	cmp	eax, -1
	je	.L13
	mov	rdi, rbp
	call	nv_free@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	rsi, rsp
	call	hast_proto_recv_hdr@PLT
	cmp	eax, -1
	je	.L14
	mov	rdi, QWORD PTR [rsp]
	lea	rsi, .LC12[rip]
	call	nv_get_int16@PLT
	mov	rdi, QWORD PTR [rsp]
	mov	r12d, eax
	call	nv_free@PLT
	test	r12d, r12d
	jne	.L15
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	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
.L12:
	.cfi_restore_state
	mov	rdi, rbp
	call	nv_free@PLT
	lea	rdi, .LC9[rip]
	call	pjdlog_error@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edi, DWORD PTR LOG_ERR[rip]
	lea	rsi, .LC11[rip]
	call	pjdlog_errno@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edi, DWORD PTR LOG_ERR[rip]
	lea	rsi, .LC10[rip]
	call	pjdlog_errno@PLT
	mov	rdi, rbp
	call	nv_free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, DWORD PTR LOG_ERR[rip]
	lea	rcx, .LC13[rip]
	mov	edx, r12d
	xor	esi, esi
	call	pjdlog_common@PLT
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	resource_reload, .-resource_reload
	.comm	LOG_ERR,4,4
	.comm	HAST_ROLE_PRIMARY,8,8
	.comm	CONTROL_RELOAD,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_hastd.c_resource_reload.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"cmd\000"
	.align	2
.LC1:
	.ascii	"remoteaddr\000"
	.align	2
.LC2:
	.ascii	"sourceaddr\000"
	.align	2
.LC3:
	.ascii	"replication\000"
	.align	2
.LC4:
	.ascii	"checksum\000"
	.align	2
.LC5:
	.ascii	"compression\000"
	.align	2
.LC6:
	.ascii	"timeout\000"
	.align	2
.LC7:
	.ascii	"exec\000"
	.align	2
.LC8:
	.ascii	"metaflush\000"
	.align	2
.LC9:
	.ascii	"Unable to allocate header for reload message.\000"
	.align	2
.LC10:
	.ascii	"Unable to send reload message\000"
	.align	2
.LC11:
	.ascii	"Unable to receive reload reply\000"
	.align	2
.LC12:
	.ascii	"error\000"
	.align	2
.LC13:
	.ascii	"Reload failed\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	resource_reload, %function
resource_reload:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L17
	push	{r4, r5, r6, lr}
	ldr	r3, [r3]
	mov	r4, r0
	ldr	r0, [r0]
	ldr	r2, .L17+4
	sub	r0, r0, r3
	clz	r0, r0
	sub	sp, sp, #16
	lsr	r0, r0, #5
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	bl	PJDLOG_ASSERT
	bl	nv_alloc
	mov	r5, r0
	ldr	r3, .L17+8
	ldr	r2, .L17+12
	ldr	r1, [r3]
	bl	nv_add_uint8
	ldr	r1, [r4, #36]
	ldr	r2, .L17+16
	mov	r0, r5
	bl	nv_add_string
	ldr	r1, [r4, #32]
	ldr	r2, .L17+20
	mov	r0, r5
	bl	nv_add_string
	ldr	r1, [r4, #28]
	ldr	r2, .L17+24
	mov	r0, r5
	bl	nv_add_int32
	ldr	r1, [r4, #24]
	ldr	r2, .L17+28
	mov	r0, r5
	bl	nv_add_int32
	ldr	r1, [r4, #20]
	ldr	r2, .L17+32
	mov	r0, r5
	bl	nv_add_int32
	ldr	r1, [r4, #16]
	ldr	r2, .L17+36
	mov	r0, r5
	bl	nv_add_int32
	ldr	r1, [r4, #12]
	ldr	r2, .L17+40
	mov	r0, r5
	bl	nv_add_string
	ldr	r1, [r4, #8]
	ldr	r2, .L17+44
	mov	r0, r5
	bl	nv_add_int32
	mov	r0, r5
	bl	nv_error
	subs	r6, r0, #0
	bne	.L12
	str	r6, [sp]
	mov	r3, r6
	mov	r2, r5
	mov	r0, r4
	ldr	r1, [r4, #4]
	bl	hast_proto_send
	cmn	r0, #1
	beq	.L13
	mov	r0, r5
	bl	nv_free
	ldr	r0, [r4, #4]
	add	r1, sp, #8
	bl	hast_proto_recv_hdr
	cmn	r0, #1
	beq	.L14
	ldr	r1, .L17+48
	ldr	r0, [sp, #8]
	bl	nv_get_int16
	mov	r4, r0
	ldr	r0, [sp, #8]
	bl	nv_free
	cmp	r4, #0
	bne	.L15
.L1:
	ldr	r3, .L17+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L12:
	mov	r0, r5
	bl	nv_free
	ldr	r0, .L17+52
	bl	pjdlog_error
	b	.L1
.L14:
	ldr	r3, .L17+56
	ldr	r1, .L17+60
	ldr	r0, [r3]
	bl	pjdlog_errno
	b	.L1
.L13:
	ldr	r3, .L17+56
	ldr	r1, .L17+64
	ldr	r0, [r3]
	bl	pjdlog_errno
	mov	r0, r5
	bl	nv_free
	b	.L1
.L15:
	ldr	r3, .L17+56
	mov	r2, r4
	mov	r1, r6
	ldr	r0, [r3]
	ldr	r3, .L17+68
	bl	pjdlog_common
	b	.L1
.L16:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	HAST_ROLE_PRIMARY
	.word	.LC14
	.word	CONTROL_RELOAD
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC12
	.word	.LC9
	.word	LOG_ERR
	.word	.LC11
	.word	.LC10
	.word	.LC13
	.size	resource_reload, .-resource_reload
	.comm	LOG_ERR,4,4
	.comm	HAST_ROLE_PRIMARY,4,4
	.comm	CONTROL_RELOAD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
