	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu8_smu_populate_single_scratch_task
_smu8_smu_populate_single_scratch_task: ## @smu8_smu_populate_single_scratch_task
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%esi, %r14d
	movq	(%rdi), %r15
	movq	24(%r15), %rax
	movq	(%rax), %r12
	movslq	16(%r15), %r13
	leal	1(%r13), %eax
	movl	%eax, 16(%r15)
	shlq	$5, %r13
	movq	%rdx, (%r12,%r13)
	callq	_smu8_translate_firmware_enum_to_arg
	movl	%eax, 24(%r12,%r13)
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.2:
	movq	_END_OF_TASK_LIST@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	leaq	16(%r15), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, 20(%r12,%r13)
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	8(%r15), %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r14d, (%rcx,%rbx)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	addq	$24, %rbx
	decq	%rax
	jne	LBB0_5
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_8:
	movl	20(%rcx,%rbx), %edi
	callq	_lower_32_bits
	movl	%eax, 16(%r12,%r13)
	movq	8(%r15), %rax
	movl	20(%rax,%rbx), %edi
	callq	_upper_32_bits
	movl	%eax, 12(%r12,%r13)
	movq	8(%r15), %rcx
	movl	16(%rcx,%rbx), %eax
	movl	%eax, 8(%r12,%r13)
	movq	_SMU8_SCRATCH_ENTRY_DATA_ID_IH_REGISTERS@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	%r14d, (%rdx)
	jne	LBB0_10
## %bb.9:
	movq	8(%rcx,%rbx), %rcx
	movq	_METADATA_CMD_MODE0@GOTPCREL(%rip), %rdx
	movq	_METADATA_PERFORM_ON_LOAD@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rdx), %esi
	movl	%esi, (%rcx)
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_END_OF_TASK_LIST,4,2           ## @END_OF_TASK_LIST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid Firmware Type\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SMU8_SCRATCH_ENTRY_DATA_ID_IH_REGISTERS,4,2 ## @SMU8_SCRATCH_ENTRY_DATA_ID_IH_REGISTERS
	.comm	_METADATA_CMD_MODE0,4,2         ## @METADATA_CMD_MODE0
	.comm	_METADATA_PERFORM_ON_LOAD,4,2   ## @METADATA_PERFORM_ON_LOAD
	.no_dead_strip	_smu8_smu_populate_single_scratch_task
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smu8_smu_populate_single_scratch_task
_smu8_smu_populate_single_scratch_task: ; @smu8_smu_populate_single_scratch_task
	.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	x20, x3
	mov	x19, x1
	ldr	x21, [x0]
	ldr	x8, [x21, #24]
	ldr	x22, [x8]
	mov	x24, x21
	ldrsw	x23, [x24, #16]!
	add	w8, w23, #1
	str	w8, [x24]
	add	x25, x22, x23, lsl #5
	str	x2, [x25]
	bl	_smu8_translate_firmware_enum_to_arg
Lloh0:
	adrp	x8, _END_OF_TASK_LIST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _END_OF_TASK_LIST@GOTPAGEOFF]
	str	w0, [x25, #24]
	cmp	w20, #0
	csel	x8, x24, x8, eq
	ldr	w8, [x8]
	str	w8, [x25, #20]
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x20, #0
	ldr	x9, [x21, #8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9, x20]
	cmp	w10, w19
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, #24
	subs	x8, x8, #1
	b.ne	LBB0_2
LBB0_4:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_5:
	add	x8, x9, x20
	ldr	w0, [x8, #20]
	bl	_lower_32_bits
	add	x22, x22, x23, lsl #5
	str	w0, [x22, #16]
	ldr	x8, [x21, #8]
	add	x8, x8, x20
	ldr	w0, [x8, #20]
	bl	_upper_32_bits
	ldr	x8, [x21, #8]
	add	x8, x8, x20
	ldr	w9, [x8, #16]
	stp	w9, w0, [x22, #8]
Lloh7:
	adrp	x9, _SMU8_SCRATCH_ENTRY_DATA_ID_IH_REGISTERS@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SMU8_SCRATCH_ENTRY_DATA_ID_IH_REGISTERS@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	w9, w19
	b.ne	LBB0_7
; %bb.6:
	mov	w0, #0
	ldr	x8, [x8, #8]
Lloh10:
	adrp	x9, _METADATA_CMD_MODE0@GOTPAGE
Lloh11:
	ldr	x9, [x9, _METADATA_CMD_MODE0@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _METADATA_PERFORM_ON_LOAD@GOTPAGE
Lloh14:
	ldr	x10, [x10, _METADATA_PERFORM_ON_LOAD@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x8]
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_END_OF_TASK_LIST,4,2           ; @END_OF_TASK_LIST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid Firmware Type\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SMU8_SCRATCH_ENTRY_DATA_ID_IH_REGISTERS,4,2 ; @SMU8_SCRATCH_ENTRY_DATA_ID_IH_REGISTERS
	.comm	_METADATA_CMD_MODE0,4,2         ; @METADATA_CMD_MODE0
	.comm	_METADATA_PERFORM_ON_LOAD,4,2   ; @METADATA_PERFORM_ON_LOAD
	.no_dead_strip	_smu8_smu_populate_single_scratch_task
.subsections_via_symbols
