	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bringup_rss_rwqs
_bringup_rss_rwqs:                      ## @bringup_rss_rwqs
	.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
	xorl	%ebx, %ebx
	cmpl	$31, (%rdi)
	je	LBB0_23
## %bb.1:
	movq	%rsi, %r13
	xorl	%r12d, %r12d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, 8(%r14)
	je	LBB0_6
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rax
	movq	%rax, (%r14)
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movzbl	(%rdi), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	incq	%r12
	cltq
	cmpq	%rax, %r12
	jge	LBB0_12
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rdi), %rax
	movq	(%rax,%r12,8), %rbx
	movq	%rbx, %rdi
	callq	_to_mqp
	movq	%rax, %r14
	leaq	16(%rax), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	(%r14), %rax
	testq	%rax, %rax
	jle	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r13, 8(%r14)
	jne	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, 8(%r14)
	jmp	LBB0_11
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rsi
	movq	_IB_WQS_RDY@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	__mlx4_ib_modify_wq
	testl	%eax, %eax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rax
	jmp	LBB0_11
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_12:
	xorl	%ebx, %ebx
	jmp	LBB0_23
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movq	%r15, %rdi
	callq	_mutex_unlock
	testl	%r12d, %r12d
	jle	LBB0_23
## %bb.15:
	testl	%ebx, %ebx
	je	LBB0_23
## %bb.16:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	incq	%r12
	movq	_IB_WQS_RESET@GOTPCREL(%rip), %r15
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_17 Depth=1
	decq	(%rbx)
	movq	%r13, %rdi
	callq	_mutex_unlock
	decq	%r12
	cmpq	$1, %r12
	jbe	LBB0_22
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	-16(%rax,%r12,8), %r14
	movq	%r14, %rdi
	callq	_to_mqp
	movq	%rax, %rbx
	leaq	16(%rax), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	cmpq	$1, (%rbx)
	jne	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	(%r14), %rax
	movq	_IB_WQS_RDY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	(%r15), %rsi
	movq	%r14, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	__mlx4_ib_modify_wq
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	8(%r14), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
	jmp	LBB0_21
LBB0_22:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_23:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	%eax, %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IB_WQS_RDY,8,3                 ## @IB_WQS_RDY
	.comm	_IB_WQS_RESET,8,3               ## @IB_WQS_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to reverse WQN=0x%06x\n"

	.no_dead_strip	_bringup_rss_rwqs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bringup_rss_rwqs
_bringup_rss_rwqs:                      ; @bringup_rss_rwqs
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0]
	cmp	w8, #31
	b.ne	LBB0_3
LBB0_1:
	mov	w21, #0
LBB0_2:
	mov	x0, x21
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
	mov	x25, #0
	mov	w27, #1
Lloh0:
	adrp	x26, _IB_WQS_RDY@GOTPAGE
Lloh1:
	ldr	x26, [x26, _IB_WQS_RDY@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	str	x22, [x24, #8]
	cbz	x8, LBB0_9
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x8, #1
	str	x8, [x24]
	mov	x0, x23
	bl	_mutex_unlock
	add	x25, x25, #1
	ldr	w8, [x20]
	lsl	w8, w27, w8
	cmp	x25, w8, sxtw
	b.ge	LBB0_1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x21, [x8, x25, lsl #3]
	mov	x0, x21
	bl	_to_mqp
	mov	x24, x0
	add	x23, x0, #16
	mov	x0, x23
	bl	_mutex_lock
	ldr	x8, [x24]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x24, #8]
	cmp	x9, x22
	b.ne	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	str	x22, [x24, #8]
	b	LBB0_5
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x1, [x21]
	ldr	x8, [x26]
	cmp	x1, x8
	b.ne	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	x2, x19
	bl	__mlx4_ib_modify_wq
	cbnz	w0, LBB0_22
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x24]
	b	LBB0_5
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x8, #0
	b	LBB0_5
LBB0_13:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_14:
	mov	x0, x23
	bl	_mutex_unlock
	cmp	w25, #1
	b.lt	LBB0_2
; %bb.15:
	cbz	w21, LBB0_2
; %bb.16:
	sub	x27, x25, #1
Lloh5:
	adrp	x28, _IB_WQS_RESET@GOTPAGE
Lloh6:
	ldr	x28, [x28, _IB_WQS_RESET@GOTPAGEOFF]
Lloh7:
	adrp	x22, l_.str@PAGE
Lloh8:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [x24]
	sub	x8, x8, #1
	str	x8, [x24]
	mov	x0, x23
	bl	_mutex_unlock
	add	x8, x27, #1
	sub	x27, x27, #1
	cmp	x8, #1
	b.ls	LBB0_2
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x25, [x8, x27, lsl #3]
	mov	x0, x25
	bl	_to_mqp
	mov	x24, x0
	add	x23, x0, #16
	mov	x0, x23
	bl	_mutex_lock
	ldr	x8, [x24]
	cmp	x8, #1
	b.ne	LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [x25]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x1, [x28]
	mov	x0, x25
	mov	x2, x19
	bl	__mlx4_ib_modify_wq
	cbz	w0, LBB0_17
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	w1, [x25, #8]
	mov	x0, x22
	bl	_pr_warn
	b	LBB0_17
LBB0_22:
	mov	x21, x0
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IB_WQS_RDY,8,3                 ; @IB_WQS_RDY
	.comm	_IB_WQS_RESET,8,3               ; @IB_WQS_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to reverse WQN=0x%06x\n"

	.no_dead_strip	_bringup_rss_rwqs
.subsections_via_symbols
