	.file	"extr_rtc-wm8350.c_wm8350_rtc_setalarm.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	wm8350_rtc_setalarm, @function
wm8350_rtc_setalarm:
.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
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rsi
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	lea	r12, 12[rsp]
	call	dev_get_drvdata@PLT
	mov	edx, 12
	xor	esi, esi
	mov	rdi, r12
	mov	rbp, rax
	call	memset@PLT
	mov	eax, DWORD PTR 8[rbx]
	cmp	eax, -1
	je	.L2
	or	eax, DWORD PTR 12[rsp]
.L3:
	mov	edx, DWORD PTR 12[rbx]
	cmp	edx, -1
	je	.L4
	mov	ecx, DWORD PTR WM8350_RTC_ALMMINS_SHIFT[rip]
	sal	edx, cl
	or	eax, edx
.L5:
	mov	edx, DWORD PTR 16[rbx]
	mov	DWORD PTR 12[rsp], eax
	mov	eax, DWORD PTR 16[rsp]
	cmp	edx, -1
	je	.L6
	or	eax, edx
.L7:
	mov	edx, DWORD PTR 20[rbx]
	cmp	edx, -1
	je	.L8
	mov	ecx, DWORD PTR WM8350_RTC_ALMDAY_SHIFT[rip]
	add	edx, 1
	sal	edx, cl
	or	eax, edx
.L9:
	mov	edx, DWORD PTR 24[rbx]
	mov	DWORD PTR 16[rsp], eax
	mov	eax, DWORD PTR 20[rsp]
	cmp	edx, -1
	je	.L10
	or	eax, edx
.L11:
	mov	edx, DWORD PTR 28[rbx]
	cmp	edx, -1
	je	.L12
	mov	ecx, DWORD PTR WM8350_RTC_ALMMTH_SHIFT[rip]
	add	edx, 1
	sal	edx, cl
	or	eax, edx
.L13:
	mov	rdi, rbp
	mov	DWORD PTR 20[rsp], eax
	call	wm8350_rtc_stop_alarm@PLT
	test	eax, eax
	js	.L1
	mov	esi, DWORD PTR WM8350_ALARM_SECONDS_MINUTES[rip]
	mov	rcx, r12
	mov	edx, 3
	mov	rdi, rbp
	call	wm8350_block_write@PLT
	test	eax, eax
	js	.L1
	cmp	QWORD PTR [rbx], 0
	jne	.L18
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L19
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	or	eax, DWORD PTR WM8350_RTC_ALMMTH_MASK[rip]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L10:
	or	eax, DWORD PTR WM8350_RTC_ALMDATE_MASK[rip]
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L8:
	or	eax, DWORD PTR WM8350_RTC_ALMDAY_MASK[rip]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	or	eax, DWORD PTR WM8350_RTC_ALMHRS_MASK[rip]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	or	eax, DWORD PTR WM8350_RTC_ALMMINS_MASK[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR 12[rsp]
	or	eax, DWORD PTR WM8350_RTC_ALMSECS_MASK[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, rbp
	call	wm8350_rtc_start_alarm@PLT
	jmp	.L1
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	wm8350_rtc_setalarm, .-wm8350_rtc_setalarm
	.comm	WM8350_RTC_ALMSECS_MASK,4,4
	.comm	WM8350_RTC_ALMMTH_SHIFT,4,4
	.comm	WM8350_RTC_ALMMTH_MASK,4,4
	.comm	WM8350_RTC_ALMMINS_SHIFT,4,4
	.comm	WM8350_RTC_ALMMINS_MASK,4,4
	.comm	WM8350_RTC_ALMHRS_MASK,4,4
	.comm	WM8350_RTC_ALMDAY_SHIFT,4,4
	.comm	WM8350_RTC_ALMDAY_MASK,4,4
	.comm	WM8350_RTC_ALMDATE_MASK,4,4
	.comm	WM8350_ALARM_SECONDS_MINUTES,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_rtc-wm8350.c_wm8350_rtc_setalarm.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wm8350_rtc_setalarm, %function
wm8350_rtc_setalarm:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	mov	r4, r1
	ldr	r3, .L20
	sub	sp, sp, #20
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	dev_get_drvdata
	ldr	r3, [r4, #4]
	ldr	r2, [r4, #8]
	cmn	r3, #1
	ldreq	r3, .L20+4
	mov	r5, r0
	ldreq	r3, [r3]
	cmn	r2, #1
	ldrne	r1, .L20+8
	ldreq	r2, .L20+12
	ldrne	r1, [r1]
	ldreq	r2, [r2]
	orrne	r2, r3, r2, lsl r1
	orreq	r2, r3, r2
	ldr	r3, [r4, #12]
	str	r2, [sp]
	cmn	r3, #1
	ldr	r2, [r4, #16]
	ldreq	r3, .L20+16
	ldreq	r3, [r3]
	cmn	r2, #1
	ldrne	r1, .L20+20
	ldreq	r2, .L20+24
	ldrne	r1, [r1]
	ldreq	r2, [r2]
	addne	r2, r2, #1
	orrne	r2, r3, r2, lsl r1
	orreq	r2, r3, r2
	ldr	r3, [r4, #20]
	str	r2, [sp, #4]
	cmn	r3, #1
	ldr	r2, [r4, #24]
	ldreq	r3, .L20+28
	ldreq	r3, [r3]
	cmn	r2, #1
	ldrne	r1, .L20+32
	ldreq	r2, .L20+36
	ldrne	r1, [r1]
	ldreq	r2, [r2]
	addne	r2, r2, #1
	orrne	r3, r3, r2, lsl r1
	orreq	r3, r3, r2
	str	r3, [sp, #8]
	bl	wm8350_rtc_stop_alarm
	cmp	r0, #0
	blt	.L1
	ldr	r2, .L20+40
	mov	r3, sp
	ldr	r1, [r2]
	mov	r0, r5
	mov	r2, #3
	bl	wm8350_block_write
	cmp	r0, #0
	blt	.L1
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L18
.L1:
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, pc}
.L18:
	mov	r0, r5
	bl	wm8350_rtc_start_alarm
	b	.L1
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC0
	.word	WM8350_RTC_ALMSECS_MASK
	.word	WM8350_RTC_ALMMINS_SHIFT
	.word	WM8350_RTC_ALMMINS_MASK
	.word	WM8350_RTC_ALMHRS_MASK
	.word	WM8350_RTC_ALMDAY_SHIFT
	.word	WM8350_RTC_ALMDAY_MASK
	.word	WM8350_RTC_ALMDATE_MASK
	.word	WM8350_RTC_ALMMTH_SHIFT
	.word	WM8350_RTC_ALMMTH_MASK
	.word	WM8350_ALARM_SECONDS_MINUTES
	.size	wm8350_rtc_setalarm, .-wm8350_rtc_setalarm
	.comm	WM8350_RTC_ALMSECS_MASK,4,4
	.comm	WM8350_RTC_ALMMTH_SHIFT,4,4
	.comm	WM8350_RTC_ALMMTH_MASK,4,4
	.comm	WM8350_RTC_ALMMINS_SHIFT,4,4
	.comm	WM8350_RTC_ALMMINS_MASK,4,4
	.comm	WM8350_RTC_ALMHRS_MASK,4,4
	.comm	WM8350_RTC_ALMDAY_SHIFT,4,4
	.comm	WM8350_RTC_ALMDAY_MASK,4,4
	.comm	WM8350_RTC_ALMDATE_MASK,4,4
	.comm	WM8350_ALARM_SECONDS_MINUTES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
