	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function insert_sprg
_insert_sprg:                           ## @insert_sprg
	.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	%rcx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	cmpq	$7, %rsi
	jle	LBB0_1
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	__
	movq	%rax, (%r15)
	jmp	LBB0_4
LBB0_1:
	cmpq	$4, %rbx
	jl	LBB0_4
## %bb.2:
	movq	_PPC_OPCODE_BOOKE@GOTPCREL(%rip), %rax
	movq	_PPC_OPCODE_403@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%edx, %ecx
	je	LBB0_3
LBB0_4:
	movq	%rbx, %rax
	shlq	$16, %rax
	movl	%eax, %ecx
	orl	$1048576, %ecx                  ## imm = 0x100000
	testl	$256, %r14d                     ## imm = 0x100
	cmovneq	%rcx, %rax
	cmpq	$4, %rbx
	cmovlq	%rcx, %rax
	andl	$1507328, %eax                  ## imm = 0x170000
	orq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PPC_OPCODE_BOOKE,4,2           ## @PPC_OPCODE_BOOKE
	.comm	_PPC_OPCODE_403,4,2             ## @PPC_OPCODE_403
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid sprg number"

	.no_dead_strip	_insert_sprg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function insert_sprg
_insert_sprg:                           ; @insert_sprg
	.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	x21, x3
	mov	x20, x1
	mov	x19, x0
	cmp	x1, #7
	b.le	LBB0_2
LBB0_1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	str	x0, [x21]
	b	LBB0_4
LBB0_2:
	cmp	x20, #4
	b.lt	LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _PPC_OPCODE_BOOKE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PPC_OPCODE_BOOKE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _PPC_OPCODE_403@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PPC_OPCODE_403@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w2
	b.eq	LBB0_1
LBB0_4:
	tst	x19, #0x100
	ccmp	x20, #3, #4, eq
	lsl	x8, x20, #16
	orr	w9, w8, #0x100000
	csel	x8, x8, x9, gt
	mov	w9, #1507328
	and	x8, x8, x9
	orr	x0, x8, x19
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PPC_OPCODE_BOOKE,4,2           ; @PPC_OPCODE_BOOKE
	.comm	_PPC_OPCODE_403,4,2             ; @PPC_OPCODE_403
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid sprg number"

	.no_dead_strip	_insert_sprg
.subsections_via_symbols
