	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_handleCopyOut                  ## -- Begin function handleCopyOut
	.p2align	4, 0x90
_handleCopyOut:                         ## @handleCopyOut
	.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
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r15
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	callq	_PQgetCopyData
	movl	%eax, %ebx
	movl	$1, %r12d
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	leaq	-48(%rbp), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi
	callq	_PQfreemem
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_PQgetCopyData
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testq	%r13, %r13
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %r12d
	movl	$1, %esi
	movl	%ebx, %edx
	movq	%r13, %rcx
	callq	_fwrite
	cmpl	%ebx, %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pg_log_error
	jmp	LBB0_7
LBB0_9:
	testq	%r13, %r13
	je	LBB0_14
## %bb.10:
	testl	%r12d, %r12d
	je	LBB0_14
## %bb.11:
	movq	%r13, %rdi
	callq	_fflush
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	leaq	L_.str(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_pg_log_error
LBB0_14:
	cmpl	$-2, %ebx
	jne	LBB0_16
LBB0_15:
	movq	%r15, %rdi
	callq	_PQerrorMessage
	leaq	L_.str.1(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pg_log_error
LBB0_16:
	movq	%r15, %rdi
	callq	_PQgetResult
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	%rax, %rdi
	callq	_PQresultStatus
	movq	_PGRES_COMMAND_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_18
## %bb.17:
	movq	%r15, %rdi
	callq	_PQerrorMessage
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_pg_log_info
	xorl	%r12d, %r12d
LBB0_18:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	$1, %r12d
	cmpl	$-2, %ebx
	je	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not write COPY data: %m"

L_.str.1:                               ## @.str.1
	.asciz	"COPY data transfer failed: %s"

	.comm	_PGRES_COMMAND_OK,8,3           ## @PGRES_COMMAND_OK
L_.str.2:                               ## @.str.2
	.asciz	"%s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_handleCopyOut                  ; -- Begin function handleCopyOut
	.p2align	2
_handleCopyOut:                         ; @handleCopyOut
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	add	x1, sp, #8
	mov	w2, #0
	bl	_PQgetCopyData
	mov	x23, x0
	mov	w21, #1
	tbnz	w0, #31, LBB0_9
; %bb.1:
Lloh0:
	adrp	x24, l_.str@PAGE
Lloh1:
	add	x24, x24, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [sp, #8]
	bl	_PQfreemem
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #0
	bl	_PQgetCopyData
	mov	x23, x0
	tbnz	w0, #31, LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	x22, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	w21, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w21, #1
	mov	w1, #1
	mov	x2, x23
	mov	x3, x22
	bl	_fwrite
	cmp	w0, w23
	b.eq	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	bl	_pg_log_error
	mov	w21, #0
	b	LBB0_2
LBB0_9:
	cbz	x22, LBB0_13
; %bb.10:
	cbz	w21, LBB0_13
; %bb.11:
	mov	x0, x22
	bl	_fflush
	cbz	x0, LBB0_18
; %bb.12:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pg_log_error
	mov	w21, #0
LBB0_13:
	cmn	w23, #2
	b.ne	LBB0_15
LBB0_14:
	mov	x0, x19
	bl	_PQerrorMessage
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pg_log_error
	mov	w21, #0
LBB0_15:
	mov	x0, x19
	bl	_PQgetResult
	str	x0, [x20]
	bl	_PQresultStatus
Lloh6:
	adrp	x8, _PGRES_COMMAND_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PGRES_COMMAND_OK@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_17
; %bb.16:
	mov	x0, x19
	bl	_PQerrorMessage
	mov	x1, x0
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pg_log_info
	mov	w21, #0
LBB0_17:
	mov	x0, x21
	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
LBB0_18:
	mov	w21, #1
	cmn	w23, #2
	b.eq	LBB0_14
	b	LBB0_15
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not write COPY data: %m"

l_.str.1:                               ; @.str.1
	.asciz	"COPY data transfer failed: %s"

	.comm	_PGRES_COMMAND_OK,8,3           ; @PGRES_COMMAND_OK
l_.str.2:                               ; @.str.2
	.asciz	"%s"

.subsections_via_symbols
