	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pp_tables_get_entry            ## -- Begin function pp_tables_get_entry
	.p2align	4, 0x90
_pp_tables_get_entry:                   ## @pp_tables_get_entry
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_get_powerplay_table
	movl	$-1, %r12d
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	%rax, %r13
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, 8(%r14)
	cmpl	$6, 36(%rax)
	jl	LBB0_6
## %bb.2:
	movl	32(%r13), %edi
	callq	_le16_to_cpu
	cmpq	%rbx, (%rax,%r13)
	jb	LBB0_13
## %bb.3:
	addq	%r13, %rax
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_get_state_entry_v2
	movq	%r15, %rbx
	movq	%rax, %r15
	movl	24(%r13), %edi
	callq	_le16_to_cpu
	movq	%rax, %r14
	movl	28(%r13), %edi
	callq	_le16_to_cpu
	movq	(%rax,%r13), %rdx
	movq	(%r15), %rcx
	imulq	%rdx, %rcx
	addq	8(%rax,%r13), %rcx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_init_non_clock_fields
	movl	%eax, %r12d
	cmpl	$0, 8(%r15)
	jle	LBB0_10
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	movq	(%r13,%r14), %rcx
	imulq	(%rax,%rbx,8), %rcx
	addq	8(%r13,%r14), %rcx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	*-64(%rbp)                      ## 8-byte Folded Reload
	testl	%eax, %eax
	cmovel	%r12d, %eax
	testl	%r12d, %r12d
	cmovel	%eax, %r12d
	incq	%rbx
	movslq	8(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
	jmp	LBB0_10
LBB0_6:
	cmpq	%rbx, (%r13)
	jb	LBB0_13
## %bb.7:
	movl	32(%r13), %edi
	callq	_le16_to_cpu
	movq	%rax, %r14
	addq	%r13, %r14
	imulq	8(%r13), %rbx
	movl	28(%r13), %edi
	callq	_le16_to_cpu
	addq	%r13, %rax
	movq	%r15, %rdi
	movq	%r14, %r15
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movslq	(%rbx,%r14), %rcx
	movslq	16(%r13), %rdx
	imulq	%rdx, %rcx
	addq	%rax, %rcx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_init_non_clock_fields
	movl	%eax, %r12d
	cmpq	$1, 8(%r13)
	je	LBB0_10
## %bb.8:
	xorl	%ebx, %ebx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	24(%r13), %edi
	callq	_le16_to_cpu
	addq	%r13, %rax
	movq	8(%r14,%r15), %rcx
	movslq	(%rcx,%rbx,4), %rdx
	movslq	20(%r13), %rcx
	imulq	%rdx, %rcx
	addq	%rax, %rcx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	*-64(%rbp)                      ## 8-byte Folded Reload
	testl	%eax, %eax
	cmovel	%r12d, %eax
	testl	%r12d, %r12d
	cmovel	%eax, %r12d
	incq	%rbx
	movq	8(%r13), %rax
	decq	%rax
	cmpq	%rbx, %rax
	ja	LBB0_9
LBB0_10:
	testl	%r12d, %r12d
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_11
LBB0_13:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_PP_StateClassificationFlag_Boot@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r12d, %r12d
	testl	%eax, 16(%rsi)
	je	LBB0_13
## %bb.12:
	movq	(%rdi), %rax
	movq	_AMDGPU_FAMILY_RV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_13
## %bb.14:
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PP_StateClassificationFlag_Boot,4,2 ## @PP_StateClassificationFlag_Boot
	.comm	_AMDGPU_FAMILY_RV,8,3           ## @AMDGPU_FAMILY_RV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pp_tables_get_entry            ; -- Begin function pp_tables_get_entry
	.p2align	2
_pp_tables_get_entry:                   ; @pp_tables_get_entry
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x3
	mov	x19, x2
	mov	x23, x1
	mov	x20, x0
	bl	_get_powerplay_table
	cbz	x0, LBB0_7
; %bb.1:
	mov	x22, x0
	str	x23, [x19, #8]
	ldr	w8, [x0, #36]
	cmp	w8, #6
	b.lt	LBB0_6
; %bb.2:
	ldr	w0, [x22, #32]
	bl	_le16_to_cpu
	add	x0, x0, x22
	ldr	x8, [x0]
	cmp	x8, x23
	b.lo	LBB0_7
; %bb.3:
	mov	x1, x23
	bl	_get_state_entry_v2
	mov	x24, x0
	ldr	w0, [x22, #24]
	bl	_le16_to_cpu
	mov	x26, x0
	ldr	w0, [x22, #28]
	bl	_le16_to_cpu
	add	x8, x0, x22
	ldr	x9, [x24]
	ldp	x2, x10, [x8]
	madd	x3, x2, x9, x10
	mov	x0, x20
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_init_non_clock_fields
	mov	x23, x0
	ldr	w8, [x24, #8]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.4:
	mov	x25, #0
	add	x22, x26, x22
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24, #16]
	ldr	x8, [x8, x25, lsl #3]
	ldp	x10, x9, [x22]
	madd	x3, x10, x8, x9
	mov	x0, x20
	mov	x1, x19
	mov	x2, x25
	blr	x21
	cmp	w0, #0
	ccmp	w23, #0, #0, ne
	csel	w23, w0, w23, eq
	add	x25, x25, #1
	ldrsw	x8, [x24, #8]
	cmp	x25, x8
	b.lt	LBB0_5
	b	LBB0_11
LBB0_6:
	ldr	x8, [x22]
	cmp	x8, x23
	b.hs	LBB0_8
LBB0_7:
	mov	w23, #-1
	b	LBB0_16
LBB0_8:
	ldr	w0, [x22, #32]
	bl	_le16_to_cpu
	add	x8, x0, x22
	ldr	x9, [x22, #8]
	madd	x25, x9, x23, x8
	ldr	w0, [x22, #28]
	bl	_le16_to_cpu
	add	x8, x0, x22
	ldrsw	x9, [x25]
	ldrsw	x2, [x22, #16]
	madd	x3, x2, x9, x8
	mov	x0, x20
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_init_non_clock_fields
	mov	x23, x0
	ldr	x8, [x22, #8]
	cmp	x8, #1
	b.eq	LBB0_11
; %bb.9:
	mov	x24, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22, #24]
	bl	_le16_to_cpu
	add	x8, x0, x22
	ldr	x9, [x25, #8]
	ldrsw	x9, [x9, x24, lsl #2]
	ldrsw	x10, [x22, #20]
	madd	x3, x10, x9, x8
	mov	x0, x20
	mov	x1, x19
	mov	x2, x24
	blr	x21
	cmp	w0, #0
	ccmp	w23, #0, #0, ne
	csel	w23, w0, w23, eq
	add	x24, x24, #1
	ldr	x8, [x22, #8]
	sub	x8, x8, #1
	cmp	x8, x24
	b.hi	LBB0_10
LBB0_11:
	cbnz	w23, LBB0_16
; %bb.12:
	ldr	w8, [x19, #16]
Lloh0:
	adrp	x9, _PP_StateClassificationFlag_Boot@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PP_StateClassificationFlag_Boot@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.13:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _AMDGPU_FAMILY_RV@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AMDGPU_FAMILY_RV@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_15
; %bb.14:
	ldr	x8, [x20, #8]
	ldr	x2, [x8]
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	br	x2
LBB0_15:
	mov	w23, #0
LBB0_16:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PP_StateClassificationFlag_Boot,4,2 ; @PP_StateClassificationFlag_Boot
	.comm	_AMDGPU_FAMILY_RV,8,3           ; @AMDGPU_FAMILY_RV
.subsections_via_symbols
