	.file	"extr_clock.c_pmc_uckr_mode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pmc_uckr_mode, @function
pmc_uckr_mode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	mov	edi, DWORD PTR AT91_CKGR_UCKR[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, esi
	call	at91_sys_read@PLT
	mov	ebp, eax
	xor	eax, eax
	call	cpu_is_at91sam9g45@PLT
	test	rax, rax
	je	.L2
	mov	eax, DWORD PTR AT91_PMC_BIASEN[rip]
	test	ebx, ebx
	je	.L3
	or	ebp, eax
.L4:
	mov	esi, DWORD PTR [r12]
	mov	edi, DWORD PTR AT91_CKGR_UCKR[rip]
	mov	ebx, DWORD PTR AT91_PMC_LOCKU[rip]
	or	esi, ebp
	call	at91_sys_write@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	test	ebx, ebx
	jne	.L4
.L5:
	mov	esi, DWORD PTR [r12]
	mov	edi, DWORD PTR AT91_CKGR_UCKR[rip]
	xor	ebx, ebx
	not	esi
	and	esi, ebp
	call	at91_sys_write@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	xor	eax, eax
	call	cpu_relax@PLT
	mov	edi, DWORD PTR AT91_PMC_SR[rip]
	call	at91_sys_read@PLT
	and	eax, DWORD PTR AT91_PMC_LOCKU[rip]
	cmp	eax, ebx
	jne	.L7
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	not	eax
	and	ebp, eax
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	pmc_uckr_mode, .-pmc_uckr_mode
	.comm	AT91_PMC_SR,4,4
	.comm	AT91_PMC_LOCKU,4,4
	.comm	AT91_PMC_BIASEN,4,4
	.comm	AT91_CKGR_UCKR,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_clock.c_pmc_uckr_mode.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pmc_uckr_mode, %function
pmc_uckr_mode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, .L15
	mov	r4, r0
	ldr	r0, [r7]
	mov	r6, r1
	bl	at91_sys_read
	mov	r5, r0
	bl	cpu_is_at91sam9g45
	cmp	r0, #0
	beq	.L2
	ldr	r3, .L15+4
	cmp	r6, #0
	ldr	r3, [r3]
	orrne	r5, r5, r3
	biceq	r5, r5, r3
	bne	.L4
.L5:
	ldr	r1, [r4]
	ldr	r0, [r7]
	bic	r1, r5, r1
	bl	at91_sys_write
	mov	r6, #0
	ldr	r4, .L15+8
.L6:
	ldr	r5, .L15+12
.L7:
	bl	cpu_relax
	ldr	r0, [r5]
	bl	at91_sys_read
	ldr	r3, [r4]
	and	r0, r0, r3
	cmp	r0, r6
	bne	.L7
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	cmp	r6, #0
	beq	.L5
.L4:
	ldr	r1, [r4]
	ldr	r4, .L15+8
	ldr	r0, [r7]
	orr	r1, r5, r1
	ldr	r6, [r4]
	bl	at91_sys_write
	b	.L6
.L16:
	.align	2
.L15:
	.word	AT91_CKGR_UCKR
	.word	AT91_PMC_BIASEN
	.word	AT91_PMC_LOCKU
	.word	AT91_PMC_SR
	.size	pmc_uckr_mode, .-pmc_uckr_mode
	.comm	AT91_PMC_SR,4,4
	.comm	AT91_PMC_LOCKU,4,4
	.comm	AT91_PMC_BIASEN,4,4
	.comm	AT91_CKGR_UCKR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
