	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwmctrl_store
_pwmctrl_store:                         ## @pwmctrl_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, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr_2
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r13
	movq	16(%rax), %r12
	leaq	-56(%rbp), %rdx
	movq	%r14, %rdi
	movl	$10, %esi
	callq	_kstrtol
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
	jmp	LBB0_3
LBB0_2:
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	(%r15), %rsi
	movq	%r12, %rdi
	callq	_adt7475_read_pwm
	movq	(%r15), %rsi
	movq	-56(%rbp), %rdx
	movq	8(%r13), %rax
	movl	(%rax,%rsi,4), %ecx
	movq	%r12, %rdi
	callq	_hw_set_pwm
	testl	%eax, %eax
	movslq	%eax, %rbx
	cmoveq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	movq	%r13, %rdi
	callq	_mutex_unlock
LBB0_3:
	movq	%rbx, %rax
	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
	.no_dead_strip	_pwmctrl_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwmctrl_store
_pwmctrl_store:                         ; @pwmctrl_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x3
	mov	x23, 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	x22, [x0, #16]
	add	x2, sp, #8
	mov	x0, x23
	mov	w1, #10
	bl	_kstrtol
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_3
LBB0_2:
	mov	x0, x20
	bl	_mutex_lock
	ldr	x1, [x21]
	mov	x0, x22
	bl	_adt7475_read_pwm
	ldr	x1, [x21]
	ldr	x2, [sp, #8]
	ldr	x8, [x20, #8]
	ldr	w3, [x8, x1, lsl #2]
	mov	x0, x22
	bl	_hw_set_pwm
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	cmp	w0, #0
	csel	x19, x19, x8, eq
	mov	x0, x20
	bl	_mutex_unlock
LBB0_3:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.no_dead_strip	_pwmctrl_store
.subsections_via_symbols
