	.file	"extr_tr_surface.c_RB_CheckOverflow.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"RB_CheckOverflow: verts > MAX (%d > %d)"
	.align 8
.LC1:
	.string	"RB_CheckOverflow: indices > MAX (%d > %d)"
	.text
	.p2align 4
	.globl	RB_CheckOverflow
	.type	RB_CheckOverflow, @function
RB_CheckOverflow:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	eax, DWORD PTR tess[rip]
	add	eax, edi
	cmp	eax, DWORD PTR SHADER_MAX_VERTEXES[rip]
	jge	.L2
	mov	eax, DWORD PTR tess[rip+4]
	add	eax, esi
	cmp	eax, DWORD PTR SHADER_MAX_INDEXES[rip]
	jl	.L1
.L2:
	xor	eax, eax
	call	RB_EndSurface@PLT
	mov	ecx, DWORD PTR SHADER_MAX_VERTEXES[rip]
	cmp	ecx, r12d
	jg	.L4
	mov	edi, DWORD PTR ERR_DROP[rip]
	mov	edx, r12d
	lea	rsi, .LC0[rip]
	call	[QWORD PTR ri[rip]]
.L4:
	mov	ecx, DWORD PTR SHADER_MAX_INDEXES[rip]
	cmp	ecx, r13d
	jg	.L5
	mov	edi, DWORD PTR ERR_DROP[rip]
	mov	edx, r13d
	lea	rsi, .LC1[rip]
	call	[QWORD PTR ri[rip]]
.L5:
	mov	edx, DWORD PTR tess[rip+8]
	mov	esi, DWORD PTR tess[rip+12]
	mov	edi, DWORD PTR tess[rip+16]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	RB_BeginSurface@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	RB_CheckOverflow, .-RB_CheckOverflow
	.comm	tess,20,16
	.comm	ri,8,8
	.comm	SHADER_MAX_VERTEXES,4,4
	.comm	SHADER_MAX_INDEXES,4,4
	.comm	ERR_DROP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_tr_surface.c_RB_CheckOverflow.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"RB_CheckOverflow: verts > MAX (%d > %d)\000"
	.align	2
.LC1:
	.ascii	"RB_CheckOverflow: indices > MAX (%d > %d)\000"
	.text
	.align	2
	.global	RB_CheckOverflow
	.syntax unified
	.arm
	.fpu softvfp
	.type	RB_CheckOverflow, %function
RB_CheckOverflow:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r5, .L10
	ldr	r7, .L10+4
	ldr	r3, [r5]
	ldr	r2, [r7]
	add	r3, r0, r3
	cmp	r3, r2
	mov	r4, r0
	mov	r6, r1
	ldr	r8, .L10+8
	bge	.L2
	ldr	r3, [r5, #4]
	ldr	r2, [r8]
	add	r3, r1, r3
	cmp	r3, r2
	poplt	{r4, r5, r6, r7, r8, pc}
.L2:
	bl	RB_EndSurface
	ldr	r3, [r7]
	cmp	r3, r4
	bgt	.L4
	ldr	r1, .L10+12
	ldr	r0, .L10+16
	mov	r2, r4
	ldr	r0, [r0]
	ldr	r4, [r1]
	ldr	r1, .L10+20
	blx	r4
.L4:
	ldr	r3, [r8]
	cmp	r3, r6
	bgt	.L5
	ldr	r1, .L10+12
	ldr	r0, .L10+16
	ldr	r4, [r1]
	mov	r2, r6
	ldr	r0, [r0]
	ldr	r1, .L10+24
	blx	r4
.L5:
	ldr	r2, [r5, #8]
	ldr	r1, [r5, #12]
	ldr	r0, [r5, #16]
	pop	{r4, r5, r6, r7, r8, lr}
	b	RB_BeginSurface
.L11:
	.align	2
.L10:
	.word	tess
	.word	SHADER_MAX_VERTEXES
	.word	SHADER_MAX_INDEXES
	.word	ri
	.word	ERR_DROP
	.word	.LC0
	.word	.LC1
	.size	RB_CheckOverflow, .-RB_CheckOverflow
	.comm	tess,20,4
	.comm	ri,4,4
	.comm	SHADER_MAX_VERTEXES,4,4
	.comm	SHADER_MAX_INDEXES,4,4
	.comm	ERR_DROP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
