	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra124_cpufreq_attach
_tegra124_cpufreq_attach:               ## @tegra124_cpufreq_attach
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %rbx
	movl	%r14d, 48(%rax)
	movl	%r14d, %edi
	callq	_device_get_parent
	movl	%eax, %edi
	callq	_ofw_bus_get_node
	movl	%eax, 28(%rbx)
	movq	_tegra_sku_info@GOTPCREL(%rip), %rcx
	movl	12(%rcx), %edx
	movl	%edx, 44(%rbx)
	movq	(%rcx), %rdx
	movq	%rdx, (%rbx)
	movl	8(%rcx), %ecx
	movl	%ecx, 40(%rbx)
	movq	_tegra124_cpu_volt_pllx_def@GOTPCREL(%rip), %rcx
	movq	%rcx, 32(%rbx)
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_get_fdt_resources
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movq	%rbx, %rdi
	callq	_build_speed_points
	movl	24(%rbx), %edi
	leaq	-36(%rbp), %rsi
	callq	_clk_get_freq
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_3
LBB0_4:
	movq	(%rbx), %r15
	movq	_cpu_max_freq@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_nitems
	movq	(%r12), %rcx
	cmpq	%rax, %r15
	jae	LBB0_6
## %bb.5:
	movq	(%rbx), %rax
	leaq	(%rcx,%rax,8), %rcx
LBB0_6:
	movq	(%rcx), %rax
	movq	%rax, 16(%rbx)
	movl	-36(%rbp), %esi
	movq	%rbx, %rdi
	callq	_get_speed_point
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	movl	$1632000000, %esi               ## imm = 0x61465800
	callq	_set_cpu_freq
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
LBB0_3:
	movl	%r14d, %edi
	callq	_device_printf
LBB0_9:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	%r14d, %edi
	callq	_cpufreq_register
	xorl	%r15d, %r15d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_tegra_sku_info,16,3            ## @tegra_sku_info
	.comm	_tegra124_cpu_volt_pllx_def,4,2 ## @tegra124_cpu_volt_pllx_def
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't get CPU clock frequency\n"

	.comm	_cpu_max_freq,8,3               ## @cpu_max_freq
L_.str.1:                               ## @.str.1
	.asciz	"Can't set initial CPU clock frequency\n"

	.comm	_tegra124_cpu_volt_dpll_def,4,2 ## @tegra124_cpu_volt_dpll_def
	.no_dead_strip	_tegra124_cpufreq_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra124_cpufreq_attach
_tegra124_cpufreq_attach:               ; @tegra124_cpufreq_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #48]
	mov	x0, x19
	bl	_device_get_parent
	bl	_ofw_bus_get_node
	mov	x1, x0
	str	w0, [x20, #28]
Lloh0:
	adrp	x8, _tegra_sku_info@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tegra_sku_info@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x9, [x20]
	ldr	d0, [x8, #8]
	str	d0, [x20, #40]
Lloh2:
	adrp	x8, _tegra124_cpu_volt_pllx_def@GOTPAGE
Lloh3:
	ldr	x8, [x8, _tegra124_cpu_volt_pllx_def@GOTPAGEOFF]
	str	x8, [x20, #32]
	mov	x0, x20
	bl	_get_fdt_resources
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.1:
	mov	x0, x20
	bl	_build_speed_points
	ldr	w0, [x20, #24]
	add	x1, sp, #12
	bl	_clk_get_freq
	cbz	w0, LBB0_3
; %bb.2:
	mov	x21, x0
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_3:
	ldr	x21, [x20]
Lloh6:
	adrp	x22, _cpu_max_freq@GOTPAGE
Lloh7:
	ldr	x22, [x22, _cpu_max_freq@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_nitems
	ldr	x8, [x22]
	cmp	x21, x0
	b.hs	LBB0_5
; %bb.4:
	ldr	x9, [x20]
	add	x8, x8, x9, lsl #3
LBB0_5:
	ldr	x8, [x8]
	str	x8, [x20, #16]
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	_get_speed_point
	str	w0, [x20, #8]
	mov	x0, x20
	mov	w1, #22528
	movk	w1, #24902, lsl #16
	bl	_set_cpu_freq
	mov	x21, x0
	cbz	w0, LBB0_9
; %bb.6:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_device_printf
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_9:
	mov	x0, x19
	bl	_cpufreq_register
	b	LBB0_8
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_tegra_sku_info,16,3            ; @tegra_sku_info
	.comm	_tegra124_cpu_volt_pllx_def,4,2 ; @tegra124_cpu_volt_pllx_def
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't get CPU clock frequency\n"

	.comm	_cpu_max_freq,8,3               ; @cpu_max_freq
l_.str.1:                               ; @.str.1
	.asciz	"Can't set initial CPU clock frequency\n"

	.comm	_tegra124_cpu_volt_dpll_def,4,2 ; @tegra124_cpu_volt_dpll_def
	.no_dead_strip	_tegra124_cpufreq_attach
.subsections_via_symbols
