	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw_adapter_restart
_ipw_adapter_restart:                   ## @ipw_adapter_restart
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_STATUS_RF_KILL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_1
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	callq	_ipw_down
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	_WLAN_CAPABILITY_IBSS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_ipw_remove_current_network
LBB0_4:
	movq	%rbx, %rdi
	callq	_ipw_up
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_IPW_ERROR                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_STATUS_RF_KILL_MASK,4,2        ## @STATUS_RF_KILL_MASK
	.comm	_WLAN_CAPABILITY_IBSS,4,2       ## @WLAN_CAPABILITY_IBSS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to up device\n"

	.no_dead_strip	_ipw_adapter_restart
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw_adapter_restart
_ipw_adapter_restart:                   ; @ipw_adapter_restart
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _STATUS_RF_KILL_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STATUS_RF_KILL_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
	bl	_ipw_down
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _WLAN_CAPABILITY_IBSS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WLAN_CAPABILITY_IBSS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_ipw_remove_current_network
LBB0_5:
	mov	x0, x19
	bl	_ipw_up
	cbz	x0, LBB0_1
; %bb.6:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_IPW_ERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_STATUS_RF_KILL_MASK,4,2        ; @STATUS_RF_KILL_MASK
	.comm	_WLAN_CAPABILITY_IBSS,4,2       ; @WLAN_CAPABILITY_IBSS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to up device\n"

	.no_dead_strip	_ipw_adapter_restart
.subsections_via_symbols
