	.file	"extr_lolvldrv.c_MMDRV_Alloc.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"(%d, %04x, %p, %p, %p, %p)\n"
.LC1:
	.string	"Too many open drivers\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"Shouldn't happen. Bad allocation scheme\n"
	.text
	.p2align 4
	.globl	MMDRV_Alloc
	.type	MMDRV_Alloc, @function
MMDRV_Alloc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, r8
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, r9
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edi
	sub	rsp, 32
	.cfi_def_cfa_offset 88
	push	r9
	.cfi_def_cfa_offset 96
	mov	r9, r8
	mov	r8, rcx
	mov	rcx, rdx
	mov	edx, esi
	mov	esi, edi
	lea	rdi, .LC0[rip]
	call	TRACE@PLT
	mov	esi, DWORD PTR HEAP_ZERO_MEMORY[rip]
	xor	eax, eax
	mov	DWORD PTR 24[rsp], esi
	call	GetProcessHeap@PLT
	mov	esi, DWORD PTR 24[rsp]
	mov	edx, ebx
	mov	edi, eax
	call	HeapAlloc@PLT
	pop	rdx
	.cfi_def_cfa_offset 88
	pop	rcx
	.cfi_def_cfa_offset 80
	mov	rbx, rax
	test	rax, rax
	je	.L1
	mov	rcx, QWORD PTR MAX_MM_MLDRVS[rip]
	test	rcx, rcx
	je	.L3
	mov	rdx, QWORD PTR MM_MLDrvs[rip]
	xor	eax, eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L20:
	add	rax, 1
	add	rdx, 8
	cmp	rcx, rax
	je	.L3
.L5:
	cmp	QWORD PTR [rdx], 0
	jne	.L20
	or	ah, -128
	mov	QWORD PTR [rdx], rbx
	mov	edi, r14d
	mov	rdx, rax
	mov	QWORD PTR [r15], rdx
	mov	DWORD PTR 20[rbx], r14d
	mov	QWORD PTR 8[rsp], rdx
	call	MMDRV_GetNum@PLT
	mov	rdx, QWORD PTR 8[rsp]
	cmp	rdx, rax
	jb	.L6
	mov	rax, QWORD PTR [r15]
	shr	rax, 16
	jne	.L6
.L7:
	mov	edi, DWORD PTR 0[r13]
	call	HIWORD@PLT
	mov	DWORD PTR 16[rbx], eax
	mov	rax, QWORD PTR [r12]
	mov	QWORD PTR 8[rbx], rax
	mov	rax, QWORD PTR 0[rbp]
	mov	QWORD PTR [rbx], rax
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, rbx
	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
.L6:
	.cfi_restore_state
	lea	rdi, .LC2[rip]
	call	ERR@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L3:
	lea	rdi, .LC1[rip]
	call	ERR@PLT
	xor	eax, eax
	call	GetProcessHeap@PLT
	mov	rdx, rbx
	xor	esi, esi
	xor	ebx, ebx
	mov	edi, eax
	call	HeapFree@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	MMDRV_Alloc, .-MMDRV_Alloc
	.comm	MM_MLDrvs,8,8
	.comm	MAX_MM_MLDRVS,8,8
	.comm	HEAP_ZERO_MEMORY,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_lolvldrv.c_MMDRV_Alloc.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"(%d, %04x, %p, %p, %p, %p)\012\000"
	.align	2
.LC1:
	.ascii	"Too many open drivers\012\000"
	.align	2
.LC2:
	.ascii	"Shouldn't happen. Bad allocation scheme\012\000"
	.text
	.align	2
	.global	MMDRV_Alloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	MMDRV_Alloc, %function
MMDRV_Alloc:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	sub	sp, sp, #20
	ldr	r9, [sp, #56]
	ldr	r8, [sp, #60]
	str	r3, [sp]
	mov	r6, r1
	mov	r10, r2
	mov	r7, r3
	str	r9, [sp, #4]
	mov	r3, r2
	str	r8, [sp, #8]
	mov	r2, r1
	mov	r1, r0
	ldr	r0, .L21
	bl	TRACE
	bl	GetProcessHeap
	ldr	r3, .L21+4
	mov	r2, r4
	ldr	r1, [r3]
	bl	HeapAlloc
	subs	fp, r0, #0
	beq	.L1
	ldr	r3, .L21+8
	ldr	r2, [r3]
	cmp	r2, #0
	beq	.L3
	ldr	r3, .L21+12
	mov	ip, #0
	ldr	lr, [r3]
	b	.L5
.L20:
	add	ip, ip, #1
	cmp	r2, ip
	beq	.L3
.L5:
	ldr	r3, [lr]
	mov	r5, lr
	cmp	r3, #0
	add	lr, lr, #4
	bne	.L20
	orr	r4, ip, #32768
	str	fp, [r5]
	mov	r0, r6
	str	r4, [r10]
	str	r6, [fp, #12]
	bl	MMDRV_GetNum
	cmp	r4, r0
	bcc	.L6
	ldrh	r3, [r10, #2]
	cmp	r3, #0
	bne	.L6
.L7:
	ldr	r0, [r7]
	bl	HIWORD
	ldr	r3, [r9]
	str	r0, [fp, #8]
	str	r3, [fp, #4]
	ldr	r3, [r8]
	str	r3, [fp]
.L1:
	mov	r0, fp
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	ldr	r0, .L21+16
	bl	ERR
	b	.L7
.L3:
	ldr	r0, .L21+20
	bl	ERR
	bl	GetProcessHeap
	mov	r2, fp
	mov	r1, #0
	bl	HeapFree
	mov	fp, #0
	b	.L1
.L22:
	.align	2
.L21:
	.word	.LC0
	.word	HEAP_ZERO_MEMORY
	.word	MAX_MM_MLDRVS
	.word	MM_MLDrvs
	.word	.LC2
	.word	.LC1
	.size	MMDRV_Alloc, .-MMDRV_Alloc
	.comm	MM_MLDrvs,4,4
	.comm	MAX_MM_MLDRVS,4,4
	.comm	HEAP_ZERO_MEMORY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
