	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function emulate_mfspr
_emulate_mfspr:                         ## @emulate_mfspr
	.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
	movq	%rdx, %r15
	movl	%esi, %r14d
	movl	%edi, %eax
	movq	_curthread@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	movq	_SPR_DSCR@GOTPCREL(%rip), %rcx
	movq	_SPR_DSCRP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	cmpl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	cmpl	%eax, %edi
	jne	LBB0_7
LBB0_2:
	movq	_cpu_features2@GOTPCREL(%rip), %rax
	movq	_PPC_FEATURE2_DSCR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_7
## %bb.3:
	movq	(%rbx), %rax
	movq	_PCB_CDSCR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_5
## %bb.4:
	movl	4(%rax), %eax
	jmp	LBB0_6
LBB0_7:
	movq	_SIGILL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_8
LBB0_5:
	callq	_mfspr
	movq	(%rbx), %rcx
	movl	%eax, 4(%rcx)
LBB0_6:
	movq	8(%r15), %rcx
	movslq	%r14d, %rdx
	movl	%eax, (%rcx,%rdx,4)
	addl	$4, (%r15)
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_curthread,8,3                  ## @curthread
	.comm	_SPR_DSCR,4,2                   ## @SPR_DSCR
	.comm	_SPR_DSCRP,4,2                  ## @SPR_DSCRP
	.comm	_cpu_features2,4,2              ## @cpu_features2
	.comm	_PPC_FEATURE2_DSCR,4,2          ## @PPC_FEATURE2_DSCR
	.comm	_SIGILL,4,2                     ## @SIGILL
	.comm	_PCB_CDSCR,4,2                  ## @PCB_CDSCR
	.no_dead_strip	_emulate_mfspr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function emulate_mfspr
_emulate_mfspr:                         ; @emulate_mfspr
	.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	x8, x0
Lloh0:
	adrp	x9, _SPR_DSCR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SPR_DSCR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _SPR_DSCRP@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SPR_DSCRP@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x10]
	cmp	w9, w8
	ccmp	w0, w8, #4, ne
	b.ne	LBB0_4
; %bb.1:
Lloh6:
	adrp	x8, _cpu_features2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _cpu_features2@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _PPC_FEATURE2_DSCR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PPC_FEATURE2_DSCR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	mov	x19, x2
	mov	x20, x1
Lloh12:
	adrp	x8, _curthread@GOTPAGE
Lloh13:
	ldr	x8, [x8, _curthread@GOTPAGEOFF]
Lloh14:
	ldr	x21, [x8]
	ldr	x8, [x21]
	ldr	w9, [x8]
Lloh15:
	adrp	x10, _PCB_CDSCR@GOTPAGE
Lloh16:
	ldr	x10, [x10, _PCB_CDSCR@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_5
; %bb.3:
	ldr	w8, [x8, #4]
	b	LBB0_6
LBB0_4:
Lloh18:
	adrp	x8, _SIGILL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SIGILL@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_5:
	bl	_mfspr
	mov	x8, x0
	ldr	x9, [x21]
	str	w0, [x9, #4]
LBB0_6:
	mov	w0, #0
	ldr	x9, [x19, #8]
	str	w8, [x9, w20, sxtw #2]
	ldr	w8, [x19]
	add	w8, w8, #4
	str	w8, [x19]
LBB0_7:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_curthread,8,3                  ; @curthread
	.comm	_SPR_DSCR,4,2                   ; @SPR_DSCR
	.comm	_SPR_DSCRP,4,2                  ; @SPR_DSCRP
	.comm	_cpu_features2,4,2              ; @cpu_features2
	.comm	_PPC_FEATURE2_DSCR,4,2          ; @PPC_FEATURE2_DSCR
	.comm	_SIGILL,4,2                     ; @SIGILL
	.comm	_PCB_CDSCR,4,2                  ; @PCB_CDSCR
	.no_dead_strip	_emulate_mfspr
.subsections_via_symbols
