	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function connectDBStart
_connectDBStart:                        ## @connectDBStart
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	xorl	%eax, %eax
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	cmpl	$0, 64(%rdi)
	je	LBB0_5
## %bb.2:
	xorl	%eax, %eax
	callq	_pg_link_canary_is_frontend
	leaq	28(%rbx), %rdi
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%rbx)
	movups	%xmm0, 32(%rbx)
	callq	_resetPQExpBuffer
	movl	$4294967295, %eax               ## imm = 0xFFFFFFFF
	movq	%rax, 12(%rbx)
	movl	$1, 20(%rbx)
	movq	_CONNECTION_NEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	%rbx, %rdi
	callq	_PQconnectPoll
	movq	%rax, %rcx
	movq	_PGRES_POLLING_WRITING@GOTPCREL(%rip), %rdx
	movl	$1, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_5
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str(%rip), %rsi
	callq	_printfPQExpBuffer
LBB0_5:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_pqDropConnection
	movq	_CONNECTION_BAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"libpq is incorrectly linked to backend functions\n"

	.comm	_CONNECTION_NEEDED,4,2          ## @CONNECTION_NEEDED
	.comm	_PGRES_POLLING_WRITING,8,3      ## @PGRES_POLLING_WRITING
	.comm	_CONNECTION_BAD,4,2             ## @CONNECTION_BAD
	.no_dead_strip	_connectDBStart
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function connectDBStart
_connectDBStart:                        ; @connectDBStart
	.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
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0, #64]
	cbz	w8, LBB0_6
; %bb.2:
	bl	_pg_link_canary_is_frontend
	cbz	w0, LBB0_5
; %bb.3:
	add	x0, x19, #28
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x19, #32]
	bl	_resetPQExpBuffer
	movi	d0, #0x000000ffffffff
	stur	d0, [x19, #12]
	mov	w20, #1
Lloh0:
	adrp	x8, _CONNECTION_NEEDED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONNECTION_NEEDED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w20, w8, [x19, #20]
	mov	x0, x19
	bl	_PQconnectPoll
Lloh3:
	adrp	x8, _PGRES_POLLING_WRITING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PGRES_POLLING_WRITING@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
	b	LBB0_7
LBB0_4:
	mov	w20, #0
	b	LBB0_7
LBB0_5:
	add	x0, x19, #28
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_printfPQExpBuffer
LBB0_6:
	mov	x0, x19
	mov	w1, #1
	bl	_pqDropConnection
	mov	w20, #0
Lloh8:
	adrp	x8, _CONNECTION_BAD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CONNECTION_BAD@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #24]
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"libpq is incorrectly linked to backend functions\n"

	.comm	_CONNECTION_NEEDED,4,2          ; @CONNECTION_NEEDED
	.comm	_PGRES_POLLING_WRITING,8,3      ; @PGRES_POLLING_WRITING
	.comm	_CONNECTION_BAD,4,2             ; @CONNECTION_BAD
	.no_dead_strip	_connectDBStart
.subsections_via_symbols
