	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ieee80211_prep_channel
_ieee80211_prep_channel:                ## @ieee80211_prep_channel
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	16(%rdi), %rbx
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	_IEEE80211_STA_DISABLE_40MHZ@GOTPCREL(%rip), %rcx
	movq	_IEEE80211_STA_DISABLE_80P80MHZ@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	(%rsi), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r13
	movq	_IEEE80211_STA_DISABLE_160MHZ@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	notl	%edx
	andl	%edx, 8(%rdi)
	xorl	%eax, %eax
	callq	_rcu_read_lock
	movl	8(%r12), %eax
	movq	_IEEE80211_STA_DISABLE_HT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jne	LBB0_10
## %bb.1:
	cmpq	$0, 8(%r13)
	je	LBB0_10
## %bb.2:
	movq	_WLAN_EID_HT_OPERATION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ieee80211_bss_get_ie
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rax, %r15
	cmpl	$4, 4(%rax)
	jb	LBB0_6
## %bb.4:
	addq	$8, %r15
	jmp	LBB0_7
LBB0_6:
	xorl	%r15d, %r15d
LBB0_7:
	movq	_WLAN_EID_HT_CAPABILITY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ieee80211_bss_get_ie
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	cmpl	$4, 4(%rax)
	jae	LBB0_25
LBB0_9:
	movl	8(%r12), %eax
	movq	_IEEE80211_STA_DISABLE_HT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 8(%r12)
LBB0_10:
	xorl	%ecx, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
LBB0_11:
	movq	_IEEE80211_STA_DISABLE_VHT@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_20
LBB0_12:
	movq	%r13, %rbx
LBB0_13:
	xorl	%r13d, %r13d
LBB0_14:
	movq	(%r14), %rdx
	movl	$0, (%rsp)
	leaq	-56(%rbp), %r15
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%r13, %r8
	movq	%r15, %r9
	callq	_ieee80211_determine_chantype
	orl	%eax, 8(%r12)
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_ieee80211_ht_vht_rx_chains
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_min
	movl	%eax, 4(%r12)
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	movq	_IEEE80211_SMPS_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	movq	_IEEE80211_CHANCTX_SHARED@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ieee80211_vif_use_channel
	testl	%eax, %eax
	je	LBB0_19
## %bb.15:
	movq	_NL80211_CHAN_WIDTH_20_NOHT@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	cmpq	%rcx, -56(%rbp)
	je	LBB0_19
## %bb.16:
	leaq	-56(%rbp), %rbx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_chandef_downgrade
	orl	%eax, 8(%r12)
	movl	(%r14), %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ieee80211_vif_use_channel
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	(%r15), %rcx
	cmpq	%rcx, -56(%rbp)
	jne	LBB0_17
LBB0_19:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	cmpq	$0, (%r13)
	je	LBB0_12
## %bb.21:
	movq	%r13, %rbx
	movq	_WLAN_EID_VHT_OPERATION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ieee80211_bss_get_ie
	testq	%rax, %rax
	je	LBB0_27
## %bb.22:
	movq	%rax, %r13
	cmpl	$4, 4(%rax)
	jb	LBB0_27
## %bb.23:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_26
## %bb.24:
	addq	$8, %r13
	jmp	LBB0_28
LBB0_25:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	8(%r12), %eax
	jmp	LBB0_11
LBB0_26:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_sdata_info
	movl	8(%r12), %eax
	movq	_IEEE80211_STA_DISABLE_HT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	orl	(%r15), %eax
	movl	%eax, 8(%r12)
LBB0_27:
	xorl	%r13d, %r13d
LBB0_28:
	movq	_WLAN_EID_VHT_CAPABILITY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ieee80211_bss_get_ie
	testq	%rax, %rax
	je	LBB0_30
## %bb.29:
	cmpl	$3, 4(%rax)
	ja	LBB0_14
LBB0_30:
	movl	(%r15), %eax
	orl	%eax, 8(%r12)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_STA_DISABLE_40MHZ,4,2 ## @IEEE80211_STA_DISABLE_40MHZ
	.comm	_IEEE80211_STA_DISABLE_80P80MHZ,4,2 ## @IEEE80211_STA_DISABLE_80P80MHZ
	.comm	_IEEE80211_STA_DISABLE_160MHZ,4,2 ## @IEEE80211_STA_DISABLE_160MHZ
	.comm	_IEEE80211_STA_DISABLE_HT,4,2   ## @IEEE80211_STA_DISABLE_HT
	.comm	_WLAN_EID_HT_OPERATION,4,2      ## @WLAN_EID_HT_OPERATION
	.comm	_WLAN_EID_HT_CAPABILITY,4,2     ## @WLAN_EID_HT_CAPABILITY
	.comm	_IEEE80211_STA_DISABLE_VHT,4,2  ## @IEEE80211_STA_DISABLE_VHT
	.comm	_WLAN_EID_VHT_OPERATION,4,2     ## @WLAN_EID_VHT_OPERATION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AP advertised VHT without HT, disabling both\n"

	.comm	_WLAN_EID_VHT_CAPABILITY,4,2    ## @WLAN_EID_VHT_CAPABILITY
	.comm	_IEEE80211_SMPS_OFF,4,2         ## @IEEE80211_SMPS_OFF
	.comm	_IEEE80211_CHANCTX_SHARED,4,2   ## @IEEE80211_CHANCTX_SHARED
	.comm	_NL80211_CHAN_WIDTH_20_NOHT,8,3 ## @NL80211_CHAN_WIDTH_20_NOHT
	.no_dead_strip	_ieee80211_prep_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ieee80211_prep_channel
_ieee80211_prep_channel:                ; @ieee80211_prep_channel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	ldr	x24, [x0, #16]
	ldr	x8, [x24, #8]
	ldr	x8, [x8]
	ldr	x9, [x1]
	ldr	x9, [x9]
	ldr	x21, [x8, x9, lsl #3]
Lloh0:
	adrp	x8, _IEEE80211_STA_DISABLE_40MHZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_STA_DISABLE_40MHZ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _IEEE80211_STA_DISABLE_80P80MHZ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IEEE80211_STA_DISABLE_80P80MHZ@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _IEEE80211_STA_DISABLE_160MHZ@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IEEE80211_STA_DISABLE_160MHZ@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh8:
	ldr	w9, [x10]
	orr	w8, w8, w9
	ldr	w9, [x0, #8]
	bic	w8, w9, w8
	str	w8, [x0, #8]
	bl	_rcu_read_lock
	ldr	w8, [x19, #8]
Lloh9:
	adrp	x25, _IEEE80211_STA_DISABLE_HT@GOTPAGE
Lloh10:
	ldr	x25, [x25, _IEEE80211_STA_DISABLE_HT@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_8
LBB0_1:
	mov	x22, #0
LBB0_2:
Lloh11:
	adrp	x26, _IEEE80211_STA_DISABLE_VHT@GOTPAGE
Lloh12:
	ldr	x26, [x26, _IEEE80211_STA_DISABLE_VHT@GOTPAGEOFF]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_12
LBB0_3:
	mov	x23, #0
LBB0_4:
	ldr	x2, [x20]
	add	x5, sp, #8
	mov	x0, x19
	mov	x1, x21
	mov	x3, x22
	mov	x4, x23
	mov	w6, #0
	bl	_ieee80211_determine_chantype
	ldr	w8, [x19, #8]
	orr	w8, w8, w0
	str	w8, [x19, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_ieee80211_ht_vht_rx_chains
	ldr	w1, [x24]
	bl	_min
	str	w0, [x19, #4]
	bl	_rcu_read_unlock
Lloh13:
	adrp	x8, _IEEE80211_SMPS_OFF@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IEEE80211_SMPS_OFF@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x19]
Lloh16:
	adrp	x20, _IEEE80211_CHANCTX_SHARED@GOTPAGE
Lloh17:
	ldr	x20, [x20, _IEEE80211_CHANCTX_SHARED@GOTPAGEOFF]
	ldr	w2, [x20]
	add	x1, sp, #8
	mov	x0, x19
	bl	_ieee80211_vif_use_channel
	cbz	w0, LBB0_7
; %bb.5:
	ldr	x8, [sp, #8]
Lloh18:
	adrp	x21, _NL80211_CHAN_WIDTH_20_NOHT@GOTPAGE
Lloh19:
	ldr	x21, [x21, _NL80211_CHAN_WIDTH_20_NOHT@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_7
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	bl	_chandef_downgrade
	ldr	w8, [x19, #8]
	orr	w8, w8, w0
	str	w8, [x19, #8]
	ldr	w2, [x20]
	add	x1, sp, #8
	mov	x0, x19
	bl	_ieee80211_vif_use_channel
	ldr	x8, [sp, #8]
	ldr	x9, [x21]
	cmp	w0, #0
	ccmp	x8, x9, #4, ne
	b.ne	LBB0_6
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:
	ldr	x9, [x21, #8]
	cbz	x9, LBB0_1
; %bb.9:
Lloh20:
	adrp	x8, _WLAN_EID_HT_OPERATION@GOTPAGE
Lloh21:
	ldr	x8, [x8, _WLAN_EID_HT_OPERATION@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ieee80211_bss_get_ie
	cbz	x0, LBB0_17
; %bb.10:
	ldr	w8, [x0, #4]
	cmp	w8, #4
	b.lo	LBB0_17
; %bb.11:
	add	x22, x0, #8
	b	LBB0_18
LBB0_12:
	ldr	x8, [x21]
	cbz	x8, LBB0_3
; %bb.13:
Lloh23:
	adrp	x8, _WLAN_EID_VHT_OPERATION@GOTPAGE
Lloh24:
	ldr	x8, [x8, _WLAN_EID_VHT_OPERATION@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ieee80211_bss_get_ie
	cbz	x0, LBB0_21
; %bb.14:
	ldr	w8, [x0, #4]
	cmp	w8, #4
	b.lo	LBB0_21
; %bb.15:
	cbz	x22, LBB0_26
; %bb.16:
	add	x23, x0, #8
	b	LBB0_22
LBB0_17:
	mov	x22, #0
LBB0_18:
Lloh26:
	adrp	x8, _WLAN_EID_HT_CAPABILITY@GOTPAGE
Lloh27:
	ldr	x8, [x8, _WLAN_EID_HT_CAPABILITY@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ieee80211_bss_get_ie
	cbz	x0, LBB0_20
; %bb.19:
	ldr	w8, [x0, #4]
	cmp	w8, #4
	b.hs	LBB0_25
LBB0_20:
	mov	x22, #0
	ldr	w8, [x25]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	b	LBB0_2
LBB0_21:
	mov	x23, #0
LBB0_22:
Lloh29:
	adrp	x8, _WLAN_EID_VHT_CAPABILITY@GOTPAGE
Lloh30:
	ldr	x8, [x8, _WLAN_EID_VHT_CAPABILITY@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ieee80211_bss_get_ie
	cbz	x0, LBB0_24
; %bb.23:
	ldr	w8, [x0, #4]
	cmp	w8, #3
	b.hi	LBB0_4
LBB0_24:
	mov	x23, #0
	ldr	w8, [x26]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	b	LBB0_4
LBB0_25:
	ldr	w8, [x19, #8]
	b	LBB0_2
LBB0_26:
Lloh32:
	adrp	x1, l_.str@PAGE
Lloh33:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_sdata_info
	mov	x23, #0
	ldr	w8, [x25]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	ldr	w9, [x26]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	b	LBB0_22
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_STA_DISABLE_40MHZ,4,2 ; @IEEE80211_STA_DISABLE_40MHZ
	.comm	_IEEE80211_STA_DISABLE_80P80MHZ,4,2 ; @IEEE80211_STA_DISABLE_80P80MHZ
	.comm	_IEEE80211_STA_DISABLE_160MHZ,4,2 ; @IEEE80211_STA_DISABLE_160MHZ
	.comm	_IEEE80211_STA_DISABLE_HT,4,2   ; @IEEE80211_STA_DISABLE_HT
	.comm	_WLAN_EID_HT_OPERATION,4,2      ; @WLAN_EID_HT_OPERATION
	.comm	_WLAN_EID_HT_CAPABILITY,4,2     ; @WLAN_EID_HT_CAPABILITY
	.comm	_IEEE80211_STA_DISABLE_VHT,4,2  ; @IEEE80211_STA_DISABLE_VHT
	.comm	_WLAN_EID_VHT_OPERATION,4,2     ; @WLAN_EID_VHT_OPERATION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AP advertised VHT without HT, disabling both\n"

	.comm	_WLAN_EID_VHT_CAPABILITY,4,2    ; @WLAN_EID_VHT_CAPABILITY
	.comm	_IEEE80211_SMPS_OFF,4,2         ; @IEEE80211_SMPS_OFF
	.comm	_IEEE80211_CHANCTX_SHARED,4,2   ; @IEEE80211_CHANCTX_SHARED
	.comm	_NL80211_CHAN_WIDTH_20_NOHT,8,3 ; @NL80211_CHAN_WIDTH_20_NOHT
	.no_dead_strip	_ieee80211_prep_channel
.subsections_via_symbols
