	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function epit_et_attach
_epit_et_attach:                        ## @epit_et_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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	$0, -28(%rbp)
	movl	60(%rdi), %edi
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-28(%rbp), %rdx
	callq	_bus_alloc_resource_any
	movq	%rax, 72(%rbx)
	movl	60(%rbx), %edi
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_INTR_TYPE_CLK@GOTPCREL(%rip), %rcx
	movq	_INTR_MPSAFE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_epit_intr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	64(%rbx), %rsi
	movq	%rsi, (%rsp)
	xorl	%r14d, %r14d
	movq	%rax, %rsi
	xorl	%r8d, %r8d
	movq	%rbx, %r9
	callq	_bus_setup_intr
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	movl	60(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_device_printf
	movl	%r15d, %r14d
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rsi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_5
LBB0_4:
	movq	_EPIT_CR_OCIEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 56(%rbx)
	leaq	L_.str.2(%rip), %rax
	movq	%rax, 8(%rbx)
	movq	_ET_FLAGS_ONESHOT@GOTPCREL(%rip), %rax
	movq	_ET_FLAGS_PERIODIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	8(%rbx), %rdi
	movl	%ecx, 16(%rbx)
	movl	$1000, 20(%rbx)                 ## imm = 0x3E8
	movl	(%rbx), %eax
	movl	%eax, 24(%rbx)
	movq	_epit_et_start@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movq	_epit_et_stop@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	%rbx, 40(%rbx)
	callq	_et_register
LBB0_5:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate interrupt\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_INTR_TYPE_CLK,4,2              ## @INTR_TYPE_CLK
	.comm	_INTR_MPSAFE,4,2                ## @INTR_MPSAFE
	.comm	_epit_intr,4,2                  ## @epit_intr
L_.str.1:                               ## @.str.1
	.asciz	"unable to setup the irq handler\n"

	.comm	_EPIT_CR_OCIEN,4,2              ## @EPIT_CR_OCIEN
L_.str.2:                               ## @.str.2
	.asciz	"EPIT"

	.comm	_ET_FLAGS_ONESHOT,4,2           ## @ET_FLAGS_ONESHOT
	.comm	_ET_FLAGS_PERIODIC,4,2          ## @ET_FLAGS_PERIODIC
	.comm	_ET_MIN_TICKS,8,3               ## @ET_MIN_TICKS
	.comm	_ET_MAX_TICKS,8,3               ## @ET_MAX_TICKS
	.comm	_epit_et_start,4,2              ## @epit_et_start
	.comm	_epit_et_stop,4,2               ## @epit_et_stop
	.no_dead_strip	_epit_et_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function epit_et_attach
_epit_et_attach:                        ; @epit_et_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	str	wzr, [sp, #12]
	ldr	w0, [x0, #60]
Lloh0:
	adrp	x8, _SYS_RES_IRQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYS_RES_IRQ@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
	bl	_bus_alloc_resource_any
	mov	x1, x0
	str	x0, [x19, #72]
	ldr	w0, [x19, #60]
	cbz	x1, LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _INTR_TYPE_CLK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INTR_TYPE_CLK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _INTR_MPSAFE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _INTR_MPSAFE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh12:
	adrp	x8, _epit_intr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _epit_intr@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	add	x6, x19, #64
	mov	x4, #0
	mov	x5, x19
	bl	_bus_setup_intr
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x19, #60]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_device_printf
	b	LBB0_5
LBB0_3:
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]
Lloh21:
	ldr	w20, [x8]
	b	LBB0_5
LBB0_4:
Lloh22:
	adrp	x8, _EPIT_CR_OCIEN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EPIT_CR_OCIEN@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	w9, [x19, #56]
	orr	w8, w9, w8
	str	w8, [x19, #56]
Lloh25:
	adrp	x8, l_.str.2@PAGE
Lloh26:
	add	x8, x8, l_.str.2@PAGEOFF
	mov	x0, x19
	str	x8, [x0, #8]!
Lloh27:
	adrp	x8, _ET_FLAGS_ONESHOT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ET_FLAGS_ONESHOT@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _ET_FLAGS_PERIODIC@GOTPAGE
Lloh31:
	ldr	x9, [x9, _ET_FLAGS_PERIODIC@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w8, w9, w8
	mov	w9, #1000
	stp	w8, w9, [x19, #16]
	ldr	w8, [x19]
	str	w8, [x19, #24]
Lloh33:
	adrp	x8, _epit_et_start@GOTPAGE
Lloh34:
	ldr	x8, [x8, _epit_et_start@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
Lloh36:
	adrp	x9, _epit_et_stop@GOTPAGE
Lloh37:
	ldr	x9, [x9, _epit_et_stop@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #48]
	str	x19, [x19, #40]
	bl	_et_register
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate interrupt\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_INTR_TYPE_CLK,4,2              ; @INTR_TYPE_CLK
	.comm	_INTR_MPSAFE,4,2                ; @INTR_MPSAFE
	.comm	_epit_intr,4,2                  ; @epit_intr
l_.str.1:                               ; @.str.1
	.asciz	"unable to setup the irq handler\n"

	.comm	_EPIT_CR_OCIEN,4,2              ; @EPIT_CR_OCIEN
l_.str.2:                               ; @.str.2
	.asciz	"EPIT"

	.comm	_ET_FLAGS_ONESHOT,4,2           ; @ET_FLAGS_ONESHOT
	.comm	_ET_FLAGS_PERIODIC,4,2          ; @ET_FLAGS_PERIODIC
	.comm	_ET_MIN_TICKS,8,3               ; @ET_MIN_TICKS
	.comm	_ET_MAX_TICKS,8,3               ; @ET_MAX_TICKS
	.comm	_epit_et_start,4,2              ; @epit_et_start
	.comm	_epit_et_stop,4,2               ; @epit_et_stop
	.no_dead_strip	_epit_et_attach
.subsections_via_symbols
