	.file	"extr_buffer.c_indexbuffer_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Failed to create wined3d buffer, hr %#x.\n"
	.text
	.p2align 4
	.globl	indexbuffer_init
	.type	indexbuffer_init, @function
indexbuffer_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, r8d
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	mov	esi, ecx
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	rdi, r9
	sub	rsp, 48
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR WINED3DUSAGE_MASK[rip]
	mov	DWORD PTR 28[rsp], edx
	and	eax, ecx
	or	eax, DWORD PTR WINED3DUSAGE_STATICDECL[rip]
	cmp	QWORD PTR D3DPOOL_SCRATCH[rip], r9
	mov	DWORD PTR [rsp], eax
	jne	.L2
	or	eax, DWORD PTR WINED3DUSAGE_SCRATCH[rip]
	mov	DWORD PTR [rsp], eax
.L2:
	mov	eax, DWORD PTR WINED3D_BIND_INDEX_BUFFER[rip]
	mov	DWORD PTR 24[rsp], eax
	call	wined3daccess_from_d3dpool@PLT
	mov	edi, r12d
	mov	QWORD PTR 16[rsp], 0
	mov	QWORD PTR 8[rsp], 0
	mov	r8d, eax
	mov	eax, DWORD PTR WINED3D_RESOURCE_ACCESS_MAP_R[rip]
	or	eax, DWORD PTR WINED3D_RESOURCE_ACCESS_MAP_W[rip]
	or	eax, r8d
	mov	DWORD PTR 4[rsp], eax
	lea	rax, d3d9_indexbuffer_vtbl[rip]
	mov	QWORD PTR 24[rbx], rax
	call	wined3dformat_from_d3dformat@PLT
	lea	rdi, 12[rbx]
	mov	DWORD PTR 16[rbx], eax
	call	d3d9_resource_init@PLT
	xor	eax, eax
	call	wined3d_mutex_lock@PLT
	mov	edi, DWORD PTR 4[rbp]
	xor	edx, edx
	mov	rsi, rsp
	lea	r9, 8[rbx]
	lea	r8, d3d9_indexbuffer_wined3d_parent_ops[rip]
	mov	rcx, rbx
	call	wined3d_buffer_create@PLT
	mov	r12d, eax
	xor	eax, eax
	call	wined3d_mutex_unlock@PLT
	mov	edi, r12d
	call	FAILED@PLT
	test	rax, rax
	jne	.L8
	mov	QWORD PTR [rbx], rbp
	mov	rdi, rbp
	call	IDirect3DDevice9Ex_AddRef@PLT
	mov	r12d, DWORD PTR D3D_OK[rip]
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L9
	add	rsp, 48
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbx
	.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
.L8:
	.cfi_restore_state
	mov	esi, r12d
	lea	rdi, .LC0[rip]
	call	WARN@PLT
	jmp	.L1
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	indexbuffer_init, .-indexbuffer_init
	.comm	d3d9_indexbuffer_wined3d_parent_ops,4,4
	.comm	d3d9_indexbuffer_vtbl,4,4
	.comm	WINED3D_RESOURCE_ACCESS_MAP_W,4,4
	.comm	WINED3D_RESOURCE_ACCESS_MAP_R,4,4
	.comm	WINED3D_BIND_INDEX_BUFFER,4,4
	.comm	WINED3DUSAGE_STATICDECL,4,4
	.comm	WINED3DUSAGE_SCRATCH,4,4
	.comm	WINED3DUSAGE_MASK,4,4
	.comm	D3D_OK,4,4
	.comm	D3DPOOL_SCRATCH,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_buffer.c_indexbuffer_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to create wined3d buffer, hr %#x.\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	indexbuffer_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	indexbuffer_init, %function
indexbuffer_init:
	@ args = 8, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	sub	sp, sp, #40
	str	r2, [sp, #32]
	ldr	r2, .L10
	ldr	ip, .L10+4
	ldr	r2, [r2]
	str	r2, [sp, #36]
	mov	r2,#0
	ldr	lr, .L10+8
	ldr	ip, [ip]
	ldr	lr, [lr]
	ldr	r4, .L10+12
	and	ip, ip, r3
	orr	ip, ip, lr
	ldr	r5, [r4]
	ldr	lr, [sp, #60]
	str	ip, [sp, #12]
	cmp	r5, lr
	ldreq	r2, .L10+16
	mov	r6, r1
	ldreq	r2, [r2]
	mov	r1, r3
	orreq	ip, r2, ip
	ldr	r2, .L10+20
	mov	r4, r0
	ldr	r3, [r2]
	mov	r0, lr
	streq	ip, [sp, #12]
	str	r3, [sp, #28]
	bl	wined3daccess_from_d3dpool
	mov	r5, #0
	ldr	r2, .L10+24
	ldr	r3, .L10+28
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, .L10+32
	orr	r3, r3, r1
	orr	r3, r3, r0
	str	r2, [r4, #16]
	ldr	r0, [sp, #56]
	str	r3, [sp, #16]
	str	r5, [sp, #24]
	str	r5, [sp, #20]
	bl	wined3dformat_from_d3dformat
	mov	r3, r0
	add	r0, r4, #8
	str	r3, [r4, #12]
	bl	d3d9_resource_init
	bl	wined3d_mutex_lock
	ldr	r1, .L10+36
	add	r3, r4, #4
	stm	sp, {r1, r3}
	mov	r2, r5
	mov	r3, r4
	add	r1, sp, #12
	ldr	r0, [r6, #4]
	bl	wined3d_buffer_create
	mov	r5, r0
	bl	wined3d_mutex_unlock
	mov	r0, r5
	bl	FAILED
	cmp	r0, #0
	bne	.L8
	mov	r0, r6
	str	r6, [r4]
	bl	IDirect3DDevice9Ex_AddRef
	ldr	r3, .L10+40
	ldr	r5, [r3]
.L1:
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	mov	r0, r5
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, pc}
.L8:
	mov	r1, r5
	ldr	r0, .L10+44
	bl	WARN
	b	.L1
.L9:
	bl	__stack_chk_fail
.L11:
	.align	2
.L10:
	.word	.LC1
	.word	WINED3DUSAGE_MASK
	.word	WINED3DUSAGE_STATICDECL
	.word	D3DPOOL_SCRATCH
	.word	WINED3DUSAGE_SCRATCH
	.word	WINED3D_BIND_INDEX_BUFFER
	.word	WINED3D_RESOURCE_ACCESS_MAP_W
	.word	WINED3D_RESOURCE_ACCESS_MAP_R
	.word	d3d9_indexbuffer_vtbl
	.word	d3d9_indexbuffer_wined3d_parent_ops
	.word	D3D_OK
	.word	.LC0
	.size	indexbuffer_init, .-indexbuffer_init
	.comm	d3d9_indexbuffer_wined3d_parent_ops,4,4
	.comm	d3d9_indexbuffer_vtbl,4,4
	.comm	WINED3D_RESOURCE_ACCESS_MAP_W,4,4
	.comm	WINED3D_RESOURCE_ACCESS_MAP_R,4,4
	.comm	WINED3D_BIND_INDEX_BUFFER,4,4
	.comm	WINED3DUSAGE_STATICDECL,4,4
	.comm	WINED3DUSAGE_SCRATCH,4,4
	.comm	WINED3DUSAGE_MASK,4,4
	.comm	D3D_OK,4,4
	.comm	D3DPOOL_SCRATCH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
