	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function libpqrcv_endstreaming
_libpqrcv_endstreaming:                 ## @libpqrcv_endstreaming
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rdi), %edi
	xorl	%esi, %esi
	callq	_PQputCopyEnd
	testq	%rax, %rax
	jle	LBB0_2
## %bb.1:
	movl	(%r14), %edi
	callq	_PQflush
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%r14), %edi
	callq	_PQerrorMessage
	movl	%eax, %edi
	callq	_pchomp
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_3:
	movq	$0, (%r15)
	movl	(%r14), %edi
	callq	_libpqrcv_PQgetResult
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PQresultStatus
	movq	_PGRES_TUPLES_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.4:
	movq	%rbx, %rdi
	callq	_PQnfields
	cmpl	$2, %eax
	jl	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_PQntuples
	cmpl	$1, %eax
	je	LBB0_7
LBB0_6:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_7:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_PQgetvalue
	movl	%eax, %edi
	callq	_pg_strtoint32
	movq	%rax, (%r15)
	movq	%rbx, %rdi
	callq	_PQclear
	jmp	LBB0_11
LBB0_8:
	movq	%rbx, %rdi
	callq	_PQresultStatus
	movq	_PGRES_COPY_OUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.9:
	movq	%rbx, %rdi
	callq	_PQclear
	movl	(%r14), %edi
	callq	_PQendcopy
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%r14), %edi
	callq	_PQerrorMessage
	movl	%eax, %edi
	callq	_pchomp
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_11:
	movl	(%r14), %edi
	callq	_libpqrcv_PQgetResult
	movq	%rax, %rbx
LBB0_12:
	movq	%rbx, %rdi
	callq	_PQresultStatus
	movq	_PGRES_COMMAND_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.13:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	(%r14), %edi
	callq	_PQerrorMessage
	movl	%eax, %edi
	callq	_pchomp
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_14:
	movq	%rbx, %rdi
	callq	_PQclear
	movl	(%r14), %edi
	callq	_libpqrcv_PQgetResult
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%r14), %edi
	callq	_PQerrorMessage
	movl	%eax, %edi
	callq	_pchomp
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ereport                        ## TAILCALL
LBB0_15:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not send end-of-streaming message to primary: %s"

	.comm	_PGRES_TUPLES_OK,8,3            ## @PGRES_TUPLES_OK
L_.str.1:                               ## @.str.1
	.asciz	"unexpected result set after end-of-streaming"

	.comm	_PGRES_COPY_OUT,8,3             ## @PGRES_COPY_OUT
L_.str.2:                               ## @.str.2
	.asciz	"error while shutting down streaming COPY: %s"

	.comm	_PGRES_COMMAND_OK,8,3           ## @PGRES_COMMAND_OK
L_.str.3:                               ## @.str.3
	.asciz	"error reading result of streaming command: %s"

L_.str.4:                               ## @.str.4
	.asciz	"unexpected result after CommandComplete: %s"

	.no_dead_strip	_libpqrcv_endstreaming
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function libpqrcv_endstreaming
_libpqrcv_endstreaming:                 ; @libpqrcv_endstreaming
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0]
	mov	x1, #0
	bl	_PQputCopyEnd
	cmp	x0, #1
	b.lt	LBB0_2
; %bb.1:
	ldr	w0, [x19]
	bl	_PQflush
	cbz	x0, LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	ldr	w0, [x19]
	bl	_PQerrorMessage
	bl	_pchomp
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
LBB0_3:
	str	xzr, [x21]
	ldr	w0, [x19]
	bl	_libpqrcv_PQgetResult
	mov	x20, x0
	bl	_PQresultStatus
Lloh5:
	adrp	x8, _PGRES_TUPLES_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PGRES_TUPLES_OK@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.4:
	mov	x0, x20
	bl	_PQnfields
	cmp	w0, #2
	b.lt	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_PQntuples
	cmp	w0, #1
	b.eq	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w22, [x8]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_7:
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	bl	_PQgetvalue
	bl	_pg_strtoint32
	str	x0, [x21]
	mov	x0, x20
	bl	_PQclear
	b	LBB0_11
LBB0_8:
	mov	x0, x20
	bl	_PQresultStatus
Lloh13:
	adrp	x8, _PGRES_COPY_OUT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PGRES_COPY_OUT@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.9:
	mov	x0, x20
	bl	_PQclear
	ldr	w0, [x19]
	bl	_PQendcopy
	cbz	x0, LBB0_11
; %bb.10:
Lloh16:
	adrp	x8, _ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w20, [x8]
	ldr	w0, [x19]
	bl	_PQerrorMessage
	bl	_pchomp
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
LBB0_11:
	ldr	w0, [x19]
	bl	_libpqrcv_PQgetResult
	mov	x20, x0
LBB0_12:
	mov	x0, x20
	bl	_PQresultStatus
Lloh21:
	adrp	x8, _PGRES_COMMAND_OK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PGRES_COMMAND_OK@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_14
; %bb.13:
Lloh24:
	adrp	x8, _ERROR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh26:
	ldr	w21, [x8]
	ldr	w0, [x19]
	bl	_PQerrorMessage
	bl	_pchomp
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh27:
	adrp	x0, l_.str.3@PAGE
Lloh28:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
LBB0_14:
	mov	x0, x20
	bl	_PQclear
	ldr	w0, [x19]
	bl	_libpqrcv_PQgetResult
	cbz	x0, LBB0_16
; %bb.15:
Lloh29:
	adrp	x8, _ERROR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh31:
	ldr	w20, [x8]
	ldr	w0, [x19]
	bl	_PQerrorMessage
	bl	_pchomp
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh32:
	adrp	x0, l_.str.4@PAGE
Lloh33:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_ereport
LBB0_16:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not send end-of-streaming message to primary: %s"

	.comm	_PGRES_TUPLES_OK,8,3            ; @PGRES_TUPLES_OK
l_.str.1:                               ; @.str.1
	.asciz	"unexpected result set after end-of-streaming"

	.comm	_PGRES_COPY_OUT,8,3             ; @PGRES_COPY_OUT
l_.str.2:                               ; @.str.2
	.asciz	"error while shutting down streaming COPY: %s"

	.comm	_PGRES_COMMAND_OK,8,3           ; @PGRES_COMMAND_OK
l_.str.3:                               ; @.str.3
	.asciz	"error reading result of streaming command: %s"

l_.str.4:                               ; @.str.4
	.asciz	"unexpected result after CommandComplete: %s"

	.no_dead_strip	_libpqrcv_endstreaming
.subsections_via_symbols
