	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_enable_bw40_2g
_brcmf_enable_bw40_2g:                  ## @brcmf_enable_bw40_2g
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	16(%rdi), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_brcmf_get_ifp
	movq	%rax, %r13
	movq	_WLC_BAND_5G@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	leaq	L_.str(%rip), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	callq	_brcmf_fil_iovar_int_get
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_brcmf_dbg
	movq	_WLC_N_BW_40ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, -44(%rbp)
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_brcmf_fil_iovar_int_set
	jmp	LBB0_3
LBB0_1:
	movq	_WLC_BAND_2G@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, -112(%rbp)
	movq	_WLC_BW_CAP_40MHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, -120(%rbp)
	leaq	L_.str(%rip), %rsi
	leaq	-120(%rbp), %rdx
	movq	%r13, %rdi
	movl	$16, %ecx
	callq	_brcmf_fil_iovar_data_set
LBB0_3:
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
LBB0_22:
	movl	%ebx, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_BRCMF_DCMD_MEDLEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r12
	movq	_BRCMU_CHAN_BAND_2G@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -104(%rbp)
	movq	_BRCMU_CHAN_BW_40@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)
	movq	_BRCMU_CHAN_SB_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	$0, -72(%rbp)
	leaq	-104(%rbp), %rdi
	callq	*8(%r14)
	movq	-80(%rbp), %rdi
	callq	_cpu_to_le16
	movl	%eax, (%r12)
	movl	(%rbx), %ecx
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_brcmf_fil_iovar_data_get
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_bphy_err
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_22
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_8:
	movq	%r14, %rdi
	callq	_cfg_to_wiphy
	movq	(%rax), %rax
	movq	_NL80211_BAND_2GHZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r12), %edi
	callq	_le32_to_cpu
	testl	%eax, %eax
	jle	LBB0_21
## %bb.9:
	movl	%eax, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%r15
	cmpq	%rbx, %r15
	je	LBB0_21
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movq	(%r12), %rax
	movl	(%rax,%r15,4), %edi
	callq	_le32_to_cpu
	cltq
	movq	%rax, -80(%rbp)
	leaq	-104(%rbp), %rdi
	callq	*(%r14)
	movq	-104(%rbp), %rax
	xorl	%edi, %edi
	movq	_BRCMU_CHAN_BAND_2G@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_20
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-96(%rbp), %rax
	xorl	%edi, %edi
	movq	_BRCMU_CHAN_BW_40@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_20
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%rcx), %rcx
	movq	-88(%rbp), %rdx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rdx, (%rcx,%r13,8)
	je	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	incq	%r13
	cmpq	%r13, %rax
	jne	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%eax, %r13d
	jmp	LBB0_18
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	xorl	%r13d, %r13d
LBB0_18:                                ##   in Loop: Header=BB0_10 Depth=1
	xorl	%edi, %edi
	cmpl	%eax, %r13d
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%r13d, %edi
	shlq	$3, %rdi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	8(%rax), %rdi
	leaq	-104(%rbp), %rsi
	callq	_brcmf_update_bw40_channel_flag
	jmp	LBB0_20
LBB0_21:
	movq	%r12, %rdi
	callq	_kfree
	xorl	%ebx, %ebx
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_WLC_BAND_5G,4,2                ## @WLC_BAND_5G
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bw_cap"

	.comm	_WLC_BAND_2G,4,2                ## @WLC_BAND_2G
	.comm	_WLC_BW_CAP_40MHZ,4,2           ## @WLC_BW_CAP_40MHZ
	.comm	_INFO,4,2                       ## @INFO
L_.str.1:                               ## @.str.1
	.asciz	"fallback to mimo_bw_cap\n"

	.comm	_WLC_N_BW_40ALL,4,2             ## @WLC_N_BW_40ALL
L_.str.2:                               ## @.str.2
	.asciz	"mimo_bw_cap"

	.comm	_BRCMF_DCMD_MEDLEN,4,2          ## @BRCMF_DCMD_MEDLEN
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BRCMU_CHAN_BAND_2G,8,3         ## @BRCMU_CHAN_BAND_2G
	.comm	_BRCMU_CHAN_BW_40,8,3           ## @BRCMU_CHAN_BW_40
	.comm	_BRCMU_CHAN_SB_NONE,4,2         ## @BRCMU_CHAN_SB_NONE
L_.str.3:                               ## @.str.3
	.asciz	"chanspecs"

L_.str.4:                               ## @.str.4
	.asciz	"get chanspecs error (%d)\n"

	.comm	_NL80211_BAND_2GHZ,8,3          ## @NL80211_BAND_2GHZ
	.no_dead_strip	_brcmf_enable_bw40_2g
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_enable_bw40_2g
_brcmf_enable_bw40_2g:                  ; @brcmf_enable_bw40_2g
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x19, x0
	ldr	x21, [x0, #16]
	mov	x0, x21
	mov	w1, #0
	bl	_brcmf_get_ifp
	mov	x22, x0
Lloh0:
	adrp	x8, _WLC_BAND_5G@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WLC_BAND_5G@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #60]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #60
	bl	_brcmf_fil_iovar_int_get
	cbz	w0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _INFO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _INFO@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_brcmf_dbg
Lloh10:
	adrp	x8, _WLC_N_BW_40ALL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _WLC_N_BW_40ALL@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	str	w2, [sp, #60]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_brcmf_fil_iovar_int_set
	mov	x23, x0
	cbnz	w0, LBB0_21
	b	LBB0_3
LBB0_2:
Lloh15:
	adrp	x8, _WLC_BAND_2G@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WLC_BAND_2G@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	x0, [sp, #72]
Lloh18:
	adrp	x8, _WLC_BW_CAP_40MHZ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WLC_BW_CAP_40MHZ@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	x0, [sp, #64]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #64
	mov	x0, x22
	mov	w3, #16
	bl	_brcmf_fil_iovar_data_set
	mov	x23, x0
	cbnz	w0, LBB0_21
LBB0_3:
Lloh23:
	adrp	x23, _BRCMF_DCMD_MEDLEN@GOTPAGE
Lloh24:
	ldr	x23, [x23, _BRCMF_DCMD_MEDLEN@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh25:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.4:
	mov	x20, x0
Lloh28:
	adrp	x24, _BRCMU_CHAN_BAND_2G@GOTPAGE
Lloh29:
	ldr	x24, [x24, _BRCMU_CHAN_BAND_2G@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh30:
	adrp	x25, _BRCMU_CHAN_BW_40@GOTPAGE
Lloh31:
	ldr	x25, [x25, _BRCMU_CHAN_BW_40@GOTPAGEOFF]
	ldr	x9, [x25]
	stp	x8, x9, [sp, #8]
Lloh32:
	adrp	x8, _BRCMU_CHAN_SB_NONE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _BRCMU_CHAN_SB_NONE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	str	w8, [sp, #48]
	str	xzr, [sp, #40]
	ldr	x8, [x19, #8]
	add	x0, sp, #8
	blr	x8
	ldr	x0, [sp, #32]
	bl	_cpu_to_le16
	str	w0, [x20]
	ldr	w3, [x23]
Lloh35:
	adrp	x1, l_.str.3@PAGE
Lloh36:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x22
	mov	x2, x20
	bl	_brcmf_fil_iovar_data_get
	cbz	w0, LBB0_7
; %bb.5:
	mov	x23, x0
Lloh37:
	adrp	x1, l_.str.4@PAGE
Lloh38:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	mov	x2, x23
	bl	_bphy_err
	mov	x0, x20
	bl	_kfree
	b	LBB0_21
LBB0_6:
Lloh39:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_21
LBB0_7:
	mov	x0, x19
	bl	_cfg_to_wiphy
	ldr	x8, [x0]
Lloh42:
	adrp	x9, _NL80211_BAND_2GHZ@GOTPAGE
Lloh43:
	ldr	x9, [x9, _NL80211_BAND_2GHZ@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	ldr	x21, [x8, x9, lsl #3]
	ldr	w0, [x20, #8]
	bl	_le32_to_cpu
	cmp	w0, #1
	b.lt	LBB0_20
; %bb.8:
	mov	x22, #0
	mov	w23, w0
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x22, x22, #1
	cmp	x22, x23
	b.eq	LBB0_20
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	ldr	x8, [x20]
	ldr	w0, [x8, x22, lsl #2]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	str	x8, [sp, #32]
	ldr	x8, [x19]
	add	x0, sp, #8
	blr	x8
	ldr	x8, [sp, #8]
	ldr	x9, [x24]
	cmp	x8, x9
	cset	w0, ne
	bl	_WARN_ON
	cbnz	x0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [sp, #16]
	ldr	x9, [x25]
	cmp	x8, x9
	cset	w0, ne
	bl	_WARN_ON
	cbnz	x0, LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x26, #0
	ldr	x9, [x21, #8]
	ldr	x10, [sp, #24]
LBB0_14:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x11, [x9, x26, lsl #3]
	cmp	x11, x10
	b.eq	LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x26, x26, #1
	cmp	x8, x26
	b.ne	LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x26, x8
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	w26, #0
LBB0_18:                                ;   in Loop: Header=BB0_10 Depth=1
	cmp	w26, w8
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_9
; %bb.19:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x21, #8]
	add	x0, x8, w26, uxtw #3
	add	x1, sp, #8
	bl	_brcmf_update_bw40_channel_flag
	b	LBB0_9
LBB0_20:
	mov	x0, x20
	bl	_kfree
	mov	w23, #0
LBB0_21:
	mov	x0, x23
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_WLC_BAND_5G,4,2                ; @WLC_BAND_5G
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bw_cap"

	.comm	_WLC_BAND_2G,4,2                ; @WLC_BAND_2G
	.comm	_WLC_BW_CAP_40MHZ,4,2           ; @WLC_BW_CAP_40MHZ
	.comm	_INFO,4,2                       ; @INFO
l_.str.1:                               ; @.str.1
	.asciz	"fallback to mimo_bw_cap\n"

	.comm	_WLC_N_BW_40ALL,4,2             ; @WLC_N_BW_40ALL
l_.str.2:                               ; @.str.2
	.asciz	"mimo_bw_cap"

	.comm	_BRCMF_DCMD_MEDLEN,4,2          ; @BRCMF_DCMD_MEDLEN
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BRCMU_CHAN_BAND_2G,8,3         ; @BRCMU_CHAN_BAND_2G
	.comm	_BRCMU_CHAN_BW_40,8,3           ; @BRCMU_CHAN_BW_40
	.comm	_BRCMU_CHAN_SB_NONE,4,2         ; @BRCMU_CHAN_SB_NONE
l_.str.3:                               ; @.str.3
	.asciz	"chanspecs"

l_.str.4:                               ; @.str.4
	.asciz	"get chanspecs error (%d)\n"

	.comm	_NL80211_BAND_2GHZ,8,3          ; @NL80211_BAND_2GHZ
	.no_dead_strip	_brcmf_enable_bw40_2g
.subsections_via_symbols
