	.file	"extr_in_pcb.c_inp_fc_getinp.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	inp_fc_getinp, @function
inp_fc_getinp:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	test	DWORD PTR INPFC_SOLOCKED[rip], esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edi
	lea	rdi, inp_fc_lck[rip]
	setne	r13b
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, esi
	call	lck_mtx_lock_spin@PLT
	mov	edi, DWORD PTR inp_fc_tree[rip]
	lea	rdx, key_inp[rip]
	lea	rsi, inp_fc_tree[rip]
	mov	DWORD PTR key_inp[rip], r12d
	call	RB_FIND@PLT
	mov	r12, rax
	test	rax, rax
	je	.L7
	test	DWORD PTR INPFC_REMOVE[rip], ebx
	jne	.L9
	mov	esi, DWORD PTR WNT_ACQUIRE[rip]
	movzx	r13d, r13b
	mov	rdi, rax
	mov	edx, r13d
	call	in_pcb_checkstate@PLT
	cmp	rax, QWORD PTR WNT_STOPUSING[rip]
	mov	eax, 0
	cmove	r12, rax
.L7:
	lea	rdi, inp_fc_lck[rip]
	call	lck_mtx_unlock@PLT
	mov	rax, r12
	pop	rbx
	.cfi_remember_state
	.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
.L9:
	.cfi_restore_state
	mov	edi, DWORD PTR inp_fc_tree[rip]
	mov	rdx, rax
	lea	rsi, inp_fc_tree[rip]
	call	RB_REMOVE@PLT
	lea	rdi, inp_fc_lck[rip]
	call	lck_mtx_unlock@PLT
	lea	rdi, 4[r12]
	mov	esi, 4
	call	bzero@PLT
	mov	eax, DWORD PTR INP2_IN_FCTREE[rip]
	not	eax
	and	DWORD PTR [r12], eax
	xor	r12d, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	mov	rax, r12
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	inp_fc_getinp, .-inp_fc_getinp
	.comm	key_inp,4,4
	.comm	inp_fc_tree,4,4
	.comm	inp_fc_lck,4,4
	.comm	WNT_STOPUSING,8,8
	.comm	WNT_ACQUIRE,4,4
	.comm	INPFC_SOLOCKED,4,4
	.comm	INPFC_REMOVE,4,4
	.comm	INP2_IN_FCTREE,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_in_pcb.c_inp_fc_getinp.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	inp_fc_getinp, %function
inp_fc_getinp:
	@ 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, .L10
	ldr	r5, .L10+4
	ldr	r3, [r3]
	ldr	r0, .L10+8
	tst	r1, r3
	movne	r7, #1
	moveq	r7, #0
	mov	r6, r1
	bl	lck_mtx_lock_spin
	ldr	r2, .L10+12
	mov	r1, r5
	ldr	r0, [r5]
	str	r4, [r2]
	bl	RB_FIND
	subs	r4, r0, #0
	beq	.L8
	ldr	r3, .L10+16
	ldr	r3, [r3]
	tst	r6, r3
	bne	.L9
	ldr	r3, .L10+20
	mov	r2, r7
	ldr	r1, [r3]
	bl	in_pcb_checkstate
	mov	r2, r0
	ldr	r3, .L10+24
	ldr	r0, .L10+8
	ldr	r3, [r3]
	cmp	r2, r3
	moveq	r4, #0
	bl	lck_mtx_unlock
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	mov	r2, r4
	mov	r1, r5
	ldr	r0, [r5]
	bl	RB_REMOVE
	ldr	r0, .L10+8
	bl	lck_mtx_unlock
	mov	r1, #4
	add	r0, r4, r1
	bl	bzero
	ldr	r2, .L10+28
	ldr	r3, [r4]
	ldr	r2, [r2]
	bic	r3, r3, r2
	str	r3, [r4]
	mov	r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	ldr	r0, .L10+8
	bl	lck_mtx_unlock
	b	.L1
.L11:
	.align	2
.L10:
	.word	INPFC_SOLOCKED
	.word	inp_fc_tree
	.word	inp_fc_lck
	.word	key_inp
	.word	INPFC_REMOVE
	.word	WNT_ACQUIRE
	.word	WNT_STOPUSING
	.word	INP2_IN_FCTREE
	.size	inp_fc_getinp, .-inp_fc_getinp
	.comm	key_inp,4,4
	.comm	inp_fc_tree,4,4
	.comm	inp_fc_lck,4,4
	.comm	WNT_STOPUSING,4,4
	.comm	WNT_ACQUIRE,4,4
	.comm	INPFC_SOLOCKED,4,4
	.comm	INPFC_REMOVE,4,4
	.comm	INP2_IN_FCTREE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
