	.file	"extr_rtc-jz4740.c_jz4740_rtc_power_off.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	jz4740_rtc_power_off, @function
jz4740_rtc_power_off:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	edi, DWORD PTR dev_for_power_off[rip]
	movabs	r12, 2361183241434822607
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	dev_get_drvdata@PLT
	mov	edi, DWORD PTR 16[rax]
	mov	rbp, rax
	call	clk_prepare_enable@PLT
	mov	edi, DWORD PTR 16[rbp]
	call	clk_get_rate@PLT
	mov	rdx, QWORD PTR 0[rbp]
	mov	r8, QWORD PTR JZ_RTC_WAKEUP_FILTER_MASK[rip]
	mov	rdi, rbp
	mov	rbx, rax
	mov	esi, DWORD PTR JZ_REG_RTC_WAKEUP_FILTER[rip]
	imul	rdx, rax
	shr	rdx, 3
	mov	rax, rdx
	mul	r12
	mov	rax, r8
	shr	rdx, 4
	and	rax, rdx
	cmp	r8, rdx
	cmova	r8, rax
	mov	rdx, r8
	call	jz4740_rtc_reg_write@PLT
	imul	rbx, QWORD PTR 8[rbp]
	mov	r8, QWORD PTR JZ_RTC_RESET_COUNTER_MASK[rip]
	mov	rdi, rbp
	mov	esi, DWORD PTR JZ_REG_RTC_RESET_COUNTER[rip]
	mov	rdx, rbx
	shr	rdx, 3
	mov	rax, rdx
	mul	r12
	mov	rax, r8
	shr	rdx, 4
	and	rax, rdx
	cmp	r8, rdx
	cmova	r8, rax
	mov	rdx, r8
	call	jz4740_rtc_reg_write@PLT
	mov	edi, DWORD PTR dev_for_power_off[rip]
	call	jz4740_rtc_poweroff@PLT
	pop	rbx
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	kernel_halt@PLT
	.cfi_endproc
.LFE0:
	.size	jz4740_rtc_power_off, .-jz4740_rtc_power_off
	.comm	dev_for_power_off,4,4
	.comm	JZ_RTC_WAKEUP_FILTER_MASK,8,8
	.comm	JZ_RTC_RESET_COUNTER_MASK,8,8
	.comm	JZ_REG_RTC_WAKEUP_FILTER,4,4
	.comm	JZ_REG_RTC_RESET_COUNTER,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-jz4740.c_jz4740_rtc_power_off.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	jz4740_rtc_power_off, %function
jz4740_rtc_power_off:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r6, .L6
	ldr	r0, [r6]
	bl	dev_get_drvdata
	mov	r5, r0
	ldr	r0, [r0, #8]
	bl	clk_prepare_enable
	ldr	r0, [r5, #8]
	bl	clk_get_rate
	mov	r4, r0
	ldr	r3, [r5]
	ldr	r2, .L6+4
	mul	r3, r0, r3
	umull	r1, r3, r2, r3
	ldr	r2, .L6+8
	mov	r0, r5
	ldr	r2, [r2]
	cmp	r2, r3, lsr #6
	lsrhi	r1, r3, #6
	ldr	r3, .L6+12
	andhi	r2, r2, r1
	ldr	r1, [r3]
	bl	jz4740_rtc_reg_write
	ldr	r0, [r5, #4]
	ldr	r2, .L6+4
	mul	r4, r0, r4
	ldr	r3, .L6+16
	umull	r1, r4, r2, r4
	ldr	r2, [r3]
	lsr	r3, r4, #6
	cmp	r2, r4, lsr #6
	andhi	r2, r2, r3
	ldr	r3, .L6+20
	mov	r0, r5
	ldr	r1, [r3]
	bl	jz4740_rtc_reg_write
	ldr	r0, [r6]
	bl	jz4740_rtc_poweroff
	pop	{r4, r5, r6, lr}
	b	kernel_halt
.L7:
	.align	2
.L6:
	.word	dev_for_power_off
	.word	274877907
	.word	JZ_RTC_WAKEUP_FILTER_MASK
	.word	JZ_REG_RTC_WAKEUP_FILTER
	.word	JZ_RTC_RESET_COUNTER_MASK
	.word	JZ_REG_RTC_RESET_COUNTER
	.size	jz4740_rtc_power_off, .-jz4740_rtc_power_off
	.comm	dev_for_power_off,4,4
	.comm	JZ_RTC_WAKEUP_FILTER_MASK,4,4
	.comm	JZ_RTC_RESET_COUNTER_MASK,4,4
	.comm	JZ_REG_RTC_WAKEUP_FILTER,4,4
	.comm	JZ_REG_RTC_RESET_COUNTER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
