	.file	"extr_tegra124_cpufreq.c_tegra124_cpufreq_settings.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	tegra124_cpufreq_settings, @function
tegra124_cpufreq_settings:
.LFB0:
	.cfi_startproc
	endbr64
	test	rsi, rsi
	je	.L12
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	eax, DWORD PTR EINVAL[rip]
	test	rdx, rdx
	je	.L1
	mov	rbx, rsi
	mov	ebp, edi
	call	device_get_softc@PLT
	mov	edx, DWORD PTR 0[r13]
	mov	esi, DWORD PTR CPUFREQ_VAL_UNKNOWN[rip]
	mov	rdi, rbx
	mov	r12, rax
	sal	edx, 4
	call	memset@PLT
	mov	esi, DWORD PTR 0[r13]
	mov	edi, DWORD PTR [r12]
	call	min@PLT
	mov	edx, DWORD PTR [r12]
	test	edx, edx
	jle	.L8
	mov	rsi, QWORD PTR 16[r12]
	movsx	rax, edx
	mov	r8d, DWORD PTR 4[r12]
	sal	rax, 3
	lea	rdi, -8[rsi+rax]
	lea	rcx, [rsi+rax]
	xor	esi, esi
	lea	eax, -1[rdx]
	sal	rax, 3
	sub	rdi, rax
	.p2align 4,,10
	.p2align 3
.L7:
	mov	r9d, DWORD PTR -8[rcx]
	cmp	r8d, r9d
	jl	.L6
	movsx	rdx, r9d
	movsx	rax, esi
	sar	r9d, 31
	add	esi, 1
	imul	rdx, rdx, 1125899907
	sal	rax, 4
	add	rax, rbx
	sar	rdx, 50
	sub	edx, r9d
	mov	DWORD PTR [rax], edx
	movsx	rdx, DWORD PTR -4[rcx]
	mov	r9, rdx
	imul	rdx, rdx, 274877907
	sar	r9d, 31
	sar	rdx, 38
	sub	edx, r9d
	mov	DWORD PTR 4[rax], edx
	mov	edx, DWORD PTR 8[r12]
	mov	DWORD PTR 8[rax], ebp
	mov	DWORD PTR 12[rax], edx
.L6:
	sub	rcx, 8
	cmp	rcx, rdi
	jne	.L7
.L5:
	mov	DWORD PTR 0[r13], esi
	xor	eax, eax
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 40
	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
.L12:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	mov	eax, DWORD PTR EINVAL[rip]
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -40
	.cfi_offset 6, -32
	.cfi_offset 12, -24
	.cfi_offset 13, -16
	xor	esi, esi
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	tegra124_cpufreq_settings, .-tegra124_cpufreq_settings
	.comm	EINVAL,4,4
	.comm	CPUFREQ_VAL_UNKNOWN,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_tegra124_cpufreq.c_tegra124_cpufreq_settings.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tegra124_cpufreq_settings, %function
tegra124_cpufreq_settings:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	clz	lr, r2
	cmp	r1, #0
	lsr	lr, lr, #5
	movne	r8, lr
	moveq	r8, #1
	cmp	r8, #0
	beq	.L2
	ldr	r3, .L11
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r4, r1
	mov	r7, r2
	mov	r6, r0
	bl	device_get_softc
	mov	r5, r0
	ldr	r3, .L11+4
	ldr	r2, [r7]
	ldr	r1, [r3]
	lsl	r2, r2, #4
	mov	r0, r4
	bl	memset
	ldr	r0, [r5]
	ldr	r1, [r7]
	bl	min
	ldr	ip, [r5]
	mov	lr, r8
	cmp	ip, #0
	ble	.L4
	ldr	r1, [r5, #12]
	ldr	r0, [r5, #4]
	ldr	r9, .L11+8
	ldr	r8, .L11+12
	add	ip, r1, ip, lsl #3
.L6:
	ldr	r3, [ip, #-8]
	add	r2, r4, lr, lsl #4
	cmp	r0, r3
	blt	.L5
	smull	fp, r10, r9, r3
	asr	r3, r3, #31
	rsb	r3, r3, r10, asr #18
	str	r3, [r4, lr, lsl #4]
	ldr	r3, [ip, #-4]
	add	lr, lr, #1
	smull	r10, fp, r8, r3
	ldr	r10, [r5, #8]
	asr	r3, r3, #31
	rsb	r3, r3, fp, asr #6
	stmib	r2, {r3, r6, r10}
.L5:
	sub	ip, ip, #8
	cmp	ip, r1
	bne	.L6
.L4:
	mov	r0, #0
	str	lr, [r7]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	.align	2
.L11:
	.word	EINVAL
	.word	CPUFREQ_VAL_UNKNOWN
	.word	1125899907
	.word	274877907
	.size	tegra124_cpufreq_settings, .-tegra124_cpufreq_settings
	.comm	EINVAL,4,4
	.comm	CPUFREQ_VAL_UNKNOWN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
