	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_pwm
_set_pwm:                               ## @set_pwm
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_dev_get_drvdata
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr_2
	movslq	(%rax), %rbx
	movl	4(%rax), %r15d
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtol
	movq	%rax, %r13
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	addq	$28, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	cmpl	$128, %r15d
	je	LBB0_7
## %bb.1:
	cmpl	$130, %r15d
	je	LBB0_11
## %bb.2:
	cmpl	$129, %r15d
	jne	LBB0_13
## %bb.3:
	movq	_VT1211_REG_FAN_DIV@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_vt1211_read8
	movl	%eax, %ecx
	shrl	$4, %ecx
	andl	$3, %ecx
	movq	(%r12), %rdx
	movl	%ecx, (%rdx)
	movl	%eax, %ecx
	shrl	$6, %ecx
	andl	$3, %ecx
	movl	%ecx, 4(%rdx)
	andl	$15, %eax
	movl	%eax, 8(%r12)
	movq	_VT1211_REG_PWM_CTL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_vt1211_read8
	movl	%eax, %edx
	andl	$15, %edx
	movq	16(%r12), %rcx
	movl	%edx, (%rcx)
	shrl	$4, %eax
	andl	$15, %eax
	movl	%eax, 4(%rcx)
	cmpq	$2, %r13
	je	LBB0_18
## %bb.4:
	testq	%r13, %r13
	jne	LBB0_21
## %bb.5:
	andl	$7, (%rcx,%rbx,4)
	xorl	$1, %ebx
	movslq	%ebx, %rax
	testb	$1, (%rcx,%rax,4)
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_20
## %bb.6:
	movl	8(%r12), %eax
	andl	$14, %eax
	jmp	LBB0_19
LBB0_7:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	$1054, %esi                     ## imm = 0x41E
	movl	$135000, %edx                   ## imm = 0x20F58
	callq	_SENSORS_LIMIT
	movl	%eax, %ecx
	movl	$135000, %eax                   ## imm = 0x20F58
	xorl	%edx, %edx
	idivl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	cmpl	$2, %eax
	jl	LBB0_10
## %bb.8:
	shrl	%eax
	xorl	%r14d, %r14d
	movq	%rax, %rcx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	incl	%r14d
	shrq	%rcx
	cmpq	$1, %rax
	movq	%rcx, %rax
	ja	LBB0_9
LBB0_10:
	movq	_VT1211_REG_PWM_CLK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_vt1211_read8
	andl	$248, %eax
	orl	%eax, %r14d
	movl	%r14d, 24(%r12)
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	%r14d, %edx
	jmp	LBB0_16
LBB0_11:
	leaq	-8(%r13), %rax
	cmpq	$-8, %rax
	ja	LBB0_14
## %bb.12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subq	(%rax), %r13
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_23
LBB0_13:
	leaq	L_.str.3(%rip), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_dev_dbg
	jmp	LBB0_17
LBB0_14:
	decq	%r13
	movl	32(%r12), %esi
	movq	%r13, %rdi
	callq	_ISTEMP
	testl	%eax, %eax
	je	LBB0_22
## %bb.15:
	movq	_VT1211_REG_PWM_CTL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_vt1211_read8
	movl	%eax, %ecx
	andl	$15, %ecx
	movq	16(%r12), %rdi
	movl	%ecx, (%rdi)
	shrl	$4, %eax
	andl	$15, %eax
	movl	%eax, 4(%rdi)
	movl	(%rdi,%rbx,4), %eax
	andl	$8, %eax
	orl	%eax, %r13d
	movl	%r13d, (%rdi,%rbx,4)
	movl	(%r14), %esi
	movl	4(%rdi), %edx
	shll	$4, %edx
	orl	(%rdi), %edx
	movq	%r12, %rdi
LBB0_16:
	callq	_vt1211_write8
LBB0_17:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_24
LBB0_18:
	orb	$8, (%rcx,%rbx,4)
	movl	8(%r12), %eax
	orl	$1, %eax
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_19:
	movl	%eax, 8(%r12)
LBB0_20:
	movl	(%r15), %esi
	movl	4(%rcx), %edx
	shll	$4, %edx
	orl	(%rcx), %edx
	movq	%r12, %rdi
	callq	_vt1211_write8
	movl	(%r14), %esi
	movq	(%r12), %rax
	movl	(%rax), %edx
	movl	4(%rax), %eax
	shll	$6, %eax
	shll	$4, %edx
	orl	%eax, %edx
	orl	8(%r12), %edx
	movq	%r12, %rdi
	callq	_vt1211_write8
	jmp	LBB0_25
LBB0_21:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subq	(%rax), %r13
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_23
LBB0_22:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subq	(%rax), %r13
	leaq	L_.str.2(%rip), %rsi
LBB0_23:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_dev_warn
LBB0_24:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_25:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%r13, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VT1211_REG_FAN_DIV,4,2         ## @VT1211_REG_FAN_DIV
	.comm	_VT1211_REG_PWM_CTL,4,2         ## @VT1211_REG_PWM_CTL
	.comm	_EINVAL,8,3                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pwm mode %ld not supported. Choose one of 0 or 2.\n"

	.comm	_VT1211_REG_PWM_CLK,4,2         ## @VT1211_REG_PWM_CLK
L_.str.1:                               ## @.str.1
	.asciz	"temp channel %ld not supported. Choose a value between 1 and 7.\n"

L_.str.2:                               ## @.str.2
	.asciz	"temp channel %ld is not available.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Unknown attr fetch (%d)\n"

	.no_dead_strip	_set_pwm
.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 set_pwm
lCPI0_0:
	.long	4294967292                      ; 0xfffffffc
	.long	4294967290                      ; 0xfffffffa
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_set_pwm:                               ; @set_pwm
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x20, x2
	mov	x23, x1
	mov	x22, x0
	bl	_dev_get_drvdata
	mov	x21, x0
	mov	x0, x23
	bl	_to_sensor_dev_attr_2
	ldp	w25, w24, [x0]
                                        ; kill: def $w25 killed $w25 def $x25
	sxtw	x25, w25
	mov	x0, x20
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtol
	mov	x23, x0
	add	x20, x21, #28
	mov	x0, x20
	bl	_mutex_lock
	cmp	w24, #128
	b.eq	LBB0_7
; %bb.1:
	cmp	w24, #130
	b.eq	LBB0_10
; %bb.2:
	cmp	w24, #129
	b.ne	LBB0_12
; %bb.3:
Lloh0:
	adrp	x24, _VT1211_REG_FAN_DIV@GOTPAGE
Lloh1:
	ldr	x24, [x24, _VT1211_REG_FAN_DIV@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x21
	bl	_vt1211_read8
	dup.2s	v0, w0
	ldr	x8, [x21]
Lloh2:
	adrp	x9, lCPI0_0@PAGE
Lloh3:
	ldr	d1, [x9, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
	movi.2s	v1, #3
	and.8b	v0, v0, v1
	str	d0, [x8]
	and	w8, w0, #0xf
	str	w8, [x21, #8]
Lloh4:
	adrp	x26, _VT1211_REG_PWM_CTL@GOTPAGE
Lloh5:
	ldr	x26, [x26, _VT1211_REG_PWM_CTL@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x21
	bl	_vt1211_read8
	and	w9, w0, #0xf
	ldr	x8, [x21, #16]
	ubfx	w10, w0, #4, #4
	stp	w9, w10, [x8]
	cmp	x23, #2
	b.eq	LBB0_17
; %bb.4:
	cbnz	x23, LBB0_21
; %bb.5:
	lsl	x9, x25, #2
	ldr	w10, [x8, x9]
	and	w10, w10, #0x7
	str	w10, [x8, x9]
	eor	w9, w25, #0x1
	ldr	w9, [x8, w9, sxtw #2]
	tbnz	w9, #0, LBB0_19
; %bb.6:
	ldr	w9, [x21, #8]
	and	w9, w9, #0xe
	b	LBB0_18
LBB0_7:
	mov	w22, #3928
	movk	w22, #2, lsl #16
	mov	x0, x23
	mov	w1, #1054
	mov	w2, #3928
	movk	w2, #2, lsl #16
	bl	_SENSORS_LIMIT
	sdiv	w8, w22, w0
	cmp	w8, #2
	b.lt	LBB0_13
; %bb.8:
	mov	w22, #0
	lsr	w8, w8, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	add	w22, w22, #1
	lsr	x9, x8, #1
	cmp	x8, #1
	mov	x8, x9
	b.hi	LBB0_9
	b	LBB0_14
LBB0_10:
	sub	x8, x23, #8
	cmn	x8, #8
	b.hi	LBB0_15
; %bb.11:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	neg	x19, x8
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_23
LBB0_12:
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x22
	mov	x2, x24
	bl	_dev_dbg
	b	LBB0_24
LBB0_13:
	mov	w22, #0
LBB0_14:
Lloh13:
	adrp	x23, _VT1211_REG_PWM_CLK@GOTPAGE
Lloh14:
	ldr	x23, [x23, _VT1211_REG_PWM_CLK@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x21
	bl	_vt1211_read8
	and	w8, w0, #0xf8
	orr	w2, w8, w22
	str	w2, [x21, #24]
	ldr	w1, [x23]
	b	LBB0_20
LBB0_15:
	sub	x24, x23, #1
	ldr	w1, [x21, #32]
	mov	x0, x24
	bl	_ISTEMP
	cbz	w0, LBB0_22
; %bb.16:
Lloh15:
	adrp	x22, _VT1211_REG_PWM_CTL@GOTPAGE
Lloh16:
	ldr	x22, [x22, _VT1211_REG_PWM_CTL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x21
	bl	_vt1211_read8
	and	w8, w0, #0xf
	ldr	x9, [x21, #16]
	ubfx	w10, w0, #4, #4
	stp	w8, w10, [x9]
	lsl	x8, x25, #2
	ldr	w10, [x9, x8]
	and	w10, w10, #0x8
	orr	w10, w10, w24
	str	w10, [x9, x8]
	ldr	w1, [x22]
	ldp	w9, w8, [x9]
	orr	w2, w9, w8, lsl #4
	b	LBB0_20
LBB0_17:
	lsl	x9, x25, #2
	ldr	w10, [x8, x9]
	orr	w10, w10, #0x8
	str	w10, [x8, x9]
	ldr	w9, [x21, #8]
	orr	w9, w9, #0x1
LBB0_18:
	str	w9, [x21, #8]
LBB0_19:
	ldr	w1, [x26]
	ldp	w8, w9, [x8]
	orr	w2, w8, w9, lsl #4
	mov	x0, x21
	bl	_vt1211_write8
	ldr	w1, [x24]
	ldr	x8, [x21]
	ldp	w8, w9, [x8]
	lsl	w8, w8, #4
	orr	w8, w8, w9, lsl #6
	ldr	w9, [x21, #8]
	orr	w2, w8, w9
LBB0_20:
	mov	x0, x21
	bl	_vt1211_write8
	b	LBB0_24
LBB0_21:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	neg	x19, x8
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_23
LBB0_22:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	neg	x19, x8
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_23:
	mov	x0, x22
	mov	x2, x23
	bl	_dev_warn
LBB0_24:
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_VT1211_REG_FAN_DIV,4,2         ; @VT1211_REG_FAN_DIV
	.comm	_VT1211_REG_PWM_CTL,4,2         ; @VT1211_REG_PWM_CTL
	.comm	_EINVAL,8,3                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pwm mode %ld not supported. Choose one of 0 or 2.\n"

	.comm	_VT1211_REG_PWM_CLK,4,2         ; @VT1211_REG_PWM_CLK
l_.str.1:                               ; @.str.1
	.asciz	"temp channel %ld not supported. Choose a value between 1 and 7.\n"

l_.str.2:                               ; @.str.2
	.asciz	"temp channel %ld is not available.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Unknown attr fetch (%d)\n"

	.no_dead_strip	_set_pwm
.subsections_via_symbols
