	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function connectDBComplete
_connectDBComplete:                     ## @connectDBComplete
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$0, -44(%rbp)
	xorl	%eax, %eax
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.1:
	movq	%rdi, %r15
	movq	(%rdi), %rcx
	movq	_CONNECTION_BAD@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rcx
	je	LBB0_20
## %bb.2:
	movq	32(%r15), %rdi
	xorl	%eax, %eax
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.3:
	leaq	L_.str(%rip), %rcx
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdx
	callq	_parse_int_param
	testl	%eax, %eax
	je	LBB0_4
## %bb.6:
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.7:
	cmpl	$1, %eax
	jne	LBB0_10
## %bb.8:
	movl	$2, -44(%rbp)
	movl	$2, %eax
	jmp	LBB0_10
LBB0_4:
	movq	(%rbx), %rax
	jmp	LBB0_5
LBB0_9:
	movl	$0, -44(%rbp)
	xorl	%eax, %eax
LBB0_10:
	movl	$-2, %r12d
	movq	$-1, %r14
	movl	$128, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	callq	_PQconnectPoll
	movl	%eax, %ebx
	movl	-44(%rbp), %eax
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$130, %ebx
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	testl	%eax, %eax
	jle	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	%r12d, 8(%r15)
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	%r13, 24(%r15)
	je	LBB0_16
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	xorl	%edi, %edi
	callq	_time
	movslq	-44(%rbp), %r14
	addq	%rax, %r14
	movl	8(%r15), %r12d
	movq	24(%r15), %r13
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$128, %ebx
	je	LBB0_24
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$129, %ebx
	jne	LBB0_18
## %bb.21:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	$1, %edi
	xorl	%esi, %esi
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_11 Depth=1
	xorl	%edi, %edi
	movl	$1, %esi
LBB0_22:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_pqWaitTimed
	cmpl	$-1, %eax
	je	LBB0_23
## %bb.25:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$1, %eax
	jne	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	$1, 12(%r15)
	movq	_CONNECTION_NEEDED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	jmp	LBB0_27
LBB0_18:
	cmpl	$130, %ebx
	jne	LBB0_23
## %bb.19:
	addq	$16, %r15
	movq	%r15, %rdi
	callq	_resetPQExpBuffer
	movl	$1, %eax
	jmp	LBB0_20
LBB0_23:
	movq	_CONNECTION_BAD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_5:
	movq	%rax, (%r15)
	xorl	%eax, %eax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONNECTION_BAD,8,3             ## @CONNECTION_BAD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"connect_timeout"

	.comm	_CONNECTION_NEEDED,8,3          ## @CONNECTION_NEEDED
	.no_dead_strip	_connectDBComplete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function connectDBComplete
_connectDBComplete:                     ; @connectDBComplete
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	str	wzr, [sp, #12]
	cbz	x0, LBB0_28
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x22, _CONNECTION_BAD@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CONNECTION_BAD@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_28
LBB0_3:
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_8
; %bb.4:
Lloh2:
	adrp	x3, l_.str@PAGE
Lloh3:
	add	x3, x3, l_.str@PAGEOFF
	add	x1, sp, #12
	mov	x2, x19
	bl	_parse_int_param
	cbz	w0, LBB0_27
; %bb.5:
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.6:
	b.ne	LBB0_10
; %bb.7:
	mov	w8, #2
	str	w8, [sp, #12]
	b	LBB0_10
LBB0_8:
	mov	w8, #0
	b	LBB0_10
LBB0_9:
	mov	w8, #0
	str	wzr, [sp, #12]
LBB0_10:
	mov	x25, #0
	mov	w26, #-2
	mov	x20, #-1
	mov	w21, #128
	mov	w23, #1
Lloh4:
	adrp	x24, _CONNECTION_NEEDED@GOTPAGE
Lloh5:
	ldr	x24, [x24, _CONNECTION_NEEDED@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x19
	bl	_PQconnectPoll
	mov	x21, x0
	ldr	w8, [sp, #12]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	cmp	w21, #130
	b.eq	LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x19, #8]
	cmp	w8, w26
	b.ne	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x19, #24]
	cmp	x8, x25
	b.eq	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, #0
	bl	_time
	ldrsw	x8, [sp, #12]
	add	x20, x0, x8
	ldr	w26, [x19, #8]
	ldr	x25, [x19, #24]
LBB0_17:                                ;   in Loop: Header=BB0_12 Depth=1
	cmp	w21, #128
	b.eq	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_12 Depth=1
	cmp	w21, #129
	b.ne	LBB0_24
; %bb.19:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	w0, #1
	mov	w1, #0
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	w0, #0
	mov	w1, #1
LBB0_21:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x2, x19
	mov	x3, x20
	bl	_pqWaitTimed
	cmn	w0, #1
	b.eq	LBB0_26
; %bb.22:                               ;   in Loop: Header=BB0_12 Depth=1
	cmp	w0, #1
	b.ne	LBB0_11
; %bb.23:                               ;   in Loop: Header=BB0_12 Depth=1
	str	w23, [x19, #12]
	ldr	x8, [x24]
	str	x8, [x19]
	b	LBB0_11
LBB0_24:
	cmp	w21, #130
	b.ne	LBB0_26
; %bb.25:
	add	x0, x19, #16
	bl	_resetPQExpBuffer
	mov	w0, #1
	b	LBB0_28
LBB0_26:
	mov	w0, #0
LBB0_27:
	ldr	x8, [x22]
	str	x8, [x19]
LBB0_28:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CONNECTION_BAD,8,3             ; @CONNECTION_BAD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"connect_timeout"

	.comm	_CONNECTION_NEEDED,8,3          ; @CONNECTION_NEEDED
	.no_dead_strip	_connectDBComplete
.subsections_via_symbols
