	.file	"extr_surface_meta.c_FindMetaVertex.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	FindMetaVertex, @function
FindMetaVertex:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR metaVerts[rip]
	movsx	rdx, DWORD PTR firstSearchMetaVert[rip]
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	lea	rbx, [rax+rdx*4]
	movsx	rax, DWORD PTR numMetaVerts[rip]
	cmp	edx, eax
	jge	.L2
	mov	r12, rdx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	movsx	rax, DWORD PTR numMetaVerts[rip]
	add	r12d, 1
	add	rbx, 4
	cmp	eax, r12d
	jle	.L2
.L4:
	mov	edx, 4
	mov	rsi, rbx
	mov	rdi, rbp
	call	memcmp@PLT
	test	rax, rax
	jne	.L17
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edx, DWORD PTR maxMetaVerts[rip]
	mov	rbx, QWORD PTR metaVerts[rip]
	cmp	eax, edx
	jge	.L18
.L6:
	lea	rdi, [rbx+rax*4]
	mov	rsi, rbp
	mov	edx, 4
	call	memcpy@PLT
	mov	r12d, DWORD PTR numMetaVerts[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	lea	eax, 1[r12]
	mov	DWORD PTR numMetaVerts[rip], eax
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	add	edx, DWORD PTR GROW_META_VERTS[rip]
	lea	edi, 0[0+rdx*4]
	mov	DWORD PTR maxMetaVerts[rip], edx
	call	safe_malloc@PLT
	mov	rsi, QWORD PTR metaVerts[rip]
	mov	rbx, rax
	test	rsi, rsi
	je	.L7
	mov	eax, DWORD PTR numMetaVerts[rip]
	mov	rdi, rbx
	lea	edx, 0[0+rax*4]
	call	memcpy@PLT
	mov	rdi, QWORD PTR metaVerts[rip]
	call	free@PLT
.L7:
	mov	QWORD PTR metaVerts[rip], rbx
	movsx	rax, DWORD PTR numMetaVerts[rip]
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	FindMetaVertex, .-FindMetaVertex
	.comm	numMetaVerts,4,4
	.comm	metaVerts,8,8
	.comm	maxMetaVerts,4,4
	.comm	firstSearchMetaVert,4,4
	.comm	GROW_META_VERTS,8,8
	.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_surface_meta.c_FindMetaVertex.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	FindMetaVertex, %function
FindMetaVertex:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L18
	ldr	r8, .L18+4
	ldr	r10, .L18+8
	ldr	r4, [r3]
	ldr	r7, [r8]
	ldr	r9, [r10]
	cmp	r4, r7
	mov	r6, r0
	add	r5, r9, r4, lsl #2
	blt	.L4
	b	.L2
.L16:
	add	r4, r4, #1
	cmp	r4, r7
	add	r5, r5, #4
	beq	.L2
.L4:
	mov	r2, #4
	mov	r1, r5
	mov	r0, r6
	bl	memcmp
	cmp	r0, #0
	bne	.L16
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	ldr	r2, .L18+12
	ldr	r3, [r2]
	cmp	r3, r7
	ble	.L17
.L5:
	mov	r1, r6
	mov	r2, #4
	add	r0, r9, r7, lsl #2
	bl	memcpy
	ldr	r4, [r8]
	add	r3, r4, #1
	mov	r0, r4
	str	r3, [r8]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L17:
	ldr	r1, .L18+16
	ldr	r1, [r1]
	add	r3, r3, r1
	lsl	r0, r3, #2
	str	r3, [r2]
	bl	safe_malloc
	ldr	r1, [r10]
	mov	r9, r0
	cmp	r1, #0
	beq	.L6
	ldr	r2, [r8]
	lsl	r2, r2, #2
	bl	memcpy
	ldr	r0, [r10]
	bl	free
.L6:
	ldr	r7, [r8]
	str	r9, [r10]
	b	.L5
.L19:
	.align	2
.L18:
	.word	firstSearchMetaVert
	.word	numMetaVerts
	.word	metaVerts
	.word	maxMetaVerts
	.word	GROW_META_VERTS
	.size	FindMetaVertex, .-FindMetaVertex
	.comm	numMetaVerts,4,4
	.comm	metaVerts,4,4
	.comm	maxMetaVerts,4,4
	.comm	firstSearchMetaVert,4,4
	.comm	GROW_META_VERTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
