	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_OpenPipeStream                 ## -- Begin function OpenPipeStream
	.p2align	4, 0x90
_OpenPipeStream:                        ## @OpenPipeStream
	.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	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_numAllocatedDescs@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rcx
	callq	_elog
	movl	%eax, %edi
	callq	_DO_DB
	xorl	%eax, %eax
	callq	_reserveAllocatedDesc
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_INSUFFICIENT_RESOURCES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movq	_maxAllocatedDescs@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_2:
	xorl	%eax, %eax
	callq	_ReleaseLruFiles
	movq	_SIGPIPE@GOTPCREL(%rip), %r15
	movq	_errno@GOTPCREL(%rip), %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_INSUFFICIENT_RESOURCES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	xorl	%eax, %eax
	callq	_ReleaseLruFile
	testq	%rax, %rax
	je	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
	movl	(%r15), %edi
	movq	_SIG_DFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pqsignal
	movl	$0, (%r12)
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_popen
	movq	%rax, %rbx
	movl	(%r12), %r14d
	movl	(%r15), %edi
	movq	_SIG_IGN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pqsignal
	movl	%r14d, (%r12)
	testq	%rbx, %rbx
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_EMFILE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_ENFILE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	je	LBB0_7
	jmp	LBB0_9
LBB0_8:
	movl	%r14d, (%r12)
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_4:
	movq	_allocatedDescs@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_numAllocatedDescs@GOTPCREL(%rip), %r12
	movq	(%r12), %r15
	movq	_AllocateDescPipe@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$4, %r15
	movl	%eax, 12(%r14,%r15)
	movq	%rbx, (%r14,%r15)
	xorl	%eax, %eax
	callq	_GetCurrentSubTransactionId
	movl	%eax, 8(%r14,%r15)
	incq	(%r12)
	movq	(%r14,%r15), %rax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOG,4,2                        ## @LOG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OpenPipeStream: Allocated %d (%s)"

	.comm	_numAllocatedDescs,8,3          ## @numAllocatedDescs
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_INSUFFICIENT_RESOURCES,4,2 ## @ERRCODE_INSUFFICIENT_RESOURCES
L_.str.1:                               ## @.str.1
	.asciz	"exceeded maxAllocatedDescs (%d) while trying to execute command \"%s\""

	.comm	_maxAllocatedDescs,4,2          ## @maxAllocatedDescs
	.comm	_stdout,4,2                     ## @stdout
	.comm	_stderr,4,2                     ## @stderr
	.comm	_SIGPIPE,4,2                    ## @SIGPIPE
	.comm	_SIG_DFL,4,2                    ## @SIG_DFL
	.comm	_errno,4,2                      ## @errno
	.comm	_SIG_IGN,4,2                    ## @SIG_IGN
	.comm	_allocatedDescs,8,3             ## @allocatedDescs
	.comm	_AllocateDescPipe,4,2           ## @AllocateDescPipe
	.comm	_EMFILE,4,2                     ## @EMFILE
	.comm	_ENFILE,4,2                     ## @ENFILE
L_.str.2:                               ## @.str.2
	.asciz	"out of file descriptors: %m; release and retry"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_OpenPipeStream                 ; -- Begin function OpenPipeStream
	.p2align	2
_OpenPipeStream:                        ; @OpenPipeStream
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _LOG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _numAllocatedDescs@GOTPAGE
Lloh4:
	ldr	x8, [x8, _numAllocatedDescs@GOTPAGEOFF]
Lloh5:
	ldr	x2, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	bl	_elog
	bl	_DO_DB
	bl	_reserveAllocatedDesc
	cbnz	w0, LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w21, [x8]
Lloh11:
	adrp	x8, _ERRCODE_INSUFFICIENT_RESOURCES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ERRCODE_INSUFFICIENT_RESOURCES@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_errcode
Lloh14:
	adrp	x8, _maxAllocatedDescs@GOTPAGE
Lloh15:
	ldr	x8, [x8, _maxAllocatedDescs@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	stp	x8, x20, [sp]
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
LBB0_2:
	bl	_ReleaseLruFiles
Lloh19:
	adrp	x23, _SIGPIPE@GOTPAGE
Lloh20:
	ldr	x23, [x23, _SIGPIPE@GOTPAGEOFF]
Lloh21:
	adrp	x28, _errno@GOTPAGE
Lloh22:
	ldr	x28, [x28, _errno@GOTPAGEOFF]
Lloh23:
	adrp	x25, _SIG_IGN@GOTPAGE
Lloh24:
	ldr	x25, [x25, _SIG_IGN@GOTPAGEOFF]
Lloh25:
	adrp	x26, _EMFILE@GOTPAGE
Lloh26:
	ldr	x26, [x26, _EMFILE@GOTPAGEOFF]
Lloh27:
	adrp	x21, l_.str.2@PAGE
Lloh28:
	add	x21, x21, l_.str.2@PAGEOFF
Lloh29:
	adrp	x27, _ENFILE@GOTPAGE
Lloh30:
	ldr	x27, [x27, _ENFILE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
Lloh31:
	adrp	x8, _stdout@GOTPAGE
Lloh32:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	bl	_fflush
Lloh34:
	adrp	x8, _stderr@GOTPAGE
Lloh35:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	bl	_fflush
	ldr	w0, [x23]
Lloh37:
	adrp	x8, _SIG_DFL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SIG_DFL@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	bl	_pqsignal
	str	wzr, [x28]
	mov	x0, x20
	mov	x1, x19
	bl	_popen
	mov	x22, x0
	ldr	w24, [x28]
	ldr	w0, [x23]
	ldr	w1, [x25]
	bl	_pqsignal
	str	w24, [x28]
	cbnz	x22, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x26]
	ldr	w9, [x27]
	cmp	w24, w8
	ccmp	w24, w9, #4, ne
	b.ne	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh40:
	adrp	x8, _LOG@GOTPAGE
Lloh41:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh42:
	ldr	w22, [x8]
Lloh43:
	adrp	x8, _ERRCODE_INSUFFICIENT_RESOURCES@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ERRCODE_INSUFFICIENT_RESOURCES@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
	bl	_errcode
	mov	x0, x21
	bl	_errmsg
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
	bl	_ReleaseLruFile
	cbnz	x0, LBB0_3
; %bb.6:
	str	w24, [x28]
	b	LBB0_9
LBB0_7:
Lloh46:
	adrp	x8, _allocatedDescs@GOTPAGE
Lloh47:
	ldr	x8, [x8, _allocatedDescs@GOTPAGEOFF]
Lloh48:
	ldr	x8, [x8]
Lloh49:
	adrp	x20, _numAllocatedDescs@GOTPAGE
Lloh50:
	ldr	x20, [x20, _numAllocatedDescs@GOTPAGEOFF]
	ldr	x9, [x20]
Lloh51:
	adrp	x10, _AllocateDescPipe@GOTPAGE
Lloh52:
	ldr	x10, [x10, _AllocateDescPipe@GOTPAGEOFF]
Lloh53:
	ldr	w10, [x10]
	add	x19, x8, x9, lsl #4
	str	w10, [x19, #12]
	str	x22, [x19]
	bl	_GetCurrentSubTransactionId
	str	w0, [x19, #8]
	ldr	x8, [x20]
	add	x8, x8, #1
	str	x8, [x20]
	ldr	x0, [x19]
	b	LBB0_9
LBB0_8:
	mov	x0, #0
LBB0_9:
	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
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_LOG,4,2                        ; @LOG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OpenPipeStream: Allocated %d (%s)"

	.comm	_numAllocatedDescs,8,3          ; @numAllocatedDescs
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_INSUFFICIENT_RESOURCES,4,2 ; @ERRCODE_INSUFFICIENT_RESOURCES
l_.str.1:                               ; @.str.1
	.asciz	"exceeded maxAllocatedDescs (%d) while trying to execute command \"%s\""

	.comm	_maxAllocatedDescs,4,2          ; @maxAllocatedDescs
	.comm	_stdout,4,2                     ; @stdout
	.comm	_stderr,4,2                     ; @stderr
	.comm	_SIGPIPE,4,2                    ; @SIGPIPE
	.comm	_SIG_DFL,4,2                    ; @SIG_DFL
	.comm	_errno,4,2                      ; @errno
	.comm	_SIG_IGN,4,2                    ; @SIG_IGN
	.comm	_allocatedDescs,8,3             ; @allocatedDescs
	.comm	_AllocateDescPipe,4,2           ; @AllocateDescPipe
	.comm	_EMFILE,4,2                     ; @EMFILE
	.comm	_ENFILE,4,2                     ; @ENFILE
l_.str.2:                               ; @.str.2
	.asciz	"out of file descriptors: %m; release and retry"

.subsections_via_symbols
