	.file	"extr_cluster.c_clusterBeforeSleep.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	clusterBeforeSleep
	.type	clusterBeforeSleep, @function
clusterBeforeSleep:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	mov	rax, QWORD PTR server[rip]
	mov	edi, DWORD PTR [rax]
	test	DWORD PTR CLUSTER_TODO_HANDLE_FAILOVER[rip], edi
	jne	.L16
	test	DWORD PTR CLUSTER_TODO_UPDATE_STATE[rip], edi
	jne	.L17
.L3:
	test	DWORD PTR CLUSTER_TODO_SAVE_CONFIG[rip], edi
	jne	.L18
.L4:
	mov	DWORD PTR [rax], 0
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	xor	eax, eax
	call	clusterHandleSlaveFailover@PLT
	mov	rax, QWORD PTR server[rip]
	mov	edi, DWORD PTR [rax]
	test	DWORD PTR CLUSTER_TODO_UPDATE_STATE[rip], edi
	je	.L3
.L17:
	xor	eax, eax
	call	clusterUpdateState@PLT
	mov	rax, QWORD PTR server[rip]
	mov	edi, DWORD PTR [rax]
	test	DWORD PTR CLUSTER_TODO_SAVE_CONFIG[rip], edi
	je	.L4
.L18:
	and	edi, DWORD PTR CLUSTER_TODO_FSYNC_CONFIG[rip]
	call	clusterSaveConfigOrDie@PLT
	mov	rax, QWORD PTR server[rip]
	mov	DWORD PTR [rax], 0
	add	rsp, 8
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	clusterBeforeSleep, .-clusterBeforeSleep
	.comm	server,8,8
	.comm	CLUSTER_TODO_UPDATE_STATE,4,4
	.comm	CLUSTER_TODO_SAVE_CONFIG,4,4
	.comm	CLUSTER_TODO_HANDLE_FAILOVER,4,4
	.comm	CLUSTER_TODO_FSYNC_CONFIG,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_cluster.c_clusterBeforeSleep.c"
	.text
	.align	2
	.global	clusterBeforeSleep
	.syntax unified
	.arm
	.fpu softvfp
	.type	clusterBeforeSleep, %function
clusterBeforeSleep:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	ldr	r4, .L19
	ldr	r3, .L19+4
	ldr	r2, [r4]
	ldr	r1, [r3]
	ldr	r3, [r2]
	tst	r3, r1
	bne	.L16
	ldr	r1, .L19+8
	ldr	r1, [r1]
	tst	r3, r1
	bne	.L17
.L3:
	ldr	r1, .L19+12
	ldr	r1, [r1]
	tst	r3, r1
	bne	.L18
.L4:
	mov	r3, #0
	str	r3, [r2]
	pop	{r4, pc}
.L16:
	bl	clusterHandleSlaveFailover
	ldr	r2, [r4]
	ldr	r1, .L19+8
	ldr	r3, [r2]
	ldr	r1, [r1]
	tst	r3, r1
	beq	.L3
.L17:
	bl	clusterUpdateState
	ldr	r2, [r4]
	ldr	r1, .L19+12
	ldr	r3, [r2]
	ldr	r1, [r1]
	tst	r3, r1
	beq	.L4
.L18:
	ldr	r2, .L19+16
	ldr	r0, [r2]
	and	r0, r0, r3
	bl	clusterSaveConfigOrDie
	ldr	r2, [r4]
	b	.L4
.L20:
	.align	2
.L19:
	.word	server
	.word	CLUSTER_TODO_HANDLE_FAILOVER
	.word	CLUSTER_TODO_UPDATE_STATE
	.word	CLUSTER_TODO_SAVE_CONFIG
	.word	CLUSTER_TODO_FSYNC_CONFIG
	.size	clusterBeforeSleep, .-clusterBeforeSleep
	.comm	server,4,4
	.comm	CLUSTER_TODO_UPDATE_STATE,4,4
	.comm	CLUSTER_TODO_SAVE_CONFIG,4,4
	.comm	CLUSTER_TODO_HANDLE_FAILOVER,4,4
	.comm	CLUSTER_TODO_FSYNC_CONFIG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
