	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_ib_add_outstanding_wr
_mlx5_ib_add_outstanding_wr:            ## @mlx5_ib_add_outstanding_wr
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	32(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_mdev
	movq	(%rbx), %rcx
	movq	16(%rbx), %rsi
	movq	8(%rbx), %rdx
	addq	%rsi, %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_mlx5_ib_warn
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_2:
	movq	24(%rbx), %r12
	movq	%rcx, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_3
## %bb.4:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_5
LBB0_3:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_5:
	incq	%rcx
	movq	%rcx, (%rbx)
	leaq	(%rdx,%rdx,2), %rbx
	leaq	(%r12,%rbx,8), %r13
	addq	$16, %r13
	testq	%r15, %r15
	je	LBB0_6
## %bb.7:
	movq	(%r15), %rax
	movq	%rax, (%r13)
	movl	$1, (%r12,%rbx,8)
	jmp	LBB0_8
LBB0_6:
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	16(%r14), %eax
	movl	%eax, 20(%r12,%rbx,8)
	movl	8(%r14), %eax
	movl	%eax, (%r13)
LBB0_8:
	leaq	(%r12,%rbx,8), %rax
	addq	$8, %rax
	movq	_handle_single_completion@GOTPCREL(%rip), %rcx
	movq	%rcx, 8(%r12,%rbx,8)
	movq	%rax, (%r14)
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no available GSI work request.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_handle_single_completion,4,2   ## @handle_single_completion
	.no_dead_strip	_mlx5_ib_add_outstanding_wr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_ib_add_outstanding_wr
_mlx5_ib_add_outstanding_wr:            ; @mlx5_ib_add_outstanding_wr
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x8, [x0, #32]
	ldr	w0, [x8]
	bl	_to_mdev
	ldp	x8, x10, [x21]
	ldr	x9, [x21, #16]
	add	x10, x9, x10
	cmp	x8, x10
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_mlx5_ib_warn
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
	ldr	x22, [x21, #24]
	udiv	x10, x8, x9
	msub	x23, x10, x9, x8
	add	x8, x8, #1
	str	x8, [x21]
	mov	w8, #24
	madd	x8, x23, x8, x22
	add	x21, x8, #16
	cbz	x20, LBB0_4
; %bb.3:
	ldr	x8, [x20]
	str	x8, [x21]
	mov	w8, #24
	mul	x8, x23, x8
	mov	w9, #1
	str	w9, [x22, x8]
	b	LBB0_5
LBB0_4:
	mov	x0, x21
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	w8, [x19, #16]
	mov	w9, #24
	madd	x9, x23, x9, x22
	str	w8, [x9, #20]
	ldr	w8, [x19, #8]
	str	w8, [x21]
LBB0_5:
	mov	w0, #0
	mov	w8, #24
	madd	x8, x23, x8, x22
Lloh5:
	adrp	x9, _handle_single_completion@GOTPAGE
Lloh6:
	ldr	x9, [x9, _handle_single_completion@GOTPAGEOFF]
	str	x9, [x8, #8]!
	str	x8, [x19]
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no available GSI work request.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_handle_single_completion,4,2   ; @handle_single_completion
	.no_dead_strip	_mlx5_ib_add_outstanding_wr
.subsections_via_symbols
