	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_connectToServer                ## -- Begin function connectToServer
	.p2align	4, 0x90
_connectToServer:                       ## @connectToServer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	callq	_get_db_conn
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PQstatus
	movq	_CONNECTION_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.5:
	movq	_ALWAYS_SECURE_SEARCH_PATH_SQL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_executeQueryOrDie
	movl	%eax, %edi
	callq	_PQclear
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movq	_PG_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%edi, %edi
	callq	_PQerrorMessage
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_pg_log
	jmp	LBB0_4
LBB0_2:
	movq	_PG_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_PQerrorMessage
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_pg_log
	movq	%rbx, %rdi
	callq	_PQfinish
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movq	%rax, %rdi
	callq	_printf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_CONNECTION_OK,8,3              ## @CONNECTION_OK
	.comm	_PG_REPORT,4,2                  ## @PG_REPORT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"connection to database failed: %s"

L_.str.1:                               ## @.str.1
	.asciz	"Failure, exiting\n"

	.comm	_ALWAYS_SECURE_SEARCH_PATH_SQL,4,2 ## @ALWAYS_SECURE_SEARCH_PATH_SQL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_connectToServer                ; -- Begin function connectToServer
	.p2align	2
_connectToServer:                       ; @connectToServer
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_get_db_conn
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	bl	_PQstatus
Lloh0:
	adrp	x8, _CONNECTION_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONNECTION_OK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _ALWAYS_SECURE_SEARCH_PATH_SQL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ALWAYS_SECURE_SEARCH_PATH_SQL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_executeQueryOrDie
	bl	_PQclear
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh6:
	adrp	x8, _PG_REPORT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PG_REPORT@GOTPAGEOFF]
Lloh8:
	ldr	w19, [x8]
	bl	_PQerrorMessage
	mov	x2, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_pg_log
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x8, _PG_REPORT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PG_REPORT@GOTPAGEOFF]
Lloh13:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_PQerrorMessage
	mov	x2, x0
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_pg_log
	mov	x0, x19
	bl	_PQfinish
LBB0_5:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	bl	_printf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_CONNECTION_OK,8,3              ; @CONNECTION_OK
	.comm	_PG_REPORT,4,2                  ; @PG_REPORT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"connection to database failed: %s"

l_.str.1:                               ; @.str.1
	.asciz	"Failure, exiting\n"

	.comm	_ALWAYS_SECURE_SEARCH_PATH_SQL,4,2 ; @ALWAYS_SECURE_SEARCH_PATH_SQL
.subsections_via_symbols
