	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ni_parse_pplib_clock_info
_ni_parse_pplib_clock_info:             ## @ni_parse_pplib_clock_info
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movl	%edx, %r14d
	movq	%rsi, %r13
	movq	%rdi, %rbx
	callq	_rv770_get_pi
	movq	%rax, %r15
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_evergreen_get_pi
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_ni_get_ps
	movq	8(%rax), %r13
	movslq	%r14d, %rcx
	leaq	(%rcx,%rcx,2), %r14
	incl	%ecx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, (%rax)
	movl	24(%r12), %edi
	callq	_le16_to_cpu
	movl	%eax, (%r13,%r14,8)
	movl	(%r12), %ecx
	shll	$16, %ecx
	orl	%eax, %ecx
	movl	%ecx, (%r13,%r14,8)
	movl	20(%r12), %edi
	callq	_le16_to_cpu
	movl	%eax, 4(%r13,%r14,8)
	movl	4(%r12), %ecx
	shll	$16, %ecx
	orl	%eax, %ecx
	movl	%ecx, 4(%r13,%r14,8)
	movl	16(%r12), %edi
	callq	_le16_to_cpu
	leaq	8(,%r14,8), %rcx
	addq	%r13, %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%eax, 8(%r13,%r14,8)
	movl	12(%r12), %edi
	callq	_le16_to_cpu
	movq	%rax, 16(%r13,%r14,8)
	movl	8(%r12), %edi
	callq	_le32_to_cpu
	movl	%eax, 12(%r13,%r14,8)
	movl	8(%r13,%r14,8), %eax
	cmpl	$65281, %eax                    ## imm = 0xFF01
	jne	LBB0_4
## %bb.1:
	movl	(%r15), %eax
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_4
LBB0_2:
	movl	$65281, %eax                    ## imm = 0xFF01
LBB0_4:
	leaq	16(,%r14,8), %r9
	addq	%r13, %r9
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movl	(%r8), %ecx
	movq	_ATOM_PPLIB_CLASSIFICATION_ACPI@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_6
## %bb.5:
	movl	%eax, 4(%r15)
	movq	(%r9), %rdx
	movq	%rdx, 16(%rbx)
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rdx), %rdx
	movq	_ATOM_PPLIB_R600_FLAGS_PCIEGEN2@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	xorl	%edi, %edi
	andl	12(%rdx), %esi
	setne	%dil
	movl	%edi, 8(%r15)
LBB0_6:
	leaq	(,%r14,8), %r12
	addq	%r13, %r12
	movq	_ATOM_PPLIB_CLASSIFICATION2_ULV@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 4(%r8)
	je	LBB0_8
## %bb.7:
	movl	$1, (%rbx)
	movq	%r12, 8(%rbx)
LBB0_8:
	cmpl	%eax, 12(%r15)
	jle	LBB0_10
## %bb.9:
	movl	%eax, 12(%r15)
LBB0_10:
	cmpl	%eax, 16(%r15)
	jge	LBB0_12
## %bb.11:
	movl	%eax, 16(%r15)
LBB0_12:
	leaq	4(,%r14,8), %r14
	addq	%r13, %r14
	movq	_ATOM_PPLIB_CLASSIFICATION_BOOT@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_14
## %bb.13:
	leaq	-96(%rbp), %rsi
	leaq	-88(%rbp), %rdx
	leaq	-104(%rbp), %rcx
	movq	%r15, %rdi
	movq	%r8, %r13
	movq	%r9, %rbx
	callq	_radeon_atombios_get_default_voltages
	movq	%rbx, %r9
	movl	24(%r15), %eax
	movl	%eax, (%r14)
	movl	28(%r15), %eax
	movl	%eax, (%r12)
	movl	-96(%rbp), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	-88(%rbp), %rax
	movq	%rax, (%rbx)
	movl	(%r13), %ecx
LBB0_14:
	movq	_ATOM_PPLIB_CLASSIFICATION_UI_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ecx
	movq	_ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_16
## %bb.15:
	movl	(%r12), %eax
	movl	%eax, (%r15)
	movl	(%r14), %eax
	movl	%eax, 4(%r15)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	(%r9), %rax
	movq	%rax, 16(%r15)
LBB0_16:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATOM_PPLIB_CLASSIFICATION_ACPI,4,2 ## @ATOM_PPLIB_CLASSIFICATION_ACPI
	.comm	_ATOM_PPLIB_R600_FLAGS_PCIEGEN2,4,2 ## @ATOM_PPLIB_R600_FLAGS_PCIEGEN2
	.comm	_ATOM_PPLIB_CLASSIFICATION2_ULV,4,2 ## @ATOM_PPLIB_CLASSIFICATION2_ULV
	.comm	_ATOM_PPLIB_CLASSIFICATION_BOOT,4,2 ## @ATOM_PPLIB_CLASSIFICATION_BOOT
	.comm	_ATOM_PPLIB_CLASSIFICATION_UI_MASK,4,2 ## @ATOM_PPLIB_CLASSIFICATION_UI_MASK
	.comm	_ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE,4,2 ## @ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE
	.no_dead_strip	_ni_parse_pplib_clock_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ni_parse_pplib_clock_info
_ni_parse_pplib_clock_info:             ; @ni_parse_pplib_clock_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x3
	mov	x25, x2
	mov	x20, x1
	mov	x19, x0
	bl	_rv770_get_pi
	mov	x21, x0
	mov	x0, x19
	bl	_evergreen_get_pi
	mov	x22, x0
	mov	x0, x20
	bl	_ni_get_ps
	mov	x23, x0
	ldr	x8, [x0, #8]
	mov	w9, #24
	smaddl	x26, w25, w9, x8
	add	w8, w25, #1
	str	w8, [x0]
	ldr	w0, [x24, #24]
	bl	_le16_to_cpu
	str	w0, [x26]
	ldr	w8, [x24]
	orr	w8, w0, w8, lsl #16
	str	w8, [x26]
	ldr	w0, [x24, #20]
	bl	_le16_to_cpu
	str	w0, [x26, #4]
	ldr	w8, [x24, #4]
	orr	w8, w0, w8, lsl #16
	str	w8, [x26, #4]
	ldr	w0, [x24, #16]
	bl	_le16_to_cpu
	mov	x25, x26
	str	w0, [x25, #8]!
	ldr	w0, [x24, #12]
	bl	_le16_to_cpu
	mov	x27, x26
	str	x0, [x27, #16]!
	ldr	w0, [x24, #8]
	bl	_le32_to_cpu
	str	w0, [x26, #12]
	ldr	w8, [x25]
	mov	w9, #65281
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.1:
	ldr	w8, [x21]
	cbz	w8, LBB0_3
; %bb.2:
	str	w8, [x25]
	b	LBB0_4
LBB0_3:
	mov	w8, #65281
LBB0_4:
	ldr	w9, [x20]
Lloh0:
	adrp	x10, _ATOM_PPLIB_CLASSIFICATION_ACPI@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ATOM_PPLIB_CLASSIFICATION_ACPI@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_6
; %bb.5:
	str	w8, [x21, #4]
	ldr	x10, [x27]
	str	x10, [x22, #16]
	ldr	x10, [x23, #8]
	ldr	w10, [x10, #12]
Lloh3:
	adrp	x11, _ATOM_PPLIB_R600_FLAGS_PCIEGEN2@GOTPAGE
Lloh4:
	ldr	x11, [x11, _ATOM_PPLIB_R600_FLAGS_PCIEGEN2@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	tst	w11, w10
	cset	w10, ne
	str	w10, [x21, #8]
LBB0_6:
	ldr	w10, [x20, #4]
Lloh6:
	adrp	x11, _ATOM_PPLIB_CLASSIFICATION2_ULV@GOTPAGE
Lloh7:
	ldr	x11, [x11, _ATOM_PPLIB_CLASSIFICATION2_ULV@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_8
; %bb.7:
	mov	w10, #1
	str	w10, [x22]
	str	x26, [x22, #8]
LBB0_8:
	ldr	w10, [x21, #12]
	cmp	w10, w8
	b.le	LBB0_10
; %bb.9:
	str	w8, [x21, #12]
LBB0_10:
	ldr	w10, [x21, #16]
	cmp	w10, w8
	b.ge	LBB0_12
; %bb.11:
	str	w8, [x21, #16]
LBB0_12:
Lloh9:
	adrp	x8, _ATOM_PPLIB_CLASSIFICATION_BOOT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATOM_PPLIB_CLASSIFICATION_BOOT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w9
	b.eq	LBB0_14
; %bb.13:
	add	x1, sp, #24
	add	x2, sp, #16
	add	x3, sp, #8
	mov	x0, x19
	bl	_radeon_atombios_get_default_voltages
	ldr	d0, [x19, #24]
	rev64.2s	v0, v0
	str	d0, [x26]
	ldr	x8, [sp, #24]
	str	w8, [x25]
	ldr	x8, [sp, #16]
	str	x8, [x27]
	ldr	w9, [x20]
LBB0_14:
Lloh12:
	adrp	x8, _ATOM_PPLIB_CLASSIFICATION_UI_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ATOM_PPLIB_CLASSIFICATION_UI_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	and	w8, w8, w9
Lloh15:
	adrp	x9, _ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_16
; %bb.15:
	ldr	d0, [x26]
	str	d0, [x19]
	ldr	w8, [x25]
	str	w8, [x19, #8]
	ldr	x8, [x27]
	str	x8, [x19, #16]
LBB0_16:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ATOM_PPLIB_CLASSIFICATION_ACPI,4,2 ; @ATOM_PPLIB_CLASSIFICATION_ACPI
	.comm	_ATOM_PPLIB_R600_FLAGS_PCIEGEN2,4,2 ; @ATOM_PPLIB_R600_FLAGS_PCIEGEN2
	.comm	_ATOM_PPLIB_CLASSIFICATION2_ULV,4,2 ; @ATOM_PPLIB_CLASSIFICATION2_ULV
	.comm	_ATOM_PPLIB_CLASSIFICATION_BOOT,4,2 ; @ATOM_PPLIB_CLASSIFICATION_BOOT
	.comm	_ATOM_PPLIB_CLASSIFICATION_UI_MASK,4,2 ; @ATOM_PPLIB_CLASSIFICATION_UI_MASK
	.comm	_ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE,4,2 ; @ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE
	.no_dead_strip	_ni_parse_pplib_clock_info
.subsections_via_symbols
