	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smu_update_table               ## -- Begin function smu_update_table
	.p2align	4, 0x90
_smu_update_table:                      ## @smu_update_table
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movq	%rcx, %r13
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	callq	_smu_table_get_index
	testq	%r13, %r13
	je	LBB0_3
## %bb.1:
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	cmpl	8(%r14), %r15d
	jge	LBB0_3
## %bb.4:
	movq	16(%r14), %rcx
	movl	%r12d, %eax
	movl	%ebx, %edx
	shlq	$4, %rdx
	leaq	(%rcx,%rdx), %r12
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_6
## %bb.5:
	movq	(%r12), %rdi
	movq	%rdx, %rbx
	movl	8(%rcx,%rdx), %edx
	movq	%r13, %rsi
	callq	_memcpy
	movq	%rbx, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
LBB0_6:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	_SMU_MSG_SetDriverDramAddrHigh@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	12(%rcx,%rdx), %edi
	movq	%rdx, %r12
	callq	_upper_32_bits
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_smu_send_smc_msg_with_param
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	%r12, %rax
	addq	$12, %rax
	movq	_SMU_MSG_SetDriverDramAddrLow@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	(%rax), %edi
	callq	_lower_32_bits
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_smu_send_smc_msg_with_param
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.8:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_9
## %bb.10:
	movq	_SMU_MSG_TransferTableSmu2Dram@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_14:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_SMU_MSG_TransferTableDram2Smu@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %esi
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	shll	$16, %eax
	orl	%eax, %r15d
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_smu_send_smc_msg_with_param
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	*(%rax)
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_14
## %bb.13:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	movl	8(%rbx,%r12), %edx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_memcpy
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SMU_MSG_SetDriverDramAddrHigh,4,2 ## @SMU_MSG_SetDriverDramAddrHigh
	.comm	_SMU_MSG_SetDriverDramAddrLow,4,2 ## @SMU_MSG_SetDriverDramAddrLow
	.comm	_SMU_MSG_TransferTableDram2Smu,4,2 ## @SMU_MSG_TransferTableDram2Smu
	.comm	_SMU_MSG_TransferTableSmu2Dram,4,2 ## @SMU_MSG_TransferTableSmu2Dram
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smu_update_table               ; -- Begin function smu_update_table
	.p2align	2
_smu_update_table:                      ; @smu_update_table
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x4
	mov	x19, x3
	mov	x23, x2
	mov	x25, x1
	mov	x22, x0
	ldr	x21, [x0]
	bl	_smu_table_get_index
	cbz	x19, LBB0_11
; %bb.1:
	mov	x24, x0
	tbnz	w0, #31, LBB0_11
; %bb.2:
	ldr	w8, [x22, #8]
	cmp	w24, w8
	b.ge	LBB0_11
; %bb.3:
	ldr	x26, [x22, #16]
	mov	w27, w25
	add	x25, x26, w25, uxtw #4
	cbz	w20, LBB0_5
; %bb.4:
	ldr	x0, [x25]
	add	x8, x26, x27, lsl #4
	ldr	w2, [x8, #8]
	mov	x1, x19
	bl	_memcpy
LBB0_5:
	str	x25, [sp, #8]                   ; 8-byte Folded Spill
Lloh0:
	adrp	x8, _SMU_MSG_SetDriverDramAddrHigh@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMU_MSG_SetDriverDramAddrHigh@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
	add	x28, x26, x27, lsl #4
	ldr	w0, [x28, #12]!
	bl	_upper_32_bits
	mov	x2, x0
	mov	x0, x22
	mov	x1, x25
	bl	_smu_send_smc_msg_with_param
	cbnz	w0, LBB0_12
; %bb.6:
Lloh3:
	adrp	x8, _SMU_MSG_SetDriverDramAddrLow@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMU_MSG_SetDriverDramAddrLow@GOTPAGEOFF]
Lloh5:
	ldr	w25, [x8]
	ldr	w0, [x28]
	bl	_lower_32_bits
	mov	x2, x0
	mov	x0, x22
	mov	x1, x25
	bl	_smu_send_smc_msg_with_param
	cbnz	w0, LBB0_12
; %bb.7:
Lloh6:
	adrp	x8, _SMU_MSG_TransferTableDram2Smu@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SMU_MSG_TransferTableDram2Smu@GOTPAGEOFF]
Lloh8:
	adrp	x9, _SMU_MSG_TransferTableSmu2Dram@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SMU_MSG_TransferTableSmu2Dram@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
	orr	w2, w24, w23, lsl #16
	mov	x0, x22
	bl	_smu_send_smc_msg_with_param
	cbnz	w0, LBB0_12
; %bb.8:
	ldr	x8, [x21]
	ldr	x8, [x8]
	mov	x0, x21
	mov	x1, #0
	blr	x8
	cbnz	w20, LBB0_10
; %bb.9:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x1, [x8]
	add	x8, x26, x27, lsl #4
	ldr	w2, [x8, #8]
	mov	x0, x19
	bl	_memcpy
LBB0_10:
	mov	w0, #0
	b	LBB0_12
LBB0_11:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SMU_MSG_SetDriverDramAddrHigh,4,2 ; @SMU_MSG_SetDriverDramAddrHigh
	.comm	_SMU_MSG_SetDriverDramAddrLow,4,2 ; @SMU_MSG_SetDriverDramAddrLow
	.comm	_SMU_MSG_TransferTableDram2Smu,4,2 ; @SMU_MSG_TransferTableDram2Smu
	.comm	_SMU_MSG_TransferTableSmu2Dram,4,2 ; @SMU_MSG_TransferTableSmu2Dram
.subsections_via_symbols
