	.file	"extr_prcm.c_PRCMPeripheralClockGet.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	PRCMPeripheralClockGet
	.type	PRCMPeripheralClockGet, @function
PRCMPeripheralClockGet:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	QWORD PTR PRCM_SSPI[rip], rdi
	sete	dl
	cmp	QWORD PTR PRCM_LSPI[rip], rdi
	sete	al
	or	dl, al
	jne	.L8
	cmp	QWORD PTR PRCM_GSPI[rip], rdi
	je	.L8
	cmp	QWORD PTR PRCM_CAMERA[rip], rdi
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	je	.L13
	cmp	QWORD PTR PRCM_SDHOST[rip], rdi
	mov	rax, QWORD PTR SYS_CLK[rip]
	je	.L14
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore 3
	mov	rax, QWORD PTR XTAL_CLK[rip]
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rdi, QWORD PTR APPS_RCM_O_MMCHS_CLK_GEN[rip]
	add	rdi, QWORD PTR ARCM_BASE[rip]
	call	HWREG@PLT
	mov	rdi, QWORD PTR APPS_RCM_O_MMCHS_CLK_GEN[rip]
	add	rdi, QWORD PTR ARCM_BASE[rip]
	sar	eax, 8
	mov	ebx, eax
	call	HWREG@PLT
	and	ebx, 7
	movzx	eax, al
.L6:
	lea	rcx, 2[rbx+rax]
	xor	edx, edx
	mov	eax, 240000000
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	div	rcx
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	rdi, QWORD PTR APPS_RCM_O_CAMERA_CLK_GEN[rip]
	add	rdi, QWORD PTR ARCM_BASE[rip]
	call	HWREG@PLT
	mov	rdi, QWORD PTR APPS_RCM_O_CAMERA_CLK_GEN[rip]
	add	rdi, QWORD PTR ARCM_BASE[rip]
	sar	eax, 8
	mov	ebx, eax
	call	HWREG@PLT
	and	ebx, 7
	movzx	eax, al
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	PRCMPeripheralClockGet, .-PRCMPeripheralClockGet
	.comm	XTAL_CLK,8,8
	.comm	SYS_CLK,8,8
	.comm	PRCM_SSPI,8,8
	.comm	PRCM_SDHOST,8,8
	.comm	PRCM_LSPI,8,8
	.comm	PRCM_GSPI,8,8
	.comm	PRCM_CAMERA,8,8
	.comm	ARCM_BASE,8,8
	.comm	APPS_RCM_O_MMCHS_CLK_GEN,8,8
	.comm	APPS_RCM_O_CAMERA_CLK_GEN,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_prcm.c_PRCMPeripheralClockGet.c"
	.text
	.global	__aeabi_uidiv
	.global	__aeabi_idiv
	.align	2
	.global	PRCMPeripheralClockGet
	.syntax unified
	.arm
	.fpu softvfp
	.type	PRCMPeripheralClockGet, %function
PRCMPeripheralClockGet:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L15
	ldr	r3, .L15+4
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, .L15+8
	cmp	r1, r0
	cmpne	r3, r0
	moveq	r3, #1
	movne	r3, #0
	ldr	r2, [r2]
	cmp	r2, r0
	orreq	r3, r3, #1
	cmp	r3, #0
	bne	.L12
	ldr	r3, .L15+12
	push	{r4, r5, r6, lr}
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L13
	ldr	r3, .L15+16
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L14
	ldr	r3, .L15+20
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L12:
	ldr	r3, .L15+24
	ldr	r0, [r3]
	bx	lr
.L14:
	ldr	r5, .L15+28
	ldr	r4, .L15+32
.L10:
	ldr	r3, [r4]
	ldr	r0, [r5]
	add	r0, r0, r3
	bl	HWREG
	ldr	r3, [r4]
	ldr	r2, [r5]
	asr	r1, r0, #8
	add	r0, r2, r3
	and	r4, r1, #7
	bl	HWREG
	and	r1, r0, #255
	add	r1, r4, r1
	add	r1, r1, #2
	ldr	r0, .L15+36
	bl	__aeabi_uidiv
	pop	{r4, r5, r6, pc}
.L13:
	ldr	r5, .L15+28
	ldr	r4, .L15+40
	b	.L10
.L16:
	.align	2
.L15:
	.word	PRCM_LSPI
	.word	PRCM_SSPI
	.word	PRCM_GSPI
	.word	PRCM_CAMERA
	.word	PRCM_SDHOST
	.word	SYS_CLK
	.word	XTAL_CLK
	.word	ARCM_BASE
	.word	APPS_RCM_O_MMCHS_CLK_GEN
	.word	240000000
	.word	APPS_RCM_O_CAMERA_CLK_GEN
	.size	PRCMPeripheralClockGet, .-PRCMPeripheralClockGet
	.comm	XTAL_CLK,4,4
	.comm	SYS_CLK,4,4
	.comm	PRCM_SSPI,4,4
	.comm	PRCM_SDHOST,4,4
	.comm	PRCM_LSPI,4,4
	.comm	PRCM_GSPI,4,4
	.comm	PRCM_CAMERA,4,4
	.comm	ARCM_BASE,4,4
	.comm	APPS_RCM_O_MMCHS_CLK_GEN,4,4
	.comm	APPS_RCM_O_CAMERA_CLK_GEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
