	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_cpp_mutex_trylock          ## -- Begin function nfp_cpp_mutex_trylock
	.p2align	4, 0x90
_nfp_cpp_mutex_trylock:                 ## @nfp_cpp_mutex_trylock
	.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	%rdi, %rbx
	movl	32(%rdi), %edi
	movl	$4, %esi
	xorl	%edx, %edx
	callq	_NFP_CPP_ID
	movq	%rax, %r14
	movl	32(%rbx), %edi
	movl	$5, %esi
	movl	$3, %edx
	callq	_NFP_CPP_ID
	movq	%rax, %r12
	movl	32(%rbx), %edi
	movl	$3, %esi
	xorl	%edx, %edx
	callq	_NFP_CPP_ID
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_4
## %bb.1:
	movq	_NFP_MUTEX_DEPTH_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_3
## %bb.2:
	movq	_E2BIG@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_4:
	movq	24(%rbx), %r15
	movq	16(%rbx), %rdx
	addq	$4, %rdx
	leaq	-56(%rbp), %rcx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_nfp_cpp_readl
	testl	%eax, %eax
	js	LBB0_15
## %bb.5:
	movq	-56(%rbp), %rax
	cmpq	8(%rbx), %rax
	jne	LBB0_6
## %bb.7:
	movq	%r15, %rdi
	callq	_nfp_cpp_interface
	movl	%eax, %edi
	callq	_nfp_mutex_locked
	movq	%rax, %r13
	movq	16(%rbx), %rdx
	leaq	-48(%rbp), %rcx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_nfp_cpp_readl
	testl	%eax, %eax
	js	LBB0_15
## %bb.8:
	movq	-48(%rbp), %rdi
	callq	_nfp_mutex_is_unlocked
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	16(%rbx), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r13, %rcx
	callq	_nfp_cpp_writel
	testl	%eax, %eax
	js	LBB0_15
## %bb.10:
	movl	$1, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_3:
	incl	%ecx
	movl	%ecx, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_6:
	movq	_EPERM@GOTPCREL(%rip), %rcx
LBB0_14:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	-48(%rbp), %rdi
	callq	_nfp_mutex_is_locked
	testq	%rax, %rax
	jne	LBB0_12
## %bb.13:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_12:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_NFP_MUTEX_DEPTH_MAX,4,2        ## @NFP_MUTEX_DEPTH_MAX
	.comm	_E2BIG,4,2                      ## @E2BIG
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_cpp_mutex_trylock          ; -- Begin function nfp_cpp_mutex_trylock
	.p2align	2
_nfp_cpp_mutex_trylock:                 ; @nfp_cpp_mutex_trylock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	ldr	w0, [x0, #32]
	mov	w1, #4
	mov	w2, #0
	bl	_NFP_CPP_ID
	mov	x20, x0
	ldr	w0, [x19, #32]
	mov	w1, #5
	mov	w2, #3
	bl	_NFP_CPP_ID
	mov	x22, x0
	ldr	w0, [x19, #32]
	mov	w1, #3
	mov	w2, #0
	bl	_NFP_CPP_ID
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, _NFP_MUTEX_DEPTH_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NFP_MUTEX_DEPTH_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.2:
Lloh3:
	adrp	x8, _E2BIG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _E2BIG@GOTPAGEOFF]
	b	LBB0_11
LBB0_3:
	mov	x1, x0
	ldp	x8, x21, [x19, #16]
	add	x2, x8, #4
	add	x3, sp, #8
	mov	x0, x21
	bl	_nfp_cpp_readl
	tbnz	w0, #31, LBB0_12
; %bb.4:
	ldr	x8, [sp, #8]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.5:
	mov	x0, x21
	bl	_nfp_cpp_interface
	bl	_nfp_mutex_locked
	mov	x23, x0
	ldr	x2, [x19, #16]
	mov	x3, sp
	mov	x0, x21
	mov	x1, x22
	bl	_nfp_cpp_readl
	tbnz	w0, #31, LBB0_12
; %bb.6:
	ldr	x0, [sp]
	bl	_nfp_mutex_is_unlocked
	cbz	x0, LBB0_13
; %bb.7:
	ldr	x2, [x19, #16]
	mov	x0, x21
	mov	x1, x20
	mov	x3, x23
	bl	_nfp_cpp_writel
	tbnz	w0, #31, LBB0_12
; %bb.8:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_12
LBB0_9:
	mov	w0, #0
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_12
LBB0_10:
Lloh5:
	adrp	x8, _EPERM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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
	add	sp, sp, #80
	ret
LBB0_13:
	ldr	x0, [sp]
	bl	_nfp_mutex_is_locked
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh9:
	adrp	x9, _EINVAL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_NFP_MUTEX_DEPTH_MAX,4,2        ; @NFP_MUTEX_DEPTH_MAX
	.comm	_E2BIG,4,2                      ; @E2BIG
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
