	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smu7_send_msg_to_smc           ## -- Begin function smu7_send_msg_to_smc
	.p2align	4, 0x90
_smu7_send_msg_to_smc:                  ## @smu7_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_SMC_RESP_0@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_SMC_RESP@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	xorl	%ecx, %ecx
	callq	_PHM_WAIT_FIELD_UNEQUAL
	movl	(%rbx), %edi
	movl	(%r15), %esi
	movl	(%r12), %edx
	callq	_PHM_READ_FIELD
	cmpl	$1, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$254, %eax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_info
LBB0_4:
	movl	(%rbx), %edi
	movq	_mmSMC_RESP_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_cgs_write_register
	movl	(%rbx), %edi
	movq	_mmSMC_MESSAGE_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_cgs_write_register
	movl	(%r15), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_PHM_WAIT_FIELD_UNEQUAL
	movl	(%rbx), %edi
	movl	(%r15), %esi
	movl	(%r12), %edx
	callq	_PHM_READ_FIELD
	cmpl	$1, %eax
	je	LBB0_8
## %bb.5:
	cmpl	$254, %eax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pr_info
LBB0_8:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMC_RESP_0,4,2                 ## @SMC_RESP_0
	.comm	_SMC_RESP,4,2                   ## @SMC_RESP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"last message was not supported\n"

L_.str.1:                               ## @.str.1
	.asciz	"\n last message was failed ret is %d\n"

	.comm	_mmSMC_RESP_0,4,2               ## @mmSMC_RESP_0
	.comm	_mmSMC_MESSAGE_0,4,2            ## @mmSMC_MESSAGE_0
L_.str.2:                               ## @.str.2
	.asciz	"message %x was not supported\n"

L_.str.3:                               ## @.str.3
	.asciz	"\n failed to send message %x ret is %d \n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smu7_send_msg_to_smc           ; -- Begin function smu7_send_msg_to_smc
	.p2align	2
_smu7_send_msg_to_smc:                  ; @smu7_send_msg_to_smc
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _SMC_RESP_0@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SMC_RESP_0@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x22, _SMC_RESP@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SMC_RESP@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w3, #0
	bl	_PHM_WAIT_FIELD_UNEQUAL
	ldr	w0, [x20]
	ldr	w1, [x21]
	ldr	w2, [x22]
	bl	_PHM_READ_FIELD
	cmp	w0, #1
	b.eq	LBB0_4
; %bb.1:
	mov	x1, x0
	cmp	w0, #254
	b.ne	LBB0_3
; %bb.2:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
LBB0_4:
	ldr	w0, [x20]
Lloh8:
	adrp	x8, _mmSMC_RESP_0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mmSMC_RESP_0@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_cgs_write_register
	ldr	w0, [x20]
Lloh11:
	adrp	x8, _mmSMC_MESSAGE_0@GOTPAGE
Lloh12:
	ldr	x8, [x8, _mmSMC_MESSAGE_0@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_cgs_write_register
	ldr	w1, [x21]
	ldr	w2, [x22]
	mov	x0, x20
	mov	w3, #0
	bl	_PHM_WAIT_FIELD_UNEQUAL
	ldr	w0, [x20]
	ldr	w1, [x21]
	ldr	w2, [x22]
	bl	_PHM_READ_FIELD
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, #1
	b.eq	LBB0_8
; %bb.5:
	cmp	w0, #254
	b.ne	LBB0_7
; %bb.6:
	str	x19, [sp]
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_debug
	b	LBB0_8
LBB0_7:
	str	x0, [sp]
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_pr_info
LBB0_8:
	mov	w0, #0
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SMC_RESP_0,4,2                 ; @SMC_RESP_0
	.comm	_SMC_RESP,4,2                   ; @SMC_RESP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"last message was not supported\n"

l_.str.1:                               ; @.str.1
	.asciz	"\n last message was failed ret is %d\n"

	.comm	_mmSMC_RESP_0,4,2               ; @mmSMC_RESP_0
	.comm	_mmSMC_MESSAGE_0,4,2            ; @mmSMC_MESSAGE_0
l_.str.2:                               ; @.str.2
	.asciz	"message %x was not supported\n"

l_.str.3:                               ; @.str.3
	.asciz	"\n failed to send message %x ret is %d \n"

.subsections_via_symbols
