	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_extend_sge
_set_extend_sge:                        ## @set_extend_sge
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	movq	_IB_QPT_RC@GOTPCREL(%rip), %r8
	movq	_IB_QPT_UC@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	movq	_HNS_ROCE_V2_UC_RC_SGE_NUM_IN_WQE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmovel	%ecx, %ebx
	cmpq	(%r8), %rax
	cmovel	%ecx, %ebx
	movq	%rdx, %r14
	movl	(%rsi), %r15d
	subl	%ebx, %r15d
	movslq	%ebx, %r13
	shlq	$2, %r13
	addq	8(%rsi), %r13
	movb	4(%rdi), %r12b
	movl	(%rdi), %esi
	decl	%esi
	andl	(%rdx), %esi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_get_send_extend_sge
	movq	%rax, %rbx
	movl	$1, %esi
	movl	%r12d, %ecx
	shll	%cl, %esi
	movq	%rax, %rdi
	callq	_round_up
	subq	%rbx, %rax
	shrq	$2, %rax
	movl	%r15d, %ecx
	subl	%eax, %ecx
	jle	LBB0_1
## %bb.4:
	testl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	jle	LBB0_5
## %bb.6:
	movl	%eax, %r15d
	movq	%r13, %r12
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_set_data_seg_v2
	movl	(%r14), %eax
	incl	%eax
	movl	%eax, (%r14)
	addq	$4, %r12
	addl	$4, %ebx
	decq	%r15
	jne	LBB0_7
	jmp	LBB0_8
LBB0_1:
	testl	%r15d, %r15d
	jle	LBB0_11
## %bb.2:
	movl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r13, %rsi
	callq	_set_data_seg_v2
	incl	(%r14)
	addq	$4, %r13
	addl	$4, %ebx
	decq	%r15
	jne	LBB0_3
	jmp	LBB0_11
LBB0_5:
	movl	(%r14), %eax
LBB0_8:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %esi
	decl	%esi
	andl	%eax, %esi
	callq	_get_send_extend_sge
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	jle	LBB0_11
## %bb.9:
	movq	%rax, %r15
	movslq	-56(%rbp), %rax                 ## 4-byte Folded Reload
	leaq	(%r13,%rax,4), %r13
	movl	%ecx, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	movq	%r13, %rsi
	callq	_set_data_seg_v2
	incl	(%r14)
	incq	%rbx
	addq	$4, %r13
	addl	$4, %r15d
	cmpq	%r12, %rbx
	jb	LBB0_10
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_QPT_RC,8,3                  ## @IB_QPT_RC
	.comm	_IB_QPT_UC,8,3                  ## @IB_QPT_UC
	.comm	_HNS_ROCE_V2_UC_RC_SGE_NUM_IN_WQE,4,2 ## @HNS_ROCE_V2_UC_RC_SGE_NUM_IN_WQE
	.no_dead_strip	_set_extend_sge
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_extend_sge
_set_extend_sge:                        ; @set_extend_sge
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x2
	mov	x21, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _IB_QPT_RC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IB_QPT_RC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _IB_QPT_UC@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IB_QPT_UC@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x10
Lloh6:
	adrp	x10, _HNS_ROCE_V2_UC_RC_SGE_NUM_IN_WQE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _HNS_ROCE_V2_UC_RC_SGE_NUM_IN_WQE@GOTPAGEOFF]
	ccmp	x8, x9, #4, ne
Lloh8:
	ldr	w8, [x10]
	csel	w8, w8, wzr, eq
	ldr	w9, [x1]
	sub	w23, w9, w8
	ldr	x9, [x1, #8]
	add	x20, x9, w8, sxtw #2
	ldr	w8, [x2]
	ldp	w9, w24, [x0]
	sub	w9, w9, #1
	and	w1, w9, w8
	bl	_get_send_extend_sge
	mov	x22, x0
	mov	w8, #1
	lsl	w1, w8, w24
	bl	_round_up
	sub	x8, x0, x22
	lsr	x25, x8, #2
	subs	w24, w23, w25
	b.le	LBB0_4
; %bb.1:
	cmp	w25, #0
	b.le	LBB0_6
; %bb.2:
	ubfx	x26, x8, #2, #32
	mov	x23, x20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x23
	bl	_set_data_seg_v2
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	add	x23, x23, #4
	add	w22, w22, #4
	subs	x26, x26, #1
	b.ne	LBB0_3
	b	LBB0_7
LBB0_4:
	cmp	w23, #1
	b.lt	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x20
	bl	_set_data_seg_v2
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	add	x20, x20, #4
	add	w22, w22, #4
	subs	x23, x23, #1
	b.ne	LBB0_5
	b	LBB0_10
LBB0_6:
	ldr	w8, [x19]
LBB0_7:
	ldr	w9, [x21]
	sub	w9, w9, #1
	and	w1, w9, w8
	mov	x0, x21
	bl	_get_send_extend_sge
	cmp	w24, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x21, x0
	mov	x22, #0
	lsl	x8, x25, #32
	add	x20, x20, x8, asr #30
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x20
	bl	_set_data_seg_v2
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	add	x22, x22, #1
	add	x20, x20, #4
	add	w21, w21, #4
	cmp	x22, x24
	b.lo	LBB0_9
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_QPT_RC,8,3                  ; @IB_QPT_RC
	.comm	_IB_QPT_UC,8,3                  ; @IB_QPT_UC
	.comm	_HNS_ROCE_V2_UC_RC_SGE_NUM_IN_WQE,4,2 ; @HNS_ROCE_V2_UC_RC_SGE_NUM_IN_WQE
	.no_dead_strip	_set_extend_sge
.subsections_via_symbols
