	.file	"extr_fasttrap.c_fasttrap_pid_enable.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	fasttrap_pid_enable, @function
fasttrap_pid_enable:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xor	edi, edi
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdx
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	test	rdx, rdx
	mov	QWORD PTR [rsp], 0
	setne	dil
	call	ASSERT@PLT
	mov	edx, DWORD PTR [rbx]
	xor	edi, edi
	test	edx, edx
	sete	dil
	call	ASSERT@PLT
	xor	edi, edi
	cmp	QWORD PTR 8[rbx], rbp
	sete	dil
	call	ASSERT@PLT
	mov	rax, QWORD PTR 24[rbx]
	lea	rdi, 8[rax]
	call	mutex_enter@PLT
	mov	rdi, QWORD PTR 24[rbx]
	add	DWORD PTR 12[rdi], 1
	add	rdi, 8
	call	mutex_exit@PLT
	mov	rax, QWORD PTR 24[rbx]
	cmp	QWORD PTR [rax], 0
	je	.L20
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	add	rsp, 24
	.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
.L20:
	.cfi_restore_state
	mov	edi, DWORD PTR 20[rbx]
	mov	esi, DWORD PTR PGET_HOLD[rip]
	mov	rdx, rsp
	or	esi, DWORD PTR PGET_NOTWEXIT[rip]
	call	pget@PLT
	test	rax, rax
	jne	.L1
	call	fasttrap_enable_callbacks@PLT
	mov	eax, DWORD PTR 16[rbx]
	xor	ebp, ebp
	test	eax, eax
	jg	.L3
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L5:
	add	ebp, 1
	cmp	DWORD PTR 16[rbx], ebp
	jle	.L11
.L3:
	mov	rdi, QWORD PTR [rsp]
	mov	edx, ebp
	mov	rsi, rbx
	call	fasttrap_tracepoint_enable@PLT
	test	eax, eax
	je	.L5
	cmp	DWORD PTR FASTTRAP_ENABLE_FAIL[rip], eax
	je	.L18
	xor	edi, edi
	cmp	DWORD PTR FASTTRAP_ENABLE_PARTIAL[rip], eax
	sete	dil
	call	ASSERT@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, QWORD PTR [rsp]
	mov	edx, ebp
	mov	rsi, rbx
	call	fasttrap_tracepoint_disable@PLT
.L18:
	sub	ebp, 1
	cmp	ebp, -1
	jne	.L9
	mov	rdi, QWORD PTR [rsp]
	call	PRELE@PLT
	xor	eax, eax
	call	fasttrap_disable_callbacks@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdi, QWORD PTR [rsp]
	call	PRELE@PLT
	mov	DWORD PTR [rbx], 1
	jmp	.L1
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	fasttrap_pid_enable, .-fasttrap_pid_enable
	.comm	pidlock,4,4
	.comm	curproc,8,8
	.comm	cpu_lock,4,4
	.comm	SVFORK,4,4
	.comm	SIDL,8,8
	.comm	SFORKING,4,4
	.comm	PGET_NOTWEXIT,4,4
	.comm	PGET_HOLD,4,4
	.comm	FASTTRAP_ENABLE_PARTIAL,4,4
	.comm	FASTTRAP_ENABLE_FAIL,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_fasttrap.c_fasttrap_pid_enable.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fasttrap_pid_enable, %function
fasttrap_pid_enable:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, lr}
	mov	r4, r2
	subs	r0, r2, r3
	ldr	r2, .L20
	sub	sp, sp, #12
	movne	r0, #1
	mov	r5, r1
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	str	r3, [sp]
	bl	ASSERT
	ldr	r0, [r4]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ASSERT
	ldr	r0, [r4, #4]
	sub	r0, r0, r5
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ASSERT
	ldr	r0, [r4, #16]
	add	r0, r0, #4
	bl	mutex_enter
	ldr	r3, [r4, #16]
	ldr	r2, [r3, #8]
	add	r0, r3, #4
	add	r2, r2, #1
	str	r2, [r3, #8]
	bl	mutex_exit
	ldr	r3, [r4, #16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L18
.L1:
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L18:
	ldr	r2, .L20+4
	ldr	r3, .L20+8
	ldr	r1, [r2]
	ldr	r3, [r3]
	mov	r2, sp
	ldr	r0, [r4, #12]
	orr	r1, r1, r3
	bl	pget
	subs	r5, r0, #0
	bne	.L1
	bl	fasttrap_enable_callbacks
	ldr	r3, [r4, #8]
	cmp	r3, #0
	bgt	.L3
	b	.L11
.L5:
	ldr	r3, [r4, #8]
	add	r5, r5, #1
	cmp	r3, r5
	ble	.L11
.L3:
	mov	r2, r5
	mov	r1, r4
	ldr	r0, [sp]
	bl	fasttrap_tracepoint_enable
	cmp	r0, #0
	beq	.L5
	ldr	r3, .L20+12
	ldr	r3, [r3]
	cmp	r3, r0
	bne	.L6
	subs	r5, r5, #1
	bcc	.L10
.L9:
	mov	r2, r5
	mov	r1, r4
	ldr	r0, [sp]
	sub	r5, r5, #1
	bl	fasttrap_tracepoint_disable
	cmn	r5, #1
	bne	.L9
.L10:
	ldr	r0, [sp]
	bl	PRELE
	bl	fasttrap_disable_callbacks
	b	.L1
.L11:
	ldr	r0, [sp]
	bl	PRELE
	mov	r3, #1
	str	r3, [r4]
	b	.L1
.L6:
	ldr	r3, .L20+16
	ldr	r3, [r3]
	sub	r0, r3, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ASSERT
	b	.L9
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC0
	.word	PGET_HOLD
	.word	PGET_NOTWEXIT
	.word	FASTTRAP_ENABLE_FAIL
	.word	FASTTRAP_ENABLE_PARTIAL
	.size	fasttrap_pid_enable, .-fasttrap_pid_enable
	.comm	pidlock,4,4
	.comm	curproc,4,4
	.comm	cpu_lock,4,4
	.comm	SVFORK,4,4
	.comm	SIDL,4,4
	.comm	SFORKING,4,4
	.comm	PGET_NOTWEXIT,4,4
	.comm	PGET_HOLD,4,4
	.comm	FASTTRAP_ENABLE_PARTIAL,4,4
	.comm	FASTTRAP_ENABLE_FAIL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
