	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CheckConnection
_CheckConnection:                       ## @CheckConnection
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	callq	_ConnectionUp
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	_pset@GOTPCREL(%rip), %r12
	cmpl	$0, 8(%r12)
	je	LBB0_6
## %bb.2:
	movq	_stderr@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_fprintf
	movq	(%r12), %rdi
	callq	_PQreset
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_ConnectionUp
	movl	(%r15), %r15d
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %r14d
	leaq	L_.str.3(%rip), %rdi
	callq	__
	movl	%r15d, %edi
	movq	%rax, %rsi
	callq	_fprintf
	xorl	%eax, %eax
	callq	_SyncVariables
	xorl	%edi, %edi
	callq	_connection_warnings
	movl	%r14d, %ebx
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	%r15d, %edi
	movq	%rax, %rsi
	callq	_fprintf
	movq	(%r12), %rdi
	callq	_PQfinish
	movq	$0, (%r12)
	xorl	%eax, %eax
	callq	_ResetCancelConn
	xorl	%eax, %eax
	callq	_UnsyncVariables
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_pg_log_fatal
	movq	_EXIT_BADCONN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_pset,16,3                      ## @pset
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"connection to server was lost"

	.comm	_EXIT_BADCONN,4,2               ## @EXIT_BADCONN
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"The connection to the server was lost. Attempting reset: "

L_.str.2:                               ## @.str.2
	.asciz	"Failed.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Succeeded.\n"

	.no_dead_strip	_CheckConnection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CheckConnection
_CheckConnection:                       ; @CheckConnection
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	bl	_ConnectionUp
	mov	x19, x0
	cbnz	w0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x21, _pset@GOTPAGE
Lloh1:
	ldr	x21, [x21, _pset@GOTPAGEOFF]
	ldr	w8, [x21, #8]
	cbz	w8, LBB0_6
; %bb.2:
Lloh2:
	adrp	x20, _stderr@GOTPAGE
Lloh3:
	ldr	x20, [x20, _stderr@GOTPAGEOFF]
	ldr	w19, [x20]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	mov	x1, x0
	mov	x0, x19
	bl	_fprintf
	ldr	x0, [x21]
	bl	_PQreset
	bl	_ConnectionUp
	mov	x19, x0
	ldr	w20, [x20]
	cbz	w0, LBB0_4
; %bb.3:
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	__
	mov	x1, x0
	mov	x0, x20
	bl	_fprintf
	bl	_SyncVariables
	mov	w0, #0
	bl	_connection_warnings
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	mov	x1, x0
	mov	x0, x20
	bl	_fprintf
	ldr	x0, [x21]
	bl	_PQfinish
	str	xzr, [x21]
	bl	_ResetCancelConn
	bl	_UnsyncVariables
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pg_log_fatal
Lloh12:
	adrp	x8, _EXIT_BADCONN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EXIT_BADCONN@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_pset,16,3                      ; @pset
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"connection to server was lost"

	.comm	_EXIT_BADCONN,4,2               ; @EXIT_BADCONN
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"The connection to the server was lost. Attempting reset: "

l_.str.2:                               ; @.str.2
	.asciz	"Failed.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Succeeded.\n"

	.no_dead_strip	_CheckConnection
.subsections_via_symbols
