	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_secure_write                   ## -- Begin function secure_write
	.p2align	4, 0x90
_secure_write:                          ## @secure_write
	.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, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	xorl	%edi, %edi
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	callq	_ProcessClientWriteInterrupt
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_secure_raw_write
	movq	%rax, %r13
	testq	%rax, %rax
	jns	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	cmpl	$0, (%r12)
	jne	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EWOULDBLOCK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=2
	movq	_WL_SOCKET_WRITEABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_Assert
	movq	_FeBeWaitSet@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	xorl	%esi, %esi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_ModifyWaitEvent
	movl	(%r13), %edi
	movq	_WAIT_EVENT_CLIENT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$-1, %esi
	leaq	-48(%rbp), %rdx
	movl	$1, %ecx
	callq	_WaitEventSetWait
	movl	-48(%rbp), %eax
	movq	_WL_POSTMASTER_DEATH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_ADMIN_SHUTDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	movl	-48(%rbp), %eax
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=2
	movq	_WL_LATCH_SET@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_MyLatch@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ResetLatch
	movl	$1, %edi
	jmp	LBB0_1
LBB0_10:
	xorl	%edi, %edi
	callq	_ProcessClientWriteInterrupt
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WL_SOCKET_WRITEABLE,4,2        ## @WL_SOCKET_WRITEABLE
	.comm	_errno,8,3                      ## @errno
	.comm	_EWOULDBLOCK,8,3                ## @EWOULDBLOCK
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.comm	_FeBeWaitSet,4,2                ## @FeBeWaitSet
	.comm	_WAIT_EVENT_CLIENT_WRITE,4,2    ## @WAIT_EVENT_CLIENT_WRITE
	.comm	_WL_POSTMASTER_DEATH,4,2        ## @WL_POSTMASTER_DEATH
	.comm	_FATAL,4,2                      ## @FATAL
	.comm	_ERRCODE_ADMIN_SHUTDOWN,4,2     ## @ERRCODE_ADMIN_SHUTDOWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"terminating connection due to unexpected postmaster exit"

	.comm	_WL_LATCH_SET,4,2               ## @WL_LATCH_SET
	.comm	_MyLatch,4,2                    ## @MyLatch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_secure_write                   ; -- Begin function secure_write
	.p2align	2
_secure_write:                          ; @secure_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	w0, #0
	bl	_ProcessClientWriteInterrupt
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_secure_raw_write
	mov	x23, x0
	tbz	x0, #63, LBB0_2
; %bb.1:
	ldr	w8, [x21]
	cbz	w8, LBB0_3
LBB0_2:
	mov	w0, #0
	bl	_ProcessClientWriteInterrupt
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_3:
Lloh0:
	adrp	x25, _EWOULDBLOCK@GOTPAGE
Lloh1:
	ldr	x25, [x25, _EWOULDBLOCK@GOTPAGEOFF]
Lloh2:
	adrp	x26, _EAGAIN@GOTPAGE
Lloh3:
	ldr	x26, [x26, _EAGAIN@GOTPAGEOFF]
Lloh4:
	adrp	x28, _FeBeWaitSet@GOTPAGE
Lloh5:
	ldr	x28, [x28, _FeBeWaitSet@GOTPAGEOFF]
Lloh6:
	adrp	x22, _WAIT_EVENT_CLIENT_WRITE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _WAIT_EVENT_CLIENT_WRITE@GOTPAGEOFF]
Lloh8:
	adrp	x27, _WL_POSTMASTER_DEATH@GOTPAGE
Lloh9:
	ldr	x27, [x27, _WL_POSTMASTER_DEATH@GOTPAGEOFF]
Lloh10:
	adrp	x24, _WL_LATCH_SET@GOTPAGE
Lloh11:
	ldr	x24, [x24, _WL_LATCH_SET@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
Lloh12:
	adrp	x8, _errno@GOTPAGE
Lloh13:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	x9, [x25]
	ldr	x10, [x26]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh15:
	adrp	x8, _WL_SOCKET_WRITEABLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WL_SOCKET_WRITEABLE@GOTPAGEOFF]
Lloh17:
	ldr	w23, [x8]
	mov	x0, x23
	bl	_Assert
	ldr	w0, [x28]
	mov	w1, #0
	mov	x2, x23
	mov	x3, #0
	bl	_ModifyWaitEvent
	ldr	w0, [x28]
	ldr	w4, [x22]
	add	x2, sp, #8
	mov	w1, #-1
	mov	w3, #1
	bl	_WaitEventSetWait
	ldr	w8, [sp, #8]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh18:
	adrp	x8, _FATAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FATAL@GOTPAGEOFF]
Lloh20:
	ldr	w23, [x8]
Lloh21:
	adrp	x8, _ERRCODE_ADMIN_SHUTDOWN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ERRCODE_ADMIN_SHUTDOWN@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_errcode
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
	ldr	w8, [sp, #8]
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh26:
	adrp	x8, _MyLatch@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MyLatch@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_ResetLatch
	mov	w0, #1
	bl	_ProcessClientWriteInterrupt
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_secure_raw_write
	mov	x23, x0
	tbz	x0, #63, LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x21]
	cbz	w8, LBB0_4
	b	LBB0_2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_WL_SOCKET_WRITEABLE,4,2        ; @WL_SOCKET_WRITEABLE
	.comm	_errno,8,3                      ; @errno
	.comm	_EWOULDBLOCK,8,3                ; @EWOULDBLOCK
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.comm	_FeBeWaitSet,4,2                ; @FeBeWaitSet
	.comm	_WAIT_EVENT_CLIENT_WRITE,4,2    ; @WAIT_EVENT_CLIENT_WRITE
	.comm	_WL_POSTMASTER_DEATH,4,2        ; @WL_POSTMASTER_DEATH
	.comm	_FATAL,4,2                      ; @FATAL
	.comm	_ERRCODE_ADMIN_SHUTDOWN,4,2     ; @ERRCODE_ADMIN_SHUTDOWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"terminating connection due to unexpected postmaster exit"

	.comm	_WL_LATCH_SET,4,2               ; @WL_LATCH_SET
	.comm	_MyLatch,4,2                    ; @MyLatch
.subsections_via_symbols
