	.file	"extr_finfo.c_NtfsSetEndOfFile.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Couldn't allocate memory for file record!"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Reading file record...\n"
.LC2:
	.string	"Can't find record for %wS!\n"
.LC3:
	.string	"Found record for %wS\n"
	.section	.rodata.str4.4,"aMS",@progbits,4
	.align 4
.LC4:
	.string	""
	.string	""
	.string	""
	.string	""
	.section	.rodata.str1.1
.LC5:
	.string	"Couldn't decrease file size!\n"
.LC6:
	.string	"Finding Data Attribute...\n"
	.section	.rodata.str1.8
	.align 8
.LC7:
	.string	"No '%S' data stream associated with file!\n"
	.align 8
.LC8:
	.string	"Unable to find FileName attribute associated with file!\n"
	.text
	.p2align 4
	.globl	NtfsSetEndOfFile
	.type	NtfsSetEndOfFile, @function
NtfsSetEndOfFile:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, r9
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	mov	rdi, rdx
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	DWORD PTR 8[rsp], ecx
	mov	DWORD PTR 12[rsp], r8d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	call	ExAllocateFromNPagedLookasideList@PLT
	test	rax, rax
	je	.L17
	mov	rbp, rax
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	DPRINT@PLT
	mov	esi, DWORD PTR 16[rbx]
	mov	rdx, rbp
	mov	rdi, r12
	call	ReadFileRecord@PLT
	mov	edi, eax
	mov	r14d, eax
	call	NT_SUCCESS@PLT
	mov	esi, DWORD PTR 12[rbx]
	test	eax, eax
	je	.L18
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	DPRINT@PLT
	xor	r8d, r8d
	xor	ecx, ecx
	mov	rsi, rbp
	lea	rdx, .LC4[rip]
	mov	rdi, r12
	call	NtfsGetFileSize@PLT
	cmp	rax, QWORD PTR 0[r13]
	jg	.L19
.L5:
	lea	rdi, .LC6[rip]
	xor	eax, eax
	call	DPRINT@PLT
	mov	edi, DWORD PTR 8[rbx]
	call	wcslen@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 136
	mov	ecx, DWORD PTR 8[rbx]
	mov	rsi, rbp
	mov	r8d, eax
	lea	rax, 36[rsp]
	mov	edx, DWORD PTR AttributeData[rip]
	mov	rdi, r12
	push	rax
	.cfi_def_cfa_offset 144
	lea	r9, 48[rsp]
	call	FindAttribute@PLT
	mov	edi, eax
	mov	r14d, eax
	call	NT_SUCCESS@PLT
	pop	rcx
	.cfi_def_cfa_offset 136
	pop	rsi
	.cfi_def_cfa_offset 128
	test	eax, eax
	je	.L20
	mov	rax, QWORD PTR 32[rsp]
	mov	edi, DWORD PTR [rax]
	call	AttributeDataLength@PLT
	mov	rdx, QWORD PTR 32[rsp]
	cmp	rax, QWORD PTR 0[r13]
	jge	.L8
	mov	eax, DWORD PTR [rbx]
	mov	r14d, DWORD PTR 8[rsp]
	and	eax, DWORD PTR FCB_IS_VOLUME[rip]
	and	r14d, DWORD PTR IRP_PAGING_IO[rip]
	or	eax, r14d
	jne	.L21
.L8:
	mov	ecx, DWORD PTR 28[rsp]
	mov	rdi, r15
	mov	r9, r13
	mov	r8, rbp
	mov	rsi, rbx
	call	SetAttributeDataLength@PLT
	mov	edi, eax
	mov	r14d, eax
	call	NT_SUCCESS@PLT
	test	eax, eax
	je	.L22
	mov	edi, DWORD PTR 4[rbx]
	mov	rsi, rbp
	call	GetBestFileNameFromRecord@PLT
	test	rax, rax
	je	.L23
	mov	r14d, DWORD PTR [rax]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR 4[rax]
	and	r14d, DWORD PTR NTFS_MFT_MASK[rip]
	mov	DWORD PTR 52[rsp], edx
	sal	eax, 2
	mov	DWORD PTR 44[rsp], eax
	mov	DWORD PTR 48[rsp], eax
	mov	rax, QWORD PTR 32[rsp]
	mov	edi, DWORD PTR [rax]
	call	AttributeAllocatedLength@PLT
	lea	rdx, 44[rsp]
	mov	edi, DWORD PTR 4[rbx]
	mov	esi, r14d
	sub	rsp, 8
	.cfi_def_cfa_offset 136
	mov	r9d, eax
	mov	r8, QWORD PTR 0[r13]
	mov	ecx, DWORD PTR FALSE[rip]
	mov	eax, DWORD PTR 20[rsp]
	push	rax
	.cfi_def_cfa_offset 144
	call	UpdateFileNameRecord@PLT
	mov	rdi, QWORD PTR 48[rsp]
	mov	r14d, eax
	call	ReleaseAttributeContext@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	ExFreeToNPagedLookasideList@PLT
	pop	rax
	.cfi_def_cfa_offset 136
	pop	rdx
	.cfi_def_cfa_offset 128
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	edi, DWORD PTR [r15]
	mov	rsi, r13
	call	MmCanFileBeTruncated@PLT
	test	eax, eax
	jne	.L5
	lea	rdi, .LC5[rip]
	call	DPRINT1@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	ExFreeToNPagedLookasideList@PLT
	mov	r14d, DWORD PTR STATUS_USER_MAPPED_FILE[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	lea	rdi, .LC2[rip]
	call	DPRINT1@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	ExFreeToNPagedLookasideList@PLT
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L24
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	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
.L22:
	.cfi_restore_state
	mov	rdi, QWORD PTR 32[rsp]
	call	ReleaseAttributeContext@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	ExFreeToNPagedLookasideList@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdi, rdx
	call	ReleaseAttributeContext@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	ExFreeToNPagedLookasideList@PLT
	mov	r14d, DWORD PTR STATUS_ACCESS_DENIED[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	DPRINT1@PLT
	mov	r14d, DWORD PTR STATUS_INSUFFICIENT_RESOURCES[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	mov	esi, DWORD PTR 8[rbx]
	lea	rdi, .LC7[rip]
	call	DPRINT1@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	ExFreeToNPagedLookasideList@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rdi, .LC8[rip]
	call	DPRINT1@PLT
	mov	rdi, QWORD PTR 32[rsp]
	call	ReleaseAttributeContext@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	ExFreeToNPagedLookasideList@PLT
	mov	r14d, DWORD PTR STATUS_INVALID_PARAMETER[rip]
	jmp	.L1
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	NtfsSetEndOfFile, .-NtfsSetEndOfFile
	.comm	STATUS_USER_MAPPED_FILE,4,4
	.comm	STATUS_SUCCESS,4,4
	.comm	STATUS_INVALID_PARAMETER,4,4
	.comm	STATUS_INSUFFICIENT_RESOURCES,4,4
	.comm	STATUS_ACCESS_DENIED,4,4
	.comm	NTFS_MFT_MASK,4,4
	.comm	IRP_PAGING_IO,4,4
	.comm	FCB_IS_VOLUME,4,4
	.comm	FALSE,4,4
	.comm	AttributeData,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_finfo.c_NtfsSetEndOfFile.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Couldn't allocate memory for file record!\000"
	.align	2
.LC1:
	.ascii	"Reading file record...\012\000"
	.align	2
.LC2:
	.ascii	"Can't find record for %wS!\012\000"
	.align	2
.LC3:
	.ascii	"Found record for %wS\012\000"
	.section	.rodata.str4.4,"aMS",%progbits,4
	.align	2
.LC4:
	.ascii	"\000\000\000\000"
	.section	.rodata.str1.4
	.align	2
.LC5:
	.ascii	"Couldn't decrease file size!\012\000"
	.align	2
.LC6:
	.ascii	"Finding Data Attribute...\012\000"
	.align	2
.LC7:
	.ascii	"No '%S' data stream associated with file!\012\000"
	.align	2
.LC8:
	.ascii	"Unable to find FileName attribute associated with f"
	.ascii	"ile!\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	NtfsSetEndOfFile
	.syntax unified
	.arm
	.fpu softvfp
	.type	NtfsSetEndOfFile, %function
NtfsSetEndOfFile:
	@ args = 8, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r8, r3
	ldr	r3, .L25
	sub	sp, sp, #44
	mov	r7, r0
	mov	r0, r2
	mov	r6, r2
	mov	r9, r1
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	ldr	r10, [sp, #84]
	bl	ExAllocateFromNPagedLookasideList
	subs	r4, r0, #0
	beq	.L18
	ldr	r0, .L25+4
	bl	DPRINT
	ldr	r1, [r7, #16]
	mov	r2, r4
	mov	r0, r6
	bl	ReadFileRecord
	mov	r5, r0
	bl	NT_SUCCESS
	cmp	r0, #0
	ldr	r1, [r7, #12]
	beq	.L19
	ldr	r0, .L25+8
	bl	DPRINT
	mov	r3, #0
	mov	r1, r4
	str	r3, [sp]
	mov	r0, r6
	ldr	r2, .L25+12
	bl	NtfsGetFileSize
	ldr	r3, [r10]
	cmp	r0, r3
	bgt	.L20
.L5:
	ldr	r0, .L25+16
	bl	DPRINT
	ldr	r5, [r7, #8]
	ldr	r3, .L25+20
	mov	r0, r5
	ldr	fp, [r3]
	bl	wcslen
	add	ip, sp, #20
	add	r1, sp, #16
	stm	sp, {r0, r1, ip}
	mov	r3, r5
	mov	r2, fp
	mov	r1, r4
	mov	r0, r6
	bl	FindAttribute
	mov	r5, r0
	bl	NT_SUCCESS
	cmp	r0, #0
	beq	.L21
	ldr	r3, [sp, #16]
	ldr	r0, [r3]
	bl	AttributeDataLength
	ldr	r3, [r10]
	cmp	r0, r3
	bge	.L7
	ldr	r2, .L25+24
	ldr	r3, .L25+28
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [r7]
	and	r3, r3, r8
	and	r2, r2, r1
	orrs	r3, r2, r3
	ldr	r2, [sp, #16]
	bne	.L22
.L8:
	mov	r1, r7
	ldr	r3, [sp, #20]
	mov	r0, r9
	stm	sp, {r4, r10}
	bl	SetAttributeDataLength
	mov	r5, r0
	bl	NT_SUCCESS
	cmp	r0, #0
	beq	.L16
	mov	r1, r4
	ldr	r0, [r7, #4]
	bl	GetBestFileNameFromRecord
	cmp	r0, #0
	beq	.L23
	ldr	r2, .L25+32
	ldr	r5, [r0]
	ldr	r3, [r0, #4]
	ldr	r1, [r2]
	ldr	r2, [r0, #8]
	ldr	r0, [sp, #16]
	lsl	r3, r3, #2
	ldr	r0, [r0]
	and	r5, r5, r1
	str	r3, [sp, #24]
	str	r3, [sp, #28]
	str	r2, [sp, #32]
	bl	AttributeAllocatedLength
	ldr	r2, [r10]
	ldr	r3, .L25+36
	str	r2, [sp]
	ldr	r2, [sp, #80]
	str	r0, [sp, #4]
	str	r2, [sp, #8]
	mov	r1, r5
	ldr	r0, [r7, #4]
	ldr	r3, [r3]
	add	r2, sp, #24
	bl	UpdateFileNameRecord
	mov	r5, r0
.L16:
	ldr	r0, [sp, #16]
	bl	ReleaseAttributeContext
	mov	r1, r4
	mov	r0, r6
	bl	ExFreeToNPagedLookasideList
	b	.L1
.L20:
	mov	r1, r10
	ldr	r0, [r9]
	bl	MmCanFileBeTruncated
	cmp	r0, #0
	bne	.L5
	ldr	r0, .L25+40
	bl	DPRINT1
	mov	r1, r4
	mov	r0, r6
	bl	ExFreeToNPagedLookasideList
	ldr	r3, .L25+44
	ldr	r5, [r3]
	b	.L1
.L19:
	ldr	r0, .L25+48
	bl	DPRINT1
	mov	r1, r4
	mov	r0, r6
	bl	ExFreeToNPagedLookasideList
.L1:
	ldr	r3, .L25
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	mov	r0, r5
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	mov	r0, r2
	bl	ReleaseAttributeContext
	mov	r1, r4
	mov	r0, r6
	bl	ExFreeToNPagedLookasideList
	ldr	r3, .L25+52
	ldr	r5, [r3]
	b	.L1
.L18:
	ldr	r0, .L25+56
	bl	DPRINT1
	ldr	r3, .L25+60
	ldr	r5, [r3]
	b	.L1
.L21:
	ldr	r1, [r7, #8]
	ldr	r0, .L25+64
	bl	DPRINT1
	mov	r1, r4
	mov	r0, r6
	bl	ExFreeToNPagedLookasideList
	b	.L1
.L7:
	ldr	r2, [sp, #16]
	b	.L8
.L23:
	ldr	r0, .L25+68
	bl	DPRINT1
	ldr	r0, [sp, #16]
	bl	ReleaseAttributeContext
	mov	r1, r4
	mov	r0, r6
	bl	ExFreeToNPagedLookasideList
	ldr	r3, .L25+72
	ldr	r5, [r3]
	b	.L1
.L24:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	.LC9
	.word	.LC1
	.word	.LC3
	.word	.LC4
	.word	.LC6
	.word	AttributeData
	.word	FCB_IS_VOLUME
	.word	IRP_PAGING_IO
	.word	NTFS_MFT_MASK
	.word	FALSE
	.word	.LC5
	.word	STATUS_USER_MAPPED_FILE
	.word	.LC2
	.word	STATUS_ACCESS_DENIED
	.word	.LC0
	.word	STATUS_INSUFFICIENT_RESOURCES
	.word	.LC7
	.word	.LC8
	.word	STATUS_INVALID_PARAMETER
	.size	NtfsSetEndOfFile, .-NtfsSetEndOfFile
	.comm	STATUS_USER_MAPPED_FILE,4,4
	.comm	STATUS_SUCCESS,4,4
	.comm	STATUS_INVALID_PARAMETER,4,4
	.comm	STATUS_INSUFFICIENT_RESOURCES,4,4
	.comm	STATUS_ACCESS_DENIED,4,4
	.comm	NTFS_MFT_MASK,4,4
	.comm	IRP_PAGING_IO,4,4
	.comm	FCB_IS_VOLUME,4,4
	.comm	FALSE,4,4
	.comm	AttributeData,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
