	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function editFile
_editFile:                              ## @editFile
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_Assert
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_getenv
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	testq	%r12, %r12
	jne	LBB0_5
LBB0_4:
	movq	_DEFAULT_EDITOR@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
LBB0_5:
	testl	%r15d, %r15d
	jle	LBB0_9
## %bb.6:
	leaq	L_.str.3(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	leaq	L_.str.5(%rip), %rdi
	movq	%r12, %rsi
	movq	%rax, %rdx
	movl	%r15d, %ecx
	movq	%r14, %r8
	xorl	%eax, %eax
	callq	_psprintf
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.6(%rip), %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_psprintf
LBB0_10:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_system
	movl	%eax, %r15d
	cmpl	$127, %eax
	je	LBB0_13
## %bb.11:
	cmpl	$-1, %r15d
	jne	LBB0_14
## %bb.12:
	leaq	L_.str.7(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_pg_log_error
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str.8(%rip), %rdi
	xorl	%eax, %eax
	callq	_pg_log_error
LBB0_14:
	movq	%r14, %rdi
	callq	_free
	xorl	%ebx, %ebx
	testl	%r15d, %r15d
	sete	%bl
	jmp	LBB0_15
LBB0_7:
	leaq	L_.str.4(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pg_log_error
LBB0_15:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	L_.str.2(%rip), %rdi
	callq	_getenv
	movq	%rax, %r12
	testq	%r12, %r12
	je	LBB0_4
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PSQL_EDITOR"

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

L_.str.2:                               ## @.str.2
	.asciz	"VISUAL"

	.comm	_DEFAULT_EDITOR,8,3             ## @DEFAULT_EDITOR
L_.str.3:                               ## @.str.3
	.asciz	"PSQL_EDITOR_LINENUMBER_ARG"

L_.str.4:                               ## @.str.4
	.asciz	"environment variable PSQL_EDITOR_LINENUMBER_ARG must be set to specify a line number"

L_.str.5:                               ## @.str.5
	.asciz	"exec %s %s%d '%s'"

L_.str.6:                               ## @.str.6
	.asciz	"exec %s '%s'"

L_.str.7:                               ## @.str.7
	.asciz	"could not start editor \"%s\""

L_.str.8:                               ## @.str.8
	.asciz	"could not start /bin/sh"

	.comm	_DEFAULT_EDITOR_LINENUMBER_ARG,8,3 ## @DEFAULT_EDITOR_LINENUMBER_ARG
	.no_dead_strip	_editFile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function editFile
_editFile:                              ; @editFile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_Assert
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbnz	x0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getenv
	cbnz	x0, LBB0_3
; %bb.2:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_getenv
LBB0_3:
Lloh6:
	adrp	x8, _DEFAULT_EDITOR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DEFAULT_EDITOR@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, #0
	csel	x21, x8, x0, eq
	cmp	w20, #1
	b.lt	LBB0_6
; %bb.4:
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_13
; %bb.5:
	mov	x2, x0
	stp	x20, x19, [sp]
Lloh11:
	adrp	x0, l_.str.5@PAGE
Lloh12:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x21
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x0, l_.str.6@PAGE
Lloh14:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	x1, x21
	mov	x2, x19
LBB0_7:
	bl	_psprintf
	mov	x19, x0
	bl	_system
	mov	x20, x0
	cmp	w0, #127
	b.eq	LBB0_10
; %bb.8:
	cmn	w20, #1
	b.ne	LBB0_12
; %bb.9:
	str	x21, [sp]
Lloh15:
	adrp	x0, l_.str.7@PAGE
Lloh16:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh17:
	adrp	x0, l_.str.8@PAGE
Lloh18:
	add	x0, x0, l_.str.8@PAGEOFF
LBB0_11:
	bl	_pg_log_error
LBB0_12:
	mov	x0, x19
	bl	_free
	cmp	w20, #0
	cset	w0, eq
	b	LBB0_14
LBB0_13:
Lloh19:
	adrp	x0, l_.str.4@PAGE
Lloh20:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pg_log_error
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PSQL_EDITOR"

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

l_.str.2:                               ; @.str.2
	.asciz	"VISUAL"

	.comm	_DEFAULT_EDITOR,8,3             ; @DEFAULT_EDITOR
l_.str.3:                               ; @.str.3
	.asciz	"PSQL_EDITOR_LINENUMBER_ARG"

l_.str.4:                               ; @.str.4
	.asciz	"environment variable PSQL_EDITOR_LINENUMBER_ARG must be set to specify a line number"

l_.str.5:                               ; @.str.5
	.asciz	"exec %s %s%d '%s'"

l_.str.6:                               ; @.str.6
	.asciz	"exec %s '%s'"

l_.str.7:                               ; @.str.7
	.asciz	"could not start editor \"%s\""

l_.str.8:                               ; @.str.8
	.asciz	"could not start /bin/sh"

	.comm	_DEFAULT_EDITOR_LINENUMBER_ARG,8,3 ; @DEFAULT_EDITOR_LINENUMBER_ARG
	.no_dead_strip	_editFile
.subsections_via_symbols
