	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_store_xsrq                ## -- Begin function mlx4_store_xsrq
	.p2align	4, 0x90
_mlx4_store_xsrq:                       ## @mlx4_store_xsrq
	.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
	movq	%rdi, %r12
	movl	(%rdi), %ebx
	decl	%ebx
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	andl	%esi, %ebx
	movb	4(%rdi), %cl
	sarl	%cl, %ebx
	addq	$12, %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_pthread_mutex_lock
	movq	16(%r12), %r13
	movslq	%ebx, %r14
	shlq	$4, %r14
	movl	8(%r13,%r14), %r15d
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.1:
	movq	(%r13,%r14), %rax
	movl	8(%r12), %ebx
	jmp	LBB0_2
LBB0_3:
	movl	8(%r12), %ebx
	leal	1(%rbx), %edi
	movl	$8, %esi
	callq	_calloc
	movq	%rax, (%r13,%r14)
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	leaq	(%r14,%r13), %rcx
	addq	$8, %rcx
	incl	%r15d
	movl	%r15d, (%rcx)
	andl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	movslq	%ebx, %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, (%rax,%rcx,8)
	xorl	%ebx, %ebx
LBB0_5:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_pthread_mutex_unlock
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	$-1, %ebx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_store_xsrq                ; -- Begin function mlx4_store_xsrq
	.p2align	2
_mlx4_store_xsrq:                       ; @mlx4_store_xsrq
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldp	w8, w9, [x0]
	sub	w8, w8, #1
	and	w8, w8, w1
	asr	w23, w8, w9
	add	x19, x0, #12
	mov	x0, x19
	bl	_pthread_mutex_lock
	ldr	x26, [x22, #16]
	sxtw	x27, w23
	add	x23, x26, w23, sxtw #4
	ldr	w24, [x23, #8]!
	cbz	w24, LBB0_2
; %bb.1:
	lsl	x8, x27, #4
	ldr	x0, [x26, x8]
	ldr	w25, [x22, #8]
	b	LBB0_3
LBB0_2:
	ldr	w25, [x22, #8]
	add	w0, w25, #1
	mov	w1, #8
	bl	_calloc
	lsl	x8, x27, #4
	str	x0, [x26, x8]
	cbz	x0, LBB0_5
LBB0_3:
	mov	w22, #0
	add	w8, w24, #1
	str	w8, [x23]
	and	w8, w25, w21
	str	x20, [x0, w8, sxtw #3]
LBB0_4:
	mov	x0, x19
	bl	_pthread_mutex_unlock
	mov	x0, x22
	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_5:
	mov	w22, #-1
	b	LBB0_4
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
