	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_fc_pool_release_counter
_mlx5_fc_pool_release_counter:          ## @mlx5_fc_pool_release_counter
	.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	%rsi, %rbx
	movq	%rdi, %r13
	movq	32(%rdi), %r12
	movq	(%rsi), %r15
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mlx5_fc_bulk_release_fc
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_mlx5_core_warn
	jmp	LBB0_8
LBB0_2:
	incq	(%r13)
	decl	28(%r13)
	movq	%r15, %rdi
	callq	_mlx5_fc_bulk_get_free_fcs_amount
	movl	%eax, %r12d
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.3:
	leaq	4(%r15), %rdi
	leaq	24(%r13), %rsi
	callq	_list_move_tail
LBB0_4:
	cmpl	(%r15), %r12d
	jne	LBB0_8
## %bb.5:
	leaq	4(%r15), %r12
	movq	%r12, %rdi
	callq	_list_del
	movq	(%r13), %rax
	cmpq	8(%r13), %rax
	jle	LBB0_7
## %bb.6:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_mlx5_fc_pool_free_bulk
	jmp	LBB0_8
LBB0_7:
	addq	$20, %r13
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_list_add
LBB0_8:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attempted to release a counter which is not acquired\n"

	.no_dead_strip	_mlx5_fc_pool_release_counter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_fc_pool_release_counter
_mlx5_fc_pool_release_counter:          ; @mlx5_fc_pool_release_counter
	.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	x23, x1
	mov	x20, x0
	ldr	x22, [x0, #32]
	ldr	x21, [x1]
	add	x19, x0, #16
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x21
	mov	x1, x23
	bl	_mlx5_fc_bulk_release_fc
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_mlx5_core_warn
	b	LBB0_8
LBB0_2:
	ldr	x8, [x20]
	add	x8, x8, #1
	str	x8, [x20]
	ldr	w8, [x20, #28]
	sub	w8, w8, #1
	str	w8, [x20, #28]
	mov	x0, x21
	bl	_mlx5_fc_bulk_get_free_fcs_amount
	mov	x22, x0
	cmp	w0, #1
	b.ne	LBB0_4
; %bb.3:
	add	x0, x21, #4
	add	x1, x20, #24
	bl	_list_move_tail
LBB0_4:
	ldr	w8, [x21]
	cmp	w22, w8
	b.ne	LBB0_8
; %bb.5:
	add	x22, x21, #4
	mov	x0, x22
	bl	_list_del
	ldp	x8, x9, [x20]
	cmp	x8, x9
	b.le	LBB0_7
; %bb.6:
	mov	x0, x20
	mov	x1, x21
	bl	_mlx5_fc_pool_free_bulk
	b	LBB0_8
LBB0_7:
	add	x1, x20, #20
	mov	x0, x22
	bl	_list_add
LBB0_8:
	mov	x0, x19
	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
	b	_mutex_unlock
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attempted to release a counter which is not acquired\n"

	.no_dead_strip	_mlx5_fc_pool_release_counter
.subsections_via_symbols
