	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btc_copy_vbios_mc_reg_table
_btc_copy_vbios_mc_reg_table:           ## @btc_copy_vbios_mc_reg_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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r10
	movq	_SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r10
	jg	LBB0_1
## %bb.2:
	movq	8(%rdi), %r14
	movq	_MAX_AC_TIMING_ENTRIES@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jbe	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_36
LBB0_3:
	testq	%r10, %r10
	je	LBB0_15
## %bb.4:
	movq	24(%rdi), %r11
	movq	24(%rsi), %rdx
	cmpq	$8, %r10
	jae	LBB0_7
## %bb.5:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_7:
	movq	%r10, %rax
	andq	$-8, %rax
	leaq	-8(%rax), %rbx
	movq	%rbx, %rcx
	shrq	$3, %rcx
	incq	%rcx
	movl	%ecx, %r8d
	andl	$3, %r8d
	cmpq	$24, %rbx
	jae	LBB0_9
## %bb.8:
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_9:
	andq	$-4, %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movups	(%r11,%rbx,4), %xmm0
	movups	16(%r11,%rbx,4), %xmm1
	movups	%xmm0, (%rdx,%rbx,4)
	movups	%xmm1, 16(%rdx,%rbx,4)
	movups	32(%r11,%rbx,4), %xmm0
	movups	48(%r11,%rbx,4), %xmm1
	movups	%xmm0, 32(%rdx,%rbx,4)
	movups	%xmm1, 48(%rdx,%rbx,4)
	movups	64(%r11,%rbx,4), %xmm0
	movups	80(%r11,%rbx,4), %xmm1
	movups	%xmm0, 64(%rdx,%rbx,4)
	movups	%xmm1, 80(%rdx,%rbx,4)
	movups	96(%r11,%rbx,4), %xmm0
	movups	112(%r11,%rbx,4), %xmm1
	movups	%xmm0, 96(%rdx,%rbx,4)
	movups	%xmm1, 112(%rdx,%rbx,4)
	addq	$32, %rbx
	addq	$-4, %rcx
	jne	LBB0_10
LBB0_11:
	testq	%r8, %r8
	je	LBB0_14
## %bb.12:
	leaq	(%rdx,%rbx,4), %r9
	addq	$16, %r9
	leaq	(%r11,%rbx,4), %rbx
	addq	$16, %rbx
	shlq	$5, %r8
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movups	-16(%rbx,%rcx), %xmm0
	movups	(%rbx,%rcx), %xmm1
	movups	%xmm0, -16(%r9,%rcx)
	movups	%xmm1, (%r9,%rcx)
	addq	$32, %rcx
	cmpq	%rcx, %r8
	jne	LBB0_13
	jmp	LBB0_14
LBB0_6:
	movl	(%r11,%rax,4), %ecx
	movl	%ecx, (%rdx,%rax,4)
	incq	%rax
LBB0_14:
	cmpq	%rax, %r10
	jne	LBB0_6
LBB0_15:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%r10, (%rsi)
	testq	%r14, %r14
	je	LBB0_35
## %bb.16:
	movq	16(%rdi), %r12
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %r13
	leaq	-8(%r10), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	shrq	$3, %rax
	incq	%rax
	movq	%r10, %rcx
	andq	$-8, %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%eax, %r11d
	andl	$3, %r11d
	andq	$-4, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r10d, %r15d
	andl	$3, %r15d
	movq	%r11, -64(%rbp)                 ## 8-byte Spill
	shlq	$5, %r11
	xorl	%r8d, %r8d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_34:                                ##   in Loop: Header=BB0_17 Depth=1
	incq	%r8
	cmpq	%r14, %r8
	je	LBB0_35
LBB0_17:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_24 Depth 2
                                        ##     Child Loop BB0_27 Depth 2
                                        ##     Child Loop BB0_31 Depth 2
                                        ##     Child Loop BB0_33 Depth 2
	movq	%r8, %rax
	shlq	$4, %rax
	movl	8(%r12,%rax), %ecx
	movl	%ecx, 8(%r13,%rax)
	testq	%r10, %r10
	je	LBB0_34
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	(%r12,%rax), %rdx
	movq	(%r13,%rax), %rdi
	cmpq	$8, %r10
	jb	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%rdi, %rcx
	subq	%rdx, %rcx
	movl	$0, %eax
	cmpq	$32, %rcx
	jb	LBB0_29
## %bb.21:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpq	$24, -80(%rbp)                  ## 8-byte Folded Reload
	jae	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_17 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_25
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_29
LBB0_23:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_24:                                ##   Parent Loop BB0_17 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%rdx,%rax,4), %xmm0
	movups	16(%rdx,%rax,4), %xmm1
	movups	%xmm0, (%rdi,%rax,4)
	movups	%xmm1, 16(%rdi,%rax,4)
	movups	32(%rdx,%rax,4), %xmm0
	movups	48(%rdx,%rax,4), %xmm1
	movups	%xmm0, 32(%rdi,%rax,4)
	movups	%xmm1, 48(%rdi,%rax,4)
	movups	64(%rdx,%rax,4), %xmm0
	movups	80(%rdx,%rax,4), %xmm1
	movups	%xmm0, 64(%rdi,%rax,4)
	movups	%xmm1, 80(%rdi,%rax,4)
	movups	96(%rdx,%rax,4), %xmm0
	movups	112(%rdx,%rax,4), %xmm1
	movups	%xmm0, 96(%rdi,%rax,4)
	movups	%xmm1, 112(%rdi,%rax,4)
	addq	$32, %rax
	addq	$-4, %r9
	jne	LBB0_24
LBB0_25:                                ##   in Loop: Header=BB0_17 Depth=1
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_28
## %bb.26:                              ##   in Loop: Header=BB0_17 Depth=1
	leaq	(%rdi,%rax,4), %rsi
	addq	$16, %rsi
	leaq	(%rdx,%rax,4), %rax
	addq	$16, %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_27:                                ##   Parent Loop BB0_17 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rax,%rcx), %xmm0
	movups	(%rax,%rcx), %xmm1
	movups	%xmm0, -16(%rsi,%rcx)
	movups	%xmm1, (%rsi,%rcx)
	addq	$32, %rcx
	cmpq	%rcx, %r11
	jne	LBB0_27
LBB0_28:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, %rax
	cmpq	%rcx, %r10
	je	LBB0_34
LBB0_29:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	%rax, %rsi
	notq	%rsi
	addq	%r10, %rsi
	testq	%r15, %r15
	je	LBB0_32
## %bb.30:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%r15, %rcx
	.p2align	4, 0x90
LBB0_31:                                ##   Parent Loop BB0_17 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rdx,%rax,4), %ebx
	movl	%ebx, (%rdi,%rax,4)
	incq	%rax
	decq	%rcx
	jne	LBB0_31
LBB0_32:                                ##   in Loop: Header=BB0_17 Depth=1
	cmpq	$3, %rsi
	jb	LBB0_34
	.p2align	4, 0x90
LBB0_33:                                ##   Parent Loop BB0_17 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rdx,%rax,4), %ecx
	movl	%ecx, (%rdi,%rax,4)
	movl	4(%rdx,%rax,4), %ecx
	movl	%ecx, 4(%rdi,%rax,4)
	movl	8(%rdx,%rax,4), %ecx
	movl	%ecx, 8(%rdi,%rax,4)
	movl	12(%rdx,%rax,4), %ecx
	movl	%ecx, 12(%rdi,%rax,4)
	addq	$4, %rax
	cmpq	%rax, %r10
	jne	LBB0_33
	jmp	LBB0_34
LBB0_35:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, 8(%rax)
	xorl	%eax, %eax
LBB0_36:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE,8,3 ## @SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MAX_AC_TIMING_ENTRIES,8,3      ## @MAX_AC_TIMING_ENTRIES
	.no_dead_strip	_btc_copy_vbios_mc_reg_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btc_copy_vbios_mc_reg_table
_btc_copy_vbios_mc_reg_table:           ; @btc_copy_vbios_mc_reg_table
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.gt	LBB0_2
; %bb.1:
	ldr	x9, [x0, #8]
Lloh3:
	adrp	x10, _MAX_AC_TIMING_ENTRIES@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MAX_AC_TIMING_ENTRIES@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ls	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_3:
	cbz	x8, LBB0_11
; %bb.4:
	ldr	x11, [x0, #24]
	ldr	x10, [x1, #24]
	cmp	x8, #16
	b.hs	LBB0_6
; %bb.5:
	mov	x12, #0
	b	LBB0_9
LBB0_6:
	and	x12, x8, #0xfffffffffffffff0
	add	x13, x11, #32
	add	x14, x10, #32
	mov	x15, x12
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x13, #-32]
	ldp	q2, q3, [x13], #64
	stp	q0, q1, [x14, #-32]
	stp	q2, q3, [x14], #64
	subs	x15, x15, #16
	b.ne	LBB0_7
; %bb.8:
	cmp	x8, x12
	b.eq	LBB0_11
LBB0_9:
	sub	x13, x8, x12
	lsl	x12, x12, #2
	add	x11, x11, x12
	add	x10, x10, x12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11], #4
	str	w12, [x10], #4
	subs	x13, x13, #1
	b.ne	LBB0_10
LBB0_11:
	str	x8, [x1]
	cbz	x9, LBB0_22
; %bb.12:
	mov	x10, #0
	ldr	x11, [x0, #16]
	ldr	x12, [x1, #16]
	and	x13, x8, #0xfffffffffffffff0
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x10, x10, #1
	cmp	x10, x9
	b.eq	LBB0_22
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_18 Depth 2
                                        ;     Child Loop BB0_21 Depth 2
	lsl	x15, x10, #4
	add	x14, x11, x15
	ldr	w14, [x14, #8]
	add	x16, x12, x15
	str	w14, [x16, #8]
	cbz	x8, LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x17, #0
	ldr	x14, [x11, x15]
	ldr	x15, [x12, x15]
	cmp	x8, #16
	b.lo	LBB0_20
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	sub	x16, x15, x14
	cmp	x16, #64
	b.lo	LBB0_20
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x16, x15, #32
	add	x17, x14, #32
	mov	x0, x13
LBB0_18:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x17, #-32]
	ldp	q2, q3, [x17], #64
	stp	q0, q1, [x16, #-32]
	stp	q2, q3, [x16], #64
	subs	x0, x0, #16
	b.ne	LBB0_18
; %bb.19:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x17, x13
	cmp	x8, x13
	b.eq	LBB0_13
LBB0_20:                                ;   in Loop: Header=BB0_14 Depth=1
	sub	x16, x8, x17
	lsl	x17, x17, #2
	add	x15, x15, x17
	add	x14, x14, x17
LBB0_21:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w17, [x14], #4
	str	w17, [x15], #4
	subs	x16, x16, #1
	b.ne	LBB0_21
	b	LBB0_13
LBB0_22:
	mov	w0, #0
	str	x9, [x1, #8]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE,8,3 ; @SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MAX_AC_TIMING_ENTRIES,8,3      ; @MAX_AC_TIMING_ENTRIES
	.no_dead_strip	_btc_copy_vbios_mc_reg_table
.subsections_via_symbols
