	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu_fill_fan_prop
_smu_fill_fan_prop:                     ## @smu_fill_fan_prop
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r13d
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_device_get_softc
	movq	(%rax), %rbx
	movslq	%r14d, %rax
	imulq	$56, %rax, %r14
	leaq	L_.str(%rip), %rsi
	leaq	-80(%rbp), %r12
	movl	%r13d, %edi
	movq	%r12, %rdx
	movl	$32, %ecx
	callq	_OF_getprop
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	_SMU_FAN_RPM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_SMU_FAN_PWM@GOTPCREL(%rip), %rax
LBB0_3:
	leaq	(%rbx,%r14), %rcx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movq	%rax, (%rbx,%r14)
	movl	%r15d, 48(%rbx,%r14)
	movq	$0, 40(%rbx,%r14)
	leaq	8(%rbx,%r14), %rdx
	leaq	L_.str.2(%rip), %rsi
	movl	%r13d, %edi
	movl	$4, %ecx
	callq	_OF_getprop
	leaq	(%rbx,%r14), %rdx
	addq	$24, %rdx
	leaq	L_.str.3(%rip), %rsi
	movl	%r13d, %edi
	movl	$4, %ecx
	callq	_OF_getprop
	leaq	(%rbx,%r14), %r15
	addq	$25, %r15
	leaq	L_.str.4(%rip), %rsi
	movl	%r13d, %edi
	movq	%r15, %rdx
	movl	$4, %ecx
	callq	_OF_getprop
	leaq	(%rbx,%r14), %rdx
	addq	$26, %rdx
	leaq	L_.str.5(%rip), %rsi
	movl	%r13d, %edi
	movl	$4, %ecx
	callq	_OF_getprop
	leaq	(%rbx,%r14), %r12
	addq	$27, %r12
	leaq	L_.str.6(%rip), %rsi
	movl	%r13d, %edi
	movq	%r12, %rdx
	movl	$4, %ecx
	callq	_OF_getprop
	cmpl	$4, %eax
	je	LBB0_5
## %bb.4:
	movb	(%r15), %al
	movb	%al, (%r12)
LBB0_5:
	movq	32(%rbx,%r14), %rdx
	leaq	L_.str.7(%rip), %rsi
	movl	%r13d, %edi
	movl	$8, %ecx
	callq	_OF_getprop
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	movq	_SMU_FAN_RPM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	callq	_smu_fan_read_rpm
	movl	%eax, 16(%rbx,%r14)
	jmp	LBB0_8
LBB0_7:
	leaq	(%rbx,%r14), %rsi
	addq	$16, %rsi
	leaq	(%rbx,%r14), %rdx
	addq	$12, %rdx
	callq	_smu_fan_read_pwm
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device_type"

L_.str.1:                               ## @.str.1
	.asciz	"fan-rpm-control"

	.comm	_SMU_FAN_RPM,8,3                ## @SMU_FAN_RPM
	.comm	_SMU_FAN_PWM,8,3                ## @SMU_FAN_PWM
L_.str.2:                               ## @.str.2
	.asciz	"reg"

L_.str.3:                               ## @.str.3
	.asciz	"min-value"

L_.str.4:                               ## @.str.4
	.asciz	"max-value"

L_.str.5:                               ## @.str.5
	.asciz	"zone"

L_.str.6:                               ## @.str.6
	.asciz	"unmanaged-value"

L_.str.7:                               ## @.str.7
	.asciz	"location"

	.no_dead_strip	_smu_fill_fan_prop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smu_fill_fan_prop
_smu_fill_fan_prop:                     ; @smu_fill_fan_prop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	bl	_device_get_softc
	ldr	x23, [x0]
	sxtw	x24, w19
	mov	w8, #56
	smaddl	x19, w19, w8, x23
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	mov	x0, x20
	mov	w3, #32
	bl	_OF_getprop
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #8
	bl	_strcmp
Lloh7:
	adrp	x25, _SMU_FAN_RPM@GOTPAGE
Lloh8:
	ldr	x25, [x25, _SMU_FAN_RPM@GOTPAGEOFF]
Lloh9:
	adrp	x8, _SMU_FAN_PWM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SMU_FAN_PWM@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x25, x8, eq
	ldr	x8, [x8]
	str	x8, [x19]
	str	w21, [x19, #48]
	str	xzr, [x19, #40]
	add	x2, x19, #8
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	w3, #4
	bl	_OF_getprop
	add	x2, x19, #24
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	w3, #4
	bl	_OF_getprop
	add	x21, x19, #25
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	mov	w3, #4
	bl	_OF_getprop
	add	x2, x19, #26
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	mov	w3, #4
	bl	_OF_getprop
	add	x22, x19, #27
Lloh19:
	adrp	x1, l_.str.6@PAGE
Lloh20:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	mov	w3, #4
	bl	_OF_getprop
	cmp	w0, #4
	b.eq	LBB0_2
; %bb.1:
	ldrb	w8, [x21]
	strb	w8, [x22]
LBB0_2:
	mov	w8, #56
	madd	x8, x24, x8, x23
	ldr	x2, [x8, #32]
Lloh21:
	adrp	x1, l_.str.7@PAGE
Lloh22:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	mov	w3, #8
	bl	_OF_getprop
	ldr	x8, [x19]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_smu_fan_read_rpm
	mov	w8, #56
	madd	x8, x24, x8, x23
	str	w0, [x8, #16]
	b	LBB0_5
LBB0_4:
	mov	w8, #56
	madd	x8, x24, x8, x23
	add	x1, x8, #16
	add	x2, x8, #12
	mov	x0, x19
	bl	_smu_fan_read_pwm
LBB0_5:
	ldr	x8, [sp, #40]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device_type"

l_.str.1:                               ; @.str.1
	.asciz	"fan-rpm-control"

	.comm	_SMU_FAN_RPM,8,3                ; @SMU_FAN_RPM
	.comm	_SMU_FAN_PWM,8,3                ; @SMU_FAN_PWM
l_.str.2:                               ; @.str.2
	.asciz	"reg"

l_.str.3:                               ; @.str.3
	.asciz	"min-value"

l_.str.4:                               ; @.str.4
	.asciz	"max-value"

l_.str.5:                               ; @.str.5
	.asciz	"zone"

l_.str.6:                               ; @.str.6
	.asciz	"unmanaged-value"

l_.str.7:                               ; @.str.7
	.asciz	"location"

	.no_dead_strip	_smu_fill_fan_prop
.subsections_via_symbols
