	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwm_fan_set_cur_state
_pwm_fan_set_cur_state:                 ## @pwm_fan_set_cur_state
	.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	8(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r15
	cmpq	%rsi, (%rbx)
	jae	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_7:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%r12d, %r12d
	cmpq	%r15, 8(%rbx)
	je	LBB0_7
## %bb.4:
	movq	%rdi, %r14
	movq	16(%rbx), %rax
	movl	(%rax,%r15,4), %esi
	movq	%rbx, %rdi
	callq	___set_pwm
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movl	%r13d, %r12d
	jmp	LBB0_7
LBB0_6:
	movq	%r15, 8(%rbx)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot set pwm!\n"

	.no_dead_strip	_pwm_fan_set_cur_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwm_fan_set_cur_state
_pwm_fan_set_cur_state:                 ; @pwm_fan_set_cur_state
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x22, [x0, #8]
	cbz	x22, LBB0_2
; %bb.1:
	mov	x20, x1
	ldr	x8, [x22]
	cmp	x8, x1
	b.hs	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_3:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	x8, [x22, #8]
	cmp	x8, x20
	b.ne	LBB0_6
; %bb.5:
	mov	w21, #0
	b	LBB0_3
LBB0_6:
	mov	x19, x0
	ldr	x8, [x22, #16]
	ldr	w1, [x8, x20, lsl #2]
	mov	x0, x22
	bl	___set_pwm
	mov	x21, x0
	cbz	w0, LBB0_8
; %bb.7:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_3
LBB0_8:
	str	x20, [x22, #8]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot set pwm!\n"

	.no_dead_strip	_pwm_fan_set_cur_state
.subsections_via_symbols
