	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_ts_attach
_aw_ts_attach:                          ## @aw_ts_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, 28(%rax)
	movq	_aw_ts_spec@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	16(%rax), %rdx
	movl	%ebx, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	16(%r14), %rax
	movq	_INTR_TYPE_MISC@GOTPCREL(%rip), %rcx
	movq	_INTR_MPSAFE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	4(%rax), %esi
	movq	_aw_ts_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	24(%r14), %rax
	subq	$8, %rsp
	movl	%ebx, %edi
	xorl	%ecx, %ecx
	movq	%r14, %r9
	pushq	%rax
	callq	_bus_setup_intr
	addq	$16, %rsp
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	(%r15), %esi
	movq	16(%r14), %rdx
	movl	%ebx, %edi
	callq	_bus_release_resources
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movl	%ebx, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_11:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_compat_data@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_ofw_bus_search_compatible
	movl	(%rax), %eax
	cmpl	$129, %eax
	je	LBB0_6
## %bb.7:
	cmpl	$128, %eax
	jne	LBB0_10
## %bb.8:
	movl	$100, %eax
	movl	$144700, %ecx                   ## imm = 0x2353C
	jmp	LBB0_9
LBB0_6:
	movl	$133, %eax
	movl	$257000, %ecx                   ## imm = 0x3EBE8
LBB0_9:
	movl	%ecx, (%r14)
	movl	%eax, 4(%r14)
LBB0_10:
	movq	_TP_CTRL0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	callq	_TP_CTRL0_CLK_SELECT
	movl	%eax, %r13d
	movl	$2, %edi
	callq	_TP_CTRL0_CLK_DIV
	orl	%eax, %r13d
	movl	$7, %edi
	callq	_TP_CTRL0_FS_DIV
	movl	%eax, %r12d
	movl	$63, %edi
	callq	_TP_CTRL0_TACQ
	orl	%eax, %r12d
	orl	%r13d, %r12d
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	callq	_WRITE
	movq	_TP_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TP_CTRL1_MODE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_WRITE
	movq	_TP_TPR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_TP_TPR_TEMP_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	$1953, %edi                     ## imm = 0x7A1
	callq	_TP_TPR_TEMP_PERIOD
	orl	%eax, %r13d
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	callq	_WRITE
	movq	_TP_FIFOC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TP_FIFOC_TEMP_IRQ_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_WRITE
	movl	%ebx, %edi
	callq	_device_get_sysctl_ctx
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_device_get_sysctl_tree
	movl	%eax, %edi
	callq	_SYSCTL_CHILDREN
	movq	_OID_AUTO@GOTPCREL(%rip), %rcx
	movq	_CTLTYPE_INT@GOTPCREL(%rip), %rdx
	movq	_CTLFLAG_RD@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	orl	(%rdx), %r8d
	movl	(%rcx), %edx
	addq	$8, %r14
	movq	_sysctl_handle_int@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	leaq	L_.str.4(%rip), %r10
	leaq	L_.str.3(%rip), %r11
	leaq	L_.str.2(%rip), %rcx
	movl	%r12d, %edi
	movl	%eax, %esi
	movq	%r14, %r9
	pushq	%r10
	pushq	%r11
	pushq	%rbx
	pushq	$0
	callq	_SYSCTL_ADD_PROC
	addq	$32, %rsp
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_aw_ts_spec,4,2                 ## @aw_ts_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate memory resource\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_INTR_TYPE_MISC,4,2             ## @INTR_TYPE_MISC
	.comm	_INTR_MPSAFE,4,2                ## @INTR_MPSAFE
	.comm	_aw_ts_intr,4,2                 ## @aw_ts_intr
L_.str.1:                               ## @.str.1
	.asciz	"cannot setup interrupt handler\n"

	.comm	_compat_data,4,2                ## @compat_data
	.comm	_TP_CTRL0,4,2                   ## @TP_CTRL0
	.comm	_TP_CTRL1,4,2                   ## @TP_CTRL1
	.comm	_TP_CTRL1_MODE_EN,4,2           ## @TP_CTRL1_MODE_EN
	.comm	_TP_TPR,4,2                     ## @TP_TPR
	.comm	_TP_TPR_TEMP_EN,4,2             ## @TP_TPR_TEMP_EN
	.comm	_TP_FIFOC,4,2                   ## @TP_FIFOC
	.comm	_TP_FIFOC_TEMP_IRQ_ENABLE,4,2   ## @TP_FIFOC_TEMP_IRQ_ENABLE
	.comm	_OID_AUTO,4,2                   ## @OID_AUTO
L_.str.2:                               ## @.str.2
	.asciz	"temperature"

	.comm	_CTLTYPE_INT,4,2                ## @CTLTYPE_INT
	.comm	_CTLFLAG_RD,4,2                 ## @CTLFLAG_RD
	.comm	_sysctl_handle_int,4,2          ## @sysctl_handle_int
L_.str.3:                               ## @.str.3
	.asciz	"IK3"

L_.str.4:                               ## @.str.4
	.asciz	"CPU Temperature"

	.no_dead_strip	_aw_ts_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function aw_ts_attach
lCPI0_0:
	.long	257000                          ; 0x3ebe8
	.long	133                             ; 0x85
lCPI0_1:
	.long	144700                          ; 0x2353c
	.long	100                             ; 0x64
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_aw_ts_attach:                          ; @aw_ts_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	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #28]
Lloh0:
	adrp	x21, _aw_ts_spec@GOTPAGE
Lloh1:
	ldr	x21, [x21, _aw_ts_spec@GOTPAGEOFF]
	ldr	w1, [x21]
	ldr	x2, [x0, #16]
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	x8, [x20, #16]
	ldr	w1, [x8, #4]
Lloh4:
	adrp	x8, _INTR_TYPE_MISC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _INTR_TYPE_MISC@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _INTR_MPSAFE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _INTR_MPSAFE@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh10:
	adrp	x8, _aw_ts_intr@GOTPAGE
Lloh11:
	ldr	x8, [x8, _aw_ts_intr@GOTPAGEOFF]
Lloh12:
	ldr	w4, [x8]
	add	x6, x20, #24
	mov	x0, x19
	mov	x3, #0
	mov	x5, x20
	bl	_bus_setup_intr
	cbz	x0, LBB0_6
; %bb.3:
	ldr	w1, [x21]
	ldr	x2, [x20, #16]
	mov	x0, x19
	bl	_bus_release_resources
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_device_printf
Lloh15:
	adrp	x8, _ENXIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
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:
Lloh18:
	adrp	x8, _compat_data@GOTPAGE
Lloh19:
	ldr	x8, [x8, _compat_data@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ofw_bus_search_compatible
	ldr	w8, [x0]
	cmp	w8, #129
	b.eq	LBB0_9
; %bb.7:
	cmp	w8, #128
	b.ne	LBB0_11
; %bb.8:
Lloh21:
	adrp	x8, lCPI0_1@PAGE
Lloh22:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh23:
	adrp	x8, lCPI0_0@PAGE
Lloh24:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
LBB0_10:
	str	d0, [x20]
LBB0_11:
Lloh25:
	adrp	x8, _TP_CTRL0@GOTPAGE
Lloh26:
	ldr	x8, [x8, _TP_CTRL0@GOTPAGEOFF]
Lloh27:
	ldr	w21, [x8]
	mov	w0, #0
	bl	_TP_CTRL0_CLK_SELECT
	mov	x22, x0
	mov	w0, #2
	bl	_TP_CTRL0_CLK_DIV
	orr	w22, w0, w22
	mov	w0, #7
	bl	_TP_CTRL0_FS_DIV
	orr	w22, w22, w0
	mov	w0, #63
	bl	_TP_CTRL0_TACQ
	orr	w2, w22, w0
	mov	x0, x20
	mov	x1, x21
	bl	_WRITE
Lloh28:
	adrp	x8, _TP_CTRL1@GOTPAGE
Lloh29:
	ldr	x8, [x8, _TP_CTRL1@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x8, _TP_CTRL1_MODE_EN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _TP_CTRL1_MODE_EN@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_WRITE
Lloh34:
	adrp	x8, _TP_TPR@GOTPAGE
Lloh35:
	ldr	x8, [x8, _TP_TPR@GOTPAGEOFF]
Lloh36:
	ldr	w21, [x8]
Lloh37:
	adrp	x8, _TP_TPR_TEMP_EN@GOTPAGE
Lloh38:
	ldr	x8, [x8, _TP_TPR_TEMP_EN@GOTPAGEOFF]
Lloh39:
	ldr	w22, [x8]
	mov	w0, #1953
	bl	_TP_TPR_TEMP_PERIOD
	orr	w2, w0, w22
	mov	x0, x20
	mov	x1, x21
	bl	_WRITE
Lloh40:
	adrp	x8, _TP_FIFOC@GOTPAGE
Lloh41:
	ldr	x8, [x8, _TP_FIFOC@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
Lloh43:
	adrp	x8, _TP_FIFOC_TEMP_IRQ_ENABLE@GOTPAGE
Lloh44:
	ldr	x8, [x8, _TP_FIFOC_TEMP_IRQ_ENABLE@GOTPAGEOFF]
Lloh45:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_WRITE
	mov	x0, x19
	bl	_device_get_sysctl_ctx
	mov	x21, x0
	mov	x0, x19
	bl	_device_get_sysctl_tree
	bl	_SYSCTL_CHILDREN
	mov	x1, x0
Lloh46:
	adrp	x8, _OID_AUTO@GOTPAGE
Lloh47:
	ldr	x8, [x8, _OID_AUTO@GOTPAGEOFF]
Lloh48:
	ldr	w2, [x8]
Lloh49:
	adrp	x8, _CTLTYPE_INT@GOTPAGE
Lloh50:
	ldr	x8, [x8, _CTLTYPE_INT@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
Lloh52:
	adrp	x9, _CTLFLAG_RD@GOTPAGE
Lloh53:
	ldr	x9, [x9, _CTLFLAG_RD@GOTPAGEOFF]
Lloh54:
	ldr	w9, [x9]
	orr	w4, w9, w8
	add	x5, x20, #8
Lloh55:
	adrp	x8, _sysctl_handle_int@GOTPAGE
Lloh56:
	ldr	x8, [x8, _sysctl_handle_int@GOTPAGEOFF]
Lloh57:
	ldr	w7, [x8]
Lloh58:
	adrp	x8, l_.str.4@PAGE
Lloh59:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh60:
	adrp	x9, l_.str.3@PAGE
Lloh61:
	add	x9, x9, l_.str.3@PAGEOFF
	stp	x9, x8, [sp]
Lloh62:
	adrp	x3, l_.str.2@PAGE
Lloh63:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	w6, #0
	bl	_SYSCTL_ADD_PROC
	mov	w0, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdr	Lloh21, Lloh22
	.loh AdrpLdr	Lloh23, Lloh24
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_aw_ts_spec,4,2                 ; @aw_ts_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate memory resource\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_INTR_TYPE_MISC,4,2             ; @INTR_TYPE_MISC
	.comm	_INTR_MPSAFE,4,2                ; @INTR_MPSAFE
	.comm	_aw_ts_intr,4,2                 ; @aw_ts_intr
l_.str.1:                               ; @.str.1
	.asciz	"cannot setup interrupt handler\n"

	.comm	_compat_data,4,2                ; @compat_data
	.comm	_TP_CTRL0,4,2                   ; @TP_CTRL0
	.comm	_TP_CTRL1,4,2                   ; @TP_CTRL1
	.comm	_TP_CTRL1_MODE_EN,4,2           ; @TP_CTRL1_MODE_EN
	.comm	_TP_TPR,4,2                     ; @TP_TPR
	.comm	_TP_TPR_TEMP_EN,4,2             ; @TP_TPR_TEMP_EN
	.comm	_TP_FIFOC,4,2                   ; @TP_FIFOC
	.comm	_TP_FIFOC_TEMP_IRQ_ENABLE,4,2   ; @TP_FIFOC_TEMP_IRQ_ENABLE
	.comm	_OID_AUTO,4,2                   ; @OID_AUTO
l_.str.2:                               ; @.str.2
	.asciz	"temperature"

	.comm	_CTLTYPE_INT,4,2                ; @CTLTYPE_INT
	.comm	_CTLFLAG_RD,4,2                 ; @CTLFLAG_RD
	.comm	_sysctl_handle_int,4,2          ; @sysctl_handle_int
l_.str.3:                               ; @.str.3
	.asciz	"IK3"

l_.str.4:                               ; @.str.4
	.asciz	"CPU Temperature"

	.no_dead_strip	_aw_ts_attach
.subsections_via_symbols
