	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function store_pwm2_enable
_store_pwm2_enable:                     ## @store_pwm2_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
	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, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r13
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtoul
	movl	%eax, %r12d
	leaq	4(%r13), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	cmpl	$1, %r12d
	ja	LBB0_2
## %bb.1:
	movq	_W83781D_REG_PWMCLK12@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_w83781d_read_value
	movl	(%rbx), %esi
	andl	$247, %eax
	leal	(,%r12,8), %edx
	orl	%eax, %edx
	movq	%r13, %rdi
	callq	_w83781d_write_value
	movq	_W83781D_REG_BEEP_CONFIG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_w83781d_read_value
	movl	(%rbx), %esi
	andl	$239, %eax
	xorl	%edx, %edx
	testl	%r12d, %r12d
	sete	%dl
	shll	$4, %edx
	orl	%eax, %edx
	movq	%r13, %rdi
	callq	_w83781d_write_value
	movl	%r12d, (%r13)
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_3
LBB0_2:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subq	(%rax), %r14
LBB0_3:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_W83781D_REG_PWMCLK12,4,2       ## @W83781D_REG_PWMCLK12
	.comm	_W83781D_REG_BEEP_CONFIG,4,2    ## @W83781D_REG_BEEP_CONFIG
	.comm	_EINVAL,8,3                     ## @EINVAL
	.no_dead_strip	_store_pwm2_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function store_pwm2_enable
_store_pwm2_enable:                     ; @store_pwm2_enable
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x21, x2
	bl	_dev_get_drvdata
	mov	x20, x0
	mov	x0, x21
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtoul
	mov	x22, x0
	add	x21, x20, #4
	mov	x0, x21
	bl	_mutex_lock
	cmp	w22, #1
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x23, _W83781D_REG_PWMCLK12@GOTPAGE
Lloh1:
	ldr	x23, [x23, _W83781D_REG_PWMCLK12@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_w83781d_read_value
	ldr	w1, [x23]
	mov	w8, #247
	and	w8, w0, w8
	cmp	w22, #0
	cset	w23, eq
	orr	w2, w8, w22, lsl #3
	mov	x0, x20
	bl	_w83781d_write_value
Lloh2:
	adrp	x24, _W83781D_REG_BEEP_CONFIG@GOTPAGE
Lloh3:
	ldr	x24, [x24, _W83781D_REG_BEEP_CONFIG@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x20
	bl	_w83781d_read_value
	ldr	w1, [x24]
	mov	w8, #239
	and	w2, w0, w8
	bfi	w2, w23, #4, #1
	mov	x0, x20
	bl	_w83781d_write_value
	str	w22, [x20]
	mov	x0, x21
	bl	_mutex_unlock
	b	LBB0_3
LBB0_2:
	mov	x0, x21
	bl	_mutex_unlock
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_3:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_W83781D_REG_PWMCLK12,4,2       ; @W83781D_REG_PWMCLK12
	.comm	_W83781D_REG_BEEP_CONFIG,4,2    ; @W83781D_REG_BEEP_CONFIG
	.comm	_EINVAL,8,3                     ; @EINVAL
	.no_dead_strip	_store_pwm2_enable
.subsections_via_symbols
