	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw_wx_set_mode
_ipw_wx_set_mode:                       ## @ipw_wx_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	callq	_libipw_priv
	movq	%rax, %r14
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdi
	callq	_IPW_DEBUG_WX
	movl	(%r15), %eax
	cmpl	$129, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$131, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$130, %eax
	jne	LBB0_7
## %bb.3:
	movl	$129, (%r15)
	movl	$129, %eax
LBB0_4:
	movq	8(%r14), %rcx
	xorl	%ebx, %ebx
	cmpl	(%rcx), %eax
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_mutex_lock
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ipw_sw_reset
	xorl	%eax, %eax
	callq	_free_firmware
	movl	(%r15), %eax
	movq	8(%r14), %rcx
	movl	%eax, (%rcx)
	movq	%r14, %rdi
	addq	$4, %rdi
	callq	_schedule_work
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_6
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set MODE: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ARPHRD_ETHER,4,2               ## @ARPHRD_ETHER
	.comm	_ARPHRD_IEEE80211,4,2           ## @ARPHRD_IEEE80211
	.comm	_ARPHRD_IEEE80211_RADIOTAP,4,2  ## @ARPHRD_IEEE80211_RADIOTAP
	.no_dead_strip	_ipw_wx_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw_wx_set_mode
_ipw_wx_set_mode:                       ; @ipw_wx_set_mode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
	bl	_libipw_priv
	mov	x19, x0
	ldr	w1, [x20]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IPW_DEBUG_WX
	ldr	w8, [x20]
	cmp	w8, #129
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #131
	b.eq	LBB0_4
; %bb.2:
	cmp	w8, #130
	b.ne	LBB0_7
; %bb.3:
	mov	w8, #129
	str	w8, [x20]
LBB0_4:
	ldr	x9, [x19, #8]
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	mov	w1, #0
	bl	_ipw_sw_reset
	bl	_free_firmware
	ldr	w8, [x20]
	ldr	x9, [x19, #8]
	str	w8, [x9]
	add	x0, x19, #4
	bl	_schedule_work
	mov	x0, x19
	bl	_mutex_unlock
LBB0_6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set MODE: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ARPHRD_ETHER,4,2               ; @ARPHRD_ETHER
	.comm	_ARPHRD_IEEE80211,4,2           ; @ARPHRD_IEEE80211
	.comm	_ARPHRD_IEEE80211_RADIOTAP,4,2  ; @ARPHRD_IEEE80211_RADIOTAP
	.no_dead_strip	_ipw_wx_set_mode
.subsections_via_symbols
