	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function power_state_store
_power_state_store:                     ## @power_state_store
	.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	%rcx, %r13
	movq	%rdx, %rbx
	callq	_to_gb_interface
	movq	%rax, %r15
	leaq	-44(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_kstrtobool
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_10
LBB0_2:
	leaq	4(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	-44(%rbp), %eax
	cmpl	(%r15), %eax
	je	LBB0_9
## %bb.3:
	movq	%r15, %rdi
	testl	%eax, %eax
	je	LBB0_11
## %bb.4:
	callq	_gb_interface_activate
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r12d
	addq	$8, %r15
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_8
LBB0_11:
	callq	_gb_interface_disable
	movq	%r15, %rdi
	callq	_gb_interface_deactivate
	jmp	LBB0_9
LBB0_6:
	movq	%r15, %rdi
	callq	_gb_interface_enable
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	movl	%eax, %r12d
	movq	%r15, %rdi
	addq	$8, %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	%r15, %rdi
	callq	_gb_interface_deactivate
LBB0_8:
	movl	%r12d, %r13d
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_10:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to activate interface: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to enable interface: %d\n"

	.no_dead_strip	_power_state_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function power_state_store
_power_state_store:                     ; @power_state_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x3
	mov	x20, x2
	bl	_to_gb_interface
	mov	x21, x0
	add	x1, sp, #12
	mov	x0, x20
	bl	_kstrtobool
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_11
LBB0_2:
	add	x20, x21, #4
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [sp, #12]
	ldr	w9, [x21]
	cmp	w8, w9
	b.eq	LBB0_10
; %bb.3:
	mov	x0, x21
	cbz	w8, LBB0_6
; %bb.4:
	bl	_gb_interface_activate
	cbz	w0, LBB0_7
; %bb.5:
	mov	x22, x0
	add	x0, x21, #8
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_dev_err
	b	LBB0_9
LBB0_6:
	bl	_gb_interface_disable
	mov	x0, x21
	bl	_gb_interface_deactivate
	b	LBB0_10
LBB0_7:
	mov	x0, x21
	bl	_gb_interface_enable
	cbz	w0, LBB0_10
; %bb.8:
	mov	x22, x0
	add	x0, x21, #8
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	bl	_dev_err
	mov	x0, x21
	bl	_gb_interface_deactivate
LBB0_9:
	mov	x19, x22
LBB0_10:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_11:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to activate interface: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to enable interface: %d\n"

	.no_dead_strip	_power_state_store
.subsections_via_symbols
