	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu_v11_0_get_max_sustainable_clock
_smu_v11_0_get_max_sustainable_clock:   ## @smu_v11_0_get_max_sustainable_clock
	.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
	xorl	%r15d, %r15d
	cmpl	$0, (%rdi)
	je	LBB0_12
## %bb.1:
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_SMU_MSG_GetDcModeMaxDpmFreq@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_smu_msg_get_index
	testq	%rax, %rax
	js	LBB0_12
## %bb.2:
	movq	_SMU_MSG_GetMaxDpmFreq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_smu_msg_get_index
	testq	%rax, %rax
	js	LBB0_12
## %bb.3:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_smu_clk_get_index
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	%eax, %r12d
	movl	(%r13), %esi
	shll	$16, %r12d
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_smu_send_smc_msg_with_param
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
LBB0_11:
	callq	_pr_err
	jmp	LBB0_12
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_12
LBB0_7:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_smu_read_smc_arg
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.8:
	cmpq	$0, (%r14)
	movl	$0, %r15d
	je	LBB0_9
LBB0_12:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_SMU_MSG_GetMaxDpmFreq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_smu_send_smc_msg_with_param
	testl	%eax, %eax
	je	LBB0_13
## %bb.10:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_11
LBB0_13:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_smu_read_smc_arg               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SMU_MSG_GetDcModeMaxDpmFreq,4,2 ## @SMU_MSG_GetDcModeMaxDpmFreq
	.comm	_SMU_MSG_GetMaxDpmFreq,4,2      ## @SMU_MSG_GetMaxDpmFreq
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[GetMaxSustainableClock] Failed to get max DC clock from SMC!"

L_.str.1:                               ## @.str.1
	.asciz	"[GetMaxSustainableClock] failed to get max AC clock from SMC!"

	.no_dead_strip	_smu_v11_0_get_max_sustainable_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smu_v11_0_get_max_sustainable_clock
_smu_v11_0_get_max_sustainable_clock:   ; @smu_v11_0_get_max_sustainable_clock
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_10
; %bb.1:
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _SMU_MSG_GetDcModeMaxDpmFreq@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SMU_MSG_GetDcModeMaxDpmFreq@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_smu_msg_get_index
	tbnz	x0, #63, LBB0_10
; %bb.2:
Lloh2:
	adrp	x23, _SMU_MSG_GetMaxDpmFreq@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SMU_MSG_GetMaxDpmFreq@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_smu_msg_get_index
	tbnz	x0, #63, LBB0_10
; %bb.3:
	mov	x0, x20
	mov	x1, x21
	bl	_smu_clk_get_index
	tbnz	w0, #31, LBB0_7
; %bb.4:
	ldr	w1, [x22]
	lsl	w22, w0, #16
	mov	x0, x20
	mov	x2, x22
	bl	_smu_send_smc_msg_with_param
	cbz	w0, LBB0_8
; %bb.5:
	mov	x21, x0
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
LBB0_6:
	bl	_pr_err
	b	LBB0_11
LBB0_7:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	bl	_smu_read_smc_arg
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.9:
	ldr	x8, [x19]
	cbz	x8, LBB0_12
LBB0_10:
	mov	w21, #0
LBB0_11:
	mov	x0, x21
	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
LBB0_12:
	ldr	w1, [x23]
	mov	x0, x20
	mov	x2, x22
	bl	_smu_send_smc_msg_with_param
	cbz	w0, LBB0_14
; %bb.13:
	mov	x21, x0
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_14:
	mov	x0, x20
	mov	x1, x19
	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
	b	_smu_read_smc_arg
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SMU_MSG_GetDcModeMaxDpmFreq,4,2 ; @SMU_MSG_GetDcModeMaxDpmFreq
	.comm	_SMU_MSG_GetMaxDpmFreq,4,2      ; @SMU_MSG_GetMaxDpmFreq
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[GetMaxSustainableClock] Failed to get max DC clock from SMC!"

l_.str.1:                               ; @.str.1
	.asciz	"[GetMaxSustainableClock] failed to get max AC clock from SMC!"

	.no_dead_strip	_smu_v11_0_get_max_sustainable_clock
.subsections_via_symbols
