	.file	"extr_rtc-at91rm9200.c_at91_rtc_decodetime.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	at91_rtc_decodetime, @function
at91_rtc_decodetime:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, edi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, r13d
	call	at91_rtc_read@PLT
	mov	edi, r14d
	mov	ebp, eax
	call	at91_rtc_read@PLT
	mov	edi, r13d
	mov	r12d, eax
	call	at91_rtc_read@PLT
	mov	ebx, eax
	cmp	eax, ebp
	jne	.L2
	mov	edi, r14d
	call	at91_rtc_read@PLT
	mov	ebp, eax
	cmp	eax, r12d
	jne	.L2
	mov	edi, DWORD PTR AT91_RTC_SEC[rip]
	and	edi, ebx
	call	bcd2bin@PLT
	mov	edi, DWORD PTR AT91_RTC_MIN[rip]
	mov	DWORD PTR [r15], eax
	and	edi, ebx
	shr	edi, 8
	call	bcd2bin@PLT
	and	ebx, DWORD PTR AT91_RTC_HOUR[rip]
	mov	DWORD PTR 4[r15], eax
	mov	edi, ebx
	shr	edi, 16
	call	bcd2bin@PLT
	mov	edi, DWORD PTR AT91_RTC_CENT[rip]
	mov	DWORD PTR 8[r15], eax
	and	edi, ebp
	call	bcd2bin@PLT
	mov	edi, DWORD PTR AT91_RTC_YEAR[rip]
	imul	eax, eax, 100
	and	edi, ebp
	shr	edi, 8
	mov	DWORD PTR 12[r15], eax
	call	bcd2bin@PLT
	mov	edi, DWORD PTR AT91_RTC_DAY[rip]
	add	DWORD PTR 12[r15], eax
	and	edi, ebp
	shr	edi, 21
	call	bcd2bin@PLT
	mov	edi, DWORD PTR AT91_RTC_MONTH[rip]
	sub	eax, 1
	mov	DWORD PTR 16[r15], eax
	and	edi, ebp
	shr	edi, 16
	call	bcd2bin@PLT
	mov	edi, DWORD PTR AT91_RTC_DATE[rip]
	sub	eax, 1
	mov	DWORD PTR 20[r15], eax
	and	edi, ebp
	shr	edi, 24
	call	bcd2bin@PLT
	mov	DWORD PTR 24[r15], eax
	add	rsp, 8
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	at91_rtc_decodetime, .-at91_rtc_decodetime
	.comm	AT91_RTC_YEAR,4,4
	.comm	AT91_RTC_SEC,4,4
	.comm	AT91_RTC_MONTH,4,4
	.comm	AT91_RTC_MIN,4,4
	.comm	AT91_RTC_HOUR,4,4
	.comm	AT91_RTC_DAY,4,4
	.comm	AT91_RTC_DATE,4,4
	.comm	AT91_RTC_CENT,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-at91rm9200.c_at91_rtc_decodetime.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	at91_rtc_decodetime, %function
at91_rtc_decodetime:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r0
	mov	r8, r1
	mov	r7, r2
.L2:
	mov	r0, r6
	bl	at91_rtc_read
	mov	r5, r0
	mov	r0, r8
	bl	at91_rtc_read
	mov	r9, r0
	mov	r0, r6
	bl	at91_rtc_read
	cmp	r0, r5
	mov	r4, r0
	bne	.L2
	mov	r0, r8
	bl	at91_rtc_read
	cmp	r0, r9
	mov	r5, r0
	bne	.L2
	ldr	r3, .L8
	ldr	r0, [r3]
	and	r0, r0, r4
	bl	bcd2bin
	ldr	r3, .L8+4
	str	r0, [r7]
	ldr	r0, [r3]
	and	r0, r0, r4
	lsr	r0, r0, #8
	bl	bcd2bin
	ldr	r3, .L8+8
	str	r0, [r7, #4]
	ldr	r3, [r3]
	and	r4, r4, r3
	lsr	r0, r4, #16
	bl	bcd2bin
	ldr	r3, .L8+12
	str	r0, [r7, #8]
	ldr	r0, [r3]
	and	r0, r0, r5
	bl	bcd2bin
	ldr	r3, .L8+16
	add	r0, r0, r0, lsl #2
	ldr	r2, [r3]
	add	r0, r0, r0, lsl #2
	lsl	r3, r0, #2
	and	r0, r5, r2
	str	r3, [r7, #12]
	lsr	r0, r0, #8
	bl	bcd2bin
	ldr	r3, .L8+20
	ldr	r2, [r7, #12]
	ldr	r3, [r3]
	add	r2, r2, r0
	and	r3, r3, r5
	str	r2, [r7, #12]
	lsr	r0, r3, #21
	bl	bcd2bin
	ldr	r2, .L8+24
	sub	r3, r0, #1
	ldr	r0, [r2]
	str	r3, [r7, #16]
	and	r0, r0, r5
	lsr	r0, r0, #16
	bl	bcd2bin
	ldr	r2, .L8+28
	sub	r3, r0, #1
	ldr	r0, [r2]
	str	r3, [r7, #20]
	and	r0, r0, r5
	lsr	r0, r0, #24
	bl	bcd2bin
	str	r0, [r7, #24]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	.align	2
.L8:
	.word	AT91_RTC_SEC
	.word	AT91_RTC_MIN
	.word	AT91_RTC_HOUR
	.word	AT91_RTC_CENT
	.word	AT91_RTC_YEAR
	.word	AT91_RTC_DAY
	.word	AT91_RTC_MONTH
	.word	AT91_RTC_DATE
	.size	at91_rtc_decodetime, .-at91_rtc_decodetime
	.comm	AT91_RTC_YEAR,4,4
	.comm	AT91_RTC_SEC,4,4
	.comm	AT91_RTC_MONTH,4,4
	.comm	AT91_RTC_MIN,4,4
	.comm	AT91_RTC_HOUR,4,4
	.comm	AT91_RTC_DAY,4,4
	.comm	AT91_RTC_DATE,4,4
	.comm	AT91_RTC_CENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
