	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_R_InstallSpriteLump            ## -- Begin function R_InstallSpriteLump
	.p2align	4, 0x90
_R_InstallSpriteLump:                   ## @R_InstallSpriteLump
	.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	%edx, %r12d
	movl	%esi, %r15d
	movl	%edi, %ebx
	cmpl	$28, %esi
	ja	LBB0_2
## %bb.1:
	cmpl	$9, %r12d
	jb	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	movq	%rcx, %r14
	callq	_I_Error
	movq	%r14, %rcx
LBB0_3:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	_maxframe@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jge	LBB0_5
## %bb.4:
	movl	%r15d, (%rax)
LBB0_5:
	movq	_sprtemp@GOTPCREL(%rip), %r9
	movq	(%r9), %rax
	movl	%r15d, %r14d
	leaq	(%r14,%r14,2), %r13
	movl	(%rax,%r13,8), %edx
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.11:
	movq	%rcx, %r14
	testl	%edx, %edx
	jne	LBB0_13
## %bb.12:
	movq	_spritename@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	65(%r15), %edx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	movq	%r9, %rbx
	callq	_I_Error
	movq	%rbx, %r9
	movq	(%rbx), %rax
LBB0_13:
	movl	$1, (%rax,%r13,8)
	leal	-1(%r12), %ebx
	movq	8(%rax,%r13,8), %rcx
	cmpl	$-1, (%rcx,%rbx,4)
	je	LBB0_15
## %bb.14:
	movq	_spritename@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	$65, %r15d
	addl	$48, %r12d
	leaq	L_.str.3(%rip), %rdi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	movq	%r9, %r15
	callq	_I_Error
	movq	(%r15), %rax
	movq	8(%rax,%r13,8), %rcx
LBB0_15:
	movq	_firstspritelump@GOTPCREL(%rip), %rdx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	subl	(%rdx), %esi
	movl	%esi, (%rcx,%rbx,4)
	leaq	(%rax,%r13,8), %rax
	addq	$16, %rax
	jmp	LBB0_16
LBB0_6:
	testl	%edx, %edx
	je	LBB0_7
## %bb.8:
	cmpl	$1, %edx
	jne	LBB0_10
LBB0_9:
	movq	_spritename@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	$65, %r15d
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	movq	%rcx, %r15
	movq	%r9, %rbx
	callq	_I_Error
	movq	%rbx, %r9
	movq	%r15, %rcx
	movq	(%rbx), %rax
LBB0_10:
	shlq	$3, %r14
	leaq	(%r14,%r14,2), %rbx
	movl	$0, (%rax,%rbx)
	movq	_firstspritelump@GOTPCREL(%rip), %rdx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	%r8d, %esi
	subl	(%rdx), %esi
	movq	8(%rax,%rbx), %rdi
	movl	%esi, (%rdi)
	movq	16(%rax,%rbx), %rax
	movq	%rcx, (%rax)
	subl	(%rdx), %r8d
	movq	(%r9), %rdx
	movq	8(%rdx,%rbx), %rax
	movl	%r8d, 4(%rax)
	leaq	(%rdx,%rbx), %rax
	addq	$16, %rax
	movq	16(%rdx,%rbx), %rsi
	movq	%rcx, 8(%rsi)
	movq	8(%rdx,%rbx), %rsi
	movl	%r8d, 8(%rsi)
	movq	16(%rdx,%rbx), %rsi
	movq	%rcx, 16(%rsi)
	movq	8(%rdx,%rbx), %rsi
	movl	%r8d, 12(%rsi)
	movq	16(%rdx,%rbx), %rsi
	movq	%rcx, 24(%rsi)
	movq	8(%rdx,%rbx), %rsi
	movl	%r8d, 16(%rsi)
	movq	16(%rdx,%rbx), %rsi
	movq	%rcx, 32(%rsi)
	movq	8(%rdx,%rbx), %rsi
	movl	%r8d, 20(%rsi)
	movq	16(%rdx,%rbx), %rsi
	movq	%rcx, 40(%rsi)
	movq	8(%rdx,%rbx), %rsi
	movl	%r8d, 24(%rsi)
	movq	16(%rdx,%rbx), %rsi
	movq	%rcx, 48(%rsi)
	movq	8(%rdx,%rbx), %rdx
	movl	%r8d, 28(%rdx)
	movq	%rcx, %r14
	movl	$7, %ebx
LBB0_16:
	movq	(%rax), %rax
	movq	%r14, (%rax,%rbx,8)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_spritename@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	65(%r15), %edx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	movq	%rcx, %rbx
	movq	%r9, %r12
	callq	_I_Error
	movq	%r12, %r9
	movq	%rbx, %rcx
	movq	(%r12), %rax
	movl	(%rax,%r13,8), %edx
	cmpl	$1, %edx
	je	LBB0_9
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"R_InstallSpriteLump: Bad frame characters in lump %i"

	.comm	_maxframe,4,2                   ## @maxframe
	.comm	_sprtemp,8,3                    ## @sprtemp
L_.str.1:                               ## @.str.1
	.asciz	"R_InitSprites: Sprite %s frame %c has multip rot=0 lump"

	.comm	_spritename,4,2                 ## @spritename
L_.str.2:                               ## @.str.2
	.asciz	"R_InitSprites: Sprite %s frame %c has rotations and a rot=0 lump"

	.comm	_firstspritelump,4,2            ## @firstspritelump
L_.str.3:                               ## @.str.3
	.asciz	"R_InitSprites: Sprite %s : %c : %c has two lumps mapped to it"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_R_InstallSpriteLump            ; -- Begin function R_InstallSpriteLump
	.p2align	2
_R_InstallSpriteLump:                   ; @R_InstallSpriteLump
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	cmp	w1, #28
	b.hi	LBB0_2
; %bb.1:
	cmp	w22, #9
	b.lo	LBB0_3
LBB0_2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_I_Error
LBB0_3:
Lloh2:
	adrp	x8, _maxframe@GOTPAGE
Lloh3:
	ldr	x8, [x8, _maxframe@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, w21
	b.ge	LBB0_5
; %bb.4:
	str	w21, [x8]
LBB0_5:
Lloh4:
	adrp	x24, _sprtemp@GOTPAGE
Lloh5:
	ldr	x24, [x24, _sprtemp@GOTPAGEOFF]
	ldr	x8, [x24]
	mov	w23, w21
	mov	w9, #24
	umull	x9, w21, w9
	ldr	w9, [x8, x9]
	cbz	w22, LBB0_11
; %bb.6:
Lloh6:
	adrp	x26, _spritename@GOTPAGE
Lloh7:
	ldr	x26, [x26, _spritename@GOTPAGEOFF]
	cbnz	w9, LBB0_8
; %bb.7:
	ldr	w1, [x26]
	add	w8, w21, #65
	str	x8, [sp]
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_I_Error
	ldr	x8, [x24]
LBB0_8:
	mov	w9, #24
	madd	x9, x23, x9, x8
	mov	w10, #1
	str	w10, [x9]
	sub	w25, w22, #1
	ldr	x9, [x9, #8]
	ldr	w10, [x9, w25, uxtw #2]
	cmn	w10, #1
	b.eq	LBB0_10
; %bb.9:
	ldr	w1, [x26]
	add	w8, w21, #65
	add	w9, w22, #48
	stp	x8, x9, [sp]
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_I_Error
	ldr	x8, [x24]
	mov	w9, #24
	madd	x9, x23, x9, x8
	ldr	x9, [x9, #8]
LBB0_10:
Lloh12:
	adrp	x10, _firstspritelump@GOTPAGE
Lloh13:
	ldr	x10, [x10, _firstspritelump@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	sub	w10, w20, w10
	str	w10, [x9, x25, lsl #2]
	mov	w9, #24
	madd	x8, x23, x9, x8
	add	x8, x8, #16
	b	LBB0_15
LBB0_11:
	cbz	w9, LBB0_16
; %bb.12:
	cmp	w9, #1
	b.ne	LBB0_14
LBB0_13:
Lloh15:
	adrp	x8, _spritename@GOTPAGE
Lloh16:
	ldr	x8, [x8, _spritename@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	w8, w21, #65
	str	x8, [sp]
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_I_Error
	ldr	x8, [x24]
LBB0_14:
	add	x9, x23, x23, lsl #1
	lsl	x9, x9, #3
	add	x8, x8, x9
	str	wzr, [x8]
Lloh20:
	adrp	x10, _firstspritelump@GOTPAGE
Lloh21:
	ldr	x10, [x10, _firstspritelump@GOTPAGEOFF]
	ldr	w11, [x10]
	sub	w11, w20, w11
	ldp	x12, x8, [x8, #8]
	str	w11, [x12]
	str	x19, [x8]
	ldr	w8, [x10]
	sub	w10, w20, w8
	ldr	x8, [x24]
	add	x8, x8, x9
	ldr	x9, [x8, #16]!
	ldur	x11, [x8, #-8]
	str	w10, [x11, #4]
	str	x19, [x9, #8]
	ldur	x9, [x8, #-8]
	str	w10, [x9, #8]
	ldr	x9, [x8]
	str	x19, [x9, #16]
	ldur	x9, [x8, #-8]
	str	w10, [x9, #12]
	ldr	x9, [x8]
	str	x19, [x9, #24]
	ldur	x9, [x8, #-8]
	str	w10, [x9, #16]
	ldr	x9, [x8]
	str	x19, [x9, #32]
	ldur	x9, [x8, #-8]
	str	w10, [x9, #20]
	ldr	x9, [x8]
	str	x19, [x9, #40]
	ldur	x9, [x8, #-8]
	str	w10, [x9, #24]
	ldr	x9, [x8]
	str	x19, [x9, #48]
	ldur	x9, [x8, #-8]
	str	w10, [x9, #28]
	mov	w25, #7
LBB0_15:
	ldr	x8, [x8]
	str	x19, [x8, x25, lsl #3]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_16:
Lloh22:
	adrp	x8, _spritename@GOTPAGE
Lloh23:
	ldr	x8, [x8, _spritename@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	add	w8, w21, #65
	str	x8, [sp]
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_I_Error
	ldr	x8, [x24]
	mov	w9, #24
	mul	x9, x23, x9
	ldr	w9, [x8, x9]
	cmp	w9, #1
	b.eq	LBB0_13
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"R_InstallSpriteLump: Bad frame characters in lump %i"

	.comm	_maxframe,4,2                   ; @maxframe
	.comm	_sprtemp,8,3                    ; @sprtemp
l_.str.1:                               ; @.str.1
	.asciz	"R_InitSprites: Sprite %s frame %c has multip rot=0 lump"

	.comm	_spritename,4,2                 ; @spritename
l_.str.2:                               ; @.str.2
	.asciz	"R_InitSprites: Sprite %s frame %c has rotations and a rot=0 lump"

	.comm	_firstspritelump,4,2            ; @firstspritelump
l_.str.3:                               ; @.str.3
	.asciz	"R_InitSprites: Sprite %s : %c : %c has two lumps mapped to it"

.subsections_via_symbols
