	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_pwm_enable
_set_pwm_enable:                        ## @set_pwm_enable
	.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	$24, %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, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_dev_get_drvdata
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr
	movslq	(%rax), %r13
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtoul
	leaq	-4(%rax), %rcx
	cmpq	$-4, %rcx
	ja	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
	jmp	LBB0_16
LBB0_2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %r14
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	cmpq	$2, %rax
	movq	%r13, %r15
	jb	LBB0_5
## %bb.3:
	movq	_f71805f_attr_pwm@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r15,4), %esi
	movq	_S_IRUGO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_sysfs_chmod_file
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leal	1(%r15), %edx
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_dbg
LBB0_5:
	addq	$8, %r12
	movq	%r12, %r13
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	%r15d, %edi
	callq	_F71805F_REG_FAN_CTRL
	movq	%r14, %rbx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_f71805f_read8
	movq	_FAN_CTRL_MODE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	notl	%r14d
	andl	%eax, %r14d
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	cmpq	$3, %r12
	je	LBB0_10
## %bb.6:
	cmpq	$2, %r12
	je	LBB0_9
## %bb.7:
	cmpq	$1, %r12
	jne	LBB0_12
## %bb.8:
	movq	_FAN_CTRL_MODE_MANUAL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	movq	_FAN_CTRL_MODE_SPEED@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	movq	_FAN_CTRL_MODE_TEMPERATURE@GOTPCREL(%rip), %rax
LBB0_11:
	orl	(%rax), %r14d
LBB0_12:
	movq	(%rbx), %rax
	movl	%r14d, (%rax,%r15,4)
	movl	%r15d, %edi
	callq	_F71805F_REG_FAN_CTRL
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	_f71805f_write8
	movq	%r13, %rdi
	callq	_mutex_unlock
	cmpq	$1, %r12
	jne	LBB0_15
## %bb.13:
	movq	_f71805f_attr_pwm@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r15,4), %esi
	movq	_S_IRUGO@GOTPCREL(%rip), %rax
	movq	_S_IWUSR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_sysfs_chmod_file
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	incl	%r15d
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_dev_dbg
LBB0_15:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_f71805f_attr_pwm,8,3           ## @f71805f_attr_pwm
	.comm	_S_IRUGO,4,2                    ## @S_IRUGO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chmod -w pwm%d failed\n"

	.comm	_FAN_CTRL_MODE_MASK,4,2         ## @FAN_CTRL_MODE_MASK
	.comm	_FAN_CTRL_MODE_MANUAL,4,2       ## @FAN_CTRL_MODE_MANUAL
	.comm	_FAN_CTRL_MODE_TEMPERATURE,4,2  ## @FAN_CTRL_MODE_TEMPERATURE
	.comm	_FAN_CTRL_MODE_SPEED,4,2        ## @FAN_CTRL_MODE_SPEED
	.comm	_S_IWUSR,4,2                    ## @S_IWUSR
L_.str.1:                               ## @.str.1
	.asciz	"chmod +w pwm%d failed\n"

	.no_dead_strip	_set_pwm_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_pwm_enable
_set_pwm_enable:                        ; @set_pwm_enable
	.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, x3
	mov	x23, x2
	mov	x21, x1
	mov	x20, x0
	bl	_dev_get_drvdata
	mov	x22, x0
	mov	x0, x21
	bl	_to_sensor_dev_attr
	ldrsw	x21, [x0]
	mov	x0, x23
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtoul
	sub	x8, x0, #4
	cmn	x8, #4
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_15
LBB0_2:
	mov	x23, x0
Lloh3:
	adrp	x27, _f71805f_attr_pwm@GOTPAGE
Lloh4:
	ldr	x27, [x27, _f71805f_attr_pwm@GOTPAGEOFF]
Lloh5:
	adrp	x26, _S_IRUGO@GOTPAGE
Lloh6:
	ldr	x26, [x26, _S_IRUGO@GOTPAGEOFF]
	cmp	x0, #2
	b.lo	LBB0_5
; %bb.3:
	ldr	x8, [x27]
	ldr	w1, [x8, x21, lsl #2]
	ldr	w2, [x26]
	mov	x0, x20
	bl	_sysfs_chmod_file
	cbz	x0, LBB0_5
; %bb.4:
	add	w2, w21, #1
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
LBB0_5:
	add	x24, x22, #8
	mov	x0, x24
	bl	_mutex_lock
	mov	x0, x21
	bl	_F71805F_REG_FAN_CTRL
	mov	x1, x0
	mov	x0, x22
	bl	_f71805f_read8
Lloh9:
	adrp	x8, _FAN_CTRL_MODE_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FAN_CTRL_MODE_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	bic	w25, w0, w8
	cmp	x23, #3
	b.eq	LBB0_9
; %bb.6:
	cmp	x23, #2
	b.eq	LBB0_10
; %bb.7:
	cmp	x23, #1
	b.ne	LBB0_12
; %bb.8:
Lloh12:
	adrp	x8, _FAN_CTRL_MODE_MANUAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FAN_CTRL_MODE_MANUAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh14:
	adrp	x8, _FAN_CTRL_MODE_SPEED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FAN_CTRL_MODE_SPEED@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh16:
	adrp	x8, _FAN_CTRL_MODE_TEMPERATURE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _FAN_CTRL_MODE_TEMPERATURE@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	orr	w25, w8, w25
LBB0_12:
	ldr	x8, [x22]
	str	w25, [x8, x21, lsl #2]
	mov	x0, x21
	bl	_F71805F_REG_FAN_CTRL
	mov	x1, x0
	mov	x0, x22
	mov	x2, x25
	bl	_f71805f_write8
	mov	x0, x24
	bl	_mutex_unlock
	cmp	x23, #1
	b.ne	LBB0_15
; %bb.13:
	ldr	x8, [x27]
	ldr	w1, [x8, x21, lsl #2]
	ldr	w8, [x26]
Lloh18:
	adrp	x9, _S_IWUSR@GOTPAGE
Lloh19:
	ldr	x9, [x9, _S_IWUSR@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_sysfs_chmod_file
	cbz	x0, LBB0_15
; %bb.14:
	add	w2, w21, #1
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
LBB0_15:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_f71805f_attr_pwm,8,3           ; @f71805f_attr_pwm
	.comm	_S_IRUGO,4,2                    ; @S_IRUGO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chmod -w pwm%d failed\n"

	.comm	_FAN_CTRL_MODE_MASK,4,2         ; @FAN_CTRL_MODE_MASK
	.comm	_FAN_CTRL_MODE_MANUAL,4,2       ; @FAN_CTRL_MODE_MANUAL
	.comm	_FAN_CTRL_MODE_TEMPERATURE,4,2  ; @FAN_CTRL_MODE_TEMPERATURE
	.comm	_FAN_CTRL_MODE_SPEED,4,2        ; @FAN_CTRL_MODE_SPEED
	.comm	_S_IWUSR,4,2                    ; @S_IWUSR
l_.str.1:                               ; @.str.1
	.asciz	"chmod +w pwm%d failed\n"

	.no_dead_strip	_set_pwm_enable
.subsections_via_symbols
