	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function doConnect
_doConnect:                             ## @doConnect
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	_doConnect.password(%rip), %r14
	xorl	%eax, %eax
	cmpb	$0, _doConnect.have_password(%rip)
	cmovneq	%r14, %rax
	leaq	-112(%rbp), %r15
	leaq	-176(%rbp), %r12
	movq	_CONNECTION_BAD@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	leaq	L_.str(%rip), %rcx
	movq	%rcx, -112(%rbp)
	movq	_pghost@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -176(%rbp)
	leaq	L_.str.1(%rip), %rcx
	movq	%rcx, -104(%rbp)
	movq	_pgport@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -168(%rbp)
	leaq	L_.str.2(%rip), %rcx
	movq	%rcx, -96(%rbp)
	movq	_login@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -160(%rbp)
	leaq	L_.str.3(%rip), %rcx
	movq	%rcx, -88(%rbp)
	movq	%rax, -152(%rbp)
	leaq	L_.str.4(%rip), %rax
	movq	%rax, -80(%rbp)
	movq	_dbName@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -144(%rbp)
	leaq	L_.str.5(%rip), %rax
	movq	%rax, -72(%rbp)
	movq	_progname@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -136(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -128(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_PQconnectdbParams
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PQstatus
	cmpq	(%r13), %rax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_PQconnectionNeedsPassword
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	testb	$1, _doConnect.have_password(%rip)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_PQfinish
	leaq	L_.str.7(%rip), %rdi
	movq	%r14, %rsi
	movl	$100, %edx
	xorl	%ecx, %ecx
	callq	_simple_prompt
	movb	$1, _doConnect.have_password(%rip)
	movq	%r14, %rax
	jmp	LBB0_1
LBB0_6:
	movq	%rbx, %rdi
	callq	_PQstatus
	cmpq	(%r13), %rax
	jne	LBB0_8
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_dbName@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	%rbx, %rdi
	callq	_PQerrorMessage
	leaq	L_.str.8(%rip), %rsi
	movl	%r14d, %edi
	movq	%r15, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_fprintf
	movq	%rbx, %rdi
	callq	_PQfinish
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_10:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_dbName@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str.6(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.9:
	movq	%rbx, %rax
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_doConnect.have_password,1,2 ## @doConnect.have_password
.zerofill __DATA,__bss,_doConnect.password,100,4 ## @doConnect.password
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"host"

	.comm	_pghost,8,3                     ## @pghost
L_.str.1:                               ## @.str.1
	.asciz	"port"

	.comm	_pgport,8,3                     ## @pgport
L_.str.2:                               ## @.str.2
	.asciz	"user"

	.comm	_login,8,3                      ## @login
L_.str.3:                               ## @.str.3
	.asciz	"password"

L_.str.4:                               ## @.str.4
	.asciz	"dbname"

	.comm	_dbName,8,3                     ## @dbName
L_.str.5:                               ## @.str.5
	.asciz	"fallback_application_name"

	.comm	_progname,8,3                   ## @progname
	.comm	_stderr,4,2                     ## @stderr
L_.str.6:                               ## @.str.6
	.asciz	"connection to database \"%s\" failed\n"

	.comm	_CONNECTION_BAD,8,3             ## @CONNECTION_BAD
L_.str.7:                               ## @.str.7
	.asciz	"Password: "

L_.str.8:                               ## @.str.8
	.asciz	"connection to database \"%s\" failed:\n%s"

	.comm	_PARAMS_ARRAY_SIZE,4,2          ## @PARAMS_ARRAY_SIZE
	.no_dead_strip	_doConnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function doConnect
_doConnect:                             ; @doConnect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x28, x27, [sp, #128]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x19, _doConnect.password@PAGE
Lloh4:
	add	x19, x19, _doConnect.password@PAGEOFF
	stur	x8, [x29, #-88]
	adrp	x24, _doConnect.have_password@PAGE
	ldrb	w8, [x24, _doConnect.have_password@PAGEOFF]
	cmp	w8, #0
Lloh5:
	adrp	x22, _login@GOTPAGE
Lloh6:
	ldr	x22, [x22, _login@GOTPAGEOFF]
Lloh7:
	adrp	x23, l_.str.3@PAGE
Lloh8:
	add	x23, x23, l_.str.3@PAGEOFF
Lloh9:
	adrp	x25, l_.str.4@PAGE
Lloh10:
	add	x25, x25, l_.str.4@PAGEOFF
Lloh11:
	adrp	x27, l_.str.5@PAGE
Lloh12:
	add	x27, x27, l_.str.5@PAGEOFF
Lloh13:
	adrp	x28, _progname@GOTPAGE
Lloh14:
	ldr	x28, [x28, _progname@GOTPAGEOFF]
	csel	x8, x19, xzr, ne
Lloh15:
	adrp	x26, _CONNECTION_BAD@GOTPAGE
Lloh16:
	ldr	x26, [x26, _CONNECTION_BAD@GOTPAGEOFF]
Lloh17:
	adrp	x20, l_.str.7@PAGE
Lloh18:
	add	x20, x20, l_.str.7@PAGEOFF
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
Lloh19:
	adrp	x9, _pghost@GOTPAGE
Lloh20:
	ldr	x9, [x9, _pghost@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
Lloh22:
	adrp	x10, l_.str@PAGE
Lloh23:
	add	x11, x10, l_.str@PAGEOFF
Lloh24:
	adrp	x10, l_.str.1@PAGE
Lloh25:
	add	x10, x10, l_.str.1@PAGEOFF
	stp	x11, x10, [sp, #64]
Lloh26:
	adrp	x10, _pgport@GOTPAGE
Lloh27:
	ldr	x10, [x10, _pgport@GOTPAGEOFF]
Lloh28:
	ldr	x10, [x10]
	stp	x9, x10, [sp, #8]
	ldr	x9, [x22]
Lloh29:
	adrp	x10, l_.str.2@PAGE
Lloh30:
	add	x10, x10, l_.str.2@PAGEOFF
	stp	x10, x23, [sp, #80]
	stp	x9, x8, [sp, #24]
Lloh31:
	adrp	x8, _dbName@GOTPAGE
Lloh32:
	ldr	x8, [x8, _dbName@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	stp	x25, x27, [sp, #96]
	ldr	x9, [x28]
	stp	x8, x9, [sp, #40]
	str	xzr, [sp, #112]
	str	xzr, [sp, #56]
	add	x0, sp, #64
	add	x1, sp, #8
	mov	w2, #1
	bl	_PQconnectdbParams
	mov	x21, x0
	cbz	x0, LBB0_8
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	bl	_PQstatus
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	bl	_PQconnectionNeedsPassword
	cbz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	ldrb	w8, [x24, _doConnect.have_password@PAGEOFF]
	tbnz	w8, #0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	bl	_PQfinish
	mov	x0, x20
	mov	x1, x19
	mov	w2, #100
	mov	w3, #0
	bl	_simple_prompt
	mov	w8, #1
	strb	w8, [x24, _doConnect.have_password@PAGEOFF]
	mov	x8, x19
	b	LBB0_1
LBB0_6:
	mov	x0, x21
	bl	_PQstatus
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.7:
Lloh34:
	adrp	x8, _stderr@GOTPAGE
Lloh35:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh36:
	ldr	w19, [x8]
Lloh37:
	adrp	x8, _dbName@GOTPAGE
Lloh38:
	ldr	x8, [x8, _dbName@GOTPAGEOFF]
Lloh39:
	ldr	x20, [x8]
	mov	x0, x21
	bl	_PQerrorMessage
	str	x0, [sp]
Lloh40:
	adrp	x1, l_.str.8@PAGE
Lloh41:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_fprintf
	mov	x0, x21
	bl	_PQfinish
	mov	x21, #0
	b	LBB0_9
LBB0_8:
Lloh42:
	adrp	x8, _stderr@GOTPAGE
Lloh43:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh44:
	ldr	w0, [x8]
Lloh45:
	adrp	x8, _dbName@GOTPAGE
Lloh46:
	ldr	x8, [x8, _dbName@GOTPAGEOFF]
Lloh47:
	ldr	x2, [x8]
Lloh48:
	adrp	x1, l_.str.6@PAGE
Lloh49:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_fprintf
LBB0_9:
	ldur	x8, [x29, #-88]
Lloh50:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh51:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh52:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x21
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdrp	Lloh22, Lloh24
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_doConnect.have_password,1,2 ; @doConnect.have_password
.zerofill __DATA,__bss,_doConnect.password,100,0 ; @doConnect.password
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"host"

	.comm	_pghost,8,3                     ; @pghost
l_.str.1:                               ; @.str.1
	.asciz	"port"

	.comm	_pgport,8,3                     ; @pgport
l_.str.2:                               ; @.str.2
	.asciz	"user"

	.comm	_login,8,3                      ; @login
l_.str.3:                               ; @.str.3
	.asciz	"password"

l_.str.4:                               ; @.str.4
	.asciz	"dbname"

	.comm	_dbName,8,3                     ; @dbName
l_.str.5:                               ; @.str.5
	.asciz	"fallback_application_name"

	.comm	_progname,8,3                   ; @progname
	.comm	_stderr,4,2                     ; @stderr
l_.str.6:                               ; @.str.6
	.asciz	"connection to database \"%s\" failed\n"

	.comm	_CONNECTION_BAD,8,3             ; @CONNECTION_BAD
l_.str.7:                               ; @.str.7
	.asciz	"Password: "

l_.str.8:                               ; @.str.8
	.asciz	"connection to database \"%s\" failed:\n%s"

	.comm	_PARAMS_ARRAY_SIZE,4,2          ; @PARAMS_ARRAY_SIZE
	.no_dead_strip	_doConnect
.subsections_via_symbols
