	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_alloc_mem_cnic           ## -- Begin function bnx2x_alloc_mem_cnic
	.p2align	4, 0x90
_bnx2x_alloc_mem_cnic:                  ## @bnx2x_alloc_mem_cnic
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_CHIP_IS_E1x
	xorl	%ecx, %ecx
	testl	%eax, %eax
	sete	%cl
	movl	28(%rbx,%rcx,4), %edi
	leaq	24(%rbx), %rsi
	movl	$4, %edx
	callq	_BNX2X_PCI_ALLOC
	movq	%rbx, %rdi
	callq	_CONFIGURE_NIC_MODE
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	cmpl	$0, 20(%rbx)
	jne	LBB0_3
## %bb.2:
	leaq	16(%rbx), %rsi
	movq	_SRC_T2_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	callq	_BNX2X_PCI_ALLOC
LBB0_3:
	movq	(%rbx), %rax
	movq	%rax, 8(%rbx)
	movq	_ILT_MEMOP_ALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bnx2x_ilt_mem_op_cnic
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	callq	_bnx2x_free_mem_cnic
	leaq	L_.str(%rip), %rdi
	callq	_BNX2X_ERR
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_4:
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SRC_T2_SZ,4,2                  ## @SRC_T2_SZ
	.comm	_ILT_MEMOP_ALLOC,4,2            ## @ILT_MEMOP_ALLOC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't allocate memory\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	_bnx2x_alloc_mem_cnic           ; -- Begin function bnx2x_alloc_mem_cnic
	.p2align	2
_bnx2x_alloc_mem_cnic:                  ; @bnx2x_alloc_mem_cnic
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_CHIP_IS_E1x
	cmp	w0, #0
	mov	w8, #28
	mov	w9, #32
	csel	x8, x9, x8, eq
	ldr	w0, [x19, x8]
	add	x1, x19, #24
	mov	w2, #4
	bl	_BNX2X_PCI_ALLOC
	mov	x0, x19
	bl	_CONFIGURE_NIC_MODE
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x19, #20]
	cbnz	w8, LBB0_3
; %bb.2:
	add	x1, x19, #16
Lloh0:
	adrp	x8, _SRC_T2_SZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SRC_T2_SZ@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w0, #0
	bl	_BNX2X_PCI_ALLOC
LBB0_3:
	ldr	x8, [x19]
	str	x8, [x19, #8]
Lloh3:
	adrp	x8, _ILT_MEMOP_ALLOC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ILT_MEMOP_ALLOC@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bnx2x_ilt_mem_op_cnic
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_bnx2x_free_mem_cnic
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BNX2X_ERR
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SRC_T2_SZ,4,2                  ; @SRC_T2_SZ
	.comm	_ILT_MEMOP_ALLOC,4,2            ; @ILT_MEMOP_ALLOC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't allocate memory\n"

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