	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_store_uidx                ## -- Begin function mlx5_store_uidx
	.p2align	4, 0x90
_mlx5_store_uidx:                       ## @mlx5_store_uidx
	.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, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	callq	_pthread_mutex_lock
	movq	%r12, %rdi
	callq	_get_free_uidx
	movq	%rax, %r14
	movq	_MLX5_UIDX_TABLE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	%r14, %rbx
	shrq	%cl, %rbx
	movq	8(%r12), %r13
	shlq	$4, %rbx
	movl	8(%r13,%rbx), %r15d
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.1:
	movq	(%r13,%rbx), %rax
	jmp	LBB0_2
LBB0_3:
	movq	_MLX5_UIDX_TABLE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	incl	%edi
	movl	$8, %esi
	callq	_calloc
	movq	%rax, (%r13,%rbx)
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	leaq	(%rbx,%r13), %rcx
	addq	$8, %rcx
	incl	%r15d
	movl	%r15d, (%rcx)
	movq	_MLX5_UIDX_TABLE_MASK@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	andq	%r14, %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, (%rax,%rcx,8)
LBB0_5:
	movq	%r12, %rdi
	callq	_pthread_mutex_unlock
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	$-1, %r14
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_UIDX_TABLE_SHIFT,8,3      ## @MLX5_UIDX_TABLE_SHIFT
	.comm	_MLX5_UIDX_TABLE_MASK,4,2       ## @MLX5_UIDX_TABLE_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_store_uidx                ; -- Begin function mlx5_store_uidx
	.p2align	2
_mlx5_store_uidx:                       ; @mlx5_store_uidx
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x1
	mov	x19, x0
	bl	_pthread_mutex_lock
	mov	x0, x19
	bl	_get_free_uidx
	mov	x20, x0
Lloh0:
	adrp	x8, _MLX5_UIDX_TABLE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX5_UIDX_TABLE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	lsr	x26, x0, x8
	ldr	x25, [x19, #8]
	add	x22, x25, x26, lsl #4
	ldr	w24, [x22, #8]!
Lloh3:
	adrp	x23, _MLX5_UIDX_TABLE_MASK@GOTPAGE
Lloh4:
	ldr	x23, [x23, _MLX5_UIDX_TABLE_MASK@GOTPAGEOFF]
	cbz	w24, LBB0_2
; %bb.1:
	lsl	x8, x26, #4
	ldr	x0, [x25, x8]
	b	LBB0_3
LBB0_2:
	ldr	w8, [x23]
	add	w0, w8, #1
	mov	w1, #8
	bl	_calloc
	lsl	x8, x26, #4
	str	x0, [x25, x8]
	cbz	x0, LBB0_5
LBB0_3:
	add	w8, w24, #1
	str	w8, [x22]
	ldrsw	x8, [x23]
	and	x8, x20, x8
	str	x21, [x0, x8, lsl #3]
LBB0_4:
	mov	x0, x19
	bl	_pthread_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x20, #-1
	b	LBB0_4
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_UIDX_TABLE_SHIFT,8,3      ; @MLX5_UIDX_TABLE_SHIFT
	.comm	_MLX5_UIDX_TABLE_MASK,4,2       ; @MLX5_UIDX_TABLE_MASK
.subsections_via_symbols
