	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlan_get_opmode                ## -- Begin function wlan_get_opmode
	.p2align	4, 0x90
_wlan_get_opmode:                       ## @wlan_get_opmode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	leaq	-24(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	-20(%rbp), %edi
	movl	4(%r14), %esi
	movl	$4, %edx
	callq	_strlcpy
	movq	_sock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SIOCGIFMEDIA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_ioctl
	testq	%rax, %rax
	js	LBB0_1
## %bb.3:
	movl	-24(%rbp), %eax
	movq	_IFM_IEEE80211_ADHOC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.4:
	movq	_IFM_FLAG0@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_5
## %bb.6:
	movq	_WlanIfaceOperatingModeType_ibss@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_ENXIO@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_17
## %bb.2:
	movq	_WlanIfaceOperatingModeType_station@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_7:
	movq	_IFM_IEEE80211_HOSTAP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.8:
	movq	_WlanIfaceOperatingModeType_hostAp@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_5:
	movq	_WlanIfaceOperatingModeType_adhocDemo@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_9:
	movq	_IFM_IEEE80211_MONITOR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.10:
	movq	_WlanIfaceOperatingModeType_monitor@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_11:
	movq	_IFM_IEEE80211_MBSS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.12:
	movq	_WlanIfaceOperatingModeType_meshPoint@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_13:
	movq	_IFM_IEEE80211_WDS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_16
## %bb.14:
	movq	_WlanIfaceOperatingModeType_wds@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	movl	%eax, (%r14)
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sock,4,2                       ## @sock
	.comm	_SIOCGIFMEDIA,4,2               ## @SIOCGIFMEDIA
	.comm	_errno,8,3                      ## @errno
	.comm	_ENXIO,8,3                      ## @ENXIO
	.comm	_WlanIfaceOperatingModeType_station,4,2 ## @WlanIfaceOperatingModeType_station
	.comm	_IFM_IEEE80211_ADHOC,4,2        ## @IFM_IEEE80211_ADHOC
	.comm	_IFM_FLAG0,4,2                  ## @IFM_FLAG0
	.comm	_WlanIfaceOperatingModeType_adhocDemo,4,2 ## @WlanIfaceOperatingModeType_adhocDemo
	.comm	_WlanIfaceOperatingModeType_ibss,4,2 ## @WlanIfaceOperatingModeType_ibss
	.comm	_IFM_IEEE80211_HOSTAP,4,2       ## @IFM_IEEE80211_HOSTAP
	.comm	_WlanIfaceOperatingModeType_hostAp,4,2 ## @WlanIfaceOperatingModeType_hostAp
	.comm	_IFM_IEEE80211_MONITOR,4,2      ## @IFM_IEEE80211_MONITOR
	.comm	_WlanIfaceOperatingModeType_monitor,4,2 ## @WlanIfaceOperatingModeType_monitor
	.comm	_IFM_IEEE80211_MBSS,4,2         ## @IFM_IEEE80211_MBSS
	.comm	_WlanIfaceOperatingModeType_meshPoint,4,2 ## @WlanIfaceOperatingModeType_meshPoint
	.comm	_IFM_IEEE80211_WDS,4,2          ## @IFM_IEEE80211_WDS
	.comm	_WlanIfaceOperatingModeType_wds,4,2 ## @WlanIfaceOperatingModeType_wds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlan_get_opmode                ; -- Begin function wlan_get_opmode
	.p2align	2
_wlan_get_opmode:                       ; @wlan_get_opmode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	w0, [sp, #12]
	ldr	w1, [x19, #4]
	mov	w2, #4
	bl	_strlcpy
Lloh0:
	adrp	x8, _sock@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sock@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _SIOCGIFMEDIA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIOCGIFMEDIA@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	tbnz	x0, #63, LBB0_3
; %bb.1:
	ldr	w8, [sp, #8]
Lloh6:
	adrp	x9, _IFM_IEEE80211_ADHOC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IFM_IEEE80211_ADHOC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
Lloh9:
	adrp	x9, _IFM_FLAG0@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IFM_FLAG0@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _WlanIfaceOperatingModeType_adhocDemo@GOTPAGE
Lloh13:
	ldr	x10, [x10, _WlanIfaceOperatingModeType_adhocDemo@GOTPAGEOFF]
Lloh14:
	adrp	x11, _WlanIfaceOperatingModeType_ibss@GOTPAGE
Lloh15:
	ldr	x11, [x11, _WlanIfaceOperatingModeType_ibss@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x11, x10, eq
	b	LBB0_14
LBB0_3:
Lloh16:
	adrp	x8, _errno@GOTPAGE
Lloh17:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
Lloh19:
	adrp	x9, _ENXIO@GOTPAGE
Lloh20:
	ldr	x9, [x9, _ENXIO@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
	mov	w0, #-1
	b	LBB0_15
LBB0_5:
Lloh22:
	adrp	x9, _IFM_IEEE80211_HOSTAP@GOTPAGE
Lloh23:
	ldr	x9, [x9, _IFM_IEEE80211_HOSTAP@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
Lloh25:
	adrp	x8, _WlanIfaceOperatingModeType_hostAp@GOTPAGE
Lloh26:
	ldr	x8, [x8, _WlanIfaceOperatingModeType_hostAp@GOTPAGEOFF]
	b	LBB0_14
LBB0_7:
Lloh27:
	adrp	x8, _WlanIfaceOperatingModeType_station@GOTPAGE
Lloh28:
	ldr	x8, [x8, _WlanIfaceOperatingModeType_station@GOTPAGEOFF]
	b	LBB0_14
LBB0_8:
Lloh29:
	adrp	x9, _IFM_IEEE80211_MONITOR@GOTPAGE
Lloh30:
	ldr	x9, [x9, _IFM_IEEE80211_MONITOR@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
Lloh32:
	adrp	x8, _WlanIfaceOperatingModeType_monitor@GOTPAGE
Lloh33:
	ldr	x8, [x8, _WlanIfaceOperatingModeType_monitor@GOTPAGEOFF]
	b	LBB0_14
LBB0_10:
Lloh34:
	adrp	x9, _IFM_IEEE80211_MBSS@GOTPAGE
Lloh35:
	ldr	x9, [x9, _IFM_IEEE80211_MBSS@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
Lloh37:
	adrp	x8, _WlanIfaceOperatingModeType_meshPoint@GOTPAGE
Lloh38:
	ldr	x8, [x8, _WlanIfaceOperatingModeType_meshPoint@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
Lloh39:
	adrp	x9, _IFM_IEEE80211_WDS@GOTPAGE
Lloh40:
	ldr	x9, [x9, _IFM_IEEE80211_WDS@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.13:
Lloh42:
	adrp	x8, _WlanIfaceOperatingModeType_wds@GOTPAGE
Lloh43:
	ldr	x8, [x8, _WlanIfaceOperatingModeType_wds@GOTPAGEOFF]
LBB0_14:
	mov	w0, #0
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_15:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_16:
	mov	w0, #0
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_sock,4,2                       ; @sock
	.comm	_SIOCGIFMEDIA,4,2               ; @SIOCGIFMEDIA
	.comm	_errno,8,3                      ; @errno
	.comm	_ENXIO,8,3                      ; @ENXIO
	.comm	_WlanIfaceOperatingModeType_station,4,2 ; @WlanIfaceOperatingModeType_station
	.comm	_IFM_IEEE80211_ADHOC,4,2        ; @IFM_IEEE80211_ADHOC
	.comm	_IFM_FLAG0,4,2                  ; @IFM_FLAG0
	.comm	_WlanIfaceOperatingModeType_adhocDemo,4,2 ; @WlanIfaceOperatingModeType_adhocDemo
	.comm	_WlanIfaceOperatingModeType_ibss,4,2 ; @WlanIfaceOperatingModeType_ibss
	.comm	_IFM_IEEE80211_HOSTAP,4,2       ; @IFM_IEEE80211_HOSTAP
	.comm	_WlanIfaceOperatingModeType_hostAp,4,2 ; @WlanIfaceOperatingModeType_hostAp
	.comm	_IFM_IEEE80211_MONITOR,4,2      ; @IFM_IEEE80211_MONITOR
	.comm	_WlanIfaceOperatingModeType_monitor,4,2 ; @WlanIfaceOperatingModeType_monitor
	.comm	_IFM_IEEE80211_MBSS,4,2         ; @IFM_IEEE80211_MBSS
	.comm	_WlanIfaceOperatingModeType_meshPoint,4,2 ; @WlanIfaceOperatingModeType_meshPoint
	.comm	_IFM_IEEE80211_WDS,4,2          ; @IFM_IEEE80211_WDS
	.comm	_WlanIfaceOperatingModeType_wds,4,2 ; @WlanIfaceOperatingModeType_wds
.subsections_via_symbols
