	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_pcie_init_ringbuffers
_brcmf_pcie_init_ringbuffers:           ## @brcmf_pcie_init_ringbuffers
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	80(%rdi), %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	40(%rbx), %rsi
	addq	48(%rbx), %rsi
	leaq	-200(%rbp), %rdi
	movl	$104, %edx
	callq	_memcpy_fromio
	movq	%rbx, %r15
	cmpl	$6, 8(%rbx)
	jl	LBB0_2
## %bb.1:
	movl	-104(%rbp), %edi
	callq	_le16_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	-112(%rbp), %edi
	callq	_le16_to_cpu
	movl	%eax, %r13d
	movl	-108(%rbp), %edi
	callq	_le16_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_3
LBB0_2:
	movl	-112(%rbp), %edi
	callq	_le16_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	movq	_BRCMF_NROF_H2D_COMMON_MSGRINGS@GOTPCREL(%rip), %rdx
	movq	%rax, %rcx
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	%eax, %r13d
	subl	(%rdx), %r13d
	movq	_BRCMF_NROF_D2H_COMMON_MSGRINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_3:
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %r12
	movl	(%r15), %ebx
	testl	%ebx, %ebx
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movl	%r13d, -84(%rbp)                ## 4-byte Spill
	je	LBB0_7
## %bb.4:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	addl	%ecx, %eax
	imull	%eax, %ebx
	addl	%ebx, %ebx
	movq	80(%r15), %rdi
	leaq	56(%r15), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ebx, %esi
	callq	_dma_alloc_coherent
	movq	%r15, %r12
	movl	%eax, 72(%r15)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	cmpl	$0, (%r12)
	je	LBB0_7
## %bb.8:
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	movl	%ebx, 4(%r12)
	movl	(%r12), %ebx
	movl	56(%r12), %r13d
	movq	_brcmf_pcie_write_idx@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%r12)
	movq	_brcmf_pcie_read_idx@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%r12)
	movl	%r13d, %edi
	callq	_cpu_to_le32
	movq	%rax, -136(%rbp)
	callq	_cpu_to_le32
	movq	%rax, -144(%rbp)
	movl	%ebx, %r14d
	imull	-80(%rbp), %r14d                ## 4-byte Folded Reload
	addl	%r14d, %r13d
	movl	%r13d, %edi
	callq	_cpu_to_le32
	movq	%rax, -152(%rbp)
	callq	_cpu_to_le32
	movq	%rax, -160(%rbp)
	leal	(%r14,%r14), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	addl	%r14d, %r13d
	movl	%r13d, %edi
	callq	_cpu_to_le32
	movq	%rax, -168(%rbp)
	callq	_cpu_to_le32
	movq	%rax, -176(%rbp)
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	imull	-72(%rbp), %edi                 ## 4-byte Folded Reload
	leal	(%rdi,%r14,2), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	addl	%r13d, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_le32
	movq	%rax, -184(%rbp)
	callq	_cpu_to_le32
	movq	%rax, -192(%rbp)
	movq	40(%r12), %rdi
	addq	48(%r12), %rdi
	xorl	%r12d, %r12d
	leaq	-200(%rbp), %rsi
	movl	$104, %edx
	callq	_memcpy_toio
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_9
LBB0_5:
	movl	$0, (%r12)
LBB0_7:
	movq	%r12, %rbx
	movl	-116(%rbp), %edi
	callq	_le32_to_cpu
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	-120(%rbp), %edi
	callq	_le32_to_cpu
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	-124(%rbp), %edi
	callq	_le32_to_cpu
	movl	%eax, %r12d
	movl	-128(%rbp), %edi
	callq	_le32_to_cpu
	movl	%eax, %r14d
	movq	_brcmf_pcie_write_tcm16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%rbx)
	movq	_brcmf_pcie_read_tcm16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rbx)
	movl	$4, -44(%rbp)                   ## 4-byte Folded Spill
	leaq	L_.str(%rip), %rsi
LBB0_9:
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movq	_PCIE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%eax, %eax
	callq	_brcmf_dbg
	movl	-200(%rbp), %edi
	callq	_le32_to_cpu
	movl	%eax, %r13d
	movq	_BRCMF_NROF_H2D_COMMON_MSGRINGS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.10:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	callq	_brcmf_pcie_alloc_dma_and_ring
	testq	%rax, %rax
	je	LBB0_22
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, (%rax)
	movl	%r14d, 4(%rax)
	movl	%r12d, 8(%rax)
	movq	32(%r15), %rcx
	movq	%rax, (%rcx,%r12,8)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addl	%eax, %edx
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	_BRCMF_RING_MEM_SZ@GOTPCREL(%rip), %rcx
	addl	(%rcx), %r13d
	addl	%eax, %r14d
	incq	%r12
	movslq	(%rbx), %rax
	cmpq	%rax, %r12
	jl	LBB0_11
LBB0_13:
	movq	_BRCMF_NROF_COMMON_MSGRINGS@GOTPCREL(%rip), %r12
	cmpl	(%r12), %eax
	jge	LBB0_17
## %bb.14:
	movslq	%eax, %rbx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	callq	_brcmf_pcie_alloc_dma_and_ring
	testq	%rax, %rax
	je	LBB0_22
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, (%rax)
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movl	%esi, 4(%rax)
	movl	%ebx, 8(%rax)
	movq	32(%r15), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addl	%eax, %edx
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
	movq	_BRCMF_RING_MEM_SZ@GOTPCREL(%rip), %rcx
	addl	(%rcx), %r13d
	addl	%eax, %esi
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_15
LBB0_17:
	movl	-84(%rbp), %edi                 ## 4-byte Reload
	movl	%edi, 12(%r15)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, 16(%r15)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, 20(%r15)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edi, %r12d
	movl	$24, %esi
	callq	_kcalloc
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_22
## %bb.18:
	movq	_PCIE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_brcmf_dbg
	testl	%r12d, %r12d
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jle	LBB0_21
## %bb.19:
	movl	%r12d, %ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, 16(%r12)
	movq	_BRCMF_H2D_MSGRING_FLOWRING_IDSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r13d, %eax
	movl	%eax, 8(%r12)
	leaq	12(%r12), %rdi
	movq	_brcmf_pcie_ring_mb_ring_bell@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_brcmf_pcie_ring_mb_update_rptr@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_brcmf_pcie_ring_mb_update_wptr@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_brcmf_pcie_ring_mb_write_rptr@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_brcmf_pcie_ring_mb_write_wptr@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r12, (%rsp)
	callq	_brcmf_commonring_register_cb
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%ebx, (%r12)
	movl	%r14d, 4(%r12)
	addl	%eax, %ebx
	addl	%eax, %r14d
	incq	%r13
	addq	$24, %r12
	cmpq	%r13, -64(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_20
LBB0_21:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 24(%r15)
	xorl	%eax, %eax
	jmp	LBB0_23
LBB0_22:
	leaq	L_.str.3(%rip), %rsi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_brcmf_err
	movq	%r15, %rdi
	callq	_brcmf_pcie_release_ringbuffers
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_23:
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BRCMF_NROF_H2D_COMMON_MSGRINGS,4,2 ## @BRCMF_NROF_H2D_COMMON_MSGRINGS
	.comm	_BRCMF_NROF_D2H_COMMON_MSGRINGS,4,2 ## @BRCMF_NROF_D2H_COMMON_MSGRINGS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_brcmf_pcie_write_tcm16,4,2     ## @brcmf_pcie_write_tcm16
	.comm	_brcmf_pcie_read_tcm16,4,2      ## @brcmf_pcie_read_tcm16
	.comm	_PCIE,4,2                       ## @PCIE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Using TCM indices\n"

	.comm	_brcmf_pcie_write_idx,4,2       ## @brcmf_pcie_write_idx
	.comm	_brcmf_pcie_read_idx,4,2        ## @brcmf_pcie_read_idx
L_.str.1:                               ## @.str.1
	.asciz	"Using host memory indices\n"

	.comm	_BRCMF_RING_MEM_SZ,8,3          ## @BRCMF_RING_MEM_SZ
	.comm	_BRCMF_NROF_COMMON_MSGRINGS,4,2 ## @BRCMF_NROF_COMMON_MSGRINGS
L_.str.2:                               ## @.str.2
	.asciz	"Nr of flowrings is %d\n"

	.comm	_BRCMF_H2D_MSGRING_FLOWRING_IDSTART,4,2 ## @BRCMF_H2D_MSGRING_FLOWRING_IDSTART
	.comm	_brcmf_pcie_ring_mb_ring_bell,4,2 ## @brcmf_pcie_ring_mb_ring_bell
	.comm	_brcmf_pcie_ring_mb_update_rptr,4,2 ## @brcmf_pcie_ring_mb_update_rptr
	.comm	_brcmf_pcie_ring_mb_update_wptr,4,2 ## @brcmf_pcie_ring_mb_update_wptr
	.comm	_brcmf_pcie_ring_mb_write_rptr,4,2 ## @brcmf_pcie_ring_mb_write_rptr
	.comm	_brcmf_pcie_ring_mb_write_wptr,4,2 ## @brcmf_pcie_ring_mb_write_wptr
L_.str.3:                               ## @.str.3
	.asciz	"Allocating ring buffers failed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_brcmf_pcie_init_ringbuffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_pcie_init_ringbuffers
_brcmf_pcie_init_ringbuffers:           ; @brcmf_pcie_init_ringbuffers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x28, x27, [sp, #144]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #160]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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	x19, x0
	ldr	x0, [x0, #80]
	bl	_dev_get_drvdata
	mov	x21, x0
	ldp	x9, x8, [x19, #40]
	add	x1, x9, x8
	add	x0, sp, #40
	mov	w2, #104
	bl	_memcpy_fromio
	ldr	w8, [x19, #8]
Lloh0:
	adrp	x26, _BRCMF_NROF_H2D_COMMON_MSGRINGS@GOTPAGE
Lloh1:
	ldr	x26, [x26, _BRCMF_NROF_H2D_COMMON_MSGRINGS@GOTPAGEOFF]
	cmp	w8, #6
	b.lt	LBB0_2
; %bb.1:
	ldr	w0, [sp, #136]
	bl	_le16_to_cpu
	mov	x24, x0
	ldr	w0, [sp, #128]
	bl	_le16_to_cpu
	mov	x22, x0
	ldr	w0, [sp, #132]
	bl	_le16_to_cpu
	mov	x25, x0
	b	LBB0_3
LBB0_2:
	ldr	w0, [sp, #128]
	bl	_le16_to_cpu
	mov	x24, x0
	ldr	w8, [x26]
	sub	w22, w0, w8
Lloh2:
	adrp	x8, _BRCMF_NROF_D2H_COMMON_MSGRINGS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BRCMF_NROF_D2H_COMMON_MSGRINGS@GOTPAGEOFF]
Lloh4:
	ldr	w25, [x8]
LBB0_3:
	ldr	w8, [x19]
Lloh5:
	adrp	x10, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x10, [x10, _GFP_KERNEL@GOTPAGEOFF]
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	w25, w24, [sp, #8]              ; 8-byte Folded Spill
	cbz	w8, LBB0_8
; %bb.4:
	add	w9, w25, w24
	mul	w8, w8, w9
	lsl	w20, w8, #1
	ldr	x0, [x19, #80]
	add	x2, x19, #56
	ldr	w3, [x10]
	mov	x1, x20
	bl	_dma_alloc_coherent
	str	w0, [x19, #72]
	cbz	w0, LBB0_7
; %bb.5:
	ldr	w8, [x19]
	cbz	w8, LBB0_8
; %bb.6:
	mov	w1, #0
	mov	x2, x20
	bl	_memset
	str	w20, [x19, #4]
	ldr	w23, [x19]
Lloh7:
	adrp	x8, _brcmf_pcie_write_idx@GOTPAGE
Lloh8:
	ldr	x8, [x8, _brcmf_pcie_write_idx@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _brcmf_pcie_read_idx@GOTPAGE
Lloh11:
	ldr	x9, [x9, _brcmf_pcie_read_idx@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #64]
	ldr	w20, [x19, #56]
	mov	x0, x20
	bl	_cpu_to_le32
	str	x0, [sp, #104]
	bl	_cpu_to_le32
	str	x0, [sp, #96]
	mul	w24, w23, w24
	add	w20, w24, w20
	mov	x0, x20
	bl	_cpu_to_le32
	str	x0, [sp, #88]
	bl	_cpu_to_le32
	str	x0, [sp, #80]
	lsl	w21, w24, #1
	add	w20, w20, w24
	mov	x0, x20
	bl	_cpu_to_le32
	str	x0, [sp, #72]
	bl	_cpu_to_le32
	str	x0, [sp, #64]
	mul	w8, w23, w25
	str	w21, [sp, #32]                  ; 4-byte Folded Spill
	add	w27, w21, w8
	add	w0, w20, w8
	bl	_cpu_to_le32
	str	x0, [sp, #56]
	bl	_cpu_to_le32
	str	x0, [sp, #48]
	ldp	x9, x8, [x19, #40]
	add	x0, x9, x8
	add	x1, sp, #40
	mov	w2, #104
	bl	_memcpy_toio
	mov	w25, #0
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_7:
	str	wzr, [x19]
LBB0_8:
	ldr	w0, [sp, #124]
	bl	_le32_to_cpu
	str	w0, [sp, #32]                   ; 4-byte Folded Spill
	ldr	w0, [sp, #120]
	bl	_le32_to_cpu
	mov	x27, x0
	ldr	w0, [sp, #116]
	bl	_le32_to_cpu
	mov	x25, x0
	ldr	w0, [sp, #112]
	bl	_le32_to_cpu
	mov	x24, x0
Lloh15:
	adrp	x8, _brcmf_pcie_write_tcm16@GOTPAGE
Lloh16:
	ldr	x8, [x8, _brcmf_pcie_write_tcm16@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _brcmf_pcie_read_tcm16@GOTPAGE
Lloh19:
	ldr	x9, [x9, _brcmf_pcie_read_tcm16@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #64]
	mov	w23, #4
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
LBB0_9:
Lloh23:
	adrp	x8, _PCIE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PCIE@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_brcmf_dbg
	ldr	w0, [sp, #40]
	bl	_le32_to_cpu
	mov	x28, x0
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.10:
	mov	w22, #0
	mov	x20, #0
Lloh26:
	adrp	x21, _BRCMF_RING_MEM_SZ@GOTPAGE
Lloh27:
	ldr	x21, [x21, _BRCMF_RING_MEM_SZ@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x28
	bl	_brcmf_pcie_alloc_dma_and_ring
	cbz	x0, LBB0_23
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	w8, w24, w22
	add	w9, w25, w22
	stp	w9, w8, [x0]
	str	w20, [x0, #8]
	ldr	x8, [x19, #32]
	str	x0, [x8, x20, lsl #3]
	ldr	w8, [x21]
	add	w28, w28, w8
	add	x20, x20, #1
	ldrsw	x8, [x26]
	add	w22, w22, w23
	cmp	x20, x8
	b.lt	LBB0_11
; %bb.13:
	add	w24, w24, w22
	add	w25, w25, w22
LBB0_14:
Lloh28:
	adrp	x21, _BRCMF_NROF_COMMON_MSGRINGS@GOTPAGE
Lloh29:
	ldr	x21, [x21, _BRCMF_NROF_COMMON_MSGRINGS@GOTPAGEOFF]
	ldr	w9, [x21]
	cmp	w8, w9
	b.ge	LBB0_18
; %bb.15:
	mov	w22, #0
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	sxtw	x20, w8
Lloh30:
	adrp	x26, _BRCMF_RING_MEM_SZ@GOTPAGE
Lloh31:
	ldr	x26, [x26, _BRCMF_RING_MEM_SZ@GOTPAGEOFF]
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x28
	bl	_brcmf_pcie_alloc_dma_and_ring
	cbz	x0, LBB0_23
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	add	w8, w27, w22
	ldr	w9, [sp, #32]                   ; 4-byte Folded Reload
	add	w9, w9, w22
	stp	w9, w8, [x0]
	str	w20, [x0, #8]
	ldr	x8, [x19, #32]
	str	x0, [x8, x20, lsl #3]
	ldr	w8, [x26]
	add	w28, w28, w8
	add	x20, x20, #1
	ldrsw	x8, [x21]
	add	w22, w22, w23
	cmp	x20, x8
	b.lt	LBB0_16
LBB0_18:
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	stp	w0, w8, [x19, #12]
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	str	w8, [x19, #20]
Lloh32:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	mov	x22, x0
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	w1, #24
	bl	_kcalloc
	str	x0, [sp, #32]                   ; 8-byte Folded Spill
	cbz	x0, LBB0_23
; %bb.19:
Lloh35:
	adrp	x8, _PCIE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _PCIE@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	str	x22, [sp]
Lloh38:
	adrp	x1, l_.str.2@PAGE
Lloh39:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_brcmf_dbg
	cmp	w22, #1
	b.lt	LBB0_22
; %bb.20:
	mov	w21, #0
	mov	x26, #0
	ldr	x20, [sp, #32]                  ; 8-byte Folded Reload
	mov	w22, w22
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	add	w28, w25, w21
	add	w27, w24, w21
	str	x19, [x20, #16]
Lloh40:
	adrp	x8, _BRCMF_H2D_MSGRING_FLOWRING_IDSTART@GOTPAGE
Lloh41:
	ldr	x8, [x8, _BRCMF_H2D_MSGRING_FLOWRING_IDSTART@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	add	w8, w26, w8
	str	w8, [x20, #8]
	add	x0, x20, #12
Lloh43:
	adrp	x8, _brcmf_pcie_ring_mb_ring_bell@GOTPAGE
Lloh44:
	ldr	x8, [x8, _brcmf_pcie_ring_mb_ring_bell@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
Lloh46:
	adrp	x8, _brcmf_pcie_ring_mb_update_rptr@GOTPAGE
Lloh47:
	ldr	x8, [x8, _brcmf_pcie_ring_mb_update_rptr@GOTPAGEOFF]
Lloh48:
	ldr	w2, [x8]
Lloh49:
	adrp	x8, _brcmf_pcie_ring_mb_update_wptr@GOTPAGE
Lloh50:
	ldr	x8, [x8, _brcmf_pcie_ring_mb_update_wptr@GOTPAGEOFF]
Lloh51:
	ldr	w3, [x8]
Lloh52:
	adrp	x8, _brcmf_pcie_ring_mb_write_rptr@GOTPAGE
Lloh53:
	ldr	x8, [x8, _brcmf_pcie_ring_mb_write_rptr@GOTPAGEOFF]
Lloh54:
	ldr	w4, [x8]
Lloh55:
	adrp	x8, _brcmf_pcie_ring_mb_write_wptr@GOTPAGE
Lloh56:
	ldr	x8, [x8, _brcmf_pcie_ring_mb_write_wptr@GOTPAGEOFF]
Lloh57:
	ldr	w5, [x8]
	mov	x6, x20
	bl	_brcmf_commonring_register_cb
	stp	w28, w27, [x20], #24
	add	x26, x26, #1
	add	w21, w21, w23
	cmp	x22, x26
	b.ne	LBB0_21
LBB0_22:
	mov	w0, #0
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	str	x8, [x19, #24]
	b	LBB0_24
LBB0_23:
Lloh58:
	adrp	x1, l_.str.3@PAGE
Lloh59:
	add	x1, x1, l_.str.3@PAGEOFF
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	bl	_brcmf_err
	mov	x0, x19
	bl	_brcmf_pcie_release_ringbuffers
Lloh60:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh61:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh62:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_24:
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #160]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpAdd	Lloh58, Lloh59
	.cfi_endproc
                                        ; -- End function
	.comm	_BRCMF_NROF_H2D_COMMON_MSGRINGS,4,2 ; @BRCMF_NROF_H2D_COMMON_MSGRINGS
	.comm	_BRCMF_NROF_D2H_COMMON_MSGRINGS,4,2 ; @BRCMF_NROF_D2H_COMMON_MSGRINGS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_brcmf_pcie_write_tcm16,4,2     ; @brcmf_pcie_write_tcm16
	.comm	_brcmf_pcie_read_tcm16,4,2      ; @brcmf_pcie_read_tcm16
	.comm	_PCIE,4,2                       ; @PCIE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Using TCM indices\n"

	.comm	_brcmf_pcie_write_idx,4,2       ; @brcmf_pcie_write_idx
	.comm	_brcmf_pcie_read_idx,4,2        ; @brcmf_pcie_read_idx
l_.str.1:                               ; @.str.1
	.asciz	"Using host memory indices\n"

	.comm	_BRCMF_RING_MEM_SZ,8,3          ; @BRCMF_RING_MEM_SZ
	.comm	_BRCMF_NROF_COMMON_MSGRINGS,4,2 ; @BRCMF_NROF_COMMON_MSGRINGS
l_.str.2:                               ; @.str.2
	.asciz	"Nr of flowrings is %d\n"

	.comm	_BRCMF_H2D_MSGRING_FLOWRING_IDSTART,4,2 ; @BRCMF_H2D_MSGRING_FLOWRING_IDSTART
	.comm	_brcmf_pcie_ring_mb_ring_bell,4,2 ; @brcmf_pcie_ring_mb_ring_bell
	.comm	_brcmf_pcie_ring_mb_update_rptr,4,2 ; @brcmf_pcie_ring_mb_update_rptr
	.comm	_brcmf_pcie_ring_mb_update_wptr,4,2 ; @brcmf_pcie_ring_mb_update_wptr
	.comm	_brcmf_pcie_ring_mb_write_rptr,4,2 ; @brcmf_pcie_ring_mb_write_rptr
	.comm	_brcmf_pcie_ring_mb_write_wptr,4,2 ; @brcmf_pcie_ring_mb_write_wptr
l_.str.3:                               ; @.str.3
	.asciz	"Allocating ring buffers failed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_brcmf_pcie_init_ringbuffers
.subsections_via_symbols
