	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function attach_tc
_attach_tc:                             ## @attach_tc
	.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
	movq	_arm_tmr_tc@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %r14d
	jmp	LBB0_6
LBB0_2:
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movl	%eax, -44(%rbp)
	movl	8(%rdi), %edi
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-44(%rbp), %rdx
	callq	_bus_alloc_resource_any
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_GBL_TIMER_CTRL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_tmr_gbl_write_4
	movl	4(%rbx), %eax
	movq	_arm_tmr_timecount@GOTPCREL(%rip), %r15
	movl	%eax, 8(%r15)
	movq	%rbx, (%r15)
	movq	%r15, %rdi
	callq	_tc_init
	movq	%r15, (%r12)
	movl	(%r13), %esi
	movq	_GBL_TIMER_CTRL_TIMER_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_tmr_gbl_write_4
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_arm_tmr_tc,8,3                 ## @arm_tmr_tc
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate gbl mem resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_GBL_TIMER_CTRL,4,2             ## @GBL_TIMER_CTRL
	.comm	_arm_tmr_timecount,16,3         ## @arm_tmr_timecount
	.comm	_GBL_TIMER_CTRL_TIMER_ENABLE,4,2 ## @GBL_TIMER_CTRL_TIMER_ENABLE
	.no_dead_strip	_attach_tc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function attach_tc
_attach_tc:                             ; @attach_tc
	.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
Lloh0:
	adrp	x21, _arm_tmr_tc@GOTPAGE
Lloh1:
	ldr	x21, [x21, _arm_tmr_tc@GOTPAGEOFF]
	ldr	x8, [x21]
	cbz	x8, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_2:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_3:
	mov	x19, x0
	ldr	w8, [x0]
	str	w8, [sp, #12]
	ldr	w0, [x0, #8]
Lloh4:
	adrp	x8, _SYS_RES_MEMORY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
	add	x2, sp, #12
	bl	_bus_alloc_resource_any
	str	x0, [x19, #16]
	cbz	x0, LBB0_6
; %bb.4:
Lloh10:
	adrp	x22, _GBL_TIMER_CTRL@GOTPAGE
Lloh11:
	ldr	x22, [x22, _GBL_TIMER_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_tmr_gbl_write_4
	ldr	w8, [x19, #4]
Lloh12:
	adrp	x20, _arm_tmr_timecount@GOTPAGE
Lloh13:
	ldr	x20, [x20, _arm_tmr_timecount@GOTPAGEOFF]
	str	w8, [x20, #8]
	str	x19, [x20]
	mov	x0, x20
	bl	_tc_init
	str	x20, [x21]
	ldr	w1, [x22]
Lloh14:
	adrp	x8, _GBL_TIMER_CTRL_TIMER_ENABLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GBL_TIMER_CTRL_TIMER_ENABLE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_tmr_gbl_write_4
	mov	w0, #0
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
	add	sp, sp, #64
	ret
LBB0_6:
	ldr	w0, [x19, #8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_device_printf
Lloh19:
	adrp	x8, _ENXIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_arm_tmr_tc,8,3                 ; @arm_tmr_tc
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate gbl mem resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_GBL_TIMER_CTRL,4,2             ; @GBL_TIMER_CTRL
	.comm	_arm_tmr_timecount,16,3         ; @arm_tmr_timecount
	.comm	_GBL_TIMER_CTRL_TIMER_ENABLE,4,2 ; @GBL_TIMER_CTRL_TIMER_ENABLE
	.no_dead_strip	_attach_tc
.subsections_via_symbols
