	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function it87_update_pwm_ctrl
_it87_update_pwm_ctrl:                  ## @it87_update_pwm_ctrl
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_IT87_REG_PWM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%esi, %r14
	movl	(%rax,%r14,4), %esi
	callq	_it87_read_value
	movq	(%rbx), %rcx
	movl	%eax, (%rcx,%r14,4)
	movq	%rbx, %rdi
	callq	_has_newer_autopwm
	movq	%rax, %rcx
	movq	(%rbx), %rax
	movl	(%rax,%r14,4), %eax
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	andl	$3, %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx,%r14,4)
	movq	_IT87_REG_PWM_DUTY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r14,4), %esi
	movq	%rbx, %rdi
	callq	_it87_read_value
	jmp	LBB0_5
LBB0_2:
	testb	$-128, %al
	jne	LBB0_3
## %bb.4:
	andl	$127, %eax
LBB0_5:
	leaq	16(%rbx), %rcx
	jmp	LBB0_6
LBB0_3:
	andl	$3, %eax
	leaq	8(%rbx), %rcx
LBB0_6:
	movq	(%rcx), %rcx
	movl	%eax, (%rcx,%r14,4)
	movq	%rbx, %rdi
	callq	_has_old_autopwm
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_IT87_REG_AUTO_TEMP
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_it87_read_value
	movq	32(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	%rax, (%rcx)
	movl	%r14d, %edi
	movl	$1, %esi
	callq	_IT87_REG_AUTO_TEMP
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_it87_read_value
	movq	32(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	%rax, 8(%rcx)
	movl	%r14d, %edi
	movl	$2, %esi
	callq	_IT87_REG_AUTO_TEMP
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_it87_read_value
	movq	32(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	%rax, 16(%rcx)
	movl	%r14d, %edi
	movl	$3, %esi
	callq	_IT87_REG_AUTO_TEMP
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_it87_read_value
	movq	32(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	%rax, 24(%rcx)
	movl	%r14d, %edi
	movl	$4, %esi
	callq	_IT87_REG_AUTO_TEMP
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_it87_read_value
	movq	32(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	%rax, 32(%rcx)
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_IT87_REG_AUTO_PWM
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_it87_read_value
	movq	24(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	%rax, (%rcx)
	movl	%r14d, %edi
	movl	$1, %esi
	callq	_IT87_REG_AUTO_PWM
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_it87_read_value
	movq	24(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	%rax, 8(%rcx)
	movl	%r14d, %edi
	movl	$2, %esi
	callq	_IT87_REG_AUTO_PWM
	movl	%eax, %esi
	movl	$2, %r15d
	jmp	LBB0_10
LBB0_8:
	movq	%rbx, %rdi
	callq	_has_newer_autopwm
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movl	%r14d, %edi
	movl	$5, %esi
	callq	_IT87_REG_AUTO_TEMP
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_it87_read_value
	movq	32(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	%rax, (%rcx)
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_IT87_REG_AUTO_TEMP
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_it87_read_value
	movq	32(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	%rax, 8(%rcx)
	movl	%r14d, %edi
	movl	$1, %esi
	callq	_IT87_REG_AUTO_TEMP
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_it87_read_value
	movq	32(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	%rax, 16(%rcx)
	movl	%r14d, %edi
	movl	$2, %esi
	callq	_IT87_REG_AUTO_TEMP
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_it87_read_value
	movq	32(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	%rax, 24(%rcx)
	movl	%r14d, %edi
	movl	$3, %esi
	callq	_IT87_REG_AUTO_TEMP
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_it87_read_value
	movq	24(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	%rax, (%rcx)
	movl	%r14d, %edi
	movl	$4, %esi
	callq	_IT87_REG_AUTO_TEMP
	movl	%eax, %esi
	movl	$1, %r15d
LBB0_10:
	movq	%rbx, %rdi
	callq	_it87_read_value
	movq	24(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	%rax, (%rcx,%r15,8)
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IT87_REG_PWM,8,3               ## @IT87_REG_PWM
	.comm	_IT87_REG_PWM_DUTY,8,3          ## @IT87_REG_PWM_DUTY
	.no_dead_strip	_it87_update_pwm_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function it87_update_pwm_ctrl
_it87_update_pwm_ctrl:                  ; @it87_update_pwm_ctrl
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _IT87_REG_PWM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IT87_REG_PWM@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sxtw	x21, w20
	sbfiz	x22, x20, #2, #32
	ldr	w1, [x8, x22]
	bl	_it87_read_value
	ldr	x8, [x19]
	str	w0, [x8, x22]
	mov	x0, x19
	bl	_has_newer_autopwm
	ldr	x8, [x19]
	ldr	w8, [x8, x22]
	cbz	x0, LBB0_2
; %bb.1:
	and	w8, w8, #0x3
	ldr	x9, [x19, #8]
	lsl	x10, x21, #2
	str	w8, [x9, x10]
Lloh3:
	adrp	x8, _IT87_REG_PWM_DUTY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IT87_REG_PWM_DUTY@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w1, [x8, x10]
	mov	x0, x19
	bl	_it87_read_value
	add	x8, x19, #16
	b	LBB0_3
LBB0_2:
	and	w9, w8, #0x7f
	add	x10, x19, #16
	and	w11, w8, #0x3
	add	x12, x19, #8
	tst	w8, #0x80
	csel	x8, x10, x12, eq
	csel	w0, w9, w11, eq
LBB0_3:
	ldr	x8, [x8]
	str	w0, [x8, x21, lsl #2]
	mov	x0, x19
	bl	_has_old_autopwm
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x20
	mov	w1, #0
	bl	_IT87_REG_AUTO_TEMP
	mov	x1, x0
	mov	x0, x19
	bl	_it87_read_value
	ldr	x8, [x19, #32]
	lsl	x23, x21, #3
	ldr	x8, [x8, x23]
	str	x0, [x8]
	mov	x0, x20
	mov	w1, #1
	bl	_IT87_REG_AUTO_TEMP
	mov	x1, x0
	mov	x0, x19
	bl	_it87_read_value
	ldr	x8, [x19, #32]
	ldr	x8, [x8, x23]
	str	x0, [x8, #8]
	mov	w22, #2
	mov	x0, x20
	mov	w1, #2
	bl	_IT87_REG_AUTO_TEMP
	mov	x1, x0
	mov	x0, x19
	bl	_it87_read_value
	ldr	x8, [x19, #32]
	ldr	x8, [x8, x23]
	str	x0, [x8, #16]
	mov	x0, x20
	mov	w1, #3
	bl	_IT87_REG_AUTO_TEMP
	mov	x1, x0
	mov	x0, x19
	bl	_it87_read_value
	ldr	x8, [x19, #32]
	ldr	x8, [x8, x23]
	str	x0, [x8, #24]
	mov	x0, x20
	mov	w1, #4
	bl	_IT87_REG_AUTO_TEMP
	mov	x1, x0
	mov	x0, x19
	bl	_it87_read_value
	ldr	x8, [x19, #32]
	ldr	x8, [x8, x23]
	str	x0, [x8, #32]
	mov	x0, x20
	mov	w1, #0
	bl	_IT87_REG_AUTO_PWM
	mov	x1, x0
	mov	x0, x19
	bl	_it87_read_value
	ldr	x8, [x19, #24]
	ldr	x8, [x8, x23]
	str	x0, [x8]
	mov	x0, x20
	mov	w1, #1
	bl	_IT87_REG_AUTO_PWM
	mov	x1, x0
	mov	x0, x19
	bl	_it87_read_value
	ldr	x8, [x19, #24]
	ldr	x8, [x8, x23]
	str	x0, [x8, #8]
	mov	x0, x20
	mov	w1, #2
	bl	_IT87_REG_AUTO_PWM
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_has_newer_autopwm
	cbz	x0, LBB0_8
; %bb.6:
	mov	x0, x20
	mov	w1, #5
	bl	_IT87_REG_AUTO_TEMP
	mov	x1, x0
	mov	x0, x19
	bl	_it87_read_value
	ldr	x8, [x19, #32]
	lsl	x23, x21, #3
	ldr	x8, [x8, x23]
	str	x0, [x8]
	mov	x0, x20
	mov	w1, #0
	bl	_IT87_REG_AUTO_TEMP
	mov	x1, x0
	mov	x0, x19
	bl	_it87_read_value
	ldr	x8, [x19, #32]
	ldr	x8, [x8, x23]
	str	x0, [x8, #8]
	mov	w22, #1
	mov	x0, x20
	mov	w1, #1
	bl	_IT87_REG_AUTO_TEMP
	mov	x1, x0
	mov	x0, x19
	bl	_it87_read_value
	ldr	x8, [x19, #32]
	ldr	x8, [x8, x23]
	str	x0, [x8, #16]
	mov	x0, x20
	mov	w1, #2
	bl	_IT87_REG_AUTO_TEMP
	mov	x1, x0
	mov	x0, x19
	bl	_it87_read_value
	ldr	x8, [x19, #32]
	ldr	x8, [x8, x23]
	str	x0, [x8, #24]
	mov	x0, x20
	mov	w1, #3
	bl	_IT87_REG_AUTO_TEMP
	mov	x1, x0
	mov	x0, x19
	bl	_it87_read_value
	ldr	x8, [x19, #24]
	ldr	x8, [x8, x23]
	str	x0, [x8]
	mov	x0, x20
	mov	w1, #4
	bl	_IT87_REG_AUTO_TEMP
LBB0_7:
	mov	x1, x0
	mov	x0, x19
	bl	_it87_read_value
	ldr	x8, [x19, #24]
	ldr	x8, [x8, x21, lsl #3]
	str	x0, [x8, x22, lsl #3]
LBB0_8:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IT87_REG_PWM,8,3               ; @IT87_REG_PWM
	.comm	_IT87_REG_PWM_DUTY,8,3          ; @IT87_REG_PWM_DUTY
	.no_dead_strip	_it87_update_pwm_ctrl
.subsections_via_symbols
