	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __qed_mcp_resc_lock
___qed_mcp_resc_lock:                   ## @__qed_mcp_resc_lock
	.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, %r13
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rdx), %eax
	cmpl	$130, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$131, %eax
	jne	LBB0_5
## %bb.2:
	movq	_RESOURCE_OPCODE_REQ@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_4:
	movq	_RESOURCE_OPCODE_REQ_WO_AGING@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r12d
	movl	$0, (%r13)
	jmp	LBB0_6
LBB0_5:
	movq	_RESOURCE_OPCODE_REQ_W_AGING@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_6:
	movq	_RESOURCE_CMD_REQ_RESC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r13), %edx
	xorl	%edi, %edi
	callq	_QED_MFW_SET_FIELD
	movq	_RESOURCE_CMD_REQ_OPCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	movl	%r12d, %edx
	callq	_QED_MFW_SET_FIELD
	movq	_RESOURCE_CMD_REQ_AGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	xorl	%edi, %edi
	callq	_QED_MFW_SET_FIELD
	movq	_QED_MSG_SP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %r8d
	movl	4(%r13), %eax
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	movl	%r12d, %r9d
	xorl	%eax, %eax
	callq	_DP_VERBOSE
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_qed_mcp_resource_cmd
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_7
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	-44(%rbp), %edi
	movq	_RESOURCE_CMD_RSP_OWNER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_QED_MFW_GET_FIELD
	movq	%rax, 16(%r13)
	movl	-44(%rbp), %edi
	movq	_RESOURCE_CMD_RSP_OPCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_QED_MFW_GET_FIELD
	movq	%rax, %r15
	movq	_QED_MSG_SP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %ecx
	movl	16(%r13), %r9d
	leaq	L_.str.1(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_DP_VERBOSE
	cmpl	$129, %r15d
	je	LBB0_10
## %bb.8:
	cmpl	$128, %r15d
	jne	LBB0_11
## %bb.9:
	movl	$1, 8(%r13)
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_10:
	movl	$0, 8(%r13)
	jmp	LBB0_12
LBB0_11:
	movl	-44(%rbp), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %ecx
	callq	_DP_NOTICE
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_RESOURCE_OPCODE_REQ,4,2        ## @RESOURCE_OPCODE_REQ
	.comm	_RESOURCE_OPCODE_REQ_WO_AGING,4,2 ## @RESOURCE_OPCODE_REQ_WO_AGING
	.comm	_RESOURCE_OPCODE_REQ_W_AGING,4,2 ## @RESOURCE_OPCODE_REQ_W_AGING
	.comm	_RESOURCE_CMD_REQ_RESC,4,2      ## @RESOURCE_CMD_REQ_RESC
	.comm	_RESOURCE_CMD_REQ_OPCODE,4,2    ## @RESOURCE_CMD_REQ_OPCODE
	.comm	_RESOURCE_CMD_REQ_AGE,4,2       ## @RESOURCE_CMD_REQ_AGE
	.comm	_QED_MSG_SP,4,2                 ## @QED_MSG_SP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Resource lock request: param 0x%08x [age %d, opcode %d, resource %d]\n"

	.comm	_RESOURCE_CMD_RSP_OWNER,4,2     ## @RESOURCE_CMD_RSP_OWNER
	.comm	_RESOURCE_CMD_RSP_OPCODE,4,2    ## @RESOURCE_CMD_RSP_OPCODE
L_.str.1:                               ## @.str.1
	.asciz	"Resource lock response: mcp_param 0x%08x [opcode %d, owner %d]\n"

L_.str.2:                               ## @.str.2
	.asciz	"Unexpected opcode in resource lock response [mcp_param 0x%08x, opcode %d]\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	___qed_mcp_resc_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __qed_mcp_resc_lock
___qed_mcp_resc_lock:                   ; @__qed_mcp_resc_lock
	.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, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w8, [x2]
	cmp	w8, #130
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #131
	b.ne	LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _RESOURCE_OPCODE_REQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RESOURCE_OPCODE_REQ@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x8, _RESOURCE_OPCODE_REQ_WO_AGING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RESOURCE_OPCODE_REQ_WO_AGING@GOTPAGEOFF]
LBB0_4:
	ldr	w22, [x8]
	str	wzr, [x19]
	b	LBB0_6
LBB0_5:
Lloh4:
	adrp	x8, _RESOURCE_OPCODE_REQ_W_AGING@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RESOURCE_OPCODE_REQ_W_AGING@GOTPAGEOFF]
Lloh6:
	ldr	w22, [x8]
LBB0_6:
Lloh7:
	adrp	x8, _RESOURCE_CMD_REQ_RESC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RESOURCE_CMD_REQ_RESC@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
	mov	w0, #0
	bl	_QED_MFW_SET_FIELD
Lloh10:
	adrp	x8, _RESOURCE_CMD_REQ_OPCODE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RESOURCE_CMD_REQ_OPCODE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	w0, #0
	mov	x2, x22
	bl	_QED_MFW_SET_FIELD
Lloh13:
	adrp	x8, _RESOURCE_CMD_REQ_AGE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _RESOURCE_CMD_REQ_AGE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	w0, #0
	bl	_QED_MFW_SET_FIELD
Lloh16:
	adrp	x23, _QED_MSG_SP@GOTPAGE
Lloh17:
	ldr	x23, [x23, _QED_MSG_SP@GOTPAGEOFF]
	ldr	w1, [x23]
	ldp	w4, w8, [x19]
	str	x8, [sp]
Lloh18:
	adrp	x2, l_.str@PAGE
Lloh19:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	w3, #0
	mov	x5, x22
	bl	_DP_VERBOSE
	add	x3, sp, #12
	add	x4, sp, #8
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_qed_mcp_resource_cmd
	cbz	w0, LBB0_8
LBB0_7:
	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_8:
	ldr	w0, [sp, #8]
Lloh20:
	adrp	x8, _RESOURCE_CMD_RSP_OWNER@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RESOURCE_CMD_RSP_OWNER@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bl	_QED_MFW_GET_FIELD
	str	x0, [x19, #16]
	ldr	w0, [sp, #8]
Lloh23:
	adrp	x8, _RESOURCE_CMD_RSP_OPCODE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RESOURCE_CMD_RSP_OPCODE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	bl	_QED_MFW_GET_FIELD
	mov	x21, x0
	ldr	w1, [x23]
	ldr	w3, [sp, #8]
	ldr	w5, [x19, #16]
Lloh26:
	adrp	x2, l_.str.1@PAGE
Lloh27:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x4, x21
	bl	_DP_VERBOSE
	cmp	w21, #129
	b.eq	LBB0_11
; %bb.9:
	cmp	w21, #128
	b.ne	LBB0_12
; %bb.10:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19, #8]
	b	LBB0_7
LBB0_11:
	mov	w0, #0
	str	wzr, [x19, #8]
	b	LBB0_7
LBB0_12:
	ldr	w2, [sp, #8]
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x3, x21
	bl	_DP_NOTICE
Lloh30:
	adrp	x8, _EINVAL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_RESOURCE_OPCODE_REQ,4,2        ; @RESOURCE_OPCODE_REQ
	.comm	_RESOURCE_OPCODE_REQ_WO_AGING,4,2 ; @RESOURCE_OPCODE_REQ_WO_AGING
	.comm	_RESOURCE_OPCODE_REQ_W_AGING,4,2 ; @RESOURCE_OPCODE_REQ_W_AGING
	.comm	_RESOURCE_CMD_REQ_RESC,4,2      ; @RESOURCE_CMD_REQ_RESC
	.comm	_RESOURCE_CMD_REQ_OPCODE,4,2    ; @RESOURCE_CMD_REQ_OPCODE
	.comm	_RESOURCE_CMD_REQ_AGE,4,2       ; @RESOURCE_CMD_REQ_AGE
	.comm	_QED_MSG_SP,4,2                 ; @QED_MSG_SP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Resource lock request: param 0x%08x [age %d, opcode %d, resource %d]\n"

	.comm	_RESOURCE_CMD_RSP_OWNER,4,2     ; @RESOURCE_CMD_RSP_OWNER
	.comm	_RESOURCE_CMD_RSP_OPCODE,4,2    ; @RESOURCE_CMD_RSP_OPCODE
l_.str.1:                               ; @.str.1
	.asciz	"Resource lock response: mcp_param 0x%08x [opcode %d, owner %d]\n"

l_.str.2:                               ; @.str.2
	.asciz	"Unexpected opcode in resource lock response [mcp_param 0x%08x, opcode %d]\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	___qed_mcp_resc_lock
.subsections_via_symbols
