	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_modify_wq                 ## -- Begin function mlx5_modify_wq
	.p2align	4, 0x90
_mlx5_modify_wq:                        ## @mlx5_modify_wq
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	$0, -32(%rbp)
	callq	_to_mrwq
	movq	%rax, %r15
	movl	(%rbx), %eax
	movq	_IBV_WQ_ATTR_STATE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.1:
	movq	8(%rbx), %rcx
	movq	_IBV_WQS_RDY@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_6
## %bb.2:
	movq	_IBV_WQ_ATTR_CURR_STATE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.7:
	movq	16(%rbx), %rax
	cmpq	(%r14), %rax
	je	LBB0_4
## %bb.8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_3:
	movq	(%r14), %rax
LBB0_4:
	movq	_IBV_WQS_RESET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movl	8(%r14), %edi
	callq	_to_mcq
	movq	%rax, %rdi
	callq	_mlx5_spin_lock
	movl	8(%r14), %edi
	callq	_to_mcq
	movl	8(%r15), %esi
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	___mlx5_cq_clean
	movl	8(%r14), %edi
	callq	_to_mcq
	movq	%rax, %rdi
	callq	_mlx5_spin_unlock
	movq	%r15, %rdi
	callq	_mlx5_init_rwq_indices
	movq	(%r15), %rax
	movq	_MLX5_RCV_DBR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	_MLX5_SND_DBR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	$0, (%rax,%rcx,8)
LBB0_6:
	leaq	-32(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$4, %ecx
	movl	$4, %r8d
	callq	_ibv_cmd_modify_wq
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IBV_WQ_ATTR_STATE,4,2          ## @IBV_WQ_ATTR_STATE
	.comm	_IBV_WQS_RDY,8,3                ## @IBV_WQS_RDY
	.comm	_IBV_WQ_ATTR_CURR_STATE,4,2     ## @IBV_WQ_ATTR_CURR_STATE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IBV_WQS_RESET,8,3              ## @IBV_WQS_RESET
	.comm	_MLX5_RCV_DBR,8,3               ## @MLX5_RCV_DBR
	.comm	_MLX5_SND_DBR,8,3               ## @MLX5_SND_DBR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_modify_wq                 ; -- Begin function mlx5_modify_wq
	.p2align	2
_mlx5_modify_wq:                        ; @mlx5_modify_wq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	str	wzr, [sp, #8]
	bl	_to_mrwq
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _IBV_WQ_ATTR_STATE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IBV_WQ_ATTR_STATE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.1:
	ldr	x9, [x19, #8]
Lloh3:
	adrp	x10, _IBV_WQS_RDY@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IBV_WQS_RDY@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.2:
	mov	x21, x0
Lloh6:
	adrp	x9, _IBV_WQ_ATTR_CURR_STATE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IBV_WQ_ATTR_CURR_STATE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
	ldr	x8, [x19, #16]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.4:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
	ldr	x8, [x20]
LBB0_6:
Lloh12:
	adrp	x9, _IBV_WQS_RESET@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IBV_WQS_RESET@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	ldr	w0, [x20, #8]
	bl	_to_mcq
	bl	_mlx5_spin_lock
	ldr	w0, [x20, #8]
	bl	_to_mcq
	ldr	w1, [x21, #8]
	mov	x2, #0
	bl	___mlx5_cq_clean
	ldr	w0, [x20, #8]
	bl	_to_mcq
	bl	_mlx5_spin_unlock
	mov	x0, x21
	bl	_mlx5_init_rwq_indices
	ldr	x8, [x21]
Lloh15:
	adrp	x9, _MLX5_RCV_DBR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MLX5_RCV_DBR@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	str	xzr, [x8, x9, lsl #3]
Lloh18:
	adrp	x9, _MLX5_SND_DBR@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MLX5_SND_DBR@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	str	xzr, [x8, x9, lsl #3]
LBB0_8:
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x19
	mov	w3, #4
	mov	w4, #4
	bl	_ibv_cmd_modify_wq
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_IBV_WQ_ATTR_STATE,4,2          ; @IBV_WQ_ATTR_STATE
	.comm	_IBV_WQS_RDY,8,3                ; @IBV_WQS_RDY
	.comm	_IBV_WQ_ATTR_CURR_STATE,4,2     ; @IBV_WQ_ATTR_CURR_STATE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IBV_WQS_RESET,8,3              ; @IBV_WQS_RESET
	.comm	_MLX5_RCV_DBR,8,3               ; @MLX5_RCV_DBR
	.comm	_MLX5_SND_DBR,8,3               ; @MLX5_SND_DBR
.subsections_via_symbols
