	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atombios_get_asic_ss_info ## -- Begin function amdgpu_atombios_get_asic_ss_info
	.p2align	4, 0x90
_amdgpu_atombios_get_asic_ss_info:      ## @amdgpu_atombios_get_asic_ss_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ASIC_InternalSS_Info@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetIndexIntoMasterTable
	movl	%eax, %r14d
	movq	_ASIC_INTERNAL_MEMORY_SS@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_ATOM_BIOS_INFO_MEMORY_CLOCK_SS_SUPPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r13)
	je	LBB0_34
LBB0_2:
	movq	_ASIC_INTERNAL_ENGINE_SS@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_4
## %bb.3:
	movq	_ATOM_BIOS_INFO_ENGINE_CLOCK_SS_SUPPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r13)
	je	LBB0_34
LBB0_4:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	16(%r13), %rdi
	leaq	-56(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	leaq	-44(%rbp), %r8
	leaq	-80(%rbp), %r9
	movl	%r14d, %esi
	callq	_amdgpu_atom_parse_data_header
	testq	%rax, %rax
	je	LBB0_34
## %bb.5:
	movq	16(%r13), %rax
	movq	(%rax), %rax
	movq	-80(%rbp), %rcx
	movl	-60(%rbp), %esi
	cmpl	$3, %esi
	je	LBB0_23
## %bb.6:
	cmpl	$2, %esi
	je	LBB0_14
## %bb.7:
	cmpl	$1, %esi
	jne	LBB0_33
## %bb.8:
	movabsq	$17179869180, %r14              ## imm = 0x3FFFFFFFC
	addq	-56(%rbp), %r14
	shrq	$2, %r14
	testl	%r14d, %r14d
	jle	LBB0_34
## %bb.9:
	movq	%rbx, %r13
	movq	(%rax,%rcx), %rbx
	addq	$16, %rbx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	addq	$16, %rbx
	decl	%r14d
	je	LBB0_34
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%r15d, -16(%rbx)
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	(%rbx), %edi
	callq	_le32_to_cpu
	cmpl	%r12d, %eax
	jl	LBB0_13
## %bb.12:
	movl	-4(%rbx), %edi
	callq	_le16_to_cpu
	movq	%rax, 16(%r13)
	movl	-12(%rbx), %eax
	movl	%eax, (%r13)
	movl	-8(%rbx), %edi
	callq	_le16_to_cpu
	movl	%eax, 4(%r13)
	movl	$100, 8(%r13)
	movl	$1, %ebx
	jmp	LBB0_35
LBB0_23:
	movabsq	$17179869180, %r14              ## imm = 0x3FFFFFFFC
	addq	-56(%rbp), %r14
	shrq	$2, %r14
	testl	%r14d, %r14d
	jle	LBB0_34
## %bb.24:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	(%rax,%rcx), %rbx
	addq	$16, %rbx
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_25 Depth=1
	addq	$16, %rbx
	decl	%r14d
	je	LBB0_34
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%r15d, -16(%rbx)
	jne	LBB0_32
## %bb.26:                              ##   in Loop: Header=BB0_25 Depth=1
	movl	(%rbx), %edi
	callq	_le32_to_cpu
	cmpl	%r12d, %eax
	jl	LBB0_32
## %bb.27:
	movl	-4(%rbx), %edi
	callq	_le16_to_cpu
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%rax, 16(%r14)
	movl	-12(%rbx), %eax
	movl	%eax, (%r14)
	movl	-8(%rbx), %edi
	callq	_le16_to_cpu
	movl	%eax, 4(%r14)
	movq	_SS_MODE_V3_PERCENTAGE_DIV_BY_1000_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	-12(%rbx), %ecx
	movq	%r14, %rsi
	movl	$100, %ecx
	movl	$1000, %edx                     ## imm = 0x3E8
	cmovel	%ecx, %edx
	movl	%edx, 8(%r14)
	movq	_ASIC_INTERNAL_ENGINE_SS@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	je	LBB0_29
## %bb.28:
	movq	_ASIC_INTERNAL_MEMORY_SS@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jne	LBB0_30
LBB0_29:
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	movl	%eax, 4(%rsi)
LBB0_30:
	movq	_AMD_IS_APU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$1, %ebx
	testl	%eax, (%r13)
	je	LBB0_35
## %bb.31:
	movq	%r13, %rdi
	movl	%r15d, %edx
	callq	_amdgpu_atombios_get_igp_ss_overrides
	jmp	LBB0_35
LBB0_14:
	movabsq	$17179869180, %r14              ## imm = 0x3FFFFFFFC
	addq	-56(%rbp), %r14
	shrq	$2, %r14
	testl	%r14d, %r14d
	jle	LBB0_34
## %bb.15:
	movq	%rbx, %r13
	movq	(%rax,%rcx), %rbx
	addq	$16, %rbx
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_16 Depth=1
	addq	$16, %rbx
	decl	%r14d
	je	LBB0_34
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%r15d, -16(%rbx)
	jne	LBB0_22
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	(%rbx), %edi
	callq	_le32_to_cpu
	cmpl	%r12d, %eax
	jl	LBB0_22
## %bb.18:
	movl	-4(%rbx), %edi
	callq	_le16_to_cpu
	movq	%rax, 16(%r13)
	movl	-12(%rbx), %eax
	movl	%eax, (%r13)
	movl	-8(%rbx), %edi
	callq	_le16_to_cpu
	movl	%eax, 4(%r13)
	movl	$100, 8(%r13)
	movl	$1, %ebx
	cmpl	$2, -44(%rbp)
	jne	LBB0_35
## %bb.19:
	movq	_ASIC_INTERNAL_ENGINE_SS@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	je	LBB0_21
## %bb.20:
	movq	_ASIC_INTERNAL_MEMORY_SS@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jne	LBB0_35
LBB0_21:
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	movl	%eax, 4(%r13)
	jmp	LBB0_35
LBB0_33:
	movl	-44(%rbp), %edx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_34:
	xorl	%ebx, %ebx
LBB0_35:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DATA,4,2                       ## @DATA
	.comm	_ASIC_InternalSS_Info,4,2       ## @ASIC_InternalSS_Info
	.comm	_ASIC_INTERNAL_MEMORY_SS,4,2    ## @ASIC_INTERNAL_MEMORY_SS
	.comm	_ATOM_BIOS_INFO_MEMORY_CLOCK_SS_SUPPORT,4,2 ## @ATOM_BIOS_INFO_MEMORY_CLOCK_SS_SUPPORT
	.comm	_ASIC_INTERNAL_ENGINE_SS,4,2    ## @ASIC_INTERNAL_ENGINE_SS
	.comm	_ATOM_BIOS_INFO_ENGINE_CLOCK_SS_SUPPORT,4,2 ## @ATOM_BIOS_INFO_ENGINE_CLOCK_SS_SUPPORT
	.comm	_SS_MODE_V3_PERCENTAGE_DIV_BY_1000_MASK,4,2 ## @SS_MODE_V3_PERCENTAGE_DIV_BY_1000_MASK
	.comm	_AMD_IS_APU,4,2                 ## @AMD_IS_APU
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported ASIC_InternalSS_Info table: %d %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atombios_get_asic_ss_info ; -- Begin function amdgpu_atombios_get_asic_ss_info
	.p2align	2
_amdgpu_atombios_get_asic_ss_info:      ; @amdgpu_atombios_get_asic_ss_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _ASIC_InternalSS_Info@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ASIC_InternalSS_Info@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_GetIndexIntoMasterTable
	mov	x23, x0
Lloh6:
	adrp	x24, _ASIC_INTERNAL_MEMORY_SS@GOTPAGE
Lloh7:
	ldr	x24, [x24, _ASIC_INTERNAL_MEMORY_SS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, w20
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x22, #8]
Lloh8:
	adrp	x9, _ATOM_BIOS_INFO_MEMORY_CLOCK_SS_SUPPORT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ATOM_BIOS_INFO_MEMORY_CLOCK_SS_SUPPORT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_32
LBB0_2:
Lloh11:
	adrp	x25, _ASIC_INTERNAL_ENGINE_SS@GOTPAGE
Lloh12:
	ldr	x25, [x25, _ASIC_INTERNAL_ENGINE_SS@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, w20
	b.ne	LBB0_4
; %bb.3:
	ldr	w8, [x22, #8]
Lloh13:
	adrp	x9, _ATOM_BIOS_INFO_ENGINE_CLOCK_SS_SUPPORT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ATOM_BIOS_INFO_ENGINE_CLOCK_SS_SUPPORT@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_32
LBB0_4:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	x0, [x22, #16]
	add	x2, sp, #16
	add	x3, sp, #12
	add	x4, sp, #8
	add	x5, sp, #24
	mov	x1, x23
	bl	_amdgpu_atom_parse_data_header
	cbz	x0, LBB0_33
; %bb.5:
	ldr	x8, [x22, #16]
	ldr	x8, [x8]
	ldr	x9, [sp, #24]
	ldr	w1, [sp, #12]
	cmp	w1, #3
	b.eq	LBB0_22
; %bb.6:
	cmp	w1, #2
	b.eq	LBB0_14
; %bb.7:
	cmp	w1, #1
	b.ne	LBB0_31
; %bb.8:
	ldr	x10, [sp, #16]
	mov	x11, #17179869180
	add	x10, x10, x11
	lsr	x23, x10, #2
	cmp	w23, #1
	b.lt	LBB0_32
; %bb.9:
	ldr	x8, [x8, x9]
	add	x22, x8, #8
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x22, x22, #16
	subs	w23, w23, #1
	b.eq	LBB0_32
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x22, #-8]
	cmp	w8, w20
	b.ne	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x22, #8]
	bl	_le32_to_cpu
	cmp	w0, w21
	b.lt	LBB0_10
; %bb.13:
	ldr	w0, [x22, #4]
	bl	_le16_to_cpu
	str	x0, [x19, #16]
	ldur	w8, [x22, #-4]
	str	w8, [x19]
	ldr	w0, [x22]
	bl	_le16_to_cpu
	mov	w8, #100
	stp	w0, w8, [x19, #4]
	mov	w0, #1
	b	LBB0_33
LBB0_14:
	ldr	x10, [sp, #16]
	mov	x11, #17179869180
	add	x10, x10, x11
	lsr	x23, x10, #2
	cmp	w23, #1
	b.lt	LBB0_32
; %bb.15:
	ldr	x8, [x8, x9]
	add	x22, x8, #8
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x22, x22, #16
	subs	w23, w23, #1
	b.eq	LBB0_32
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x22, #-8]
	cmp	w8, w20
	b.ne	LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	w0, [x22, #8]
	bl	_le32_to_cpu
	cmp	w0, w21
	b.lt	LBB0_16
; %bb.19:
	ldr	w0, [x22, #4]
	bl	_le16_to_cpu
	str	x0, [x19, #16]
	ldur	w8, [x22, #-4]
	str	w8, [x19]
	ldr	w0, [x22]
	bl	_le16_to_cpu
	mov	w8, #100
	stp	w0, w8, [x19, #4]
	ldr	w8, [sp, #8]
	cmp	w8, #2
	b.ne	LBB0_34
; %bb.20:
	ldr	w8, [x25]
	ldr	w9, [x24]
	cmp	w8, w20
	ccmp	w9, w20, #4, ne
	b.ne	LBB0_34
; %bb.21:
	mov	w8, #34079
	movk	w8, #20971, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
	str	w8, [x19, #4]
	mov	w0, #1
	b	LBB0_33
LBB0_22:
	ldr	x10, [sp, #16]
	mov	x11, #17179869180
	add	x10, x10, x11
	lsr	x26, x10, #2
	cmp	w26, #1
	b.lt	LBB0_32
; %bb.23:
	ldr	x8, [x8, x9]
	add	x23, x8, #8
	b	LBB0_25
LBB0_24:                                ;   in Loop: Header=BB0_25 Depth=1
	add	x23, x23, #16
	subs	w26, w26, #1
	b.eq	LBB0_32
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x23, #-8]
	cmp	w8, w20
	b.ne	LBB0_24
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	ldr	w0, [x23, #8]
	bl	_le32_to_cpu
	cmp	w0, w21
	b.lt	LBB0_24
; %bb.27:
	ldr	w0, [x23, #4]
	bl	_le16_to_cpu
	str	x0, [x19, #16]
	ldur	w8, [x23, #-4]
	str	w8, [x19]
	ldr	w0, [x23]
	bl	_le16_to_cpu
	str	w0, [x19, #4]
	ldur	w8, [x23, #-4]
Lloh16:
	adrp	x9, _SS_MODE_V3_PERCENTAGE_DIV_BY_1000_MASK@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SS_MODE_V3_PERCENTAGE_DIV_BY_1000_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #1000
	mov	w9, #100
	csel	w8, w9, w8, eq
	str	w8, [x19, #8]
	ldr	w8, [x25]
	ldr	w9, [x24]
	cmp	w8, w20
	ccmp	w9, w20, #4, ne
	b.ne	LBB0_29
; %bb.28:
	mov	w8, #34079
	movk	w8, #20971, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
	str	w8, [x19, #4]
LBB0_29:
	ldr	w8, [x22]
Lloh19:
	adrp	x9, _AMD_IS_APU@GOTPAGE
Lloh20:
	ldr	x9, [x9, _AMD_IS_APU@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_34
; %bb.30:
	mov	x0, x22
	mov	x1, x19
	mov	x2, x20
	bl	_amdgpu_atombios_get_igp_ss_overrides
	mov	w0, #1
	b	LBB0_33
LBB0_31:
	ldr	w2, [sp, #8]
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_32:
	mov	w0, #0
LBB0_33:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_34:
	mov	w0, #1
	b	LBB0_33
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_DATA,4,2                       ; @DATA
	.comm	_ASIC_InternalSS_Info,4,2       ; @ASIC_InternalSS_Info
	.comm	_ASIC_INTERNAL_MEMORY_SS,4,2    ; @ASIC_INTERNAL_MEMORY_SS
	.comm	_ATOM_BIOS_INFO_MEMORY_CLOCK_SS_SUPPORT,4,2 ; @ATOM_BIOS_INFO_MEMORY_CLOCK_SS_SUPPORT
	.comm	_ASIC_INTERNAL_ENGINE_SS,4,2    ; @ASIC_INTERNAL_ENGINE_SS
	.comm	_ATOM_BIOS_INFO_ENGINE_CLOCK_SS_SUPPORT,4,2 ; @ATOM_BIOS_INFO_ENGINE_CLOCK_SS_SUPPORT
	.comm	_SS_MODE_V3_PERCENTAGE_DIV_BY_1000_MASK,4,2 ; @SS_MODE_V3_PERCENTAGE_DIV_BY_1000_MASK
	.comm	_AMD_IS_APU,4,2                 ; @AMD_IS_APU
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported ASIC_InternalSS_Info table: %d %d\n"

.subsections_via_symbols
