	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_tmr_attach
_arm_tmr_attach:                        ## @arm_tmr_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	%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
	movl	%edi, %ebx
	callq	_device_get_softc
	movq	%rax, %r14
	movl	%ebx, 8(%rax)
	movq	_arm_tmr_freq_varies@GOTPCREL(%rip), %r13
	movq	_arm_tmr_freq@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r13), %rcx
	orq	%rax, %rcx
	jne	LBB0_4
## %bb.1:
	movl	%ebx, %edi
	callq	_ofw_bus_get_node
	leaq	L_.str(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movl	%eax, %edi
	movl	$8, %ecx
	callq	_OF_getencprop
	testq	%rax, %rax
	jle	LBB0_2
## %bb.3:
	movq	-48(%rbp), %rax
LBB0_4:
	movq	%rax, 16(%r14)
	movq	_compat_data@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_ofw_bus_search_compatible
	movl	(%rax), %r12d
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_TMR_GBL@GOTPCREL(%rip), %rax
	movl	%ebx, %r15d
	testl	%r12d, (%rax)
	je	LBB0_10
## %bb.5:
	cmpq	$0, (%r13)
	je	LBB0_6
## %bb.7:
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	%ebx, %r15d
	je	LBB0_9
## %bb.8:
	movl	8(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_device_printf
	movl	%ebx, %r15d
	jmp	LBB0_9
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_15
LBB0_6:
	movq	%r14, %rdi
	callq	_attach_tc
	movl	%eax, %r15d
LBB0_9:
	incl	4(%r14)
	incl	(%r14)
LBB0_10:
	movq	_TMR_PRV@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	callq	_attach_et
	movl	%eax, %ebx
LBB0_12:
	testl	%ebx, %ebx
	je	LBB0_14
## %bb.13:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_14:
	testl	%r15d, %r15d
	cmovel	%r15d, %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_arm_tmr_freq_varies,8,3        ## @arm_tmr_freq_varies
	.comm	_arm_tmr_freq,8,3               ## @arm_tmr_freq
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"clock-frequency"

L_.str.1:                               ## @.str.1
	.asciz	"missing clock-frequency attribute in FDT\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_compat_data,4,2                ## @compat_data
	.comm	_TMR_GBL,4,2                    ## @TMR_GBL
	.comm	_bootverbose,8,3                ## @bootverbose
L_.str.2:                               ## @.str.2
	.asciz	"not using variable-frequency device as timecounter\n"

	.comm	_TMR_PRV,4,2                    ## @TMR_PRV
	.comm	_arm_tmr_delay,4,2              ## @arm_tmr_delay
	.no_dead_strip	_arm_tmr_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_tmr_attach
_arm_tmr_attach:                        ; @arm_tmr_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x0
	bl	_device_get_softc
	mov	x19, x0
Lloh0:
	adrp	x23, _arm_tmr_freq_varies@GOTPAGE
Lloh1:
	ldr	x23, [x23, _arm_tmr_freq_varies@GOTPAGEOFF]
	str	w20, [x0, #8]
	ldr	x9, [x23]
Lloh2:
	adrp	x8, _arm_tmr_freq@GOTPAGE
Lloh3:
	ldr	x8, [x8, _arm_tmr_freq@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	orr	x9, x9, x8
	cbnz	x9, LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_ofw_bus_get_node
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	mov	w3, #8
	bl	_OF_getencprop
	cmp	x0, #0
	b.le	LBB0_7
; %bb.2:
	ldr	x8, [sp, #8]
LBB0_3:
	str	x8, [x19, #16]
Lloh7:
	adrp	x8, _compat_data@GOTPAGE
Lloh8:
	ldr	x8, [x8, _compat_data@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ofw_bus_search_compatible
	ldr	w24, [x0]
Lloh10:
	adrp	x22, _ENXIO@GOTPAGE
Lloh11:
	ldr	x22, [x22, _ENXIO@GOTPAGEOFF]
	ldr	w20, [x22]
Lloh12:
	adrp	x8, _TMR_GBL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TMR_GBL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	mov	x21, x20
	tst	w8, w24
	b.eq	LBB0_10
; %bb.4:
	ldr	x8, [x23]
	cbz	x8, LBB0_8
; %bb.5:
Lloh15:
	adrp	x8, _bootverbose@GOTPAGE
Lloh16:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	mov	x21, x20
	cbz	x8, LBB0_9
; %bb.6:
	ldr	w0, [x19, #8]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_device_printf
	mov	x21, x20
	b	LBB0_9
LBB0_7:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_device_printf
Lloh22:
	adrp	x8, _ENXIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	b	LBB0_13
LBB0_8:
	mov	x0, x19
	bl	_attach_tc
	mov	x21, x0
LBB0_9:
	ldr	d0, [x19]
	movi.2s	v1, #1
	add.2s	v0, v0, v1
	str	d0, [x19]
LBB0_10:
Lloh25:
	adrp	x8, _TMR_PRV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _TMR_PRV@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	tst	w8, w24
	b.eq	LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_attach_et
	mov	x20, x0
LBB0_12:
	cmp	w20, #0
	ccmp	w21, #0, #4, ne
	ldr	w8, [x22]
	csel	w0, w8, wzr, ne
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_arm_tmr_freq_varies,8,3        ; @arm_tmr_freq_varies
	.comm	_arm_tmr_freq,8,3               ; @arm_tmr_freq
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"clock-frequency"

l_.str.1:                               ; @.str.1
	.asciz	"missing clock-frequency attribute in FDT\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_compat_data,4,2                ; @compat_data
	.comm	_TMR_GBL,4,2                    ; @TMR_GBL
	.comm	_bootverbose,8,3                ; @bootverbose
l_.str.2:                               ; @.str.2
	.asciz	"not using variable-frequency device as timecounter\n"

	.comm	_TMR_PRV,4,2                    ; @TMR_PRV
	.comm	_arm_tmr_delay,4,2              ; @arm_tmr_delay
	.no_dead_strip	_arm_tmr_attach
.subsections_via_symbols
