	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv_thermal_attach
_mv_thermal_attach:                     ## @mv_thermal_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
	subq	$536, %rsp                      ## imm = 0x218
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_device_get_softc
	movq	%rax, %r15
	movl	%r14d, 24(%rax)
	movl	%r14d, %edi
	callq	_ofw_bus_get_node
	movq	_compat_data@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_ofw_bus_search_compatible
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
	leaq	28(%r15), %rbx
	movl	%r14d, %edi
	callq	_device_get_nameunit
	movq	_MTX_DEF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_mtx_init
	movl	24(%r15), %edi
	leaq	16(%r15), %rbx
	movq	%rbx, %rsi
	callq	_SYSCON_GET_HANDLE
	testq	%rax, %rax
	je	LBB0_1
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_11
LBB0_1:
	cmpq	$0, (%rbx)
	je	LBB0_2
## %bb.3:
	movl	$-1, (%r15)
	movq	8(%r15), %rax
	movl	(%rax), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$129, %eax
	jne	LBB0_7
## %bb.5:
	movq	%r15, %rdi
	callq	_ap806_init
	jmp	LBB0_7
LBB0_6:
	movq	%r15, %rdi
	callq	_cp110_init
LBB0_7:
	movl	%r14d, %edi
	callq	_device_get_sysctl_ctx
	movq	%rax, %r12
	movl	%r14d, %edi
	callq	_device_get_sysctl_tree
	movl	%eax, %edi
	callq	_SYSCTL_CHILDREN
	movq	%rax, %r13
	movq	_OID_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CTLTYPE_INT@GOTPCREL(%rip), %rax
	movq	_CTLFLAG_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	orl	(%rax), %r8d
	movq	_mv_thermal_sysctl@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	L_.str.3(%rip), %r10
	leaq	L_.str.2(%rip), %rbx
	leaq	L_.str.1(%rip), %rcx
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%r14d, %r9d
	pushq	%r10
	pushq	%rbx
	pushq	%rax
	pushq	$0
	callq	_SYSCTL_ADD_PROC
	addq	$32, %rsp
	movq	8(%r15), %rax
	cmpl	$0, 4(%rax)
	jle	LBB0_10
## %bb.8:
	movq	%r15, -576(%rbp)                ## 8-byte Spill
	movq	%r12, -568(%rbp)                ## 8-byte Spill
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-304(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$255, %esi
	leaq	L_.str.4(%rip), %rdx
	movl	%r12d, %ecx
	callq	_snprintf
	leaq	-560(%rbp), %r15
	movq	%r15, %rdi
	movl	$255, %esi
	leaq	L_.str.5(%rip), %rdx
	movl	%r12d, %ecx
	callq	_snprintf
	movq	_OID_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CTLFLAG_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_CTLTYPE_INT@GOTPCREL(%rip), %rax
	orl	(%rax), %r8d
	incl	%r12d
	movq	_mv_thermal_sysctl@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-568(%rbp), %rdi                ## 8-byte Reload
	movq	%r13, %rsi
	movq	%rbx, %rcx
	movl	%r14d, %r9d
	pushq	%r15
	leaq	L_.str.2(%rip), %rbx
	pushq	%rbx
	pushq	%rax
	pushq	%r12
	callq	_SYSCTL_ADD_PROC
	addq	$32, %rsp
	movq	-576(%rbp), %rax                ## 8-byte Reload
	movq	8(%rax), %rax
	cmpl	4(%rax), %r12d
	jl	LBB0_9
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_13
## %bb.12:
	addq	$536, %rsp                      ## imm = 0x218
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_compat_data,4,2                ## @compat_data
	.comm	_MTX_DEF,4,2                    ## @MTX_DEF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot get syscon for device\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_OID_AUTO,4,2                   ## @OID_AUTO
L_.str.1:                               ## @.str.1
	.asciz	"internal"

	.comm	_CTLTYPE_INT,4,2                ## @CTLTYPE_INT
	.comm	_CTLFLAG_RD,4,2                 ## @CTLFLAG_RD
	.comm	_mv_thermal_sysctl,4,2          ## @mv_thermal_sysctl
L_.str.2:                               ## @.str.2
	.asciz	"IK"

L_.str.3:                               ## @.str.3
	.asciz	"Internal Temperature"

L_.str.4:                               ## @.str.4
	.asciz	"cpu%d"

L_.str.5:                               ## @.str.5
	.asciz	"CPU%d Temperature"

	.no_dead_strip	_mv_thermal_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv_thermal_attach
_mv_thermal_attach:                     ; @mv_thermal_attach
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #544
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #24]
	mov	x0, x19
	bl	_ofw_bus_get_node
Lloh3:
	adrp	x8, _compat_data@GOTPAGE
Lloh4:
	ldr	x8, [x8, _compat_data@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ofw_bus_search_compatible
	ldr	x8, [x0]
	str	x8, [x20, #8]
	add	x21, x20, #28
	mov	x0, x19
	bl	_device_get_nameunit
	mov	x1, x0
Lloh6:
	adrp	x8, _MTX_DEF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MTX_DEF@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x2, #0
	bl	_mtx_init
	ldr	w0, [x20, #24]
	add	x21, x20, #16
	mov	x1, x21
	bl	_SYSCON_GET_HANDLE
	cbz	x0, LBB0_2
LBB0_1:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
Lloh11:
	adrp	x8, _ENXIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	b	LBB0_11
LBB0_2:
	ldr	x8, [x21]
	cbz	x8, LBB0_1
; %bb.3:
	mov	w8, #-1
	str	w8, [x20]
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.4:
	cmp	w8, #129
	b.ne	LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_ap806_init
	b	LBB0_7
LBB0_6:
	mov	x0, x20
	bl	_cp110_init
LBB0_7:
	mov	x0, x19
	bl	_device_get_sysctl_ctx
	mov	x21, x0
	mov	x0, x19
	bl	_device_get_sysctl_tree
	bl	_SYSCTL_CHILDREN
	mov	x22, x0
Lloh14:
	adrp	x8, _OID_AUTO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _OID_AUTO@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
Lloh17:
	adrp	x8, _CTLTYPE_INT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CTLTYPE_INT@GOTPAGEOFF]
Lloh19:
	adrp	x9, _CTLFLAG_RD@GOTPAGE
Lloh20:
	ldr	x9, [x9, _CTLFLAG_RD@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	ldr	w9, [x9]
	orr	w4, w9, w8
Lloh23:
	adrp	x26, _mv_thermal_sysctl@GOTPAGE
Lloh24:
	ldr	x26, [x26, _mv_thermal_sysctl@GOTPAGEOFF]
	ldr	w7, [x26]
Lloh25:
	adrp	x8, l_.str.3@PAGE
Lloh26:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh27:
	adrp	x27, l_.str.2@PAGE
Lloh28:
	add	x27, x27, l_.str.2@PAGEOFF
	stp	x27, x8, [sp]
Lloh29:
	adrp	x3, l_.str.1@PAGE
Lloh30:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x1, x22
	mov	x5, x19
	mov	w6, #0
	bl	_SYSCTL_ADD_PROC
	ldr	x8, [x20, #8]
	ldr	w8, [x8, #4]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	w23, #0
Lloh31:
	adrp	x24, l_.str.4@PAGE
Lloh32:
	add	x24, x24, l_.str.4@PAGEOFF
	add	x28, sp, #18
Lloh33:
	adrp	x25, l_.str.5@PAGE
Lloh34:
	add	x25, x25, l_.str.5@PAGEOFF
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #273
	mov	w1, #255
	mov	x2, x24
	mov	x3, x23
	bl	_snprintf
	add	x0, sp, #18
	mov	w1, #255
	mov	x2, x25
	mov	x3, x23
	bl	_snprintf
Lloh35:
	adrp	x8, _OID_AUTO@GOTPAGE
Lloh36:
	ldr	x8, [x8, _OID_AUTO@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
Lloh38:
	adrp	x8, _CTLTYPE_INT@GOTPAGE
Lloh39:
	ldr	x8, [x8, _CTLTYPE_INT@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
Lloh41:
	adrp	x9, _CTLFLAG_RD@GOTPAGE
Lloh42:
	ldr	x9, [x9, _CTLFLAG_RD@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	orr	w4, w9, w8
	add	w23, w23, #1
	ldr	w7, [x26]
	stp	x27, x28, [sp]
	add	x3, sp, #273
	mov	x0, x21
	mov	x1, x22
	mov	x5, x19
	mov	x6, x23
	bl	_SYSCTL_ADD_PROC
	ldr	x8, [x20, #8]
	ldr	w8, [x8, #4]
	cmp	w23, w8
	b.lt	LBB0_9
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldur	x8, [x29, #-96]
Lloh44:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh45:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	add	sp, sp, #544
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_compat_data,4,2                ; @compat_data
	.comm	_MTX_DEF,4,2                    ; @MTX_DEF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot get syscon for device\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_OID_AUTO,4,2                   ; @OID_AUTO
l_.str.1:                               ; @.str.1
	.asciz	"internal"

	.comm	_CTLTYPE_INT,4,2                ; @CTLTYPE_INT
	.comm	_CTLFLAG_RD,4,2                 ; @CTLFLAG_RD
	.comm	_mv_thermal_sysctl,4,2          ; @mv_thermal_sysctl
l_.str.2:                               ; @.str.2
	.asciz	"IK"

l_.str.3:                               ; @.str.3
	.asciz	"Internal Temperature"

l_.str.4:                               ; @.str.4
	.asciz	"cpu%d"

l_.str.5:                               ; @.str.5
	.asciz	"CPU%d Temperature"

	.no_dead_strip	_mv_thermal_attach
.subsections_via_symbols
