	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function smu7_populate_single_firmware_entry
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_smu7_populate_single_firmware_entry:   ## @smu7_populate_single_firmware_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movl	4(%rdi), %ebx
	movq	%rsi, %rdi
	callq	_smu7_convert_fw_type_to_cgs
	leaq	-48(%rbp), %rdx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_cgs_get_firmware_info
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	-40(%rbp), %eax
	movl	%eax, 48(%r14)
	movq	%r12, 40(%r14)
	movl	-44(%rbp), %edi
	callq	_upper_32_bits
	movl	%eax, 36(%r14)
	movl	-44(%rbp), %edi
	callq	_lower_32_bits
	movl	%eax, 32(%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r14)
	movl	-48(%rbp), %eax
	leal	-20(%rax), %ecx
	cmpl	$0, (%r15)
	cmovnel	%eax, %ecx
	movl	%ecx, (%r14)
	movq	$0, 8(%r14)
LBB0_2:
	movq	_UCODE_ID_RLC_G@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	sete	%al
	movq	_UCODE_ID_CP_MEC@GOTPCREL(%rip), %rcx
	cmpq	%r12, (%rcx)
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %eax
	movl	%eax, 4(%r14)
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UCODE_ID_RLC_G,8,3             ## @UCODE_ID_RLC_G
	.comm	_UCODE_ID_CP_MEC,8,3            ## @UCODE_ID_CP_MEC
	.no_dead_strip	_smu7_populate_single_firmware_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smu7_populate_single_firmware_entry
_smu7_populate_single_firmware_entry:   ; @smu7_populate_single_firmware_entry
	.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
	mov	x20, x1
	mov	x21, x0
	stp	xzr, xzr, [sp]
	ldr	w22, [x0, #4]
	mov	x0, x1
	bl	_smu7_convert_fw_type_to_cgs
	mov	x1, x0
	mov	x2, sp
	mov	x0, x22
	bl	_cgs_get_firmware_info
	cbnz	w0, LBB0_2
; %bb.1:
	ldp	w0, w8, [sp, #4]
	str	w8, [x19, #48]
	str	x20, [x19, #40]
	bl	_upper_32_bits
	str	w0, [x19, #36]
	ldr	w0, [sp, #4]
	bl	_lower_32_bits
	str	w0, [x19, #32]
	stp	xzr, xzr, [x19, #16]
	str	xzr, [x19, #8]
	ldr	w8, [x21]
	ldr	w9, [sp]
	sub	w10, w9, #20
	cmp	w8, #0
	csel	w8, w10, w9, eq
	str	w8, [x19]
LBB0_2:
Lloh0:
	adrp	x8, _UCODE_ID_RLC_G@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UCODE_ID_RLC_G@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _UCODE_ID_CP_MEC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _UCODE_ID_CP_MEC@GOTPAGEOFF]
	cmp	x8, x20
Lloh5:
	ldr	x8, [x9]
	ccmp	x8, x20, #4, ne
	cset	w8, eq
	str	w8, [x19, #4]
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_UCODE_ID_RLC_G,8,3             ; @UCODE_ID_RLC_G
	.comm	_UCODE_ID_CP_MEC,8,3            ; @UCODE_ID_CP_MEC
	.no_dead_strip	_smu7_populate_single_firmware_entry
.subsections_via_symbols
