	.file	"extr_kern_procctl.c_stackgap_ctl.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	stackgap_ctl, @function
stackgap_ctl:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rdi, rbp
	mov	ebx, edx
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	esi, DWORD PTR MA_OWNED[rip]
	call	PROC_LOCK_ASSERT@PLT
	test	ebx, -132
	jne	.L20
	mov	eax, ebx
	and	eax, 131
	cmp	eax, 129
	je	.L4
	cmp	eax, 131
	je	.L5
	test	eax, eax
	je	.L6
.L20:
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.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
.L4:
	.cfi_restore_state
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR P2_STKGAP_DISABLE[rip], eax
	jne	.L20
.L6:
	mov	eax, ebx
	and	eax, 130
	cmp	eax, 128
	je	.L10
	cmp	eax, 130
	je	.L9
	test	eax, eax
	cmovne	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.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
.L5:
	.cfi_restore_state
	mov	eax, DWORD PTR P2_STKGAP_DISABLE[rip]
	or	DWORD PTR 0[rbp], eax
.L9:
	mov	eax, DWORD PTR P2_STKGAP_DISABLE_EXEC[rip]
	or	DWORD PTR 0[rbp], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	eax, DWORD PTR P2_STKGAP_DISABLE_EXEC[rip]
	not	eax
	and	DWORD PTR 0[rbp], eax
	add	rsp, 8
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	stackgap_ctl, .-stackgap_ctl
	.comm	P2_STKGAP_DISABLE_EXEC,4,4
	.comm	P2_STKGAP_DISABLE,4,4
	.comm	MA_OWNED,4,4
	.comm	EINVAL,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_stackgap_ctl.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stackgap_ctl, %function
stackgap_ctl:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r2
	ldr	r3, .L26
	mov	r0, r1
	mov	r5, r1
	ldr	r1, [r3]
	bl	PROC_LOCK_ASSERT
	bics	r3, r4, #131
	bne	.L22
	and	r3, r4, #131
	cmp	r3, #129
	beq	.L4
	cmp	r3, #131
	beq	.L5
	cmp	r3, #0
	beq	.L6
.L22:
	ldr	r3, .L26+4
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L4:
	ldr	r2, .L26+8
	ldr	r3, [r5]
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L22
.L6:
	and	r0, r4, #130
	cmp	r0, #128
	beq	.L10
	cmp	r0, #130
	ldreq	r3, [r5]
	beq	.L9
	cmp	r0, #0
	bne	.L22
	pop	{r4, r5, r6, pc}
.L5:
	ldr	r2, .L26+8
	ldr	r3, [r5]
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r5]
.L9:
	ldr	r2, .L26+12
	mov	r0, #0
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r5]
	pop	{r4, r5, r6, pc}
.L10:
	ldr	r2, .L26+12
	ldr	r3, [r5]
	ldr	r2, [r2]
	mov	r0, #0
	bic	r3, r3, r2
	str	r3, [r5]
	pop	{r4, r5, r6, pc}
.L27:
	.align	2
.L26:
	.word	MA_OWNED
	.word	EINVAL
	.word	P2_STKGAP_DISABLE
	.word	P2_STKGAP_DISABLE_EXEC
	.size	stackgap_ctl, .-stackgap_ctl
	.comm	P2_STKGAP_DISABLE_EXEC,4,4
	.comm	P2_STKGAP_DISABLE,4,4
	.comm	MA_OWNED,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
