	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vega20_send_msg_to_smc_with_parameter
_vega20_send_msg_to_smc_with_parameter: ## @vega20_send_msg_to_smc_with_parameter
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_vega20_wait_for_response
	movq	_MP1@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_mmMP1_SMN_C2PMSG_90@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_WREG32_SOC15
	movl	(%r13), %edi
	movq	_mmMP1_SMN_C2PMSG_82@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movl	%r15d, %ecx
	callq	_WREG32_SOC15
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_vega20_send_msg_to_smc_without_waiting
	movq	%rbx, %rdi
	callq	_vega20_wait_for_response
	movl	%eax, %ebx
	movq	_PPSMC_Result_OK@GOTPCREL(%rip), %r15
	cmpl	(%r15), %eax
	jne	LBB0_2
## %bb.1:
	movl	%ebx, %ecx
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_pr_err
	movl	(%r15), %ecx
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	subl	(%rdx), %eax
	cmpl	%ecx, %ebx
	cmovel	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MP1,4,2                        ## @MP1
	.comm	_mmMP1_SMN_C2PMSG_90,4,2        ## @mmMP1_SMN_C2PMSG_90
	.comm	_mmMP1_SMN_C2PMSG_82,4,2        ## @mmMP1_SMN_C2PMSG_82
	.comm	_PPSMC_Result_OK,4,2            ## @PPSMC_Result_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to send message 0x%x, response 0x%x\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_vega20_send_msg_to_smc_with_parameter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vega20_send_msg_to_smc_with_parameter
_vega20_send_msg_to_smc_with_parameter: ; @vega20_send_msg_to_smc_with_parameter
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	bl	_vega20_wait_for_response
Lloh0:
	adrp	x22, _MP1@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MP1@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _mmMP1_SMN_C2PMSG_90@GOTPAGE
Lloh3:
	ldr	x8, [x8, _mmMP1_SMN_C2PMSG_90@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #0
	mov	w3, #0
	bl	_WREG32_SOC15
	ldr	w0, [x22]
Lloh5:
	adrp	x8, _mmMP1_SMN_C2PMSG_82@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mmMP1_SMN_C2PMSG_82@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	w1, #0
	mov	x3, x20
	bl	_WREG32_SOC15
	mov	x0, x21
	mov	x1, x19
	bl	_vega20_send_msg_to_smc_without_waiting
	mov	x0, x21
	bl	_vega20_wait_for_response
	mov	x20, x0
Lloh8:
	adrp	x21, _PPSMC_Result_OK@GOTPAGE
Lloh9:
	ldr	x21, [x21, _PPSMC_Result_OK@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
	mov	x8, x20
	b	LBB0_3
LBB0_2:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_pr_err
	ldr	w8, [x21]
LBB0_3:
Lloh12:
	adrp	x9, _EIO@GOTPAGE
Lloh13:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w20, w8
	csneg	w0, wzr, w9, eq
	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
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MP1,4,2                        ; @MP1
	.comm	_mmMP1_SMN_C2PMSG_90,4,2        ; @mmMP1_SMN_C2PMSG_90
	.comm	_mmMP1_SMN_C2PMSG_82,4,2        ; @mmMP1_SMN_C2PMSG_82
	.comm	_PPSMC_Result_OK,4,2            ; @PPSMC_Result_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to send message 0x%x, response 0x%x\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_vega20_send_msg_to_smc_with_parameter
.subsections_via_symbols
