	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function epit_attach
_epit_attach:                           ## @epit_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %r15
	movl	%r14d, 8(%rax)
	movl	$0, -28(%rbp)
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-28(%rbp), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	callq	_imx_ccm_ipg_hz
	movl	%eax, (%r15)
	movq	_EPIT_CR@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_WR4
	movq	_EPIT_CR_CLKSRC_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$129, %edx
	shll	%cl, %edx
	movq	_EPIT_CR_ENMOD@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_EPIT_CR_RLD@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_EPIT_CR_STOPEN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_EPIT_CR_WAITEN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_EPIT_CR_DBGEN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, 4(%r15)
	movl	(%r14), %esi
	movq	_EPIT_CR_SWR@GOTPCREL(%rip), %rbx
	orl	(%rbx), %edx
	movq	%r15, %rdi
	callq	_WR4B
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_RD4
	testl	%eax, (%rbx)
	jne	LBB0_3
## %bb.4:
	movl	8(%r15), %edi
	callq	_device_get_unit
	movq	%r15, %rdi
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	callq	_epit_et_attach
	jmp	LBB0_7
LBB0_1:
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_5:
	callq	_epit_tc_attach
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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 registers\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_EPIT_CR,4,2                    ## @EPIT_CR
	.comm	_EPIT_CR_CLKSRC_SHIFT,4,2       ## @EPIT_CR_CLKSRC_SHIFT
	.comm	_EPIT_CR_ENMOD,4,2              ## @EPIT_CR_ENMOD
	.comm	_EPIT_CR_RLD,4,2                ## @EPIT_CR_RLD
	.comm	_EPIT_CR_STOPEN,4,2             ## @EPIT_CR_STOPEN
	.comm	_EPIT_CR_WAITEN,4,2             ## @EPIT_CR_WAITEN
	.comm	_EPIT_CR_DBGEN,4,2              ## @EPIT_CR_DBGEN
	.comm	_EPIT_CR_SWR,4,2                ## @EPIT_CR_SWR
	.no_dead_strip	_epit_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function epit_attach
_epit_attach:                           ; @epit_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	x20, x0
	bl	_device_get_softc
	mov	x19, x0
	str	w20, [x0, #8]
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, _SYS_RES_MEMORY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_bus_alloc_resource_any
	str	x0, [x19, #16]
	cbz	x0, LBB0_5
; %bb.1:
	bl	_imx_ccm_ipg_hz
	str	w0, [x19]
Lloh6:
	adrp	x20, _EPIT_CR@GOTPAGE
Lloh7:
	ldr	x20, [x20, _EPIT_CR@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_WR4
Lloh8:
	adrp	x8, _EPIT_CR_CLKSRC_SHIFT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EPIT_CR_CLKSRC_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	mov	w9, #129
	lsl	w8, w9, w8
Lloh11:
	adrp	x9, _EPIT_CR_ENMOD@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EPIT_CR_ENMOD@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh14:
	adrp	x9, _EPIT_CR_RLD@GOTPAGE
Lloh15:
	ldr	x9, [x9, _EPIT_CR_RLD@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh17:
	adrp	x9, _EPIT_CR_STOPEN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _EPIT_CR_STOPEN@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh20:
	adrp	x9, _EPIT_CR_WAITEN@GOTPAGE
Lloh21:
	ldr	x9, [x9, _EPIT_CR_WAITEN@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh23:
	adrp	x9, _EPIT_CR_DBGEN@GOTPAGE
Lloh24:
	ldr	x9, [x9, _EPIT_CR_DBGEN@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #4]
	ldr	w1, [x20]
Lloh26:
	adrp	x21, _EPIT_CR_SWR@GOTPAGE
Lloh27:
	ldr	x21, [x21, _EPIT_CR_SWR@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_WR4B
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20]
	mov	x0, x19
	bl	_RD4
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_2
; %bb.3:
	ldr	w0, [x19, #8]
	bl	_device_get_unit
	cbz	x0, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_epit_et_attach
	b	LBB0_7
LBB0_5:
	ldr	w0, [x19, #8]
Lloh28:
	adrp	x1, l_.str@PAGE
Lloh29:
	add	x1, x1, l_.str@PAGEOFF
	bl	_device_printf
Lloh30:
	adrp	x8, _ENXIO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_epit_tc_attach
LBB0_7:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.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 registers\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_EPIT_CR,4,2                    ; @EPIT_CR
	.comm	_EPIT_CR_CLKSRC_SHIFT,4,2       ; @EPIT_CR_CLKSRC_SHIFT
	.comm	_EPIT_CR_ENMOD,4,2              ; @EPIT_CR_ENMOD
	.comm	_EPIT_CR_RLD,4,2                ; @EPIT_CR_RLD
	.comm	_EPIT_CR_STOPEN,4,2             ; @EPIT_CR_STOPEN
	.comm	_EPIT_CR_WAITEN,4,2             ; @EPIT_CR_WAITEN
	.comm	_EPIT_CR_DBGEN,4,2              ; @EPIT_CR_DBGEN
	.comm	_EPIT_CR_SWR,4,2                ; @EPIT_CR_SWR
	.no_dead_strip	_epit_attach
.subsections_via_symbols
