	.file	"extr_am335x_prcm.c_am335x_clk_pruss_activate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	am335x_clk_pruss_activate, @function
am335x_clk_pruss_activate:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	QWORD PTR am335x_prcm_sc[rip], 0
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, DWORD PTR ENXIO[rip]
	je	.L1
	mov	edi, DWORD PTR CM_PER_PRUSS_CLKCTRL[rip]
	mov	esi, 2
	call	prcm_write_4@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, 10
	call	DELAY@PLT
.L4:
	mov	edi, DWORD PTR CM_PER_PRUSS_CLKCTRL[rip]
	call	prcm_read_4@PLT
	and	eax, 3
	cmp	eax, 2
	jne	.L5
	mov	edi, DWORD PTR CM_PER_PRUSS_CLKSTCTRL[rip]
	mov	esi, 2
	call	prcm_write_4@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edi, 10
	call	DELAY@PLT
.L6:
	mov	edi, DWORD PTR CM_PER_PRUSS_CLKSTCTRL[rip]
	call	prcm_read_4@PLT
	test	al, 16
	je	.L7
	mov	edi, DWORD PTR CM_PER_PRUSS_CLKSTCTRL[rip]
	call	prcm_read_4@PLT
	test	al, 32
	jne	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, 10
	call	DELAY@PLT
	mov	edi, DWORD PTR CM_PER_PRUSS_CLKSTCTRL[rip]
	call	prcm_read_4@PLT
	test	al, 32
	je	.L9
	mov	edi, DWORD PTR CM_PER_PRUSS_CLKSTCTRL[rip]
	call	prcm_read_4@PLT
	test	al, 64
	jne	.L16
	.p2align 4,,10
	.p2align 3
.L11:
	mov	edi, 10
	call	DELAY@PLT
.L10:
	mov	edi, DWORD PTR CM_PER_PRUSS_CLKSTCTRL[rip]
	call	prcm_read_4@PLT
	test	al, 64
	je	.L11
.L16:
	mov	edi, DWORD PTR CLKSEL_PRUSS_OCP_CLK[rip]
	xor	esi, esi
	call	prcm_write_4@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edi, 10
	call	DELAY@PLT
.L12:
	mov	edi, DWORD PTR CLKSEL_PRUSS_OCP_CLK[rip]
	call	prcm_read_4@PLT
	and	eax, 3
	mov	r12d, eax
	jne	.L13
	mov	edi, DWORD PTR PRM_PER_RSTCTRL[rip]
	call	prcm_read_4@PLT
	mov	edi, DWORD PTR PRM_PER_RSTCTRL[rip]
	and	eax, -3
	mov	esi, eax
	call	prcm_write_4@PLT
.L1:
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	am335x_clk_pruss_activate, .-am335x_clk_pruss_activate
	.comm	am335x_prcm_sc,8,8
	.comm	PRM_PER_RSTCTRL,4,4
	.comm	ENXIO,4,4
	.comm	CM_PER_PRUSS_CLKSTCTRL,4,4
	.comm	CM_PER_PRUSS_CLKCTRL,4,4
	.comm	CLKSEL_PRUSS_OCP_CLK,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_am335x_prcm.c_am335x_clk_pruss_activate.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	am335x_clk_pruss_activate, %function
am335x_clk_pruss_activate:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L18
	push	{r4, r5, r6, lr}
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L16
	ldr	r4, .L18+4
	mov	r1, #2
	ldr	r0, [r4]
	bl	prcm_write_4
	b	.L4
.L5:
	mov	r0, #10
	bl	DELAY
.L4:
	ldr	r0, [r4]
	bl	prcm_read_4
	and	r1, r0, #3
	cmp	r1, #2
	bne	.L5
	ldr	r4, .L18+8
	ldr	r0, [r4]
	bl	prcm_write_4
	b	.L6
.L7:
	mov	r0, #10
	bl	DELAY
.L6:
	ldr	r0, [r4]
	bl	prcm_read_4
	tst	r0, #16
	beq	.L7
	ldr	r0, [r4]
	bl	prcm_read_4
	tst	r0, #32
	bne	.L10
.L9:
	mov	r0, #10
	bl	DELAY
	ldr	r0, [r4]
	bl	prcm_read_4
	tst	r0, #32
	beq	.L9
	ldr	r0, [r4]
	bl	prcm_read_4
	tst	r0, #64
	bne	.L17
.L11:
	mov	r0, #10
	bl	DELAY
.L10:
	ldr	r0, [r4]
	bl	prcm_read_4
	tst	r0, #64
	beq	.L11
.L17:
	ldr	r5, .L18+12
	mov	r1, #0
	ldr	r0, [r5]
	bl	prcm_write_4
	b	.L12
.L13:
	mov	r0, #10
	bl	DELAY
.L12:
	ldr	r0, [r5]
	bl	prcm_read_4
	ands	r4, r0, #3
	bne	.L13
	ldr	r3, .L18+16
	ldr	r5, [r3]
	mov	r0, r5
	bl	prcm_read_4
	mov	r1, r0
	mov	r0, r5
	bic	r1, r1, #2
	bl	prcm_write_4
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L16:
	ldr	r3, .L18+20
	ldr	r4, [r3]
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L19:
	.align	2
.L18:
	.word	am335x_prcm_sc
	.word	CM_PER_PRUSS_CLKCTRL
	.word	CM_PER_PRUSS_CLKSTCTRL
	.word	CLKSEL_PRUSS_OCP_CLK
	.word	PRM_PER_RSTCTRL
	.word	ENXIO
	.size	am335x_clk_pruss_activate, .-am335x_clk_pruss_activate
	.comm	am335x_prcm_sc,4,4
	.comm	PRM_PER_RSTCTRL,4,4
	.comm	ENXIO,4,4
	.comm	CM_PER_PRUSS_CLKSTCTRL,4,4
	.comm	CM_PER_PRUSS_CLKCTRL,4,4
	.comm	CLKSEL_PRUSS_OCP_CLK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
