	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qed_ptp_res_unlock
_qed_ptp_res_unlock:                    ## @qed_ptp_res_unlock
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_qed_ptcdev_to_resc
	movq	_QED_RESC_LOCK_RESC_INVALID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_2:
	xorl	%ebx, %ebx
	leaq	-40(%rbp), %r12
	xorl	%edi, %edi
	movq	%r12, %rsi
	movl	%eax, %edx
	movl	$1, %ecx
	callq	_qed_mcp_resc_lock_default_init
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_qed_mcp_resc_unlock
	movl	%eax, %r15d
	movq	_EINVAL@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	addl	%r15d, %eax
	jne	LBB0_5
## %bb.3:
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_7
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_DP_INFO
	xorl	%ebx, %ebx
	subl	(%r12), %ebx
	jmp	LBB0_7
LBB0_5:
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_DP_INFO
	movl	%r15d, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QED_RESC_LOCK_RESC_INVALID,4,2 ## @QED_RESC_LOCK_RESC_INVALID
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PF doesn't have lock ownership\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to release the ptp resource lock\n"

	.no_dead_strip	_qed_ptp_res_unlock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qed_ptp_res_unlock
_qed_ptp_res_unlock:                    ; @qed_ptp_res_unlock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	bl	_qed_ptcdev_to_resc
Lloh0:
	adrp	x8, _QED_RESC_LOCK_RESC_INVALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QED_RESC_LOCK_RESC_INVALID@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	b	LBB0_8
LBB0_2:
	mov	x2, x0
	add	x1, sp, #8
	mov	x0, #0
	mov	w3, #1
	bl	_qed_mcp_resc_lock_default_init
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_qed_mcp_resc_unlock
Lloh6:
	adrp	x21, _EINVAL@GOTPAGE
Lloh7:
	ldr	x21, [x21, _EINVAL@GOTPAGEOFF]
	ldr	w8, [x21]
	cmn	w0, w8
	b.ne	LBB0_5
; %bb.3:
	ldp	x8, x9, [x19]
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_7
; %bb.4:
	mov	w20, #0
	b	LBB0_9
LBB0_5:
	mov	x20, x0
	cbz	w0, LBB0_9
; %bb.6:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_DP_INFO
	b	LBB0_9
LBB0_7:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_DP_INFO
	ldr	w8, [x21]
LBB0_8:
	neg	w20, w8
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_QED_RESC_LOCK_RESC_INVALID,4,2 ; @QED_RESC_LOCK_RESC_INVALID
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PF doesn't have lock ownership\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to release the ptp resource lock\n"

	.no_dead_strip	_qed_ptp_res_unlock
.subsections_via_symbols
