	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm2835_cpufreq_get
_bcm2835_cpufreq_get:                   ## @bcm2835_cpufreq_get
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_device_get_softc
	movq	%rax, %r12
	movq	_CPUFREQ_VAL_UNKNOWN@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	movq	%rbx, %rdi
	movl	$40, %edx
	callq	_memset
	movq	$0, (%rbx)
	movq	%r12, %rdi
	callq	_VC_LOCK
	movq	_BCM2835_MBOX_CLOCK_ID_ARM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_bcm2835_cpufreq_get_clock_rate
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_VC_UNLOCK
	testl	%r15d, %r15d
	js	LBB0_3
## %bb.4:
	movl	%r15d, %edi
	callq	_HZ2MHZ
	movl	%eax, 32(%rbx)
	movq	(%r13), %rax
	movq	%rax, 24(%rbx)
	movq	%rax, 16(%rbx)
	movq	_TRANSITION_LATENCY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%r14, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_device_printf
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CPUFREQ_VAL_UNKNOWN,8,3        ## @CPUFREQ_VAL_UNKNOWN
	.comm	_BCM2835_MBOX_CLOCK_ID_ARM,4,2  ## @BCM2835_MBOX_CLOCK_ID_ARM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't get clock\n"

	.comm	_TRANSITION_LATENCY,4,2         ## @TRANSITION_LATENCY
	.no_dead_strip	_bcm2835_cpufreq_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm2835_cpufreq_get
_bcm2835_cpufreq_get:                   ; @bcm2835_cpufreq_get
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x1, LBB0_4
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	bl	_device_get_softc
	mov	x22, x0
Lloh0:
	adrp	x23, _CPUFREQ_VAL_UNKNOWN@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CPUFREQ_VAL_UNKNOWN@GOTPAGEOFF]
	ldr	x1, [x23]
	mov	x0, x20
	mov	w2, #40
	bl	_memset
	str	xzr, [x20]
	mov	x0, x22
	bl	_VC_LOCK
Lloh2:
	adrp	x8, _BCM2835_MBOX_CLOCK_ID_ARM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BCM2835_MBOX_CLOCK_ID_ARM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_bcm2835_cpufreq_get_clock_rate
	mov	x21, x0
	mov	x0, x22
	bl	_VC_UNLOCK
	tbnz	w21, #31, LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_HZ2MHZ
	mov	x8, x0
	mov	w0, #0
	str	w8, [x20, #32]
	ldr	x8, [x23]
	stp	x8, x8, [x20, #16]
Lloh5:
	adrp	x8, _TRANSITION_LATENCY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TRANSITION_LATENCY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	str	x19, [x20]
	b	LBB0_5
LBB0_3:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
LBB0_4:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
LBB0_5:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CPUFREQ_VAL_UNKNOWN,8,3        ; @CPUFREQ_VAL_UNKNOWN
	.comm	_BCM2835_MBOX_CLOCK_ID_ARM,4,2  ; @BCM2835_MBOX_CLOCK_ID_ARM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't get clock\n"

	.comm	_TRANSITION_LATENCY,4,2         ; @TRANSITION_LATENCY
	.no_dead_strip	_bcm2835_cpufreq_get
.subsections_via_symbols
