	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_get_pp_cur_state
_amdgpu_get_pp_cur_state:               ## @amdgpu_get_pp_cur_state
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	callq	_dev_get_drvdata
	movq	(%rax), %r15
	movq	%r15, %rdi
	callq	_is_support_sw_smu
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	addq	$8, %r15
	movq	%r15, %rdi
	callq	_smu_get_current_power_state
	movl	%eax, %ebx
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	_smu_get_power_num_states
	testl	%eax, %eax
	jne	LBB0_11
	jmp	LBB0_5
LBB0_2:
	movq	(%r15), %rax
	xorl	%ebx, %ebx
	cmpq	$0, 8(%rax)
	je	LBB0_5
## %bb.3:
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_amdgpu_dpm_get_current_power_state
	movl	%eax, %ebx
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	_amdgpu_dpm_get_pp_num_states
LBB0_5:
	movl	-40(%rbp), %eax
	xorl	%ecx, %ecx
	movl	$0, %edx
	testl	%eax, %eax
	jle	LBB0_10
## %bb.6:
	movq	-32(%rbp), %rsi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	(%rsi,%rdx,4), %ebx
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_7
## %bb.9:
	movl	%eax, %edx
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rsi
	subl	(%rsi), %ecx
	cmpl	%eax, %edx
	cmovnel	%edx, %ecx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_snprintf
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d\n"

	.no_dead_strip	_amdgpu_get_pp_cur_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_get_pp_cur_state
_amdgpu_get_pp_cur_state:               ; @amdgpu_get_pp_cur_state
	.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, x2
	bl	_dev_get_drvdata
	ldr	x21, [x0]
	mov	x0, x21
	bl	_is_support_sw_smu
	cbz	x0, LBB0_2
; %bb.1:
	add	x21, x21, #8
	mov	x0, x21
	bl	_smu_get_current_power_state
	mov	x20, x0
	mov	x1, sp
	mov	x0, x21
	bl	_smu_get_power_num_states
	cbnz	w0, LBB0_13
	b	LBB0_6
LBB0_2:
	ldr	x8, [x21]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_5
; %bb.3:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x21
	bl	_amdgpu_dpm_get_current_power_state
	mov	x20, x0
	mov	x1, sp
	mov	x0, x21
	bl	_amdgpu_dpm_get_pp_num_states
	b	LBB0_6
LBB0_5:
	mov	w20, #0
LBB0_6:
	ldr	w8, [sp]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:
	mov	x9, #0
	ldr	x10, [sp, #8]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, x9, lsl #2]
	cmp	w20, w11
	b.eq	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.10:
	mov	x9, x8
	b	LBB0_12
LBB0_11:
	mov	w9, #0
LBB0_12:
Lloh0:
	adrp	x10, _EINVAL@GOTPAGE
Lloh1:
	ldr	x10, [x10, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	cmp	w9, w8
	csneg	w3, w9, w10, ne
Lloh3:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_snprintf
LBB0_13:
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d\n"

	.no_dead_strip	_amdgpu_get_pp_cur_state
.subsections_via_symbols
