	.file	"extr_rrdpush.c_rrdpush_sender_thread_cleanup_callback.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"STREAM %s [send]: sending thread cleans up..."
	.align 8
.LC1:
	.string	"STREAM %s [send]: sending thread detaches itself."
	.align 8
.LC2:
	.string	"STREAM %s [send]: sending thread now exits."
	.text
	.p2align 4
	.type	rrdpush_sender_thread_cleanup_callback, @function
rrdpush_sender_thread_cleanup_callback:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	call	rrdpush_buffer_lock@PLT
	mov	rdi, rbp
	call	rrdhost_wrlock@PLT
	mov	esi, DWORD PTR 8[rbp]
	lea	rdi, .LC0[rip]
	call	info@PLT
	mov	rdi, rbp
	call	rrdpush_sender_thread_close_socket@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR PIPE_READ[rip]
	mov	edi, DWORD PTR [rax+rdx*4]
	cmp	edi, -1
	je	.L2
	call	close@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR PIPE_READ[rip]
	mov	DWORD PTR [rax+rdx*4], -1
.L2:
	mov	rdx, QWORD PTR PIPE_WRITE[rip]
	mov	edi, DWORD PTR [rax+rdx*4]
	cmp	edi, -1
	je	.L3
	call	close@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR PIPE_WRITE[rip]
	mov	DWORD PTR [rax+rdx*4], -1
.L3:
	mov	rdi, QWORD PTR 32[rbp]
	call	buffer_free@PLT
	mov	eax, DWORD PTR 24[rbp]
	mov	QWORD PTR 32[rbp], 0
	test	eax, eax
	je	.L13
.L4:
	mov	QWORD PTR 16[rbp], 0
	mov	esi, DWORD PTR 8[rbp]
	lea	rdi, .LC2[rip]
	call	info@PLT
	mov	rdi, rbp
	call	rrdhost_unlock@PLT
	mov	rdi, rbp
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	rrdpush_buffer_unlock@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	esi, DWORD PTR 8[rbp]
	lea	rdi, .LC1[rip]
	call	info@PLT
	xor	eax, eax
	call	netdata_thread_self@PLT
	mov	edi, eax
	call	netdata_thread_detach@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	rrdpush_sender_thread_cleanup_callback, .-rrdpush_sender_thread_cleanup_callback
	.comm	PIPE_WRITE,8,8
	.comm	PIPE_READ,8,8
	.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_rrdpush.c_rrdpush_sender_thread_cleanup_callback.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"STREAM %s [send]: sending thread cleans up...\000"
	.align	2
.LC1:
	.ascii	"STREAM %s [send]: sending thread detaches itself.\000"
	.align	2
.LC2:
	.ascii	"STREAM %s [send]: sending thread now exits.\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rrdpush_sender_thread_cleanup_callback, %function
rrdpush_sender_thread_cleanup_callback:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	rrdpush_buffer_lock
	mov	r0, r4
	bl	rrdhost_wrlock
	ldr	r5, .L14
	ldr	r1, [r4, #4]
	ldr	r0, .L14+4
	bl	info
	mov	r0, r4
	bl	rrdpush_sender_thread_close_socket
	ldr	r3, [r4]
	ldr	r2, [r5]
	ldr	r0, [r3, r2, lsl #2]
	cmn	r0, #1
	beq	.L2
	bl	close
	mvn	r1, #0
	ldr	r2, [r5]
	ldr	r3, [r4]
	str	r1, [r3, r2, lsl #2]
.L2:
	ldr	r5, .L14+8
	ldr	r2, [r5]
	ldr	r0, [r3, r2, lsl #2]
	cmn	r0, #1
	beq	.L3
	bl	close
	mvn	r1, #0
	ldr	r2, [r5]
	ldr	r3, [r4]
	str	r1, [r3, r2, lsl #2]
.L3:
	ldr	r0, [r4, #16]
	bl	buffer_free
	mov	r2, #0
	ldr	r3, [r4, #12]
	str	r2, [r4, #16]
	cmp	r3, r2
	beq	.L13
.L4:
	mov	r3, #0
	ldr	r1, [r4, #4]
	str	r3, [r4, #8]
	ldr	r0, .L14+12
	bl	info
	mov	r0, r4
	bl	rrdhost_unlock
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	b	rrdpush_buffer_unlock
.L13:
	ldr	r1, [r4, #4]
	ldr	r0, .L14+16
	bl	info
	bl	netdata_thread_self
	bl	netdata_thread_detach
	b	.L4
.L15:
	.align	2
.L14:
	.word	PIPE_READ
	.word	.LC0
	.word	PIPE_WRITE
	.word	.LC2
	.word	.LC1
	.size	rrdpush_sender_thread_cleanup_callback, .-rrdpush_sender_thread_cleanup_callback
	.comm	PIPE_WRITE,4,4
	.comm	PIPE_READ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
