	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function brcmf_msgbuf_txflow
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_brcmf_msgbuf_txflow:                   ## @brcmf_msgbuf_txflow
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	8(%rdi), %r14
	movq	24(%rdi), %rbx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %rax
	movq	(%rax,%rsi,8), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_brcmf_commonring_write_available
	testl	%eax, %eax
	je	LBB0_15
## %bb.1:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_brcmf_commonring_lock
	movq	_BRCMF_MSGBUF_TX_FLUSH_CNT2@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_BRCMF_MSGBUF_TX_FLUSH_CNT1@GOTPCREL(%rip), %rax
	subq	(%rax), %r15
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_brcmf_flowring_qlen
	testq	%rax, %rax
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_12
## %bb.2:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rbx
	movq	%r12, %rdi
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_brcmf_flowring_qlen
	testq	%rax, %rax
	je	LBB0_12
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %r12
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_brcmf_flowring_dequeue
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_skb_orphan
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	(%rcx), %esi
	movq	_ETH_HLEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%r15, %rdx
	leaq	-96(%rbp), %r8
	leaq	-80(%rbp), %r9
	callq	_brcmf_msgbuf_alloc_pktid
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_brcmf_commonring_reserve_for_write
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r14
	movq	%r13, %rbx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	incq	%r13
	movq	_MSGBUF_TYPE_TX_POST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%r14)
	movl	-80(%rbp), %edi
	incl	%edi
	callq	_cpu_to_le32
	movq	%rax, 64(%r14)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_brcmf_flowring_ifidx_get
	movl	%eax, 56(%r14)
	movq	_BRCMF_MSGBUF_PKT_FLAGS_FRAME_802_3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movl	(%r15), %edx
	andl	$7, %edx
	movq	_BRCMF_MSGBUF_PKT_FLAGS_PRIO_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shll	%cl, %edx
	orl	%eax, %edx
	movl	%edx, (%r14)
	movl	$1, 4(%r14)
	movl	52(%r14), %edi
	movl	16(%r15), %esi
	movq	_ETH_HLEN@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	callq	_memcpy
	movq	8(%r15), %rdi
	subq	(%rbx), %rdi
	callq	_cpu_to_le16
	movl	%eax, 48(%r14)
	movl	-96(%rbp), %ebx
	callq	_cpu_to_le32
	movq	%rax, 40(%r14)
	movl	%ebx, %edi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	callq	_cpu_to_le32
	movq	%rax, 32(%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r14)
	movq	$0, 24(%r14)
	movq	%rbx, %rdi
	callq	_atomic_inc
	movq	%r13, %rax
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	_BRCMF_MSGBUF_TX_FLUSH_CNT2@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jl	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_brcmf_commonring_write_complete
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_11
LBB0_4:
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_brcmf_flowring_qlen
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_bphy_err
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_13
	jmp	LBB0_14
LBB0_6:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_brcmf_flowring_reinsert
	leaq	L_.str.1(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_bphy_err
LBB0_12:
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_14
LBB0_13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_brcmf_commonring_write_complete
LBB0_14:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_brcmf_commonring_unlock
LBB0_15:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	(%rcx), %esi
	movq	-80(%rbp), %rdx
	callq	_brcmf_msgbuf_get_pktid
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_brcmf_flowring_reinsert
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_13
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_BRCMF_MSGBUF_TX_FLUSH_CNT2,8,3 ## @BRCMF_MSGBUF_TX_FLUSH_CNT2
	.comm	_BRCMF_MSGBUF_TX_FLUSH_CNT1,8,3 ## @BRCMF_MSGBUF_TX_FLUSH_CNT1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No SKB, but qlen %d\n"

	.comm	_ETH_HLEN,8,3                   ## @ETH_HLEN
L_.str.1:                               ## @.str.1
	.asciz	"No PKTID available !!\n"

	.comm	_MSGBUF_TYPE_TX_POST,4,2        ## @MSGBUF_TYPE_TX_POST
	.comm	_BRCMF_MSGBUF_PKT_FLAGS_FRAME_802_3,4,2 ## @BRCMF_MSGBUF_PKT_FLAGS_FRAME_802_3
	.comm	_BRCMF_MSGBUF_PKT_FLAGS_PRIO_SHIFT,4,2 ## @BRCMF_MSGBUF_PKT_FLAGS_PRIO_SHIFT
	.no_dead_strip	_brcmf_msgbuf_txflow
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_msgbuf_txflow
_brcmf_msgbuf_txflow:                   ; @brcmf_msgbuf_txflow
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x23, x0
	ldp	x8, x22, [x0, #16]
	ldr	x21, [x0, #8]
	ldr	x19, [x8, x1, lsl #3]
	mov	x0, x19
	bl	_brcmf_commonring_write_available
	cbz	w0, LBB0_15
; %bb.1:
	mov	x0, x19
	bl	_brcmf_commonring_lock
Lloh0:
	adrp	x27, _BRCMF_MSGBUF_TX_FLUSH_CNT2@GOTPAGE
Lloh1:
	ldr	x27, [x27, _BRCMF_MSGBUF_TX_FLUSH_CNT2@GOTPAGEOFF]
	ldr	x8, [x27]
Lloh2:
	adrp	x9, _BRCMF_MSGBUF_TX_FLUSH_CNT1@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BRCMF_MSGBUF_TX_FLUSH_CNT1@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	sub	x26, x8, x9
	mov	x0, x22
	mov	x1, x20
	bl	_brcmf_flowring_qlen
	cbz	x0, LBB0_12
; %bb.2:
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
Lloh5:
	adrp	x28, _ETH_HLEN@GOTPAGE
Lloh6:
	ldr	x28, [x28, _ETH_HLEN@GOTPAGEOFF]
Lloh7:
	adrp	x21, _BRCMF_MSGBUF_PKT_FLAGS_PRIO_SHIFT@GOTPAGE
Lloh8:
	ldr	x21, [x21, _BRCMF_MSGBUF_PKT_FLAGS_PRIO_SHIFT@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	mov	x1, x20
	bl	_brcmf_flowring_qlen
	cbz	x0, LBB0_12
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x20
	bl	_brcmf_flowring_dequeue
	cbz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, x0
	bl	_skb_orphan
	ldr	x8, [x23, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	ldr	w1, [x23]
	ldr	x3, [x28]
	add	x4, sp, #24
	add	x5, sp, #16
	mov	x2, x24
	bl	_brcmf_msgbuf_alloc_pktid
	cbnz	x0, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_brcmf_commonring_reserve_for_write
	cbz	x0, LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, x0
	add	x26, x26, #1
Lloh9:
	adrp	x8, _MSGBUF_TYPE_TX_POST@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MSGBUF_TYPE_TX_POST@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x0, #72]
	ldr	w8, [sp, #16]
	add	w0, w8, #1
	bl	_cpu_to_le32
	str	x0, [x25, #64]
	mov	x0, x22
	mov	x1, x20
	bl	_brcmf_flowring_ifidx_get
	str	w0, [x25, #56]
Lloh12:
	adrp	x8, _BRCMF_MSGBUF_PKT_FLAGS_FRAME_802_3@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BRCMF_MSGBUF_PKT_FLAGS_FRAME_802_3@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x25]
	ldr	w9, [x24]
	and	w9, w9, #0x7
	ldr	w10, [x21]
	lsl	w9, w9, w10
	orr	w8, w9, w8
	str	w8, [x25]
	mov	w8, #1
	str	w8, [x25, #4]
	ldr	w0, [x25, #52]
	ldr	w1, [x24, #16]
	ldr	x2, [x28]
	bl	_memcpy
	ldr	x8, [x24, #8]
	ldr	x9, [x28]
	sub	x0, x8, x9
	bl	_cpu_to_le16
	str	w0, [x25, #48]
	ldr	w24, [sp, #24]
	bl	_cpu_to_le32
	str	x0, [x25, #40]
	mov	x0, x24
	bl	_cpu_to_le32
	stp	xzr, x0, [x25, #24]
	stp	xzr, xzr, [x25, #8]
	mov	x0, x19
	bl	_atomic_inc
	ldr	x8, [x27]
	cmp	x26, x8
	b.lt	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_brcmf_commonring_write_complete
	mov	x26, #0
	b	LBB0_3
LBB0_9:
	mov	x0, x22
	mov	x1, x20
	bl	_brcmf_flowring_qlen
	str	x0, [sp]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_11
LBB0_10:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x24
	bl	_brcmf_flowring_reinsert
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_11:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_bphy_err
LBB0_12:
	cbz	x26, LBB0_14
LBB0_13:
	mov	x0, x19
	bl	_brcmf_commonring_write_complete
LBB0_14:
	mov	x0, x19
	bl	_brcmf_commonring_unlock
LBB0_15:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_16:
	ldr	x8, [x23, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	ldr	w1, [x23]
	ldr	x2, [sp, #16]
	bl	_brcmf_msgbuf_get_pktid
	mov	x0, x22
	mov	x1, x20
	mov	x2, x24
	bl	_brcmf_flowring_reinsert
	cbnz	x26, LBB0_13
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_BRCMF_MSGBUF_TX_FLUSH_CNT2,8,3 ; @BRCMF_MSGBUF_TX_FLUSH_CNT2
	.comm	_BRCMF_MSGBUF_TX_FLUSH_CNT1,8,3 ; @BRCMF_MSGBUF_TX_FLUSH_CNT1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No SKB, but qlen %d\n"

	.comm	_ETH_HLEN,8,3                   ; @ETH_HLEN
l_.str.1:                               ; @.str.1
	.asciz	"No PKTID available !!\n"

	.comm	_MSGBUF_TYPE_TX_POST,4,2        ; @MSGBUF_TYPE_TX_POST
	.comm	_BRCMF_MSGBUF_PKT_FLAGS_FRAME_802_3,4,2 ; @BRCMF_MSGBUF_PKT_FLAGS_FRAME_802_3
	.comm	_BRCMF_MSGBUF_PKT_FLAGS_PRIO_SHIFT,4,2 ; @BRCMF_MSGBUF_PKT_FLAGS_PRIO_SHIFT
	.no_dead_strip	_brcmf_msgbuf_txflow
.subsections_via_symbols
