	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PQputCopyData                  ## -- Begin function PQputCopyData
	.p2align	4, 0x90
_PQputCopyData:                         ## @PQputCopyData
	.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
	movl	$-1, %r14d
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.1:
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_PGASYNC_COPY_IN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.2:
	movq	_PGASYNC_COPY_BOTH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	addq	$20, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_libpq_gettext
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_printfPQExpBuffer
	jmp	LBB0_16
LBB0_4:
	movq	%rbx, %rdi
	callq	_parseInput
	testl	%r15d, %r15d
	jle	LBB0_15
## %bb.5:
	movl	8(%rbx), %eax
	subl	12(%rbx), %eax
	addl	$-5, %eax
	cmpl	%r15d, %eax
	jge	LBB0_9
## %bb.6:
	movq	%rbx, %rdi
	callq	_pqFlush
	testq	%rax, %rax
	js	LBB0_16
## %bb.7:
	movl	12(%rbx), %eax
	leal	(%r15,%rax), %edi
	addl	$5, %edi
	movq	%rbx, %rsi
	callq	_pqCheckOutBufferSpace
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_pqIsnonblocking
	xorl	%r14d, %r14d
	cmpq	$1, %rax
	sbbl	%r14d, %r14d
	jmp	LBB0_16
LBB0_9:
	movl	16(%rbx), %edi
	callq	_PG_PROTOCOL_MAJOR
	cmpl	$3, %eax
	jl	LBB0_11
## %bb.10:
	movl	$100, %edi
	jmp	LBB0_12
LBB0_11:
	xorl	%edi, %edi
LBB0_12:
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_pqPutMsgStart
	testq	%rax, %rax
	js	LBB0_16
## %bb.13:
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	callq	_pqPutnchar
	testq	%rax, %rax
	js	LBB0_16
## %bb.14:
	movq	%rbx, %rdi
	callq	_pqPutMsgEnd
	testq	%rax, %rax
	js	LBB0_16
LBB0_15:
	movl	$1, %r14d
LBB0_16:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PGASYNC_COPY_IN,8,3            ## @PGASYNC_COPY_IN
	.comm	_PGASYNC_COPY_BOTH,8,3          ## @PGASYNC_COPY_BOTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no COPY in progress\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PQputCopyData                  ; -- Begin function PQputCopyData
	.p2align	2
_PQputCopyData:                         ; @PQputCopyData
	.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
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PGASYNC_COPY_IN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PGASYNC_COPY_IN@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _PGASYNC_COPY_BOTH@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PGASYNC_COPY_BOTH@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_7
; %bb.2:
	mov	x20, x2
	mov	x21, x1
	mov	x0, x19
	bl	_parseInput
	cmp	w20, #1
	b.lt	LBB0_16
; %bb.3:
	ldp	w8, w9, [x19, #8]
	sub	w8, w8, w9
	sub	w8, w8, #5
	cmp	w8, w20
	b.ge	LBB0_10
; %bb.4:
	mov	x0, x19
	bl	_pqFlush
	tbnz	x0, #63, LBB0_8
; %bb.5:
	ldr	w8, [x19, #12]
	add	w8, w20, w8
	add	w0, w8, #5
	mov	x1, x19
	bl	_pqCheckOutBufferSpace
	cbz	x0, LBB0_10
; %bb.6:
	mov	x0, x19
	bl	_pqIsnonblocking
	cmp	x0, #0
	csetm	w0, eq
	b	LBB0_9
LBB0_7:
	add	x19, x19, #20
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_libpq_gettext
	mov	x1, x0
	mov	x0, x19
	bl	_printfPQExpBuffer
LBB0_8:
	mov	w0, #-1
LBB0_9:
	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
LBB0_10:
	ldr	w0, [x19, #16]
	bl	_PG_PROTOCOL_MAJOR
	cmp	w0, #3
	b.lt	LBB0_12
; %bb.11:
	mov	w0, #100
	b	LBB0_13
LBB0_12:
	mov	w0, #0
LBB0_13:
	mov	w1, #0
	mov	x2, x19
	bl	_pqPutMsgStart
	tbnz	x0, #63, LBB0_8
; %bb.14:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_pqPutnchar
	tbnz	x0, #63, LBB0_8
; %bb.15:
	mov	x0, x19
	bl	_pqPutMsgEnd
	tbnz	x0, #63, LBB0_8
LBB0_16:
	mov	w0, #1
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PGASYNC_COPY_IN,8,3            ; @PGASYNC_COPY_IN
	.comm	_PGASYNC_COPY_BOTH,8,3          ; @PGASYNC_COPY_BOTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no COPY in progress\n"

.subsections_via_symbols
