	.file	"extr_mca.c_mca_record_entry.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"MCA: Unable to allocate space for an event.\n"
	.text
	.p2align 4
	.type	mca_record_entry, @function
mca_record_entry:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	cmp	DWORD PTR POLLED[rip], edi
	je	.L8
	lea	rdi, mca_lock[rip]
	call	mtx_lock_spin@PLT
	lea	rdi, mca_freelist[rip]
	call	STAILQ_FIRST@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L9
	mov	esi, DWORD PTR link[rip]
	lea	rdi, mca_freelist[rip]
	call	STAILQ_REMOVE_HEAD@PLT
	sub	DWORD PTR mca_freecount[rip], 1
.L3:
	mov	eax, DWORD PTR [r12]
	mov	edx, DWORD PTR link[rip]
	mov	rsi, rbp
	lea	rdi, mca_pending[rip]
	mov	DWORD PTR 0[rbp], eax
	call	STAILQ_INSERT_TAIL@PLT
.L6:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	lea	rdi, mca_lock[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	mtx_unlock_spin@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	edx, DWORD PTR M_WAITOK[rip]
	mov	esi, DWORD PTR M_MCA[rip]
	mov	edi, 4
	call	malloc@PLT
	lea	rdi, mca_lock[rip]
	mov	rbp, rax
	call	mtx_lock_spin@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	lea	rdi, .LC0[rip]
	call	printf@PLT
	mov	rdi, r12
	call	mca_log@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	mca_record_entry, .-mca_record_entry
	.comm	mca_pending,4,4
	.comm	mca_lock,4,4
	.comm	mca_freelist,4,4
	.comm	mca_freecount,4,4
	.comm	link,4,4
	.comm	POLLED,4,4
	.comm	M_WAITOK,4,4
	.comm	M_MCA,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_mca.c_mca_record_entry.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"MCA: Unable to allocate space for an event.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mca_record_entry, %function
mca_record_entry:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L9
	push	{r4, r5, r6, lr}
	ldr	r3, [r3]
	mov	r5, r1
	cmp	r3, r0
	beq	.L7
	ldr	r0, .L9+4
	bl	mtx_lock_spin
	ldr	r0, .L9+8
	bl	STAILQ_FIRST
	subs	r4, r0, #0
	beq	.L8
	ldr	r6, .L9+12
	ldr	r0, .L9+8
	ldr	r1, [r6]
	bl	STAILQ_REMOVE_HEAD
	ldr	r2, .L9+16
	ldr	r3, [r2]
	sub	r3, r3, #1
	str	r3, [r2]
.L3:
	ldr	r3, [r5]
	ldr	r2, [r6]
	mov	r1, r4
	str	r3, [r4]
	ldr	r0, .L9+20
	bl	STAILQ_INSERT_TAIL
	pop	{r4, r5, r6, lr}
	ldr	r0, .L9+4
	b	mtx_unlock_spin
.L7:
	ldr	r3, .L9+24
	ldr	r2, .L9+28
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r0, #4
	bl	malloc
	mov	r4, r0
	ldr	r0, .L9+4
	ldr	r6, .L9+12
	bl	mtx_lock_spin
	b	.L3
.L8:
	ldr	r0, .L9+32
	bl	printf
	mov	r0, r5
	bl	mca_log
	pop	{r4, r5, r6, lr}
	ldr	r0, .L9+4
	b	mtx_unlock_spin
.L10:
	.align	2
.L9:
	.word	POLLED
	.word	mca_lock
	.word	mca_freelist
	.word	link
	.word	mca_freecount
	.word	mca_pending
	.word	M_MCA
	.word	M_WAITOK
	.word	.LC0
	.size	mca_record_entry, .-mca_record_entry
	.comm	mca_pending,4,4
	.comm	mca_lock,4,4
	.comm	mca_freelist,4,4
	.comm	mca_freecount,4,4
	.comm	link,4,4
	.comm	POLLED,4,4
	.comm	M_WAITOK,4,4
	.comm	M_MCA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
