	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ExecQueryUsingCursor
_ExecQueryUsingCursor:                  ## @ExecQueryUsingCursor
	.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	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_pset@GOTPCREL(%rip), %r12
	movupd	64(%r12), %xmm0
	movapd	%xmm0, -208(%rbp)
	movq	%rsi, -176(%rbp)                ## 8-byte Spill
	movq	$0, (%rsi)
	movq	$1, -208(%rbp)
	movq	$0, -192(%rbp)
	cmpq	$0, 8(%r12)
	je	LBB0_2
## %bb.1:
	callq	_INSTR_TIME_SET_CURRENT
LBB0_2:
	movl	16(%r12), %edi
	callq	_PQtransactionStatus
	movq	%rax, %r13
	movq	_PQTRANS_IDLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -216(%rbp)                ## 8-byte Spill
	cmpq	%rax, %r13
	jne	LBB0_5
## %bb.3:
	movl	16(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_PQexec
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_AcceptResult
	testl	%eax, %eax
	je	LBB0_25
## %bb.4:
	movq	%rbx, %rdi
	callq	_PQresultStatus
	movq	%rax, -168(%rbp)                ## 8-byte Spill
	movq	_PGRES_COMMAND_OK@GOTPCREL(%rip), %rax
	movq	%r14, %r12
	movq	%r13, %r14
	movq	(%rax), %r13
	movq	%rbx, %rdi
	callq	_ClearOrSaveResult
	xorl	%r15d, %r15d
	cmpq	%r13, -168(%rbp)                ## 8-byte Folded Reload
	movq	%r14, %r13
	movq	%r12, %r14
	movq	_pset@GOTPCREL(%rip), %r12
	jne	LBB0_34
LBB0_5:
	leaq	-184(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_initPQExpBuffer
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_appendPQExpBuffer
	movl	16(%r12), %edi
	movq	-184(%rbp), %rsi
	callq	_PQexec
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_AcceptResult
	testl	%eax, %eax
	je	LBB0_17
## %bb.6:
	movq	%rbx, %rdi
	callq	_PQresultStatus
	movq	_PGRES_COMMAND_OK@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	sete	%r14b
	jne	LBB0_17
## %bb.7:
	movq	%r13, -168(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_ClearOrSaveResult
	leaq	-184(%rbp), %rdi
	callq	_termPQExpBuffer
	cmpq	$0, 8(%r12)
	je	LBB0_9
## %bb.8:
	callq	_INSTR_TIME_SET_CURRENT
	callq	_INSTR_TIME_SUBTRACT
	callq	_INSTR_TIME_GET_MILLISEC
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	movq	-176(%rbp), %rax                ## 8-byte Reload
	addsd	(%rax), %xmm0
	movsd	%xmm0, (%rax)
LBB0_9:
	cmpq	$0, 40(%r12)
	movl	$2, %r13d
	jne	LBB0_11
## %bb.10:
	movl	(%r12), %r13d
LBB0_11:
	leaq	L_.str.2(%rip), %rdx
	leaq	-112(%rbp), %rdi
	movl	$64, %esi
	movl	%r13d, %ecx
	callq	_snprintf
	cmpq	$0, 56(%r12)
	je	LBB0_13
## %bb.12:
	movl	$1, -200(%rbp)
LBB0_13:
	movq	24(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_36
## %bb.14:
	leaq	-152(%rbp), %rsi
	leaq	-160(%rbp), %rdx
	callq	_openQueryOutputFile
	testl	%eax, %eax
	je	LBB0_53
## %bb.15:
	cmpl	$0, -160(%rbp)
	je	LBB0_37
## %bb.16:
	xorl	%eax, %eax
	callq	_disable_sigpipe_trap
	jmp	LBB0_37
LBB0_17:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_SetResultVariables
	movq	%rbx, %rdi
	callq	_ClearOrSaveResult
	leaq	-184(%rbp), %rdi
	callq	_termPQExpBuffer
LBB0_18:
	movb	$1, %r14b
LBB0_19:
	cmpq	$0, 8(%r12)
	je	LBB0_21
## %bb.20:
	callq	_INSTR_TIME_SET_CURRENT
LBB0_21:
	movl	16(%r12), %edi
	leaq	L_.str.8(%rip), %rsi
	callq	_PQexec
	movq	%rax, %rbx
	testb	%r14b, %r14b
	je	LBB0_23
## %bb.22:
	movq	%rbx, %rdi
	callq	_PQclear
	xorl	%r15d, %r15d
	cmpq	-216(%rbp), %r13                ## 8-byte Folded Reload
	je	LBB0_28
	jmp	LBB0_32
LBB0_23:
	movq	%rbx, %rdi
	callq	_AcceptResult
	testl	%eax, %eax
	je	LBB0_26
## %bb.24:
	movq	%rbx, %rdi
	callq	_PQresultStatus
	movq	_PGRES_COMMAND_OK@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	sete	%r15b
	jmp	LBB0_27
LBB0_25:
	movq	%rbx, %rdi
	callq	_ClearOrSaveResult
	xorl	%r15d, %r15d
	jmp	LBB0_34
LBB0_26:
	xorl	%r15d, %r15d
LBB0_27:
	movq	%rbx, %rdi
	callq	_ClearOrSaveResult
	cmpq	-216(%rbp), %r13                ## 8-byte Folded Reload
	jne	LBB0_32
LBB0_28:
	movl	16(%r12), %edi
	testl	%r15d, %r15d
	leaq	L_.str.10(%rip), %rax
	leaq	L_.str.9(%rip), %rsi
	cmoveq	%rax, %rsi
	callq	_PQexec
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_AcceptResult
	testl	%eax, %eax
	je	LBB0_30
## %bb.29:
	movq	%rbx, %rdi
	callq	_PQresultStatus
	movq	_PGRES_COMMAND_OK@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpq	(%rdx), %rax
	sete	%cl
	jmp	LBB0_31
LBB0_30:
	xorl	%ecx, %ecx
LBB0_31:
	andl	%ecx, %r15d
	movq	%rbx, %rdi
	callq	_ClearOrSaveResult
LBB0_32:
	cmpq	$0, 8(%r12)
	je	LBB0_34
## %bb.33:
	callq	_INSTR_TIME_SET_CURRENT
	callq	_INSTR_TIME_SUBTRACT
	callq	_INSTR_TIME_GET_MILLISEC
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	movq	-176(%rbp), %rax                ## 8-byte Reload
	addsd	(%rax), %xmm0
	movsd	%xmm0, (%rax)
LBB0_34:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_71
## %bb.35:
	movl	%r15d, %eax
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_36:
	movq	48(%r12), %rax
	movq	%rax, -152(%rbp)
	movl	$0, -160(%rbp)
LBB0_37:
	movb	%r14b, %r15b
	movl	%r15d, -156(%rbp)               ## 4-byte Spill
	movq	-152(%rbp), %rdi
	callq	_clearerr
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_38:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 8(%r12)
	je	LBB0_40
## %bb.39:                              ##   in Loop: Header=BB0_38 Depth=1
	callq	_INSTR_TIME_SET_CURRENT
LBB0_40:                                ##   in Loop: Header=BB0_38 Depth=1
	movl	16(%r12), %edi
	leaq	-112(%rbp), %rsi
	callq	_PQexec
	movq	%rax, %r14
	cmpq	$0, 8(%r12)
	je	LBB0_42
## %bb.41:                              ##   in Loop: Header=BB0_38 Depth=1
	callq	_INSTR_TIME_SET_CURRENT
	callq	_INSTR_TIME_SUBTRACT
	callq	_INSTR_TIME_GET_MILLISEC
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	movq	-176(%rbp), %rax                ## 8-byte Reload
	addsd	(%rax), %xmm0
	movsd	%xmm0, (%rax)
LBB0_42:                                ##   in Loop: Header=BB0_38 Depth=1
	movq	%r14, %rdi
	callq	_PQresultStatus
	movq	_PGRES_TUPLES_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_54
## %bb.43:                              ##   in Loop: Header=BB0_38 Depth=1
	cmpq	$0, 40(%r12)
	jne	LBB0_57
## %bb.44:                              ##   in Loop: Header=BB0_38 Depth=1
	movq	%r14, %rdi
	callq	_PQntuples
	movl	%eax, %r12d
	cmpl	%r13d, %eax
	jge	LBB0_46
## %bb.45:                              ##   in Loop: Header=BB0_38 Depth=1
	movl	$1, -204(%rbp)
	movq	-152(%rbp), %rdx
	jmp	LBB0_49
	.p2align	4, 0x90
LBB0_46:                                ##   in Loop: Header=BB0_38 Depth=1
	movq	-152(%rbp), %rdx
	testl	%r15d, %r15d
	jne	LBB0_49
## %bb.47:                              ##   in Loop: Header=BB0_38 Depth=1
	movq	_stdout@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_49
## %bb.48:                              ##   in Loop: Header=BB0_38 Depth=1
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-208(%rbp), %rsi
	callq	_PageOutput
	movq	%rax, %rdx
	movq	%rax, -152(%rbp)
	movl	$1, %r15d
LBB0_49:                                ##   in Loop: Header=BB0_38 Depth=1
	addl	%r12d, %ebx
	movq	_pset@GOTPCREL(%rip), %rax
	movl	32(%rax), %r8d
	movq	%r14, %rdi
	leaq	-208(%rbp), %rsi
	movl	%r15d, %ecx
	callq	_printQuery
	movq	%r14, %rdi
	callq	_ClearOrSaveResult
	movl	$0, -208(%rbp)
	movslq	%r12d, %rax
	addq	%rax, -192(%rbp)
	movq	-152(%rbp), %rdi
	callq	_fflush
	testl	%eax, %eax
	jne	LBB0_59
## %bb.50:                              ##   in Loop: Header=BB0_38 Depth=1
	cmpl	%r13d, %r12d
	jl	LBB0_59
## %bb.51:                              ##   in Loop: Header=BB0_38 Depth=1
	movq	_cancel_pressed@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	_pset@GOTPCREL(%rip), %r12
	jne	LBB0_60
## %bb.52:                              ##   in Loop: Header=BB0_38 Depth=1
	movq	-152(%rbp), %rdi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_38
	jmp	LBB0_60
LBB0_53:
	movb	$1, %r14b
	movq	-168(%rbp), %r13                ## 8-byte Reload
	jmp	LBB0_19
LBB0_54:
	testl	%r15d, %r15d
	je	LBB0_56
## %bb.55:
	movq	-152(%rbp), %rdi
	callq	_ClosePager
LBB0_56:
	movq	%r14, %rdi
	callq	_AcceptResult
	movl	%eax, %r15d
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_Assert
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_SetResultVariables
	movq	%r14, %rdi
	callq	_ClearOrSaveResult
	cmpq	$0, 24(%r12)
	movq	-168(%rbp), %r13                ## 8-byte Reload
	jne	LBB0_62
	jmp	LBB0_67
LBB0_57:
	movq	%r14, %rdi
	callq	_StoreQueryTuple
	movl	%eax, -156(%rbp)                ## 4-byte Spill
	movq	%r14, %rdi
	callq	_ClearOrSaveResult
	jmp	LBB0_60
LBB0_59:
	movq	_pset@GOTPCREL(%rip), %r12
LBB0_60:
	cmpq	$0, 24(%r12)
	movq	-168(%rbp), %r13                ## 8-byte Reload
	je	LBB0_64
## %bb.61:
	movl	-156(%rbp), %r15d               ## 4-byte Reload
LBB0_62:
	cmpl	$0, -160(%rbp)
	movq	-152(%rbp), %rdi
	je	LBB0_69
## %bb.63:
	callq	_pclose
	xorl	%eax, %eax
	callq	_restore_sigpipe_trap
	testl	%r15d, %r15d
	jne	LBB0_68
	jmp	LBB0_18
LBB0_64:
	testl	%r15d, %r15d
	je	LBB0_66
## %bb.65:
	movq	-152(%rbp), %rdi
	callq	_ClosePager
LBB0_66:
	movl	-156(%rbp), %r15d               ## 4-byte Reload
LBB0_67:
	testl	%r15d, %r15d
	je	LBB0_18
LBB0_68:
	movl	20(%r12), %edi
	leaq	L_.str.3(%rip), %rsi
	leaq	L_.str.4(%rip), %rdx
	callq	_SetVariable
	movl	20(%r12), %edi
	leaq	L_.str.5(%rip), %rsi
	leaq	L_.str.6(%rip), %rdx
	callq	_SetVariable
	movq	_INT64_FORMAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	-144(%rbp), %r14
	movq	%r14, %rdi
	movl	$32, %esi
	movl	%ebx, %ecx
	callq	_snprintf
	movl	20(%r12), %edi
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdx
	callq	_SetVariable
	xorl	%r14d, %r14d
	jmp	LBB0_19
LBB0_69:
	callq	_fclose
	testl	%r15d, %r15d
	jne	LBB0_68
	jmp	LBB0_18
LBB0_71:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_pset,88,3                      ## @pset
	.comm	_PQTRANS_IDLE,8,3               ## @PQTRANS_IDLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BEGIN"

	.comm	_PGRES_COMMAND_OK,8,3           ## @PGRES_COMMAND_OK
L_.str.1:                               ## @.str.1
	.asciz	"DECLARE _psql_cursor NO SCROLL CURSOR FOR\n%s"

L_.str.2:                               ## @.str.2
	.asciz	"FETCH FORWARD %d FROM _psql_cursor"

	.comm	_PGRES_TUPLES_OK,8,3            ## @PGRES_TUPLES_OK
	.comm	_stdout,8,3                     ## @stdout
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_cancel_pressed,8,3             ## @cancel_pressed
L_.str.3:                               ## @.str.3
	.asciz	"ERROR"

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

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

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

	.comm	_INT64_FORMAT,8,3               ## @INT64_FORMAT
L_.str.7:                               ## @.str.7
	.asciz	"ROW_COUNT"

L_.str.8:                               ## @.str.8
	.asciz	"CLOSE _psql_cursor"

L_.str.9:                               ## @.str.9
	.asciz	"COMMIT"

L_.str.10:                              ## @.str.10
	.asciz	"ROLLBACK"

	.no_dead_strip	_ExecQueryUsingCursor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ExecQueryUsingCursor
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ExecQueryUsingCursor:                  ; @ExecQueryUsingCursor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #256
	.cfi_def_cfa_offset 256
	stp	x28, x27, [sp, #160]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #176]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #192]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #208]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #224]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #240]            ; 16-byte Folded Spill
	add	x29, sp, #240
	.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, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
Lloh3:
	adrp	x27, _pset@GOTPAGE
Lloh4:
	ldr	x27, [x27, _pset@GOTPAGEOFF]
	ldr	q0, [x27, #64]
	str	q0, [sp, #16]
	str	xzr, [x1]
Lloh5:
	adrp	x8, lCPI0_0@PAGE
Lloh6:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #16]
	str	xzr, [sp, #32]
	ldr	x8, [x27, #8]
	cbz	x8, LBB0_2
; %bb.1:
	bl	_INSTR_TIME_SET_CURRENT
LBB0_2:
	ldr	w0, [x27, #16]
	bl	_PQtransactionStatus
	mov	x20, x0
Lloh7:
	adrp	x8, _PQTRANS_IDLE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PQTRANS_IDLE@GOTPAGEOFF]
Lloh9:
	ldr	x28, [x8]
	cmp	x0, x28
	b.ne	LBB0_5
; %bb.3:
	ldr	w0, [x27, #16]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PQexec
	mov	x22, x0
	bl	_AcceptResult
	cbz	w0, LBB0_22
; %bb.4:
	mov	x0, x22
	bl	_PQresultStatus
	mov	x23, x0
Lloh12:
	adrp	x8, _PGRES_COMMAND_OK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PGRES_COMMAND_OK@GOTPAGEOFF]
Lloh14:
	ldr	x24, [x8]
	mov	x0, x22
	bl	_ClearOrSaveResult
	cmp	x23, x24
	b.ne	LBB0_23
LBB0_5:
	add	x0, sp, #40
	bl	_initPQExpBuffer
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #40
	mov	x2, x21
	bl	_appendPQExpBuffer
	ldr	w0, [x27, #16]
	ldr	x1, [sp, #40]
	bl	_PQexec
	mov	x22, x0
	bl	_AcceptResult
	cbz	w0, LBB0_15
; %bb.6:
	mov	x0, x22
	bl	_PQresultStatus
Lloh17:
	adrp	x8, _PGRES_COMMAND_OK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PGRES_COMMAND_OK@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w21, eq
	b.ne	LBB0_15
; %bb.7:
	mov	x0, x22
	bl	_ClearOrSaveResult
	add	x0, sp, #40
	bl	_termPQExpBuffer
	ldr	x8, [x27, #8]
	cbz	x8, LBB0_9
; %bb.8:
	bl	_INSTR_TIME_SET_CURRENT
	bl	_INSTR_TIME_SUBTRACT
	bl	_INSTR_TIME_GET_MILLISEC
	scvtf	d0, x0
	ldr	d1, [x19]
	fadd	d0, d1, d0
	str	d0, [x19]
LBB0_9:
	ldr	x8, [x27, #40]
	ldr	w9, [x27]
	cmp	x8, #0
	mov	w8, #2
	csel	w23, w9, w8, eq
Lloh20:
	adrp	x2, l_.str.2@PAGE
Lloh21:
	add	x2, x2, l_.str.2@PAGEOFF
	add	x0, sp, #80
	mov	w1, #64
	mov	x3, x23
	bl	_snprintf
	ldr	x8, [x27, #56]
	cbz	x8, LBB0_11
; %bb.10:
	mov	w8, #1
	str	w8, [sp, #24]
LBB0_11:
	ldr	x0, [x27, #24]
	cbz	x0, LBB0_34
; %bb.12:
	add	x1, sp, #8
	add	x2, sp, #4
	bl	_openQueryOutputFile
	cbz	w0, LBB0_16
; %bb.13:
	str	w21, [sp]                       ; 4-byte Folded Spill
	ldr	w8, [sp, #4]
	cbz	w8, LBB0_35
; %bb.14:
	bl	_disable_sigpipe_trap
	b	LBB0_35
LBB0_15:
	mov	x0, x22
	mov	w1, #0
	bl	_SetResultVariables
	mov	x0, x22
	bl	_ClearOrSaveResult
	add	x0, sp, #40
	bl	_termPQExpBuffer
LBB0_16:
	mov	w21, #1
	ldr	x8, [x27, #8]
	cbz	x8, LBB0_18
LBB0_17:
	bl	_INSTR_TIME_SET_CURRENT
LBB0_18:
	ldr	w0, [x27, #16]
Lloh22:
	adrp	x1, l_.str.8@PAGE
Lloh23:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_PQexec
	mov	x22, x0
	tbz	w21, #0, LBB0_20
; %bb.19:
	mov	x0, x22
	bl	_PQclear
	mov	w21, #0
	cmp	x20, x28
	b.eq	LBB0_26
	b	LBB0_30
LBB0_20:
	mov	x0, x22
	bl	_AcceptResult
	cbz	w0, LBB0_24
; %bb.21:
	mov	x0, x22
	bl	_PQresultStatus
Lloh24:
	adrp	x8, _PGRES_COMMAND_OK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PGRES_COMMAND_OK@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w21, eq
	b	LBB0_25
LBB0_22:
	mov	x0, x22
	bl	_ClearOrSaveResult
LBB0_23:
	mov	w21, #0
	b	LBB0_32
LBB0_24:
	mov	w21, #0
LBB0_25:
	mov	x0, x22
	bl	_ClearOrSaveResult
	cmp	x20, x28
	b.ne	LBB0_30
LBB0_26:
	ldr	w0, [x27, #16]
Lloh27:
	adrp	x8, l_.str.9@PAGE
Lloh28:
	add	x8, x8, l_.str.9@PAGEOFF
Lloh29:
	adrp	x9, l_.str.10@PAGE
Lloh30:
	add	x9, x9, l_.str.10@PAGEOFF
	cmp	w21, #0
	csel	x1, x9, x8, eq
	bl	_PQexec
	mov	x20, x0
	bl	_AcceptResult
	cbz	w0, LBB0_28
; %bb.27:
	mov	x0, x20
	bl	_PQresultStatus
Lloh31:
	adrp	x8, _PGRES_COMMAND_OK@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PGRES_COMMAND_OK@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w8, eq
	b	LBB0_29
LBB0_28:
	mov	w8, #0
LBB0_29:
	and	w21, w8, w21
	mov	x0, x20
	bl	_ClearOrSaveResult
LBB0_30:
	ldr	x8, [x27, #8]
	cbz	x8, LBB0_32
; %bb.31:
	bl	_INSTR_TIME_SET_CURRENT
	bl	_INSTR_TIME_SUBTRACT
	bl	_INSTR_TIME_GET_MILLISEC
	scvtf	d0, x0
	ldr	d1, [x19]
	fadd	d0, d1, d0
	str	d0, [x19]
LBB0_32:
	ldur	x8, [x29, #-96]
Lloh34:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh35:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_62
; %bb.33:
	mov	x0, x21
	ldp	x29, x30, [sp, #240]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #224]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #208]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #192]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #176]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #256
	ret
LBB0_34:
	stp	w21, wzr, [sp]                  ; 4-byte Folded Spill
	ldr	x8, [x27, #48]
	str	x8, [sp, #8]
LBB0_35:
	ldr	x0, [sp, #8]
	bl	_clearerr
	mov	w24, #0
	mov	w22, #0
Lloh37:
	adrp	x21, _PGRES_TUPLES_OK@GOTPAGE
Lloh38:
	ldr	x21, [x21, _PGRES_TUPLES_OK@GOTPAGEOFF]
LBB0_36:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x27, #8]
	cbz	x8, LBB0_38
; %bb.37:                               ;   in Loop: Header=BB0_36 Depth=1
	bl	_INSTR_TIME_SET_CURRENT
LBB0_38:                                ;   in Loop: Header=BB0_36 Depth=1
	ldr	w0, [x27, #16]
	add	x1, sp, #80
	bl	_PQexec
	mov	x25, x0
	ldr	x8, [x27, #8]
	cbz	x8, LBB0_40
; %bb.39:                               ;   in Loop: Header=BB0_36 Depth=1
	bl	_INSTR_TIME_SET_CURRENT
	bl	_INSTR_TIME_SUBTRACT
	bl	_INSTR_TIME_GET_MILLISEC
	scvtf	d0, x0
	ldr	d1, [x19]
	fadd	d0, d1, d0
	str	d0, [x19]
LBB0_40:                                ;   in Loop: Header=BB0_36 Depth=1
	mov	x0, x25
	bl	_PQresultStatus
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_51
; %bb.41:                               ;   in Loop: Header=BB0_36 Depth=1
	ldr	x8, [x27, #40]
	cbnz	x8, LBB0_54
; %bb.42:                               ;   in Loop: Header=BB0_36 Depth=1
	mov	x0, x25
	bl	_PQntuples
	mov	x26, x0
	cmp	w0, w23
	b.ge	LBB0_44
; %bb.43:                               ;   in Loop: Header=BB0_36 Depth=1
	mov	w8, #1
	str	w8, [sp, #20]
	ldr	x2, [sp, #8]
	b	LBB0_47
LBB0_44:                                ;   in Loop: Header=BB0_36 Depth=1
	ldr	x2, [sp, #8]
	cbnz	w24, LBB0_47
; %bb.45:                               ;   in Loop: Header=BB0_36 Depth=1
Lloh39:
	adrp	x8, _stdout@GOTPAGE
Lloh40:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ne	LBB0_47
; %bb.46:                               ;   in Loop: Header=BB0_36 Depth=1
Lloh42:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh43:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh44:
	ldr	w0, [x8]
	add	x1, sp, #16
	bl	_PageOutput
	mov	x2, x0
	str	x0, [sp, #8]
	mov	w24, #1
LBB0_47:                                ;   in Loop: Header=BB0_36 Depth=1
	add	w22, w26, w22
	ldr	w4, [x27, #32]
	add	x1, sp, #16
	mov	x0, x25
	mov	x3, x24
	bl	_printQuery
	mov	x0, x25
	bl	_ClearOrSaveResult
	str	wzr, [sp, #16]
	ldr	x8, [sp, #32]
	add	x8, x8, w26, sxtw
	str	x8, [sp, #32]
	ldr	x0, [sp, #8]
	bl	_fflush
	cbnz	w0, LBB0_50
; %bb.48:                               ;   in Loop: Header=BB0_36 Depth=1
Lloh45:
	adrp	x8, _cancel_pressed@GOTPAGE
Lloh46:
	ldr	x8, [x8, _cancel_pressed@GOTPAGEOFF]
Lloh47:
	ldr	x8, [x8]
	cmp	w26, w23
	ccmp	x8, #0, #0, ge
	b.ne	LBB0_50
; %bb.49:                               ;   in Loop: Header=BB0_36 Depth=1
	ldr	x0, [sp, #8]
	bl	_ferror
	cbz	x0, LBB0_36
LBB0_50:
	ldr	w21, [sp]                       ; 4-byte Folded Reload
	ldr	x8, [x27, #24]
	cbnz	x8, LBB0_55
	b	LBB0_57
LBB0_51:
	cbz	w24, LBB0_53
; %bb.52:
	ldr	x0, [sp, #8]
	bl	_ClosePager
LBB0_53:
	mov	x0, x25
	bl	_AcceptResult
	mov	x21, x0
	cmp	w0, #0
	cset	w0, eq
	bl	_Assert
	mov	x0, x25
	mov	x1, x21
	bl	_SetResultVariables
	mov	x0, x25
	bl	_ClearOrSaveResult
	ldr	x8, [x27, #24]
	cbnz	x8, LBB0_55
	b	LBB0_60
LBB0_54:
	mov	x0, x25
	bl	_StoreQueryTuple
	mov	x21, x0
	mov	x0, x25
	bl	_ClearOrSaveResult
	ldr	x8, [x27, #24]
	cbz	x8, LBB0_57
LBB0_55:
	ldr	w8, [sp, #4]
	ldr	x0, [sp, #8]
	cbz	w8, LBB0_59
; %bb.56:
	bl	_pclose
	bl	_restore_sigpipe_trap
	b	LBB0_60
LBB0_57:
	cbz	w24, LBB0_60
; %bb.58:
	ldr	x0, [sp, #8]
	bl	_ClosePager
	b	LBB0_60
LBB0_59:
	bl	_fclose
LBB0_60:
	cbz	w21, LBB0_16
; %bb.61:
	ldr	w0, [x27, #20]
Lloh48:
	adrp	x1, l_.str.3@PAGE
Lloh49:
	add	x1, x1, l_.str.3@PAGEOFF
Lloh50:
	adrp	x2, l_.str.4@PAGE
Lloh51:
	add	x2, x2, l_.str.4@PAGEOFF
	bl	_SetVariable
	ldr	w0, [x27, #20]
Lloh52:
	adrp	x1, l_.str.5@PAGE
Lloh53:
	add	x1, x1, l_.str.5@PAGEOFF
Lloh54:
	adrp	x2, l_.str.6@PAGE
Lloh55:
	add	x2, x2, l_.str.6@PAGEOFF
	bl	_SetVariable
Lloh56:
	adrp	x8, _INT64_FORMAT@GOTPAGE
Lloh57:
	ldr	x8, [x8, _INT64_FORMAT@GOTPAGEOFF]
Lloh58:
	ldr	x2, [x8]
	add	x0, sp, #48
	mov	w1, #32
	mov	x3, x22
	bl	_snprintf
	ldr	w0, [x27, #20]
Lloh59:
	adrp	x1, l_.str.7@PAGE
Lloh60:
	add	x1, x1, l_.str.7@PAGEOFF
	add	x2, sp, #48
	bl	_SetVariable
	mov	w21, #0
	ldr	x8, [x27, #8]
	cbnz	x8, LBB0_17
	b	LBB0_18
LBB0_62:
	bl	___stack_chk_fail
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_pset,88,3                      ; @pset
	.comm	_PQTRANS_IDLE,8,3               ; @PQTRANS_IDLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BEGIN"

	.comm	_PGRES_COMMAND_OK,8,3           ; @PGRES_COMMAND_OK
l_.str.1:                               ; @.str.1
	.asciz	"DECLARE _psql_cursor NO SCROLL CURSOR FOR\n%s"

l_.str.2:                               ; @.str.2
	.asciz	"FETCH FORWARD %d FROM _psql_cursor"

	.comm	_PGRES_TUPLES_OK,8,3            ; @PGRES_TUPLES_OK
	.comm	_stdout,8,3                     ; @stdout
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_cancel_pressed,8,3             ; @cancel_pressed
l_.str.3:                               ; @.str.3
	.asciz	"ERROR"

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

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

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

	.comm	_INT64_FORMAT,8,3               ; @INT64_FORMAT
l_.str.7:                               ; @.str.7
	.asciz	"ROW_COUNT"

l_.str.8:                               ; @.str.8
	.asciz	"CLOSE _psql_cursor"

l_.str.9:                               ; @.str.9
	.asciz	"COMMIT"

l_.str.10:                              ; @.str.10
	.asciz	"ROLLBACK"

	.no_dead_strip	_ExecQueryUsingCursor
.subsections_via_symbols
