	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw2100_wx_set_power
_ipw2100_wx_set_power:                  ## @ipw2100_wx_set_power
	.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	%rdx, %r15
	callq	_libipw_priv
	movq	%rax, %rbx
	leaq	8(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_STATUS_INITIALIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_1
## %bb.2:
	cmpq	$0, 8(%r15)
	je	LBB0_4
## %bb.3:
	movl	4(%rbx), %edi
	callq	_IPW_POWER_LEVEL
	movl	%eax, 4(%rbx)
	movq	_IPW_POWER_MODE_CAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ipw2100_set_power_mode
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_IPW_DEBUG_WX
	jmp	LBB0_7
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_4:
	movl	(%r15), %esi
	testb	$-128, %sil
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_IPW_DEBUG_WX
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_6:
	movq	_IPW_POWER_ENABLED@GOTPCREL(%rip), %rax
	movl	4(%rbx), %edi
	orl	(%rax), %edi
	movl	%edi, 4(%rbx)
	callq	_IPW_POWER_LEVEL
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ipw2100_set_power_mode
	movl	%eax, %r15d
	movl	4(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_IPW_DEBUG_WX
LBB0_7:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STATUS_INITIALIZED,4,2         ## @STATUS_INITIALIZED
	.comm	_EIO,4,2                        ## @EIO
	.comm	_IPW_POWER_MODE_CAM,4,2         ## @IPW_POWER_MODE_CAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SET Power Management Mode -> off\n"

L_.str.1:                               ## @.str.1
	.asciz	"SET PM Mode: %X not supported.\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_IPW_POWER_ENABLED,4,2          ## @IPW_POWER_ENABLED
L_.str.2:                               ## @.str.2
	.asciz	"SET Power Management Mode -> 0x%02X\n"

	.no_dead_strip	_ipw2100_wx_set_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw2100_wx_set_power
_ipw2100_wx_set_power:                  ; @ipw2100_wx_set_power
	.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	x21, x2
	bl	_libipw_priv
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _STATUS_INITIALIZED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STATUS_INITIALIZED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w0, [x20, #4]
	bl	_IPW_POWER_LEVEL
	str	w0, [x20, #4]
Lloh3:
	adrp	x8, _IPW_POWER_MODE_CAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IPW_POWER_MODE_CAM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ipw2100_set_power_mode
	mov	x21, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_3:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	ldr	w8, [x21]
	tbnz	w8, #7, LBB0_7
; %bb.5:
	str	x8, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IPW_DEBUG_WX
Lloh12:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_7:
Lloh14:
	adrp	x8, _IPW_POWER_ENABLED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IPW_POWER_ENABLED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x20, #4]
	orr	w0, w9, w8
	str	w0, [x20, #4]
	bl	_IPW_POWER_LEVEL
	mov	x1, x0
	mov	x0, x20
	bl	_ipw2100_set_power_mode
	mov	x21, x0
	ldr	w8, [x20, #4]
	str	x8, [sp]
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_8:
	bl	_IPW_DEBUG_WX
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_STATUS_INITIALIZED,4,2         ; @STATUS_INITIALIZED
	.comm	_EIO,4,2                        ; @EIO
	.comm	_IPW_POWER_MODE_CAM,4,2         ; @IPW_POWER_MODE_CAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SET Power Management Mode -> off\n"

l_.str.1:                               ; @.str.1
	.asciz	"SET PM Mode: %X not supported.\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_IPW_POWER_ENABLED,4,2          ; @IPW_POWER_ENABLED
l_.str.2:                               ; @.str.2
	.asciz	"SET Power Management Mode -> 0x%02X\n"

	.no_dead_strip	_ipw2100_wx_set_power
.subsections_via_symbols
