	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function store_pwm
_store_pwm:                             ## @store_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r13
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr_2
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r12
	movl	(%rbx), %r15d
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movl	$10, %esi
	callq	_kstrtoul
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	cmpq	$256, -48(%rbp)                 ## imm = 0x100
	jae	LBB0_2
## %bb.3:
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	_NCT6683_REG_FAN_CFG_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_NCT6683_FAN_CFG_REQ@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r12, %rdi
	callq	_nct6683_write
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	%r15d, %edi
	callq	_NCT6683_REG_PWM_WRITE
	movq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_nct6683_write
	movl	(%rbx), %esi
	movq	_NCT6683_FAN_CFG_DONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r12, %rdi
	callq	_nct6683_write
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subq	(%rax), %r14
LBB0_4:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_NCT6683_REG_FAN_CFG_CTRL,4,2   ## @NCT6683_REG_FAN_CFG_CTRL
	.comm	_NCT6683_FAN_CFG_REQ,8,3        ## @NCT6683_FAN_CFG_REQ
	.comm	_NCT6683_FAN_CFG_DONE,8,3       ## @NCT6683_FAN_CFG_DONE
	.no_dead_strip	_store_pwm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function store_pwm
_store_pwm:                             ; @store_pwm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x20, x0
	mov	x0, x1
	bl	_to_sensor_dev_attr_2
	mov	x21, x0
	mov	x0, x20
	bl	_dev_get_drvdata
	mov	x20, x0
	ldr	w21, [x21]
	add	x2, sp, #8
	mov	x0, x22
	mov	w1, #10
	bl	_kstrtoul
	cbnz	x0, LBB0_3
; %bb.1:
	ldr	x8, [sp, #8]
	cmp	x8, #256
	b.hs	LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_mutex_lock
Lloh0:
	adrp	x22, _NCT6683_REG_FAN_CFG_CTRL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _NCT6683_REG_FAN_CFG_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x8, _NCT6683_FAN_CFG_REQ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NCT6683_FAN_CFG_REQ@GOTPAGEOFF]
Lloh4:
	ldr	x2, [x8]
	mov	x0, x20
	bl	_nct6683_write
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	mov	x0, x21
	bl	_NCT6683_REG_PWM_WRITE
	mov	x1, x0
	ldr	x2, [sp, #8]
	mov	x0, x20
	bl	_nct6683_write
	ldr	w1, [x22]
Lloh5:
	adrp	x8, _NCT6683_FAN_CFG_DONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NCT6683_FAN_CFG_DONE@GOTPAGEOFF]
Lloh7:
	ldr	x2, [x8]
	mov	x0, x20
	bl	_nct6683_write
	mov	x0, x20
	bl	_mutex_unlock
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_NCT6683_REG_FAN_CFG_CTRL,4,2   ; @NCT6683_REG_FAN_CFG_CTRL
	.comm	_NCT6683_FAN_CFG_REQ,8,3        ; @NCT6683_FAN_CFG_REQ
	.comm	_NCT6683_FAN_CFG_DONE,8,3       ; @NCT6683_FAN_CFG_DONE
	.no_dead_strip	_store_pwm
.subsections_via_symbols
