	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function ocrdma_alloc_lkey
LCPI0_0:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_ocrdma_alloc_lkey:                     ## @ocrdma_alloc_lkey
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movq	$0, 32(%rsi)
	movl	$1, (%rsi)
	movq	_IB_ACCESS_REMOTE_READ@GOTPCREL(%rip), %rax
	movq	_IB_ACCESS_REMOTE_WRITE@GOTPCREL(%rip), %rsi
	movq	_IB_ACCESS_LOCAL_WRITE@GOTPCREL(%rip), %r10
	movq	_IB_ACCESS_MW_BIND@GOTPCREL(%rip), %r11
	movd	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	pinsrd	$1, (%rsi), %xmm0
	pinsrd	$2, (%r10), %xmm0
	pinsrd	$3, (%r11), %xmm0
	movd	%ecx, %xmm1
	pshufd	$0, %xmm1, %xmm1                ## xmm1 = xmm1[0,0,0,0]
	pand	%xmm0, %xmm1
	pxor	%xmm0, %xmm0
	pcmpeqd	%xmm1, %xmm0
	pandn	LCPI0_0(%rip), %xmm0
	movdqu	%xmm0, 4(%rbx)
	movq	_IB_ACCESS_REMOTE_ATOMIC@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	andl	(%rax), %ecx
	movl	%r9d, %ecx
	setne	%sil
	movl	%esi, 20(%rbx)
	movl	%r8d, 28(%rbx)
	movq	%rbx, %rsi
	callq	_ocrdma_mbx_alloc_lkey
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movl	24(%rbx), %ecx
	movl	%ecx, 44(%rbx)
	cmpl	$0, 8(%rbx)
	jne	LBB0_3
## %bb.2:
	cmpl	$0, 4(%rbx)
	je	LBB0_4
LBB0_3:
	movl	%ecx, 40(%rbx)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_ACCESS_REMOTE_READ,4,2      ## @IB_ACCESS_REMOTE_READ
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ## @IB_ACCESS_REMOTE_WRITE
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ## @IB_ACCESS_LOCAL_WRITE
	.comm	_IB_ACCESS_MW_BIND,4,2          ## @IB_ACCESS_MW_BIND
	.comm	_IB_ACCESS_REMOTE_ATOMIC,4,2    ## @IB_ACCESS_REMOTE_ATOMIC
	.no_dead_strip	_ocrdma_alloc_lkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ocrdma_alloc_lkey
_ocrdma_alloc_lkey:                     ; @ocrdma_alloc_lkey
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	str	xzr, [x1, #32]
	mov	w8, #1
Lloh0:
	adrp	x9, _IB_ACCESS_REMOTE_READ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IB_ACCESS_REMOTE_READ@GOTPAGEOFF]
Lloh2:
	adrp	x10, _IB_ACCESS_REMOTE_WRITE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _IB_ACCESS_REMOTE_WRITE@GOTPAGEOFF]
Lloh4:
	adrp	x11, _IB_ACCESS_LOCAL_WRITE@GOTPAGE
Lloh5:
	ldr	x11, [x11, _IB_ACCESS_LOCAL_WRITE@GOTPAGEOFF]
	str	w8, [x1]
Lloh6:
	adrp	x8, _IB_ACCESS_MW_BIND@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IB_ACCESS_MW_BIND@GOTPAGEOFF]
Lloh8:
	ldr	s0, [x9]
	ld1.s	{ v0 }[1], [x10]
	ld1.s	{ v0 }[2], [x11]
	ld1.s	{ v0 }[3], [x8]
	dup.4s	v1, w3
	and.16b	v0, v0, v1
	cmeq.4s	v0, v0, #0
	movi.4s	v1, #1
	bic.16b	v0, v1, v0
Lloh9:
	adrp	x8, _IB_ACCESS_REMOTE_ATOMIC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IB_ACCESS_REMOTE_ATOMIC@GOTPAGEOFF]
	stur	q0, [x1, #4]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w3
	cset	w8, ne
	str	w8, [x1, #20]
	str	w4, [x1, #28]
	mov	x3, x5
	bl	_ocrdma_mbx_alloc_lkey
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	w8, [x19, #24]
	str	w8, [x19, #44]
	ldr	w9, [x19, #8]
	cbnz	w9, LBB0_3
; %bb.2:
	ldr	w9, [x19, #4]
	cbz	w9, LBB0_4
LBB0_3:
	str	w8, [x19, #40]
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_ACCESS_REMOTE_READ,4,2      ; @IB_ACCESS_REMOTE_READ
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ; @IB_ACCESS_REMOTE_WRITE
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ; @IB_ACCESS_LOCAL_WRITE
	.comm	_IB_ACCESS_MW_BIND,4,2          ; @IB_ACCESS_MW_BIND
	.comm	_IB_ACCESS_REMOTE_ATOMIC,4,2    ; @IB_ACCESS_REMOTE_ATOMIC
	.no_dead_strip	_ocrdma_alloc_lkey
.subsections_via_symbols
