	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_histedit                       ## -- Begin function histedit
	.p2align	4, 0x90
_histedit:                              ## @histedit
	.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	_iflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_35
## %bb.1:
	movq	_hist@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	jne	LBB0_5
## %bb.2:
	xorl	%eax, %eax
	callq	_history_init
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_histsizeval
	movl	%eax, %edi
	callq	_sethistsize
	jmp	LBB0_5
LBB0_35:
	movq	_el@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_37
## %bb.36:
	callq	_el_end
	movq	$0, (%rbx)
LBB0_37:
	movq	_hist@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_39
## %bb.38:
	callq	_history_end
	movq	$0, (%rbx)
	jmp	LBB0_39
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_out2fmt_flush
LBB0_5:
	movq	_Eflag@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movq	_Vflag@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rcx, %rdx
	orq	%rax, %rdx
	movq	_el@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	je	LBB0_9
## %bb.6:
	testq	%rdi, %rdi
	jne	LBB0_9
## %bb.7:
	xorl	%edi, %edi
	callq	_isatty
	testq	%rax, %rax
	je	LBB0_8
## %bb.13:
	movq	_el_in@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_15
## %bb.14:
	leaq	L_.str.1(%rip), %rsi
	xorl	%edi, %edi
	callq	_fdopen
	movq	%rax, (%rbx)
LBB0_15:
	movq	_el_out@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	jne	LBB0_17
## %bb.16:
	leaq	L_.str.2(%rip), %rsi
	movl	$2, %edi
	callq	_fdopen
	movq	%rax, %rcx
	movq	%rax, (%r14)
	movq	(%rbx), %rax
LBB0_17:
	testq	%rax, %rax
	je	LBB0_26
## %bb.18:
	testq	%rcx, %rcx
	je	LBB0_26
## %bb.19:
	leaq	L_.str.3(%rip), %rdi
	callq	_lookupvar
	leaq	L_.str.3(%rip), %rdi
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	%rax, %rsi
	movl	$1, %edx
	callq	_setenv
	jmp	LBB0_22
LBB0_8:
	movq	(%rbx), %rcx
	movq	(%r15), %rax
	movq	(%r13), %rdi
LBB0_9:
	testq	%rcx, %rcx
	jne	LBB0_28
## %bb.10:
	testq	%rax, %rax
	jne	LBB0_28
## %bb.11:
	testq	%rdi, %rdi
	je	LBB0_28
## %bb.12:
	callq	_el_end
	movq	$0, (%r13)
	jmp	LBB0_39
LBB0_21:
	callq	_unsetenv
LBB0_22:
	movq	_arg0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rsi
	movq	(%r14), %rcx
	movq	%rcx, %rdx
	callq	_el_init
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_26
## %bb.23:
	movq	(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_25
## %bb.24:
	movq	_EL_HIST@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movq	_history@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	movq	%rax, %rdi
	xorl	%eax, %eax
	callq	_el_set
	movq	(%r13), %rax
LBB0_25:
	movq	_Eflag@GOTPCREL(%rip), %rbx
	movq	_EL_PROMPT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_getprompt@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rdx
	movq	%rax, %rdi
	xorl	%eax, %eax
	callq	_el_set
	movq	(%r13), %rdi
	movq	_EL_ADDFN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	__el_fn_complete@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	leaq	L_.str.4(%rip), %rdx
	leaq	L_.str.5(%rip), %rcx
	xorl	%eax, %eax
	callq	_el_set
	jmp	LBB0_27
LBB0_26:
	leaq	L_.str.6(%rip), %rdi
	callq	_out2fmt_flush
	movq	_Eflag@GOTPCREL(%rip), %rbx
LBB0_27:
	movq	(%r13), %rdi
LBB0_28:
	testq	%rdi, %rdi
	je	LBB0_39
## %bb.29:
	cmpq	$0, (%r15)
	je	LBB0_31
## %bb.30:
	leaq	L_.str.7(%rip), %rdx
	jmp	LBB0_33
LBB0_39:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_31:
	cmpq	$0, (%rbx)
	je	LBB0_34
## %bb.32:
	leaq	L_.str.8(%rip), %rdx
LBB0_33:
	movq	_EL_EDITOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%eax, %eax
	callq	_el_set
LBB0_34:
	movq	(%r13), %rdi
	movq	_EL_BIND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.9(%rip), %rdx
	leaq	L_.str.4(%rip), %rcx
	xorl	%r8d, %r8d
	xorl	%eax, %eax
	callq	_el_set
	movq	(%r13), %rdi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_el_source                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_iflag,8,3                      ## @iflag
	.comm	_hist,8,3                       ## @hist
	.comm	_INTOFF,4,2                     ## @INTOFF
	.comm	_INTON,4,2                      ## @INTON
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sh: can't initialize history\n"

	.comm	_Eflag,8,3                      ## @Eflag
	.comm	_Vflag,8,3                      ## @Vflag
	.comm	_el,8,3                         ## @el
	.comm	_el_in,8,3                      ## @el_in
L_.str.1:                               ## @.str.1
	.asciz	"r"

	.comm	_el_out,8,3                     ## @el_out
L_.str.2:                               ## @.str.2
	.asciz	"w"

L_.str.3:                               ## @.str.3
	.asciz	"TERM"

	.comm	_arg0,4,2                       ## @arg0
	.comm	_EL_HIST,4,2                    ## @EL_HIST
	.comm	_history,4,2                    ## @history
	.comm	_EL_PROMPT,4,2                  ## @EL_PROMPT
	.comm	_getprompt,4,2                  ## @getprompt
	.comm	_EL_ADDFN,4,2                   ## @EL_ADDFN
L_.str.4:                               ## @.str.4
	.asciz	"sh-complete"

L_.str.5:                               ## @.str.5
	.asciz	"Filename completion"

	.comm	__el_fn_complete,8,3            ## @_el_fn_complete
L_.str.6:                               ## @.str.6
	.asciz	"sh: can't initialize editing\n"

	.comm	_EL_EDITOR,4,2                  ## @EL_EDITOR
L_.str.7:                               ## @.str.7
	.asciz	"vi"

L_.str.8:                               ## @.str.8
	.asciz	"emacs"

	.comm	_EL_BIND,4,2                    ## @EL_BIND
L_.str.9:                               ## @.str.9
	.asciz	"^I"

	.comm	_editing,8,3                    ## @editing
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_histedit                       ; -- Begin function histedit
	.p2align	2
_histedit:                              ; @histedit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, _iflag@GOTPAGE
Lloh1:
	ldr	x8, [x8, _iflag@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
Lloh3:
	adrp	x22, _hist@GOTPAGE
Lloh4:
	ldr	x22, [x22, _hist@GOTPAGEOFF]
	ldr	x8, [x22]
	cbnz	x8, LBB0_9
; %bb.2:
	bl	_history_init
	str	x0, [x22]
	cbz	x0, LBB0_8
; %bb.3:
	bl	_histsizeval
	bl	_sethistsize
	b	LBB0_9
LBB0_4:
Lloh5:
	adrp	x19, _el@GOTPAGE
Lloh6:
	ldr	x19, [x19, _el@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_el_end
	str	xzr, [x19]
LBB0_6:
Lloh7:
	adrp	x19, _hist@GOTPAGE
Lloh8:
	ldr	x19, [x19, _hist@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_32
; %bb.7:
	bl	_history_end
	b	LBB0_21
LBB0_8:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_out2fmt_flush
LBB0_9:
Lloh11:
	adrp	x20, _Eflag@GOTPAGE
Lloh12:
	ldr	x20, [x20, _Eflag@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh13:
	adrp	x21, _Vflag@GOTPAGE
Lloh14:
	ldr	x21, [x21, _Vflag@GOTPAGEOFF]
	ldr	x9, [x21]
	orr	x10, x8, x9
Lloh15:
	adrp	x19, _el@GOTPAGE
Lloh16:
	ldr	x19, [x19, _el@GOTPAGEOFF]
	ldr	x0, [x19]
	cmp	x10, #0
	ccmp	x0, #0, #0, ne
	b.ne	LBB0_19
; %bb.10:
	mov	w0, #0
	bl	_isatty
	cbz	x0, LBB0_18
; %bb.11:
Lloh17:
	adrp	x23, _el_in@GOTPAGE
Lloh18:
	ldr	x23, [x23, _el_in@GOTPAGEOFF]
	ldr	x0, [x23]
	cbnz	x0, LBB0_13
; %bb.12:
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fdopen
	str	x0, [x23]
LBB0_13:
Lloh21:
	adrp	x24, _el_out@GOTPAGE
Lloh22:
	ldr	x24, [x24, _el_out@GOTPAGEOFF]
	ldr	x8, [x24]
	cbnz	x8, LBB0_15
; %bb.14:
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #2
	bl	_fdopen
	mov	x8, x0
	str	x0, [x24]
	ldr	x0, [x23]
LBB0_15:
	cmp	x0, #0
	ccmp	x8, #0, #4, ne
	b.eq	LBB0_27
; %bb.16:
Lloh25:
	adrp	x0, l_.str.3@PAGE
Lloh26:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_lookupvar
	cbz	x0, LBB0_22
; %bb.17:
	mov	x1, x0
Lloh27:
	adrp	x0, l_.str.3@PAGE
Lloh28:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	w2, #1
	bl	_setenv
	b	LBB0_23
LBB0_18:
	ldr	x8, [x20]
	ldr	x9, [x21]
	ldr	x0, [x19]
LBB0_19:
	cmp	x8, #0
	ccmp	x9, #0, #0, eq
	ccmp	x0, #0, #4, eq
	b.eq	LBB0_29
; %bb.20:
	bl	_el_end
LBB0_21:
	str	xzr, [x19]
	b	LBB0_32
LBB0_22:
Lloh29:
	adrp	x0, l_.str.3@PAGE
Lloh30:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_unsetenv
LBB0_23:
Lloh31:
	adrp	x8, _arg0@GOTPAGE
Lloh32:
	ldr	x8, [x8, _arg0@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	ldr	x1, [x23]
	ldr	x2, [x24]
	mov	x3, x2
	bl	_el_init
	str	x0, [x19]
	cbz	x0, LBB0_27
; %bb.24:
	ldr	x8, [x22]
	cbz	x8, LBB0_26
; %bb.25:
Lloh34:
	adrp	x9, _EL_HIST@GOTPAGE
Lloh35:
	ldr	x9, [x9, _EL_HIST@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x9]
Lloh37:
	adrp	x9, _history@GOTPAGE
Lloh38:
	ldr	x9, [x9, _history@GOTPAGEOFF]
Lloh39:
	ldrsw	x2, [x9]
	str	x8, [sp]
	bl	_el_set
	ldr	x0, [x19]
LBB0_26:
Lloh40:
	adrp	x8, _EL_PROMPT@GOTPAGE
Lloh41:
	ldr	x8, [x8, _EL_PROMPT@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
Lloh43:
	adrp	x8, _getprompt@GOTPAGE
Lloh44:
	ldr	x8, [x8, _getprompt@GOTPAGEOFF]
Lloh45:
	ldrsw	x2, [x8]
	bl	_el_set
	ldr	x0, [x19]
Lloh46:
	adrp	x8, _EL_ADDFN@GOTPAGE
Lloh47:
	ldr	x8, [x8, _EL_ADDFN@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
Lloh49:
	adrp	x8, __el_fn_complete@GOTPAGE
Lloh50:
	ldr	x8, [x8, __el_fn_complete@GOTPAGEOFF]
Lloh51:
	ldr	x8, [x8]
Lloh52:
	adrp	x9, l_.str.5@PAGE
Lloh53:
	add	x9, x9, l_.str.5@PAGEOFF
	stp	x9, x8, [sp]
Lloh54:
	adrp	x2, l_.str.4@PAGE
Lloh55:
	add	x2, x2, l_.str.4@PAGEOFF
	bl	_el_set
	b	LBB0_28
LBB0_27:
Lloh56:
	adrp	x0, l_.str.6@PAGE
Lloh57:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_out2fmt_flush
LBB0_28:
	ldr	x0, [x19]
LBB0_29:
	cbz	x0, LBB0_32
; %bb.30:
	ldr	x8, [x21]
	cbz	x8, LBB0_33
; %bb.31:
Lloh58:
	adrp	x2, l_.str.7@PAGE
Lloh59:
	add	x2, x2, l_.str.7@PAGEOFF
	b	LBB0_35
LBB0_32:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_33:
	ldr	x8, [x20]
	cbz	x8, LBB0_36
; %bb.34:
Lloh60:
	adrp	x2, l_.str.8@PAGE
Lloh61:
	add	x2, x2, l_.str.8@PAGEOFF
LBB0_35:
Lloh62:
	adrp	x8, _EL_EDITOR@GOTPAGE
Lloh63:
	ldr	x8, [x8, _EL_EDITOR@GOTPAGEOFF]
Lloh64:
	ldr	w1, [x8]
	bl	_el_set
LBB0_36:
	ldr	x0, [x19]
Lloh65:
	adrp	x8, _EL_BIND@GOTPAGE
Lloh66:
	ldr	x8, [x8, _EL_BIND@GOTPAGEOFF]
Lloh67:
	ldr	w1, [x8]
Lloh68:
	adrp	x8, l_.str.4@PAGE
Lloh69:
	add	x8, x8, l_.str.4@PAGEOFF
	stp	x8, xzr, [sp]
Lloh70:
	adrp	x2, l_.str.9@PAGE
Lloh71:
	add	x2, x2, l_.str.9@PAGEOFF
	bl	_el_set
	ldr	x0, [x19]
	mov	x1, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_el_source
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpAdd	Lloh70, Lloh71
	.loh AdrpAdd	Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.cfi_endproc
                                        ; -- End function
	.comm	_iflag,8,3                      ; @iflag
	.comm	_hist,8,3                       ; @hist
	.comm	_INTOFF,4,2                     ; @INTOFF
	.comm	_INTON,4,2                      ; @INTON
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sh: can't initialize history\n"

	.comm	_Eflag,8,3                      ; @Eflag
	.comm	_Vflag,8,3                      ; @Vflag
	.comm	_el,8,3                         ; @el
	.comm	_el_in,8,3                      ; @el_in
l_.str.1:                               ; @.str.1
	.asciz	"r"

	.comm	_el_out,8,3                     ; @el_out
l_.str.2:                               ; @.str.2
	.asciz	"w"

l_.str.3:                               ; @.str.3
	.asciz	"TERM"

	.comm	_arg0,4,2                       ; @arg0
	.comm	_EL_HIST,4,2                    ; @EL_HIST
	.comm	_history,4,2                    ; @history
	.comm	_EL_PROMPT,4,2                  ; @EL_PROMPT
	.comm	_getprompt,4,2                  ; @getprompt
	.comm	_EL_ADDFN,4,2                   ; @EL_ADDFN
l_.str.4:                               ; @.str.4
	.asciz	"sh-complete"

l_.str.5:                               ; @.str.5
	.asciz	"Filename completion"

	.comm	__el_fn_complete,8,3            ; @_el_fn_complete
l_.str.6:                               ; @.str.6
	.asciz	"sh: can't initialize editing\n"

	.comm	_EL_EDITOR,4,2                  ; @EL_EDITOR
l_.str.7:                               ; @.str.7
	.asciz	"vi"

l_.str.8:                               ; @.str.8
	.asciz	"emacs"

	.comm	_EL_BIND,4,2                    ; @EL_BIND
l_.str.9:                               ; @.str.9
	.asciz	"^I"

	.comm	_editing,8,3                    ; @editing
.subsections_via_symbols
