	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wil_open
_wil_open:                              ## @wil_open
	.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	%rdi, %r15
	callq	_ndev_to_wil
	movq	%rax, %r14
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_wil_dbg_misc
	movq	_debug_fw@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_WMI_FW_CAPABILITY_WMI_ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_wil_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_wil_has_other_active_ifaces
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_wil_dbg_misc
	movq	%r14, %rdi
	callq	_wil_pm_runtime_get
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movq	%r14, %rdi
	callq	_wil_up
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_wil_pm_runtime_put
	movl	%r15d, %ebx
	jmp	LBB0_8
LBB0_5:
	movl	%eax, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open\n"

	.comm	_debug_fw,8,3                   ## @debug_fw
	.comm	_WMI_FW_CAPABILITY_WMI_ONLY,4,2 ## @WMI_FW_CAPABILITY_WMI_ONLY
L_.str.1:                               ## @.str.1
	.asciz	"while in debug_fw or wmi_only mode\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"open, first iface\n"

	.no_dead_strip	_wil_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wil_open
_wil_open:                              ; @wil_open
	.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, x0
	bl	_ndev_to_wil
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wil_dbg_misc
Lloh2:
	adrp	x8, _debug_fw@GOTPAGE
Lloh3:
	ldr	x8, [x8, _debug_fw@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbnz	x8, LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _WMI_FW_CAPABILITY_WMI_ONLY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WMI_FW_CAPABILITY_WMI_ONLY@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_test_bit
	cbz	x0, LBB0_4
LBB0_2:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_wil_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	mov	w3, #0
	bl	_wil_has_other_active_ifaces
	mov	w20, #0
	cbnz	w0, LBB0_3
; %bb.5:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_wil_dbg_misc
	mov	x0, x19
	bl	_wil_pm_runtime_get
	tbnz	w0, #31, LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_wil_up
	mov	x20, x0
	cbz	w0, LBB0_3
; %bb.7:
	mov	x0, x19
	bl	_wil_pm_runtime_put
	b	LBB0_3
LBB0_8:
	mov	x20, x0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open\n"

	.comm	_debug_fw,8,3                   ; @debug_fw
	.comm	_WMI_FW_CAPABILITY_WMI_ONLY,4,2 ; @WMI_FW_CAPABILITY_WMI_ONLY
l_.str.1:                               ; @.str.1
	.asciz	"while in debug_fw or wmi_only mode\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"open, first iface\n"

	.no_dead_strip	_wil_open
.subsections_via_symbols
