	.file	"extr_handle.c_DosResizeHandleTable.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	DosResizeHandleTable
	.type	DosResizeHandleTable, @function
DosResizeHandleTable:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR Sda[rip]
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	mov	rdi, QWORD PTR [rax]
	call	SEGMENT_TO_PSP@PLT
	mov	rbp, rax
	mov	rax, QWORD PTR [rax]
	cmp	rax, rbx
	je	.L6
	mov	rdx, QWORD PTR DEFAULT_JFT_SIZE[rip]
	cmp	rax, rdx
	jg	.L13
	cmp	rdx, rbx
	jl	.L14
.L6:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, DWORD PTR TRUE[rip]
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rbp]
	call	LOWORD@PLT
	mov	rdi, QWORD PTR 8[rbp]
	mov	r12d, eax
	call	HIWORD@PLT
	sar	r12d, 4
	movsx	r12, r12d
	add	r12, rax
	cmp	QWORD PTR DEFAULT_JFT_SIZE[rip], rbx
	jge	.L15
	xor	edx, edx
	mov	rsi, rbx
	mov	rdi, r12
	call	DosResizeMemory@PLT
	test	eax, eax
	je	.L16
.L7:
	mov	QWORD PTR 0[rbp], rbx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L14:
	xor	esi, esi
	mov	rdi, rbx
	call	DosAllocateMemory@PLT
	mov	r12, rax
	test	rax, rax
	je	.L11
	xor	esi, esi
	mov	rdi, rax
	call	SEG_OFF_TO_PTR@PLT
	mov	rdi, QWORD PTR 8[rbp]
	mov	r14, QWORD PTR 0[rbp]
	mov	r13d, eax
	call	FAR_POINTER@PLT
	mov	rdx, r14
	mov	edi, r13d
	mov	esi, eax
	call	RtlCopyMemory@PLT
	mov	QWORD PTR 0[rbp], rbx
	mov	rsi, r12
	xor	edi, edi
	call	MAKELONG@PLT
	mov	QWORD PTR 8[rbp], rax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdi, QWORD PTR 8[rbp]
	call	FAR_POINTER@PLT
	mov	edi, DWORD PTR 16[rbp]
	mov	rdx, rbx
	mov	esi, eax
	call	RtlCopyMemory@PLT
	mov	rdi, r12
	call	DosFreeMemory@PLT
	mov	rax, QWORD PTR Sda[rip]
	mov	QWORD PTR 0[rbp], rbx
	mov	edi, 24
	mov	rsi, QWORD PTR [rax]
	call	MAKELONG@PLT
	mov	QWORD PTR 8[rbp], rax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L11:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, DWORD PTR FALSE[rip]
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	xor	esi, esi
	mov	rdi, rbx
	call	DosAllocateMemory@PLT
	mov	r12, rax
	test	rax, rax
	je	.L11
	xor	esi, esi
	mov	rdi, rax
	call	SEG_OFF_TO_PTR@PLT
	mov	rdi, QWORD PTR 8[rbp]
	mov	r14, QWORD PTR 0[rbp]
	mov	r13d, eax
	call	FAR_POINTER@PLT
	mov	rdx, r14
	mov	edi, r13d
	mov	esi, eax
	call	RtlCopyMemory@PLT
	mov	rsi, r12
	xor	edi, edi
	call	MAKELONG@PLT
	mov	QWORD PTR 8[rbp], rax
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	DosResizeHandleTable, .-DosResizeHandleTable
	.comm	TRUE,4,4
	.comm	Sda,8,8
	.comm	FALSE,4,4
	.comm	DEFAULT_JFT_SIZE,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_handle.c_DosResizeHandleTable.c"
	.text
	.align	2
	.global	DosResizeHandleTable
	.syntax unified
	.arm
	.fpu softvfp
	.type	DosResizeHandleTable, %function
DosResizeHandleTable:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, .L17
	mov	r4, r0
	ldr	r3, [r6]
	ldr	r0, [r3]
	bl	SEGMENT_TO_PSP
	ldr	r3, [r0]
	cmp	r3, r4
	beq	.L6
	ldr	r7, .L17+4
	mov	r5, r0
	ldr	r2, [r7]
	cmp	r3, r2
	bgt	.L13
	cmp	r2, r4
	blt	.L14
.L6:
	ldr	r3, .L17+8
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	ldr	r0, [r0, #4]
	bl	LOWORD
	mov	r8, r0
	ldr	r0, [r5, #4]
	bl	HIWORD
	ldr	r3, [r7]
	add	r8, r0, r8, asr #4
	cmp	r3, r4
	bge	.L15
	mov	r0, r8
	mov	r2, #0
	mov	r1, r4
	bl	DosResizeMemory
	subs	r6, r0, #0
	beq	.L16
.L7:
	str	r4, [r5]
	b	.L6
.L14:
	mov	r1, #0
	mov	r0, r4
	bl	DosAllocateMemory
	subs	r6, r0, #0
	beq	.L11
	mov	r1, #0
	bl	SEG_OFF_TO_PTR
	mov	r7, r0
	ldr	r0, [r5, #4]
	bl	FAR_POINTER
	ldr	r2, [r5]
	mov	r1, r0
	mov	r0, r7
	bl	RtlCopyMemory
	mov	r1, r6
	mov	r0, #0
	str	r4, [r5]
	bl	MAKELONG
	str	r0, [r5, #4]
	b	.L6
.L15:
	ldr	r0, [r5, #4]
	bl	FAR_POINTER
	mov	r2, r4
	mov	r1, r0
	ldr	r0, [r5, #8]
	bl	RtlCopyMemory
	mov	r0, r8
	bl	DosFreeMemory
	ldr	r3, [r6]
	mov	r0, #24
	ldr	r1, [r3]
	str	r4, [r5]
	bl	MAKELONG
	str	r0, [r5, #4]
	b	.L6
.L11:
	ldr	r3, .L17+12
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	mov	r1, r6
	mov	r0, r4
	bl	DosAllocateMemory
	subs	r7, r0, #0
	beq	.L11
	mov	r1, r6
	bl	SEG_OFF_TO_PTR
	mov	r8, r0
	ldr	r0, [r5, #4]
	bl	FAR_POINTER
	ldr	r2, [r5]
	mov	r1, r0
	mov	r0, r8
	bl	RtlCopyMemory
	mov	r1, r7
	mov	r0, r6
	bl	MAKELONG
	str	r0, [r5, #4]
	b	.L7
.L18:
	.align	2
.L17:
	.word	Sda
	.word	DEFAULT_JFT_SIZE
	.word	TRUE
	.word	FALSE
	.size	DosResizeHandleTable, .-DosResizeHandleTable
	.comm	TRUE,4,4
	.comm	Sda,4,4
	.comm	FALSE,4,4
	.comm	DEFAULT_JFT_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
