	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function copy_resize_cqes
_copy_resize_cqes:                      ## @copy_resize_cqes
	.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	%rdi, %r12
	movl	20(%rdi), %edi
	callq	_to_mdev
	movq	%rax, %r14
	movl	16(%r12), %r15d
	movq	8(%r12), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_1
## %bb.5:
	movl	(%r12), %ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_get_sw_cqe
	xorl	%edx, %edx
	cmpl	$64, %r15d
	setne	%cl
	testq	%rax, %rax
	je	LBB0_14
## %bb.6:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movb	%cl, %dl
	shlq	$6, %rdx
	incl	%ebx
	movq	%rax, %r13
	movq	%rdx, %r15
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%r15,%r13), %rdi
	callq	_get_cqe_opcode
	movq	_MLX5_CQE_RESIZE_CQ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r12), %rdi
	movl	4(%rdi), %esi
	andl	%ebx, %esi
	addq	$8, %rdi
	callq	_mlx5_frag_buf_get_wqe
	movq	%rax, %r14
	movq	8(%r12), %rax
	movl	4(%rax), %esi
	movl	%ebx, %edi
	callq	_sw_ownership_bit
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_memcpy
	movq	_MLX5_CQE_OWNER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	(%r14,%r15), %eax
	orl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	movl	%eax, (%r14,%r15)
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_get_sw_cqe
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %r13
	incl	%ebx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, %r13
	jne	LBB0_7
## %bb.11:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_warn
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_14:
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	%r14, %rdi
LBB0_3:
	callq	_mlx5_ib_warn
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incl	(%rax)
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"resize from different cqe size is not supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"expected cqe in sw ownership\n"

	.comm	_MLX5_CQE_RESIZE_CQ,8,3         ## @MLX5_CQE_RESIZE_CQ
	.comm	_MLX5_CQE_OWNER_MASK,4,2        ## @MLX5_CQE_OWNER_MASK
L_.str.2:                               ## @.str.2
	.asciz	"resize CQ failed to get resize CQE, CQN 0x%x\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_copy_resize_cqes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function copy_resize_cqes
_copy_resize_cqes:                      ; @copy_resize_cqes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	w0, [x0, #20]
	bl	_to_mdev
	mov	x20, x0
	ldr	w21, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_7
; %bb.1:
	ldr	w23, [x19]
	mov	x0, x19
	mov	x1, x23
	bl	_get_sw_cqe
	cmp	w21, #64
	cset	w8, ne
	cbz	x0, LBB0_8
; %bb.2:
	mov	x22, x0
	str	x20, [sp, #8]                   ; 8-byte Folded Spill
	lsl	x27, x8, #6
	add	w23, w23, #1
Lloh0:
	adrp	x28, _MLX5_CQE_RESIZE_CQ@GOTPAGE
Lloh1:
	ldr	x28, [x28, _MLX5_CQE_RESIZE_CQ@GOTPAGEOFF]
Lloh2:
	adrp	x20, _MLX5_CQE_OWNER_MASK@GOTPAGE
Lloh3:
	ldr	x20, [x20, _MLX5_CQE_OWNER_MASK@GOTPAGEOFF]
	mov	x24, x0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x24, x27
	bl	_get_cqe_opcode
	ldr	x8, [x28]
	cmp	x0, x8
	b.eq	LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, #8
	ldr	w8, [x8, #4]
	and	w1, w8, w23
	bl	_mlx5_frag_buf_get_wqe
	mov	x25, x0
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #4]
	mov	x0, x23
	bl	_sw_ownership_bit
	mov	x26, x0
	mov	x0, x25
	mov	x1, x24
	mov	x2, x21
	bl	_memcpy
	ldr	w8, [x25, x27]
	ldr	w9, [x20]
	bic	w8, w8, w9
	orr	w8, w8, w26
	str	w8, [x25, x27]
	mov	x0, x19
	mov	x1, x23
	bl	_get_sw_cqe
	cbz	x0, LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x24, x0
	add	w23, w23, #1
	cmp	x0, x22
	b.ne	LBB0_3
; %bb.6:
	ldr	w1, [x19, #4]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_warn
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_11
LBB0_7:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	mov	x0, x20
LBB0_10:
	bl	_mlx5_ib_warn
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
	mov	w0, #0
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_12
LBB0_14:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	b	LBB0_10
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"resize from different cqe size is not supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"expected cqe in sw ownership\n"

	.comm	_MLX5_CQE_RESIZE_CQ,8,3         ; @MLX5_CQE_RESIZE_CQ
	.comm	_MLX5_CQE_OWNER_MASK,4,2        ; @MLX5_CQE_OWNER_MASK
l_.str.2:                               ; @.str.2
	.asciz	"resize CQ failed to get resize CQE, CQN 0x%x\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_copy_resize_cqes
.subsections_via_symbols
