	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cnic_alloc_bnx2x_conn_resc
_cnic_alloc_bnx2x_conn_resc:            ## @cnic_alloc_bnx2x_conn_resc
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rdi), %r13
	movq	24(%r13), %rbx
	leaq	(%rsi,%rsi,2), %r12
	movq	(%rbx,%r12,8), %rax
	movq	_CNIC_ULP_FCOE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.1:
	addq	$16, %r13
	movq	%r13, %rdi
	callq	_cnic_alloc_new_id
	cmpq	$-1, %rax
	je	LBB0_2
## %bb.4:
	movq	%rax, 8(%rbx,%r12,8)
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_5:
	movq	16(%rbx,%r12,8), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	12(%r13), %rdi
	callq	_cnic_alloc_new_id
	cmpq	$-1, %rax
	je	LBB0_2
## %bb.6:
	movq	%rax, 8(%rbx,%r12,8)
	movl	8(%r13), %edi
	callq	_PAGE_ALIGN
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	leaq	8(%r12), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	movl	$1, %ecx
	callq	_cnic_alloc_dma
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.7:
	movl	4(%r13), %edi
	callq	_PAGE_ALIGN
	cltd
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	leaq	4(%r12), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	movl	$1, %ecx
	callq	_cnic_alloc_dma
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.8:
	movl	(%r13), %edi
	callq	_PAGE_ALIGN
	cltd
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	movl	$1, %ecx
	callq	_cnic_alloc_dma
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
	jmp	LBB0_9
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_cnic_free_bnx2x_conn_resc
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CNIC_ULP_FCOE,8,3              ## @CNIC_ULP_FCOE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.no_dead_strip	_cnic_alloc_bnx2x_conn_resc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cnic_alloc_bnx2x_conn_resc
_cnic_alloc_bnx2x_conn_resc:            ; @cnic_alloc_bnx2x_conn_resc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	ldr	x23, [x0]
	ldr	x24, [x23, #24]
	mov	w8, #24
	madd	x8, x1, x8, x24
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _CNIC_ULP_FCOE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _CNIC_ULP_FCOE@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.1:
	add	x0, x23, #16
	bl	_cnic_alloc_new_id
	cmn	x0, #1
	b.eq	LBB0_7
; %bb.2:
	mov	w22, #0
	mov	w8, #24
	madd	x8, x19, x8, x24
	str	x0, [x8, #8]
	b	LBB0_9
LBB0_3:
	ldr	x21, [x8, #16]
	add	x0, x23, #12
	bl	_cnic_alloc_new_id
	cmn	x0, #1
	b.eq	LBB0_7
; %bb.4:
	mov	w8, #24
	madd	x8, x19, x8, x24
	str	x0, [x8, #8]
	ldr	w0, [x23, #8]
	bl	_PAGE_ALIGN
Lloh3:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x24]
	sdiv	w2, w0, w8
	add	x1, x21, #8
	mov	x0, x20
	mov	w3, #1
	bl	_cnic_alloc_dma
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.5:
	ldr	w0, [x23, #4]
	bl	_PAGE_ALIGN
	ldr	w8, [x24]
	add	x1, x21, #4
	sdiv	w2, w0, w8
	mov	x0, x20
	mov	w3, #1
	bl	_cnic_alloc_dma
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.6:
	ldr	w0, [x23]
	bl	_PAGE_ALIGN
	ldr	w8, [x24]
	sdiv	w2, w0, w8
	mov	x0, x20
	mov	x1, x21
	mov	w3, #1
	bl	_cnic_alloc_dma
	mov	x22, x0
	cbnz	w0, LBB0_8
	b	LBB0_9
LBB0_7:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	bl	_cnic_free_bnx2x_conn_resc
LBB0_9:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CNIC_ULP_FCOE,8,3              ; @CNIC_ULP_FCOE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.no_dead_strip	_cnic_alloc_bnx2x_conn_resc
.subsections_via_symbols
