	.file	"extr_arm_sdei.c__sdei_event_register.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	_sdei_event_register, @function
_sdei_event_register:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	lea	rdi, sdei_events_lock[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	lockdep_assert_held@PLT
	lea	rdi, sdei_list_lock[rip]
	call	spin_lock@PLT
	mov	DWORD PTR 0[rbp], 1
	lea	rdi, sdei_list_lock[rip]
	call	spin_unlock@PLT
	mov	rax, QWORD PTR SDEI_EVENT_TYPE_SHARED[rip]
	cmp	QWORD PTR 8[rbp], rax
	je	.L9
	mov	edi, DWORD PTR _local_event_register[rip]
	mov	rsi, rbp
	call	sdei_do_cross_call@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L10
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	lea	rdi, sdei_list_lock[rip]
	call	spin_lock@PLT
	mov	DWORD PTR 0[rbp], 0
	lea	rdi, sdei_list_lock[rip]
	mov	DWORD PTR 16[rbp], 0
	call	spin_unlock@PLT
	mov	edi, DWORD PTR _local_event_unregister[rip]
	mov	rsi, rbp
	call	sdei_do_cross_call@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	edx, DWORD PTR 20[rbp]
	mov	edi, DWORD PTR 24[rbp]
	xor	r8d, r8d
	mov	ecx, DWORD PTR SDEI_EVENT_REGISTER_RM_ANY[rip]
	mov	esi, DWORD PTR sdei_entry_point[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	sdei_api_event_register@PLT
	.cfi_endproc
.LFE0:
	.size	_sdei_event_register, .-_sdei_event_register
	.comm	sdei_list_lock,4,4
	.comm	sdei_events_lock,4,4
	.comm	sdei_entry_point,4,4
	.comm	_local_event_unregister,4,4
	.comm	_local_event_register,4,4
	.comm	SDEI_EVENT_TYPE_SHARED,8,8
	.comm	SDEI_EVENT_REGISTER_RM_ANY,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_arm_sdei.c__sdei_event_register.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_sdei_event_register, %function
_sdei_event_register:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	mov	r4, r0
	sub	sp, sp, #12
	ldr	r0, .L11
	bl	lockdep_assert_held
	ldr	r0, .L11+4
	bl	spin_lock
	mov	r3, #1
	ldr	r0, .L11+4
	str	r3, [r4]
	bl	spin_unlock
	ldr	r3, .L11+8
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L9
	ldr	r3, .L11+12
	mov	r1, r4
	ldr	r0, [r3]
	bl	sdei_do_cross_call
	subs	r5, r0, #0
	bne	.L10
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L10:
	ldr	r0, .L11+4
	bl	spin_lock
	mov	r3, #0
	ldr	r0, .L11+4
	str	r3, [r4]
	str	r3, [r4, #8]
	bl	spin_unlock
	ldr	r3, .L11+16
	mov	r1, r4
	ldr	r0, [r3]
	bl	sdei_do_cross_call
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L9:
	mov	r1, #0
	ldr	r2, .L11+20
	ldr	r3, .L11+24
	str	r1, [sp]
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [r4, #12]
	ldr	r0, [r4, #16]
	bl	sdei_api_event_register
	mov	r5, r0
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L12:
	.align	2
.L11:
	.word	sdei_events_lock
	.word	sdei_list_lock
	.word	SDEI_EVENT_TYPE_SHARED
	.word	_local_event_register
	.word	_local_event_unregister
	.word	sdei_entry_point
	.word	SDEI_EVENT_REGISTER_RM_ANY
	.size	_sdei_event_register, .-_sdei_event_register
	.comm	sdei_list_lock,4,4
	.comm	sdei_events_lock,4,4
	.comm	sdei_entry_point,4,4
	.comm	_local_event_unregister,4,4
	.comm	_local_event_register,4,4
	.comm	SDEI_EVENT_TYPE_SHARED,4,4
	.comm	SDEI_EVENT_REGISTER_RM_ANY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
