	.file	"extr_fbsd-low.c_fbsd_wait_for_process.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"waitpid"
.LC1:
	.string	"Got an event from %d (%x)\n"
	.text
	.p2align 4
	.type	fbsd_wait_for_process, @function
fbsd_wait_for_process:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, -1
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rax, QWORD PTR [rdi]
	mov	rbx, rsi
	test	rax, rax
	je	.L2
	mov	r12d, DWORD PTR [rax]
.L2:
	lea	r14, .LC0[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	test	eax, eax
	jg	.L5
.L4:
	mov	edi, 1000
	call	usleep@PLT
.L6:
	mov	edx, DWORD PTR WNOHANG[rip]
	mov	rsi, rbx
	mov	edi, r12d
	call	waitpid@PLT
	mov	ebp, eax
	cmp	eax, -1
	jne	.L3
	mov	rax, QWORD PTR ECHILD[rip]
	cmp	QWORD PTR errno[rip], rax
	je	.L4
	mov	rdi, r14
	call	perror_with_name@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	cmp	QWORD PTR debug_threads[rip], 0
	jne	.L28
.L8:
	cmp	r12d, -1
	je	.L12
.L30:
	mov	rax, QWORD PTR 0[r13]
.L13:
	cmp	QWORD PTR debug_threads[rip], 0
	mov	DWORD PTR 4[rax], 1
	mov	QWORD PTR 16[rax], 0
	jne	.L29
.L1:
	pop	rbx
	.cfi_remember_state
	.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
.L28:
	.cfi_restore_state
	mov	edi, DWORD PTR [rbx]
	call	WIFSTOPPED@PLT
	test	rax, rax
	je	.L11
	mov	edi, DWORD PTR [rbx]
	call	WSTOPSIG@PLT
	cmp	eax, 32
	je	.L8
	mov	edi, DWORD PTR [rbx]
	call	WSTOPSIG@PLT
	cmp	eax, 33
	je	.L8
.L11:
	mov	ecx, DWORD PTR [rbx]
	mov	edi, DWORD PTR stderr[rip]
	mov	edx, ebp
	lea	rsi, .LC1[rip]
	call	fprintf@PLT
	cmp	r12d, -1
	jne	.L30
.L12:
	mov	esi, ebp
	lea	rdi, all_processes[rip]
	call	find_inferior_id@PLT
	mov	QWORD PTR 0[r13], rax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L29:
	mov	edi, DWORD PTR [rbx]
	call	WIFSTOPPED@PLT
	test	rax, rax
	je	.L1
	mov	rax, QWORD PTR 0[r13]
	lea	rdi, all_threads[rip]
	mov	esi, DWORD PTR 8[rax]
	call	find_inferior_id@PLT
	cmp	QWORD PTR the_low_target[rip], 0
	mov	QWORD PTR current_inferior[rip], rax
	je	.L1
	pop	rbx
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
	jmp	get_stop_pc@PLT
	.cfi_endproc
.LFE0:
	.size	fbsd_wait_for_process, .-fbsd_wait_for_process
	.comm	the_low_target,8,8
	.comm	stderr,4,4
	.comm	errno,8,8
	.comm	debug_threads,8,8
	.comm	current_inferior,8,8
	.comm	all_threads,4,4
	.comm	all_processes,4,4
	.comm	WNOHANG,4,4
	.comm	ECHILD,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_fbsd-low.c_fbsd_wait_for_process.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"waitpid\000"
	.align	2
.LC1:
	.ascii	"Got an event from %d (%x)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fbsd_wait_for_process, %function
fbsd_wait_for_process:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r0]
	mov	r10, r0
	cmp	r3, #0
	mov	r5, r1
	mvneq	r6, #0
	ldrne	r6, [r3]
	ldr	r7, .L31
	ldr	r9, .L31+4
	ldr	r8, .L31+8
	ldr	fp, .L31+12
	b	.L6
.L3:
	cmp	r0, #0
	bgt	.L5
.L4:
	mov	r0, #1000
	bl	usleep
.L6:
	mov	r1, r5
	mov	r0, r6
	ldr	r2, [r7]
	bl	waitpid
	cmn	r0, #1
	mov	r4, r0
	bne	.L3
	ldr	r2, [r9]
	ldr	r3, [r8]
	cmp	r2, r3
	beq	.L4
	mov	r0, fp
	bl	perror_with_name
	b	.L4
.L5:
	ldr	r7, .L31+16
	ldr	r3, [r7]
	cmp	r3, #0
	bne	.L29
.L8:
	cmn	r6, #1
	beq	.L12
.L30:
	ldr	r0, [r10]
.L13:
	mov	r3, #0
	mov	r1, #1
	ldr	r2, [r7]
	str	r1, [r0, #4]
	cmp	r2, r3
	str	r3, [r0, #12]
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r0, [r5]
	bl	WIFSTOPPED
	cmp	r0, #0
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r3, [r10]
	ldr	r0, .L31+20
	ldr	r1, [r3, #8]
	bl	find_inferior_id
	ldr	r3, .L31+24
	ldr	r2, .L31+28
	ldr	r3, [r3]
	str	r0, [r2]
	cmp	r3, #0
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	get_stop_pc
.L29:
	ldr	r0, [r5]
	bl	WIFSTOPPED
	cmp	r0, #0
	beq	.L11
	ldr	r0, [r5]
	bl	WSTOPSIG
	cmp	r0, #32
	beq	.L8
	ldr	r0, [r5]
	bl	WSTOPSIG
	cmp	r0, #33
	beq	.L8
.L11:
	ldr	r2, .L31+32
	ldr	r3, [r5]
	ldr	r0, [r2]
	ldr	r1, .L31+36
	mov	r2, r4
	bl	fprintf
	cmn	r6, #1
	bne	.L30
.L12:
	mov	r1, r4
	ldr	r0, .L31+40
	bl	find_inferior_id
	str	r0, [r10]
	b	.L13
.L32:
	.align	2
.L31:
	.word	WNOHANG
	.word	errno
	.word	ECHILD
	.word	.LC0
	.word	debug_threads
	.word	all_threads
	.word	the_low_target
	.word	current_inferior
	.word	stderr
	.word	.LC1
	.word	all_processes
	.size	fbsd_wait_for_process, .-fbsd_wait_for_process
	.comm	the_low_target,4,4
	.comm	stderr,4,4
	.comm	errno,4,4
	.comm	debug_threads,4,4
	.comm	current_inferior,4,4
	.comm	all_threads,4,4
	.comm	all_processes,4,4
	.comm	WNOHANG,4,4
	.comm	ECHILD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
