	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu10_start_smu
_smu10_start_smu:                       ## @smu10_start_smu
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	_PPSMC_MSG_GetSmuVersion@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_smum_send_msg_to_smc
	movq	%rbx, %rdi
	callq	_smu10_read_arg_from_smc
	movl	%eax, (%rbx)
	movl	%eax, %ecx
	sarl	$8, %ecx
	movl	%ecx, 4(%r14)
	cmpl	$7, (%r14)
	jg	LBB0_4
## %bb.1:
	movq	16(%r14), %rcx
	cmpl	$5592, (%rcx)                   ## imm = 0x15D8
	je	LBB0_4
## %bb.2:
	cmpl	$1983743, %eax                  ## imm = 0x1E44FF
	jg	LBB0_4
## %bb.3:
	movq	_PP_GFXOFF_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 8(%r14)
LBB0_4:
	movq	%rbx, %rdi
	callq	_smu10_verify_smc_interface
	movq	_EINVAL@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	xorl	%edx, %edx
	testq	%rax, %rax
	cmovel	%edx, %ecx
	movl	%ecx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PPSMC_MSG_GetSmuVersion,4,2    ## @PPSMC_MSG_GetSmuVersion
	.comm	_PP_GFXOFF_MASK,4,2             ## @PP_GFXOFF_MASK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_smu10_start_smu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smu10_start_smu
_smu10_start_smu:                       ; @smu10_start_smu
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x8, _PPSMC_MSG_GetSmuVersion@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PPSMC_MSG_GetSmuVersion@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_smum_send_msg_to_smc
	mov	x0, x19
	bl	_smu10_read_arg_from_smc
	str	w0, [x19]
	asr	w8, w0, #8
	str	w8, [x20, #4]
	ldr	w8, [x20]
	cmp	w8, #7
	b.gt	LBB0_3
; %bb.1:
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
	mov	w9, #5592
	cmp	w8, w9
	mov	w8, #17663
	movk	w8, #30, lsl #16
	ccmp	w0, w8, #0, ne
	b.gt	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _PP_GFXOFF_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PP_GFXOFF_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	bic	w8, w9, w8
	str	w8, [x20, #8]
LBB0_3:
	mov	x0, x19
	bl	_smu10_verify_smc_interface
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	x0, #0
	csneg	w0, wzr, w8, eq
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PPSMC_MSG_GetSmuVersion,4,2    ; @PPSMC_MSG_GetSmuVersion
	.comm	_PP_GFXOFF_MASK,4,2             ; @PP_GFXOFF_MASK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_smu10_start_smu
.subsections_via_symbols
