	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DebugFileOpen                  ## -- Begin function DebugFileOpen
	.p2align	4, 0x90
_DebugFileOpen:                         ## @DebugFileOpen
	.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	_OutputFileName@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	cmpq	$0, (%rdi)
	je	LBB0_8
## %bb.1:
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movq	_O_APPEND@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	$438, %edx                      ## imm = 0x1B6
	callq	_open
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_3
## %bb.2:
	movq	_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	movq	(%r15), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_3:
	movl	%ebx, %edi
	callq	_isatty
	movl	%eax, %r14d
	movl	%ebx, %edi
	callq	_close
	movq	(%r15), %rdi
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_freopen
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	testl	%r14d, %r14d
	jne	LBB0_6
	jmp	LBB0_8
LBB0_4:
	movq	_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	movq	(%r15), %rsi
	leaq	L_.str.2(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	testl	%r14d, %r14d
	je	LBB0_8
LBB0_6:
	movq	_IsUnderPostmaster@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:
	movq	(%r15), %rdi
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_freopen
	testl	%eax, %eax
	je	LBB0_9
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	movq	(%r15), %rsi
	leaq	L_.str.3(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ereport                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_OutputFileName,8,3             ## @OutputFileName
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_APPEND,4,2                   ## @O_APPEND
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_FATAL,4,2                      ## @FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not open file \"%s\": %m"

L_.str.1:                               ## @.str.1
	.asciz	"a"

	.comm	_stderr,4,2                     ## @stderr
L_.str.2:                               ## @.str.2
	.asciz	"could not reopen file \"%s\" as stderr: %m"

	.comm	_IsUnderPostmaster,8,3          ## @IsUnderPostmaster
	.comm	_stdout,4,2                     ## @stdout
L_.str.3:                               ## @.str.3
	.asciz	"could not reopen file \"%s\" as stdout: %m"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DebugFileOpen                  ; -- Begin function DebugFileOpen
	.p2align	2
_DebugFileOpen:                         ; @DebugFileOpen
	.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
Lloh0:
	adrp	x21, _OutputFileName@GOTPAGE
Lloh1:
	ldr	x21, [x21, _OutputFileName@GOTPAGEOFF]
	ldr	x0, [x21]
	ldr	x8, [x0]
	cbz	x8, LBB0_7
; %bb.1:
Lloh2:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _O_APPEND@GOTPAGE
Lloh6:
	ldr	x9, [x9, _O_APPEND@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _O_WRONLY@GOTPAGE
Lloh9:
	ldr	x9, [x9, _O_WRONLY@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	w2, #438
	bl	_open
	mov	x20, x0
	tbz	w0, #31, LBB0_3
; %bb.2:
Lloh11:
	adrp	x8, _FATAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FATAL@GOTPAGEOFF]
Lloh13:
	ldr	w19, [x8]
	bl	_errcode_for_file_access
	ldr	x1, [x21]
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
LBB0_3:
	mov	x0, x20
	bl	_isatty
	mov	x19, x0
	mov	x0, x20
	bl	_close
	ldr	x0, [x21]
Lloh16:
	adrp	x8, _stderr@GOTPAGE
Lloh17:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_freopen
	cbnz	w0, LBB0_5
; %bb.4:
Lloh21:
	adrp	x8, _FATAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _FATAL@GOTPAGEOFF]
Lloh23:
	ldr	w20, [x8]
	bl	_errcode_for_file_access
	ldr	x1, [x21]
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
LBB0_5:
Lloh26:
	adrp	x8, _IsUnderPostmaster@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IsUnderPostmaster@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	cmp	w19, #0
	ccmp	x8, #0, #4, ne
	b.eq	LBB0_7
; %bb.6:
	ldr	x0, [x21]
Lloh29:
	adrp	x8, _stdout@GOTPAGE
Lloh30:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
Lloh32:
	adrp	x1, l_.str.1@PAGE
Lloh33:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_freopen
	cbz	w0, LBB0_8
LBB0_7:
	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
LBB0_8:
Lloh34:
	adrp	x8, _FATAL@GOTPAGE
Lloh35:
	ldr	x8, [x8, _FATAL@GOTPAGEOFF]
Lloh36:
	ldr	w19, [x8]
	bl	_errcode_for_file_access
	ldr	x1, [x21]
Lloh37:
	adrp	x0, l_.str.3@PAGE
Lloh38:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	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
	b	_ereport
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_OutputFileName,8,3             ; @OutputFileName
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_APPEND,4,2                   ; @O_APPEND
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_FATAL,4,2                      ; @FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not open file \"%s\": %m"

l_.str.1:                               ; @.str.1
	.asciz	"a"

	.comm	_stderr,4,2                     ; @stderr
l_.str.2:                               ; @.str.2
	.asciz	"could not reopen file \"%s\" as stderr: %m"

	.comm	_IsUnderPostmaster,8,3          ; @IsUnderPostmaster
	.comm	_stdout,4,2                     ; @stdout
l_.str.3:                               ; @.str.3
	.asciz	"could not reopen file \"%s\" as stdout: %m"

.subsections_via_symbols
