	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EndDBCopyMode                  ## -- Begin function EndDBCopyMode
	.p2align	4, 0x90
_EndDBCopyMode:                         ## @EndDBCopyMode
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	je	LBB0_8
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	xorl	%esi, %esi
	callq	_PQputCopyEnd
	testq	%rax, %rax
	jg	LBB0_3
## %bb.2:
	movl	4(%rbx), %edi
	callq	_PQerrorMessage
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_fatal
LBB0_3:
	movl	4(%rbx), %edi
	callq	_PQgetResult
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_PQresultStatus
	movq	_PGRES_COMMAND_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movl	4(%rbx), %edi
	callq	_PQerrorMessage
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	movl	%eax, %ecx
	callq	_warn_or_exit_horribly
LBB0_5:
	movq	%r15, %rdi
	callq	_PQclear
	movl	4(%rbx), %edi
	callq	_PQgetResult
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	callq	_pg_log_warning
LBB0_7:
	movl	$0, (%rbx)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error returned by PQputCopyEnd: %s"

	.comm	_PGRES_COMMAND_OK,8,3           ## @PGRES_COMMAND_OK
L_.str.1:                               ## @.str.1
	.asciz	"COPY failed for table \"%s\": %s"

L_.str.2:                               ## @.str.2
	.asciz	"unexpected extra results during COPY of table \"%s\""

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EndDBCopyMode                  ; -- Begin function EndDBCopyMode
	.p2align	2
_EndDBCopyMode:                         ; @EndDBCopyMode
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #4]
	mov	x1, #0
	bl	_PQputCopyEnd
	cmp	x0, #0
	b.gt	LBB0_3
; %bb.2:
	ldr	w0, [x19, #4]
	bl	_PQerrorMessage
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fatal
LBB0_3:
	ldr	w0, [x19, #4]
	bl	_PQgetResult
	mov	x21, x0
	bl	_PQresultStatus
Lloh2:
	adrp	x8, _PGRES_COMMAND_OK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PGRES_COMMAND_OK@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.4:
	ldr	w0, [x19, #4]
	bl	_PQerrorMessage
	mov	x3, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_warn_or_exit_horribly
LBB0_5:
	mov	x0, x21
	bl	_PQclear
	ldr	w0, [x19, #4]
	bl	_PQgetResult
	cbz	x0, LBB0_7
; %bb.6:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_pg_log_warning
LBB0_7:
	str	wzr, [x19]
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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error returned by PQputCopyEnd: %s"

	.comm	_PGRES_COMMAND_OK,8,3           ; @PGRES_COMMAND_OK
l_.str.1:                               ; @.str.1
	.asciz	"COPY failed for table \"%s\": %s"

l_.str.2:                               ; @.str.2
	.asciz	"unexpected extra results during COPY of table \"%s\""

.subsections_via_symbols
