	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvt_resize_cq                  ## -- Begin function rvt_resize_cq
	.p2align	4, 0x90
_rvt_resize_cq:                         ## @rvt_resize_cq
	.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
	movq	%rdx, %rbx
	movl	%esi, %r12d
	callq	_ibcq_to_rvtcq
	testl	%r12d, %r12d
	jle	LBB0_2
## %bb.1:
	movq	40(%rax), %r14
	cmpl	%r12d, 12(%r14)
	jge	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_39:
	movl	%r13d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rax, %r15
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.5:
	cmpl	$4, (%rbx)
	jb	LBB0_9
## %bb.6:
	leal	28(,%r12,4), %r13d
	movl	%r13d, %edi
	callq	_vmalloc_user
	xorl	%edx, %edx
	movq	%rax, %rcx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	jmp	LBB0_13
LBB0_9:
	leal	28(,%r12,4), %r13d
	movl	8(%r14), %esi
	movl	%r13d, %edi
	callq	_vzalloc_node
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	testq	%rbx, %rbx
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	je	LBB0_19
## %bb.12:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_13:
	movq	%r15, %rcx
	cmpl	$4, (%rbx)
	jb	LBB0_16
## %bb.14:
	movl	$0, -100(%rbp)
	leaq	-100(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_ib_copy_to_udata
	movq	%r15, %rcx
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %r13d
	jmp	LBB0_38
LBB0_16:
	movq	%rcx, %r13
	movq	%rcx, %rdi
	callq	_spin_lock_irq
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_17
## %bb.18:
	movq	24(%r13), %rbx
	movl	(%rbx), %edi
	callq	_RDMA_READ_UAPI_ATOMIC
	movl	%eax, %r14d
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	4(%rbx), %edi
	callq	_RDMA_READ_UAPI_ATOMIC
	movl	%eax, %r15d
	xorl	%eax, %eax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rbx
	jmp	LBB0_21
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_19:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
	movq	%r15, %rdi
	callq	_spin_lock_irq
	jmp	LBB0_20
LBB0_17:
	movq	%r13, %rbx
LBB0_20:
	movq	16(%rbx), %rcx
	movl	(%rcx), %r14d
	movq	%rcx, %rax
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	4(%rcx), %r15d
	movb	$1, %al
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
LBB0_21:
	movl	32(%rbx), %eax
	cmpl	%eax, %r14d
	cmovgel	%eax, %r14d
	cmpl	%eax, %r15d
	cmovgel	%eax, %r15d
	incl	%eax
	xorl	%r13d, %r13d
	movl	%r14d, %ecx
	subl	%r15d, %ecx
	cmovgel	%r13d, %eax
	addl	%ecx, %eax
	xorl	%edi, %edi
	cmpl	%r12d, %eax
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_22
## %bb.37:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	movq	%rbx, %rdi
	callq	_spin_unlock_irq
LBB0_38:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_vfree
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_vfree
	jmp	LBB0_39
LBB0_22:
	cmpl	%r15d, %r14d
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	-112(%rbp), %r8                 ## 8-byte Reload
	jne	LBB0_23
LBB0_27:
	movl	%r12d, 32(%rbx)
	testb	%r8b, %r8b
	je	LBB0_28
## %bb.29:
	movl	%r13d, (%rdi)
	movl	$0, 4(%rdi)
	movq	%rdi, 16(%rbx)
	movq	%rbx, %r12
	movq	%rbx, %rdi
	callq	_spin_unlock_irq
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_30
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %edx
	movl	%edx, %r13d
	jmp	LBB0_39
LBB0_23:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addq	$16, %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addq	$16, %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	addq	$8, %rdx
	leaq	8(%rdi), %rsi
	testb	%r8b, %r8b
	cmoveq	%rax, %rdx
	cmoveq	%rcx, %rsi
	movq	(%rdx), %rax
	movq	(%rsi), %rcx
	xorl	%r13d, %r13d
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_24 Depth=1
	incq	%r13
	movl	%edx, %r15d
	cmpl	%r14d, %edx
	je	LBB0_27
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movslq	%r15d, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	%edx, (%rcx,%r13,4)
	movl	$0, %edx
	cmpl	32(%rbx), %r15d
	je	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	incl	%r15d
	movl	%r15d, %edx
	jmp	LBB0_26
LBB0_28:
	movq	%rbx, %r12
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	movl	%r13d, %esi
	callq	_RDMA_WRITE_UAPI_ATOMIC
	movl	4(%rbx), %edi
	xorl	%esi, %esi
	callq	_RDMA_WRITE_UAPI_ATOMIC
	movq	%rbx, 24(%r12)
	movq	%r12, %rdi
	callq	_spin_unlock_irq
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	-80(%rbp), %r15                 ## 8-byte Reload
LBB0_30:
	callq	_vfree
	movq	8(%r12), %rbx
	xorl	%r13d, %r13d
	testq	%rbx, %rbx
	je	LBB0_39
## %bb.31:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	callq	_rvt_update_mmap_info
	testq	%r15, %r15
	je	LBB0_34
## %bb.32:
	cmpl	$4, (%r15)
	jb	LBB0_34
## %bb.33:
	leaq	4(%rbx), %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_ib_copy_to_udata
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_39
LBB0_34:
	movq	%r14, %rdi
	callq	_spin_lock_irq
	movq	%rbx, %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_36
## %bb.35:
	leaq	4(%r14), %rsi
	movq	%rbx, %rdi
	callq	_list_add
LBB0_36:
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	xorl	%r13d, %r13d
	jmp	LBB0_39
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvt_resize_cq                  ; -- Begin function rvt_resize_cq
	.p2align	2
_rvt_resize_cq:                         ; @rvt_resize_cq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x2
	mov	x24, x1
	bl	_ibcq_to_rvtcq
	cmp	w24, #1
	b.lt	LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	x19, [x0, #40]
	ldr	w8, [x19, #12]
	cmp	w8, w24
	b.ge	LBB0_5
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w26, w8
LBB0_4:
	mov	x0, x26
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_5:
	cbz	x20, LBB0_9
; %bb.6:
	ldr	w8, [x20]
	cmp	w8, #4
	b.lo	LBB0_9
; %bb.7:
	lsl	w8, w24, #2
	add	w22, w8, #28
	mov	x0, x22
	bl	_vmalloc_user
	cbz	x0, LBB0_15
; %bb.8:
	mov	x23, x0
	mov	x25, #0
	b	LBB0_12
LBB0_9:
	lsl	w8, w24, #2
	add	w22, w8, #28
	ldr	w1, [x19, #8]
	mov	x0, x22
	bl	_vzalloc_node
	cbz	x0, LBB0_15
; %bb.10:
	mov	x25, x0
	cbz	x20, LBB0_18
; %bb.11:
	mov	x23, #0
LBB0_12:
	ldr	w8, [x20]
	cmp	w8, #4
	b.lo	LBB0_16
; %bb.13:
	str	wzr, [sp, #28]
	add	x1, sp, #28
	mov	x0, x20
	mov	w2, #4
	bl	_ib_copy_to_udata
	cbz	w0, LBB0_16
; %bb.14:
	mov	x26, x0
	b	LBB0_22
LBB0_15:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_3
LBB0_16:
	mov	x0, x21
	bl	_spin_lock_irq
	str	w22, [sp, #12]                  ; 4-byte Folded Spill
	cbz	x23, LBB0_19
; %bb.17:
	ldr	x26, [x21, #24]
	ldr	w0, [x26]
	bl	_RDMA_READ_UAPI_ATOMIC
	mov	x27, x0
	str	x26, [sp, #16]                  ; 8-byte Folded Spill
	ldr	w0, [x26, #4]
	bl	_RDMA_READ_UAPI_ATOMIC
	mov	w22, #0
	mov	x26, #0
	b	LBB0_20
LBB0_18:
	str	w22, [sp, #12]                  ; 4-byte Folded Spill
	mov	x0, x21
	bl	_spin_lock_irq
LBB0_19:
	mov	x23, #0
	str	xzr, [sp, #16]                  ; 8-byte Folded Spill
	ldr	x26, [x21, #16]
	ldp	w27, w0, [x26]
	mov	w22, #1
LBB0_20:
	ldr	w8, [x21, #32]
	cmp	w27, w8
	csel	w27, w27, w8, lt
	cmp	w0, w8
	csel	w28, w0, w8, lt
	subs	w9, w27, w28
	csinc	w8, wzr, w8, ge
	add	w8, w9, w8
	cmp	w8, w24
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_23
; %bb.21:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w26, w8
	mov	x0, x21
	bl	_spin_unlock_irq
LBB0_22:
	mov	x0, x23
	bl	_vfree
	mov	x0, x25
	bl	_vfree
	b	LBB0_4
LBB0_23:
	cmp	w27, w28
	b.ne	LBB0_25
; %bb.24:
	mov	w1, #0
	b	LBB0_27
LBB0_25:
	mov	x1, #0
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	add	x8, x8, #16
	add	x9, x23, #16
	add	x10, x26, #8
	add	x11, x25, #8
	cmp	w22, #0
	csel	x8, x10, x8, ne
	csel	x9, x11, x9, ne
	ldr	x8, [x8]
	ldr	x9, [x9]
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x8, w28, sxtw #2]
	str	w10, [x9, x1, lsl #2]
	ldr	w10, [x21, #32]
	cmp	w28, w10
	csinc	w28, wzr, w28, eq
	add	x1, x1, #1
	cmp	w28, w27
	b.ne	LBB0_26
LBB0_27:
	str	w24, [x21, #32]
	tbz	w22, #0, LBB0_29
; %bb.28:
	stp	w1, wzr, [x25]
	str	x25, [x21, #16]
	mov	x0, x21
	bl	_spin_unlock_irq
	b	LBB0_30
LBB0_29:
	ldr	w0, [x23]
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_RDMA_WRITE_UAPI_ATOMIC
	ldr	w0, [x23, #4]
	mov	w1, #0
	bl	_RDMA_WRITE_UAPI_ATOMIC
	str	x23, [x21, #24]
	mov	x0, x21
	bl	_spin_unlock_irq
	ldr	x26, [sp, #16]                  ; 8-byte Folded Reload
LBB0_30:
	mov	x0, x26
	bl	_vfree
	ldr	x21, [x21, #8]
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
	cbz	x21, LBB0_37
; %bb.31:
	mov	x0, x19
	mov	x1, x21
	mov	x3, x23
	bl	_rvt_update_mmap_info
	cbz	x20, LBB0_34
; %bb.32:
	ldr	w8, [x20]
	cmp	w8, #4
	b.lo	LBB0_34
; %bb.33:
	add	x1, x21, #4
	mov	x0, x20
	mov	w2, #4
	bl	_ib_copy_to_udata
	mov	x26, x0
	cbnz	w0, LBB0_4
LBB0_34:
	mov	x0, x19
	bl	_spin_lock_irq
	mov	x0, x21
	bl	_list_empty
	cbz	x0, LBB0_36
; %bb.35:
	add	x1, x19, #4
	mov	x0, x21
	bl	_list_add
LBB0_36:
	mov	x0, x19
	bl	_spin_unlock_irq
LBB0_37:
	mov	w26, #0
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
