	.file	"extr_rtc_module.c_rtc_isr_register.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	rtc_isr_register
	.type	rtc_isr_register, @function
rtc_isr_register:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	eax, eax
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, edx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	rtc_isr_ensure_installed@PLT
	cmp	QWORD PTR ESP_OK[rip], rax
	je	.L6
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.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
.L6:
	.cfi_restore_state
	mov	edi, 24
	call	malloc@PLT
	mov	r13, rax
	mov	rax, QWORD PTR ESP_ERR_NO_MEM[rip]
	test	r13, r13
	je	.L1
	mov	DWORD PTR 16[r13], r12d
	lea	rdi, s_rtc_isr_handler_list_lock[rip]
	mov	QWORD PTR 8[r13], rbp
	mov	DWORD PTR 0[r13], ebx
	call	portENTER_CRITICAL@PLT
	mov	edx, DWORD PTR next[rip]
	mov	rsi, r13
	lea	rdi, s_rtc_isr_handler_list[rip]
	call	SLIST_INSERT_HEAD@PLT
	lea	rdi, s_rtc_isr_handler_list_lock[rip]
	call	portEXIT_CRITICAL@PLT
	mov	rax, QWORD PTR ESP_OK[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	rtc_isr_register, .-rtc_isr_register
	.comm	s_rtc_isr_handler_list_lock,4,4
	.comm	s_rtc_isr_handler_list,4,4
	.comm	next,4,4
	.comm	ESP_OK,8,8
	.comm	ESP_ERR_NO_MEM,8,8
	.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_rtc_module.c_rtc_isr_register.c"
	.text
	.align	2
	.global	rtc_isr_register
	.syntax unified
	.arm
	.fpu softvfp
	.type	rtc_isr_register, %function
rtc_isr_register:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	mov	r5, r1
	mov	r4, r2
	bl	rtc_isr_ensure_installed
	ldr	r8, .L7
	ldr	r3, [r8]
	cmp	r3, r0
	popne	{r4, r5, r6, r7, r8, pc}
	mov	r0, #12
	bl	malloc
	subs	r7, r0, #0
	beq	.L6
	stm	r7, {r4, r5, r6}
	ldr	r0, .L7+4
	bl	portENTER_CRITICAL
	ldr	r3, .L7+8
	mov	r1, r7
	ldr	r2, [r3]
	ldr	r0, .L7+12
	bl	SLIST_INSERT_HEAD
	ldr	r0, .L7+4
	bl	portEXIT_CRITICAL
	ldr	r0, [r8]
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	ldr	r3, .L7+16
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	.align	2
.L7:
	.word	ESP_OK
	.word	s_rtc_isr_handler_list_lock
	.word	next
	.word	s_rtc_isr_handler_list
	.word	ESP_ERR_NO_MEM
	.size	rtc_isr_register, .-rtc_isr_register
	.comm	s_rtc_isr_handler_list_lock,4,4
	.comm	s_rtc_isr_handler_list,4,4
	.comm	next,4,4
	.comm	ESP_OK,4,4
	.comm	ESP_ERR_NO_MEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
