	.file	"extr_smartpqi_tag.c_pqisrc_get_tag.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	pqisrc_get_tag
	.type	pqisrc_get_tag, @function
pqisrc_get_tag:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, DWORD PTR INVALID_ELEM[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	lea	rbp, 20[rdi]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	rdi, rbp
	call	OS_ACQUIRE_SPINLOCK@PLT
	xor	edi, edi
	cmp	QWORD PTR [rbx], 0
	setg	dil
	call	ASSERT@PLT
	mov	rdx, QWORD PTR [rbx]
	test	rdx, rdx
	jle	.L2
	mov	rax, QWORD PTR 8[rbx]
	mov	rcx, QWORD PTR 24[rbx]
	sub	rdx, 1
	mov	r12d, DWORD PTR [rcx+rax*4]
	movsx	rcx, DWORD PTR 16[rbx]
	mov	QWORD PTR [rbx], rdx
	add	rax, 1
	xor	edx, edx
	div	rcx
	mov	QWORD PTR 8[rbx], rdx
.L2:
	mov	rdi, rbp
	call	OS_RELEASE_SPINLOCK@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	pqisrc_get_tag, .-pqisrc_get_tag
	.comm	INVALID_ELEM,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_smartpqi_tag.c_pqisrc_get_tag.c"
	.text
	.global	__aeabi_uidivmod
	.align	2
	.global	pqisrc_get_tag
	.syntax unified
	.arm
	.fpu softvfp
	.type	pqisrc_get_tag, %function
pqisrc_get_tag:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r3, .L5
	add	r5, r0, #12
	mov	r0, r5
	ldr	r6, [r3]
	bl	OS_ACQUIRE_SPINLOCK
	ldr	r0, [r4]
	cmp	r0, #0
	movle	r0, #0
	movgt	r0, #1
	bl	ASSERT
	ldr	r3, [r4]
	cmp	r3, #0
	ble	.L2
	ldr	r0, [r4, #4]
	ldr	r2, [r4, #16]
	sub	r3, r3, #1
	ldr	r6, [r2, r0, lsl #2]
	ldr	r1, [r4, #8]
	add	r0, r0, #1
	str	r3, [r4]
	bl	__aeabi_uidivmod
	str	r1, [r4, #4]
.L2:
	mov	r0, r5
	bl	OS_RELEASE_SPINLOCK
	mov	r0, r6
	pop	{r4, r5, r6, pc}
.L6:
	.align	2
.L5:
	.word	INVALID_ELEM
	.size	pqisrc_get_tag, .-pqisrc_get_tag
	.comm	INVALID_ELEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
