	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv770_send_msg_to_smc          ## -- Begin function rv770_send_msg_to_smc
	.p2align	4, 0x90
_rv770_send_msg_to_smc:                 ## @rv770_send_msg_to_smc
	.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	%esi, %r14d
	movq	%rdi, %r13
	callq	_rv770_is_smc_running
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_SMC_MSG@GOTPCREL(%rip), %r12
	movl	(%r12), %r15d
	movl	%r14d, %edi
	callq	_HOST_SMC_MSG
	movq	_HOST_SMC_MSG_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_WREG32_P
	cmpl	$0, (%r13)
	jle	LBB0_6
## %bb.3:
	xorl	%ebx, %ebx
	movq	_HOST_SMC_RESP_MASK@GOTPCREL(%rip), %r14
	movq	_HOST_SMC_RESP_SHIFT@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	callq	_RREG32
	andl	(%r14), %eax
	movzbl	(%r15), %ecx
	sarl	%cl, %eax
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	callq	_udelay
	incl	%ebx
	cmpl	(%r13), %ebx
	jl	LBB0_4
LBB0_6:
	movl	(%r12), %edi
	callq	_RREG32
	movq	_HOST_SMC_RESP_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_HOST_SMC_RESP_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	cltq
	jmp	LBB0_7
LBB0_1:
	movq	_PPSMC_Result_Failed@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PPSMC_Result_Failed,8,3        ## @PPSMC_Result_Failed
	.comm	_SMC_MSG,4,2                    ## @SMC_MSG
	.comm	_HOST_SMC_MSG_MASK,4,2          ## @HOST_SMC_MSG_MASK
	.comm	_HOST_SMC_RESP_MASK,4,2         ## @HOST_SMC_RESP_MASK
	.comm	_HOST_SMC_RESP_SHIFT,4,2        ## @HOST_SMC_RESP_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv770_send_msg_to_smc          ; -- Begin function rv770_send_msg_to_smc
	.p2align	2
_rv770_send_msg_to_smc:                 ; @rv770_send_msg_to_smc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	bl	_rv770_is_smc_running
	cbz	w0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x22, _SMC_MSG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SMC_MSG@GOTPAGEOFF]
	ldr	w21, [x22]
	mov	x0, x20
	bl	_HOST_SMC_MSG
	mov	x1, x0
Lloh2:
	adrp	x8, _HOST_SMC_MSG_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HOST_SMC_MSG_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	mvn	w2, w8
	mov	x0, x21
	bl	_WREG32_P
	ldr	w8, [x19]
Lloh5:
	adrp	x21, _HOST_SMC_RESP_MASK@GOTPAGE
Lloh6:
	ldr	x21, [x21, _HOST_SMC_RESP_MASK@GOTPAGEOFF]
Lloh7:
	adrp	x20, _HOST_SMC_RESP_SHIFT@GOTPAGE
Lloh8:
	ldr	x20, [x20, _HOST_SMC_RESP_SHIFT@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	w23, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_RREG32
	ldr	w8, [x21]
	and	w8, w8, w0
	ldr	w9, [x20]
	asr	w8, w8, w9
	cbnz	w8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_udelay
	add	w23, w23, #1
	ldr	w8, [x19]
	cmp	w23, w8
	b.lt	LBB0_3
LBB0_5:
	ldr	w0, [x22]
	bl	_RREG32
	ldr	w8, [x21]
	and	w8, w8, w0
	ldr	w9, [x20]
	asr	w8, w8, w9
	sxtw	x0, w8
	b	LBB0_7
LBB0_6:
Lloh9:
	adrp	x8, _PPSMC_Result_Failed@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PPSMC_Result_Failed@GOTPAGEOFF]
Lloh11:
	ldr	x0, [x8]
LBB0_7:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PPSMC_Result_Failed,8,3        ; @PPSMC_Result_Failed
	.comm	_SMC_MSG,4,2                    ; @SMC_MSG
	.comm	_HOST_SMC_MSG_MASK,4,2          ; @HOST_SMC_MSG_MASK
	.comm	_HOST_SMC_RESP_MASK,4,2         ; @HOST_SMC_RESP_MASK
	.comm	_HOST_SMC_RESP_SHIFT,4,2        ; @HOST_SMC_RESP_SHIFT
.subsections_via_symbols
