	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chan2mode
_chan2mode:                             ## @chan2mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_IEEE80211_IS_CHAN_VHTA
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_IEEE80211_MODE_VHT_5GHZ@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_2:
	movq	%rbx, %rdi
	callq	_IEEE80211_IS_CHAN_VHTG
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_IEEE80211_MODE_VHT_2GHZ@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_4:
	movq	%rbx, %rdi
	callq	_IEEE80211_IS_CHAN_HTA
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_IEEE80211_MODE_11NA@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_6:
	movq	%rbx, %rdi
	callq	_IEEE80211_IS_CHAN_HTG
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_IEEE80211_MODE_11NG@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_8:
	movq	%rbx, %rdi
	callq	_IEEE80211_IS_CHAN_108A
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_IEEE80211_MODE_TURBO_A@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_10:
	movq	%rbx, %rdi
	callq	_IEEE80211_IS_CHAN_108G
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_IEEE80211_MODE_TURBO_G@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_12:
	movq	%rbx, %rdi
	callq	_IEEE80211_IS_CHAN_ST
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	_IEEE80211_MODE_STURBO_A@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_14:
	movq	%rbx, %rdi
	callq	_IEEE80211_IS_CHAN_FHSS
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	_IEEE80211_MODE_FH@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_16:
	movq	%rbx, %rdi
	callq	_IEEE80211_IS_CHAN_HALF
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	_IEEE80211_MODE_HALF@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_18:
	movq	%rbx, %rdi
	callq	_IEEE80211_IS_CHAN_QUARTER
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movq	_IEEE80211_MODE_QUARTER@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_20:
	movq	%rbx, %rdi
	callq	_IEEE80211_IS_CHAN_A
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	movq	_IEEE80211_MODE_11A@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_22:
	movq	%rbx, %rdi
	callq	_IEEE80211_IS_CHAN_ANYG
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	movq	_IEEE80211_MODE_11G@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_24:
	movq	%rbx, %rdi
	callq	_IEEE80211_IS_CHAN_B
	testq	%rax, %rax
	jne	LBB0_25
## %bb.26:
	movq	_IEEE80211_MODE_AUTO@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_25:
	movq	_IEEE80211_MODE_11B@GOTPCREL(%rip), %rax
LBB0_27:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_MODE_VHT_5GHZ,4,2    ## @IEEE80211_MODE_VHT_5GHZ
	.comm	_IEEE80211_MODE_VHT_2GHZ,4,2    ## @IEEE80211_MODE_VHT_2GHZ
	.comm	_IEEE80211_MODE_11NA,4,2        ## @IEEE80211_MODE_11NA
	.comm	_IEEE80211_MODE_11NG,4,2        ## @IEEE80211_MODE_11NG
	.comm	_IEEE80211_MODE_TURBO_A,4,2     ## @IEEE80211_MODE_TURBO_A
	.comm	_IEEE80211_MODE_TURBO_G,4,2     ## @IEEE80211_MODE_TURBO_G
	.comm	_IEEE80211_MODE_STURBO_A,4,2    ## @IEEE80211_MODE_STURBO_A
	.comm	_IEEE80211_MODE_FH,4,2          ## @IEEE80211_MODE_FH
	.comm	_IEEE80211_MODE_HALF,4,2        ## @IEEE80211_MODE_HALF
	.comm	_IEEE80211_MODE_QUARTER,4,2     ## @IEEE80211_MODE_QUARTER
	.comm	_IEEE80211_MODE_11A,4,2         ## @IEEE80211_MODE_11A
	.comm	_IEEE80211_MODE_11G,4,2         ## @IEEE80211_MODE_11G
	.comm	_IEEE80211_MODE_11B,4,2         ## @IEEE80211_MODE_11B
	.comm	_IEEE80211_MODE_AUTO,4,2        ## @IEEE80211_MODE_AUTO
	.no_dead_strip	_chan2mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chan2mode
_chan2mode:                             ; @chan2mode
	.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, x0
	bl	_IEEE80211_IS_CHAN_VHTA
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _IEEE80211_MODE_VHT_5GHZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_MODE_VHT_5GHZ@GOTPAGEOFF]
	b	LBB0_25
LBB0_2:
	mov	x0, x19
	bl	_IEEE80211_IS_CHAN_VHTG
	cbz	x0, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _IEEE80211_MODE_VHT_2GHZ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IEEE80211_MODE_VHT_2GHZ@GOTPAGEOFF]
	b	LBB0_25
LBB0_4:
	mov	x0, x19
	bl	_IEEE80211_IS_CHAN_HTA
	cbz	x0, LBB0_6
; %bb.5:
Lloh4:
	adrp	x8, _IEEE80211_MODE_11NA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IEEE80211_MODE_11NA@GOTPAGEOFF]
	b	LBB0_25
LBB0_6:
	mov	x0, x19
	bl	_IEEE80211_IS_CHAN_HTG
	cbz	x0, LBB0_8
; %bb.7:
Lloh6:
	adrp	x8, _IEEE80211_MODE_11NG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IEEE80211_MODE_11NG@GOTPAGEOFF]
	b	LBB0_25
LBB0_8:
	mov	x0, x19
	bl	_IEEE80211_IS_CHAN_108A
	cbz	x0, LBB0_10
; %bb.9:
Lloh8:
	adrp	x8, _IEEE80211_MODE_TURBO_A@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IEEE80211_MODE_TURBO_A@GOTPAGEOFF]
	b	LBB0_25
LBB0_10:
	mov	x0, x19
	bl	_IEEE80211_IS_CHAN_108G
	cbz	x0, LBB0_12
; %bb.11:
Lloh10:
	adrp	x8, _IEEE80211_MODE_TURBO_G@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IEEE80211_MODE_TURBO_G@GOTPAGEOFF]
	b	LBB0_25
LBB0_12:
	mov	x0, x19
	bl	_IEEE80211_IS_CHAN_ST
	cbz	x0, LBB0_14
; %bb.13:
Lloh12:
	adrp	x8, _IEEE80211_MODE_STURBO_A@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IEEE80211_MODE_STURBO_A@GOTPAGEOFF]
	b	LBB0_25
LBB0_14:
	mov	x0, x19
	bl	_IEEE80211_IS_CHAN_FHSS
	cbz	x0, LBB0_16
; %bb.15:
Lloh14:
	adrp	x8, _IEEE80211_MODE_FH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IEEE80211_MODE_FH@GOTPAGEOFF]
	b	LBB0_25
LBB0_16:
	mov	x0, x19
	bl	_IEEE80211_IS_CHAN_HALF
	cbz	x0, LBB0_18
; %bb.17:
Lloh16:
	adrp	x8, _IEEE80211_MODE_HALF@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IEEE80211_MODE_HALF@GOTPAGEOFF]
	b	LBB0_25
LBB0_18:
	mov	x0, x19
	bl	_IEEE80211_IS_CHAN_QUARTER
	cbz	x0, LBB0_20
; %bb.19:
Lloh18:
	adrp	x8, _IEEE80211_MODE_QUARTER@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IEEE80211_MODE_QUARTER@GOTPAGEOFF]
	b	LBB0_25
LBB0_20:
	mov	x0, x19
	bl	_IEEE80211_IS_CHAN_A
	cbz	x0, LBB0_22
; %bb.21:
Lloh20:
	adrp	x8, _IEEE80211_MODE_11A@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IEEE80211_MODE_11A@GOTPAGEOFF]
	b	LBB0_25
LBB0_22:
	mov	x0, x19
	bl	_IEEE80211_IS_CHAN_ANYG
	cbz	x0, LBB0_24
; %bb.23:
Lloh22:
	adrp	x8, _IEEE80211_MODE_11G@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IEEE80211_MODE_11G@GOTPAGEOFF]
	b	LBB0_25
LBB0_24:
	mov	x0, x19
	bl	_IEEE80211_IS_CHAN_B
Lloh24:
	adrp	x8, _IEEE80211_MODE_11B@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IEEE80211_MODE_11B@GOTPAGEOFF]
Lloh26:
	adrp	x9, _IEEE80211_MODE_AUTO@GOTPAGE
Lloh27:
	ldr	x9, [x9, _IEEE80211_MODE_AUTO@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
LBB0_25:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_MODE_VHT_5GHZ,4,2    ; @IEEE80211_MODE_VHT_5GHZ
	.comm	_IEEE80211_MODE_VHT_2GHZ,4,2    ; @IEEE80211_MODE_VHT_2GHZ
	.comm	_IEEE80211_MODE_11NA,4,2        ; @IEEE80211_MODE_11NA
	.comm	_IEEE80211_MODE_11NG,4,2        ; @IEEE80211_MODE_11NG
	.comm	_IEEE80211_MODE_TURBO_A,4,2     ; @IEEE80211_MODE_TURBO_A
	.comm	_IEEE80211_MODE_TURBO_G,4,2     ; @IEEE80211_MODE_TURBO_G
	.comm	_IEEE80211_MODE_STURBO_A,4,2    ; @IEEE80211_MODE_STURBO_A
	.comm	_IEEE80211_MODE_FH,4,2          ; @IEEE80211_MODE_FH
	.comm	_IEEE80211_MODE_HALF,4,2        ; @IEEE80211_MODE_HALF
	.comm	_IEEE80211_MODE_QUARTER,4,2     ; @IEEE80211_MODE_QUARTER
	.comm	_IEEE80211_MODE_11A,4,2         ; @IEEE80211_MODE_11A
	.comm	_IEEE80211_MODE_11G,4,2         ; @IEEE80211_MODE_11G
	.comm	_IEEE80211_MODE_11B,4,2         ; @IEEE80211_MODE_11B
	.comm	_IEEE80211_MODE_AUTO,4,2        ; @IEEE80211_MODE_AUTO
	.no_dead_strip	_chan2mode
.subsections_via_symbols
