	.file	"extr_clk-stm32f4.c_rgclk_enable.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rgclk_enable, @function
rgclk_enable:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	r15d, r15d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	to_clk_gate@PLT
	mov	rdi, rax
	mov	r12, rax
	call	to_rgclk@PLT
	mov	ebp, DWORD PTR RGATE_TIMEOUT[rip]
	mov	rdi, r14
	mov	r13, rax
	call	[QWORD PTR clk_gate_ops[rip+8]]
	test	rax, rax
	je	.L10
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	call	disable_power_domain_write_protection@PLT
	mov	rdi, r14
	call	[QWORD PTR clk_gate_ops[rip]]
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, DWORD PTR [r12]
	call	readl@PLT
	mov	edi, DWORD PTR 0[r13]
	mov	ebx, eax
	call	BIT@PLT
	and	ebx, eax
	je	.L11
.L3:
	xor	r15d, r15d
	test	ebx, ebx
	sete	r15b
	xor	eax, eax
	call	enable_power_domain_write_protection@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	edi, 100
	call	udelay@PLT
	sub	ebp, 1
	jne	.L4
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	rgclk_enable, .-rgclk_enable
	.comm	clk_gate_ops,16,16
	.comm	RGATE_TIMEOUT,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_clk-stm32f4.c_rgclk_enable.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rgclk_enable, %function
rgclk_enable:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	bl	to_clk_gate
	mov	r6, r0
	bl	to_rgclk
	ldr	r8, .L11
	ldr	r2, .L11+4
	mov	r7, r0
	ldr	r3, [r8, #4]
	mov	r0, r4
	ldr	r5, [r2]
	blx	r3
	cmp	r0, #0
	movne	r4, #0
	beq	.L9
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	bl	disable_power_domain_write_protection
	mov	r0, r4
	ldr	r3, [r8]
	blx	r3
.L4:
	ldr	r0, [r6]
	bl	readl
	mov	r4, r0
	ldr	r0, [r7]
	bl	BIT
	ands	r4, r4, r0
	beq	.L10
.L3:
	clz	r4, r4
	lsr	r4, r4, #5
	bl	enable_power_domain_write_protection
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	mov	r0, #100
	bl	udelay
	subs	r5, r5, #1
	bne	.L4
	b	.L3
.L12:
	.align	2
.L11:
	.word	clk_gate_ops
	.word	RGATE_TIMEOUT
	.size	rgclk_enable, .-rgclk_enable
	.comm	clk_gate_ops,8,4
	.comm	RGATE_TIMEOUT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
