	.file	"extr_kern_procctl.c_reap_kill.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	reap_kill, @function
reap_kill:
.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
	mov	r12, rdi
	lea	rdi, proctree_lock[rip]
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	QWORD PTR 24[rsp], rsi
	mov	esi, DWORD PTR SX_LOCKED[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	call	sx_assert@PLT
	mov	rdi, r12
	call	IN_CAPABILITY_MODE@PLT
	test	rax, rax
	jne	.L34
	mov	rax, QWORD PTR [rbx]
	test	rax, rax
	jle	.L4
	cmp	rax, QWORD PTR _SIG_MAXSIG[rip]
	jg	.L4
	mov	eax, DWORD PTR REAPER_KILL_CHILDREN[rip]
	or	eax, DWORD PTR REAPER_KILL_SUBTREE[rip]
	mov	ecx, eax
	mov	edx, DWORD PTR 8[rbx]
	not	ecx
	test	ecx, edx
	jne	.L4
	and	edx, eax
	cmp	eax, edx
	je	.L4
	mov	r15, QWORD PTR 24[rsp]
	mov	rdi, r15
	call	PROC_UNLOCK@PLT
	mov	QWORD PTR 8[rsp], r15
	mov	eax, DWORD PTR [r15]
	test	DWORD PTR P_TREE_REAPER[rip], eax
	jne	.L6
	mov	rax, QWORD PTR 24[r15]
	mov	QWORD PTR 8[rsp], rax
.L6:
	lea	r13, 48[rsp]
	mov	rdi, r13
	call	ksiginfo_init@PLT
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR 48[rsp], rax
	mov	eax, DWORD PTR SI_USER[rip]
	mov	DWORD PTR 64[rsp], eax
	mov	rax, QWORD PTR 8[r12]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR 60[rsp], eax
	mov	rax, QWORD PTR [r12]
	mov	eax, DWORD PTR [rax]
	mov	QWORD PTR 24[rbx], 0
	mov	DWORD PTR 12[rbx], -1
	mov	DWORD PTR 56[rsp], eax
	mov	eax, DWORD PTR ESRCH[rip]
	mov	DWORD PTR 44[rsp], eax
	mov	eax, DWORD PTR 8[rbx]
	test	DWORD PTR REAPER_KILL_CHILDREN[rip], eax
	je	.L7
	mov	rdi, QWORD PTR 8[rsp]
	lea	r14, 44[rsp]
	add	rdi, 20
	call	LIST_FIRST@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rsi, rbp
	mov	r8, r14
	mov	rcx, rbx
	mov	rdx, r13
	mov	rdi, r12
	call	reap_kill_proc@PLT
	mov	esi, DWORD PTR p_sibling[rip]
	mov	rdi, rbp
	call	LIST_NEXT@PLT
	mov	rbp, rax
	test	rax, rax
	jne	.L8
.L9:
	mov	rdi, QWORD PTR 24[rsp]
	call	PROC_LOCK@PLT
	mov	eax, DWORD PTR 44[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	eax, DWORD PTR EINVAL[rip]
.L1:
	mov	rcx, QWORD PTR 72[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L35
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L34:
	.cfi_restore_state
	mov	eax, DWORD PTR ECAPMODE[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	lea	rax, 40[rsp]
	mov	rdi, rax
	mov	r15, rax
	mov	QWORD PTR 16[rsp], rax
	call	TAILQ_INIT@PLT
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, r15
	lea	r15, 44[rsp]
	call	reap_kill_sched@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, QWORD PTR 16[rsp]
	call	TAILQ_FIRST@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L9
	mov	rax, QWORD PTR 0[rbp]
	xor	edi, edi
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR P_TREE_REAPER[rip], eax
	setne	dil
	call	MPASS@PLT
	mov	edx, DWORD PTR link[rip]
	mov	rdi, QWORD PTR 16[rsp]
	mov	rsi, rbp
	call	TAILQ_REMOVE@PLT
	mov	rax, QWORD PTR 0[rbp]
	lea	rdi, 16[rax]
	call	LIST_FIRST@PLT
	mov	r14, rax
	test	rax, rax
	jne	.L15
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L14:
	mov	r8, r15
	mov	rcx, rbx
	mov	rdx, r13
	mov	rsi, r14
	mov	rdi, r12
	call	reap_kill_proc@PLT
.L13:
	mov	esi, DWORD PTR p_reapsibling[rip]
	mov	rdi, r14
	call	LIST_NEXT@PLT
	mov	r14, rax
	test	rax, rax
	je	.L11
.L15:
	mov	rax, QWORD PTR 8[rsp]
	cmp	QWORD PTR 0[rbp], rax
	je	.L36
.L12:
	mov	eax, DWORD PTR [r14]
	test	DWORD PTR P_TREE_REAPER[rip], eax
	je	.L14
	mov	rdi, QWORD PTR 16[rsp]
	mov	rsi, r14
	call	reap_kill_sched@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L36:
	mov	eax, DWORD PTR 8[rbx]
	test	DWORD PTR REAPER_KILL_SUBTREE[rip], eax
	je	.L12
	mov	rax, QWORD PTR 16[rbx]
	cmp	QWORD PTR 8[r14], rax
	je	.L12
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L11:
	mov	esi, DWORD PTR M_TEMP[rip]
	mov	rdi, rbp
	call	free@PLT
	jmp	.L10
.L35:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	reap_kill, .-reap_kill
	.comm	proctree_lock,4,4
	.comm	p_sibling,4,4
	.comm	p_reapsibling,4,4
	.comm	link,4,4
	.comm	_SIG_MAXSIG,8,8
	.comm	SX_LOCKED,4,4
	.comm	SI_USER,4,4
	.comm	REAPER_KILL_SUBTREE,4,4
	.comm	REAPER_KILL_CHILDREN,4,4
	.comm	P_TREE_REAPER,4,4
	.comm	M_TEMP,4,4
	.comm	ESRCH,4,4
	.comm	EINVAL,4,4
	.comm	ECAPMODE,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_kern_procctl.c_reap_kill.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	reap_kill, %function
reap_kill:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, r1
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r0
	sub	sp, sp, #52
	ldr	r1, .L36
	str	r3, [sp, #12]
	ldr	r3, .L36+4
	ldr	r1, [r1]
	ldr	r0, .L36+8
	mov	r4, r2
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	bl	sx_assert
	mov	r0, r6
	bl	IN_CAPABILITY_MODE
	cmp	r0, #0
	bne	.L33
	ldr	r3, [r4]
	cmp	r3, #0
	ble	.L4
	ldr	r2, .L36+12
	ldr	r2, [r2]
	cmp	r3, r2
	bgt	.L4
	ldr	r2, .L36+16
	ldr	r5, .L36+20
	ldr	r1, [r2]
	ldr	r3, [r5]
	ldr	r2, [r4, #4]
	orr	r3, r3, r1
	bics	r1, r2, r3
	bne	.L4
	bics	r3, r3, r2
	beq	.L4
	ldr	r8, [sp, #12]
	ldr	r7, .L36+24
	mov	r0, r8
	bl	PROC_UNLOCK
	ldr	r2, [r8]
	ldr	r3, [r7]
	add	r0, sp, #28
	tst	r2, r3
	ldreq	r8, [r8, #16]
	ldrne	r8, [sp, #12]
	bl	ksiginfo_init
	mov	r1, #0
	mvn	r2, #0
	ldr	r3, [r5]
	ldr	ip, [r4, #4]
	ldr	r0, .L36+28
	tst	ip, r3
	ldr	r3, [r6, #4]
	ldr	r0, [r0]
	ldr	ip, [r3]
	ldr	r3, [r6]
	str	r0, [sp, #40]
	ldr	r0, [r3]
	ldr	r3, .L36+32
	str	ip, [sp, #36]
	ldr	r3, [r3]
	str	r0, [sp, #32]
	str	r3, [sp, #24]
	ldr	r3, [r4]
	str	r1, [r4, #16]
	str	r2, [r4, #8]
	str	r3, [sp, #28]
	beq	.L7
	add	r0, r8, #12
	bl	LIST_FIRST
	subs	r5, r0, #0
	beq	.L9
	ldr	r7, .L36+36
	add	r8, sp, #24
.L8:
	mov	r1, r5
	mov	r3, r4
	add	r2, sp, #28
	mov	r0, r6
	str	r8, [sp]
	bl	reap_kill_proc
	mov	r0, r5
	ldr	r1, [r7]
	bl	LIST_NEXT
	subs	r5, r0, #0
	bne	.L8
.L9:
	ldr	r0, [sp, #12]
	bl	PROC_LOCK
	ldr	r0, [sp, #24]
	b	.L1
.L4:
	ldr	r3, .L36+40
	ldr	r0, [r3]
.L1:
	ldr	r3, .L36+4
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L34
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L33:
	ldr	r3, .L36+44
	ldr	r0, [r3]
	b	.L1
.L7:
	add	r0, sp, #20
	bl	TAILQ_INIT
	mov	r1, r8
	add	r0, sp, #20
	bl	reap_kill_sched
	ldr	r10, .L36+48
.L10:
	add	r0, sp, #20
	bl	TAILQ_FIRST
	subs	r9, r0, #0
	beq	.L9
	ldr	r2, [r9]
	ldr	r3, [r7]
	ldr	r2, [r2]
	tst	r2, r3
	movne	r0, #1
	moveq	r0, #0
	bl	MPASS
	ldr	r3, .L36+52
	mov	r1, r9
	ldr	r2, [r3]
	add	r0, sp, #20
	bl	TAILQ_REMOVE
	ldr	r0, [r9]
	add	r0, r0, #8
	bl	LIST_FIRST
	subs	r5, r0, #0
	beq	.L11
	add	fp, sp, #24
	b	.L15
.L14:
	mov	r3, r4
	mov	r1, r5
	mov	r0, r6
	str	fp, [sp]
	add	r2, sp, #28
	bl	reap_kill_proc
.L13:
	mov	r0, r5
	ldr	r1, [r10]
	bl	LIST_NEXT
	subs	r5, r0, #0
	beq	.L11
.L15:
	ldr	r3, [r9]
	cmp	r3, r8
	beq	.L35
.L12:
	ldr	r2, [r5]
	ldr	r3, [r7]
	tst	r2, r3
	beq	.L14
	mov	r1, r5
	add	r0, sp, #20
	bl	reap_kill_sched
	b	.L14
.L35:
	ldr	r3, .L36+16
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L12
	ldr	r2, [r5, #4]
	ldr	r3, [r4, #12]
	cmp	r2, r3
	beq	.L12
	b	.L13
.L11:
	ldr	r3, .L36+56
	mov	r0, r9
	ldr	r1, [r3]
	bl	free
	b	.L10
.L34:
	bl	__stack_chk_fail
.L37:
	.align	2
.L36:
	.word	SX_LOCKED
	.word	.LC0
	.word	proctree_lock
	.word	_SIG_MAXSIG
	.word	REAPER_KILL_SUBTREE
	.word	REAPER_KILL_CHILDREN
	.word	P_TREE_REAPER
	.word	SI_USER
	.word	ESRCH
	.word	p_sibling
	.word	EINVAL
	.word	ECAPMODE
	.word	p_reapsibling
	.word	link
	.word	M_TEMP
	.size	reap_kill, .-reap_kill
	.comm	proctree_lock,4,4
	.comm	p_sibling,4,4
	.comm	p_reapsibling,4,4
	.comm	link,4,4
	.comm	_SIG_MAXSIG,4,4
	.comm	SX_LOCKED,4,4
	.comm	SI_USER,4,4
	.comm	REAPER_KILL_SUBTREE,4,4
	.comm	REAPER_KILL_CHILDREN,4,4
	.comm	P_TREE_REAPER,4,4
	.comm	M_TEMP,4,4
	.comm	ESRCH,4,4
	.comm	EINVAL,4,4
	.comm	ECAPMODE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
