	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxreg_fan_config
_mlxreg_fan_config:                     ## @mlxreg_fan_config
	.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
	movq	%rdi, %r14
	movq	8(%rsi), %rbx
	movq	_MLXREG_FAN_TACHO_SAMPLES_PER_PULSE_DEF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rdi)
	movq	_MLXREG_FAN_TACHO_DIV_DEF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rdi)
	cmpl	$0, (%rsi)
	jle	LBB0_7
## %bb.1:
	movq	%rsi, %r15
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	32(%rbx), %eax
	movq	40(%r14), %rcx
	movslq	%r13d, %rdx
	leaq	(%rdx,%rdx,2), %rdx
	movl	%eax, 16(%rcx,%rdx,8)
	movq	16(%rbx), %rax
	movq	%rax, 8(%rcx,%rdx,8)
	incl	%r13d
	movl	$1, (%rcx,%rdx,8)
LBB0_36:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r12d
	addq	$40, %rbx
	cmpl	(%r15), %r12d
	jge	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	$4, %edx
	callq	_strnstr
	testq	%rax, %rax
	je	LBB0_18
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_MLXREG_FAN_MAX_TACHO@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	je	LBB0_4
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 24(%rbx)
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mlxreg_fan_connect_verify
	testl	%eax, %eax
	js	LBB0_6
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	incl	%r13d
	jmp	LBB0_36
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	$4, %edx
	callq	_strnstr
	testq	%rax, %rax
	je	LBB0_22
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 32(%r14)
	jne	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	32(%rbx), %eax
	movl	%eax, 36(%r14)
	movl	$1, 32(%r14)
	jmp	LBB0_36
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	$4, %edx
	callq	_strnstr
	testq	%rax, %rax
	je	LBB0_23
## %bb.24:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_25
## %bb.26:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_27
## %bb.30:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 24(%rbx)
	jne	LBB0_31
## %bb.32:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx), %rax
	movq	%rcx, 24(%r14)
	testq	%rax, %rax
	jne	LBB0_34
	jmp	LBB0_35
LBB0_27:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx), %rax
	movq	24(%rbx), %rcx
	testq	%rax, %rax
	je	LBB0_28
## %bb.33:                              ##   in Loop: Header=BB0_2 Depth=1
	testq	%rcx, %rcx
	jne	LBB0_31
LBB0_34:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, 16(%r14)
LBB0_35:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_36
LBB0_28:                                ##   in Loop: Header=BB0_2 Depth=1
	testq	%rcx, %rcx
	je	LBB0_29
LBB0_31:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mlxreg_fan_speed_divider_get
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	testl	%eax, %eax
	je	LBB0_36
	jmp	LBB0_6
LBB0_7:
	movq	_MLXREG_FAN_SPEED_MIN_LEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_10
## %bb.8:
	movq	(%r14), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, (%rdx,%rsi,4)
	incq	%rsi
	movslq	(%rax), %rcx
	cmpq	%rcx, %rsi
	jl	LBB0_9
LBB0_10:
	movq	_MLXREG_FAN_MAX_STATE@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %ecx
	jg	LBB0_6
## %bb.11:
	movq	(%r14), %rsi
	movslq	%ecx, %rdi
	decq	%rdi
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	%ecx, 4(%rsi,%rdi,4)
	movslq	(%rdx), %rbx
	incq	%rdi
	incl	%ecx
	cmpq	%rbx, %rdi
	jl	LBB0_12
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_20:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_5
LBB0_23:
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_5
LBB0_25:
	leaq	L_.str.5(%rip), %rsi
LBB0_5:
	movl	8(%r14), %edi
	movl	(%rbx), %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXREG_FAN_TACHO_SAMPLES_PER_PULSE_DEF,8,3 ## @MLXREG_FAN_TACHO_SAMPLES_PER_PULSE_DEF
	.comm	_MLXREG_FAN_TACHO_DIV_DEF,8,3   ## @MLXREG_FAN_TACHO_DIV_DEF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tacho"

	.comm	_MLXREG_FAN_MAX_TACHO,4,2       ## @MLXREG_FAN_MAX_TACHO
L_.str.1:                               ## @.str.1
	.asciz	"too many tacho entries: %s\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"pwm"

L_.str.3:                               ## @.str.3
	.asciz	"duplicate pwm entry: %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"conf"

L_.str.5:                               ## @.str.5
	.asciz	"duplicate conf entry: %s\n"

L_.str.6:                               ## @.str.6
	.asciz	"invalid conf entry params: %s\n"

L_.str.7:                               ## @.str.7
	.asciz	"invalid label: %s\n"

	.comm	_MLXREG_FAN_SPEED_MIN_LEVEL,4,2 ## @MLXREG_FAN_SPEED_MIN_LEVEL
	.comm	_MLXREG_FAN_MAX_STATE,4,2       ## @MLXREG_FAN_MAX_STATE
	.no_dead_strip	_mlxreg_fan_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxreg_fan_config
_mlxreg_fan_config:                     ; @mlxreg_fan_config
	.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
	mov	x19, x0
	ldr	x20, [x1, #8]
Lloh0:
	adrp	x8, _MLXREG_FAN_TACHO_SAMPLES_PER_PULSE_DEF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLXREG_FAN_TACHO_SAMPLES_PER_PULSE_DEF@GOTPAGEOFF]
Lloh2:
	adrp	x9, _MLXREG_FAN_TACHO_DIV_DEF@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MLXREG_FAN_TACHO_DIV_DEF@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	ldr	x9, [x9]
	stp	x9, x8, [x0, #16]
	ldr	w8, [x1]
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.1:
	mov	x21, x1
	mov	w26, #0
	mov	w27, #0
	mov	w24, #0
Lloh6:
	adrp	x23, l_.str@PAGE
Lloh7:
	add	x23, x23, l_.str@PAGEOFF
	mov	w28, #1
Lloh8:
	adrp	x25, _MLXREG_FAN_MAX_TACHO@GOTPAGE
Lloh9:
	ldr	x25, [x25, _MLXREG_FAN_MAX_TACHO@GOTPAGEOFF]
	mov	w22, #24
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x20, #32]
	ldr	x9, [x19, #40]
	smaddl	x9, w27, w22, x9
	str	w8, [x9, #16]
	ldr	x8, [x20, #16]
	str	x8, [x9, #8]
	add	w27, w27, #1
	str	w28, [x9]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w26, w26, #1
	add	x20, x20, #40
	ldr	w8, [x21]
	cmp	w26, w8
	b.ge	LBB0_24
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	mov	x1, x23
	mov	w2, #4
	bl	_strnstr
	cbz	x0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x25]
	cmp	w27, w8
	b.eq	LBB0_31
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_mlxreg_fan_connect_verify
	tbnz	w0, #31, LBB0_36
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w0, LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w27, w27, #1
	b	LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x20]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #4
	bl	_strnstr
	cbz	x0, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19, #32]
	cbnz	w8, LBB0_32
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x20, #32]
	stp	w28, w8, [x19, #32]
	b	LBB0_3
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x20]
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w2, #4
	bl	_strnstr
	cbz	x0, LBB0_33
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w24, LBB0_34
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x20, #16]
	cbz	x9, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #24]
	cbnz	x8, LBB0_22
; %bb.17:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #8]
	str	x9, [x19, #24]
	cbnz	x8, LBB0_20
	b	LBB0_23
LBB0_18:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #8]
	ldr	x9, [x20, #24]
	cbz	x8, LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_4 Depth=1
	cbnz	x9, LBB0_22
LBB0_20:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x8, [x19, #16]
	b	LBB0_23
LBB0_21:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	x9, LBB0_37
LBB0_22:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_mlxreg_fan_speed_divider_get
	cbnz	w0, LBB0_36
LBB0_23:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w24, #1
	b	LBB0_3
LBB0_24:
Lloh14:
	adrp	x9, _MLXREG_FAN_SPEED_MIN_LEVEL@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MLXREG_FAN_SPEED_MIN_LEVEL@GOTPAGEOFF]
	ldr	w8, [x9]
	cmp	w8, #1
	b.lt	LBB0_27
; %bb.25:
	mov	x10, #0
	ldr	x11, [x19]
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	str	w8, [x11, x10, lsl #2]
	add	x10, x10, #1
	ldrsw	x8, [x9]
	cmp	x10, x8
	b.lt	LBB0_26
LBB0_27:
Lloh16:
	adrp	x9, _MLXREG_FAN_MAX_STATE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _MLXREG_FAN_MAX_STATE@GOTPAGEOFF]
	ldr	w10, [x9]
	cmp	w8, w10
	b.gt	LBB0_30
; %bb.28:
	ldr	x10, [x19]
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	sxtw	x8, w8
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	str	w8, [x10, x8, lsl #2]
	add	x11, x8, #1
	ldrsw	x12, [x9]
	cmp	x8, x12
	mov	x8, x11
	b.lt	LBB0_29
LBB0_30:
	mov	w0, #0
	b	LBB0_36
LBB0_31:
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_35
LBB0_32:
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_35
LBB0_33:
Lloh22:
	adrp	x1, l_.str.7@PAGE
Lloh23:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_35
LBB0_34:
Lloh24:
	adrp	x1, l_.str.5@PAGE
Lloh25:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_35:
	ldr	w0, [x19, #8]
	ldr	w2, [x20]
	bl	_dev_err
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_36:
	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_37:
Lloh29:
	adrp	x1, l_.str.6@PAGE
Lloh30:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_35
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXREG_FAN_TACHO_SAMPLES_PER_PULSE_DEF,8,3 ; @MLXREG_FAN_TACHO_SAMPLES_PER_PULSE_DEF
	.comm	_MLXREG_FAN_TACHO_DIV_DEF,8,3   ; @MLXREG_FAN_TACHO_DIV_DEF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tacho"

	.comm	_MLXREG_FAN_MAX_TACHO,4,2       ; @MLXREG_FAN_MAX_TACHO
l_.str.1:                               ; @.str.1
	.asciz	"too many tacho entries: %s\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"pwm"

l_.str.3:                               ; @.str.3
	.asciz	"duplicate pwm entry: %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"conf"

l_.str.5:                               ; @.str.5
	.asciz	"duplicate conf entry: %s\n"

l_.str.6:                               ; @.str.6
	.asciz	"invalid conf entry params: %s\n"

l_.str.7:                               ; @.str.7
	.asciz	"invalid label: %s\n"

	.comm	_MLXREG_FAN_SPEED_MIN_LEVEL,4,2 ; @MLXREG_FAN_SPEED_MIN_LEVEL
	.comm	_MLXREG_FAN_MAX_STATE,4,2       ; @MLXREG_FAN_MAX_STATE
	.no_dead_strip	_mlxreg_fan_config
.subsections_via_symbols
