	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pw_edit                        ## -- Begin function pw_edit
	.p2align	4, 0x90
_pw_edit:                               ## @pw_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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r12d
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	movq	%rax, %r15
	movq	__PATH_VI@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_tempname@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-104(%rbp), %rsi
	callq	_stat
	movl	$-1, %edi
	cmpl	$-1, %eax
	je	LBB0_17
## %bb.1:
	movq	_SIG_IGN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	leaq	-56(%rbp), %rdi
	callq	_sigemptyset
	movq	$0, -64(%rbp)
	movq	_SIGINT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-64(%rbp), %rbx
	leaq	-136(%rbp), %rdx
	movq	%rbx, %rsi
	callq	_sigaction
	movq	_SIGQUIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-120(%rbp), %rdx
	movq	%rbx, %rsi
	callq	_sigaction
	leaq	-68(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_sigemptyset
	movq	_SIGCHLD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sigaddset
	movq	_SIG_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rsi
	callq	_sigprocmask
	xorl	%eax, %eax
	callq	_fork
	movl	%eax, %edi
	movq	_editpid@GOTPCREL(%rip), %r14
	movl	%eax, (%r14)
	cmpl	$-1, %eax
	je	LBB0_17
## %bb.2:
	testl	%edi, %edi
	je	LBB0_6
## %bb.3:
	movq	_WUNTRACED@GOTPCREL(%rip), %r15
	leaq	-44(%rbp), %rbx
	movq	_errno@GOTPCREL(%rip), %r12
	movq	_EINTR@GOTPCREL(%rip), %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r12), %rax
	cmpq	(%r13), %rax
	jne	LBB0_14
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r14), %edi
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edx
	movq	%rbx, %rsi
	callq	_waitpid
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %edi
	callq	_WIFSTOPPED
	movl	-44(%rbp), %edi
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	callq	_WSTOPSIG
	movl	%eax, %edi
	callq	_raise
	jmp	LBB0_11
LBB0_12:
	callq	_WIFEXITED
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movl	-44(%rbp), %edi
	callq	_WEXITSTATUS
	testq	%rax, %rax
	je	LBB0_15
LBB0_14:
	movq	_tempname@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_unlink
LBB0_15:
	movl	$-1, (%r14)
	movq	_SIGINT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-136(%rbp), %rsi
	xorl	%edx, %edx
	callq	_sigaction
	movq	_SIGQUIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-120(%rbp), %rsi
	xorl	%edx, %edx
	callq	_sigaction
	movq	_SIG_SETMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	callq	_sigprocmask
	movq	_tempname@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-88(%rbp), %rsi
	callq	_stat
	cmpl	$-1, %eax
	movl	$-1, %edi
	je	LBB0_17
## %bb.16:
	movq	-104(%rbp), %rax
	movq	-96(%rbp), %rcx
	xorq	-88(%rbp), %rax
	xorq	-80(%rbp), %rcx
	xorl	%edi, %edi
	orq	%rax, %rcx
	setne	%dil
LBB0_17:
	movl	%edi, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_SIGINT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-136(%rbp), %rsi
	xorl	%edx, %edx
	callq	_sigaction
	movq	_SIGQUIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-120(%rbp), %rsi
	xorl	%edx, %edx
	callq	_sigaction
	movq	_SIG_SETMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	callq	_sigprocmask
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	callq	_getgid
	movl	%eax, %edi
	callq	_setgid
	xorl	%eax, %eax
	callq	_getuid
	movl	%eax, %edi
	callq	_setuid
LBB0_8:
	testq	%r15, %r15
	cmovneq	%r15, %r13
	movq	_errno@GOTPCREL(%rip), %rbx
	movq	$0, (%rbx)
	movq	_tempname@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%r13, %rsi
	xorl	%ecx, %ecx
	callq	_execlp
	movq	(%rbx), %rdi
	callq	__exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EDITOR"

	.comm	__PATH_VI,8,3                   ## @_PATH_VI
	.comm	_tempname,4,2                   ## @tempname
	.comm	_SIG_IGN,4,2                    ## @SIG_IGN
	.comm	_SIGINT,4,2                     ## @SIGINT
	.comm	_SIGQUIT,4,2                    ## @SIGQUIT
	.comm	_SIGCHLD,4,2                    ## @SIGCHLD
	.comm	_SIG_BLOCK,4,2                  ## @SIG_BLOCK
	.comm	_editpid,4,2                    ## @editpid
	.comm	_SIG_SETMASK,4,2                ## @SIG_SETMASK
	.comm	_errno,8,3                      ## @errno
	.comm	_WUNTRACED,4,2                  ## @WUNTRACED
	.comm	_EINTR,8,3                      ## @EINTR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pw_edit                        ; -- Begin function pw_edit
	.p2align	2
_pw_edit:                               ; @pw_edit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	mov	x19, x0
Lloh2:
	adrp	x8, __PATH_VI@GOTPAGE
Lloh3:
	ldr	x8, [x8, __PATH_VI@GOTPAGEOFF]
Lloh4:
	ldr	x25, [x8]
Lloh5:
	adrp	x22, _tempname@GOTPAGE
Lloh6:
	ldr	x22, [x22, _tempname@GOTPAGEOFF]
	ldr	w0, [x22]
	add	x1, sp, #24
	bl	_stat
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.1:
Lloh7:
	adrp	x8, _SIG_IGN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SIG_IGN@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [sp, #92]
	add	x8, sp, #80
	add	x0, x8, #8
	bl	_sigemptyset
	str	xzr, [sp, #80]
Lloh10:
	adrp	x24, _SIGINT@GOTPAGE
Lloh11:
	ldr	x24, [x24, _SIGINT@GOTPAGEOFF]
	ldr	w0, [x24]
	add	x1, sp, #80
	add	x2, sp, #64
	bl	_sigaction
Lloh12:
	adrp	x23, _SIGQUIT@GOTPAGE
Lloh13:
	ldr	x23, [x23, _SIGQUIT@GOTPAGEOFF]
	ldr	w0, [x23]
	add	x1, sp, #80
	add	x2, sp, #48
	bl	_sigaction
	add	x0, sp, #40
	bl	_sigemptyset
Lloh14:
	adrp	x8, _SIGCHLD@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SIGCHLD@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	add	x0, sp, #40
	bl	_sigaddset
Lloh17:
	adrp	x8, _SIG_BLOCK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SIG_BLOCK@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	add	x1, sp, #40
	add	x2, sp, #44
	bl	_sigprocmask
	bl	_fork
	mov	x21, x0
Lloh20:
	adrp	x26, _editpid@GOTPAGE
Lloh21:
	ldr	x26, [x26, _editpid@GOTPAGEOFF]
	str	w0, [x26]
	cmn	w0, #1
	b.eq	LBB0_15
; %bb.2:
	cbz	w21, LBB0_16
; %bb.3:
Lloh22:
	adrp	x19, _WUNTRACED@GOTPAGE
Lloh23:
	ldr	x19, [x19, _WUNTRACED@GOTPAGEOFF]
Lloh24:
	adrp	x20, _errno@GOTPAGE
Lloh25:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
Lloh26:
	adrp	x25, _EINTR@GOTPAGE
Lloh27:
	ldr	x25, [x25, _EINTR@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_12
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w21, [x26]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x19]
	add	x1, sp, #4
	mov	x0, x21
	bl	_waitpid
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [sp, #4]
	bl	_WIFSTOPPED
	mov	x8, x0
	ldr	w0, [sp, #4]
	cbz	x8, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_WSTOPSIG
	bl	_raise
	b	LBB0_5
LBB0_9:
	mov	w21, #-1
	b	LBB0_15
LBB0_10:
	bl	_WIFEXITED
	cbz	x0, LBB0_12
; %bb.11:
	ldr	w0, [sp, #4]
	bl	_WEXITSTATUS
	cbz	x0, LBB0_13
LBB0_12:
	ldr	w0, [x22]
	bl	_unlink
LBB0_13:
	mov	w21, #-1
	str	w21, [x26]
	ldr	w0, [x24]
	add	x1, sp, #64
	mov	x2, #0
	bl	_sigaction
	ldr	w0, [x23]
	add	x1, sp, #48
	mov	x2, #0
	bl	_sigaction
Lloh28:
	adrp	x8, _SIG_SETMASK@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SIG_SETMASK@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	add	x1, sp, #44
	mov	x2, #0
	bl	_sigprocmask
	ldr	w0, [x22]
	add	x1, sp, #8
	bl	_stat
	cmn	w0, #1
	b.eq	LBB0_15
; %bb.14:
	ldp	x8, x9, [sp, #24]
	ldp	x10, x11, [sp, #8]
	cmp	x8, x10
	ccmp	x9, x11, #0, eq
	cset	w21, ne
LBB0_15:
	mov	x0, x21
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_16:
	ldr	w0, [x24]
	add	x1, sp, #64
	mov	x2, #0
	bl	_sigaction
	ldr	w0, [x23]
	add	x1, sp, #48
	mov	x2, #0
	bl	_sigaction
Lloh31:
	adrp	x8, _SIG_SETMASK@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SIG_SETMASK@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	add	x1, sp, #44
	mov	x2, #0
	bl	_sigprocmask
	cbz	w20, LBB0_18
; %bb.17:
	bl	_getgid
	bl	_setgid
	bl	_getuid
	bl	_setuid
LBB0_18:
	cmp	x19, #0
	csel	x0, x25, x19, eq
Lloh34:
	adrp	x19, _errno@GOTPAGE
Lloh35:
	ldr	x19, [x19, _errno@GOTPAGEOFF]
	str	xzr, [x19]
	ldr	w2, [x22]
	mov	x1, x0
	mov	x3, #0
	bl	_execlp
	ldr	x0, [x19]
	bl	__exit
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EDITOR"

	.comm	__PATH_VI,8,3                   ; @_PATH_VI
	.comm	_tempname,4,2                   ; @tempname
	.comm	_SIG_IGN,4,2                    ; @SIG_IGN
	.comm	_SIGINT,4,2                     ; @SIGINT
	.comm	_SIGQUIT,4,2                    ; @SIGQUIT
	.comm	_SIGCHLD,4,2                    ; @SIGCHLD
	.comm	_SIG_BLOCK,4,2                  ; @SIG_BLOCK
	.comm	_editpid,4,2                    ; @editpid
	.comm	_SIG_SETMASK,4,2                ; @SIG_SETMASK
	.comm	_errno,8,3                      ; @errno
	.comm	_WUNTRACED,4,2                  ; @WUNTRACED
	.comm	_EINTR,8,3                      ; @EINTR
.subsections_via_symbols
