	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function attach_et
_attach_et:                             ## @attach_et
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_arm_tmr_et@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movl	%eax, -44(%rbp)
	movl	60(%rdi), %edi
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	leaq	-44(%rbp), %rdx
	callq	_bus_alloc_resource_any
	movq	%rax, 72(%rbx)
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	_PRV_TIMER_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_tmr_prv_write_4
	movl	4(%rbx), %eax
	movl	%eax, -48(%rbp)
	movl	60(%rbx), %edi
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	(%r14), %ecx
	leaq	-48(%rbp), %rdx
	callq	_bus_alloc_resource_any
	movq	%rax, 64(%rbx)
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movl	60(%rbx), %edi
	movq	_INTR_TYPE_CLK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_arm_tmr_intr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	-56(%rbp), %rsi
	movq	%rsi, (%rsp)
	xorl	%r14d, %r14d
	movq	%rax, %rsi
	xorl	%r8d, %r8d
	movq	%rbx, %r9
	callq	_bus_setup_intr
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:
	movl	60(%rbx), %edi
	movl	(%r15), %esi
	movl	-44(%rbp), %edx
	movq	72(%rbx), %rcx
	callq	_bus_release_resource
	movl	60(%rbx), %edi
	movl	(%r13), %esi
	movl	-48(%rbp), %edx
	movq	64(%rbx), %rcx
	callq	_bus_release_resource
	movl	60(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_8
LBB0_6:
	movl	60(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_8
LBB0_7:
	movl	60(%rbx), %edi
	movl	(%r15), %esi
	movl	-44(%rbp), %edx
	movq	72(%rbx), %rcx
	callq	_bus_release_resource
	movl	60(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_8:
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	leaq	L_.str.3(%rip), %rax
	movq	%rax, 8(%rbx)
	movq	_ET_FLAGS_PERIODIC@GOTPCREL(%rip), %rax
	movq	_ET_FLAGS_ONESHOT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	8(%rbx), %r15
	movq	_ET_FLAGS_PERCPU@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 16(%rbx)
	movl	$1000, 20(%rbx)                 ## imm = 0x3E8
	movl	56(%rbx), %eax
	movl	%eax, 52(%rbx)
	movl	$20, %edi
	callq	_nstosbt
	movl	%eax, 48(%rbx)
	movq	_SBT_1S@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	movl	%eax, 24(%rbx)
	movq	_arm_tmr_start@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	_arm_tmr_stop@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	%rbx, 32(%rbx)
	movq	%r15, %rdi
	callq	_et_register
	movq	%r15, (%r12)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_arm_tmr_et,8,3                 ## @arm_tmr_et
	.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 prv mem resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_PRV_TIMER_CTRL,4,2             ## @PRV_TIMER_CTRL
	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
L_.str.1:                               ## @.str.1
	.asciz	"could not allocate prv irq resources\n"

	.comm	_INTR_TYPE_CLK,4,2              ## @INTR_TYPE_CLK
	.comm	_arm_tmr_intr,4,2               ## @arm_tmr_intr
L_.str.2:                               ## @.str.2
	.asciz	"unable to setup the et irq handler.\n"

L_.str.3:                               ## @.str.3
	.asciz	"MPCore"

	.comm	_ET_FLAGS_PERIODIC,4,2          ## @ET_FLAGS_PERIODIC
	.comm	_ET_FLAGS_ONESHOT,4,2           ## @ET_FLAGS_ONESHOT
	.comm	_ET_FLAGS_PERCPU,4,2            ## @ET_FLAGS_PERCPU
	.comm	_SBT_1S,4,2                     ## @SBT_1S
	.comm	_arm_tmr_start,4,2              ## @arm_tmr_start
	.comm	_arm_tmr_stop,4,2               ## @arm_tmr_stop
	.no_dead_strip	_attach_et
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function attach_et
_attach_et:                             ; @attach_et
	.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
Lloh0:
	adrp	x21, _arm_tmr_et@GOTPAGE
Lloh1:
	ldr	x21, [x21, _arm_tmr_et@GOTPAGEOFF]
	ldr	x8, [x21]
	cbz	x8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_9
LBB0_2:
	mov	x19, x0
	ldr	w8, [x0]
	str	w8, [sp]
	ldr	w0, [x0, #60]
Lloh4:
	adrp	x20, _SYS_RES_MEMORY@GOTPAGE
Lloh5:
	ldr	x20, [x20, _SYS_RES_MEMORY@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh6:
	adrp	x23, _RF_ACTIVE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _RF_ACTIVE@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x2, sp
	bl	_bus_alloc_resource_any
	str	x0, [x19, #72]
	cbz	x0, LBB0_6
; %bb.3:
Lloh8:
	adrp	x8, _PRV_TIMER_CTRL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PRV_TIMER_CTRL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_tmr_prv_write_4
	ldr	w8, [x19, #4]
	str	w8, [sp, #4]
	ldr	w0, [x19, #60]
Lloh11:
	adrp	x22, _SYS_RES_IRQ@GOTPAGE
Lloh12:
	ldr	x22, [x22, _SYS_RES_IRQ@GOTPAGEOFF]
	ldr	w1, [x22]
	ldr	w3, [x23]
	add	x2, sp, #4
	bl	_bus_alloc_resource_any
	str	x0, [x19, #64]
	cbz	x0, LBB0_7
; %bb.4:
	mov	x1, x0
	ldr	w0, [x19, #60]
Lloh13:
	adrp	x8, _INTR_TYPE_CLK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _INTR_TYPE_CLK@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x8, _arm_tmr_intr@GOTPAGE
Lloh17:
	ldr	x8, [x8, _arm_tmr_intr@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	add	x6, sp, #8
	mov	x4, #0
	mov	x5, x19
	bl	_bus_setup_intr
	cbz	x0, LBB0_11
; %bb.5:
	ldr	w0, [x19, #60]
	ldr	w1, [x20]
	ldr	w2, [sp]
	ldr	x3, [x19, #72]
	bl	_bus_release_resource
	ldr	w0, [x19, #60]
	ldr	w1, [x22]
	ldr	w2, [sp, #4]
	ldr	x3, [x19, #64]
	bl	_bus_release_resource
	ldr	w0, [x19, #60]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_6:
	ldr	w0, [x19, #60]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
	ldr	w0, [x19, #60]
	ldr	w1, [x20]
	ldr	w2, [sp]
	ldr	x3, [x19, #72]
	bl	_bus_release_resource
	ldr	w0, [x19, #60]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_8:
	bl	_device_printf
Lloh25:
	adrp	x8, _ENXIO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
LBB0_10:
	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
LBB0_11:
Lloh27:
	adrp	x8, l_.str.3@PAGE
Lloh28:
	add	x8, x8, l_.str.3@PAGEOFF
	mov	x20, x19
	str	x8, [x20, #8]!
Lloh29:
	adrp	x8, _ET_FLAGS_PERIODIC@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ET_FLAGS_PERIODIC@GOTPAGEOFF]
Lloh31:
	adrp	x9, _ET_FLAGS_ONESHOT@GOTPAGE
Lloh32:
	ldr	x9, [x9, _ET_FLAGS_ONESHOT@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh35:
	adrp	x9, _ET_FLAGS_PERCPU@GOTPAGE
Lloh36:
	ldr	x9, [x9, _ET_FLAGS_PERCPU@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	orr	w8, w8, w9
	mov	w9, #1000
	stp	w8, w9, [x19, #16]
	ldr	w8, [x19, #56]
	str	w8, [x19, #52]
	mov	w0, #20
	bl	_nstosbt
	str	w0, [x19, #48]
Lloh38:
	adrp	x8, _SBT_1S@GOTPAGE
Lloh39:
	ldr	x8, [x8, _SBT_1S@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	lsl	w8, w8, #1
	str	w8, [x19, #24]
Lloh41:
	adrp	x8, _arm_tmr_start@GOTPAGE
Lloh42:
	ldr	x8, [x8, _arm_tmr_start@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
Lloh44:
	adrp	x9, _arm_tmr_stop@GOTPAGE
Lloh45:
	ldr	x9, [x9, _arm_tmr_stop@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #40]
	str	x19, [x19, #32]
	mov	x0, x20
	bl	_et_register
	mov	w0, #0
	str	x20, [x21]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh33
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_arm_tmr_et,8,3                 ; @arm_tmr_et
	.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 prv mem resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_PRV_TIMER_CTRL,4,2             ; @PRV_TIMER_CTRL
	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
l_.str.1:                               ; @.str.1
	.asciz	"could not allocate prv irq resources\n"

	.comm	_INTR_TYPE_CLK,4,2              ; @INTR_TYPE_CLK
	.comm	_arm_tmr_intr,4,2               ; @arm_tmr_intr
l_.str.2:                               ; @.str.2
	.asciz	"unable to setup the et irq handler.\n"

l_.str.3:                               ; @.str.3
	.asciz	"MPCore"

	.comm	_ET_FLAGS_PERIODIC,4,2          ; @ET_FLAGS_PERIODIC
	.comm	_ET_FLAGS_ONESHOT,4,2           ; @ET_FLAGS_ONESHOT
	.comm	_ET_FLAGS_PERCPU,4,2            ; @ET_FLAGS_PERCPU
	.comm	_SBT_1S,4,2                     ; @SBT_1S
	.comm	_arm_tmr_start,4,2              ; @arm_tmr_start
	.comm	_arm_tmr_stop,4,2               ; @arm_tmr_stop
	.no_dead_strip	_attach_et
.subsections_via_symbols
