// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/unsupported.c
// Function: get_fmt
static void get_fmt(deark *c, struct fmtinfo_struct *fmti)
{
	u8 b[32];

	de_zeromem(fmti, sizeof(struct fmtinfo_struct));

	de_read(b, 0, sizeof(b));

	if(!de_memcmp(b, "\x42\x5a\x68", 3) &&
		!de_memcmp(&b[4], "\x31\x41\x59\x26\x53\x59", 6) )
	{
		fmti->confidence = 90;
		fmti->descr = "a bzip2-compressed file";
		return;
	}

	if(!de_memcmp(b, "7z\xbc\xaf\x27\x1c", 6)) {
		fmti->confidence = 90;
		fmti->descr = "a 7z file";
		return;
	}

	// Note - Make sure BSAVE has lower confidence.
	if(!de_memcmp(b, "\xfd\x37\x7a\x58\x5a\x00", 6)) {
		fmti->confidence = 90;
		fmti->descr = "an xz-compressed file";
		return;
	}

	if(!de_memcmp(b, "LZIP", 4)) {
		fmti->confidence = 50;
		fmti->descr = "an lzip-compressed file";
		return;
	}

	if(!de_memcmp(b, "<?xpacket", 9)) {
		fmti->confidence = 20;
		fmti->descr = "an XMP file";
		return;
	}

	if(!de_memcmp(b, "ISc(", 4)) {
		fmti->confidence = 40;
		fmti->descr = "an InstallShield CAB file";
		return;
	}

	if(b[0]=='H' && b[1]=='P' && b[2]=='H' && b[3]=='P' &&
		b[4]=='4' && (b[5]=='8' || b[5]=='9'))
	{
		fmti->confidence = 90;
		fmti->descr = "a non-GROB HP-48/49 file";
		return;
	}

	if(!de_memcmp(b, "%PDF-", 5)) {
		fmti->confidence = 90;
		fmti->descr = "a PDF file";
		return;
	}

	if(!de_memcmp(b, "\x7f" "ELF", 4)) {
		fmti->confidence = 40;
		fmti->descr = "an ELF binary";
		return;
	}

	if(!de_memcmp(b, "\xff" "WPC", 4)) {
		fmti->confidence = 40;
		fmti->descr = "a WordPerfect document";
		return;
	}

	if((!de_memcmp(b, "StuffIt", 7)) && (b[7]=='!' || b[7]=='?')) {
		fmti->confidence = 90;
		fmti->descr = "a StuffIt X archive";
		return;
	}

	if(!de_memcmp(b, "ICE!", 4) ||
		!de_memcmp(b, "Ice!", 4))
	{
		fmti->confidence = 75;
		fmti->descr = "a Pack-Ice compressed file";
		return;
	}

	// Note - Make sure Atari CAS has lower confidence.
	if(!de_memcmp(b, "FUJIFILMCCD-RAW", 15)) {
		fmti->confidence = 100;
		fmti->descr = "a Fujifilm RAF file";
		return;
	}

	if(!de_memcmp(b, "AutoCAD Slide\r\n\x1a", 16)) {
		fmti->confidence = 100;
		fmti->descr = "an AutoCAD Slide file";
		return;
	}

	if(!de_memcmp(b, "Top!", 4)) {
		// A format often found alongside RISC OS Draw files
		fmti->confidence = 9;
		fmti->descr = "an ArtWorks image";
		return;
	}

	if(!de_memcmp(b, "CPT", 3) &&
		(b[3]>='7' && b[3]<='9') &&
		!de_memcmp(&b[4], "FILE", 4))
	{
		fmti->confidence = 91;
		fmti->descr = "a Corel Photo-Paint image";
		return;
	}

	if(!de_memcmp(b, (const void*)"Creative Voice File\x1a", 20)) {
		fmti->confidence = 90;
		fmti->descr = "a Creative Voice audio file";
		return;
	}

	// We're not trying to detect every HTML file, but we want to make sure
	// we can detect the ones we generate.
	if(!de_memcmp(b, "<!DOCTYPE html", 14) ||
		!de_memcmp(b, "\xef\xbb\xbf<!DOCTYPE html", 17) ||
		!de_memcmp(b, "<html", 5))
	{
		fmti->confidence = 20;
		fmti->descr = "an HTML file";
		return;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x19140
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x30(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x20, %ecx
callq 0x164d10
leaq -0x30(%rbp), %rdi
leaq 0x94c81(%rip), %rsi     # 0x1cbf26
movl $0x3, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x1372f0
leaq -0x30(%rbp), %rdi
addq $0x4, %rdi
leaq 0x94c67(%rip), %rsi     # 0x1cbf2a
movl $0x6, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x1372f0
movq -0x10(%rbp), %rax
movl $0x5a, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94c4a(%rip), %rcx     # 0x1cbf31
movq %rcx, 0x8(%rax)
jmp 0x137741
leaq -0x30(%rbp), %rdi
leaq 0x94c4e(%rip), %rsi     # 0x1cbf49
movl $0x6, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x137328
movq -0x10(%rbp), %rax
movl $0x5a, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94c31(%rip), %rcx     # 0x1cbf50
movq %rcx, 0x8(%rax)
jmp 0x137741
leaq -0x30(%rbp), %rdi
leaq 0x94dea(%rip), %rsi     # 0x1cc11d
movl $0x6, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x137360
movq -0x10(%rbp), %rax
movl $0x5a, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94c03(%rip), %rcx     # 0x1cbf5a
movq %rcx, 0x8(%rax)
jmp 0x137741
leaq -0x30(%rbp), %rax
movl (%rax), %eax
subl $0x50495a4c, %eax       # imm = 0x50495A4C
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x137394
movq -0x10(%rbp), %rax
movl $0x32, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94bea(%rip), %rcx     # 0x1cbf75
movq %rcx, 0x8(%rax)
jmp 0x137741
leaq -0x30(%rbp), %rdi
leaq 0x94bee(%rip), %rsi     # 0x1cbf8d
movl $0x9, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x1373cc
movq -0x10(%rbp), %rax
movl $0x14, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94bd4(%rip), %rcx     # 0x1cbf97
movq %rcx, 0x8(%rax)
jmp 0x137741
leaq -0x30(%rbp), %rax
movl (%rax), %eax
subl $0x28635349, %eax       # imm = 0x28635349
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x137400
movq -0x10(%rbp), %rax
movl $0x28, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94bb1(%rip), %rcx     # 0x1cbfa8
movq %rcx, 0x8(%rax)
jmp 0x137741
movzbl -0x30(%rbp), %eax
cmpl $0x48, %eax
jne 0x13745d
movzbl -0x2f(%rbp), %eax
cmpl $0x50, %eax
jne 0x13745d
movzbl -0x2e(%rbp), %eax
cmpl $0x48, %eax
jne 0x13745d
movzbl -0x2d(%rbp), %eax
cmpl $0x50, %eax
jne 0x13745d
movzbl -0x2c(%rbp), %eax
cmpl $0x34, %eax
jne 0x13745d
movzbl -0x2b(%rbp), %eax
cmpl $0x38, %eax
je 0x13743f
movzbl -0x2b(%rbp), %eax
cmpl $0x39, %eax
jne 0x13745d
movq -0x10(%rbp), %rax
movl $0x5a, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94b6e(%rip), %rcx     # 0x1cbfc2
movq %rcx, 0x8(%rax)
jmp 0x137741
leaq -0x30(%rbp), %rdi
leaq 0x94b73(%rip), %rsi     # 0x1cbfdb
movl $0x5, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x137495
movq -0x10(%rbp), %rax
movl $0x5a, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94b55(%rip), %rcx     # 0x1cbfe1
movq %rcx, 0x8(%rax)
jmp 0x137741
leaq -0x30(%rbp), %rax
movl (%rax), %eax
subl $0x464c457f, %eax       # imm = 0x464C457F
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1374c9
movq -0x10(%rbp), %rax
movl $0x28, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94b31(%rip), %rcx     # 0x1cbff1
movq %rcx, 0x8(%rax)
jmp 0x137741
leaq -0x30(%rbp), %rax
movl (%rax), %eax
subl $0x435057ff, %eax       # imm = 0x435057FF
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1374fd
movq -0x10(%rbp), %rax
movl $0x28, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94b10(%rip), %rcx     # 0x1cc004
movq %rcx, 0x8(%rax)
jmp 0x137741
leaq -0x30(%rbp), %rdi
leaq 0x94b13(%rip), %rsi     # 0x1cc01b
movl $0x7, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x137547
movzbl -0x29(%rbp), %eax
cmpl $0x21, %eax
je 0x137529
movzbl -0x29(%rbp), %eax
cmpl $0x3f, %eax
jne 0x137547
movq -0x10(%rbp), %rax
movl $0x5a, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94ae5(%rip), %rcx     # 0x1cc023
movq %rcx, 0x8(%rax)
jmp 0x137741
leaq -0x30(%rbp), %rax
movl (%rax), %eax
subl $0x21454349, %eax       # imm = 0x21454349
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x137573
leaq -0x30(%rbp), %rax
movl (%rax), %eax
subl $0x21656349, %eax       # imm = 0x21656349
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x137591
movq -0x10(%rbp), %rax
movl $0x4b, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94ab9(%rip), %rcx     # 0x1cc041
movq %rcx, 0x8(%rax)
jmp 0x137741
leaq -0x30(%rbp), %rdi
leaq 0x94ac0(%rip), %rsi     # 0x1cc05c
movl $0xf, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x1375c9
movq -0x10(%rbp), %rax
movl $0x64, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94aac(%rip), %rcx     # 0x1cc06c
movq %rcx, 0x8(%rax)
jmp 0x137741
leaq -0x30(%rbp), %rax
movups (%rax), %xmm0
movaps 0x948c9(%rip), %xmm1    # 0x1cbea0
pcmpeqb %xmm1, %xmm0
pmovmskb %xmm0, %eax
subl $0xffff, %eax           # imm = 0xFFFF
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x13760d
movq -0x10(%rbp), %rax
movl $0x64, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94a8d(%rip), %rcx     # 0x1cc091
movq %rcx, 0x8(%rax)
jmp 0x137741
leaq -0x30(%rbp), %rax
movl (%rax), %eax
subl $0x21706f54, %eax       # imm = 0x21706F54
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x137641
movq -0x10(%rbp), %rax
movl $0x9, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94a74(%rip), %rcx     # 0x1cc0ac
movq %rcx, 0x8(%rax)
jmp 0x137741
leaq -0x30(%rbp), %rdi
leaq 0x94a72(%rip), %rsi     # 0x1cc0be
movl $0x3, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x1376a5
movzbl -0x2d(%rbp), %eax
cmpl $0x37, %eax
jl 0x1376a5
movzbl -0x2d(%rbp), %eax
cmpl $0x39, %eax
jg 0x1376a5
leaq -0x30(%rbp), %rax
addq $0x4, %rax
movl (%rax), %eax
subl $0x454c4946, %eax       # imm = 0x454C4946
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1376a5
movq -0x10(%rbp), %rax
movl $0x5b, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94a26(%rip), %rcx     # 0x1cc0c2
movq %rcx, 0x8(%rax)
jmp 0x137741
leaq -0x30(%rbp), %rdi
leaq 0x7732f(%rip), %rsi     # 0x1ae9df
movl $0x14, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x1376da
movq -0x10(%rbp), %rax
movl $0x5a, (%rax)
movq -0x10(%rbp), %rax
leaq 0x94a08(%rip), %rcx     # 0x1cc0dc
movq %rcx, 0x8(%rax)
jmp 0x137741
leaq -0x30(%rbp), %rdi
leaq 0x94a16(%rip), %rsi     # 0x1cc0fb
movl $0xe, %edx
callq 0x19170
cmpl $0x0, %eax
je 0x137728
leaq -0x30(%rbp), %rdi
leaq 0x949f9(%rip), %rsi     # 0x1cc0f8
movl $0x11, %edx
callq 0x19170
cmpl $0x0, %eax
je 0x137728
leaq -0x30(%rbp), %rdi
leaq 0x949f1(%rip), %rsi     # 0x1cc10a
movl $0x5, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x137741
movq -0x10(%rbp), %rax
movl $0x14, (%rax)
movq -0x10(%rbp), %rax
leaq 0x949d3(%rip), %rcx     # 0x1cc110
movq %rcx, 0x8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)