	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_calculate_sr               ## -- Begin function cxl_calculate_sr
	.p2align	4, 0x90
_cxl_calculate_sr:                      ## @cxl_calculate_sr
	.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, %r14d
	movl	%edx, %r12d
	movl	%esi, %r15d
	movl	%edi, %r13d
	xorl	%edi, %edi
	callq	_set_endian
	testl	%r13d, %r13d
	je	LBB0_2
## %bb.1:
	movq	_CXL_PSL_SR_An_MP@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_2:
	movq	_SPRN_LPCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mfspr
	movl	%eax, %ebx
	movq	_LPCR_TC@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	je	LBB0_4
## %bb.3:
	movq	_CXL_PSL_SR_An_TC@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_4:
	orl	%r13d, %ebx
	testl	%r15d, %r15d
	je	LBB0_8
## %bb.5:
	movl	$0, %r15d
	testl	%r12d, %r12d
	jne	LBB0_7
## %bb.6:
	movq	_CXL_PSL_SR_An_R@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_7:
	xorl	%eax, %eax
	callq	_mfmsr
	movq	_MSR_SF@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_CXL_PSL_SR_An_HV@GOTPCREL(%rip), %rcx
	orl	%ebx, %r15d
	orl	(%rcx), %r15d
	orl	%eax, %r15d
	jmp	LBB0_10
LBB0_8:
	movq	_CXL_PSL_SR_An_PR@GOTPCREL(%rip), %rax
	movq	_CXL_PSL_SR_An_R@GOTPCREL(%rip), %rcx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	xorl	%eax, %eax
	callq	_radix_enabled
	movq	_CXL_PSL_SR_An_HV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movl	%r15d, %ecx
	orl	%ebx, %ecx
	notl	%r15d
	andl	%ebx, %r15d
	testq	%rax, %rax
	cmovnel	%ecx, %r15d
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TIF_32BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_test_tsk_thread_flag
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	_CXL_PSL_SR_An_SF@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
LBB0_10:
	testl	%r14d, %r14d
	je	LBB0_15
## %bb.11:
	xorl	%eax, %eax
	callq	_radix_enabled
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_CXL_PSL_SR_An_XLAT_ror@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_13:
	movq	_CXL_PSL_SR_An_XLAT_hpt@GOTPCREL(%rip), %rax
LBB0_14:
	orl	(%rax), %r15d
LBB0_15:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CXL_PSL_SR_An_MP,4,2           ## @CXL_PSL_SR_An_MP
	.comm	_SPRN_LPCR,4,2                  ## @SPRN_LPCR
	.comm	_LPCR_TC,4,2                    ## @LPCR_TC
	.comm	_CXL_PSL_SR_An_TC,4,2           ## @CXL_PSL_SR_An_TC
	.comm	_CXL_PSL_SR_An_R,4,2            ## @CXL_PSL_SR_An_R
	.comm	_MSR_SF,4,2                     ## @MSR_SF
	.comm	_CXL_PSL_SR_An_HV,4,2           ## @CXL_PSL_SR_An_HV
	.comm	_CXL_PSL_SR_An_PR,4,2           ## @CXL_PSL_SR_An_PR
	.comm	_current,4,2                    ## @current
	.comm	_TIF_32BIT,4,2                  ## @TIF_32BIT
	.comm	_CXL_PSL_SR_An_SF,4,2           ## @CXL_PSL_SR_An_SF
	.comm	_CXL_PSL_SR_An_XLAT_ror,4,2     ## @CXL_PSL_SR_An_XLAT_ror
	.comm	_CXL_PSL_SR_An_XLAT_hpt,4,2     ## @CXL_PSL_SR_An_XLAT_hpt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_calculate_sr               ; -- Begin function cxl_calculate_sr
	.p2align	2
_cxl_calculate_sr:                      ; @cxl_calculate_sr
	.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, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	w0, #0
	bl	_set_endian
Lloh0:
	adrp	x8, _CXL_PSL_SR_An_MP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CXL_PSL_SR_An_MP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w22, #0
	csel	w22, wzr, w8, eq
Lloh3:
	adrp	x8, _SPRN_LPCR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SPRN_LPCR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_mfspr
Lloh6:
	adrp	x8, _LPCR_TC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LPCR_TC@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _CXL_PSL_SR_An_TC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CXL_PSL_SR_An_TC@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w8, w0
	csel	w8, wzr, w9, eq
	orr	w22, w8, w22
	cbz	w21, LBB0_2
; %bb.1:
Lloh12:
	adrp	x8, _CXL_PSL_SR_An_R@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CXL_PSL_SR_An_R@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w20, #0
	csel	w20, w8, wzr, eq
	bl	_mfmsr
Lloh15:
	adrp	x8, _MSR_SF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSR_SF@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh18:
	adrp	x9, _CXL_PSL_SR_An_HV@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CXL_PSL_SR_An_HV@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w10, w20, w22
	orr	w9, w10, w9
	orr	w20, w9, w8
	b	LBB0_4
LBB0_2:
Lloh21:
	adrp	x8, _CXL_PSL_SR_An_PR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CXL_PSL_SR_An_PR@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _CXL_PSL_SR_An_R@GOTPAGE
Lloh25:
	ldr	x9, [x9, _CXL_PSL_SR_An_R@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w8, w22
	orr	w20, w8, w9
	bl	_radix_enabled
Lloh27:
	adrp	x8, _CXL_PSL_SR_An_HV@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CXL_PSL_SR_An_HV@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	orr	w9, w8, w20
	bic	w8, w20, w8
	cmp	x0, #0
	csel	w20, w8, w9, eq
Lloh30:
	adrp	x8, _current@GOTPAGE
Lloh31:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
Lloh33:
	adrp	x8, _TIF_32BIT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _TIF_32BIT@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	bl	_test_tsk_thread_flag
	cbnz	w0, LBB0_4
; %bb.3:
Lloh36:
	adrp	x8, _CXL_PSL_SR_An_SF@GOTPAGE
Lloh37:
	ldr	x8, [x8, _CXL_PSL_SR_An_SF@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	orr	w20, w8, w20
LBB0_4:
	cbz	w19, LBB0_9
; %bb.5:
	bl	_radix_enabled
	cbz	x0, LBB0_7
; %bb.6:
Lloh39:
	adrp	x8, _CXL_PSL_SR_An_XLAT_ror@GOTPAGE
Lloh40:
	ldr	x8, [x8, _CXL_PSL_SR_An_XLAT_ror@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh41:
	adrp	x8, _CXL_PSL_SR_An_XLAT_hpt@GOTPAGE
Lloh42:
	ldr	x8, [x8, _CXL_PSL_SR_An_XLAT_hpt@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	orr	w20, w8, w20
LBB0_9:
	mov	x0, x20
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_CXL_PSL_SR_An_MP,4,2           ; @CXL_PSL_SR_An_MP
	.comm	_SPRN_LPCR,4,2                  ; @SPRN_LPCR
	.comm	_LPCR_TC,4,2                    ; @LPCR_TC
	.comm	_CXL_PSL_SR_An_TC,4,2           ; @CXL_PSL_SR_An_TC
	.comm	_CXL_PSL_SR_An_R,4,2            ; @CXL_PSL_SR_An_R
	.comm	_MSR_SF,4,2                     ; @MSR_SF
	.comm	_CXL_PSL_SR_An_HV,4,2           ; @CXL_PSL_SR_An_HV
	.comm	_CXL_PSL_SR_An_PR,4,2           ; @CXL_PSL_SR_An_PR
	.comm	_current,4,2                    ; @current
	.comm	_TIF_32BIT,4,2                  ; @TIF_32BIT
	.comm	_CXL_PSL_SR_An_SF,4,2           ; @CXL_PSL_SR_An_SF
	.comm	_CXL_PSL_SR_An_XLAT_ror,4,2     ; @CXL_PSL_SR_An_XLAT_ror
	.comm	_CXL_PSL_SR_An_XLAT_hpt,4,2     ; @CXL_PSL_SR_An_XLAT_hpt
.subsections_via_symbols
