	.file	"extr_pw_util.c_pw_edit.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"EDITOR"
	.text
	.p2align 4
	.globl	pw_edit
	.type	pw_edit, @function
pw_edit:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edi
	lea	rdi, .LC0[rip]
	sub	rsp, 120
	.cfi_def_cfa_offset 176
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 104[rsp], rax
	xor	eax, eax
	call	getenv@PLT
	mov	edi, DWORD PTR tempname[rip]
	lea	rsi, 64[rsp]
	test	rax, rax
	mov	rbp, rax
	cmove	rbp, QWORD PTR _PATH_VI[rip]
	call	stat@PLT
	cmp	eax, -1
	je	.L13
	mov	eax, DWORD PTR SIG_IGN[rip]
	lea	rdi, 24[rsp]
	lea	r12, 16[rsp]
	lea	r14, 32[rsp]
	lea	r13, 48[rsp]
	mov	DWORD PTR 28[rsp], eax
	lea	r15, 8[rsp]
	call	sigemptyset@PLT
	mov	edi, DWORD PTR SIGINT[rip]
	mov	rsi, r12
	mov	rdx, r14
	mov	QWORD PTR 16[rsp], 0
	call	sigaction@PLT
	mov	edi, DWORD PTR SIGQUIT[rip]
	mov	rdx, r13
	mov	rsi, r12
	lea	r12, 4[rsp]
	call	sigaction@PLT
	mov	rdi, r15
	call	sigemptyset@PLT
	mov	esi, DWORD PTR SIGCHLD[rip]
	mov	rdi, r15
	call	sigaddset@PLT
	mov	edi, DWORD PTR SIG_BLOCK[rip]
	mov	rdx, r12
	mov	rsi, r15
	call	sigprocmask@PLT
	call	fork@PLT
	mov	DWORD PTR editpid[rip], eax
	mov	edi, eax
	cmp	eax, -1
	je	.L1
	test	eax, eax
	je	.L31
.L5:
	lea	rbx, 12[rsp]
.L7:
	mov	edx, DWORD PTR WUNTRACED[rip]
	mov	rsi, rbx
	call	waitpid@PLT
	cmp	eax, -1
	jne	.L8
	mov	rax, QWORD PTR EINTR[rip]
	cmp	QWORD PTR errno[rip], rax
	je	.L9
.L12:
	mov	edi, DWORD PTR tempname[rip]
	call	unlink@PLT
.L29:
	mov	edi, DWORD PTR SIGINT[rip]
	xor	edx, edx
	mov	rsi, r14
	mov	DWORD PTR editpid[rip], -1
	call	sigaction@PLT
	mov	edi, DWORD PTR SIGQUIT[rip]
	xor	edx, edx
	mov	rsi, r13
	call	sigaction@PLT
	mov	edi, DWORD PTR SIG_SETMASK[rip]
	xor	edx, edx
	mov	rsi, r12
	call	sigprocmask@PLT
	mov	edi, DWORD PTR tempname[rip]
	lea	rsi, 80[rsp]
	call	stat@PLT
	cmp	eax, -1
	je	.L13
	mov	rax, QWORD PTR 80[rsp]
	mov	edi, 1
	cmp	QWORD PTR 64[rsp], rax
	je	.L32
.L1:
	mov	rax, QWORD PTR 104[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L33
	add	rsp, 120
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, edi
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L31:
	.cfi_restore_state
	mov	edi, DWORD PTR SIGINT[rip]
	xor	edx, edx
	mov	rsi, r14
	call	sigaction@PLT
	mov	edi, DWORD PTR SIGQUIT[rip]
	xor	edx, edx
	mov	rsi, r13
	call	sigaction@PLT
	mov	edi, DWORD PTR SIG_SETMASK[rip]
	xor	edx, edx
	mov	rsi, r12
	call	sigprocmask@PLT
	test	ebx, ebx
	jne	.L34
.L6:
	mov	edx, DWORD PTR tempname[rip]
	xor	ecx, ecx
	mov	rsi, rbp
	mov	rdi, rbp
	mov	QWORD PTR errno[rip], 0
	call	execlp@PLT
	mov	rdi, QWORD PTR errno[rip]
	call	_exit@PLT
	mov	edi, DWORD PTR editpid[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edi, DWORD PTR 12[rsp]
	call	WIFSTOPPED@PLT
	mov	edi, DWORD PTR 12[rsp]
	test	rax, rax
	je	.L11
	call	WSTOPSIG@PLT
	mov	edi, eax
	call	raise@PLT
.L9:
	mov	edi, DWORD PTR editpid[rip]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edi, -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L32:
	xor	edi, edi
	mov	rax, QWORD PTR 88[rsp]
	cmp	QWORD PTR 72[rsp], rax
	setne	dil
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L34:
	xor	eax, eax
	call	getgid@PLT
	mov	edi, eax
	call	setgid@PLT
	xor	eax, eax
	call	getuid@PLT
	mov	edi, eax
	call	setuid@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L11:
	call	WIFEXITED@PLT
	test	rax, rax
	je	.L12
	mov	edi, DWORD PTR 12[rsp]
	call	WEXITSTATUS@PLT
	test	rax, rax
	jne	.L12
	jmp	.L29
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pw_edit, .-pw_edit
	.comm	tempname,4,4
	.comm	errno,8,8
	.comm	editpid,4,4
	.comm	_PATH_VI,8,8
	.comm	WUNTRACED,4,4
	.comm	SIG_SETMASK,4,4
	.comm	SIG_IGN,4,4
	.comm	SIG_BLOCK,4,4
	.comm	SIGQUIT,4,4
	.comm	SIGINT,4,4
	.comm	SIGCHLD,4,4
	.comm	EINTR,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_pw_util.c_pw_edit.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"EDITOR\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	pw_edit
	.syntax unified
	.arm
	.fpu softvfp
	.type	pw_edit, %function
pw_edit:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L36
	sub	sp, sp, #84
	mov	r10, r0
	ldr	r0, .L36+4
	ldr	r3, [r3]
	str	r3, [sp, #76]
	mov	r3,#0
	bl	getenv
	ldr	r4, .L36+8
	subs	r8, r0, #0
	ldreq	r3, .L36+12
	ldr	r0, [r4]
	add	r1, sp, #24
	ldreq	r8, [r3]
	bl	stat
	cmn	r0, #1
	beq	.L13
	ldr	r3, .L36+16
	add	r0, sp, #44
	ldr	r3, [r3]
	ldr	r7, .L36+20
	str	r3, [sp, #48]
	bl	sigemptyset
	mov	r3, #0
	ldr	r6, .L36+24
	add	r1, sp, #40
	add	r2, sp, #52
	ldr	r0, [r7]
	str	r3, [sp, #40]
	bl	sigaction
	add	r2, sp, #64
	add	r1, sp, #40
	ldr	r0, [r6]
	bl	sigaction
	add	r0, sp, #16
	bl	sigemptyset
	ldr	r3, .L36+28
	add	r0, sp, #16
	ldr	r1, [r3]
	bl	sigaddset
	ldr	r3, .L36+32
	add	r2, sp, #12
	ldr	r0, [r3]
	add	r1, sp, #16
	bl	sigprocmask
	bl	fork
	ldr	r5, .L36+36
	cmn	r0, #1
	mov	r2, r0
	str	r0, [r5]
	beq	.L1
	cmp	r0, #0
	beq	.L29
	ldr	r9, .L36+40
.L5:
	ldr	r8, .L36+44
	ldr	fp, .L36+48
	ldr	r10, .L36+52
.L7:
	mov	r0, r2
	add	r1, sp, #20
	ldr	r2, [r8]
	bl	waitpid
	cmn	r0, #1
	str	r0, [sp, #4]
	bne	.L8
	ldr	r1, [fp]
	ldr	r2, [r10]
	cmp	r1, r2
	beq	.L9
	ldr	r0, [r4]
	bl	unlink
	ldr	r3, [sp, #4]
	str	r3, [r5]
.L10:
	mov	r2, #0
	add	r1, sp, #52
	ldr	r0, [r7]
	bl	sigaction
	mov	r2, #0
	add	r1, sp, #64
	ldr	r0, [r6]
	bl	sigaction
	mov	r2, #0
	add	r1, sp, #12
	ldr	r0, [r9]
	bl	sigprocmask
	ldr	r0, [r4]
	add	r1, sp, #32
	bl	stat
	cmn	r0, #1
	beq	.L13
	ldr	r2, [sp, #24]
	ldr	r3, [sp, #32]
	cmp	r2, r3
	movne	r2, #1
	beq	.L33
.L1:
	ldr	r3, .L36
	ldr	r1, [r3]
	ldr	r3, [sp, #76]
	eors	r1, r3, r1
	mov	r3, #0
	bne	.L34
	mov	r0, r2
	add	sp, sp, #84
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L29:
	str	r0, [sp, #4]
	add	r1, sp, #52
	ldr	r0, [r7]
	ldr	r9, .L36+40
	bl	sigaction
	ldr	r2, [sp, #4]
	add	r1, sp, #64
	ldr	r0, [r6]
	bl	sigaction
	ldr	r2, [sp, #4]
	ldr	r0, [r9]
	add	r1, sp, #12
	bl	sigprocmask
	cmp	r10, #0
	bne	.L35
.L6:
	mov	r3, #0
	ldr	r10, .L36+48
	ldr	r2, [r4]
	mov	r1, r8
	mov	r0, r8
	str	r3, [r10]
	bl	execlp
	ldr	r0, [r10]
	bl	_exit
	ldr	r2, [r5]
	b	.L5
.L8:
	ldr	r0, [sp, #20]
	bl	WIFSTOPPED
	cmp	r0, #0
	ldr	r0, [sp, #20]
	beq	.L11
	bl	WSTOPSIG
	bl	raise
.L9:
	ldr	r2, [r5]
	b	.L7
.L13:
	mvn	r2, #0
	b	.L1
.L33:
	ldr	r2, [sp, #28]
	ldr	r0, [sp, #36]
	subs	r2, r2, r0
	movne	r2, #1
	b	.L1
.L35:
	bl	getgid
	bl	setgid
	bl	getuid
	bl	setuid
	b	.L6
.L11:
	bl	WIFEXITED
	cmp	r0, #0
	beq	.L12
	ldr	r0, [sp, #20]
	bl	WEXITSTATUS
	cmp	r0, #0
	beq	.L31
.L12:
	ldr	r0, [r4]
	bl	unlink
.L31:
	mvn	r3, #0
	str	r3, [r5]
	b	.L10
.L34:
	bl	__stack_chk_fail
.L37:
	.align	2
.L36:
	.word	.LC1
	.word	.LC0
	.word	tempname
	.word	_PATH_VI
	.word	SIG_IGN
	.word	SIGINT
	.word	SIGQUIT
	.word	SIGCHLD
	.word	SIG_BLOCK
	.word	editpid
	.word	SIG_SETMASK
	.word	WUNTRACED
	.word	errno
	.word	EINTR
	.size	pw_edit, .-pw_edit
	.comm	tempname,4,4
	.comm	errno,4,4
	.comm	editpid,4,4
	.comm	_PATH_VI,4,4
	.comm	WUNTRACED,4,4
	.comm	SIG_SETMASK,4,4
	.comm	SIG_IGN,4,4
	.comm	SIG_BLOCK,4,4
	.comm	SIGQUIT,4,4
	.comm	SIGINT,4,4
	.comm	SIGCHLD,4,4
	.comm	EINTR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
