	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_proper_datallowconn
_check_proper_datallowconn:             ## @check_proper_datallowconn
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_prep_status
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_connectToServer
	leaq	L_.str.2(%rip), %rsi
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_executeQueryOrDie
	movq	%rax, %rbx
	leaq	L_.str.3(%rip), %rsi
	movq	%rax, %rdi
	callq	_PQfnumber
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	callq	_PQfnumber
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_PQntuples
	testl	%eax, %eax
	jle	LBB0_8
## %bb.1:
	movl	%eax, %r13d
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%r14d
	cmpl	%r14d, %r13d
	je	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_PQgetvalue
	movq	%rax, %r12
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_PQgetvalue
	movq	%rax, %r15
	movq	%r12, %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_strcmp
	movq	%r15, %rdi
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.8(%rip), %rsi
	callq	_strcmp
	leaq	L_.str.9(%rip), %rdi
	testq	%rax, %rax
	jne	LBB0_7
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.6(%rip), %rsi
	callq	_strcmp
	leaq	L_.str.7(%rip), %rdi
	testq	%rax, %rax
	jne	LBB0_7
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	callq	_pg_fatal
	jmp	LBB0_7
LBB0_8:
	movq	%rbx, %rdi
	callq	_PQclear
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_PQfinish
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_check_ok                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Checking database connection settings"

L_.str.1:                               ## @.str.1
	.asciz	"template1"

L_.str.2:                               ## @.str.2
	.asciz	"SELECT\tdatname, datallowconn FROM\tpg_catalog.pg_database"

L_.str.3:                               ## @.str.3
	.asciz	"datname"

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

L_.str.5:                               ## @.str.5
	.asciz	"template0"

L_.str.6:                               ## @.str.6
	.asciz	"t"

L_.str.7:                               ## @.str.7
	.asciz	"template0 must not allow connections, i.e. its pg_database.datallowconn must be false\n"

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

L_.str.9:                               ## @.str.9
	.asciz	"All non-template0 databases must allow connections, i.e. their pg_database.datallowconn must be true\n"

	.no_dead_strip	_check_proper_datallowconn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_proper_datallowconn
_check_proper_datallowconn:             ; @check_proper_datallowconn
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_prep_status
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_connectToServer
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_executeQueryOrDie
	mov	x20, x0
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_PQfnumber
	mov	x21, x0
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_PQfnumber
	mov	x22, x0
	mov	x0, x20
	bl	_PQntuples
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x23, x0
	mov	w24, #0
Lloh10:
	adrp	x25, l_.str.5@PAGE
Lloh11:
	add	x25, x25, l_.str.5@PAGEOFF
Lloh12:
	adrp	x26, l_.str.6@PAGE
Lloh13:
	add	x26, x26, l_.str.6@PAGEOFF
Lloh14:
	adrp	x27, l_.str.8@PAGE
Lloh15:
	add	x27, x27, l_.str.8@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_pg_fatal
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w24, w24, #1
	cmp	w23, w24
	b.eq	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x24
	mov	x2, x21
	bl	_PQgetvalue
	mov	x19, x0
	mov	x0, x20
	mov	x1, x24
	mov	x2, x22
	bl	_PQgetvalue
	mov	x28, x0
	mov	x0, x19
	mov	x1, x25
	bl	_strcmp
	cbz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x28
	mov	x1, x27
	bl	_strcmp
	cbnz	x0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh16:
	adrp	x0, l_.str.9@PAGE
Lloh17:
	add	x0, x0, l_.str.9@PAGEOFF
	b	LBB0_2
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x28
	mov	x1, x26
	bl	_strcmp
	cbnz	x0, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh18:
	adrp	x0, l_.str.7@PAGE
Lloh19:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_2
LBB0_9:
	mov	x0, x20
	bl	_PQclear
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_PQfinish
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_check_ok
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Checking database connection settings"

l_.str.1:                               ; @.str.1
	.asciz	"template1"

l_.str.2:                               ; @.str.2
	.asciz	"SELECT\tdatname, datallowconn FROM\tpg_catalog.pg_database"

l_.str.3:                               ; @.str.3
	.asciz	"datname"

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

l_.str.5:                               ; @.str.5
	.asciz	"template0"

l_.str.6:                               ; @.str.6
	.asciz	"t"

l_.str.7:                               ; @.str.7
	.asciz	"template0 must not allow connections, i.e. its pg_database.datallowconn must be false\n"

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

l_.str.9:                               ; @.str.9
	.asciz	"All non-template0 databases must allow connections, i.e. their pg_database.datallowconn must be true\n"

	.no_dead_strip	_check_proper_datallowconn
.subsections_via_symbols
