	.file	"extr_jz4780_machdep.c_platform_reset.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	platform_reset
	.type	platform_reset, @function
platform_reset:
.LFB0:
	.cfi_startproc
	endbr64
	push	rax
	.cfi_def_cfa_offset 16
	pop	rax
	.cfi_def_cfa_offset 8
	xor	esi, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	mov	rdi, QWORD PTR JZ_WDOG_TCER[rip]
	add	rdi, QWORD PTR JZ_TCU_BASE[rip]
	call	writereg@PLT
	mov	rdi, QWORD PTR JZ_WDOG_TCNT[rip]
	xor	esi, esi
	add	rdi, QWORD PTR JZ_TCU_BASE[rip]
	call	writereg@PLT
	mov	rdi, QWORD PTR JZ_WDOG_TDR[rip]
	mov	esi, 128
	add	rdi, QWORD PTR JZ_TCU_BASE[rip]
	call	writereg@PLT
	mov	esi, DWORD PTR TCSR_RTC_EN[rip]
	mov	rdi, QWORD PTR JZ_WDOG_TCSR[rip]
	or	esi, DWORD PTR TCSR_DIV_256[rip]
	add	rdi, QWORD PTR JZ_TCU_BASE[rip]
	call	writereg@PLT
	mov	esi, DWORD PTR TCER_ENABLE[rip]
	mov	rdi, QWORD PTR JZ_WDOG_TCER[rip]
	add	rdi, QWORD PTR JZ_TCU_BASE[rip]
	call	writereg@PLT
.L2:
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	platform_reset, .-platform_reset
	.comm	TCSR_RTC_EN,4,4
	.comm	TCSR_DIV_256,4,4
	.comm	TCER_ENABLE,4,4
	.comm	JZ_WDOG_TDR,8,8
	.comm	JZ_WDOG_TCSR,8,8
	.comm	JZ_WDOG_TCNT,8,8
	.comm	JZ_WDOG_TCER,8,8
	.comm	JZ_TCU_BASE,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_jz4780_machdep.c_platform_reset.c"
	.text
	.align	2
	.global	platform_reset
	.syntax unified
	.arm
	.fpu softvfp
	.type	platform_reset, %function
platform_reset:
	@ Volatile: function does not return.
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	ldr	r5, .L5
	ldr	r4, .L5+4
	ldr	r3, [r5]
	ldr	r0, [r4]
	mov	r1, #0
	add	r0, r0, r3
	bl	writereg
	ldr	r3, .L5+8
	ldr	r0, [r4]
	ldr	r3, [r3]
	mov	r1, #0
	add	r0, r0, r3
	bl	writereg
	ldr	r3, .L5+12
	ldr	r0, [r4]
	ldr	r3, [r3]
	mov	r1, #128
	add	r0, r0, r3
	bl	writereg
	ldr	r2, .L5+16
	ldr	r1, .L5+20
	ldr	r3, .L5+24
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r0, [r4]
	ldr	r1, [r1]
	add	r0, r0, r2
	orr	r1, r1, r3
	bl	writereg
	ldr	r0, [r4]
	ldr	r2, [r5]
	ldr	r3, .L5+28
	add	r0, r0, r2
	ldr	r1, [r3]
	bl	writereg
.L2:
	b	.L2
.L6:
	.align	2
.L5:
	.word	JZ_WDOG_TCER
	.word	JZ_TCU_BASE
	.word	JZ_WDOG_TCNT
	.word	JZ_WDOG_TDR
	.word	JZ_WDOG_TCSR
	.word	TCSR_RTC_EN
	.word	TCSR_DIV_256
	.word	TCER_ENABLE
	.size	platform_reset, .-platform_reset
	.comm	TCSR_RTC_EN,4,4
	.comm	TCSR_DIV_256,4,4
	.comm	TCER_ENABLE,4,4
	.comm	JZ_WDOG_TDR,4,4
	.comm	JZ_WDOG_TCSR,4,4
	.comm	JZ_WDOG_TCNT,4,4
	.comm	JZ_WDOG_TCER,4,4
	.comm	JZ_TCU_BASE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
