	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_openQueryOutputFile            ## -- Begin function openQueryOutputFile
	.p2align	4, 0x90
_openQueryOutputFile:                   ## @openQueryOutputFile
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movb	(%rbx), %al
	cmpb	$124, %al
	je	LBB0_4
## %bb.2:
	testb	%al, %al
	jne	LBB0_5
LBB0_3:
	movq	_stdout@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_6
LBB0_4:
	leaq	1(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_popen
	movl	$1, %ecx
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
LBB0_6:
	xorl	%ecx, %ecx
LBB0_7:
	movq	%rax, (%r15)
	movl	%ecx, (%r14)
	movl	$1, %ecx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	callq	_pg_log_error
	xorl	%ecx, %ecx
LBB0_9:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stdout,8,3                     ## @stdout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w"

L_.str.1:                               ## @.str.1
	.asciz	"%s: %m"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_openQueryOutputFile            ; -- Begin function openQueryOutputFile
	.p2align	2
_openQueryOutputFile:                   ; @openQueryOutputFile
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	cbz	x0, LBB0_3
; %bb.1:
	ldrb	w8, [x19]
	cmp	w8, #124
	b.eq	LBB0_4
; %bb.2:
	cbnz	w8, LBB0_5
LBB0_3:
	mov	w8, #0
Lloh0:
	adrp	x9, _stdout@GOTPAGE
Lloh1:
	ldr	x9, [x9, _stdout@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x9]
	b	LBB0_6
LBB0_4:
	add	x0, x19, #1
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_popen
	mov	w8, #1
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fopen
	mov	w8, #0
LBB0_6:
	str	x0, [x21]
	str	w8, [x20]
	cbz	x0, LBB0_8
; %bb.7:
	mov	w0, #1
	b	LBB0_9
LBB0_8:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_pg_log_error
	mov	w0, #0
LBB0_9:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_stdout,8,3                     ; @stdout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w"

l_.str.1:                               ; @.str.1
	.asciz	"%s: %m"

.subsections_via_symbols
