	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cqp_sds_wqe_fill
_cqp_sds_wqe_fill:                      ## @cqp_sds_wqe_fill
	.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	$40, %rsp
	.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, %rbx
	leaq	-52(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdx
	callq	_i40iw_sc_cqp_get_next_send_wqe_idx
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_I40IW_CQP_INIT_WQE
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r13d
	cmpl	$3, %r13d
	movl	$3, %eax
	cmovll	%r13d, %eax
	movl	%r13d, %r15d
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	subl	%eax, %r15d
	movq	_I40IW_CQP_OP_UPDATE_PE_SDS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_I40IW_CQPSQ_OPCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	movl	%eax, %r14d
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	movq	_I40IW_CQPSQ_WQEVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	movl	%eax, %ebx
	orl	%r14d, %ebx
	movq	_I40IW_CQPSQ_UPESD_ENTRY_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_LS_64
	movl	%eax, %r14d
	xorl	%r12d, %r12d
	cmpl	$4, %r13d
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jl	LBB0_4
## %bb.3:
	movslq	-52(%rbp), %rax
	movq	_I40IW_UPDATE_SD_BUF_SIZE@GOTPCREL(%rip), %rcx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movslq	(%rcx), %rbx
	imulq	%rax, %rbx
	movq	%rbx, %rdi
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	addq	16(%r12), %rdi
	movq	8(%r13), %rsi
	addq	$24, %rsi
	shll	$4, %r15d
	movl	%r15d, %edx
	callq	_memcpy
	movl	8(%r12), %r12d
	addl	%ebx, %r12d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_4:
	orl	%r14d, %ebx
	movl	4(%r13), %edi
	movq	_I40IW_CQPSQ_UPESD_HMCFNID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	orl	%eax, %r12d
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	$16, %esi
	movl	%r12d, %edx
	callq	_set_64bit_val
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cmpl	$1, %eax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_9
## %bb.5:
	cmpl	$2, %eax
	je	LBB0_8
## %bb.6:
	cmpl	$3, %eax
	jne	LBB0_10
## %bb.7:
	movq	8(%r13), %rax
	movl	16(%rax), %edi
	movq	_I40IW_CQPSQ_UPESD_SDCMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	movl	%ebx, %r12d
	movl	%eax, %ebx
	movq	_I40IW_CQPSQ_UPESD_ENTRY_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edi
	callq	_LS_64
	orl	%eax, %ebx
	movq	%r14, %rdi
	movl	$48, %esi
	movl	%ebx, %edx
	movl	%r12d, %ebx
	callq	_set_64bit_val
	movq	8(%r13), %rax
	movl	20(%rax), %edx
	movq	%r14, %rdi
	movl	$56, %esi
	callq	_set_64bit_val
LBB0_8:
	movq	8(%r13), %rax
	movl	8(%rax), %edi
	movq	_I40IW_CQPSQ_UPESD_SDCMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	movl	%ebx, %r12d
	movl	%eax, %ebx
	movq	_I40IW_CQPSQ_UPESD_ENTRY_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edi
	callq	_LS_64
	orl	%eax, %ebx
	movq	%r14, %rdi
	movl	$32, %esi
	movl	%ebx, %edx
	movl	%r12d, %ebx
	callq	_set_64bit_val
	movq	8(%r13), %rax
	movl	12(%rax), %edx
	movq	%r14, %rdi
	movl	$40, %esi
	callq	_set_64bit_val
LBB0_9:
	movq	8(%r13), %rax
	movl	(%rax), %edi
	movq	_I40IW_CQPSQ_UPESD_SDCMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_set_64bit_val
	movq	8(%r13), %rax
	movl	4(%rax), %edx
	movq	%r14, %rdi
	movl	$8, %esi
	callq	_set_64bit_val
LBB0_10:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_i40iw_insert_wqe_hdr
	movl	4(%r15), %edi
	movq	_I40IW_DEBUG_WQE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_I40IW_CQP_WQE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	shll	$3, %r8d
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rcx
	callq	_i40iw_debug_buf
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_1:
	movq	_I40IW_ERR_RING_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I40IW_ERR_RING_FULL,4,2        ## @I40IW_ERR_RING_FULL
	.comm	_I40IW_CQP_OP_UPDATE_PE_SDS,4,2 ## @I40IW_CQP_OP_UPDATE_PE_SDS
	.comm	_I40IW_CQPSQ_OPCODE,4,2         ## @I40IW_CQPSQ_OPCODE
	.comm	_I40IW_CQPSQ_WQEVALID,4,2       ## @I40IW_CQPSQ_WQEVALID
	.comm	_I40IW_CQPSQ_UPESD_ENTRY_COUNT,4,2 ## @I40IW_CQPSQ_UPESD_ENTRY_COUNT
	.comm	_I40IW_UPDATE_SD_BUF_SIZE,4,2   ## @I40IW_UPDATE_SD_BUF_SIZE
	.comm	_I40IW_CQPSQ_UPESD_HMCFNID,4,2  ## @I40IW_CQPSQ_UPESD_HMCFNID
	.comm	_I40IW_CQPSQ_UPESD_SDCMD,4,2    ## @I40IW_CQPSQ_UPESD_SDCMD
	.comm	_I40IW_CQPSQ_UPESD_ENTRY_VALID,4,2 ## @I40IW_CQPSQ_UPESD_ENTRY_VALID
	.comm	_I40IW_DEBUG_WQE,4,2            ## @I40IW_DEBUG_WQE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"UPDATE_PE_SDS WQE"

	.comm	_I40IW_CQP_WQE_SIZE,4,2         ## @I40IW_CQP_WQE_SIZE
	.no_dead_strip	_cqp_sds_wqe_fill
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cqp_sds_wqe_fill
_cqp_sds_wqe_fill:                      ; @cqp_sds_wqe_fill
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x8, x2
	mov	x21, x1
	mov	x20, x0
	add	x2, sp, #12
	mov	x1, x8
	bl	_i40iw_sc_cqp_get_next_send_wqe_idx
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	bl	_I40IW_CQP_INIT_WQE
	ldr	w25, [x21]
	mov	w8, #3
	cmp	w25, #3
	csel	w24, w25, w8, lt
	sub	w23, w25, w24
Lloh0:
	adrp	x8, _I40IW_CQP_OP_UPDATE_PE_SDS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I40IW_CQP_OP_UPDATE_PE_SDS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _I40IW_CQPSQ_OPCODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I40IW_CQPSQ_OPCODE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_LS_64
	mov	x22, x0
	ldr	w0, [x20]
Lloh6:
	adrp	x8, _I40IW_CQPSQ_WQEVALID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I40IW_CQPSQ_WQEVALID@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_LS_64
	orr	w22, w0, w22
Lloh9:
	adrp	x8, _I40IW_CQPSQ_UPESD_ENTRY_COUNT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _I40IW_CQPSQ_UPESD_ENTRY_COUNT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_LS_64
	orr	w22, w22, w0
	cmp	w25, #4
	b.ge	LBB0_4
; %bb.2:
	mov	w23, #0
	b	LBB0_5
LBB0_3:
Lloh12:
	adrp	x8, _I40IW_ERR_RING_FULL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _I40IW_ERR_RING_FULL@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	b	LBB0_12
LBB0_4:
	ldrsw	x8, [sp, #12]
Lloh15:
	adrp	x9, _I40IW_UPDATE_SD_BUF_SIZE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _I40IW_UPDATE_SD_BUF_SIZE@GOTPAGEOFF]
Lloh17:
	ldrsw	x9, [x9]
	mul	x25, x9, x8
	ldr	x8, [x20, #16]
	add	x0, x8, x25
	ldr	x8, [x21, #8]
	add	x1, x8, #24
	lsl	w2, w23, #4
	bl	_memcpy
	ldr	w8, [x20, #8]
	add	w23, w25, w8
LBB0_5:
	ldr	w0, [x21, #4]
Lloh18:
	adrp	x8, _I40IW_CQPSQ_UPESD_HMCFNID@GOTPAGE
Lloh19:
	ldr	x8, [x8, _I40IW_CQPSQ_UPESD_HMCFNID@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_LS_64
	orr	w2, w0, w23
	mov	x0, x19
	mov	w1, #16
	bl	_set_64bit_val
	cmp	w24, #1
	b.eq	LBB0_10
; %bb.6:
	cmp	w24, #2
	b.eq	LBB0_9
; %bb.7:
	cmp	w24, #3
	b.ne	LBB0_11
; %bb.8:
	ldr	x8, [x21, #8]
	ldr	w0, [x8, #16]
Lloh21:
	adrp	x8, _I40IW_CQPSQ_UPESD_SDCMD@GOTPAGE
Lloh22:
	ldr	x8, [x8, _I40IW_CQPSQ_UPESD_SDCMD@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_LS_64
	mov	x23, x0
Lloh24:
	adrp	x8, _I40IW_CQPSQ_UPESD_ENTRY_VALID@GOTPAGE
Lloh25:
	ldr	x8, [x8, _I40IW_CQPSQ_UPESD_ENTRY_VALID@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	w0, #1
	bl	_LS_64
	orr	w2, w0, w23
	mov	x0, x19
	mov	w1, #48
	bl	_set_64bit_val
	ldr	x8, [x21, #8]
	ldr	w2, [x8, #20]
	mov	x0, x19
	mov	w1, #56
	bl	_set_64bit_val
LBB0_9:
	ldr	x8, [x21, #8]
	ldr	w0, [x8, #8]
Lloh27:
	adrp	x8, _I40IW_CQPSQ_UPESD_SDCMD@GOTPAGE
Lloh28:
	ldr	x8, [x8, _I40IW_CQPSQ_UPESD_SDCMD@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	bl	_LS_64
	mov	x23, x0
Lloh30:
	adrp	x8, _I40IW_CQPSQ_UPESD_ENTRY_VALID@GOTPAGE
Lloh31:
	ldr	x8, [x8, _I40IW_CQPSQ_UPESD_ENTRY_VALID@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	w0, #1
	bl	_LS_64
	orr	w2, w0, w23
	mov	x0, x19
	mov	w1, #32
	bl	_set_64bit_val
	ldr	x8, [x21, #8]
	ldr	w2, [x8, #12]
	mov	x0, x19
	mov	w1, #40
	bl	_set_64bit_val
LBB0_10:
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
Lloh33:
	adrp	x8, _I40IW_CQPSQ_UPESD_SDCMD@GOTPAGE
Lloh34:
	ldr	x8, [x8, _I40IW_CQPSQ_UPESD_SDCMD@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	bl	_LS_64
	mov	x2, x0
	mov	x0, x19
	mov	w1, #0
	bl	_set_64bit_val
	ldr	x8, [x21, #8]
	ldr	w2, [x8, #4]
	mov	x0, x19
	mov	w1, #8
	bl	_set_64bit_val
LBB0_11:
	mov	x0, x19
	mov	x1, x22
	bl	_i40iw_insert_wqe_hdr
Lloh36:
	adrp	x8, _I40IW_DEBUG_WQE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _I40IW_DEBUG_WQE@GOTPAGEOFF]
	ldr	w0, [x20, #4]
Lloh38:
	ldr	w1, [x8]
Lloh39:
	adrp	x8, _I40IW_CQP_WQE_SIZE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _I40IW_CQP_WQE_SIZE@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	lsl	w4, w8, #3
Lloh42:
	adrp	x2, l_.str@PAGE
Lloh43:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x19
	bl	_i40iw_debug_buf
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_I40IW_ERR_RING_FULL,4,2        ; @I40IW_ERR_RING_FULL
	.comm	_I40IW_CQP_OP_UPDATE_PE_SDS,4,2 ; @I40IW_CQP_OP_UPDATE_PE_SDS
	.comm	_I40IW_CQPSQ_OPCODE,4,2         ; @I40IW_CQPSQ_OPCODE
	.comm	_I40IW_CQPSQ_WQEVALID,4,2       ; @I40IW_CQPSQ_WQEVALID
	.comm	_I40IW_CQPSQ_UPESD_ENTRY_COUNT,4,2 ; @I40IW_CQPSQ_UPESD_ENTRY_COUNT
	.comm	_I40IW_UPDATE_SD_BUF_SIZE,4,2   ; @I40IW_UPDATE_SD_BUF_SIZE
	.comm	_I40IW_CQPSQ_UPESD_HMCFNID,4,2  ; @I40IW_CQPSQ_UPESD_HMCFNID
	.comm	_I40IW_CQPSQ_UPESD_SDCMD,4,2    ; @I40IW_CQPSQ_UPESD_SDCMD
	.comm	_I40IW_CQPSQ_UPESD_ENTRY_VALID,4,2 ; @I40IW_CQPSQ_UPESD_ENTRY_VALID
	.comm	_I40IW_DEBUG_WQE,4,2            ; @I40IW_DEBUG_WQE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"UPDATE_PE_SDS WQE"

	.comm	_I40IW_CQP_WQE_SIZE,4,2         ; @I40IW_CQP_WQE_SIZE
	.no_dead_strip	_cqp_sds_wqe_fill
.subsections_via_symbols
