	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_editit                         ## -- Begin function editit
	.p2align	4, 0x90
_editit:                                ## @editit
	.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
	movq	%rdi, %r14
	movq	_SIGINT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sigmask
	movl	%eax, %ebx
	movq	_SIGQUIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sigmask
	orl	%eax, %ebx
	movq	_SIGHUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sigmask
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_sigblock
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_fork
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	testl	%ebx, %ebx
	jne	LBB0_14
LBB0_2:
	movq	%r15, %rdi
	callq	_sigsetmask
	xorl	%eax, %eax
	callq	_getgid
	movl	%eax, %edi
	callq	_setgid
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_4:
	xorl	%eax, %eax
	callq	_getuid
	movl	%eax, %edi
	callq	_setuid
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_6:
	leaq	L_.str.4(%rip), %rdi
	callq	_getenv
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	__PATH_VI@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
LBB0_8:
	movq	%r12, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	callq	_execlp
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_14
LBB0_9:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_errno@GOTPCREL(%rip), %r12
	movq	_EPROCLIM@GOTPCREL(%rip), %r13
	movq	_EAGAIN@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	cmpq	(%r13), %rax
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	(%r14), %rax
	jne	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	$1, %edi
	callq	_sleep
	xorl	%eax, %eax
	callq	_fork
	testl	%eax, %eax
	js	LBB0_10
## %bb.13:
	movl	%eax, %ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	testl	%ebx, %ebx
	je	LBB0_2
LBB0_14:
	leaq	-44(%rbp), %rsi
	xorl	%r14d, %r14d
	movl	%ebx, %edi
	xorl	%edx, %edx
	callq	_waitpid
	movq	%r15, %rdi
	callq	_sigsetmask
	movl	-44(%rbp), %edi
	callq	_WIFEXITED
	testl	%eax, %eax
	je	LBB0_19
## %bb.15:
	movl	-44(%rbp), %edi
	callq	_WEXITSTATUS
	xorl	%r14d, %r14d
	testq	%rax, %rax
	sete	%r14b
	jmp	LBB0_19
LBB0_16:
	leaq	L_.str(%rip), %rdi
	callq	_warnx
	jmp	LBB0_18
LBB0_17:
	leaq	L_.str.1(%rip), %rdi
	callq	_warn
LBB0_18:
	xorl	%r14d, %r14d
LBB0_19:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGINT,4,2                     ## @SIGINT
	.comm	_SIGQUIT,4,2                    ## @SIGQUIT
	.comm	_SIGHUP,4,2                     ## @SIGHUP
	.comm	_errno,8,3                      ## @errno
	.comm	_EPROCLIM,8,3                   ## @EPROCLIM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"you have too many processes"

	.comm	_EAGAIN,8,3                     ## @EAGAIN
L_.str.1:                               ## @.str.1
	.asciz	"fork"

L_.str.2:                               ## @.str.2
	.asciz	"setgid failed"

L_.str.3:                               ## @.str.3
	.asciz	"setuid failed"

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

	.comm	__PATH_VI,8,3                   ## @_PATH_VI
L_.str.5:                               ## @.str.5
	.asciz	"%s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_editit                         ; -- Begin function editit
	.p2align	2
_editit:                                ; @editit
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _SIGINT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIGINT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_sigmask
	mov	x20, x0
Lloh3:
	adrp	x8, _SIGQUIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIGQUIT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_sigmask
	orr	w20, w0, w20
Lloh6:
	adrp	x8, _SIGHUP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SIGHUP@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_sigmask
	orr	w0, w20, w0
	bl	_sigblock
	mov	x20, x0
	bl	_fork
	mov	x21, x0
	tbnz	w0, #31, LBB0_7
; %bb.1:
	cbnz	w21, LBB0_12
LBB0_2:
	mov	x0, x20
	bl	_sigsetmask
	bl	_getgid
	bl	_setgid
	cbz	x0, LBB0_4
; %bb.3:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_4:
	bl	_getuid
	bl	_setuid
	cbz	x0, LBB0_6
; %bb.5:
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_6:
Lloh13:
	adrp	x0, l_.str.4@PAGE
Lloh14:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_getenv
Lloh15:
	adrp	x8, __PATH_VI@GOTPAGE
Lloh16:
	ldr	x8, [x8, __PATH_VI@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x0, #0
	csel	x22, x8, x0, eq
	mov	x0, x22
	mov	x1, x22
	mov	x2, x19
	mov	x3, #0
	bl	_execlp
	str	x22, [sp]
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_err
	b	LBB0_12
LBB0_7:
Lloh20:
	adrp	x22, _errno@GOTPAGE
Lloh21:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
Lloh22:
	adrp	x23, _EPROCLIM@GOTPAGE
Lloh23:
	ldr	x23, [x23, _EPROCLIM@GOTPAGEOFF]
Lloh24:
	adrp	x24, _EAGAIN@GOTPAGE
Lloh25:
	ldr	x24, [x24, _EAGAIN@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	w0, #1
	bl	_sleep
	bl	_fork
	tbnz	w0, #31, LBB0_8
; %bb.11:
	mov	x21, x0
	cbz	w21, LBB0_2
LBB0_12:
	add	x1, sp, #12
	mov	x0, x21
	mov	w2, #0
	bl	_waitpid
	mov	x0, x20
	bl	_sigsetmask
	ldr	w0, [sp, #12]
	bl	_WIFEXITED
	cbz	w0, LBB0_17
; %bb.13:
	ldr	w0, [sp, #12]
	bl	_WEXITSTATUS
	cmp	x0, #0
	cset	w0, eq
	b	LBB0_17
LBB0_14:
Lloh26:
	adrp	x0, l_.str@PAGE
Lloh27:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
	b	LBB0_16
LBB0_15:
Lloh28:
	adrp	x0, l_.str.1@PAGE
Lloh29:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
LBB0_16:
	mov	w0, #0
LBB0_17:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGINT,4,2                     ; @SIGINT
	.comm	_SIGQUIT,4,2                    ; @SIGQUIT
	.comm	_SIGHUP,4,2                     ; @SIGHUP
	.comm	_errno,8,3                      ; @errno
	.comm	_EPROCLIM,8,3                   ; @EPROCLIM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"you have too many processes"

	.comm	_EAGAIN,8,3                     ; @EAGAIN
l_.str.1:                               ; @.str.1
	.asciz	"fork"

l_.str.2:                               ; @.str.2
	.asciz	"setgid failed"

l_.str.3:                               ; @.str.3
	.asciz	"setuid failed"

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

	.comm	__PATH_VI,8,3                   ; @_PATH_VI
l_.str.5:                               ; @.str.5
	.asciz	"%s"

.subsections_via_symbols
