	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function expand_dbname_patterns
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_expand_dbname_patterns:                ## @expand_dbname_patterns
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	cmpq	$0, (%rsi)
	je	LBB0_8
## %bb.1:
	movq	%rdx, %r13
	movq	%rsi, %rbx
	xorl	%eax, %eax
	callq	_createPQExpBuffer
	movq	%rax, %r15
	movq	(%rbx), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_PQclear
	movq	%r15, %rdi
	callq	_resetPQExpBuffer
	movq	8(%r14), %r14
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	testq	%r14, %r14
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_appendPQExpBufferStr
	movl	(%r14), %edx
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rsp)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%rsp)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_processSQLNamePattern
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_executeQuery
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PQntuples
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_PQgetvalue
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_simple_string_list_append
	incl	%r12d
	movq	%rbx, %rdi
	callq	_PQntuples
	cmpl	%eax, %r12d
	jl	LBB0_5
	jmp	LBB0_6
LBB0_7:
	movq	%r15, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_destroyPQExpBuffer             ## TAILCALL
LBB0_8:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SELECT datname FROM pg_catalog.pg_database n\n"

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

	.no_dead_strip	_expand_dbname_patterns
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function expand_dbname_patterns
_expand_dbname_patterns:                ; @expand_dbname_patterns
	.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
	ldr	x8, [x1]
	cbz	x8, LBB0_8
; %bb.1:
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
	bl	_createPQExpBuffer
	mov	x21, x0
	ldr	x26, [x22]
	cbz	x26, LBB0_7
; %bb.2:
Lloh0:
	adrp	x22, l_.str@PAGE
Lloh1:
	add	x22, x22, l_.str@PAGEOFF
Lloh2:
	adrp	x23, l_.str.1@PAGE
Lloh3:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	bl	_PQclear
	mov	x0, x21
	bl	_resetPQExpBuffer
	ldr	x26, [x26, #8]
	cbz	x26, LBB0_7
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	mov	x0, x21
	mov	x1, x22
	bl	_appendPQExpBufferStr
	ldr	w2, [x26]
	str	xzr, [sp]
	mov	x0, x20
	mov	x1, x21
	mov	w3, #0
	mov	w4, #0
	mov	x5, #0
	mov	x6, x23
	mov	x7, #0
	bl	_processSQLNamePattern
	ldr	w1, [x21]
	mov	x0, x20
	bl	_executeQuery
	mov	x24, x0
	bl	_PQntuples
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w25, #0
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x24
	mov	x1, x25
	mov	w2, #0
	bl	_PQgetvalue
	mov	x1, x0
	mov	x0, x19
	bl	_simple_string_list_append
	add	w25, w25, #1
	mov	x0, x24
	bl	_PQntuples
	cmp	w25, w0
	b.lt	LBB0_6
	b	LBB0_3
LBB0_7:
	mov	x0, x21
	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
	b	_destroyPQExpBuffer
LBB0_8:
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SELECT datname FROM pg_catalog.pg_database n\n"

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

	.no_dead_strip	_expand_dbname_patterns
.subsections_via_symbols
