	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _mlx4_ib_modify_wq
__mlx4_ib_modify_wq:                    ## @_mlx4_ib_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	%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
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_to_mqp
	movq	%rax, %r13
	movl	(%rax), %ebx
	movl	%r15d, %edi
	callq	_ib_wq2qp_state
	movl	%eax, %r12d
	movl	%r15d, %edi
	callq	_ib_wq2qp_state
	xorl	%ecx, %ecx
	cmpl	%ebx, %eax
	je	LBB0_9
## %bb.1:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	_IB_WQS_RDY@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_4
## %bb.2:
	movl	4(%r13), %eax
	movl	%eax, -48(%rbp)
	movq	_IB_QP_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_MLX4_IB_RWQ_SRC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IB_QPS_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_IB_QPS_INIT@GOTPCREL(%rip), %r15
	movl	(%r15), %r9d
	movq	%r12, (%rsp)
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	___mlx4_ib_modify_qp
	testl	%eax, %eax
	je	LBB0_3
## %bb.10:
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdi
	movl	%eax, %ebx
	callq	_pr_debug
	movl	%ebx, %ecx
	jmp	LBB0_9
LBB0_3:
	movl	(%r15), %ebx
LBB0_4:
	movq	_MLX4_IB_RWQ_SRC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, (%rsp)
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	%ebx, %r15d
	movl	%ebx, %r8d
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	callq	___mlx4_ib_modify_qp
	movl	%eax, %ecx
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movq	_IB_QPS_INIT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_8
## %bb.6:
	movq	_IB_QPS_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MLX4_IB_RWQ_SRC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, (%rsp)
	movq	%r14, %rdi
	xorl	%edx, %edx
	movl	%ecx, %ebx
	xorl	%ecx, %ecx
	movl	%r15d, %r8d
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	callq	___mlx4_ib_modify_qp
	movl	%ebx, %ecx
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_warn
	movl	%ebx, %ecx
	movq	_IB_QPS_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_8:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r13)
LBB0_9:
	movl	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_WQS_RDY,4,2                 ## @IB_WQS_RDY
	.comm	_IB_QP_PORT,4,2                 ## @IB_QP_PORT
	.comm	_MLX4_IB_RWQ_SRC,4,2            ## @MLX4_IB_RWQ_SRC
	.comm	_IB_QPS_RESET,4,2               ## @IB_QPS_RESET
	.comm	_IB_QPS_INIT,4,2                ## @IB_QPS_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WQN=0x%06x failed to apply RST->INIT on the HW QP\n"

L_.str.1:                               ## @.str.1
	.asciz	"WQN=0x%06x failed with reverting HW's resources failure\n"

	.no_dead_strip	__mlx4_ib_modify_wq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _mlx4_ib_modify_wq
__mlx4_ib_modify_wq:                    ; @_mlx4_ib_modify_wq
	.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	x21, x2
	mov	x23, x1
	mov	x20, x0
	bl	_to_mqp
	mov	x19, x0
	ldr	w24, [x0]
	mov	x0, x23
	bl	_ib_wq2qp_state
	mov	x22, x0
	mov	x0, x23
	bl	_ib_wq2qp_state
	cmp	w0, w24
	b.ne	LBB0_2
; %bb.1:
	mov	w23, #0
	b	LBB0_10
LBB0_2:
Lloh0:
	adrp	x8, _IB_WQS_RDY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_WQS_RDY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x26, _MLX4_IB_RWQ_SRC@GOTPAGE
Lloh4:
	ldr	x26, [x26, _MLX4_IB_RWQ_SRC@GOTPAGEOFF]
Lloh5:
	adrp	x25, _IB_QPS_INIT@GOTPAGE
Lloh6:
	ldr	x25, [x25, _IB_QPS_INIT@GOTPAGEOFF]
	cmp	w8, w23
	b.ne	LBB0_6
; %bb.3:
	ldr	w8, [x19, #4]
	str	w8, [sp, #8]
Lloh7:
	adrp	x8, _IB_QP_PORT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IB_QP_PORT@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
	ldr	w1, [x26]
Lloh10:
	adrp	x8, _IB_QPS_RESET@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IB_QPS_RESET@GOTPAGEOFF]
Lloh12:
	ldr	w4, [x8]
	ldr	w5, [x25]
	add	x2, sp, #8
	mov	x0, x20
	mov	x6, x21
	bl	___mlx4_ib_modify_qp
	cbz	w0, LBB0_5
; %bb.4:
	mov	x23, x0
	ldr	w1, [x20]
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	b	LBB0_10
LBB0_5:
	ldr	w24, [x25]
LBB0_6:
	ldr	w1, [x26]
	mov	x0, x20
	mov	x2, #0
	mov	w3, #0
	mov	x4, x24
	mov	x5, x22
	mov	x6, x21
	bl	___mlx4_ib_modify_qp
	mov	x23, x0
	ldr	w8, [x25]
	cmp	w0, #0
	ccmp	w24, w8, #0, ne
	b.ne	LBB0_9
; %bb.7:
Lloh15:
	adrp	x8, _IB_QPS_RESET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IB_QPS_RESET@GOTPAGEOFF]
Lloh17:
	ldr	w22, [x8]
	ldr	w1, [x26]
	mov	x0, x20
	mov	x2, #0
	mov	w3, #0
	mov	x4, x24
	mov	x5, x22
	mov	x6, x21
	bl	___mlx4_ib_modify_qp
	cbz	w0, LBB0_9
; %bb.8:
	ldr	w1, [x20]
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
	ldr	w22, [x25]
LBB0_9:
	str	w22, [x19]
LBB0_10:
	mov	x0, x23
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_WQS_RDY,4,2                 ; @IB_WQS_RDY
	.comm	_IB_QP_PORT,4,2                 ; @IB_QP_PORT
	.comm	_MLX4_IB_RWQ_SRC,4,2            ; @MLX4_IB_RWQ_SRC
	.comm	_IB_QPS_RESET,4,2               ; @IB_QPS_RESET
	.comm	_IB_QPS_INIT,4,2                ; @IB_QPS_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WQN=0x%06x failed to apply RST->INIT on the HW QP\n"

l_.str.1:                               ; @.str.1
	.asciz	"WQN=0x%06x failed with reverting HW's resources failure\n"

	.no_dead_strip	__mlx4_ib_modify_wq
.subsections_via_symbols
