	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_copy_to_send_wqe          ## -- Begin function mlx5_copy_to_send_wqe
	.p2align	4, 0x90
_mlx5_copy_to_send_wqe:                 ## @mlx5_copy_to_send_wqe
	.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
	movl	%ecx, %r12d
	movq	%rdx, %r15
	movq	%rdi, %r14
	movl	%ecx, -44(%rbp)
	movl	(%rdi), %eax
	decl	%eax
	andl	%eax, %esi
	callq	_mlx5_get_send_wqe
	movq	%rax, %rbx
	movq	16(%r14), %rax
	movq	(%rax), %rax
	movq	_IBV_QPT_RC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movl	4(%rbx), %edi
	callq	_be32toh
	addb	$-128, %al
	cmpb	$3, %al
	jae	LBB0_3
## %bb.4:
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movsbq	%al, %rax
	leaq	l_switch.table.mlx5_copy_to_send_wqe(%rip), %rcx
	movq	(%rcx,%rax,8), %r15
	movq	%rbx, %r13
	addq	%r15, %r13
	movl	(%rbx), %edi
	callq	_be32toh
	movl	%eax, %r12d
	andl	$63, %r12d
	shrq	$4, %r15
	subl	%r15d, %r12d
	movslq	%r12d, %rax
	leaq	(,%rax,4), %rax
	addq	%r13, %rax
	xorl	%edi, %edi
	cmpq	%rax, 8(%r14)
	setb	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	8(%r14), %rbx
	subq	%r13, %rbx
	shrq	$4, %rbx
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	%ebx, %ecx
	callq	_copy_to_scat
	movslq	%eax, %rcx
	movq	_IBV_WC_SUCCESS@GOTPCREL(%rip), %rdx
	cmpq	%rcx, (%rdx)
	je	LBB0_9
## %bb.7:
	subl	%ebx, %r12d
	movslq	-44(%rbp), %rax
	movslq	-48(%rbp), %rcx                 ## 4-byte Folded Reload
	subq	%rax, %rcx
	addq	%rcx, %r15
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_mlx5_get_send_wqe
	movq	%rax, %r13
	jmp	LBB0_8
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	_IBV_WC_GENERAL_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	4(%rbx), %edi
	callq	_be32toh
	movzbl	%al, %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_fprintf
	movq	_IBV_WC_REM_INV_REQ_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_5:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_8:
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%r12d, %ecx
	callq	_copy_to_scat
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IBV_QPT_RC,8,3                 ## @IBV_QPT_RC
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"scatter to CQE is supported only for RC QPs\n"

	.comm	_IBV_WC_GENERAL_ERR,4,2         ## @IBV_WC_GENERAL_ERR
L_.str.1:                               ## @.str.1
	.asciz	"scatter to CQE for opcode %d\n"

	.comm	_IBV_WC_REM_INV_REQ_ERR,4,2     ## @IBV_WC_REM_INV_REQ_ERR
	.comm	_IBV_WC_SUCCESS,8,3             ## @IBV_WC_SUCCESS
	.section	__TEXT,__const
	.p2align	3                               ## @switch.table.mlx5_copy_to_send_wqe
l_switch.table.mlx5_copy_to_send_wqe:
	.quad	12                              ## 0xc
	.quad	16                              ## 0x10
	.quad	16                              ## 0x10

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_copy_to_send_wqe          ; -- Begin function mlx5_copy_to_send_wqe
	.p2align	2
_mlx5_copy_to_send_wqe:                 ; @mlx5_copy_to_send_wqe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x3
	mov	x19, x2
	mov	x20, x0
	str	w3, [sp, #12]
	ldr	w8, [x0]
	sub	w8, w8, #1
	and	w1, w8, w1
	bl	_mlx5_get_send_wqe
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _IBV_QPT_RC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IBV_QPT_RC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.1:
	mov	x22, x0
	ldr	w0, [x0, #4]
	bl	_be32toh
                                        ; kill: def $w0 killed $w0 def $x0
	sxtb	x8, w0
	eor	x8, x8, #0xffffffffffffff80
	cmp	w8, #3
	b.hs	LBB0_7
; %bb.2:
Lloh3:
	adrp	x9, l_switch.table.mlx5_copy_to_send_wqe@PAGE
Lloh4:
	add	x9, x9, l_switch.table.mlx5_copy_to_send_wqe@PAGEOFF
	ldr	x24, [x9, x8, lsl #3]
	add	x23, x22, x24
	ldr	w0, [x22]
	bl	_be32toh
	and	w8, w0, #0x3f
	lsr	x9, x24, #4
	sub	w22, w8, w9
	add	x8, x23, w22, sxtw #2
	ldr	x9, [x20, #8]
	cmp	x9, x8
	cset	w0, lo
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x8, [x20, #8]
	sub	x8, x8, x23
	lsr	x24, x8, #4
	add	x2, sp, #12
	mov	x0, x23
	mov	x1, x19
	mov	x3, x24
	bl	_copy_to_scat
Lloh5:
	adrp	x8, _IBV_WC_SUCCESS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IBV_WC_SUCCESS@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x8, w0, sxtw
	b.eq	LBB0_9
; %bb.4:
	sub	w22, w22, w24
	ldrsw	x8, [sp, #12]
	sxtw	x9, w21
	sub	x8, x9, x8
	add	x19, x19, x8
	mov	x0, x20
	mov	w1, #0
	bl	_mlx5_get_send_wqe
	mov	x23, x0
LBB0_5:
	add	x2, sp, #12
	mov	x0, x23
	mov	x1, x19
	mov	x3, x22
	bl	_copy_to_scat
	b	LBB0_9
LBB0_6:
Lloh8:
	adrp	x8, _stderr@GOTPAGE
Lloh9:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
Lloh13:
	adrp	x8, _IBV_WC_GENERAL_ERR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IBV_WC_GENERAL_ERR@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh15:
	adrp	x8, _stderr@GOTPAGE
Lloh16:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh17:
	ldr	w19, [x8]
	ldr	w0, [x22, #4]
	bl	_be32toh
	and	w8, w0, #0xff
	str	x8, [sp]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_fprintf
Lloh20:
	adrp	x8, _IBV_WC_REM_INV_REQ_ERR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IBV_WC_REM_INV_REQ_ERR@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
LBB0_9:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_IBV_QPT_RC,8,3                 ; @IBV_QPT_RC
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"scatter to CQE is supported only for RC QPs\n"

	.comm	_IBV_WC_GENERAL_ERR,4,2         ; @IBV_WC_GENERAL_ERR
l_.str.1:                               ; @.str.1
	.asciz	"scatter to CQE for opcode %d\n"

	.comm	_IBV_WC_REM_INV_REQ_ERR,4,2     ; @IBV_WC_REM_INV_REQ_ERR
	.comm	_IBV_WC_SUCCESS,8,3             ; @IBV_WC_SUCCESS
	.section	__TEXT,__const
	.p2align	3                               ; @switch.table.mlx5_copy_to_send_wqe
l_switch.table.mlx5_copy_to_send_wqe:
	.quad	12                              ; 0xc
	.quad	16                              ; 0x10
	.quad	16                              ; 0x10

.subsections_via_symbols
