	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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
	cmpl	$2, %edi
	jl	LBB0_1
## %bb.2:
	movq	8(%rsi), %rdi
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rdi
LBB0_3:
	callq	_PQconnectdb
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_PQstatus
	movq	_CONNECTION_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_PQerrorMessage
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	%r13, %rdi
	callq	_exit_nicely
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_PQexec
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PQresultStatus
	movq	_PGRES_TUPLES_OK@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	je	LBB0_7
## %bb.6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r13, %rdi
	callq	_PQerrorMessage
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	%rbx, %rdi
	callq	_PQclear
	movq	%r13, %rdi
	callq	_exit_nicely
LBB0_7:
	movq	%rbx, %rdi
	callq	_PQclear
	leaq	L_.str.4(%rip), %rsi
	movq	%r13, %rdi
	callq	_PQexec
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PQresultStatus
	movq	_PGRES_COMMAND_OK@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	je	LBB0_9
## %bb.8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r13, %rdi
	callq	_PQerrorMessage
	leaq	L_.str.5(%rip), %rsi
	movl	%r14d, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	%rbx, %rdi
	callq	_PQclear
	movq	%r13, %rdi
	callq	_exit_nicely
LBB0_9:
	movq	%rbx, %rdi
	callq	_PQclear
	leaq	L_.str.6(%rip), %rsi
	movq	%r13, %rdi
	callq	_PQexec
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PQresultStatus
	cmpq	(%r15), %rax
	je	LBB0_11
## %bb.10:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r13, %rdi
	callq	_PQerrorMessage
	leaq	L_.str.7(%rip), %rsi
	movl	%r14d, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	%rbx, %rdi
	callq	_PQclear
	movq	%r13, %rdi
	callq	_exit_nicely
LBB0_11:
	movq	%rbx, %rdi
	callq	_PQclear
	leaq	L_.str.8(%rip), %rsi
	movq	%r13, %rdi
	callq	_PQexec
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_PQresultStatus
	cmpq	(%r12), %rax
	je	LBB0_13
## %bb.12:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_PQerrorMessage
	leaq	L_.str.9(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	%r15, %rdi
	callq	_PQclear
	movq	%r13, %rdi
	callq	_exit_nicely
LBB0_13:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_PQnfields
	movl	%eax, %r13d
	testl	%eax, %eax
	jle	LBB0_16
## %bb.14:
	leaq	L_.str.10(%rip), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_PQfname
	movq	%r14, %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_printf
	incl	%ebx
	cmpl	%ebx, %r13d
	jne	LBB0_15
LBB0_16:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	%r15, %rdi
	callq	_PQntuples
	testl	%eax, %eax
	jle	LBB0_22
## %bb.17:
	leaq	L_.str.10(%rip), %r12
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_18 Depth=1
	movl	$10, %edi
	callq	_putchar
	incl	%ebx
	movq	%r15, %rdi
	callq	_PQntuples
	cmpl	%eax, %ebx
	jge	LBB0_22
LBB0_18:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_20 Depth 2
	testl	%r13d, %r13d
	jle	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_18 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_PQgetvalue
	movq	%r12, %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_printf
	incl	%r14d
	cmpl	%r14d, %r13d
	jne	LBB0_20
	jmp	LBB0_21
LBB0_22:
	movq	%r15, %rdi
	callq	_PQclear
	leaq	L_.str.13(%rip), %rsi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_PQexec
	movq	%rax, %rdi
	callq	_PQclear
	leaq	L_.str.14(%rip), %rsi
	movq	%rbx, %rdi
	callq	_PQexec
	movq	%rax, %rdi
	callq	_PQclear
	movq	%rbx, %rdi
	callq	_PQfinish
	xorl	%eax, %eax
	addq	$8, %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	"dbname = postgres"

	.comm	_CONNECTION_OK,8,3              ## @CONNECTION_OK
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"Connection to database failed: %s"

L_.str.2:                               ## @.str.2
	.asciz	"SELECT pg_catalog.set_config('search_path', '', false)"

	.comm	_PGRES_TUPLES_OK,8,3            ## @PGRES_TUPLES_OK
L_.str.3:                               ## @.str.3
	.asciz	"SET failed: %s"

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

	.comm	_PGRES_COMMAND_OK,8,3           ## @PGRES_COMMAND_OK
L_.str.5:                               ## @.str.5
	.asciz	"BEGIN command failed: %s"

L_.str.6:                               ## @.str.6
	.asciz	"DECLARE myportal CURSOR FOR select * from pg_database"

L_.str.7:                               ## @.str.7
	.asciz	"DECLARE CURSOR failed: %s"

L_.str.8:                               ## @.str.8
	.asciz	"FETCH ALL in myportal"

L_.str.9:                               ## @.str.9
	.asciz	"FETCH ALL failed: %s"

L_.str.10:                              ## @.str.10
	.asciz	"%-15s"

L_.str.13:                              ## @.str.13
	.asciz	"CLOSE myportal"

L_.str.14:                              ## @.str.14
	.asciz	"END"

L_str:                                  ## @str
	.asciz	"\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cmp	w0, #2
	b.lt	LBB0_2
; %bb.1:
	ldr	x0, [x1, #8]
	b	LBB0_3
LBB0_2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
LBB0_3:
	bl	_PQconnectdb
	mov	x19, x0
	bl	_PQstatus
Lloh2:
	adrp	x8, _CONNECTION_OK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CONNECTION_OK@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x22, _stderr@GOTPAGE
Lloh6:
	ldr	x22, [x22, _stderr@GOTPAGEOFF]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.4:
	ldr	w20, [x22]
	mov	x0, x19
	bl	_PQerrorMessage
	mov	x2, x0
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	mov	x0, x19
	bl	_exit_nicely
LBB0_5:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_PQexec
	mov	x20, x0
	bl	_PQresultStatus
Lloh11:
	adrp	x23, _PGRES_TUPLES_OK@GOTPAGE
Lloh12:
	ldr	x23, [x23, _PGRES_TUPLES_OK@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.6:
	ldr	w21, [x22]
	mov	x0, x19
	bl	_PQerrorMessage
	mov	x2, x0
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_fprintf
	mov	x0, x20
	bl	_PQclear
	mov	x0, x19
	bl	_exit_nicely
LBB0_7:
	mov	x0, x20
	bl	_PQclear
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_PQexec
	mov	x20, x0
	bl	_PQresultStatus
Lloh17:
	adrp	x24, _PGRES_COMMAND_OK@GOTPAGE
Lloh18:
	ldr	x24, [x24, _PGRES_COMMAND_OK@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	b.eq	LBB0_9
; %bb.8:
	ldr	w21, [x22]
	mov	x0, x19
	bl	_PQerrorMessage
	mov	x2, x0
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_fprintf
	mov	x0, x20
	bl	_PQclear
	mov	x0, x19
	bl	_exit_nicely
LBB0_9:
	mov	x0, x20
	bl	_PQclear
Lloh21:
	adrp	x1, l_.str.6@PAGE
Lloh22:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_PQexec
	mov	x20, x0
	bl	_PQresultStatus
	ldr	x8, [x24]
	cmp	x0, x8
	b.eq	LBB0_11
; %bb.10:
	ldr	w21, [x22]
	mov	x0, x19
	bl	_PQerrorMessage
	mov	x2, x0
Lloh23:
	adrp	x1, l_.str.7@PAGE
Lloh24:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x21
	bl	_fprintf
	mov	x0, x20
	bl	_PQclear
	mov	x0, x19
	bl	_exit_nicely
LBB0_11:
	mov	x0, x20
	bl	_PQclear
Lloh25:
	adrp	x1, l_.str.8@PAGE
Lloh26:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_PQexec
	mov	x20, x0
	bl	_PQresultStatus
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_13
; %bb.12:
	ldr	w21, [x22]
	mov	x0, x19
	bl	_PQerrorMessage
	mov	x2, x0
Lloh27:
	adrp	x1, l_.str.9@PAGE
Lloh28:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x21
	bl	_fprintf
	mov	x0, x20
	bl	_PQclear
	mov	x0, x19
	bl	_exit_nicely
LBB0_13:
	mov	x0, x20
	bl	_PQnfields
	mov	x21, x0
	cmp	w0, #1
	b.lt	LBB0_16
; %bb.14:
	mov	w22, #0
Lloh29:
	adrp	x23, l_.str.10@PAGE
Lloh30:
	add	x23, x23, l_.str.10@PAGEOFF
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_PQfname
	str	x0, [sp]
	mov	x0, x23
	bl	_printf
	add	w22, w22, #1
	cmp	w21, w22
	b.ne	LBB0_15
LBB0_16:
Lloh31:
	adrp	x0, l_str@PAGE
Lloh32:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	x0, x20
	bl	_PQntuples
	cmp	w0, #1
	b.lt	LBB0_22
; %bb.17:
	mov	w22, #0
Lloh33:
	adrp	x23, l_.str.10@PAGE
Lloh34:
	add	x23, x23, l_.str.10@PAGEOFF
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	w0, #10
	bl	_putchar
	add	w22, w22, #1
	mov	x0, x20
	bl	_PQntuples
	cmp	w22, w0
	b.ge	LBB0_22
LBB0_19:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_21 Depth 2
	cmp	w21, #1
	b.lt	LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	w24, #0
LBB0_21:                                ;   Parent Loop BB0_19 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x20
	mov	x1, x22
	mov	x2, x24
	bl	_PQgetvalue
	str	x0, [sp]
	mov	x0, x23
	bl	_printf
	add	w24, w24, #1
	cmp	w21, w24
	b.ne	LBB0_21
	b	LBB0_18
LBB0_22:
	mov	x0, x20
	bl	_PQclear
Lloh35:
	adrp	x1, l_.str.13@PAGE
Lloh36:
	add	x1, x1, l_.str.13@PAGEOFF
	mov	x0, x19
	bl	_PQexec
	bl	_PQclear
Lloh37:
	adrp	x1, l_.str.14@PAGE
Lloh38:
	add	x1, x1, l_.str.14@PAGEOFF
	mov	x0, x19
	bl	_PQexec
	bl	_PQclear
	mov	x0, x19
	bl	_PQfinish
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dbname = postgres"

	.comm	_CONNECTION_OK,8,3              ; @CONNECTION_OK
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"Connection to database failed: %s"

l_.str.2:                               ; @.str.2
	.asciz	"SELECT pg_catalog.set_config('search_path', '', false)"

	.comm	_PGRES_TUPLES_OK,8,3            ; @PGRES_TUPLES_OK
l_.str.3:                               ; @.str.3
	.asciz	"SET failed: %s"

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

	.comm	_PGRES_COMMAND_OK,8,3           ; @PGRES_COMMAND_OK
l_.str.5:                               ; @.str.5
	.asciz	"BEGIN command failed: %s"

l_.str.6:                               ; @.str.6
	.asciz	"DECLARE myportal CURSOR FOR select * from pg_database"

l_.str.7:                               ; @.str.7
	.asciz	"DECLARE CURSOR failed: %s"

l_.str.8:                               ; @.str.8
	.asciz	"FETCH ALL in myportal"

l_.str.9:                               ; @.str.9
	.asciz	"FETCH ALL failed: %s"

l_.str.10:                              ; @.str.10
	.asciz	"%-15s"

l_.str.13:                              ; @.str.13
	.asciz	"CLOSE myportal"

l_.str.14:                              ; @.str.14
	.asciz	"END"

l_str:                                  ; @str
	.asciz	"\n"

.subsections_via_symbols
