// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/zip.c
// Function: ef_ntfs
static void ef_ntfs(deark *c, lctx *d, struct extra_item_info_struct *eii)
{
	i64 pos = eii->dpos;
	i64 endpos;
	i64 attr_tag;
	i64 attr_size;
	const char *name;
	struct de_timestamp timestamp_tmp_m;
	struct de_timestamp timestamp_tmp;

	endpos = pos+eii->dlen;
	pos += 4; // skip reserved field

	while(1) {
		if(pos+4>endpos) break;
		attr_tag = de_getu16le_p(&pos);
		attr_size = de_getu16le_p(&pos);
		if(attr_tag==0x0001) name="NTFS filetimes";
		else name="?";
		de_dbg(c, "tag: 0x%04x (%s), dlen: %d", (UI)attr_tag, name,
			(int)attr_size);
		if(pos+attr_size>endpos) break;

		de_dbg_indent(c, 1);
		if(attr_tag==0x0001 && attr_size>=24) {
			read_FILETIME(c, d, pos, &timestamp_tmp_m, "mtime");
			apply_timestamp(c, d, eii->md, DE_TIMESTAMPIDX_MODIFY, &timestamp_tmp_m, 90);

			read_FILETIME(c, d, pos+8, &timestamp_tmp, "atime");
			apply_timestamp(c, d, eii->md, DE_TIMESTAMPIDX_ACCESS, &timestamp_tmp, 90);
			if(timestamps_are_valid_and_equal(&timestamp_tmp, &timestamp_tmp_m)) {
				eii->md->questionable_atime = 1;
			}

			read_FILETIME(c, d, pos+16, &timestamp_tmp, "creation time");
			apply_timestamp(c, d, eii->md, DE_TIMESTAMPIDX_CREATE, &timestamp_tmp, 90);
			if(timestamps_are_valid_and_equal(&timestamp_tmp, &timestamp_tmp_m)) {
				eii->md->questionable_crtime = 1;
			}
		}
		de_dbg_indent(c, -1);

		pos += attr_size;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq 0x8(%rdx), %r12
movq 0x10(%rdx), %rbp
addq %r12, %rbp
addq $0x4, %r12
movq %rsp, %r15
movq %r12, (%rsp)
addq $0x4, %r12
cmpq %rbp, %r12
jg 0xd5758
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe3fc4
movq %rax, %r13
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe3fc4
movq %rax, %r12
cmpq $0x1, %r13
leaq 0x498e7(%rip), %rcx     # 0x11eee1
leaq 0x61730(%rip), %rax     # 0x136d31
cmoveq %rax, %rcx
movq %r14, %rdi
leaq 0x61731(%rip), %rsi     # 0x136d40
movl %r13d, %edx
movl %r12d, %r8d
xorl %eax, %eax
callq 0xde896
movq (%rsp), %rax
addq %r12, %rax
cmpq %rbp, %rax
jg 0xd5758
cmpq $0x1, %r13
setne %r13b
movq %r14, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
cmpq $0x18, %r12
setl %al
orb %r13b, %al
jne 0xd5744
movq (%rsp), %rsi
movq %r14, %rdi
leaq 0x18(%rsp), %rdx
leaq 0x592d4(%rip), %rcx     # 0x12e936
callq 0xd65a4
cmpb $0x0, 0x18(%rsp)
je 0xd5688
movq 0x20(%rbx), %rax
cmpl $0x5a, 0x58(%rax)
jg 0xd5688
movups 0x18(%rsp), %xmm0
movups %xmm0, 0x48(%rax)
movl $0x5a, 0x58(%rax)
movq (%rsp), %rsi
addq $0x8, %rsi
movq %r14, %rdi
leaq 0x8(%rsp), %rdx
leaq 0x59440(%rip), %rcx     # 0x12eadf
callq 0xd65a4
cmpb $0x0, 0x8(%rsp)
je 0xd56e9
movq 0x20(%rbx), %rax
cmpl $0x5a, 0x88(%rax)
jg 0xd56cb
movups 0x8(%rsp), %xmm0
movups %xmm0, 0x78(%rax)
movl $0x5a, 0x88(%rax)
cmpb $0x0, 0x18(%rsp)
je 0xd56e9
movq 0x10(%rsp), %rax
cmpq 0x20(%rsp), %rax
jne 0xd56e9
movq 0x20(%rbx), %rax
movb $0x1, 0x1ff(%rax)
movq (%rsp), %rsi
addq $0x10, %rsi
movq %r14, %rdi
leaq 0x8(%rsp), %rdx
leaq 0x4b6cf(%rip), %rcx     # 0x120dcf
callq 0xd65a4
cmpb $0x0, 0x8(%rsp)
je 0xd5744
movq 0x20(%rbx), %rax
cmpl $0x5a, 0x70(%rax)
jg 0xd5726
movups 0x8(%rsp), %xmm0
movups %xmm0, 0x60(%rax)
movl $0x5a, 0x70(%rax)
cmpb $0x0, 0x18(%rsp)
je 0xd5744
movq 0x10(%rsp), %rax
cmpq 0x20(%rsp), %rax
jne 0xd5744
movq 0x20(%rbx), %rax
movb $0x1, 0x200(%rax)
movq %r14, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
addq (%rsp), %r12
jmp 0xd55c0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq