	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function internal_flush
_internal_flush:                        ## @internal_flush
	.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	_PqSendStart@GOTPCREL(%rip), %r14
	movslq	(%r14), %rbx
	movq	_PqSendPointer@GOTPCREL(%rip), %rax
	movslq	(%rax), %r12
	cmpl	%r12d, %ebx
	jge	LBB0_11
## %bb.1:
	movq	_PqSendBuffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%rax, %r12
	addq	%rax, %rbx
	movq	_MyProcPort@GOTPCREL(%rip), %r13
	movq	_EINTR@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, _internal_flush.last_reported_send_errno(%rip)
	movl	%eax, %ecx
	addq	%rcx, %rbx
	addl	%eax, (%r14)
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r12, %rbx
	jae	LBB0_11
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	movl	%r12d, %edx
	subl	%ebx, %edx
	movq	%rbx, %rsi
	callq	_secure_write
	testl	%eax, %eax
	jg	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	(%r15), %ecx
	je	LBB0_10
## %bb.4:
	movq	_EAGAIN@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %ecx
	je	LBB0_12
## %bb.5:
	movq	_EWOULDBLOCK@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_12
## %bb.6:
	cmpl	_internal_flush.last_reported_send_errno(%rip), %ecx
	je	LBB0_8
## %bb.7:
	movl	%ecx, _internal_flush.last_reported_send_errno(%rip)
	movq	_COMMERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_socket_access
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_8:
	movq	_PqSendPointer@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movl	$0, (%r14)
	movq	_ClientConnectionLost@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_InterruptPending@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_12
LBB0_11:
	movq	_PqSendPointer@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movl	$0, (%r14)
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_internal_flush.last_reported_send_errno,4,2 ## @internal_flush.last_reported_send_errno
	.comm	_PqSendBuffer,8,3               ## @PqSendBuffer
	.comm	_PqSendStart,4,2                ## @PqSendStart
	.comm	_PqSendPointer,4,2              ## @PqSendPointer
	.comm	_MyProcPort,4,2                 ## @MyProcPort
	.comm	_errno,4,2                      ## @errno
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_EWOULDBLOCK,4,2                ## @EWOULDBLOCK
	.comm	_COMMERROR,4,2                  ## @COMMERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not send data to client: %m"

	.comm	_ClientConnectionLost,4,2       ## @ClientConnectionLost
	.comm	_InterruptPending,4,2           ## @InterruptPending
	.comm	_EOF,4,2                        ## @EOF
	.no_dead_strip	_internal_flush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function internal_flush
_internal_flush:                        ; @internal_flush
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x20, _PqSendStart@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PqSendStart@GOTPAGEOFF]
	ldrsw	x8, [x20]
Lloh2:
	adrp	x21, _PqSendPointer@GOTPAGE
Lloh3:
	ldr	x21, [x21, _PqSendPointer@GOTPAGEOFF]
	ldrsw	x9, [x21]
	cmp	w8, w9
	b.ge	LBB0_8
; %bb.1:
Lloh4:
	adrp	x10, _PqSendBuffer@GOTPAGE
Lloh5:
	ldr	x10, [x10, _PqSendBuffer@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
	add	x23, x10, x9
Lloh7:
	adrp	x24, _MyProcPort@GOTPAGE
Lloh8:
	ldr	x24, [x24, _MyProcPort@GOTPAGEOFF]
	add	x19, x10, x8
Lloh9:
	adrp	x25, _errno@GOTPAGE
Lloh10:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
Lloh11:
	adrp	x26, _EINTR@GOTPAGE
Lloh12:
	ldr	x26, [x26, _EINTR@GOTPAGEOFF]
	adrp	x22, _internal_flush.last_reported_send_errno@PAGE
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	wzr, [x22, _internal_flush.last_reported_send_errno@PAGEOFF]
	add	x19, x19, w0, uxtw
	ldr	w8, [x20]
	add	w8, w8, w0
	str	w8, [x20]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	x19, x23
	b.hs	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	sub	w2, w23, w19
	mov	x1, x19
	bl	_secure_write
	cmp	w0, #0
	b.gt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x25]
	ldr	w9, [x26]
	cmp	w8, w9
	b.eq	LBB0_3
; %bb.6:
Lloh13:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh14:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _EWOULDBLOCK@GOTPAGE
Lloh17:
	ldr	x10, [x10, _EWOULDBLOCK@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_10
; %bb.7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
	mov	w0, #0
	str	wzr, [x21]
	str	wzr, [x20]
LBB0_9:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_10:
	ldr	w9, [x22, _internal_flush.last_reported_send_errno@PAGEOFF]
	cmp	w8, w9
	b.eq	LBB0_12
; %bb.11:
	str	w8, [x22, _internal_flush.last_reported_send_errno@PAGEOFF]
Lloh19:
	adrp	x8, _COMMERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _COMMERROR@GOTPAGEOFF]
Lloh21:
	ldr	w19, [x8]
	bl	_errcode_for_socket_access
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
LBB0_12:
	str	wzr, [x21]
	str	wzr, [x20]
Lloh24:
	adrp	x8, _ClientConnectionLost@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ClientConnectionLost@GOTPAGEOFF]
	mov	w9, #1
Lloh26:
	str	w9, [x8]
Lloh27:
	adrp	x8, _InterruptPending@GOTPAGE
Lloh28:
	ldr	x8, [x8, _InterruptPending@GOTPAGEOFF]
Lloh29:
	str	w9, [x8]
Lloh30:
	adrp	x8, _EOF@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EOF@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotStr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotStr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_internal_flush.last_reported_send_errno,4,2 ; @internal_flush.last_reported_send_errno
	.comm	_PqSendBuffer,8,3               ; @PqSendBuffer
	.comm	_PqSendStart,4,2                ; @PqSendStart
	.comm	_PqSendPointer,4,2              ; @PqSendPointer
	.comm	_MyProcPort,4,2                 ; @MyProcPort
	.comm	_errno,4,2                      ; @errno
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_EWOULDBLOCK,4,2                ; @EWOULDBLOCK
	.comm	_COMMERROR,4,2                  ; @COMMERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not send data to client: %m"

	.comm	_ClientConnectionLost,4,2       ; @ClientConnectionLost
	.comm	_InterruptPending,4,2           ; @InterruptPending
	.comm	_EOF,4,2                        ; @EOF
	.no_dead_strip	_internal_flush
.subsections_via_symbols
