	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wlan_getopmode
_wlan_getopmode:                        ## @wlan_getopmode
	.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
	movl	(%rdi), %eax
	cmpl	$-1, %eax
	jne	LBB0_13
## %bb.1:
	movq	%rdi, %rbx
	leaq	-24(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	-20(%rbp), %edi
	movl	4(%rbx), %esi
	movl	$4, %edx
	callq	_strlcpy
	movl	8(%rbx), %edi
	movq	_SIOCGIFMEDIA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	callq	_ioctl
	testq	%rax, %rax
	jns	LBB0_3
## %bb.2:
	movl	4(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_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	_IEEE80211_M_IBSS@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_7:
	movq	_IFM_IEEE80211_HOSTAP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.8:
	movq	_IEEE80211_M_HOSTAP@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_5:
	movq	_IEEE80211_M_AHDEMO@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	movl	%eax, (%rbx)
LBB0_13:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	movq	_IFM_IEEE80211_MONITOR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_10
## %bb.11:
	movq	_IEEE80211_M_STA@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_IEEE80211_M_MONITOR@GOTPCREL(%rip), %rax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_SIOCGIFMEDIA,4,2               ## @SIOCGIFMEDIA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s (SIOCGIFMEDIA)"

	.comm	_IFM_IEEE80211_ADHOC,4,2        ## @IFM_IEEE80211_ADHOC
	.comm	_IFM_FLAG0,4,2                  ## @IFM_FLAG0
	.comm	_IEEE80211_M_AHDEMO,4,2         ## @IEEE80211_M_AHDEMO
	.comm	_IEEE80211_M_IBSS,4,2           ## @IEEE80211_M_IBSS
	.comm	_IFM_IEEE80211_HOSTAP,4,2       ## @IFM_IEEE80211_HOSTAP
	.comm	_IEEE80211_M_HOSTAP,4,2         ## @IEEE80211_M_HOSTAP
	.comm	_IFM_IEEE80211_MONITOR,4,2      ## @IFM_IEEE80211_MONITOR
	.comm	_IEEE80211_M_MONITOR,4,2        ## @IEEE80211_M_MONITOR
	.comm	_IEEE80211_M_STA,4,2            ## @IEEE80211_M_STA
	.no_dead_strip	_wlan_getopmode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wlan_getopmode
_wlan_getopmode:                        ; @wlan_getopmode
	.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
	ldr	w0, [x0]
	cmn	w0, #1
	b.ne	LBB0_9
; %bb.1:
	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
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x8, _SIOCGIFMEDIA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIOCGIFMEDIA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	tbz	x0, #63, LBB0_3
; %bb.2:
	ldr	w2, [x19, #4]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_3:
	ldr	w8, [sp, #8]
Lloh5:
	adrp	x9, _IFM_IEEE80211_ADHOC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IFM_IEEE80211_ADHOC@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
Lloh8:
	adrp	x9, _IFM_FLAG0@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IFM_FLAG0@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _IEEE80211_M_AHDEMO@GOTPAGE
Lloh12:
	ldr	x10, [x10, _IEEE80211_M_AHDEMO@GOTPAGEOFF]
Lloh13:
	adrp	x11, _IEEE80211_M_IBSS@GOTPAGE
Lloh14:
	ldr	x11, [x11, _IEEE80211_M_IBSS@GOTPAGEOFF]
LBB0_5:
	tst	w9, w8
	csel	x8, x11, x10, eq
	b	LBB0_8
LBB0_6:
Lloh15:
	adrp	x9, _IFM_IEEE80211_HOSTAP@GOTPAGE
Lloh16:
	ldr	x9, [x9, _IFM_IEEE80211_HOSTAP@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.7:
Lloh18:
	adrp	x8, _IEEE80211_M_HOSTAP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IEEE80211_M_HOSTAP@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	str	w0, [x19]
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_10:
Lloh20:
	adrp	x9, _IFM_IEEE80211_MONITOR@GOTPAGE
Lloh21:
	ldr	x9, [x9, _IFM_IEEE80211_MONITOR@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
Lloh23:
	adrp	x10, _IEEE80211_M_MONITOR@GOTPAGE
Lloh24:
	ldr	x10, [x10, _IEEE80211_M_MONITOR@GOTPAGEOFF]
Lloh25:
	adrp	x11, _IEEE80211_M_STA@GOTPAGE
Lloh26:
	ldr	x11, [x11, _IEEE80211_M_STA@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_SIOCGIFMEDIA,4,2               ; @SIOCGIFMEDIA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s (SIOCGIFMEDIA)"

	.comm	_IFM_IEEE80211_ADHOC,4,2        ; @IFM_IEEE80211_ADHOC
	.comm	_IFM_FLAG0,4,2                  ; @IFM_FLAG0
	.comm	_IEEE80211_M_AHDEMO,4,2         ; @IEEE80211_M_AHDEMO
	.comm	_IEEE80211_M_IBSS,4,2           ; @IEEE80211_M_IBSS
	.comm	_IFM_IEEE80211_HOSTAP,4,2       ; @IFM_IEEE80211_HOSTAP
	.comm	_IEEE80211_M_HOSTAP,4,2         ; @IEEE80211_M_HOSTAP
	.comm	_IFM_IEEE80211_MONITOR,4,2      ; @IFM_IEEE80211_MONITOR
	.comm	_IEEE80211_M_MONITOR,4,2        ; @IEEE80211_M_MONITOR
	.comm	_IEEE80211_M_STA,4,2            ; @IEEE80211_M_STA
	.no_dead_strip	_wlan_getopmode
.subsections_via_symbols
