	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PQcopyResult                   ## -- Begin function PQcopyResult
	.p2align	4, 0x90
_PQcopyResult:                          ## @PQcopyResult
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	_PGRES_TUPLES_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_PQmakeEmptyPGresult
	testq	%rax, %rax
	je	LBB0_29
## %bb.3:
	movq	%rax, %r14
	movl	48(%r12), %eax
	movl	%eax, 48(%r14)
	movl	44(%r14), %edi
	movl	44(%r12), %esi
	callq	_strcpy
	movq	_PG_COPYRES_ATTRS@GOTPCREL(%rip), %rcx
	movq	_PG_COPYRES_TUPLES@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movl	(%rcx), %ecx
	orl	%eax, %ecx
	testl	%r15d, %ecx
	je	LBB0_6
## %bb.4:
	movl	(%r12), %esi
	movl	40(%r12), %edx
	movq	%r14, %rdi
	callq	_PQsetResultAttrs
	testl	%eax, %eax
	je	LBB0_25
## %bb.5:
	movl	(%rbx), %eax
LBB0_6:
	testl	%r15d, %eax
	je	LBB0_15
## %bb.7:
	movl	4(%r12), %ecx
	testl	%ecx, %ecx
	jle	LBB0_15
## %bb.8:
	movl	(%r12), %eax
	xorl	%r13d, %r13d
	jmp	LBB0_9
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%r13
	movslq	%ecx, %rdx
	cmpq	%rdx, %r13
	jge	LBB0_15
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	testl	%eax, %eax
	jle	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	32(%r12), %rax
	movq	(%rax,%r13,8), %rax
	movl	(%rax,%rbx,8), %r8d
	movl	4(%rax,%rbx,8), %ecx
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%ebx, %edx
	callq	_PQsetvalue
	testl	%eax, %eax
	je	LBB0_25
## %bb.11:                              ##   in Loop: Header=BB0_12 Depth=2
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	4(%r12), %ecx
	jmp	LBB0_14
LBB0_15:
	movq	_PG_COPYRES_NOTICEHOOKS@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_17
## %bb.16:
	movl	28(%r12), %eax
	movl	%eax, 28(%r14)
LBB0_17:
	movq	_PG_COPYRES_EVENTS@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_21
## %bb.18:
	movq	8(%r12), %rsi
	testq	%rsi, %rsi
	jle	LBB0_21
## %bb.19:
	movq	16(%r12), %rdi
	movq	%r14, %rdx
	addq	$24, %rdx
	callq	_dupEvents
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_25
## %bb.20:
	movq	8(%r12), %rax
	movq	%rax, 8(%r14)
LBB0_21:
	movq	8(%r14), %rax
	testq	%rax, %rax
	jle	LBB0_28
## %bb.22:
	xorl	%ebx, %ebx
	leaq	-56(%rbp), %r15
	xorl	%r13d, %r13d
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_23 Depth=1
	incq	%r13
	addq	$16, %rbx
	cmpq	%r13, %rax
	jle	LBB0_28
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rcx
	cmpl	$0, (%rcx,%rbx)
	je	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=1
	movq	%r12, -48(%rbp)
	movq	%r14, -56(%rbp)
	movq	16(%r14), %rax
	movq	_PGEVT_RESULTCOPY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	4(%rax,%rbx), %edx
	movq	%r15, %rsi
	callq	*8(%rax,%rbx)
	testl	%eax, %eax
	je	LBB0_25
## %bb.26:                              ##   in Loop: Header=BB0_23 Depth=1
	movq	16(%r14), %rax
	movl	$1, (%rax,%rbx)
	movq	8(%r14), %rax
	jmp	LBB0_27
LBB0_25:
	movq	%r14, %rdi
	callq	_PQclear
	xorl	%ebx, %ebx
	jmp	LBB0_29
LBB0_28:
	movq	%r14, %rbx
LBB0_29:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PGRES_TUPLES_OK,4,2            ## @PGRES_TUPLES_OK
	.comm	_PG_COPYRES_ATTRS,4,2           ## @PG_COPYRES_ATTRS
	.comm	_PG_COPYRES_TUPLES,4,2          ## @PG_COPYRES_TUPLES
	.comm	_PG_COPYRES_NOTICEHOOKS,4,2     ## @PG_COPYRES_NOTICEHOOKS
	.comm	_PG_COPYRES_EVENTS,4,2          ## @PG_COPYRES_EVENTS
	.comm	_PGEVT_RESULTCOPY,4,2           ## @PGEVT_RESULTCOPY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PQcopyResult                   ; -- Begin function PQcopyResult
	.p2align	2
_PQcopyResult:                          ; @PQcopyResult
	.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
	cbz	x0, LBB0_27
; %bb.1:
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _PGRES_TUPLES_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PGRES_TUPLES_OK@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, #0
	bl	_PQmakeEmptyPGresult
	mov	x19, x0
	cbz	x0, LBB0_28
; %bb.2:
	ldr	w8, [x20, #48]
	str	w8, [x19, #48]
	ldr	w0, [x19, #44]
	ldr	w1, [x20, #44]
	bl	_strcpy
Lloh3:
	adrp	x8, _PG_COPYRES_ATTRS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PG_COPYRES_ATTRS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
Lloh6:
	adrp	x22, _PG_COPYRES_TUPLES@GOTPAGE
Lloh7:
	ldr	x22, [x22, _PG_COPYRES_TUPLES@GOTPAGEOFF]
	ldr	w8, [x22]
	orr	w9, w8, w9
	tst	w9, w21
	b.eq	LBB0_5
; %bb.3:
	ldr	w1, [x20]
	ldr	w2, [x20, #40]
	mov	x0, x19
	bl	_PQsetResultAttrs
	cbz	w0, LBB0_26
; %bb.4:
	ldr	w8, [x22]
LBB0_5:
	tst	w8, w21
	b.eq	LBB0_14
; %bb.6:
	ldr	w9, [x20, #4]
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.7:
	mov	x22, #0
	ldr	w8, [x20]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x22, x22, #1
	cmp	x22, w9, sxtw
	b.ge	LBB0_14
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x24, #0
	mov	x23, #0
LBB0_11:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x20, #32]
	ldr	x8, [x8, x22, lsl #3]
	add	x8, x8, x24
	ldp	w4, w3, [x8]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_PQsetvalue
	cbz	w0, LBB0_26
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	add	x23, x23, #1
	ldrsw	x8, [x20]
	add	x24, x24, #8
	cmp	x23, x8
	b.lt	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w9, [x20, #4]
	b	LBB0_8
LBB0_14:
Lloh8:
	adrp	x8, _PG_COPYRES_NOTICEHOOKS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PG_COPYRES_NOTICEHOOKS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_16
; %bb.15:
	ldr	w8, [x20, #28]
	str	w8, [x19, #28]
LBB0_16:
Lloh11:
	adrp	x8, _PG_COPYRES_EVENTS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PG_COPYRES_EVENTS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_20
; %bb.17:
	ldr	x1, [x20, #8]
	cmp	x1, #1
	b.lt	LBB0_20
; %bb.18:
	ldr	x0, [x20, #16]
	add	x2, x19, #24
	bl	_dupEvents
	str	x0, [x19, #16]
	cbz	x0, LBB0_26
; %bb.19:
	ldr	x8, [x20, #8]
	str	x8, [x19, #8]
LBB0_20:
	ldr	x8, [x19, #8]
	cmp	x8, #1
	b.lt	LBB0_28
; %bb.21:
	mov	x21, #0
	mov	x22, #0
Lloh14:
	adrp	x23, _PGEVT_RESULTCOPY@GOTPAGE
Lloh15:
	ldr	x23, [x23, _PGEVT_RESULTCOPY@GOTPAGEOFF]
	mov	w24, #1
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	add	x22, x22, #1
	add	x21, x21, #16
	cmp	x8, x22
	b.le	LBB0_28
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #16]
	ldr	w9, [x9, x21]
	cbz	w9, LBB0_22
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	stp	x19, x20, [sp]
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	ldr	x9, [x8, #8]
	ldr	w0, [x23]
	ldr	w2, [x8, #4]
	mov	x1, sp
	blr	x9
	cbz	w0, LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_23 Depth=1
	ldr	x8, [x19, #16]
	str	w24, [x8, x21]
	ldr	x8, [x19, #8]
	b	LBB0_22
LBB0_26:
	mov	x0, x19
	bl	_PQclear
LBB0_27:
	mov	x19, #0
LBB0_28:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_PGRES_TUPLES_OK,4,2            ; @PGRES_TUPLES_OK
	.comm	_PG_COPYRES_ATTRS,4,2           ; @PG_COPYRES_ATTRS
	.comm	_PG_COPYRES_TUPLES,4,2          ; @PG_COPYRES_TUPLES
	.comm	_PG_COPYRES_NOTICEHOOKS,4,2     ; @PG_COPYRES_NOTICEHOOKS
	.comm	_PG_COPYRES_EVENTS,4,2          ; @PG_COPYRES_EVENTS
	.comm	_PGEVT_RESULTCOPY,4,2           ; @PGEVT_RESULTCOPY
.subsections_via_symbols
