	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnxt_alloc_cp_rings
_bnxt_alloc_cp_rings:                   ## @bnxt_alloc_cp_rings
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_BNXT_FLAG_SHARED_RINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rdi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	callq	_bnxt_get_ulp_msix_num
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_bnxt_get_ulp_msix_base
	cmpl	$0, 4(%rbx)
	jle	LBB0_15
## %bb.1:
	movslq	%eax, %r12
	xorl	%r13d, %r13d
	jmp	LBB0_2
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_bnxt_alloc_cp_sub_ring
	movq	8(%r15), %rcx
	movq	_BNXT_TX_HDL@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rax, (%rcx,%rdx,8)
	testq	%rax, %rax
	je	LBB0_7
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, (%rax)
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	movslq	4(%rbx), %rax
	cmpq	%rax, %r13
	jge	LBB0_15
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rax
	movq	(%rax,%r13,8), %r15
	testq	%r15, %r15
	je	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, (%r15)
	leaq	20(%r15), %rsi
	movq	%rbx, %rdi
	callq	_bnxt_alloc_ring
	testl	%eax, %eax
	jne	LBB0_16
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r12, %r13
	movl	%r14d, %eax
	movl	$0, %ecx
	cmovll	%ecx, %eax
	testl	%r14d, %r14d
	cmovel	%r14d, %eax
	addl	%r13d, %eax
	movl	%eax, 16(%r15)
	movq	_BNXT_FLAG_CHIP_P5@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	8(%rbx), %rax
	cmpq	%rax, %r13
	jge	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_bnxt_alloc_cp_sub_ring
	movq	8(%r15), %rcx
	movq	_BNXT_RX_HDL@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rax, (%rcx,%rdx,8)
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, (%rax)
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	12(%rbx), %rax
	cmpq	%rax, %r13
	jl	LBB0_12
	jmp	LBB0_14
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movslq	8(%rbx), %rax
	cmpq	%rax, %r13
	jge	LBB0_12
	jmp	LBB0_14
LBB0_15:
	xorl	%eax, %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_BNXT_FLAG_SHARED_RINGS,4,2     ## @BNXT_FLAG_SHARED_RINGS
	.comm	_BNXT_FLAG_CHIP_P5,4,2          ## @BNXT_FLAG_CHIP_P5
	.comm	_BNXT_RX_HDL,8,3                ## @BNXT_RX_HDL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BNXT_TX_HDL,8,3                ## @BNXT_TX_HDL
	.no_dead_strip	_bnxt_alloc_cp_rings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnxt_alloc_cp_rings
_bnxt_alloc_cp_rings:                   ; @bnxt_alloc_cp_rings
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	w22, [x0]
Lloh0:
	adrp	x8, _BNXT_FLAG_SHARED_RINGS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BNXT_FLAG_SHARED_RINGS@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	bl	_bnxt_get_ulp_msix_num
	mov	x20, x0
	mov	x0, x19
	bl	_bnxt_get_ulp_msix_base
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.1:
	mov	x21, #0
	and	w22, w23, w22
	sxtw	x23, w0
Lloh3:
	adrp	x24, _BNXT_FLAG_CHIP_P5@GOTPAGE
Lloh4:
	ldr	x24, [x24, _BNXT_FLAG_CHIP_P5@GOTPAGEOFF]
Lloh5:
	adrp	x25, _BNXT_RX_HDL@GOTPAGE
Lloh6:
	ldr	x25, [x25, _BNXT_RX_HDL@GOTPAGEOFF]
Lloh7:
	adrp	x26, _BNXT_TX_HDL@GOTPAGE
Lloh8:
	ldr	x26, [x26, _BNXT_TX_HDL@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_bnxt_alloc_cp_sub_ring
	ldr	x8, [x27, #8]
	ldr	x9, [x26]
	str	x0, [x8, x9, lsl #3]
	cbz	x0, LBB0_16
; %bb.3:                                ;   in Loop: Header=BB0_5 Depth=1
	str	x27, [x0]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x19, #4]
	cmp	x21, x8
	b.ge	LBB0_14
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x27, [x8, x21, lsl #3]
	cbz	x27, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x27
	str	x27, [x1], #20
	mov	x0, x19
	bl	_bnxt_alloc_ring
	cbnz	w0, LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	x21, x23
	ccmp	w20, #0, #4, ge
	csel	w8, wzr, w20, eq
	add	w8, w21, w8
	str	w8, [x27, #16]
	ldr	w8, [x19]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrsw	x8, [x19, #8]
	cmp	x21, x8
	b.ge	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_bnxt_alloc_cp_sub_ring
	ldr	x8, [x27, #8]
	ldr	x9, [x25]
	str	x0, [x8, x9, lsl #3]
	cbz	x0, LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	str	x27, [x0]
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	cbz	w22, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	ldrsw	x8, [x19, #12]
	cmp	x21, x8
	b.lt	LBB0_2
	b	LBB0_4
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrsw	x8, [x19, #8]
	cmp	x21, x8
	b.ge	LBB0_2
	b	LBB0_4
LBB0_14:
	mov	w0, #0
LBB0_15:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_16:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_BNXT_FLAG_SHARED_RINGS,4,2     ; @BNXT_FLAG_SHARED_RINGS
	.comm	_BNXT_FLAG_CHIP_P5,4,2          ; @BNXT_FLAG_CHIP_P5
	.comm	_BNXT_RX_HDL,8,3                ; @BNXT_RX_HDL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BNXT_TX_HDL,8,3                ; @BNXT_TX_HDL
	.no_dead_strip	_bnxt_alloc_cp_rings
.subsections_via_symbols
