	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cnic_bnx2x_iscsi_ofld1
_cnic_bnx2x_iscsi_ofld1:                ## @cnic_bnx2x_iscsi_ofld1
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpl	$1, %edx
	jle	LBB0_1
## %bb.2:
	movq	%rsi, %r12
	movq	8(%rsi), %rax
	leal	-2(%rbx), %edx
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	LBB0_3
LBB0_1:
	movl	%ebx, (%rcx)
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_17
## %bb.16:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rdi, %r15
	movq	8(%rdi), %r13
	movq	(%r12), %rdx
	addl	$2, %eax
	movl	%eax, (%rcx)
	movl	(%rdx), %r14d
	movq	_MAX_ISCSI_TBL_SZ@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jge	LBB0_4
## %bb.5:
	movslq	%r14d, %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	-72(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_ISCSI_KCQE_OPCODE_OFFLOAD_CONN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movl	%r14d, -76(%rbp)                ## 4-byte Spill
	movl	%r14d, -72(%rbp)
	movq	_ISCSI_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	%r13, -104(%rbp)                ## 8-byte Spill
	movq	(%r13), %rax
	movq	_CTX_FL_OFFLD_START@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx,8), %rsi
	addq	$4, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_ISCSI_KCQE_COMPLETION_STATUS_CID_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	jmp	LBB0_14
LBB0_7:
	movq	-104(%rbp), %r13                ## 8-byte Reload
	leaq	8(%r13), %rdi
	movq	%rdi, %r14
	callq	_atomic_inc_return
	cmpq	(%r15), %rax
	jle	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_atomic_dec
	jmp	LBB0_14
LBB0_9:
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	-76(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	callq	_cnic_alloc_bnx2x_conn_resc
	testl	%eax, %eax
	je	LBB0_11
LBB0_10:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_atomic_dec
	jmp	LBB0_14
LBB0_11:
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_cnic_setup_bnx2x_ctx
	testl	%eax, %eax
	js	LBB0_12
## %bb.13:
	movq	_ISCSI_KCQE_COMPLETION_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	(%r13), %rax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rax,%rcx,8), %esi
	movq	%r13, %rdi
	callq	_BNX2X_HW_CID
	movl	%eax, -68(%rbp)
LBB0_14:
	leaq	-72(%rbp), %rax
	movq	%rax, -56(%rbp)
	movq	_CNIC_ULP_ISCSI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	movq	%r15, %rdi
	movl	$1, %ecx
	callq	_cnic_reply_bnx2x_kcqes
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_12:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_cnic_free_bnx2x_conn_resc
	jmp	LBB0_10
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MAX_ISCSI_TBL_SZ,4,2           ## @MAX_ISCSI_TBL_SZ
	.comm	_ISCSI_KCQE_OPCODE_OFFLOAD_CONN,4,2 ## @ISCSI_KCQE_OPCODE_OFFLOAD_CONN
	.comm	_ISCSI_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAILURE,4,2 ## @ISCSI_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAILURE
	.comm	_CTX_FL_OFFLD_START,4,2         ## @CTX_FL_OFFLD_START
	.comm	_ISCSI_KCQE_COMPLETION_STATUS_CID_BUSY,4,2 ## @ISCSI_KCQE_COMPLETION_STATUS_CID_BUSY
	.comm	_ISCSI_KCQE_COMPLETION_STATUS_SUCCESS,4,2 ## @ISCSI_KCQE_COMPLETION_STATUS_SUCCESS
	.comm	_CNIC_ULP_ISCSI,4,2             ## @CNIC_ULP_ISCSI
	.no_dead_strip	_cnic_bnx2x_iscsi_ofld1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cnic_bnx2x_iscsi_ofld1
_cnic_bnx2x_iscsi_ofld1:                ; @cnic_bnx2x_iscsi_ofld1
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	cmp	w2, #1
	b.le	LBB0_2
; %bb.1:
	mov	x22, x1
	ldr	x8, [x1, #8]
	sub	w9, w20, #2
	ldr	w8, [x8]
	cmp	w9, w8
	b.ge	LBB0_6
LBB0_2:
	str	w20, [x3]
LBB0_3:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldr	x8, [sp, #24]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.5:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	mov	x19, x0
	ldr	x21, [x0, #8]
	ldr	x9, [x22]
	add	w8, w8, #2
	str	w8, [x3]
	ldr	w23, [x9]
Lloh9:
	adrp	x8, _MAX_ISCSI_TBL_SZ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX_ISCSI_TBL_SZ@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w23, w8
	b.ge	LBB0_3
; %bb.7:
	sxtw	x25, w23
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh12:
	adrp	x8, _ISCSI_KCQE_OPCODE_OFFLOAD_CONN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ISCSI_KCQE_OPCODE_OFFLOAD_CONN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [sp, #12]
Lloh15:
	adrp	x8, _ISCSI_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAILURE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ISCSI_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAILURE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w23, [sp]
	str	w8, [sp, #8]
	ldr	x8, [x21]
Lloh18:
	adrp	x9, _CTX_FL_OFFLD_START@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CTX_FL_OFFLD_START@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x9]
	add	x8, x8, x25, lsl #3
	add	x1, x8, #4
	bl	_test_bit
	cbz	x0, LBB0_9
; %bb.8:
Lloh21:
	adrp	x8, _ISCSI_KCQE_COMPLETION_STATUS_CID_BUSY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ISCSI_KCQE_COMPLETION_STATUS_CID_BUSY@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	b	LBB0_12
LBB0_9:
	add	x24, x21, #8
	mov	x0, x24
	bl	_atomic_inc_return
	ldr	x8, [x19]
	cmp	x0, x8
	b.gt	LBB0_11
; %bb.10:
	mov	x0, x19
	mov	x1, x23
	bl	_cnic_alloc_bnx2x_conn_resc
	cbz	w0, LBB0_13
LBB0_11:
	mov	x0, x24
	bl	_atomic_dec
LBB0_12:
	mov	x8, sp
	str	x8, [sp, #16]
Lloh24:
	adrp	x8, _CNIC_ULP_ISCSI@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CNIC_ULP_ISCSI@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x0, x19
	mov	w3, #1
	bl	_cnic_reply_bnx2x_kcqes
	mov	w0, #0
	b	LBB0_4
LBB0_13:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_cnic_setup_bnx2x_ctx
	tbnz	w0, #31, LBB0_15
; %bb.14:
Lloh27:
	adrp	x8, _ISCSI_KCQE_COMPLETION_STATUS_SUCCESS@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ISCSI_KCQE_COMPLETION_STATUS_SUCCESS@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	x8, [x21]
	lsl	x9, x25, #3
	ldr	w1, [x8, x9]
	mov	x0, x21
	bl	_BNX2X_HW_CID
	str	w0, [sp, #4]
	b	LBB0_12
LBB0_15:
	mov	x0, x19
	mov	x1, x23
	bl	_cnic_free_bnx2x_conn_resc
	b	LBB0_11
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MAX_ISCSI_TBL_SZ,4,2           ; @MAX_ISCSI_TBL_SZ
	.comm	_ISCSI_KCQE_OPCODE_OFFLOAD_CONN,4,2 ; @ISCSI_KCQE_OPCODE_OFFLOAD_CONN
	.comm	_ISCSI_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAILURE,4,2 ; @ISCSI_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAILURE
	.comm	_CTX_FL_OFFLD_START,4,2         ; @CTX_FL_OFFLD_START
	.comm	_ISCSI_KCQE_COMPLETION_STATUS_CID_BUSY,4,2 ; @ISCSI_KCQE_COMPLETION_STATUS_CID_BUSY
	.comm	_ISCSI_KCQE_COMPLETION_STATUS_SUCCESS,4,2 ; @ISCSI_KCQE_COMPLETION_STATUS_SUCCESS
	.comm	_CNIC_ULP_ISCSI,4,2             ; @CNIC_ULP_ISCSI
	.no_dead_strip	_cnic_bnx2x_iscsi_ofld1
.subsections_via_symbols
