	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_lock_cqs
_mlx4_lock_cqs:                         ## @mlx4_lock_cqs
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_to_mcq
	movq	%rax, %r14
	movl	(%rbx), %edi
	callq	_to_mcq
	movq	%rax, %r15
	cmpl	$0, 4(%rbx)
	movl	(%rbx), %eax
	je	LBB0_4
## %bb.1:
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	cmpq	%r15, %r14
	je	LBB0_7
## %bb.3:
	movq	(%r14), %rax
	cmpq	(%r15), %rax
	movq	%r15, %rdi
	cmovlq	%r14, %rdi
	cmovgeq	%r14, %r15
	addq	$8, %rdi
	callq	_pthread_spin_lock
	jmp	LBB0_8
LBB0_4:
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r14, %r15
LBB0_8:
	addq	$8, %r15
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pthread_spin_lock              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mlx4_lock_cqs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_lock_cqs
_mlx4_lock_cqs:                         ; @mlx4_lock_cqs
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x0
	ldr	w0, [x0, #4]
	bl	_to_mcq
	mov	x20, x0
	ldr	w0, [x21]
	bl	_to_mcq
	mov	x19, x0
	ldp	w8, w9, [x21]
	cbz	w9, LBB0_3
; %bb.1:
	cmp	w8, #0
	ccmp	x20, x19, #4, ne
	b.ne	LBB0_5
; %bb.2:
	mov	x19, x20
	b	LBB0_6
LBB0_3:
	cbnz	w8, LBB0_6
; %bb.4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	x8, [x20]
	ldr	x9, [x19]
	cmp	x8, x9
	csel	x8, x20, x19, lt
	csel	x19, x19, x20, lt
	add	x0, x8, #8
	bl	_pthread_spin_lock
LBB0_6:
	add	x0, x19, #8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_pthread_spin_lock
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mlx4_lock_cqs
.subsections_via_symbols
