	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function libpqrcv_receive
_libpqrcv_receive:                      ## @libpqrcv_receive
	.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	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_PQfreemem
LBB0_2:
	movq	$0, (%r12)
	movl	8(%r12), %edi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_PQgetCopyData
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movl	8(%r12), %edi
	callq	_PQconsumeInput
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	8(%r12), %edi
	callq	_PQerrorMessage
	movl	%eax, %edi
	callq	_pchomp
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_5:
	movl	8(%r12), %edi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_PQgetCopyData
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_6
LBB0_7:
	cmpl	$-1, %ebx
	je	LBB0_8
## %bb.13:
	jl	LBB0_14
	jmp	LBB0_15
LBB0_8:
	movl	8(%r12), %edi
	callq	_libpqrcv_PQgetResult
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_PQresultStatus
	movq	_PGRES_COMMAND_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.9:
	movq	%r15, %rdi
	callq	_PQclear
	movl	8(%r12), %edi
	callq	_libpqrcv_PQgetResult
	movl	$-1, %r15d
	testq	%rax, %rax
	je	LBB0_16
## %bb.10:
	movq	%rax, %rdi
	callq	_PQclear
	movl	8(%r12), %edi
	callq	_PQstatus
	movq	_CONNECTION_BAD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_16
## %bb.11:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	8(%r12), %edi
	callq	_PQerrorMessage
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	jmp	LBB0_16
LBB0_12:
	movq	%r15, %rdi
	callq	_PQresultStatus
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_PGRES_COPY_IN@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	%r15, %rdi
	callq	_PQclear
	movl	$-1, %r15d
	cmpq	%r14, -48(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_16
LBB0_14:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	8(%r12), %edi
	callq	_PQerrorMessage
	movl	%eax, %edi
	callq	_pchomp
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_errmsg
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_15:
	movq	(%r12), %rax
	movq	%rax, (%r13)
	movl	%ebx, %r15d
LBB0_16:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	8(%r12), %edi
	callq	_PQsocket
	movl	%eax, (%r15)
	xorl	%r15d, %r15d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not receive data from WAL stream: %s"

	.comm	_PGRES_COMMAND_OK,8,3           ## @PGRES_COMMAND_OK
	.comm	_CONNECTION_BAD,8,3             ## @CONNECTION_BAD
L_.str.1:                               ## @.str.1
	.asciz	"unexpected result after CommandComplete: %s"

	.comm	_PGRES_COPY_IN,8,3              ## @PGRES_COPY_IN
	.no_dead_strip	_libpqrcv_receive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function libpqrcv_receive
_libpqrcv_receive:                      ; @libpqrcv_receive
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x0, [x0]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_PQfreemem
LBB0_2:
	str	xzr, [x19]
	ldr	w0, [x19, #8]
	mov	x1, x19
	mov	w2, #1
	bl	_PQgetCopyData
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.3:
	ldr	w0, [x19, #8]
	bl	_PQconsumeInput
	cbnz	x0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	ldr	w0, [x19, #8]
	bl	_PQerrorMessage
	bl	_pchomp
	mov	x1, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
LBB0_5:
	ldr	w0, [x19, #8]
	mov	x1, x19
	mov	w2, #1
	bl	_PQgetCopyData
	mov	x21, x0
	cbz	w0, LBB0_17
LBB0_6:
	cmn	w21, #1
	b.eq	LBB0_8
; %bb.7:
	cmn	w21, #2
	b.le	LBB0_14
	b	LBB0_15
LBB0_8:
	ldr	w0, [x19, #8]
	bl	_libpqrcv_PQgetResult
	mov	x22, x0
	bl	_PQresultStatus
Lloh5:
	adrp	x8, _PGRES_COMMAND_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PGRES_COMMAND_OK@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.9:
	mov	x0, x22
	bl	_PQclear
	ldr	w0, [x19, #8]
	bl	_libpqrcv_PQgetResult
	cbz	x0, LBB0_13
; %bb.10:
	bl	_PQclear
	ldr	w0, [x19, #8]
	bl	_PQstatus
Lloh8:
	adrp	x8, _CONNECTION_BAD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CONNECTION_BAD@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_13
; %bb.11:
Lloh11:
	adrp	x8, _ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w20, [x8]
	ldr	w0, [x19, #8]
	bl	_PQerrorMessage
	mov	x1, x0
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
	mov	w21, #-1
	b	LBB0_16
LBB0_12:
	mov	x0, x22
	bl	_PQresultStatus
	mov	x23, x0
Lloh16:
	adrp	x8, _PGRES_COPY_IN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PGRES_COPY_IN@GOTPAGEOFF]
Lloh18:
	ldr	x24, [x8]
	mov	x0, x22
	bl	_PQclear
	cmp	x23, x24
	b.ne	LBB0_14
LBB0_13:
	mov	w21, #-1
	b	LBB0_16
LBB0_14:
Lloh19:
	adrp	x8, _ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w22, [x8]
	ldr	w0, [x19, #8]
	bl	_PQerrorMessage
	bl	_pchomp
	mov	x1, x0
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_15:
	ldr	x8, [x19]
	str	x8, [x20]
LBB0_16:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_17:
	ldr	w0, [x19, #8]
	bl	_PQsocket
	str	w0, [x22]
	b	LBB0_16
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not receive data from WAL stream: %s"

	.comm	_PGRES_COMMAND_OK,8,3           ; @PGRES_COMMAND_OK
	.comm	_CONNECTION_BAD,8,3             ; @CONNECTION_BAD
l_.str.1:                               ; @.str.1
	.asciz	"unexpected result after CommandComplete: %s"

	.comm	_PGRES_COPY_IN,8,3              ; @PGRES_COPY_IN
	.no_dead_strip	_libpqrcv_receive
.subsections_via_symbols
