	.file	"extr_at32ap700x_wdt.c_at32_wdt_start.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	at32_wdt_start, @function
at32_wdt_start:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rdi, QWORD PTR wdt[rip]
	cmp	DWORD PTR [rdi], 1
	setg	bpl
	add	rdi, 4
	call	spin_lock@PLT
	mov	edi, DWORD PTR CTRL_EN[rip]
	add	ebp, 14
	call	WDT_BIT@PLT
	mov	edi, DWORD PTR CTRL_PSEL[rip]
	mov	esi, ebp
	mov	ebx, eax
	call	WDT_BF@PLT
	mov	edi, DWORD PTR CTRL_KEY[rip]
	mov	esi, 85
	or	ebx, eax
	call	WDT_BF@PLT
	mov	esi, DWORD PTR CTRL[rip]
	mov	rdi, QWORD PTR wdt[rip]
	mov	edx, ebx
	or	edx, eax
	call	wdt_writel@PLT
	mov	edi, DWORD PTR CTRL_EN[rip]
	call	WDT_BIT@PLT
	mov	edi, DWORD PTR CTRL_PSEL[rip]
	mov	esi, ebp
	mov	ebx, eax
	call	WDT_BF@PLT
	mov	edi, DWORD PTR CTRL_KEY[rip]
	mov	esi, 170
	or	ebx, eax
	call	WDT_BF@PLT
	mov	rdi, QWORD PTR wdt[rip]
	mov	esi, DWORD PTR CTRL[rip]
	or	ebx, eax
	mov	edx, ebx
	call	wdt_writel@PLT
	mov	rax, QWORD PTR wdt[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	lea	rdi, 4[rax]
	jmp	spin_unlock@PLT
	.cfi_endproc
.LFE0:
	.size	at32_wdt_start, .-at32_wdt_start
	.comm	wdt,8,8
	.comm	CTRL_PSEL,4,4
	.comm	CTRL_KEY,4,4
	.comm	CTRL_EN,4,4
	.comm	CTRL,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_at32ap700x_wdt.c_at32_wdt_start.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	at32_wdt_start, %function
at32_wdt_start:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r5, .L6
	ldr	r9, .L6+4
	ldr	r0, [r5]
	sub	sp, sp, #12
	ldr	r3, [r0], #4
	ldr	r10, .L6+8
	cmp	r3, #1
	movgt	r8, #15
	movle	r8, #14
	bl	spin_lock
	ldr	r3, [r9]
	ldr	r0, [r10]
	str	r3, [sp, #4]
	ldr	fp, [r5]
	bl	WDT_BIT
	ldr	r7, .L6+12
	mov	r1, r8
	mov	r4, r0
	ldr	r0, [r7]
	bl	WDT_BF
	mov	r2, r0
	ldr	r6, .L6+16
	mov	r1, #85
	ldr	r0, [r6]
	orr	r4, r4, r2
	bl	WDT_BF
	ldr	r3, [sp, #4]
	orr	r2, r4, r0
	mov	r1, r3
	mov	r0, fp
	bl	wdt_writel
	ldr	r0, [r10]
	ldr	r10, [r9]
	ldr	r9, [r5]
	bl	WDT_BIT
	mov	r1, r8
	mov	r4, r0
	ldr	r0, [r7]
	bl	WDT_BF
	mov	r2, r0
	mov	r1, #170
	ldr	r0, [r6]
	orr	r4, r4, r2
	bl	WDT_BF
	mov	r1, r10
	orr	r2, r4, r0
	mov	r0, r9
	bl	wdt_writel
	ldr	r0, [r5]
	add	r0, r0, #4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	spin_unlock
.L7:
	.align	2
.L6:
	.word	wdt
	.word	CTRL
	.word	CTRL_EN
	.word	CTRL_PSEL
	.word	CTRL_KEY
	.size	at32_wdt_start, .-at32_wdt_start
	.comm	wdt,4,4
	.comm	CTRL_PSEL,4,4
	.comm	CTRL_KEY,4,4
	.comm	CTRL_EN,4,4
	.comm	CTRL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
