	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv770_populate_smc_t           ## -- Begin function rv770_populate_smc_t
	.p2align	4, 0x90
_rv770_populate_smc_t:                  ## @rv770_populate_smc_t
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, %rdi
	callq	_rv770_get_ps
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_rv770_get_pi
	movq	%rax, %r13
	movq	_RV770_SMC_PERFORMANCE_LEVELS_PER_SWSTATE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rbx
	movl	%ebx, %r12d
	shlq	$2, %r12
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movl	$0, (%r15)
	movl	$100, 8(%r12)
	movl	8(%r14), %r8d
	movl	16(%r14), %esi
	movl	(%r13), %r11d
	movl	4(%r13), %r9d
	movl	%r11d, %eax
	imull	%r8d, %eax
	movq	_R600_AH_DFLT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%edi, %edx
	subl	%r9d, %edx
	imull	%esi, %edx
	addl	%eax, %edx
	movl	$100, %ecx
	subl	%r9d, %ecx
	imull	%ecx, %esi
	addl	%eax, %esi
	imull	%edx, %ecx
	movl	%edx, %eax
	imull	%r11d, %eax
	cltd
	idivl	%esi
	subl	%eax, %r11d
	movl	$100, %r10d
	movl	%r11d, 4(%r15)
	movl	%ecx, %eax
	cltd
	idivl	%esi
	movl	%eax, %ecx
	addl	%r9d, %ecx
	movl	%ecx, (%r12)
	movl	8(%r13), %esi
	movl	12(%r13), %r9d
	movl	(%r14), %eax
	imull	%esi, %eax
	subl	%r9d, %edi
	imull	%r8d, %edi
	addl	%eax, %edi
	subl	%r9d, %r10d
	imull	%r10d, %r8d
	addl	%eax, %r8d
	imull	%edi, %r10d
	movl	%edi, %eax
	imull	%esi, %eax
	cltd
	idivl	%r8d
	subl	%eax, %esi
	movl	%r10d, %eax
	cltd
	idivl	%r8d
	addl	%r9d, %eax
	movl	%esi, 8(%r15)
	movl	%eax, 4(%r12)
	cmpq	$1, %rbx
	jle	LBB0_1
## %bb.4:
	movl	$1, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	imull	16(%r13), %ecx
	movslq	%ecx, %rax
	imulq	$1374389535, %rax, %rdi         ## imm = 0x51EB851F
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$38, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_CG_R
	movl	%eax, %ebx
	movl	16(%r13), %eax
	imull	-4(%r15,%r14,4), %eax
	cltq
	imulq	$1374389535, %rax, %rdi         ## imm = 0x51EB851F
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$38, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_CG_L
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	%rax, -8(%rcx,%r14,8)
	movq	_RV770_SMC_PERFORMANCE_LEVELS_PER_SWSTATE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rbx
	decq	%rbx
	cmpq	%rbx, %r14
	jge	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r12,%r14,4), %ecx
	incq	%r14
	jmp	LBB0_5
LBB0_1:
	decq	%rbx
LBB0_2:
	movl	20(%r13), %eax
	imull	(%r12,%rbx,4), %eax
	cltq
	imulq	$1374389535, %rax, %rdi         ## imm = 0x51EB851F
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$38, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_CG_R
	movl	%eax, %ebx
	movq	_RV770_SMC_PERFORMANCE_LEVELS_PER_SWSTATE@GOTPCREL(%rip), %r14
	movslq	(%r14), %rax
	movl	20(%r13), %ecx
	imull	-4(%r15,%rax,4), %ecx
	movslq	%ecx, %rax
	imulq	$1374389535, %rax, %rdi         ## imm = 0x51EB851F
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$38, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_CG_L
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movslq	(%r14), %rdx
	movq	%rax, -8(%rcx,%rdx,8)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_3
## %bb.7:
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RV770_SMC_PERFORMANCE_LEVELS_PER_SWSTATE,4,2 ## @RV770_SMC_PERFORMANCE_LEVELS_PER_SWSTATE
	.comm	_R600_AH_DFLT,4,2               ## @R600_AH_DFLT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv770_populate_smc_t           ; -- Begin function rv770_populate_smc_t
	.p2align	2
_rv770_populate_smc_t:                  ; @rv770_populate_smc_t
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #16
	mov	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	mov	x0, x1
	bl	_rv770_get_ps
	mov	x21, x0
	mov	x0, x20
	bl	_rv770_get_pi
	mov	x20, x0
Lloh3:
	adrp	x22, _RV770_SMC_PERFORMANCE_LEVELS_PER_SWSTATE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _RV770_SMC_PERFORMANCE_LEVELS_PER_SWSTATE@GOTPAGEOFF]
	ldr	w12, [x22]
	lsl	x8, x12, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x13, x10, #0x7fffffff0
	sub	x23, x9, x13
	mov	sp, x23
	mov	x9, x8
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x24, x8, x13
	mov	sp, x24
	mov	w9, #100
	str	w9, [x24, #8]
	ldr	w10, [x21, #8]
	ldp	w8, w11, [x0]
	mul	w13, w8, w10
	ldr	w14, [x21, #16]
Lloh9:
	adrp	x15, _R600_AH_DFLT@GOTPAGE
Lloh10:
	ldr	x15, [x15, _R600_AH_DFLT@GOTPAGEOFF]
Lloh11:
	ldr	w15, [x15]
	sub	w16, w15, w11
	madd	w16, w16, w14, w13
	sub	w17, w9, w11
	madd	w13, w17, w14, w13
	mul	w14, w16, w8
	sdiv	w14, w14, w13
	sub	w8, w8, w14
	stp	wzr, w8, [x23]
	mul	w8, w16, w17
	sdiv	w8, w8, w13
	add	w8, w8, w11
	ldr	w11, [x21]
	ldp	w13, w14, [x0, #8]
	mul	w11, w13, w11
	sub	w15, w15, w14
	madd	w15, w15, w10, w11
	sub	w9, w9, w14
	madd	w10, w9, w10, w11
	mul	w11, w15, w13
	sdiv	w11, w11, w10
	sub	w11, w13, w11
	str	w11, [x23, #8]
	mul	w9, w15, w9
	sdiv	w9, w9, w10
	add	w9, w9, w14
	stp	w8, w9, [x24]
	cmp	w12, #1
	b.le	LBB0_4
; %bb.1:
	mov	x26, #0
	add	x25, x24, #4
	mov	w27, #34079
	movk	w27, #20971, lsl #16
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x20, #16]
	mul	w8, w9, w8
	smull	x8, w8, w27
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w0, w8, w9
	bl	_CG_R
	mov	x21, x0
	ldr	w8, [x23, x26, lsl #2]
	ldr	w9, [x20, #16]
	mul	w8, w9, w8
	smull	x8, w8, w27
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w0, w8, w9
	bl	_CG_L
	orr	w0, w0, w21
	bl	_cpu_to_be32
	ldr	x8, [x19]
	str	x0, [x8, x26, lsl #3]
	add	x9, x26, #1
	ldrsw	x8, [x22]
	sub	x8, x8, #1
	cmp	x9, x8
	b.ge	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x25, x26, lsl #2]
	mov	x26, x9
	b	LBB0_2
LBB0_4:
	sxtw	x8, w12
	sub	x8, x8, #1
LBB0_5:
	ldr	w8, [x24, x8, lsl #2]
	ldr	w9, [x20, #20]
	mul	w8, w9, w8
	mov	w24, #34079
	movk	w24, #20971, lsl #16
	smull	x8, w8, w24
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w0, w8, w9
	bl	_CG_R
	mov	x21, x0
	ldrsw	x8, [x22]
	add	x8, x23, x8, lsl #2
	ldur	w8, [x8, #-4]
	ldr	w9, [x20, #20]
	mul	w8, w9, w8
	smull	x8, w8, w24
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w0, w8, w9
	bl	_CG_L
	orr	w0, w0, w21
	bl	_cpu_to_be32
	ldr	x8, [x19]
	ldrsw	x9, [x22]
	add	x8, x8, x9, lsl #3
	stur	x0, [x8, #-8]
	ldur	x8, [x29, #-88]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	w0, #0
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RV770_SMC_PERFORMANCE_LEVELS_PER_SWSTATE,4,2 ; @RV770_SMC_PERFORMANCE_LEVELS_PER_SWSTATE
	.comm	_R600_AH_DFLT,4,2               ; @R600_AH_DFLT
.subsections_via_symbols
