	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpc74xx_l2_enable
_mpc74xx_l2_enable:                     ## @mpc74xx_l2_enable
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	xorl	%eax, %eax
	callq	_mfpvr
	andl	$-131072, %eax                  ## imm = 0xFFFE0000
	cmpl	$8388608, %eax                  ## imm = 0x800000
	jne	LBB0_1
## %bb.2:
	movq	_L2CR_L2IP@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_L2CR_L2I@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %ebx
	movq	_SPR_L2CR@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_mfspr
	movq	_L2CR_L2E@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testl	%eax, %esi
	jne	LBB0_7
## %bb.4:
	notl	%esi
	andl	%r14d, %esi
	movl	(%r15), %edi
	movq	_L2CR_L2I@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	callq	_mtspr
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_mfspr
	testl	%ebx, %eax
	jne	LBB0_5
## %bb.6:
	xorl	%eax, %eax
	callq	_powerpc_sync
	movl	(%r15), %edi
	movl	%r14d, %esi
	callq	_mtspr
	xorl	%eax, %eax
	callq	_powerpc_sync
	movl	%r14d, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_L2CR_L2IP,4,2                  ## @L2CR_L2IP
	.comm	_L2CR_L2I,4,2                   ## @L2CR_L2I
	.comm	_SPR_L2CR,4,2                   ## @SPR_L2CR
	.comm	_L2CR_L2E,4,2                   ## @L2CR_L2E
	.no_dead_strip	_mpc74xx_l2_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpc74xx_l2_enable
_mpc74xx_l2_enable:                     ; @mpc74xx_l2_enable
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x0
	bl	_mfpvr
	and	w8, w0, #0xfffe0000
Lloh0:
	adrp	x9, _L2CR_L2IP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _L2CR_L2IP@GOTPAGEOFF]
Lloh2:
	adrp	x22, _L2CR_L2I@GOTPAGE
Lloh3:
	ldr	x22, [x22, _L2CR_L2I@GOTPAGEOFF]
	cmp	w8, #2048, lsl #12              ; =8388608
	csel	x8, x9, x22, eq
	ldr	w21, [x8]
Lloh4:
	adrp	x20, _SPR_L2CR@GOTPAGE
Lloh5:
	ldr	x20, [x20, _SPR_L2CR@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_mfspr
Lloh6:
	adrp	x8, _L2CR_L2E@GOTPAGE
Lloh7:
	ldr	x8, [x8, _L2CR_L2E@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.1:
	bic	w8, w19, w8
	ldr	w0, [x20]
	ldr	w9, [x22]
	orr	w1, w9, w8
	bl	_mtspr
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	bl	_mfspr
	tst	w0, w21
	b.ne	LBB0_2
; %bb.3:
	bl	_powerpc_sync
	ldr	w0, [x20]
	mov	x1, x19
	bl	_mtspr
	bl	_powerpc_sync
	mov	x0, x19
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_L2CR_L2IP,4,2                  ; @L2CR_L2IP
	.comm	_L2CR_L2I,4,2                   ; @L2CR_L2I
	.comm	_SPR_L2CR,4,2                   ; @SPR_L2CR
	.comm	_L2CR_L2E,4,2                   ; @L2CR_L2E
	.no_dead_strip	_mpc74xx_l2_enable
.subsections_via_symbols
