	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function halbtc_get_wifi_link_status
_halbtc_get_wifi_link_status:           ## @halbtc_get_wifi_link_status
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	callq	_rtl_mac
	movq	(%rax), %rcx
	movq	_NL80211_IFTYPE_STATION@GOTPCREL(%rip), %rdx
	xorl	%r15d, %r15d
	movl	$0, %r12d
	movl	$0, %ebx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.1:
	movq	8(%rax), %rax
	movq	_MAC80211_LINKED@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	setge	%al
	jl	LBB0_3
## %bb.2:
	movq	_WIFI_STA_CONNECTED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
LBB0_3:
	movb	%al, %bl
LBB0_4:
	movq	%r14, %rdi
	callq	_is_any_client_connect_to_ap
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%al
	je	LBB0_6
## %bb.5:
	movq	_WIFI_AP_CONNECTED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r15d
LBB0_6:
	movb	%al, %cl
	addl	%ecx, %ebx
	shll	$16, %ebx
	orl	%ebx, %r12d
	orl	%r15d, %r12d
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NL80211_IFTYPE_STATION,8,3     ## @NL80211_IFTYPE_STATION
	.comm	_MAC80211_LINKED,8,3            ## @MAC80211_LINKED
	.comm	_WIFI_STA_CONNECTED,4,2         ## @WIFI_STA_CONNECTED
	.comm	_WIFI_AP_CONNECTED,4,2          ## @WIFI_AP_CONNECTED
	.no_dead_strip	_halbtc_get_wifi_link_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function halbtc_get_wifi_link_status
_halbtc_get_wifi_link_status:           ; @halbtc_get_wifi_link_status
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x0
	ldr	x0, [x0]
	bl	_rtl_mac
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _NL80211_IFTYPE_STATION@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NL80211_IFTYPE_STATION@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x0, #8]
Lloh3:
	adrp	x9, _MAC80211_LINKED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAC80211_LINKED@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w20, ge
Lloh6:
	adrp	x8, _WIFI_STA_CONNECTED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WIFI_STA_CONNECTED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	csel	w21, wzr, w8, lt
	b	LBB0_3
LBB0_2:
	mov	w21, #0
	mov	w20, #0
LBB0_3:
	mov	x0, x19
	bl	_is_any_client_connect_to_ap
Lloh9:
	adrp	x8, _WIFI_AP_CONNECTED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WIFI_AP_CONNECTED@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w8, w8, w21
	cinc	w9, w20, ne
	orr	w0, w8, w9, lsl #16
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_NL80211_IFTYPE_STATION,8,3     ; @NL80211_IFTYPE_STATION
	.comm	_MAC80211_LINKED,8,3            ; @MAC80211_LINKED
	.comm	_WIFI_STA_CONNECTED,4,2         ; @WIFI_STA_CONNECTED
	.comm	_WIFI_AP_CONNECTED,4,2          ; @WIFI_AP_CONNECTED
	.no_dead_strip	_halbtc_get_wifi_link_status
.subsections_via_symbols
