	.file	"extr_kern_exec.c_pre_execve.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"nested execve"
	.text
	.p2align 4
	.globl	pre_execve
	.type	pre_execve, @function
pre_execve:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	mov	rsi, rbx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	cmp	QWORD PTR curthread[rip], rdi
	sete	dil
	movzx	edi, dil
	call	KASSERT@PLT
	mov	r12, QWORD PTR 8[rbx]
	mov	eax, DWORD PTR [r12]
	test	DWORD PTR P_HADTHREADS[rip], eax
	jne	.L10
.L3:
	xor	edi, edi
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR TDP_EXECVMSPC[rip], eax
	sete	dil
	xor	r13d, r13d
.L5:
	lea	rsi, .LC0[rip]
	call	KASSERT@PLT
	mov	rax, QWORD PTR 8[r12]
	mov	QWORD PTR 0[rbp], rax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdi, r12
	call	PROC_LOCK@PLT
	mov	esi, DWORD PTR SINGLE_BOUNDARY[rip]
	mov	rdi, r12
	call	thread_single@PLT
	test	rax, rax
	je	.L11
	mov	r13d, DWORD PTR ERESTART[rip]
	mov	rdi, r12
	call	PROC_UNLOCK@PLT
	mov	edi, 1
	test	r13d, r13d
	jne	.L5
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdi, r12
	call	PROC_UNLOCK@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	pre_execve, .-pre_execve
	.comm	curthread,8,8
	.comm	TDP_EXECVMSPC,4,4
	.comm	SINGLE_BOUNDARY,4,4
	.comm	P_HADTHREADS,4,4
	.comm	ERESTART,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_exec.c_pre_execve.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"nested execve\000"
	.text
	.align	2
	.global	pre_execve
	.syntax unified
	.arm
	.fpu softvfp
	.type	pre_execve, %function
pre_execve:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r3, .L12
	mov	r5, r1
	mov	r1, r0
	ldr	r0, [r3]
	sub	r0, r0, r4
	clz	r0, r0
	lsr	r0, r0, #5
	bl	KASSERT
	ldr	r6, [r4, #4]
	ldr	r3, .L12+4
	ldr	r2, [r6]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L10
.L3:
	mov	r7, #0
	ldr	r3, .L12+8
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	moveq	r0, #1
	movne	r0, r7
.L5:
	ldr	r1, .L12+12
	bl	KASSERT
	ldr	r3, [r6, #4]
	mov	r0, r7
	str	r3, [r5]
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	mov	r0, r6
	bl	PROC_LOCK
	ldr	r3, .L12+16
	mov	r0, r6
	ldr	r1, [r3]
	bl	thread_single
	cmp	r0, #0
	beq	.L11
	ldr	r3, .L12+20
	mov	r0, r6
	ldr	r7, [r3]
	bl	PROC_UNLOCK
	cmp	r7, #0
	movne	r0, #1
	bne	.L5
	b	.L3
.L11:
	mov	r0, r6
	bl	PROC_UNLOCK
	b	.L3
.L13:
	.align	2
.L12:
	.word	curthread
	.word	P_HADTHREADS
	.word	TDP_EXECVMSPC
	.word	.LC0
	.word	SINGLE_BOUNDARY
	.word	ERESTART
	.size	pre_execve, .-pre_execve
	.comm	curthread,4,4
	.comm	TDP_EXECVMSPC,4,4
	.comm	SINGLE_BOUNDARY,4,4
	.comm	P_HADTHREADS,4,4
	.comm	ERESTART,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
