	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il_power_set_mode
_il_power_set_mode:                     ## @il_power_set_mode
	.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
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	addq	$28, %rdi
	callq	_lockdep_assert_held
	movq	8(%rbx), %rax
	movq	_IL_CHAIN_NOISE_DONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%r13b
	movq	_IL_CHAIN_NOISE_ALIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	-42(%rbp)                       ## 1-byte Folded Spill
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_memcmp
	xorl	%r14d, %r14d
	orl	%r12d, %eax
	je	LBB0_17
## %bb.1:
	movq	%rbx, %rdi
	callq	_il_is_ready_rf
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movb	%r13b, -41(%rbp)                ## 1-byte Spill
	leaq	4(%rbx), %rdi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	_S_SCANNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%rbx), %r13
	movq	%r13, %rsi
	callq	_test_bit
	testl	%r12d, %r12d
	jne	LBB0_6
## %bb.4:
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	callq	_D_INFO
	jmp	LBB0_17
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_17
LBB0_6:
	movq	_IL_POWER_DRIVER_ALLOW_SLEEP_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_8
## %bb.7:
	movq	_S_POWER_PMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_set_bit
LBB0_8:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_il_set_power
	testl	%eax, %eax
	je	LBB0_9
## %bb.16:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_IL_ERR
	movl	%r12d, %r14d
	jmp	LBB0_17
LBB0_9:
	movb	-41(%rbp), %r12b                ## 1-byte Reload
	orb	-42(%rbp), %r12b                ## 1-byte Folded Reload
	movq	_IL_POWER_DRIVER_ALLOW_SLEEP_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	jne	LBB0_11
## %bb.10:
	movq	_S_POWER_PMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_clear_bit
LBB0_11:
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	setne	%cl
	andb	%r12b, %cl
	cmpb	$1, %cl
	jne	LBB0_13
## %bb.12:
	movq	%rbx, %rdi
	callq	*%rax
	jmp	LBB0_15
LBB0_13:
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	8(%rbx), %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_D_POWER
LBB0_15:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_memcpy
LBB0_17:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IL_CHAIN_NOISE_DONE,8,3        ## @IL_CHAIN_NOISE_DONE
	.comm	_IL_CHAIN_NOISE_ALIVE,8,3       ## @IL_CHAIN_NOISE_ALIVE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_S_SCANNING,4,2                 ## @S_SCANNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Defer power set mode while scanning\n"

	.comm	_IL_POWER_DRIVER_ALLOW_SLEEP_MSK,4,2 ## @IL_POWER_DRIVER_ALLOW_SLEEP_MSK
	.comm	_S_POWER_PMI,4,2                ## @S_POWER_PMI
L_.str.1:                               ## @.str.1
	.asciz	"Cannot update the power, chain noise calibration running: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"set power fail, ret = %d"

	.no_dead_strip	_il_power_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il_power_set_mode
_il_power_set_mode:                     ; @il_power_set_mode
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	add	x0, x0, #28
	bl	_lockdep_assert_held
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x9, _IL_CHAIN_NOISE_DONE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IL_CHAIN_NOISE_DONE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh3:
	adrp	x9, _IL_CHAIN_NOISE_ALIVE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IL_CHAIN_NOISE_ALIVE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w23, eq
	mov	x0, x20
	mov	x1, x19
	mov	w2, #4
	bl	_memcmp
	orr	w8, w0, w21
	cbz	w8, LBB0_17
; %bb.1:
	mov	x0, x20
	bl	_il_is_ready_rf
	cbz	w0, LBB0_5
; %bb.2:
	add	x0, x20, #4
	mov	x1, x19
	mov	w2, #4
	bl	_memcpy
Lloh6:
	adrp	x8, _S_SCANNING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _S_SCANNING@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	add	x22, x20, #24
	mov	x1, x22
	bl	_test_bit
	cbnz	w21, LBB0_6
; %bb.3:
	cbz	x0, LBB0_6
; %bb.4:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_D_INFO
	b	LBB0_17
LBB0_5:
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_18
LBB0_6:
	ldr	w8, [x19]
Lloh14:
	adrp	x24, _IL_POWER_DRIVER_ALLOW_SLEEP_MSK@GOTPAGE
Lloh15:
	ldr	x24, [x24, _IL_POWER_DRIVER_ALLOW_SLEEP_MSK@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
Lloh16:
	adrp	x8, _S_POWER_PMI@GOTPAGE
Lloh17:
	ldr	x8, [x8, _S_POWER_PMI@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_set_bit
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	bl	_il_set_power
	cbz	w0, LBB0_10
; %bb.9:
	mov	x21, x0
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_IL_ERR
	b	LBB0_18
LBB0_10:
	ldr	w8, [x19]
	ldr	w9, [x24]
	tst	w9, w8
	b.ne	LBB0_12
; %bb.11:
Lloh21:
	adrp	x8, _S_POWER_PMI@GOTPAGE
Lloh22:
	ldr	x8, [x8, _S_POWER_PMI@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_clear_bit
LBB0_12:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w9, ne
	and	w9, w9, w23
	cmp	w9, #1
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x20
	blr	x8
	b	LBB0_16
LBB0_14:
	cbz	x8, LBB0_16
; %bb.15:
	ldr	x1, [x20, #8]
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_D_POWER
LBB0_16:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #4
	bl	_memcpy
LBB0_17:
	mov	w21, #0
LBB0_18:
	mov	x0, x21
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_IL_CHAIN_NOISE_DONE,8,3        ; @IL_CHAIN_NOISE_DONE
	.comm	_IL_CHAIN_NOISE_ALIVE,8,3       ; @IL_CHAIN_NOISE_ALIVE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_S_SCANNING,4,2                 ; @S_SCANNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Defer power set mode while scanning\n"

	.comm	_IL_POWER_DRIVER_ALLOW_SLEEP_MSK,4,2 ; @IL_POWER_DRIVER_ALLOW_SLEEP_MSK
	.comm	_S_POWER_PMI,4,2                ; @S_POWER_PMI
l_.str.1:                               ; @.str.1
	.asciz	"Cannot update the power, chain noise calibration running: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"set power fail, ret = %d"

	.no_dead_strip	_il_power_set_mode
.subsections_via_symbols
