	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnxt_reserve_rings             ## -- Begin function bnxt_reserve_rings
	.p2align	4, 0x90
_bnxt_reserve_rings:                    ## @bnxt_reserve_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movl	16(%rdi), %edi
	callq	_netdev_get_num_tc
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_bnxt_need_reserve_rings
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_13
## %bb.1:
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	callq	_BNXT_NEW_RM
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_bnxt_get_num_msix
	cmpq	(%rbx), %rax
	jne	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	callq	___bnxt_reserve_rings
	movl	%eax, %r12d
	testl	%r12d, %r12d
	je	LBB0_10
LBB0_9:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_netdev_err
	movl	%r12d, %r14d
LBB0_13:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rdi
	callq	_bnxt_ulp_irq_stop
	movq	%rbx, %rdi
	callq	_bnxt_clear_int_mode
	movq	%rbx, %rdi
	callq	___bnxt_reserve_rings
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_bnxt_init_int_mode
	movl	%eax, %r12d
LBB0_7:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_bnxt_ulp_irq_restart
	testl	%r12d, %r12d
	jne	LBB0_9
LBB0_10:
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.11:
	imull	8(%rbx), %r15d
	cmpl	12(%rbx), %r15d
	je	LBB0_13
## %bb.12:
	movl	16(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_netdev_err
	movl	16(%rbx), %edi
	callq	_netdev_reset_tc
	movl	12(%rbx), %eax
	movl	%eax, 8(%rbx)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ring reservation/IRQ init failure rc: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"tx ring reservation failure\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnxt_reserve_rings             ; -- Begin function bnxt_reserve_rings
	.p2align	2
_bnxt_reserve_rings:                    ; @bnxt_reserve_rings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_netdev_get_num_tc
	mov	x20, x0
	mov	x0, x19
	bl	_bnxt_need_reserve_rings
	cbz	w0, LBB0_11
; %bb.1:
	cbz	w21, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_BNXT_NEW_RM
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_bnxt_get_num_msix
	ldr	x8, [x19]
	cmp	x0, x8
	b.ne	LBB0_6
LBB0_4:
	mov	x0, x19
	bl	___bnxt_reserve_rings
	mov	x21, x0
	cbz	w21, LBB0_9
LBB0_5:
	ldr	w0, [x19, #16]
	str	x21, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	b	LBB0_12
LBB0_6:
	mov	x0, x19
	bl	_bnxt_ulp_irq_stop
	mov	x0, x19
	bl	_bnxt_clear_int_mode
	mov	x0, x19
	bl	___bnxt_reserve_rings
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_bnxt_init_int_mode
	mov	x21, x0
LBB0_8:
	mov	x0, x19
	mov	x1, x21
	bl	_bnxt_ulp_irq_restart
	cbnz	w21, LBB0_5
LBB0_9:
	cbz	w20, LBB0_11
; %bb.10:
	ldp	w8, w9, [x19, #8]
	mul	w8, w8, w20
	cmp	w8, w9
	b.ne	LBB0_13
LBB0_11:
	mov	w21, #0
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_13:
	ldr	w0, [x19, #16]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_err
	ldr	w0, [x19, #16]
	bl	_netdev_reset_tc
	ldr	w8, [x19, #12]
	str	w8, [x19, #8]
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ring reservation/IRQ init failure rc: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"tx ring reservation failure\n"

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