	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_CheckOverflow               ## -- Begin function RB_CheckOverflow
	.p2align	4, 0x90
_RB_CheckOverflow:                      ## @RB_CheckOverflow
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %ebx
	movq	_tess@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	addl	%edi, %eax
	movq	_SHADER_MAX_VERTEXES@GOTPCREL(%rip), %r12
	cmpl	(%r12), %eax
	jge	LBB0_2
## %bb.1:
	movl	4(%r15), %eax
	addl	%r14d, %eax
	movq	_SHADER_MAX_INDEXES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_2
## %bb.7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%eax, %eax
	callq	_RB_EndSurface
	movl	(%r12), %ecx
	cmpl	%ebx, %ecx
	jg	LBB0_4
## %bb.3:
	movq	_ri@GOTPCREL(%rip), %rax
	movq	_ERR_DROP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	*(%rax)
LBB0_4:
	movq	_SHADER_MAX_INDEXES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%r14d, %ecx
	jg	LBB0_6
## %bb.5:
	movq	_ri@GOTPCREL(%rip), %rax
	movq	_ERR_DROP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	callq	*(%rax)
LBB0_6:
	movl	8(%r15), %esi
	movl	12(%r15), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RB_BeginSurface                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_tess,16,2                      ## @tess
	.comm	_SHADER_MAX_VERTEXES,4,2        ## @SHADER_MAX_VERTEXES
	.comm	_SHADER_MAX_INDEXES,4,2         ## @SHADER_MAX_INDEXES
	.comm	_ri,8,3                         ## @ri
	.comm	_ERR_DROP,4,2                   ## @ERR_DROP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RB_CheckOverflow: verts > MAX (%d > %d)"

L_.str.1:                               ## @.str.1
	.asciz	"RB_CheckOverflow: indices > MAX (%d > %d)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_CheckOverflow               ; -- Begin function RB_CheckOverflow
	.p2align	2
_RB_CheckOverflow:                      ; @RB_CheckOverflow
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _tess@GOTPAGE
Lloh1:
	ldr	x21, [x21, _tess@GOTPAGEOFF]
Lloh2:
	adrp	x23, _SHADER_MAX_VERTEXES@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SHADER_MAX_VERTEXES@GOTPAGEOFF]
	ldr	w8, [x21]
	ldr	w9, [x23]
	add	w8, w8, w0
	cmp	w8, w9
Lloh4:
	adrp	x22, _SHADER_MAX_INDEXES@GOTPAGE
Lloh5:
	ldr	x22, [x22, _SHADER_MAX_INDEXES@GOTPAGEOFF]
	b.ge	LBB0_3
; %bb.1:
	ldr	w8, [x21, #4]
	ldr	w9, [x22]
	add	w8, w8, w19
	cmp	w8, w9
	b.ge	LBB0_3
; %bb.2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
	bl	_RB_EndSurface
	ldr	w3, [x23]
	cmp	w3, w20
	b.gt	LBB0_5
; %bb.4:
Lloh6:
	adrp	x8, _ri@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _ERR_DROP@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ERR_DROP@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x9]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	blr	x8
LBB0_5:
	ldr	w3, [x22]
	cmp	w3, w19
	b.gt	LBB0_7
; %bb.6:
Lloh14:
	adrp	x8, _ri@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
Lloh17:
	adrp	x9, _ERR_DROP@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ERR_DROP@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x9]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	blr	x8
LBB0_7:
	ldp	w1, w0, [x21, #8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_RB_BeginSurface
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_tess,16,2                      ; @tess
	.comm	_SHADER_MAX_VERTEXES,4,2        ; @SHADER_MAX_VERTEXES
	.comm	_SHADER_MAX_INDEXES,4,2         ; @SHADER_MAX_INDEXES
	.comm	_ri,8,3                         ; @ri
	.comm	_ERR_DROP,4,2                   ; @ERR_DROP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RB_CheckOverflow: verts > MAX (%d > %d)"

l_.str.1:                               ; @.str.1
	.asciz	"RB_CheckOverflow: indices > MAX (%d > %d)"

.subsections_via_symbols
