	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exec_command_edit
_exec_command_edit:                     ## @exec_command_edit
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	movq	_PSQL_CMD_SKIP_LINE@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testl	%esi, %esi
	je	LBB0_23
## %bb.1:
	movl	%edx, %r14d
	testl	%edx, %edx
	je	LBB0_2
## %bb.3:
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movq	_OT_NORMAL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	%r15d, %edi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_psql_scan_slash_option
	movq	%rax, -48(%rbp)
	movl	$-1, -52(%rbp)                  ## 4-byte Folded Spill
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r12
	movl	(%r13), %esi
	movl	%r15d, %edi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_psql_scan_slash_option
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_6
LBB0_10:
	movq	%r13, %rdi
	callq	_atoi
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jle	LBB0_12
## %bb.11:
	xorl	%r12d, %r12d
	jmp	LBB0_13
LBB0_23:
	movl	%r15d, %edi
	callq	_ignore_slash_options
	jmp	LBB0_24
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pg_log_error
	movq	_PSQL_CMD_ERROR@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_24
LBB0_4:
	movb	$1, %r12b
	xorl	%r13d, %r13d
	jmp	LBB0_13
LBB0_6:
	cmpb	$0, (%r12)
	je	LBB0_7
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_strspn
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_strlen
	cmpq	%rax, %r15
	jne	LBB0_7
## %bb.9:
	movq	$0, -48(%rbp)
	movq	%r12, %r13
	jmp	LBB0_10
LBB0_12:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r12d, %r12d
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_pg_log_error
	movq	_PSQL_CMD_ERROR@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_13
LBB0_7:
	xorl	%r13d, %r13d
	movb	$1, %r12b
LBB0_13:
	movq	_PSQL_CMD_ERROR@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rbx
	je	LBB0_19
## %bb.14:
	leaq	-48(%rbp), %rdi
	callq	_expand_tilde
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.15:
	callq	_canonicalize_path
LBB0_16:
	movl	%r14d, %edi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	callq	_copy_previous_query
	movq	-48(%rbp), %rdi
	movl	%r14d, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	callq	_do_edit
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	_PSQL_CMD_NEWEDIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_19
LBB0_18:
	movq	(%r15), %rbx
LBB0_19:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.20:
	callq	_free
LBB0_21:
	testb	%r12b, %r12b
	jne	LBB0_24
## %bb.22:
	movq	%r13, %rdi
	callq	_free
LBB0_24:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PSQL_CMD_SKIP_LINE,8,3         ## @PSQL_CMD_SKIP_LINE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no query buffer"

	.comm	_PSQL_CMD_ERROR,8,3             ## @PSQL_CMD_ERROR
	.comm	_OT_NORMAL,4,2                  ## @OT_NORMAL
L_.str.1:                               ## @.str.1
	.asciz	"0123456789"

L_.str.2:                               ## @.str.2
	.asciz	"invalid line number: %s"

	.comm	_PSQL_CMD_NEWEDIT,8,3           ## @PSQL_CMD_NEWEDIT
	.no_dead_strip	_exec_command_edit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exec_command_edit
_exec_command_edit:                     ; @exec_command_edit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x22, x0
Lloh0:
	adrp	x8, _PSQL_CMD_SKIP_LINE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PSQL_CMD_SKIP_LINE@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
	cbz	w1, LBB0_6
; %bb.1:
	mov	x20, x2
	cbz	w2, LBB0_7
; %bb.2:
	mov	x21, x3
Lloh3:
	adrp	x26, _OT_NORMAL@GOTPAGE
Lloh4:
	ldr	x26, [x26, _OT_NORMAL@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	w25, #1
	mov	x0, x22
	mov	x2, #0
	mov	w3, #1
	bl	_psql_scan_slash_option
	str	x0, [sp, #8]
Lloh5:
	adrp	x24, _PSQL_CMD_ERROR@GOTPAGE
Lloh6:
	ldr	x24, [x24, _PSQL_CMD_ERROR@GOTPAGEOFF]
	cbz	x0, LBB0_8
; %bb.3:
	mov	x23, x0
	ldr	w1, [x26]
	mov	x0, x22
	mov	x2, #0
	mov	w3, #1
	bl	_psql_scan_slash_option
	mov	x22, x0
	cbz	x0, LBB0_9
LBB0_4:
	mov	x0, x22
	bl	_atoi
	mov	x23, x0
	cmp	w0, #0
	b.le	LBB0_12
; %bb.5:
	mov	w25, #0
	b	LBB0_14
LBB0_6:
	mov	x0, x22
	bl	_ignore_slash_options
	b	LBB0_23
LBB0_7:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pg_log_error
Lloh9:
	adrp	x8, _PSQL_CMD_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PSQL_CMD_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	x19, [x8]
	b	LBB0_23
LBB0_8:
	mov	x22, #0
	mov	w23, #-1
	b	LBB0_14
LBB0_9:
	ldrb	w8, [x23]
	cbz	w8, LBB0_13
; %bb.10:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_strspn
	mov	x22, x0
	mov	x0, x23
	bl	_strlen
	cmp	x22, x0
	b.ne	LBB0_13
; %bb.11:
	str	xzr, [sp, #8]
	mov	x22, x23
	b	LBB0_4
LBB0_12:
	str	x22, [sp]
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pg_log_error
	mov	w25, #0
	ldr	x19, [x24]
	b	LBB0_14
LBB0_13:
	mov	x22, #0
	mov	w23, #-1
	mov	w25, #1
LBB0_14:
	ldr	x8, [x24]
	cmp	x19, x8
	b.eq	LBB0_19
; %bb.15:
	add	x0, sp, #8
	bl	_expand_tilde
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_17
; %bb.16:
	bl	_canonicalize_path
LBB0_17:
	mov	x0, x20
	mov	x1, x21
	bl	_copy_previous_query
	ldr	x0, [sp, #8]
	mov	x1, x20
	mov	x2, x23
	mov	x3, #0
	bl	_do_edit
	cbz	x0, LBB0_24
; %bb.18:
Lloh16:
	adrp	x8, _PSQL_CMD_NEWEDIT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PSQL_CMD_NEWEDIT@GOTPAGEOFF]
Lloh18:
	ldr	x19, [x8]
LBB0_19:
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_21
LBB0_20:
	bl	_free
LBB0_21:
	tbnz	w25, #0, LBB0_23
; %bb.22:
	mov	x0, x22
	bl	_free
LBB0_23:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_24:
	ldr	x19, [x24]
	ldr	x0, [sp, #8]
	cbnz	x0, LBB0_20
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_PSQL_CMD_SKIP_LINE,8,3         ; @PSQL_CMD_SKIP_LINE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no query buffer"

	.comm	_PSQL_CMD_ERROR,8,3             ; @PSQL_CMD_ERROR
	.comm	_OT_NORMAL,4,2                  ; @OT_NORMAL
l_.str.1:                               ; @.str.1
	.asciz	"0123456789"

l_.str.2:                               ; @.str.2
	.asciz	"invalid line number: %s"

	.comm	_PSQL_CMD_NEWEDIT,8,3           ; @PSQL_CMD_NEWEDIT
	.no_dead_strip	_exec_command_edit
.subsections_via_symbols
