	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_pwm
_set_pwm:                               ## @set_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
	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, %r13
	movq	%rdx, %r12
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr_2
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_to_i2c_client
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_i2c_get_clientdata
	movq	%rax, %rbx
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	movl	$10, %esi
	callq	_strict_strtol
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subq	(%rax), %r13
	jmp	LBB0_13
LBB0_2:
	movq	%rbx, %r12
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	(%r14), %eax
	cmpl	$128, %eax
	je	LBB0_8
## %bb.3:
	cmpl	$129, %eax
	je	LBB0_9
## %bb.4:
	cmpl	$130, %eax
	jne	LBB0_5
## %bb.6:
	movq	8(%r14), %rdi
	callq	_PWM_CONFIG_REG
	movl	%eax, %edi
	callq	_adt7475_read
	movq	(%rbx), %rcx
	movq	_CONTROL@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movq	8(%r14), %rdi
	movl	%eax, (%rcx,%rdi,4)
	notl	%eax
	testb	$-32, %al
	jne	LBB0_12
## %bb.7:
	callq	_PWM_REG
	jmp	LBB0_10
LBB0_8:
	movq	8(%r14), %rdi
	callq	_PWM_MIN_REG
	jmp	LBB0_10
LBB0_9:
	movq	8(%r14), %rdi
	callq	_PWM_MAX_REG
LBB0_10:
                                        ## kill: def $al killed $al def $eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_11
LBB0_5:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_11:
	movq	-56(%rbp), %rdi
	xorl	%esi, %esi
	movl	$255, %edx
	callq	_SENSORS_LIMIT
	movq	(%rbx), %rcx
	movslq	(%r14), %rdx
	movq	(%rcx,%rdx,8), %rdx
	movq	8(%r14), %rsi
	movl	%eax, (%rdx,%rsi,4)
	movslq	(%r14), %rax
	movq	(%rcx,%rax,8), %rax
	movl	(%rax,%rsi,4), %edx
	movzbl	-44(%rbp), %esi                 ## 1-byte Folded Reload
	movq	%r15, %rdi
	callq	_i2c_smbus_write_byte_data
LBB0_12:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_13:
	movq	%r13, %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
	.comm	_CONTROL,8,3                    ## @CONTROL
	.no_dead_strip	_set_pwm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_pwm
_set_pwm:                               ; @set_pwm
	.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	x22, x2
	mov	x21, x0
	mov	x0, x1
	bl	_to_sensor_dev_attr_2
	mov	x20, x0
	mov	x0, x21
	bl	_to_i2c_client
	mov	x21, x0
	bl	_i2c_get_clientdata
	mov	x23, x0
	add	x2, sp, #8
	mov	x0, x22
	mov	w1, #10
	bl	_strict_strtol
	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_13
LBB0_2:
	add	x22, x23, #8
	mov	x0, x22
	bl	_mutex_lock
	ldr	w8, [x20]
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.3:
	cmp	w8, #129
	b.eq	LBB0_8
; %bb.4:
	cmp	w8, #130
	b.ne	LBB0_10
; %bb.5:
	ldr	x0, [x20, #8]
	bl	_PWM_CONFIG_REG
	bl	_adt7475_read
	mov	x8, x0
	mvn	w9, w0
	ldr	x10, [x23]
Lloh3:
	adrp	x11, _CONTROL@GOTPAGE
Lloh4:
	ldr	x11, [x11, _CONTROL@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	ldr	x10, [x10, x11, lsl #3]
	ldr	x0, [x20, #8]
	str	w8, [x10, x0, lsl #2]
	tst	w9, #0xe0
	b.ne	LBB0_12
; %bb.6:
	bl	_PWM_REG
	b	LBB0_9
LBB0_7:
	ldr	x0, [x20, #8]
	bl	_PWM_MIN_REG
	b	LBB0_9
LBB0_8:
	ldr	x0, [x20, #8]
	bl	_PWM_MAX_REG
LBB0_9:
	mov	x24, x0
	b	LBB0_11
LBB0_10:
	mov	w24, #0
LBB0_11:
	ldr	x0, [sp, #8]
	mov	w1, #0
	mov	w2, #255
	bl	_SENSORS_LIMIT
	ldr	x8, [x23]
	ldrsw	x9, [x20]
	ldr	x9, [x8, x9, lsl #3]
	ldr	x10, [x20, #8]
	lsl	x10, x10, #2
	str	w0, [x9, x10]
	ldrsw	x9, [x20]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w2, [x8, x10]
	mov	x0, x21
	mov	x1, x24
	bl	_i2c_smbus_write_byte_data
LBB0_12:
	mov	x0, x22
	bl	_mutex_unlock
LBB0_13:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_CONTROL,8,3                    ; @CONTROL
	.no_dead_strip	_set_pwm
.subsections_via_symbols
