	.file	"extr_cuboot-acadia.c_get_clocks.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"serial0"
.LC1:
	.string	"current-speed"
.LC2:
	.string	"no current-speed property\n\r"
.LC3:
	.string	"/plb/ebc"
.LC4:
	.string	"/plb/opb"
.LC5:
	.string	"/plb/opb/serial@ef600300"
.LC6:
	.string	"/plb/opb/serial@ef600400"
	.text
	.p2align 4
	.type	get_clocks, @function
get_clocks:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	edi, 2147483648
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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
	mov	ebx, 66666666
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	in_8@PLT
	mov	edi, DWORD PTR DCRN_CPR0_PLLD[rip]
	cmp	eax, 12
	mov	eax, 33333000
	cmove	rax, rbx
	mov	rbp, rax
	call	CPR0_READ@PLT
	mov	edi, DWORD PTR DCRN_CPR0_PLLC[rip]
	mov	r14, rax
	call	CPR0_READ@PLT
	mov	r15, QWORD PTR PLLD_FWDVB_MASK[rip]
	mov	rbx, QWORD PTR PLLD_FBDV_MASK[rip]
	mov	QWORD PTR 8[rsp], rax
	mov	eax, 8
	mov	edi, DWORD PTR DCRN_CPR0_PRIMAD[rip]
	and	r15, r14
	mov	r13, QWORD PTR PLLD_FWDVA_MASK[rip]
	shr	r15, 8
	cmove	r15, rax
	and	rbx, r14
	mov	eax, 256
	shr	rbx, 24
	cmove	rbx, rax
	call	CPR0_READ@PLT
	mov	rsi, QWORD PTR 8[rsp]
	mov	rcx, rax
	mov	eax, 16
	mov	rdi, rcx
	and	rdi, QWORD PTR PRIMAD_EBCDV_MASK[rip]
	cmove	rdi, rax
	and	rcx, QWORD PTR PRIMAD_OPBDV_MASK[rip]
	shr	rcx, 8
	cmove	rcx, rax
	imul	rbx, rbp
	xor	edx, edx
	and	r13, r14
	shr	r13, 16
	mov	rax, rbx
	div	rcx
	xor	edx, edx
	mov	rbp, rax
	mov	rax, rbx
	div	rdi
	test	QWORD PTR PLLC_SRC_MASK[rip], rsi
	mov	rdx, r13
	lea	rdi, .LC0[rip]
	cmovne	rdx, r15
	imul	rbx, rdx
	xor	edx, edx
	mov	r12, rax
	mov	rax, rbx
	div	r15
	mov	rbx, rax
	call	find_node_by_alias@PLT
	lea	rdx, 16[rsp]
	mov	ecx, 8
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	getprop@PLT
	cmp	eax, 8
	je	.L8
	lea	rdi, .LC2[rip]
	call	fatal@PLT
.L8:
	mov	rcx, QWORD PTR 16[rsp]
	mov	rax, rbx
	xor	edx, edx
	sal	rcx, 4
	div	rcx
	xor	edx, edx
	mov	rsi, rax
	mov	rax, rbx
	div	rbp
	lea	r9, [rax+rax]
	cmp	r9, 255
	ja	.L17
	mov	edi, esi
	mov	r10d, 256
	mov	r8d, 256
	mov	ecx, 256
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L28:
	cmp	dx, r8w
	jnb	.L12
	mov	r10, rcx
	mov	r8d, edx
.L12:
	sub	rcx, 1
	cmp	r9, rcx
	je	.L27
.L13:
	xor	edx, edx
	mov	rax, rsi
	div	rcx
	mov	edx, edi
	movzx	eax, ax
	imul	rax, rcx
	mov	r11d, eax
	sub	edx, eax
	sub	r11d, edi
	cmp	rsi, rax
	cmovb	edx, r11d
	test	dx, dx
	jne	.L28
.L9:
	xor	edx, edx
	mov	rax, rbx
	mov	esi, DWORD PTR bd[rip+4]
	mov	edi, DWORD PTR bd[rip+8]
	div	rcx
	mov	edx, DWORD PTR bd[rip]
	mov	r13, rax
	call	dt_fixup_cpu_clocks@PLT
	mov	rsi, r12
	lea	rdi, .LC3[rip]
	call	dt_fixup_clock@PLT
	mov	rsi, rbp
	lea	rdi, .LC4[rip]
	call	dt_fixup_clock@PLT
	mov	rsi, r13
	lea	rdi, .LC5[rip]
	call	dt_fixup_clock@PLT
	mov	rsi, r13
	lea	rdi, .LC6[rip]
	call	dt_fixup_clock@PLT
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L29
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L27:
	.cfi_restore_state
	mov	rcx, r10
	jmp	.L9
.L17:
	mov	ecx, 256
	jmp	.L9
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	get_clocks, .-get_clocks
	.comm	bd,12,8
	.comm	PRIMAD_PLBDV_MASK,8,8
	.comm	PRIMAD_OPBDV_MASK,8,8
	.comm	PRIMAD_EBCDV_MASK,8,8
	.comm	PLLD_FWDVB_MASK,8,8
	.comm	PLLD_FWDVA_MASK,8,8
	.comm	PLLD_FBDV_MASK,8,8
	.comm	PLLC_SRC_MASK,8,8
	.comm	DCRN_CPR0_PRIMAD,4,4
	.comm	DCRN_CPR0_PLLD,4,4
	.comm	DCRN_CPR0_PLLC,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_cuboot-acadia.c_get_clocks.c"
	.text
	.global	__aeabi_uidiv
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"serial0\000"
	.align	2
.LC1:
	.ascii	"current-speed\000"
	.align	2
.LC2:
	.ascii	"no current-speed property\012\015\000"
	.align	2
.LC3:
	.ascii	"/plb/ebc\000"
	.align	2
.LC4:
	.ascii	"/plb/opb\000"
	.align	2
.LC5:
	.ascii	"/plb/opb/serial@ef600300\000"
	.align	2
.LC6:
	.ascii	"/plb/opb/serial@ef600400\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_clocks, %function
get_clocks:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L30
	sub	sp, sp, #20
	mov	r0, #-2147483648
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	in_8
	mov	r9, r0
	ldr	r2, .L30+4
	ldr	r3, .L30+8
	ldr	r4, .L30+12
	cmp	r9, #12
	ldr	r0, [r2]
	moveq	r9, r4
	movne	r9, r3
	bl	CPR0_READ
	ldr	r3, .L30+16
	mov	r5, r0
	ldr	r0, [r3]
	bl	CPR0_READ
	ldr	r2, .L30+20
	ldr	r3, .L30+24
	ldr	r7, [r2]
	ldr	r4, [r3]
	ldr	r2, .L30+28
	and	r7, r7, r5
	lsrs	r7, r7, #8
	ldr	r3, .L30+32
	and	r4, r4, r5
	mov	r8, r0
	moveq	r7, #8
	ldr	r0, [r2]
	lsrs	r4, r4, #24
	moveq	r4, #256
	ldr	r6, [r3]
	bl	CPR0_READ
	mov	r3, r0
	ldr	r2, .L30+36
	ldr	r1, .L30+40
	mul	r4, r9, r4
	ldr	r10, [r1]
	ldr	r1, [r2]
	ands	r10, r0, r10
	and	r3, r3, r1
	moveq	r10, #16
	lsrs	r3, r3, #8
	movne	r1, r3
	moveq	r1, #16
	mov	r0, r4
	bl	__aeabi_uidiv
	mov	r9, r0
	mov	r1, r10
	mov	r0, r4
	str	r9, [sp]
	bl	__aeabi_uidiv
	ldr	r3, .L30+44
	str	r0, [sp, #4]
	ldr	r3, [r3]
	mov	r1, r7
	tst	r8, r3
	movne	r0, r7
	andeq	r0, r6, r5
	lsreq	r0, r0, #16
	mul	r0, r4, r0
	bl	__aeabi_uidiv
	mov	r8, r0
	ldr	r0, .L30+48
	bl	find_node_by_alias
	mov	r3, #4
	ldr	r1, .L30+52
	add	r2, sp, #8
	bl	getprop
	cmp	r0, #4
	beq	.L8
	ldr	r0, .L30+56
	bl	fatal
.L8:
	ldr	r1, [sp, #8]
	mov	r0, r8
	lsl	r1, r1, #4
	bl	__aeabi_uidiv
	ldr	r1, [sp]
	mov	fp, r0
	mov	r0, r8
	bl	__aeabi_uidiv
	lsl	r5, r0, #1
	cmp	r5, #255
	bhi	.L17
	mov	r9, #256
	lsl	r6, fp, #16
	mov	r4, r9
	mov	r10, r9
	ldr	r7, .L30+60
	lsr	r6, r6, #16
	b	.L13
.L28:
	cmp	r3, r4
	movcc	r9, r10
	sub	r10, r10, #1
	movcc	r4, r3
	cmp	r5, r10
	beq	.L27
.L13:
	mov	r1, r10
	mov	r0, fp
	bl	__aeabi_uidiv
	and	r3, r0, r7
	mul	r3, r10, r3
	cmp	fp, r3
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	subcc	r3, r3, r6
	subcs	r3, r6, r3
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	cmp	r3, #0
	bne	.L28
.L9:
	mov	r1, r10
	mov	r0, r8
	bl	__aeabi_uidiv
	mov	r4, r0
	ldr	r3, .L30+64
	ldr	r2, [r3]
	ldr	r1, [r3, #4]
	ldr	r0, [r3, #8]
	bl	dt_fixup_cpu_clocks
	ldr	r1, [sp, #4]
	ldr	r0, .L30+68
	bl	dt_fixup_clock
	ldr	r1, [sp]
	ldr	r0, .L30+72
	bl	dt_fixup_clock
	mov	r1, r4
	ldr	r0, .L30+76
	bl	dt_fixup_clock
	mov	r1, r4
	ldr	r0, .L30+80
	bl	dt_fixup_clock
	ldr	r3, .L30
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L29
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L27:
	mov	r10, r9
	b	.L9
.L17:
	mov	r10, #256
	b	.L9
.L29:
	bl	__stack_chk_fail
.L31:
	.align	2
.L30:
	.word	.LC7
	.word	DCRN_CPR0_PLLD
	.word	33333000
	.word	66666666
	.word	DCRN_CPR0_PLLC
	.word	PLLD_FWDVB_MASK
	.word	PLLD_FBDV_MASK
	.word	DCRN_CPR0_PRIMAD
	.word	PLLD_FWDVA_MASK
	.word	PRIMAD_OPBDV_MASK
	.word	PRIMAD_EBCDV_MASK
	.word	PLLC_SRC_MASK
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	65535
	.word	bd
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	get_clocks, .-get_clocks
	.comm	bd,12,4
	.comm	PRIMAD_PLBDV_MASK,4,4
	.comm	PRIMAD_OPBDV_MASK,4,4
	.comm	PRIMAD_EBCDV_MASK,4,4
	.comm	PLLD_FWDVB_MASK,4,4
	.comm	PLLD_FWDVA_MASK,4,4
	.comm	PLLD_FBDV_MASK,4,4
	.comm	PLLC_SRC_MASK,4,4
	.comm	DCRN_CPR0_PRIMAD,4,4
	.comm	DCRN_CPR0_PLLD,4,4
	.comm	DCRN_CPR0_PLLC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
