	.file	"extr_rtc-ab8500.c_ab8500_rtc_set_time.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ab8500_rtc_set_time, @function
ab8500_rtc_set_time:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	push	r12
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbx
	sub	rsp, 16
	.cfi_offset 3, -48
	mov	rdi, QWORD PTR ab8500_rtc_time_regs[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	call	ARRAY_SIZE@PLT
	mov	rsi, rsp
	cdqe
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L3
.L14:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L14
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L15
.L4:
	lea	rsi, -48[rbp]
	mov	rdi, r14
	mov	r13, rsp
	xor	ebx, ebx
	mov	QWORD PTR -48[rbp], 0
	call	rtc_tm_to_time@PLT
	mov	rcx, QWORD PTR -48[rbp]
	movabs	rdx, -8608480567731124087
	mov	rax, rcx
	mul	rdx
	mov	rax, rdx
	shr	rdx, 21
	shr	rax, 5
	mov	BYTE PTR [rsp], dl
	mov	rsi, rax
	sal	rsi, 4
	sub	rsi, rax
	rol	ax, 8
	sal	rsi, 2
	mov	WORD PTR 1[rsp], ax
	sub	rcx, rsi
	imul	rcx, QWORD PTR COUNTS_PER_SEC[rip]
	rol	cx, 8
	mov	WORD PTR 3[rsp], cx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rax, QWORD PTR ab8500_rtc_time_regs[rip]
	movzx	ecx, BYTE PTR 0[r13+rbx]
	mov	rdi, r12
	mov	esi, DWORD PTR AB8500_RTC[rip]
	mov	edx, DWORD PTR [rax+rbx*4]
	add	rbx, 1
	call	abx500_set_register_interruptible@PLT
	test	eax, eax
	js	.L1
.L5:
	mov	rdi, QWORD PTR ab8500_rtc_time_regs[rip]
	call	ARRAY_SIZE@PLT
	cmp	eax, ebx
	jg	.L7
	movzx	ecx, BYTE PTR RTC_WRITE_REQUEST[rip]
	mov	edx, DWORD PTR AB8500_RTC_READ_REQ_REG[rip]
	mov	rdi, r12
	mov	esi, DWORD PTR AB8500_RTC[rip]
	call	abx500_set_register_interruptible@PLT
.L1:
	mov	rsi, QWORD PTR -40[rbp]
	xor	rsi, QWORD PTR fs:40
	jne	.L16
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ab8500_rtc_set_time, .-ab8500_rtc_set_time
	.comm	ab8500_rtc_time_regs,8,8
	.comm	RTC_WRITE_REQUEST,1,1
	.comm	COUNTS_PER_SEC,8,8
	.comm	AB8500_RTC_READ_REQ_REG,4,4
	.comm	AB8500_RTC,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-ab8500.c_ab8500_rtc_set_time.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ab8500_rtc_set_time, %function
ab8500_rtc_set_time:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, fp, lr}
	add	fp, sp, #24
	sub	sp, sp, #12
	ldr	r6, .L9
	ldr	r3, .L9+4
	mov	r7, r0
	ldr	r0, [r6]
	mov	r8, r1
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	bl	ARRAY_SIZE
	mov	r4, #0
	add	r0, r0, #7
	bic	r0, r0, #7
	sub	sp, sp, r0
	mov	r5, sp
	mov	r0, r8
	sub	r1, fp, #36
	str	r4, [fp, #-36]
	bl	rtc_tm_to_time
	ldr	r2, [fp, #-36]
	ldr	r1, .L9+8
	ldr	r0, .L9+12
	umull	r3, r1, r2, r1
	lsr	r3, r1, #5
	strb	r3, [sp, #2]
	ldr	r0, [r0]
	rsb	r3, r3, r3, lsl #4
	sub	r3, r2, r3, lsl #2
	mul	r3, r0, r3
	lsr	r2, r1, #13
	strb	r3, [sp, #4]
	lsr	r1, r1, #21
	lsr	r3, r3, #8
	strb	r3, [sp, #3]
	strb	r2, [sp, #1]
	ldr	r8, .L9+16
	strb	r1, [r5], #-1
	b	.L2
.L4:
	ldr	r2, [r6]
	mov	r0, r7
	ldrb	r3, [r5, #1]!	@ zero_extendqisi2
	ldr	r2, [r2, r4, lsl #2]
	ldr	r1, [r8]
	bl	abx500_set_register_interruptible
	cmp	r0, #0
	blt	.L1
	add	r4, r4, #1
.L2:
	ldr	r0, [r6]
	bl	ARRAY_SIZE
	cmp	r4, r0
	blt	.L4
	ldr	r3, .L9+20
	ldr	r2, .L9+24
	mov	r0, r7
	ldr	r1, [r8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldr	r2, [r2]
	bl	abx500_set_register_interruptible
.L1:
	ldr	r3, .L9+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, fp, pc}
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	ab8500_rtc_time_regs
	.word	.LC0
	.word	-2004318071
	.word	COUNTS_PER_SEC
	.word	AB8500_RTC
	.word	RTC_WRITE_REQUEST
	.word	AB8500_RTC_READ_REQ_REG
	.size	ab8500_rtc_set_time, .-ab8500_rtc_set_time
	.comm	ab8500_rtc_time_regs,4,4
	.comm	RTC_WRITE_REQUEST,1,1
	.comm	COUNTS_PER_SEC,4,4
	.comm	AB8500_RTC_READ_REQ_REG,4,4
	.comm	AB8500_RTC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
