	.file	"extr_rtc-aspeed.c_aspeed_rtc_set_time.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	aspeed_rtc_set_time, @function
aspeed_rtc_set_time:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	dev_get_drvdata@PLT
	mov	r12d, DWORD PTR 4[r13]
	mov	edx, DWORD PTR 0[r13]
	mov	rbx, rax
	mov	eax, DWORD PTR 8[r13]
	mov	rdi, QWORD PTR RTC_CTRL[rip]
	sal	r12d, 24
	mov	ecx, edx
	mov	ebp, edx
	add	rdi, QWORD PTR [rbx]
	sal	eax, 16
	sar	ecx, 31
	or	r12d, eax
	mov	eax, DWORD PTR 12[r13]
	or	r12d, DWORD PTR 16[r13]
	sal	eax, 8
	or	r12d, eax
	movsx	rax, edx
	add	edx, 1900
	imul	rax, rax, 1374389535
	sar	rax, 37
	sub	eax, ecx
	imul	eax, eax, 100
	sub	ebp, eax
	mov	eax, DWORD PTR 20[r13]
	sal	ebp, 8
	add	eax, 1
	and	ebp, 32512
	and	eax, 15
	or	ebp, eax
	movsx	rax, edx
	sar	edx, 31
	imul	rax, rax, 1374389535
	sar	rax, 37
	sub	eax, edx
	sal	eax, 16
	and	eax, 2031616
	or	ebp, eax
	call	readl@PLT
	mov	edi, DWORD PTR RTC_UNLOCK[rip]
	mov	rsi, QWORD PTR RTC_CTRL[rip]
	add	rsi, QWORD PTR [rbx]
	mov	r13d, eax
	or	edi, eax
	call	writel@PLT
	mov	edi, r12d
	mov	rsi, QWORD PTR RTC_TIME[rip]
	add	rsi, QWORD PTR [rbx]
	call	writel@PLT
	mov	edi, ebp
	mov	rsi, QWORD PTR RTC_YEAR[rip]
	add	rsi, QWORD PTR [rbx]
	call	writel@PLT
	mov	edi, DWORD PTR RTC_ENABLE[rip]
	mov	rsi, QWORD PTR RTC_CTRL[rip]
	add	rsi, QWORD PTR [rbx]
	or	edi, r13d
	call	writel@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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	aspeed_rtc_set_time, .-aspeed_rtc_set_time
	.comm	RTC_YEAR,8,8
	.comm	RTC_UNLOCK,4,4
	.comm	RTC_TIME,8,8
	.comm	RTC_ENABLE,4,4
	.comm	RTC_CTRL,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-aspeed.c_aspeed_rtc_set_time.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	aspeed_rtc_set_time, %function
aspeed_rtc_set_time:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r8, r1
	bl	dev_get_drvdata
	mov	r5, r0
	ldr	r2, [r8]
	ldr	r1, .L4
	add	r3, r2, #1888
	smull	ip, r0, r1, r2
	asr	r4, r2, #31
	add	r3, r3, #12
	rsb	r4, r4, r0, asr #5
	smull	ip, r0, r1, r3
	add	r4, r4, r4, lsl #2
	ldr	r1, [r8, #20]
	add	r4, r4, r4, lsl #2
	ldr	r7, [r8, #8]
	sub	r4, r2, r4, lsl #2
	asr	r3, r3, #31
	ldr	r6, .L4+4
	rsb	r3, r3, r0, asr #5
	add	r2, r1, #1
	ldr	r0, [r8, #4]
	lsl	r4, r4, #8
	and	r2, r2, #15
	lsl	r7, r7, #16
	and	r4, r4, #32512
	ldr	ip, [r8, #16]
	orr	r7, r7, r0, lsl #24
	orr	r4, r4, r2
	ldr	r0, [r5]
	ldr	r2, [r6]
	ldr	r1, [r8, #12]
	lsl	r3, r3, #16
	orr	r7, r7, ip
	and	r3, r3, #2031616
	add	r0, r0, r2
	orr	r4, r4, r3
	orr	r7, r7, r1, lsl #8
	bl	readl
	mov	r8, r0
	ldr	r2, .L4+8
	ldr	r3, [r6]
	ldr	r0, [r2]
	ldr	r1, [r5]
	orr	r0, r8, r0
	add	r1, r1, r3
	bl	writel
	ldr	r3, .L4+12
	ldr	r1, [r5]
	ldr	r3, [r3]
	mov	r0, r7
	add	r1, r1, r3
	bl	writel
	ldr	r3, .L4+16
	ldr	r1, [r5]
	ldr	r3, [r3]
	mov	r0, r4
	add	r1, r1, r3
	bl	writel
	ldr	r2, .L4+20
	ldr	r1, [r5]
	ldr	r3, [r6]
	ldr	r0, [r2]
	add	r1, r1, r3
	orr	r0, r8, r0
	bl	writel
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	.align	2
.L4:
	.word	1374389535
	.word	RTC_CTRL
	.word	RTC_UNLOCK
	.word	RTC_TIME
	.word	RTC_YEAR
	.word	RTC_ENABLE
	.size	aspeed_rtc_set_time, .-aspeed_rtc_set_time
	.comm	RTC_YEAR,4,4
	.comm	RTC_UNLOCK,4,4
	.comm	RTC_TIME,4,4
	.comm	RTC_ENABLE,4,4
	.comm	RTC_CTRL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
