	.file	"extr_setup.c_setup_and_wait.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"fork failed"
.LC1:
	.string	"execvp %s"
.LC2:
	.string	"unexpect stop in waitpid"
	.text
	.p2align 4
	.globl	setup_and_wait
	.type	setup_and_wait, @function
setup_and_wait:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xor	eax, eax
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	QWORD PTR [rsp], rdi
	mov	QWORD PTR 8[rsp], rsi
	call	vfork@PLT
	endbr64
	mov	ebp, eax
	cmp	eax, -1
	je	.L3
.L6:
	test	ebp, ebp
	je	.L14
	xor	edx, edx
	xor	esi, esi
	mov	edi, ebp
	call	waitpid@PLT
	test	rax, rax
	js	.L15
.L10:
	mov	rdi, QWORD PTR [rsp]
	mov	esi, ebp
	xor	edx, edx
	call	new_proc@PLT
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	edi, DWORD PTR PT_TRACE_ME[rip]
	xor	ecx, ecx
	xor	edx, edx
	xor	esi, esi
	call	ptrace@PLT
	mov	rbx, QWORD PTR 8[rsp]
	mov	rdi, QWORD PTR [rbx]
	mov	rsi, rbx
	call	execvp@PLT
	mov	rdx, QWORD PTR [rbx]
	mov	edi, 1
	xor	eax, eax
	lea	rsi, .LC1[rip]
	call	err@PLT
	xor	edx, edx
	xor	esi, esi
	mov	edi, ebp
	call	waitpid@PLT
	test	rax, rax
	jns	.L10
.L15:
	lea	rsi, .LC2[rip]
	mov	edi, 1
	xor	eax, eax
	call	err@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	lea	rsi, .LC0[rip]
	mov	edi, 1
	xor	eax, eax
	call	err@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	setup_and_wait, .-setup_and_wait
	.comm	PT_TRACE_ME,4,4
	.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_setup.c_setup_and_wait.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"fork failed\000"
	.align	2
.LC1:
	.ascii	"execvp %s\000"
	.align	2
.LC2:
	.ascii	"unexpect stop in waitpid\000"
	.text
	.align	2
	.global	setup_and_wait
	.syntax unified
	.arm
	.fpu softvfp
	.type	setup_and_wait, %function
setup_and_wait:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	sub	sp, sp, #12
	stm	sp, {r0, r1}
	bl	vfork
	cmn	r0, #1
	mov	r4, r0
	beq	.L3
.L6:
	cmp	r4, #0
	beq	.L14
.L5:
	mov	r2, #0
	mov	r0, r4
	mov	r1, r2
	bl	waitpid
	cmp	r0, #0
	blt	.L15
.L10:
	mov	r1, r4
	mov	r2, #0
	ldr	r0, [sp]
	bl	new_proc
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L14:
	ldr	r2, .L16
	mov	r3, r4
	mov	r1, r4
	ldr	r0, [r2]
	mov	r2, r4
	bl	ptrace
	ldr	r5, [sp, #4]
	mov	r1, r5
	ldr	r0, [r5]
	bl	execvp
	ldr	r2, [r5]
	ldr	r1, .L16+4
	mov	r0, #1
	bl	err
	b	.L5
.L15:
	ldr	r1, .L16+8
	mov	r0, #1
	bl	err
	b	.L10
.L3:
	ldr	r1, .L16+12
	mov	r0, #1
	bl	err
	b	.L6
.L17:
	.align	2
.L16:
	.word	PT_TRACE_ME
	.word	.LC1
	.word	.LC2
	.word	.LC0
	.size	setup_and_wait, .-setup_and_wait
	.comm	PT_TRACE_ME,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
