	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CheckCopyStreamStop
_CheckCopyStreamStop:                   ## @CheckCopyStreamStop
	.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
	movq	_still_sending@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	je	LBB0_7
## %bb.1:
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rsi), %esi
	xorl	%r15d, %r15d
	movl	%edx, %edi
	xorl	%edx, %edx
	callq	*8(%rbx)
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_close_walfile
	testl	%eax, %eax
	je	LBB0_8
## %bb.3:
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_PQputCopyEnd
	testq	%rax, %rax
	jle	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_PQflush
	testq	%rax, %rax
	je	LBB0_6
LBB0_5:
	movq	%r14, %rdi
	callq	_PQerrorMessage
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pg_log_error
	jmp	LBB0_8
LBB0_6:
	movl	$0, (%r13)
LBB0_7:
	movl	$1, %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_still_sending,4,2              ## @still_sending
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not send copy-end packet: %s"

	.no_dead_strip	_CheckCopyStreamStop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CheckCopyStreamStop
_CheckCopyStreamStop:                   ; @CheckCopyStreamStop
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x22, _still_sending@GOTPAGE
Lloh1:
	ldr	x22, [x22, _still_sending@GOTPAGEOFF]
	ldr	w8, [x22]
	cbz	w8, LBB0_7
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x1, #8]
	ldr	w1, [x1]
	mov	x0, x2
	mov	w2, #0
	blr	x8
	cbz	x0, LBB0_7
; %bb.2:
	mov	x0, x21
	mov	x1, x20
	bl	_close_walfile
	cbz	w0, LBB0_8
; %bb.3:
	mov	x0, x19
	mov	x1, #0
	bl	_PQputCopyEnd
	cmp	x0, #1
	b.lt	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_PQflush
	cbz	x0, LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_PQerrorMessage
	mov	x1, x0
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pg_log_error
	mov	w0, #0
	b	LBB0_8
LBB0_6:
	str	wzr, [x22]
LBB0_7:
	mov	w0, #1
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_still_sending,4,2              ; @still_sending
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not send copy-end packet: %s"

	.no_dead_strip	_CheckCopyStreamStop
.subsections_via_symbols
