// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil-exe.c
// Function: fmtutil_detect_specialexe
void fmtutil_detect_specialexe(deark *c, struct fmtutil_exe_info *ei,
	struct fmtutil_specialexe_detection_data *edd)
{
	edd->detected_fmt = 0;
	edd->detected_subfmt = 0;

	if(edd->restrict_to_fmt==0 || edd->restrict_to_fmt==DE_SPECIALEXEFMT_TEXE) {
		detect_specialexe_texe(c, ei, edd);
		if(edd->detected_fmt!=0) goto done;
	}

	if(edd->restrict_to_fmt==0 || edd->restrict_to_fmt==DE_SPECIALEXEFMT_GWS_EXEPIC) {
		detect_specialexe_gws_exepic(c, ei, edd);
		if(edd->detected_fmt!=0) goto done;
	}

	if(edd->restrict_to_fmt==0 || edd->restrict_to_fmt==DE_SPECIALEXEFMT_READMAKE) {
		detect_specialexe_readmake(c, ei, edd);
		if(edd->detected_fmt!=0) goto done;
	}

	if(edd->restrict_to_fmt==0 || edd->restrict_to_fmt==DE_SPECIALEXEFMT_READAMATIC) {
		detect_specialexe_readamatic(c, ei, edd);
		if(edd->detected_fmt!=0) goto done;
	}

	if(edd->restrict_to_fmt==0 || edd->restrict_to_fmt==DE_SPECIALEXEFMT_TEXTLIFE) {
		detect_specialexe_textlife(c, ei, edd);
		if(edd->detected_fmt!=0) goto done;
	}

done:
	if(!edd->detected_fmt_name[0]) {
		de_strlcpy(edd->detected_fmt_name, "unknown", sizeof(edd->detected_fmt_name));
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movw $0x0, 0x1(%rdx)
movzbl (%rdx), %eax
cmpl $0xcb, %eax
je 0x105882
testl %eax, %eax
jne 0x1058eb
cmpq $0x2, 0x50(%r14)
jl 0x1058df
movq 0x38(%r14), %rsi
movq 0x48(%r14), %rax
subq %rsi, %rax
cmpq $0x398c, %rax           # imm = 0x398C
jne 0x1058df
movq (%r14), %rdi
addq $0x3479, %rsi           # imm = 0x3479
leaq 0x4686f(%rip), %rdx     # 0x14c11c
movl $0x9, %ecx
callq 0xefc85
testl %eax, %eax
jne 0x1058df
movb $-0x35, 0x1(%rbx)
leaq 0x50(%rbx), %rdi
leaq 0x4685c(%rip), %rsi     # 0x14c126
movl $0x28, %edx
callq 0xe8219
leaq 0x1e059(%rip), %rax     # 0x123934
movq %rax, 0x48(%rbx)
cmpb $0x0, 0x1(%rbx)
jne 0x105b4d
movb (%rbx), %al
cmpb $-0x37, %al
je 0x1058fa
movzbl %al, %ecx
testl %ecx, %ecx
jne 0x1059ae
cmpq $0x0, 0x8(%r14)
jne 0x1059a2
cmpq $0x200, 0x18(%r14)      # imm = 0x200
jne 0x1059a2
cmpq $0x22, 0x30(%r14)
jne 0x1059a2
movq 0x40(%r14), %rax
cmpq 0x38(%r14), %rax
jne 0x1059a2
movq %r14, %rdi
callq 0x105bf5
movabsq $0x5763696870617247, %rax # imm = 0x5763696870617247
xorq 0x8d(%r14), %rax
movabsq $0x706f68736b726f57, %rcx # imm = 0x706F68736B726F57
xorq 0x94(%r14), %rcx
orq %rax, %rcx
je 0x10597e
movabsq $0x646e69572f535747, %rax # imm = 0x646E69572F535747
xorq 0x8d(%r14), %rax
movabsq $0x73776f646e69572f, %rcx # imm = 0x73776F646E69572F
xorq 0x90(%r14), %rcx
orq %rax, %rcx
jne 0x1059a2
movb $-0x37, 0x1(%rbx)
leaq 0x50(%rbx), %rdi
leaq 0x467ba(%rip), %rsi     # 0x14c147
movl $0x28, %edx
callq 0xe8219
leaq 0x1e6dc(%rip), %rax     # 0x12407a
movq %rax, 0x48(%rbx)
cmpb $0x0, 0x1(%rbx)
jne 0x105b4d
movb (%rbx), %al
cmpb $-0x36, %al
je 0x1059b9
movzbl %al, %ecx
testl %ecx, %ecx
jne 0x105a25
cmpq $0x4c, 0x50(%r14)
jl 0x105a19
movq %r14, %rdi
callq 0x105bf5
leaq 0xb0(%r14), %rdi
callq 0xeed5e
cmpl $0x3e, %eax
jne 0x105a19
movq (%r14), %rdi
movq 0x38(%r14), %rsi
leaq 0x4676c(%rip), %rdx     # 0x14c153
movl $0xa, %ecx
callq 0xefc85
testl %eax, %eax
jne 0x105a19
movb $-0x36, 0x1(%rbx)
leaq 0x50(%rbx), %rdi
leaq 0x4675a(%rip), %rsi     # 0x14c15e
movl $0x28, %edx
callq 0xe8219
leaq 0x1defd(%rip), %rax     # 0x123912
movq %rax, 0x48(%rbx)
cmpb $0x0, 0x1(%rbx)
jne 0x105b4d
movb (%rbx), %al
cmpb $-0x34, %al
je 0x105a30
movzbl %al, %ecx
testl %ecx, %ecx
jne 0x105a96
cmpq $0xc, 0x50(%r14)
jl 0x105a8a
cmpq $-0x10, 0x20(%r14)
jne 0x105a8a
cmpq $0x1, 0x8(%r14)
jne 0x105a8a
movq (%r14), %rdi
movl $0x1d2, %esi            # imm = 0x1D2
addq 0x38(%r14), %rsi
leaq 0x4670f(%rip), %rdx     # 0x14c167
movl $0x9, %ecx
callq 0xefc85
testl %eax, %eax
jne 0x105a8a
movb $-0x34, 0x1(%rbx)
leaq 0x50(%rbx), %rdi
leaq 0x466fc(%rip), %rsi     # 0x14c171
movl $0x28, %edx
callq 0xe8219
leaq 0x1dec8(%rip), %rax     # 0x12394e
movq %rax, 0x48(%rbx)
cmpb $0x0, 0x1(%rbx)
jne 0x105b4d
movb (%rbx), %al
cmpb $-0x33, %al
je 0x105aa5
movzbl %al, %eax
testl %eax, %eax
jne 0x105b4d
cmpq $0xfff0, 0x18(%r14)     # imm = 0xFFF0
jne 0x105b4d
movq $-0x2ee1, %rax          # imm = 0xD11F
addq 0x28(%r14), %rax
cmpq $-0x1389, %rax          # imm = 0xEC77
jb 0x105b4d
movq $-0x137, %rax           # imm = 0xFEC9
addq 0x8(%r14), %rax
cmpq $-0x51, %rax
jb 0x105b4d
movq (%r14), %rdi
movq 0x38(%r14), %rsi
leaq 0x46695(%rip), %rdx     # 0x14c17e
movl $0x7, %ecx
callq 0xefc85
testl %eax, %eax
jne 0x105b4d
movq (%r14), %rdi
movl $0x36b0, %ecx           # imm = 0x36B0
addq 0x38(%r14), %rcx
leaq 0x4667c(%rip), %rsi     # 0x14c186
movq %rsp, %r9
movl $0x6, %edx
movl $0xfa0, %r8d            # imm = 0xFA0
callq 0xf149c
testl %eax, %eax
je 0x105b4d
movq (%rsp), %rax
movq %rax, 0x20(%rbx)
movb $-0x33, 0x1(%rbx)
leaq 0x50(%rbx), %rdi
leaq 0x46655(%rip), %rsi     # 0x14c18d
movl $0x28, %edx
callq 0xe8219
leaq 0x1de39(%rip), %rax     # 0x123982
movq %rax, 0x48(%rbx)
cmpb $0x0, 0x50(%rbx)
jne 0x105b6b
addq $0x50, %rbx
leaq 0xc93e(%rip), %rsi      # 0x11249c
movl $0x28, %edx
movq %rbx, %rdi
callq 0xe8219
addq $0x8, %rsp
popq %rbx
popq %r14
retq