	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwm_store
_pwm_store:                             ## @pwm_store
	.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, %r12
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_dev_get_drvdata
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr
	movslq	(%rax), %r14
	movq	(%r13), %rax
	movq	_LD_FAN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	(%rax,%rcx,4), %rbx
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movl	$10, %esi
	callq	_kstrtoul
	testq	%rax, %rax
	js	LBB0_2
## %bb.1:
	cmpq	$256, -48(%rbp)                 ## imm = 0x100
	jae	LBB0_2
## %bb.4:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rbx
	addq	$24, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_pc87427_readall_pwm
	movq	8(%r13), %rax
	movq	_PWM_ENABLE_MODE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	andl	(%rax,%r14,4), %r15d
	movq	_PWM_MODE_MANUAL@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edx
	movq	_PWM_MODE_OFF@GOTPCREL(%rip), %rdi
	movl	(%rdi), %eax
	cmpl	%edx, %r15d
	je	LBB0_7
## %bb.5:
	cmpl	%eax, %r15d
	je	LBB0_7
## %bb.6:
	incl	%r14d
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_dev_notice
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%r12d, %r12d
	subq	(%rax), %r12
	jmp	LBB0_17
LBB0_7:
	movq	-48(%rbp), %rcx
	cmpl	%edx, %r15d
	jne	LBB0_10
## %bb.8:
	testq	%rcx, %rcx
	jne	LBB0_10
## %bb.9:
	movq	%rdi, %r15
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_update_pwm_enable
	movl	(%r15), %r15d
	leal	1(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.3(%rip), %r8
	jmp	LBB0_13
LBB0_10:
	cmpl	%eax, %r15d
	jne	LBB0_14
## %bb.11:
	testq	%rcx, %rcx
	je	LBB0_14
## %bb.12:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_update_pwm_enable
	movq	_PWM_MODE_MANUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leal	1(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.3(%rip), %rcx
	leaq	L_.str.2(%rip), %r8
LBB0_13:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_dbg
	movq	_PWM_MODE_MANUAL@GOTPCREL(%rip), %rsi
LBB0_14:
	movq	-48(%rbp), %rax
	movq	16(%r13), %rcx
	movq	%rax, (%rcx,%r14,8)
	cmpl	(%rsi), %r15d
	jne	LBB0_16
## %bb.15:
	movq	-48(%rbp), %rdi
	movq	_PC87427_REG_PWM_DUTY@GOTPCREL(%rip), %rax
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	addq	(%rax), %rsi
	callq	_outb
LBB0_16:
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_17:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LD_FAN,8,3                     ## @LD_FAN
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_PWM_ENABLE_MODE_MASK,4,2       ## @PWM_ENABLE_MODE_MASK
	.comm	_PWM_MODE_MANUAL,4,2            ## @PWM_MODE_MANUAL
	.comm	_PWM_MODE_OFF,4,2               ## @PWM_MODE_OFF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't set PWM%d duty cycle while not in manual mode\n"

	.comm	_EPERM,8,3                      ## @EPERM
L_.str.1:                               ## @.str.1
	.asciz	"Switching PWM%d from %s to %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"manual"

L_.str.3:                               ## @.str.3
	.asciz	"off"

	.comm	_PC87427_REG_PWM_DUTY,8,3       ## @PC87427_REG_PWM_DUTY
	.no_dead_strip	_pwm_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwm_store
_pwm_store:                             ; @pwm_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x2
	mov	x22, x1
	mov	x23, x0
	bl	_dev_get_drvdata
	mov	x20, x0
	mov	x0, x22
	bl	_to_sensor_dev_attr
	ldrsw	x22, [x0]
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _LD_FAN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LD_FAN@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldrsw	x24, [x8, x9, lsl #2]
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #10
	bl	_kstrtoul
	tbnz	x0, #63, LBB0_6
; %bb.1:
	ldr	x8, [sp, #8]
	cmp	x8, #256
	b.hs	LBB0_6
; %bb.2:
	add	x21, x20, #24
	mov	x0, x21
	bl	_mutex_lock
	mov	x0, x20
	mov	x1, x22
	bl	_pc87427_readall_pwm
	ldr	x8, [x20, #8]
	ldr	w8, [x8, x22, lsl #2]
Lloh3:
	adrp	x9, _PWM_ENABLE_MODE_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PWM_ENABLE_MODE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w26, w9, w8
Lloh6:
	adrp	x25, _PWM_MODE_MANUAL@GOTPAGE
Lloh7:
	ldr	x25, [x25, _PWM_MODE_MANUAL@GOTPAGEOFF]
	ldr	w2, [x25]
Lloh8:
	adrp	x27, _PWM_MODE_OFF@GOTPAGE
Lloh9:
	ldr	x27, [x27, _PWM_MODE_OFF@GOTPAGEOFF]
	ldr	w8, [x27]
	cmp	w26, w2
	ccmp	w26, w8, #4, ne
	b.ne	LBB0_7
; %bb.3:
	ldr	x9, [sp, #8]
	cmp	w26, w2
	ccmp	x9, #0, #0, eq
	b.eq	LBB0_9
; %bb.4:
	cmp	w26, w8
	ccmp	x9, #0, #4, eq
	b.eq	LBB0_11
; %bb.5:
	mov	x0, x20
	mov	x1, x22
	bl	_update_pwm_enable
	ldr	w26, [x25]
	add	w2, w22, #1
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh12:
	adrp	x3, l_.str.3@PAGE
Lloh13:
	add	x3, x3, l_.str.3@PAGEOFF
Lloh14:
	adrp	x4, l_.str.2@PAGE
Lloh15:
	add	x4, x4, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_6:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	add	w2, w22, #1
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_dev_notice
	mov	x0, x21
	bl	_mutex_unlock
Lloh20:
	adrp	x8, _EPERM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_8:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_14
LBB0_9:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x8
	bl	_update_pwm_enable
	ldr	w26, [x27]
	add	w2, w22, #1
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh24:
	adrp	x3, l_.str.2@PAGE
Lloh25:
	add	x3, x3, l_.str.2@PAGEOFF
Lloh26:
	adrp	x4, l_.str.3@PAGE
Lloh27:
	add	x4, x4, l_.str.3@PAGEOFF
LBB0_10:
	mov	x0, x23
	bl	_dev_dbg
LBB0_11:
	ldr	x8, [sp, #8]
	ldr	x9, [x20, #16]
	str	x8, [x9, x22, lsl #3]
	ldr	w8, [x25]
	cmp	w26, w8
	b.ne	LBB0_13
; %bb.12:
	ldr	x0, [sp, #8]
Lloh28:
	adrp	x8, _PC87427_REG_PWM_DUTY@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PC87427_REG_PWM_DUTY@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	add	x1, x8, x24
	bl	_outb
LBB0_13:
	mov	x0, x21
	bl	_mutex_unlock
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_LD_FAN,8,3                     ; @LD_FAN
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_PWM_ENABLE_MODE_MASK,4,2       ; @PWM_ENABLE_MODE_MASK
	.comm	_PWM_MODE_MANUAL,4,2            ; @PWM_MODE_MANUAL
	.comm	_PWM_MODE_OFF,4,2               ; @PWM_MODE_OFF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't set PWM%d duty cycle while not in manual mode\n"

	.comm	_EPERM,8,3                      ; @EPERM
l_.str.1:                               ; @.str.1
	.asciz	"Switching PWM%d from %s to %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"manual"

l_.str.3:                               ; @.str.3
	.asciz	"off"

	.comm	_PC87427_REG_PWM_DUTY,8,3       ; @PC87427_REG_PWM_DUTY
	.no_dead_strip	_pwm_store
.subsections_via_symbols
