	.file	"extr_timedrun.c_wait_for_process.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Timeout.. killing the process\n"
	.align 8
.LC1:
	.string	"lost child when trying to kill"
	.text
	.p2align 4
	.type	wait_for_process, @function
wait_for_process:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xor	edx, edx
	lea	r14, .LC0[rip]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	xor	ebx, ebx
	sub	rsp, 48
	.cfi_def_cfa_offset 96
	mov	edi, DWORD PTR SIGALRM[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	lea	rbp, 16[rsp]
	mov	eax, DWORD PTR signal_handler[rip]
	mov	DWORD PTR 12[rsp], 0
	mov	rsi, rbp
	lea	r13, 12[rsp]
	mov	QWORD PTR 16[rsp], 0
	mov	DWORD PTR 24[rsp], eax
	call	sigaction@PLT
	mov	edi, DWORD PTR SIGHUP[rip]
	xor	edx, edx
	mov	rsi, rbp
	call	sigaction@PLT
	mov	edi, DWORD PTR SIGINT[rip]
	xor	edx, edx
	mov	rsi, rbp
	call	sigaction@PLT
	mov	edi, DWORD PTR SIGUSR1[rip]
	xor	edx, edx
	mov	rsi, rbp
	call	sigaction@PLT
	mov	edi, DWORD PTR SIGTERM[rip]
	xor	edx, edx
	mov	rsi, rbp
	call	sigaction@PLT
	mov	edi, DWORD PTR SIGPIPE[rip]
	xor	edx, edx
	mov	rsi, rbp
	call	sigaction@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L18:
	mov	ebp, DWORD PTR SIGKILL[rip]
	cmp	ebx, 1
	cmove	ebp, DWORD PTR SIGTERM[rip]
.L9:
	mov	esi, ebp
	mov	rdi, r12
	call	kill@PLT
	test	rax, rax
	js	.L16
.L10:
	mov	edi, 5
	add	ebx, 1
	call	alarm@PLT
.L11:
	xor	edx, edx
	mov	rsi, r13
	mov	rdi, r12
	call	waitpid@PLT
	cmp	r12, rax
	je	.L17
	test	ebx, ebx
	jne	.L18
	mov	eax, DWORD PTR caught_sig[rip]
	test	eax, eax
	mov	ebp, eax
	cmovle	ebp, DWORD PTR SIGTERM[rip]
	cmp	eax, DWORD PTR SIGALRM[rip]
	jne	.L9
	mov	edi, DWORD PTR stderr[rip]
	mov	rsi, r14
	call	fprintf@PLT
	mov	esi, ebp
	mov	rdi, r12
	call	kill@PLT
	test	rax, rax
	jns	.L10
	.p2align 4,,10
	.p2align 3
.L16:
	lea	rdi, .LC1[rip]
	call	perror@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edi, DWORD PTR 12[rsp]
	call	WIFEXITED@PLT
	mov	edi, DWORD PTR 12[rsp]
	test	rax, rax
	jne	.L19
	call	WTERMSIG@PLT
	or	al, -128
.L1:
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L20
	add	rsp, 48
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	call	WEXITSTATUS@PLT
	jmp	.L1
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	wait_for_process, .-wait_for_process
	.comm	stderr,4,4
	.comm	signal_handler,4,4
	.comm	caught_sig,4,4
	.comm	SIGUSR1,4,4
	.comm	SIGTERM,4,4
	.comm	SIGPIPE,4,4
	.comm	SIGKILL,4,4
	.comm	SIGINT,4,4
	.comm	SIGHUP,4,4
	.comm	SIGALRM,4,4
	.comm	EX_SOFTWARE,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_timedrun.c_wait_for_process.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Timeout.. killing the process\012\000"
	.align	2
.LC1:
	.ascii	"lost child when trying to kill\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wait_for_process, %function
wait_for_process:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, #0
	ldr	r3, .L22
	ldr	r7, .L22+4
	sub	sp, sp, #28
	ldr	ip, .L22+8
	ldr	r3, [r3]
	mov	r2, r4
	add	r1, sp, #12
	mov	r5, r0
	ldr	r0, [r7]
	ldr	ip, [ip]
	str	ip, [sp, #20]
	mov	ip,#0
	str	r3, [sp, #16]
	str	r4, [sp, #8]
	str	r4, [sp, #12]
	bl	sigaction
	ldr	r3, .L22+12
	mov	r2, r4
	ldr	r0, [r3]
	add	r1, sp, #12
	bl	sigaction
	ldr	r3, .L22+16
	mov	r2, r4
	ldr	r0, [r3]
	add	r1, sp, #12
	bl	sigaction
	ldr	r3, .L22+20
	ldr	r6, .L22+24
	ldr	r0, [r3]
	mov	r2, r4
	add	r1, sp, #12
	bl	sigaction
	mov	r2, r4
	add	r1, sp, #12
	ldr	r0, [r6]
	bl	sigaction
	ldr	r3, .L22+28
	mov	r2, r4
	ldr	r0, [r3]
	add	r1, sp, #12
	bl	sigaction
	ldr	r9, .L22+32
	ldr	fp, .L22+36
	ldr	r8, .L22+40
	ldr	r10, .L22+44
	b	.L11
.L19:
	ldr	r3, [r8]
.L9:
	mov	r1, r3
	mov	r0, r5
	bl	kill
	cmp	r0, #0
	blt	.L17
.L10:
	mov	r0, #5
	add	r4, r4, #1
	bl	alarm
.L11:
	mov	r2, #0
	mov	r0, r5
	add	r1, sp, #8
	bl	waitpid
	cmp	r5, r0
	beq	.L18
	cmp	r4, #0
	beq	.L5
	cmp	r4, #1
	bne	.L19
	ldr	r3, [r6]
	b	.L9
.L5:
	ldr	r2, [r9]
	ldr	r1, [r7]
	cmp	r2, #0
	movgt	r3, r2
	ldrle	r3, [r6]
	cmp	r2, r1
	bne	.L9
	str	r3, [sp, #4]
	ldr	r3, .L22+48
	mov	r1, fp
	ldr	r0, [r3]
	bl	fprintf
	ldr	r3, [sp, #4]
	b	.L9
.L17:
	mov	r0, r10
	bl	perror
	b	.L10
.L18:
	ldr	r0, [sp, #8]
	bl	WIFEXITED
	cmp	r0, #0
	ldr	r0, [sp, #8]
	bne	.L20
	bl	WTERMSIG
	orr	r0, r0, #128
.L1:
	ldr	r3, .L22+8
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L21
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	bl	WEXITSTATUS
	b	.L1
.L21:
	bl	__stack_chk_fail
.L23:
	.align	2
.L22:
	.word	signal_handler
	.word	SIGALRM
	.word	.LC2
	.word	SIGHUP
	.word	SIGINT
	.word	SIGUSR1
	.word	SIGTERM
	.word	SIGPIPE
	.word	caught_sig
	.word	.LC0
	.word	SIGKILL
	.word	.LC1
	.word	stderr
	.size	wait_for_process, .-wait_for_process
	.comm	stderr,4,4
	.comm	signal_handler,4,4
	.comm	caught_sig,4,4
	.comm	SIGUSR1,4,4
	.comm	SIGTERM,4,4
	.comm	SIGPIPE,4,4
	.comm	SIGKILL,4,4
	.comm	SIGINT,4,4
	.comm	SIGHUP,4,4
	.comm	SIGALRM,4,4
	.comm	EX_SOFTWARE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
