	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_legacy_tt_handler
_iwl_legacy_tt_handler:                 ## @iwl_legacy_tt_handler
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rdi, %rbx
	movl	16(%rdi), %r15d
	movq	_IWL_MINIMAL_POWER_THRESHOLD@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jle	LBB0_1
## %bb.2:
	movq	_IWL_REDUCED_PERFORMANCE_THRESHOLD_2@GOTPCREL(%rip), %rcx
	movl	$128, %eax
	cmpq	%rsi, (%rcx)
	jle	LBB0_4
## %bb.3:
	movq	_IWL_REDUCED_PERFORMANCE_THRESHOLD_1@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpq	%rsi, (%rcx)
	setg	%al
	addl	$129, %eax
	jmp	LBB0_4
LBB0_1:
	movq	_IWL_TI_CT_KILL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	movl	%eax, 16(%rbx)
	leaq	32(%rbx), %rdi
	callq	_del_timer_sync
	movl	16(%rbx), %eax
	cmpl	%r15d, %eax
	jne	LBB0_5
## %bb.28:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	cmpl	$130, %eax
	je	LBB0_12
## %bb.6:
	cmpl	$129, %eax
	je	LBB0_7
## %bb.8:
	cmpl	$128, %eax
	jne	LBB0_10
## %bb.9:
	movq	_IWL_POWER_INDEX_4@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_7:
	movq	_IWL_POWER_INDEX_3@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	movq	_IWL_POWER_INDEX_5@GOTPCREL(%rip), %rax
LBB0_11:
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
LBB0_12:
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_IWL_TI_CT_KILL@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	cmpl	%eax, %r15d
	jne	LBB0_14
## %bb.13:
	movq	_STATUS_CT_KILL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%rbx), %rsi
	callq	_clear_bit
	movl	(%r12), %eax
LBB0_14:
	cmpl	%eax, 16(%rbx)
	jne	LBB0_15
LBB0_20:
	testl	%r14d, %r14d
	je	LBB0_22
## %bb.21:
	movq	_STATUS_CT_KILL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%rbx), %rsi
	callq	_set_bit
	movq	%rbx, %rdi
	movl	$1, %esi
LBB0_25:
	callq	_iwl_perform_ct_kill_task
	jmp	LBB0_26
LBB0_15:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_iwl_power_update_mode
	testq	%rax, %rax
	je	LBB0_19
## %bb.16:
	cmpl	(%r12), %r15d
	jne	LBB0_18
## %bb.17:
	movq	_STATUS_CT_KILL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%rbx), %rsi
	callq	_set_bit
LBB0_18:
	movl	%r15d, 16(%rbx)
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_IWL_ERR
	jmp	LBB0_27
LBB0_22:
	movq	%rbx, %rdi
	callq	_iwl_prepare_ct_kill_task
	movl	%r15d, 16(%rbx)
LBB0_26:
	movslq	16(%rbx), %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_IWL_DEBUG_TEMP
	movq	24(%rbx), %rdx
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_IWL_DEBUG_TEMP
LBB0_27:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
LBB0_19:
	movl	(%r12), %eax
	cmpl	%eax, 16(%rbx)
	je	LBB0_20
## %bb.23:
	cmpl	%eax, %r15d
	jne	LBB0_26
## %bb.24:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_IWL_MINIMAL_POWER_THRESHOLD,8,3 ## @IWL_MINIMAL_POWER_THRESHOLD
	.comm	_IWL_TI_CT_KILL,4,2             ## @IWL_TI_CT_KILL
	.comm	_IWL_REDUCED_PERFORMANCE_THRESHOLD_2,8,3 ## @IWL_REDUCED_PERFORMANCE_THRESHOLD_2
	.comm	_IWL_REDUCED_PERFORMANCE_THRESHOLD_1,8,3 ## @IWL_REDUCED_PERFORMANCE_THRESHOLD_1
	.comm	_IWL_POWER_INDEX_3,8,3          ## @IWL_POWER_INDEX_3
	.comm	_IWL_POWER_INDEX_4,8,3          ## @IWL_POWER_INDEX_4
	.comm	_IWL_POWER_INDEX_5,8,3          ## @IWL_POWER_INDEX_5
	.comm	_STATUS_CT_KILL,4,2             ## @STATUS_CT_KILL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot update power mode, TT state not updated\n"

L_.str.1:                               ## @.str.1
	.asciz	"Temperature state changed %u\n"

L_.str.2:                               ## @.str.2
	.asciz	"Power Index change to %u\n"

	.comm	_IWL_TT_INCREASE_MARGIN,8,3     ## @IWL_TT_INCREASE_MARGIN
	.no_dead_strip	_iwl_legacy_tt_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_legacy_tt_handler
_iwl_legacy_tt_handler:                 ; @iwl_legacy_tt_handler
	.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
	mov	x20, x2
	mov	x19, x0
	ldr	w21, [x0, #16]
Lloh0:
	adrp	x8, _IWL_MINIMAL_POWER_THRESHOLD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IWL_MINIMAL_POWER_THRESHOLD@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.le	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _IWL_REDUCED_PERFORMANCE_THRESHOLD_2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IWL_REDUCED_PERFORMANCE_THRESHOLD_2@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x1
	b.le	LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _IWL_REDUCED_PERFORMANCE_THRESHOLD_1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IWL_REDUCED_PERFORMANCE_THRESHOLD_1@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, x1
	mov	w8, #129
	cinc	w8, w8, gt
	b	LBB0_5
LBB0_3:
Lloh9:
	adrp	x8, _IWL_TI_CT_KILL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IWL_TI_CT_KILL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	b	LBB0_5
LBB0_4:
	mov	w8, #128
LBB0_5:
	str	w8, [x19, #16]
	add	x0, x19, #32
	bl	_del_timer_sync
	ldr	w8, [x19, #16]
	cmp	w8, w21
	b.ne	LBB0_7
; %bb.6:
	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_7:
	cmp	w8, #130
	b.eq	LBB0_9
; %bb.8:
Lloh12:
	adrp	x9, _IWL_POWER_INDEX_3@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IWL_POWER_INDEX_3@GOTPAGEOFF]
Lloh14:
	adrp	x10, _IWL_POWER_INDEX_5@GOTPAGE
Lloh15:
	ldr	x10, [x10, _IWL_POWER_INDEX_5@GOTPAGEOFF]
Lloh16:
	adrp	x11, _IWL_POWER_INDEX_4@GOTPAGE
Lloh17:
	ldr	x11, [x11, _IWL_POWER_INDEX_4@GOTPAGEOFF]
	cmp	w8, #128
	csel	x10, x10, x11, ne
	cmp	w8, #129
	csel	x8, x9, x10, eq
	ldr	x8, [x8]
	str	x8, [x19, #24]
LBB0_9:
	mov	x0, x19
	bl	_mutex_lock
Lloh18:
	adrp	x22, _IWL_TI_CT_KILL@GOTPAGE
Lloh19:
	ldr	x22, [x22, _IWL_TI_CT_KILL@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w21, w8
	b.ne	LBB0_11
; %bb.10:
Lloh20:
	adrp	x8, _STATUS_CT_KILL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _STATUS_CT_KILL@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_clear_bit
	ldr	w8, [x22]
LBB0_11:
	ldr	w9, [x19, #16]
	cmp	w9, w8
	b.ne	LBB0_15
LBB0_12:
	cbz	w20, LBB0_19
; %bb.13:
Lloh23:
	adrp	x8, _STATUS_CT_KILL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _STATUS_CT_KILL@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_set_bit
	mov	x0, x19
	mov	w1, #1
LBB0_14:
	bl	_iwl_perform_ct_kill_task
	b	LBB0_20
LBB0_15:
	mov	x0, x19
	mov	w1, #1
	bl	_iwl_power_update_mode
	cbz	x0, LBB0_22
; %bb.16:
	ldr	w8, [x22]
	cmp	w21, w8
	b.ne	LBB0_18
; %bb.17:
Lloh26:
	adrp	x8, _STATUS_CT_KILL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _STATUS_CT_KILL@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_set_bit
LBB0_18:
	str	w21, [x19, #16]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_IWL_ERR
	b	LBB0_21
LBB0_19:
	mov	x0, x19
	bl	_iwl_prepare_ct_kill_task
	str	w21, [x19, #16]
LBB0_20:
	ldrsw	x2, [x19, #16]
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_TEMP
	ldr	x2, [x19, #24]
Lloh33:
	adrp	x1, l_.str.2@PAGE
Lloh34:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_TEMP
LBB0_21:
	mov	x0, x19
	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
	b	_mutex_unlock
LBB0_22:
	ldr	w9, [x19, #16]
	ldr	w8, [x22]
	cmp	w9, w8
	b.eq	LBB0_12
; %bb.23:
	cmp	w21, w8
	b.ne	LBB0_20
; %bb.24:
	mov	x0, x19
	mov	w1, #0
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_IWL_MINIMAL_POWER_THRESHOLD,8,3 ; @IWL_MINIMAL_POWER_THRESHOLD
	.comm	_IWL_TI_CT_KILL,4,2             ; @IWL_TI_CT_KILL
	.comm	_IWL_REDUCED_PERFORMANCE_THRESHOLD_2,8,3 ; @IWL_REDUCED_PERFORMANCE_THRESHOLD_2
	.comm	_IWL_REDUCED_PERFORMANCE_THRESHOLD_1,8,3 ; @IWL_REDUCED_PERFORMANCE_THRESHOLD_1
	.comm	_IWL_POWER_INDEX_3,8,3          ; @IWL_POWER_INDEX_3
	.comm	_IWL_POWER_INDEX_4,8,3          ; @IWL_POWER_INDEX_4
	.comm	_IWL_POWER_INDEX_5,8,3          ; @IWL_POWER_INDEX_5
	.comm	_STATUS_CT_KILL,4,2             ; @STATUS_CT_KILL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot update power mode, TT state not updated\n"

l_.str.1:                               ; @.str.1
	.asciz	"Temperature state changed %u\n"

l_.str.2:                               ; @.str.2
	.asciz	"Power Index change to %u\n"

	.comm	_IWL_TT_INCREASE_MARGIN,8,3     ; @IWL_TT_INCREASE_MARGIN
	.no_dead_strip	_iwl_legacy_tt_handler
.subsections_via_symbols
