	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcms_c_ampdu_attach           ## -- Begin function brcms_c_ampdu_attach
	.p2align	4, 0x90
_brcms_c_ampdu_attach:                  ## @brcms_c_ampdu_attach
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$80, %edi
	callq	_kzalloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	%r14, 72(%rbx)
	movq	_AMPDU_MAX_SCB_TID@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	movq	(%rbx), %rax
	jle	LBB0_4
## %bb.2:
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, (%rax,%rcx,4)
	incq	%rcx
	movslq	(%r15), %rdx
	cmpq	%rdx, %rcx
	jl	LBB0_3
LBB0_4:
	movq	_PRIO_8021D_VO@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$0, (%rax,%rcx,4)
	movq	_PRIO_8021D_NC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$0, (%rax,%rcx,4)
	movq	_PRIO_8021D_NONE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$0, (%rax,%rcx,4)
	movq	_PRIO_8021D_BK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$0, (%rax,%rcx,4)
	movq	_AMPDU_TX_BA_DEF_WSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%rbx)
	movq	_AMPDU_RX_BA_DEF_WSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rbx)
	movq	_AMPDU_DEF_MPDU_DENSITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%rbx)
	movq	_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	movq	_AMPDU_MAX_DUR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_AMPDU_DEF_FFPLD_RSVD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movq	8(%r14), %rdi
	callq	_BRCMS_ISNPHY
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	8(%r14), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_NREV_LT
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_IEEE80211_HT_MAX_AMPDU_32K@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_IEEE80211_HT_MAX_AMPDU_64K@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	_AMPDU_DEF_RETRY_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, 32(%rbx)
	movq	_AMPDU_DEF_RR_RETRY_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	cmpl	$0, (%r15)
	jle	LBB0_12
## %bb.9:
	movq	24(%rbx), %rax
	movq	40(%rbx), %rcx
	movl	%edx, (%rcx)
	movl	20(%rbx), %edx
	movl	%edx, (%rax)
	cmpl	$2, (%r15)
	jl	LBB0_12
## %bb.10:
	movl	$1, %edx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	32(%rbx), %esi
	movl	%esi, (%rcx,%rdx,4)
	movl	20(%rbx), %esi
	movl	%esi, (%rax,%rdx,4)
	incq	%rdx
	movslq	(%r15), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_11
LBB0_12:
	movl	16(%rbx), %esi
	movq	%rbx, %rdi
	callq	_brcms_c_scb_ampdu_update_max_txlen
	movl	$0, 8(%rbx)
	movq	(%r14), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_brcms_c_ampdu_set
	movq	_FFPLD_TX_MAX_UNFL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	%rbx, %rdi
	callq	_brcms_c_ffpld_init
LBB0_13:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_AMPDU_MAX_SCB_TID,4,2          ## @AMPDU_MAX_SCB_TID
	.comm	_PRIO_8021D_VO,8,3              ## @PRIO_8021D_VO
	.comm	_PRIO_8021D_NC,8,3              ## @PRIO_8021D_NC
	.comm	_PRIO_8021D_NONE,8,3            ## @PRIO_8021D_NONE
	.comm	_PRIO_8021D_BK,8,3              ## @PRIO_8021D_BK
	.comm	_AMPDU_TX_BA_DEF_WSIZE,4,2      ## @AMPDU_TX_BA_DEF_WSIZE
	.comm	_AMPDU_RX_BA_DEF_WSIZE,4,2      ## @AMPDU_RX_BA_DEF_WSIZE
	.comm	_AMPDU_DEF_MPDU_DENSITY,4,2     ## @AMPDU_DEF_MPDU_DENSITY
	.comm	_AUTO,4,2                       ## @AUTO
	.comm	_AMPDU_MAX_DUR,4,2              ## @AMPDU_MAX_DUR
	.comm	_AMPDU_DEF_FFPLD_RSVD,4,2       ## @AMPDU_DEF_FFPLD_RSVD
	.comm	_IEEE80211_HT_MAX_AMPDU_32K,4,2 ## @IEEE80211_HT_MAX_AMPDU_32K
	.comm	_IEEE80211_HT_MAX_AMPDU_64K,4,2 ## @IEEE80211_HT_MAX_AMPDU_64K
	.comm	_AMPDU_DEF_RETRY_LIMIT,4,2      ## @AMPDU_DEF_RETRY_LIMIT
	.comm	_AMPDU_DEF_RR_RETRY_LIMIT,4,2   ## @AMPDU_DEF_RR_RETRY_LIMIT
	.comm	_FFPLD_TX_MAX_UNFL,4,2          ## @FFPLD_TX_MAX_UNFL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcms_c_ampdu_attach           ; -- Begin function brcms_c_ampdu_attach
	.p2align	2
_brcms_c_ampdu_attach:                  ; @brcms_c_ampdu_attach
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #80
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_13
; %bb.1:
	str	x20, [x19, #72]
Lloh3:
	adrp	x21, _AMPDU_MAX_SCB_TID@GOTPAGE
Lloh4:
	ldr	x21, [x21, _AMPDU_MAX_SCB_TID@GOTPAGEOFF]
	ldr	w9, [x21]
	ldr	x8, [x19]
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x9, #0
	mov	w10, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	str	w10, [x8, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x11, [x21]
	cmp	x9, x11
	b.lt	LBB0_3
LBB0_4:
Lloh5:
	adrp	x9, _PRIO_8021D_VO@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PRIO_8021D_VO@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	str	wzr, [x8, x9, lsl #2]
Lloh8:
	adrp	x9, _PRIO_8021D_NC@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PRIO_8021D_NC@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	str	wzr, [x8, x9, lsl #2]
Lloh11:
	adrp	x9, _PRIO_8021D_NONE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PRIO_8021D_NONE@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	str	wzr, [x8, x9, lsl #2]
Lloh14:
	adrp	x9, _PRIO_8021D_BK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PRIO_8021D_BK@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	str	wzr, [x8, x9, lsl #2]
Lloh17:
	adrp	x8, _AMPDU_TX_BA_DEF_WSIZE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AMPDU_TX_BA_DEF_WSIZE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x19, #68]
Lloh20:
	adrp	x8, _AMPDU_RX_BA_DEF_WSIZE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AMPDU_RX_BA_DEF_WSIZE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _AMPDU_DEF_MPDU_DENSITY@GOTPAGE
Lloh24:
	ldr	x9, [x9, _AMPDU_DEF_MPDU_DENSITY@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
Lloh26:
	adrp	x10, _AUTO@GOTPAGE
Lloh27:
	ldr	x10, [x10, _AUTO@GOTPAGEOFF]
	stp	w9, w8, [x19, #60]
Lloh28:
	ldr	w8, [x10]
Lloh29:
	adrp	x9, _AMPDU_MAX_DUR@GOTPAGE
Lloh30:
	ldr	x9, [x9, _AMPDU_MAX_DUR@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	str	w9, [x19, #16]
Lloh32:
	adrp	x9, _AMPDU_DEF_FFPLD_RSVD@GOTPAGE
Lloh33:
	ldr	x9, [x9, _AMPDU_DEF_FFPLD_RSVD@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #52]
	ldr	x0, [x20, #8]
	bl	_BRCMS_ISNPHY
	cbz	x0, LBB0_7
; %bb.5:
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	mov	w1, #2
	bl	_NREV_LT
	cbz	x0, LBB0_7
; %bb.6:
Lloh35:
	adrp	x8, _IEEE80211_HT_MAX_AMPDU_32K@GOTPAGE
Lloh36:
	ldr	x8, [x8, _IEEE80211_HT_MAX_AMPDU_32K@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh37:
	adrp	x8, _IEEE80211_HT_MAX_AMPDU_64K@GOTPAGE
Lloh38:
	ldr	x8, [x8, _IEEE80211_HT_MAX_AMPDU_64K@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	str	w8, [x19, #48]
Lloh39:
	adrp	x8, _AMPDU_DEF_RETRY_LIMIT@GOTPAGE
Lloh40:
	ldr	x8, [x8, _AMPDU_DEF_RETRY_LIMIT@GOTPAGEOFF]
Lloh41:
	ldr	w10, [x8]
	str	w10, [x19, #32]
Lloh42:
	adrp	x8, _AMPDU_DEF_RR_RETRY_LIMIT@GOTPAGE
Lloh43:
	ldr	x8, [x8, _AMPDU_DEF_RR_RETRY_LIMIT@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.9:
	ldr	x8, [x19, #40]
	ldr	x9, [x19, #24]
	str	w10, [x8]
	ldr	w10, [x19, #20]
	str	w10, [x9]
	ldr	w10, [x21]
	cmp	w10, #2
	b.lt	LBB0_12
; %bb.10:
	mov	w10, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x19, #32]
	lsl	x12, x10, #2
	str	w11, [x8, x12]
	ldr	w11, [x19, #20]
	str	w11, [x9, x12]
	add	x10, x10, #1
	ldrsw	x11, [x21]
	cmp	x10, x11
	b.lt	LBB0_11
LBB0_12:
	ldr	w1, [x19, #16]
	mov	x0, x19
	bl	_brcms_c_scb_ampdu_update_max_txlen
	str	wzr, [x19, #8]
	ldr	x8, [x20]
	ldr	w1, [x8]
	mov	x0, x19
	bl	_brcms_c_ampdu_set
Lloh45:
	adrp	x8, _FFPLD_TX_MAX_UNFL@GOTPAGE
Lloh46:
	ldr	x8, [x8, _FFPLD_TX_MAX_UNFL@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	mov	x0, x19
	bl	_brcms_c_ffpld_init
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_AMPDU_MAX_SCB_TID,4,2          ; @AMPDU_MAX_SCB_TID
	.comm	_PRIO_8021D_VO,8,3              ; @PRIO_8021D_VO
	.comm	_PRIO_8021D_NC,8,3              ; @PRIO_8021D_NC
	.comm	_PRIO_8021D_NONE,8,3            ; @PRIO_8021D_NONE
	.comm	_PRIO_8021D_BK,8,3              ; @PRIO_8021D_BK
	.comm	_AMPDU_TX_BA_DEF_WSIZE,4,2      ; @AMPDU_TX_BA_DEF_WSIZE
	.comm	_AMPDU_RX_BA_DEF_WSIZE,4,2      ; @AMPDU_RX_BA_DEF_WSIZE
	.comm	_AMPDU_DEF_MPDU_DENSITY,4,2     ; @AMPDU_DEF_MPDU_DENSITY
	.comm	_AUTO,4,2                       ; @AUTO
	.comm	_AMPDU_MAX_DUR,4,2              ; @AMPDU_MAX_DUR
	.comm	_AMPDU_DEF_FFPLD_RSVD,4,2       ; @AMPDU_DEF_FFPLD_RSVD
	.comm	_IEEE80211_HT_MAX_AMPDU_32K,4,2 ; @IEEE80211_HT_MAX_AMPDU_32K
	.comm	_IEEE80211_HT_MAX_AMPDU_64K,4,2 ; @IEEE80211_HT_MAX_AMPDU_64K
	.comm	_AMPDU_DEF_RETRY_LIMIT,4,2      ; @AMPDU_DEF_RETRY_LIMIT
	.comm	_AMPDU_DEF_RR_RETRY_LIMIT,4,2   ; @AMPDU_DEF_RR_RETRY_LIMIT
	.comm	_FFPLD_TX_MAX_UNFL,4,2          ; @FFPLD_TX_MAX_UNFL
.subsections_via_symbols
