	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libpqConnect                   ## -- Begin function libpqConnect
	.p2align	4, 0x90
_libpqConnect:                          ## @libpqConnect
	.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
	callq	_PQconnectdb
	movq	_conn@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	movl	%eax, %edi
	callq	_PQstatus
	movq	_CONNECTION_BAD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	callq	_PQerrorMessage
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pg_fatal
LBB0_2:
	movq	_showprogress@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_pg_log_info
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	callq	_run_simple_command
	leaq	L_.str.3(%rip), %rdi
	callq	_run_simple_command
	leaq	L_.str.4(%rip), %rdi
	callq	_run_simple_command
	movl	(%rbx), %edi
	movq	_ALWAYS_SECURE_SEARCH_PATH_SQL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_PQexec
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PQresultStatus
	movq	_PGRES_TUPLES_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_PQresultErrorMessage
	leaq	L_.str.5(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pg_fatal
LBB0_6:
	movq	%rbx, %rdi
	callq	_PQclear
	leaq	L_.str.6(%rip), %rdi
	callq	_run_simple_query
	movq	%rax, %rbx
	leaq	L_.str.7(%rip), %rsi
	movq	%rax, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.8(%rip), %rdi
	xorl	%eax, %eax
	callq	_pg_fatal
LBB0_8:
	movq	%rbx, %rdi
	callq	_pg_free
	leaq	L_.str.9(%rip), %rdi
	callq	_run_simple_query
	movq	%rax, %rbx
	leaq	L_.str.10(%rip), %rsi
	movq	%rax, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.11(%rip), %rdi
	xorl	%eax, %eax
	callq	_pg_fatal
LBB0_10:
	movq	%rbx, %rdi
	callq	_pg_free
	leaq	L_.str.12(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_run_simple_command             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_conn,4,2                       ## @conn
	.comm	_CONNECTION_BAD,8,3             ## @CONNECTION_BAD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not connect to server: %s"

	.comm	_showprogress,8,3               ## @showprogress
L_.str.1:                               ## @.str.1
	.asciz	"connected to server"

L_.str.2:                               ## @.str.2
	.asciz	"SET statement_timeout = 0"

L_.str.3:                               ## @.str.3
	.asciz	"SET lock_timeout = 0"

L_.str.4:                               ## @.str.4
	.asciz	"SET idle_in_transaction_session_timeout = 0"

	.comm	_ALWAYS_SECURE_SEARCH_PATH_SQL,4,2 ## @ALWAYS_SECURE_SEARCH_PATH_SQL
	.comm	_PGRES_TUPLES_OK,8,3            ## @PGRES_TUPLES_OK
L_.str.5:                               ## @.str.5
	.asciz	"could not clear search_path: %s"

L_.str.6:                               ## @.str.6
	.asciz	"SELECT pg_is_in_recovery()"

L_.str.7:                               ## @.str.7
	.asciz	"f"

L_.str.8:                               ## @.str.8
	.asciz	"source server must not be in recovery mode"

L_.str.9:                               ## @.str.9
	.asciz	"SHOW full_page_writes"

L_.str.10:                              ## @.str.10
	.asciz	"on"

L_.str.11:                              ## @.str.11
	.asciz	"full_page_writes must be enabled in the source server"

L_.str.12:                              ## @.str.12
	.asciz	"SET synchronous_commit = off"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libpqConnect                   ; -- Begin function libpqConnect
	.p2align	2
_libpqConnect:                          ; @libpqConnect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	bl	_PQconnectdb
Lloh0:
	adrp	x19, _conn@GOTPAGE
Lloh1:
	ldr	x19, [x19, _conn@GOTPAGEOFF]
	str	w0, [x19]
	bl	_PQstatus
Lloh2:
	adrp	x8, _CONNECTION_BAD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CONNECTION_BAD@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x19]
	bl	_PQerrorMessage
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pg_fatal
LBB0_2:
Lloh7:
	adrp	x8, _showprogress@GOTPAGE
Lloh8:
	ldr	x8, [x8, _showprogress@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pg_log_info
LBB0_4:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_run_simple_command
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_run_simple_command
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_run_simple_command
	ldr	w0, [x19]
Lloh18:
	adrp	x8, _ALWAYS_SECURE_SEARCH_PATH_SQL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ALWAYS_SECURE_SEARCH_PATH_SQL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_PQexec
	mov	x19, x0
	bl	_PQresultStatus
Lloh21:
	adrp	x8, _PGRES_TUPLES_OK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PGRES_TUPLES_OK@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_PQresultErrorMessage
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh24:
	adrp	x0, l_.str.5@PAGE
Lloh25:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pg_fatal
LBB0_6:
	mov	x0, x19
	bl	_PQclear
Lloh26:
	adrp	x0, l_.str.6@PAGE
Lloh27:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_run_simple_query
	mov	x19, x0
Lloh28:
	adrp	x1, l_.str.7@PAGE
Lloh29:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_8
; %bb.7:
Lloh30:
	adrp	x0, l_.str.8@PAGE
Lloh31:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_pg_fatal
LBB0_8:
	mov	x0, x19
	bl	_pg_free
Lloh32:
	adrp	x0, l_.str.9@PAGE
Lloh33:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_run_simple_query
	mov	x19, x0
Lloh34:
	adrp	x1, l_.str.10@PAGE
Lloh35:
	add	x1, x1, l_.str.10@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_10
; %bb.9:
Lloh36:
	adrp	x0, l_.str.11@PAGE
Lloh37:
	add	x0, x0, l_.str.11@PAGEOFF
	bl	_pg_fatal
LBB0_10:
	mov	x0, x19
	bl	_pg_free
Lloh38:
	adrp	x0, l_.str.12@PAGE
Lloh39:
	add	x0, x0, l_.str.12@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_run_simple_command
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_conn,4,2                       ; @conn
	.comm	_CONNECTION_BAD,8,3             ; @CONNECTION_BAD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not connect to server: %s"

	.comm	_showprogress,8,3               ; @showprogress
l_.str.1:                               ; @.str.1
	.asciz	"connected to server"

l_.str.2:                               ; @.str.2
	.asciz	"SET statement_timeout = 0"

l_.str.3:                               ; @.str.3
	.asciz	"SET lock_timeout = 0"

l_.str.4:                               ; @.str.4
	.asciz	"SET idle_in_transaction_session_timeout = 0"

	.comm	_ALWAYS_SECURE_SEARCH_PATH_SQL,4,2 ; @ALWAYS_SECURE_SEARCH_PATH_SQL
	.comm	_PGRES_TUPLES_OK,8,3            ; @PGRES_TUPLES_OK
l_.str.5:                               ; @.str.5
	.asciz	"could not clear search_path: %s"

l_.str.6:                               ; @.str.6
	.asciz	"SELECT pg_is_in_recovery()"

l_.str.7:                               ; @.str.7
	.asciz	"f"

l_.str.8:                               ; @.str.8
	.asciz	"source server must not be in recovery mode"

l_.str.9:                               ; @.str.9
	.asciz	"SHOW full_page_writes"

l_.str.10:                              ; @.str.10
	.asciz	"on"

l_.str.11:                              ; @.str.11
	.asciz	"full_page_writes must be enabled in the source server"

l_.str.12:                              ; @.str.12
	.asciz	"SET synchronous_commit = off"

.subsections_via_symbols
