	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function demote11b
_demote11b:                             ## @demote11b
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_IEEE80211_IS_CHAN_ANYG
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	(%r14), %rax
	movq	_IEEE80211_MODE_AUTO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	_IEEE80211_CHAN_PUREG@GOTPCREL(%rip), %rax
	movq	_IEEE80211_CHAN_G@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	8(%r14), %edi
	notl	%edx
	andl	(%rbx), %edx
	movl	4(%rbx), %esi
	movq	_IEEE80211_CHAN_B@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	callq	_ieee80211_find_channel
	testq	%rax, %rax
	cmovneq	%rax, %rbx
LBB0_3:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_MODE_AUTO,8,3        ## @IEEE80211_MODE_AUTO
	.comm	_IEEE80211_CHAN_PUREG,4,2       ## @IEEE80211_CHAN_PUREG
	.comm	_IEEE80211_CHAN_G,4,2           ## @IEEE80211_CHAN_G
	.comm	_IEEE80211_CHAN_B,4,2           ## @IEEE80211_CHAN_B
	.no_dead_strip	_demote11b
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function demote11b
_demote11b:                             ; @demote11b
	.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	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_IEEE80211_IS_CHAN_ANYG
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _IEEE80211_MODE_AUTO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IEEE80211_MODE_AUTO@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	w0, [x20, #8]
	ldp	w8, w1, [x19]
Lloh3:
	adrp	x9, _IEEE80211_CHAN_PUREG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IEEE80211_CHAN_PUREG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _IEEE80211_CHAN_G@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IEEE80211_CHAN_G@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bic	w8, w8, w9
Lloh9:
	adrp	x9, _IEEE80211_CHAN_B@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IEEE80211_CHAN_B@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w2, w8, w9
	bl	_ieee80211_find_channel
	cmp	x0, #0
	csel	x19, x19, x0, eq
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_MODE_AUTO,8,3        ; @IEEE80211_MODE_AUTO
	.comm	_IEEE80211_CHAN_PUREG,4,2       ; @IEEE80211_CHAN_PUREG
	.comm	_IEEE80211_CHAN_G,4,2           ; @IEEE80211_CHAN_G
	.comm	_IEEE80211_CHAN_B,4,2           ; @IEEE80211_CHAN_B
	.no_dead_strip	_demote11b
.subsections_via_symbols
