	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pqGetCopyData3                 ## -- Begin function pqGetCopyData3
	.p2align	4, 0x90
_pqGetCopyData3:                        ## @pqGetCopyData3
	.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	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %r15
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$5, %ebx
	jae	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r15), %eax
	movl	%eax, 8(%r15)
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	callq	_getCopyDataMessage
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%r12d, %r12d
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %edi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_pqWait
	movl	$-2, %ebx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	callq	_pqReadData
	testq	%rax, %rax
	jns	LBB0_11
	jmp	LBB0_13
LBB0_8:
	leal	-3(%rbx), %edi
	callq	_malloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_9
## %bb.12:
	addl	$-4, %ebx
	movq	(%r15), %rsi
	shlq	$2, %rsi
	addq	16(%r15), %rsi
	movq	%rax, %rdi
	movl	%ebx, %edx
	callq	_memcpy
	movq	(%r14), %rax
	movb	$0, (%rax,%rbx)
	movl	(%r15), %eax
	addl	%ebx, %eax
	movl	%eax, 8(%r15)
	jmp	LBB0_13
LBB0_4:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_9:
	addq	$24, %r15
	leaq	L_.str(%rip), %rdi
	callq	_libpq_gettext
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_printfPQExpBuffer
	movl	$-2, %ebx
LBB0_13:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of memory\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pqGetCopyData3                 ; -- Begin function pqGetCopyData3
	.p2align	2
_pqGetCopyData3:                        ; @pqGetCopyData3
	.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
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	b	LBB0_4
LBB0_1:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	w21, #5
	b.hs	LBB0_9
; %bb.2:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19]
	str	w8, [x19, #8]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	bl	_getCopyDataMessage
	mov	x21, x0
	tbnz	w0, #31, LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w21, LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w22, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1
	mov	w1, #0
	mov	x2, x19
	bl	_pqWait
	cbnz	x0, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_pqReadData
	tbz	x0, #63, LBB0_3
	b	LBB0_13
LBB0_9:
	sub	w0, w21, #3
	bl	_malloc
	str	x0, [x20]
	cbz	x0, LBB0_12
; %bb.10:
	sub	w21, w21, #4
	ldr	x8, [x19, #16]
	ldr	x9, [x19]
	add	x1, x8, x9, lsl #2
	mov	x2, x21
	bl	_memcpy
	ldr	x8, [x20]
	strb	wzr, [x8, w21, uxtw]
	ldr	w8, [x19]
	add	w8, w21, w8
	str	w8, [x19, #8]
	b	LBB0_14
LBB0_11:
	mov	w21, #0
	b	LBB0_14
LBB0_12:
	add	x19, x19, #24
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_libpq_gettext
	mov	x1, x0
	mov	x0, x19
	bl	_printfPQExpBuffer
LBB0_13:
	mov	w21, #-2
LBB0_14:
	mov	x0, x21
	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
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of memory\n"

.subsections_via_symbols
