	.file	"extr_clk-core.c_sclk_get_parent.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sclk_get_parent, @function
sclk_get_parent:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	clkhw_to_sys_clk@PLT
	mov	edi, DWORD PTR 8[rax]
	mov	r13, rax
	call	readl@PLT
	mov	rcx, QWORD PTR OSC_CUR_SHIFT[rip]
	shr	rax, cl
	and	rax, QWORD PTR OSC_CUR_MASK[rip]
	cmp	QWORD PTR 0[r13], 0
	mov	rbx, rax
	je	.L5
	xor	r12d, r12d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdx, QWORD PTR 0[r13]
	cmp	QWORD PTR [rdx+r12*8], rbx
	je	.L1
	add	r12, 1
.L3:
	mov	rdi, rbp
	call	clk_hw_get_num_parents@PLT
	cmp	rax, r12
	ja	.L4
	mov	r12, QWORD PTR EINVAL[rip]
	neg	r12
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	r12, rax
	pop	rbx
	.cfi_def_cfa_offset 32
	mov	rax, r12
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	sclk_get_parent, .-sclk_get_parent
	.comm	OSC_CUR_SHIFT,8,8
	.comm	OSC_CUR_MASK,8,8
	.comm	EINVAL,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_clk-core.c_sclk_get_parent.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sclk_get_parent, %function
sclk_get_parent:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	bl	clkhw_to_sys_clk
	mov	r5, r0
	ldr	r0, [r0, #4]
	bl	readl
	ldr	r3, .L9
	ldr	r1, .L9+4
	ldr	r2, [r5]
	ldr	r3, [r3]
	ldr	r7, [r1]
	cmp	r2, #0
	movne	r4, #0
	and	r7, r7, r0, lsr r3
	bne	.L3
	b	.L8
.L4:
	ldr	r3, [r5]
	ldr	r3, [r3, r4, lsl #2]
	cmp	r3, r7
	beq	.L1
	add	r4, r4, #1
.L3:
	mov	r0, r6
	bl	clk_hw_get_num_parents
	cmp	r0, r4
	bhi	.L4
	ldr	r3, .L9+8
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	mov	r4, r7
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	.align	2
.L9:
	.word	OSC_CUR_SHIFT
	.word	OSC_CUR_MASK
	.word	EINVAL
	.size	sclk_get_parent, .-sclk_get_parent
	.comm	OSC_CUR_SHIFT,4,4
	.comm	OSC_CUR_MASK,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
