	.file	"extr_maintenanced.c_InitializeMaintenanceDaemonBackend.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"ran out of database slots"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Citus Maintenance Daemon: %u/%u"
	.section	.rodata.str1.1
.LC2:
	.string	"citus"
.LC3:
	.string	"CitusMaintenanceDaemonMain"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"could not start maintenance background worker"
	.align 8
.LC5:
	.string	"Increasing max_worker_processes might help."
	.text
	.p2align 4
	.globl	InitializeMaintenanceDaemonBackend
	.type	InitializeMaintenanceDaemonBackend, @function
InitializeMaintenanceDaemonBackend:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 88
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	call	CitusExtensionOwner@PLT
	mov	esi, DWORD PTR LW_EXCLUSIVE[rip]
	mov	rdi, QWORD PTR MaintenanceDaemonControl[rip]
	mov	DWORD PTR 12[rsp], eax
	call	LWLockAcquire@PLT
	mov	edx, DWORD PTR HASH_ENTER_NULL[rip]
	mov	edi, DWORD PTR MaintenanceDaemonDBHash[rip]
	lea	rcx, 16[rsp]
	lea	rsi, MyDatabaseId[rip]
	call	hash_search@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L16
.L2:
	mov	eax, DWORD PTR 16[rsp]
	test	eax, eax
	je	.L3
	mov	edi, DWORD PTR [rbx]
	test	edi, edi
	jne	.L4
.L3:
	mov	eax, DWORD PTR 12[rsp]
	lea	rbp, 32[rsp]
	xor	esi, esi
	mov	edx, 36
	mov	QWORD PTR 24[rsp], 0
	mov	rdi, rbp
	mov	DWORD PTR 4[rbx], eax
	mov	DWORD PTR 20[rsp], 0
	call	memset@PLT
	mov	r8d, DWORD PTR 12[rsp]
	mov	ecx, DWORD PTR MyDatabaseId[rip]
	lea	rdx, .LC1[rip]
	mov	esi, DWORD PTR BGW_MAXLEN[rip]
	mov	edi, DWORD PTR 64[rsp]
	call	snprintf@PLT
	mov	eax, DWORD PTR BGWORKER_SHMEM_ACCESS[rip]
	or	eax, DWORD PTR BGWORKER_BACKEND_DATABASE_CONNECTION[rip]
	lea	rsi, .LC2[rip]
	mov	DWORD PTR 32[rsp], eax
	mov	edi, DWORD PTR 56[rsp]
	mov	eax, DWORD PTR BgWorkerStart_ConsistentState[rip]
	mov	DWORD PTR 36[rsp], 5
	mov	DWORD PTR 60[rsp], eax
	call	sprintf@PLT
	mov	edi, DWORD PTR 52[rsp]
	lea	rsi, .LC3[rip]
	call	sprintf@PLT
	mov	edi, DWORD PTR MyDatabaseId[rip]
	call	ObjectIdGetDatum@PLT
	mov	edi, DWORD PTR 44[rsp]
	lea	rsi, 12[rsp]
	mov	edx, 4
	mov	DWORD PTR 48[rsp], eax
	call	memcpy@PLT
	mov	eax, DWORD PTR MyProcPid[rip]
	lea	rsi, 24[rsp]
	mov	rdi, rbp
	mov	DWORD PTR 40[rsp], eax
	call	RegisterDynamicBackgroundWorker@PLT
	test	eax, eax
	je	.L17
.L5:
	mov	DWORD PTR [rbx], 1
	mov	rdi, QWORD PTR MaintenanceDaemonControl[rip]
	mov	QWORD PTR 24[rbx], 0
	mov	DWORD PTR 8[rbx], 0
	call	LWLockRelease@PLT
	mov	rdi, QWORD PTR 24[rsp]
	lea	rsi, 20[rsp]
	call	WaitForBackgroundWorkerStartup@PLT
.L1:
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L18
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	call	Assert@PLT
	mov	eax, DWORD PTR 12[rsp]
	cmp	DWORD PTR 4[rbx], eax
	je	.L8
	mov	rdi, QWORD PTR 16[rbx]
	mov	DWORD PTR 4[rbx], eax
	test	rdi, rdi
	jne	.L19
.L8:
	mov	rdi, QWORD PTR MaintenanceDaemonControl[rip]
	call	LWLockRelease@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	lea	rdi, .LC0[rip]
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L17:
	lea	rdi, .LC4[rip]
	call	errmsg@PLT
	lea	rdi, .LC5[rip]
	call	errhint@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L19:
	call	SetLatch@PLT
	jmp	.L8
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	InitializeMaintenanceDaemonBackend, .-InitializeMaintenanceDaemonBackend
	.comm	MyProcPid,4,4
	.comm	MyDatabaseId,4,4
	.comm	MaintenanceDaemonDBHash,4,4
	.comm	MaintenanceDaemonControl,8,8
	.comm	LW_EXCLUSIVE,4,4
	.comm	HASH_ENTER_NULL,4,4
	.comm	ERROR,4,4
	.comm	BgWorkerStart_ConsistentState,4,4
	.comm	BGW_MAXLEN,4,4
	.comm	BGWORKER_SHMEM_ACCESS,4,4
	.comm	BGWORKER_BACKEND_DATABASE_CONNECTION,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_maintenanced.c_InitializeMaintenanceDaemonBackend.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ran out of database slots\000"
	.align	2
.LC1:
	.ascii	"Citus Maintenance Daemon: %u/%u\000"
	.align	2
.LC2:
	.ascii	"citus\000"
	.align	2
.LC3:
	.ascii	"CitusMaintenanceDaemonMain\000"
	.align	2
.LC4:
	.ascii	"could not start maintenance background worker\000"
	.align	2
.LC5:
	.ascii	"Increasing max_worker_processes might help.\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	InitializeMaintenanceDaemonBackend
	.syntax unified
	.arm
	.fpu softvfp
	.type	InitializeMaintenanceDaemonBackend, %function
InitializeMaintenanceDaemonBackend:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L23
	sub	sp, sp, #64
	ldr	r3, [r3]
	str	r3, [sp, #60]
	mov	r3,#0
	bl	CitusExtensionOwner
	mov	r3, r0
	ldr	r2, .L23+4
	ldr	r6, .L23+8
	ldr	r1, [r2]
	ldr	r0, [r6]
	str	r3, [sp, #8]
	bl	LWLockAcquire
	ldr	r3, .L23+12
	ldr	r2, .L23+16
	ldr	r0, [r3]
	ldr	r2, [r2]
	ldr	r1, .L23+20
	add	r3, sp, #12
	bl	hash_search
	subs	r4, r0, #0
	beq	.L19
.L2:
	ldr	r3, [sp, #12]
	cmp	r3, #0
	beq	.L3
	ldr	r0, [r4]
	cmp	r0, #0
	bne	.L4
.L3:
	mov	r5, #0
	ldr	r8, [sp, #8]
	mov	r1, r5
	mov	r2, #36
	str	r8, [r4, #4]
	add	r0, sp, #24
	ldr	r7, .L23+20
	str	r5, [sp, #16]
	str	r5, [sp, #20]
	bl	memset
	ldr	r2, .L23+24
	str	r8, [sp]
	ldr	r1, [r2]
	ldr	r3, [r7]
	ldr	r2, .L23+28
	mov	r0, r5
	bl	snprintf
	mov	r2, #5
	ldr	r3, .L23+32
	ldr	r1, .L23+36
	ldr	r0, .L23+40
	ldr	r1, [r1]
	ldr	r3, [r3]
	ldr	ip, [r0]
	orr	r3, r3, r1
	ldr	r0, [sp, #48]
	ldr	r1, .L23+44
	str	ip, [sp, #52]
	str	r3, [sp, #24]
	str	r2, [sp, #28]
	bl	sprintf
	ldr	r1, .L23+48
	ldr	r0, [sp, #44]
	bl	sprintf
	ldr	r0, [r7]
	bl	ObjectIdGetDatum
	mov	r3, r0
	mov	r2, #4
	add	r1, sp, #8
	ldr	r0, [sp, #36]
	str	r3, [sp, #40]
	bl	memcpy
	ldr	r3, .L23+52
	add	r0, sp, #24
	ldr	r3, [r3]
	add	r1, sp, #16
	str	r3, [sp, #32]
	bl	RegisterDynamicBackgroundWorker
	cmp	r0, r5
	beq	.L20
.L5:
	mov	r3, #0
	mov	r2, #1
	ldr	r0, [r6]
	str	r3, [r4, #16]
	str	r2, [r4]
	str	r3, [r4, #8]
	bl	LWLockRelease
	ldr	r0, [sp, #16]
	add	r1, sp, #20
	bl	WaitForBackgroundWorkerStartup
.L1:
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [sp, #60]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L21
	add	sp, sp, #64
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	bl	Assert
	ldr	r3, [sp, #8]
	ldr	r2, [r4, #4]
	cmp	r2, r3
	beq	.L8
	ldr	r0, [r4, #12]
	str	r3, [r4, #4]
	cmp	r0, #0
	bne	.L22
.L8:
	ldr	r0, [r6]
	bl	LWLockRelease
	b	.L1
.L19:
	ldr	r3, .L23+56
	ldr	r0, .L23+60
	ldr	r5, [r3]
	bl	errmsg
	mov	r1, r0
	mov	r0, r5
	bl	ereport
	b	.L2
.L20:
	ldr	r3, .L23+56
	ldr	r0, .L23+64
	ldr	r5, [r3]
	bl	errmsg
	ldr	r0, .L23+68
	bl	errhint
	mov	r1, r0
	mov	r0, r5
	bl	ereport
	b	.L5
.L22:
	bl	SetLatch
	b	.L8
.L21:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	.LC6
	.word	LW_EXCLUSIVE
	.word	MaintenanceDaemonControl
	.word	MaintenanceDaemonDBHash
	.word	HASH_ENTER_NULL
	.word	MyDatabaseId
	.word	BGW_MAXLEN
	.word	.LC1
	.word	BGWORKER_SHMEM_ACCESS
	.word	BGWORKER_BACKEND_DATABASE_CONNECTION
	.word	BgWorkerStart_ConsistentState
	.word	.LC2
	.word	.LC3
	.word	MyProcPid
	.word	ERROR
	.word	.LC0
	.word	.LC4
	.word	.LC5
	.size	InitializeMaintenanceDaemonBackend, .-InitializeMaintenanceDaemonBackend
	.comm	MyProcPid,4,4
	.comm	MyDatabaseId,4,4
	.comm	MaintenanceDaemonDBHash,4,4
	.comm	MaintenanceDaemonControl,4,4
	.comm	LW_EXCLUSIVE,4,4
	.comm	HASH_ENTER_NULL,4,4
	.comm	ERROR,4,4
	.comm	BgWorkerStart_ConsistentState,4,4
	.comm	BGW_MAXLEN,4,4
	.comm	BGWORKER_SHMEM_ACCESS,4,4
	.comm	BGWORKER_BACKEND_DATABASE_CONNECTION,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
