	.file	"extr_device.c_InitD3D9ResourceManager.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Could not allocate texture heap"
	.text
	.p2align 4
	.type	InitD3D9ResourceManager, @function
InitD3D9ResourceManager:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	mov	edi, 1
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rax, QWORD PTR [rsi]
	mov	esi, DWORD PTR [rax]
	call	max@PLT
	lea	rdi, 16[rbp]
	mov	ebx, eax
	lea	eax, [rax+rax*2]
	lea	esi, 4[0+rax*4]
	call	AlignedAlloc@PLT
	mov	edi, eax
	call	FAILED@PLT
	test	rax, rax
	jne	.L6
	mov	DWORD PTR 0[rbp], ebx
	mov	eax, DWORD PTR D3D_OK[rip]
	mov	QWORD PTR 8[rbp], r12
	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
.L6:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	call	DPRINT1@PLT
	pop	rbx
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR DDERR_OUTOFMEMORY[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	InitD3D9ResourceManager, .-InitD3D9ResourceManager
	.comm	DDERR_OUTOFMEMORY,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_device.c_InitD3D9ResourceManager.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Could not allocate texture heap\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	InitD3D9ResourceManager, %function
InitD3D9ResourceManager:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r1]
	push	{r4, r5, r6, lr}
	mov	r5, r0
	mov	r6, r1
	mov	r0, #1
	ldr	r1, [r3]
	bl	max
	add	r3, r0, r0, lsl #1
	lsl	r3, r3, #2
	add	r1, r3, #4
	mov	r4, r0
	add	r0, r5, #8
	bl	AlignedAlloc
	bl	FAILED
	cmp	r0, #0
	bne	.L6
	ldr	r3, .L7
	str	r4, [r5]
	ldr	r0, [r3]
	str	r6, [r5, #4]
	pop	{r4, r5, r6, pc}
.L6:
	ldr	r0, .L7+4
	bl	DPRINT1
	ldr	r3, .L7+8
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L8:
	.align	2
.L7:
	.word	D3D_OK
	.word	.LC0
	.word	DDERR_OUTOFMEMORY
	.size	InitD3D9ResourceManager, .-InitD3D9ResourceManager
	.comm	DDERR_OUTOFMEMORY,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
