	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_ib_counter_bind_qp
_mlx5_ib_counter_bind_qp:               ## @mlx5_ib_counter_bind_qp
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	(%rsi), %edi
	callq	_to_mdev
	movq	%rax, %r14
	movl	$0, -36(%rbp)
	cmpl	$0, (%r15)
	je	LBB0_1
LBB0_3:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_mlx5_ib_qp_set_counter
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %ebx
	movl	(%r14), %edi
	movl	-36(%rbp), %esi
	callq	_mlx5_core_dealloc_q_counter
	movl	$0, (%r15)
	jmp	LBB0_6
LBB0_1:
	movl	(%r14), %edi
	movq	_MLX5_SHARED_RESOURCE_UID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %rsi
	callq	_mlx5_cmd_alloc_q_counter
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movl	-36(%rbp), %eax
	movl	%eax, (%r15)
	jmp	LBB0_3
LBB0_4:
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_SHARED_RESOURCE_UID,4,2   ## @MLX5_SHARED_RESOURCE_UID
	.no_dead_strip	_mlx5_ib_counter_bind_qp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_ib_counter_bind_qp
_mlx5_ib_counter_bind_qp:               ; @mlx5_ib_counter_bind_qp
	.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	x21, x1
	mov	x19, x0
	ldr	w0, [x1]
	bl	_to_mdev
	mov	x20, x0
	str	wzr, [sp, #12]
	ldr	w8, [x19]
	cbz	w8, LBB0_3
LBB0_1:
	mov	x0, x21
	mov	x1, x19
	bl	_mlx5_ib_qp_set_counter
	mov	x22, x0
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x20]
	ldr	w1, [sp, #12]
	bl	_mlx5_core_dealloc_q_counter
	str	wzr, [x19]
	b	LBB0_4
LBB0_3:
	ldr	w0, [x20]
Lloh0:
	adrp	x8, _MLX5_SHARED_RESOURCE_UID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX5_SHARED_RESOURCE_UID@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x1, sp, #12
	bl	_mlx5_cmd_alloc_q_counter
	mov	x22, x0
	cbz	w0, LBB0_5
LBB0_4:
	mov	x0, x22
	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
LBB0_5:
	ldr	w8, [sp, #12]
	str	w8, [x19]
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_SHARED_RESOURCE_UID,4,2   ; @MLX5_SHARED_RESOURCE_UID
	.no_dead_strip	_mlx5_ib_counter_bind_qp
.subsections_via_symbols
