	.file	"extr_mesh.c_parse_material_list.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"truncated data (%ld bytes)\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"number of material face indices (%u) doesn't match number of faces (%u)\n"
	.align 8
.LC2:
	.string	"face %u: reference to undefined material %u (only %u materials)\n"
	.align 8
.LC3:
	.string	"more materials defined than declared\n"
	.align 8
.LC4:
	.string	"only %u of %u materials defined\n"
	.text
	.p2align 4
	.type	parse_material_list, @function
parse_material_list:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	mov	rdi, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 48[rsp], 0
	call	destroy_materials@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	rdi, rbp
	lea	rdx, 40[rsp]
	lea	rsi, 28[rsp]
	call	[QWORD PTR 32[rax]]
	mov	edi, eax
	mov	r15d, eax
	call	FAILED@PLT
	test	rax, rax
	jne	.L1
	mov	esi, DWORD PTR 28[rsp]
	mov	r15d, DWORD PTR E_FAIL[rip]
	cmp	esi, 3
	jbe	.L36
	mov	rax, QWORD PTR 40[rsp]
	mov	r12d, DWORD PTR [rax]
	test	r12d, r12d
	je	.L37
	cmp	esi, 7
	jbe	.L8
	mov	r9d, DWORD PTR 4[rax]
	mov	edx, DWORD PTR [rbx]
	cmp	r9d, edx
	jne	.L38
	movsx	rcx, r9d
	movsx	rdx, esi
	lea	rcx, 8[0+rcx*4]
	cmp	rdx, rcx
	jb	.L8
	lea	ecx, -1[r9]
	xor	esi, esi
	test	r9d, r9d
	jg	.L12
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	lea	rdx, 1[rsi]
	cmp	rcx, rsi
	je	.L10
	mov	rsi, rdx
.L12:
	mov	edx, DWORD PTR 8[rax+rsi*4]
	cmp	edx, r12d
	jl	.L11
	mov	ecx, r12d
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	WARN@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L37:
	mov	r15d, DWORD PTR D3D_OK[rip]
.L4:
	mov	rdi, QWORD PTR 48[rsp]
	test	rdi, rdi
	je	.L20
	call	IUnknown_Release@PLT
.L20:
	mov	rax, QWORD PTR 0[rbp]
	mov	rdi, rbp
	call	[QWORD PTR [rax]]
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L39
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L38:
	.cfi_restore_state
	mov	esi, r9d
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	WARN@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L36:
	lea	rdi, .LC0[rip]
	call	WARN@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	WARN@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	xor	eax, eax
	call	GetProcessHeap@PLT
	xor	esi, esi
	lea	edx, 0[0+r12*4]
	mov	edi, eax
	call	HeapAlloc@PLT
	mov	r13d, DWORD PTR [rbx]
	mov	QWORD PTR 8[rbx], rax
	xor	eax, eax
	call	GetProcessHeap@PLT
	xor	esi, esi
	mov	edx, r13d
	mov	edi, eax
	call	HeapAlloc@PLT
	cmp	QWORD PTR 8[rbx], 0
	mov	QWORD PTR 16[rbx], rax
	mov	rdi, rax
	je	.L24
	test	rax, rax
	je	.L24
	mov	eax, DWORD PTR [rbx]
	lea	edx, 0[0+rax*4]
	mov	rax, QWORD PTR 40[rsp]
	lea	rsi, 8[rax]
	call	memcpy@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	rdi, rbp
	lea	rsi, 36[rsp]
	call	[QWORD PTR 24[rax]]
	mov	edi, eax
	mov	r15d, eax
	call	FAILED@PLT
	test	rax, rax
	jne	.L4
	mov	edx, DWORD PTR 36[rsp]
	test	edx, edx
	jle	.L15
	lea	rax, 48[rsp]
	xor	r13d, r13d
	lea	r14, 32[rsp]
	mov	QWORD PTR 8[rsp], rax
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rax, QWORD PTR 0[rbp]
	mov	rdi, rbp
	mov	rdx, QWORD PTR 8[rsp]
	mov	esi, r13d
	call	[QWORD PTR 16[rax]]
	mov	edi, eax
	mov	r15d, eax
	call	FAILED@PLT
	test	rax, rax
	jne	.L4
	mov	rdi, QWORD PTR 48[rsp]
	mov	rsi, r14
	mov	rax, QWORD PTR [rdi]
	call	[QWORD PTR 8[rax]]
	mov	edi, eax
	mov	r15d, eax
	call	FAILED@PLT
	test	rax, rax
	jne	.L4
	lea	rsi, TID_D3DRMMaterial[rip]
	mov	rdi, r14
	call	IsEqualGUID@PLT
	test	rax, rax
	je	.L16
	mov	eax, DWORD PTR 4[rbx]
	cmp	eax, r12d
	jge	.L40
	lea	edx, 1[rax]
	movsx	rsi, eax
	mov	rax, QWORD PTR 8[rbx]
	mov	rdi, QWORD PTR 48[rsp]
	mov	DWORD PTR 4[rbx], edx
	lea	rsi, [rax+rsi*4]
	call	parse_material@PLT
	mov	edi, eax
	mov	r15d, eax
	call	FAILED@PLT
	test	rax, rax
	jne	.L4
.L16:
	mov	rdi, QWORD PTR 48[rsp]
	add	r13d, 1
	call	IUnknown_Release@PLT
	mov	QWORD PTR 48[rsp], 0
	cmp	DWORD PTR 36[rsp], r13d
	jg	.L18
	mov	edx, DWORD PTR 4[rbx]
	cmp	r12d, edx
	je	.L20
.L21:
	mov	esi, r12d
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	WARN@PLT
	mov	r15d, DWORD PTR E_FAIL[rip]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L24:
	mov	r15d, DWORD PTR E_OUTOFMEMORY[rip]
	jmp	.L4
.L40:
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	WARN@PLT
	mov	r15d, DWORD PTR E_FAIL[rip]
	jmp	.L4
.L15:
	mov	edx, DWORD PTR 4[rbx]
	cmp	edx, r12d
	je	.L4
	jmp	.L21
.L39:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	parse_material_list, .-parse_material_list
	.comm	TID_D3DRMMaterial,4,4
	.comm	E_OUTOFMEMORY,4,4
	.comm	E_FAIL,4,4
	.comm	D3D_OK,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_mesh.c_parse_material_list.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"truncated data (%ld bytes)\012\000"
	.align	2
.LC1:
	.ascii	"number of material face indices (%u) doesn't match "
	.ascii	"number of faces (%u)\012\000"
	.align	2
.LC2:
	.ascii	"face %u: reference to undefined material %u (only %"
	.ascii	"u materials)\012\000"
	.align	2
.LC3:
	.ascii	"more materials defined than declared\012\000"
	.align	2
.LC4:
	.ascii	"only %u of %u materials defined\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_material_list, %function
parse_material_list:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r3, #0
	mov	r5, r0
	ldr	r2, .L39
	sub	sp, sp, #28
	mov	r0, r1
	ldr	r2, [r2]
	str	r2, [sp, #20]
	mov	r2,#0
	mov	r6, r1
	str	r3, [sp, #12]
	bl	destroy_materials
	ldr	r3, [r5]
	mov	r1, sp
	ldr	r3, [r3, #16]
	add	r2, sp, #4
	mov	r0, r5
	blx	r3
	mov	r4, r0
	bl	FAILED
	subs	ip, r0, #0
	bne	.L1
	ldr	r1, [sp]
	ldr	r8, .L39+4
	cmp	r1, #3
	ldr	r4, [r8]
	bls	.L8
	ldr	r3, [sp, #4]
	ldr	r7, [r3]
	cmp	r7, #0
	beq	.L34
	cmp	r1, #7
	bls	.L8
	ldr	r0, [r3, #4]
	ldr	r2, [r6]
	cmp	r0, r2
	bne	.L35
	add	r0, r2, #2
	cmp	r1, r0, lsl #2
	bcc	.L8
	cmp	r2, #0
	addgt	r3, r3, #8
	bgt	.L12
	b	.L10
.L11:
	add	ip, ip, #1
	cmp	r2, ip
	beq	.L10
.L12:
	ldr	r1, [r3], #4
	cmp	r1, r7
	blt	.L11
	mov	r2, r1
	mov	r3, r7
	mov	r1, ip
	ldr	r0, .L39+8
	bl	WARN
	b	.L4
.L8:
	ldr	r0, .L39+12
	bl	WARN
.L4:
	ldr	r0, [sp, #12]
	cmp	r0, #0
	beq	.L19
	bl	IUnknown_Release
.L19:
	ldr	r3, [r5]
	mov	r0, r5
	ldr	r3, [r3]
	blx	r3
.L1:
	ldr	r3, .L39
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L36
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L34:
	ldr	r3, .L39+16
	ldr	r4, [r3]
	b	.L4
.L35:
	mov	r1, r0
	ldr	r0, .L39+20
	bl	WARN
	b	.L4
.L10:
	bl	GetProcessHeap
	mov	r1, #0
	lsl	r2, r7, #2
	bl	HeapAlloc
	str	r0, [r6, #8]
	bl	GetProcessHeap
	ldr	r2, [r6]
	mov	r1, #0
	bl	HeapAlloc
	ldr	r2, [r6, #8]
	str	r0, [r6, #12]
	cmp	r0, #0
	cmpne	r2, #0
	beq	.L37
	ldr	r2, [r6]
	ldr	r1, [sp, #4]
	lsl	r2, r2, #2
	add	r1, r1, #8
	bl	memcpy
	ldr	r3, [r5]
	add	r1, sp, #16
	ldr	r3, [r3, #12]
	mov	r0, r5
	blx	r3
	mov	r4, r0
	bl	FAILED
	subs	r9, r0, #0
	bne	.L4
	ldr	r3, [sp, #16]
	cmp	r3, #0
	ble	.L14
	mov	fp, r9
	ldr	r10, .L39+24
.L17:
	ldr	r3, [r5]
	mov	r1, r9
	ldr	r3, [r3, #8]
	add	r2, sp, #12
	mov	r0, r5
	blx	r3
	mov	r4, r0
	bl	FAILED
	cmp	r0, #0
	bne	.L4
	ldr	r0, [sp, #12]
	add	r1, sp, #8
	ldr	r3, [r0]
	ldr	r3, [r3, #4]
	blx	r3
	mov	r4, r0
	bl	FAILED
	cmp	r0, #0
	bne	.L4
	mov	r1, r10
	add	r0, sp, #8
	bl	IsEqualGUID
	cmp	r0, #0
	beq	.L15
	ldr	r3, [r6, #4]
	cmp	r3, r7
	bge	.L38
	ldr	r1, [r6, #8]
	add	r2, r3, #1
	add	r1, r1, r3, lsl #2
	str	r2, [r6, #4]
	ldr	r0, [sp, #12]
	bl	parse_material
	mov	r4, r0
	bl	FAILED
	cmp	r0, #0
	bne	.L4
.L15:
	ldr	r0, [sp, #12]
	bl	IUnknown_Release
	ldr	r3, [sp, #16]
	add	r9, r9, #1
	cmp	r3, r9
	str	fp, [sp, #12]
	bgt	.L17
	ldr	r2, [r6, #4]
	cmp	r7, r2
	beq	.L19
.L20:
	mov	r1, r7
	ldr	r0, .L39+28
	bl	WARN
	ldr	r4, [r8]
	b	.L4
.L37:
	ldr	r3, .L39+32
	ldr	r4, [r3]
	b	.L4
.L38:
	ldr	r0, .L39+36
	bl	WARN
	ldr	r4, [r8]
	b	.L4
.L14:
	ldr	r2, [r6, #4]
	cmp	r2, r7
	beq	.L4
	b	.L20
.L36:
	bl	__stack_chk_fail
.L40:
	.align	2
.L39:
	.word	.LC5
	.word	E_FAIL
	.word	.LC2
	.word	.LC0
	.word	D3D_OK
	.word	.LC1
	.word	TID_D3DRMMaterial
	.word	.LC4
	.word	E_OUTOFMEMORY
	.word	.LC3
	.size	parse_material_list, .-parse_material_list
	.comm	TID_D3DRMMaterial,4,4
	.comm	E_OUTOFMEMORY,4,4
	.comm	E_FAIL,4,4
	.comm	D3D_OK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
