// File: /workspace/github_c_makefile_star2_O1/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 0x105cea
testl %eax, %eax
jne 0x105d51
cmpq $0x2, 0x50(%r14)
jl 0x105d47
movq 0x38(%r14), %rsi
movq 0x48(%r14), %rax
subq %rsi, %rax
cmpq $0x398c, %rax           # imm = 0x398C
jne 0x105d47
movq (%r14), %rdi
addq $0x3479, %rsi           # imm = 0x3479
leaq 0x45de7(%rip), %rdx     # 0x14bafc
movl $0x9, %ecx
callq 0xf025e
testl %eax, %eax
jne 0x105d47
movb $-0x35, 0x1(%rbx)
leaq 0x50(%rbx), %rdi
leaq 0x45dd4(%rip), %rsi     # 0x14bb06
movl $0x28, %edx
callq 0xe8ded
leaq 0x1da11(%rip), %rax     # 0x123754
movq %rax, 0x48(%rbx)
cmpb $0x0, 0x1(%rbx)
jne 0x105fb9
movzbl (%rbx), %eax
cmpl $0xc9, %eax
je 0x105d63
testl %eax, %eax
jne 0x105e15
cmpq $0x0, 0x8(%r14)
jne 0x105e0b
cmpq $0x200, 0x18(%r14)      # imm = 0x200
jne 0x105e0b
cmpq $0x22, 0x30(%r14)
jne 0x105e0b
movq 0x40(%r14), %rax
cmpq 0x38(%r14), %rax
jne 0x105e0b
movq %r14, %rdi
callq 0x106061
movabsq $0x5763696870617247, %rax # imm = 0x5763696870617247
xorq 0x8d(%r14), %rax
movabsq $0x706f68736b726f57, %rcx # imm = 0x706F68736B726F57
xorq 0x94(%r14), %rcx
orq %rax, %rcx
je 0x105de7
movabsq $0x646e69572f535747, %rax # imm = 0x646E69572F535747
xorq 0x8d(%r14), %rax
movabsq $0x73776f646e69572f, %rcx # imm = 0x73776F646E69572F
xorq 0x90(%r14), %rcx
orq %rax, %rcx
jne 0x105e0b
movb $-0x37, 0x1(%rbx)
leaq 0x50(%rbx), %rdi
leaq 0x45d31(%rip), %rsi     # 0x14bb27
movl $0x28, %edx
callq 0xe8ded
leaq 0x1e051(%rip), %rax     # 0x123e58
movq %rax, 0x48(%rbx)
cmpb $0x0, 0x1(%rbx)
jne 0x105fb9
movzbl (%rbx), %eax
cmpl $0xca, %eax
je 0x105e23
testl %eax, %eax
jne 0x105e8d
cmpq $0x4c, 0x50(%r14)
jl 0x105e83
movq %r14, %rdi
callq 0x106061
leaq 0xb0(%r14), %rdi
callq 0xef37b
cmpl $0x3e, %eax
jne 0x105e83
movq (%r14), %rdi
movq 0x38(%r14), %rsi
leaq 0x45ce2(%rip), %rdx     # 0x14bb33
movl $0xa, %ecx
callq 0xf025e
testl %eax, %eax
jne 0x105e83
movb $-0x36, 0x1(%rbx)
leaq 0x50(%rbx), %rdi
leaq 0x45cd0(%rip), %rsi     # 0x14bb3e
movl $0x28, %edx
callq 0xe8ded
leaq 0x1d8b3(%rip), %rax     # 0x123732
movq %rax, 0x48(%rbx)
cmpb $0x0, 0x1(%rbx)
jne 0x105fb9
movzbl (%rbx), %eax
cmpl $0xcc, %eax
je 0x105e9b
testl %eax, %eax
jne 0x105eff
cmpq $0xc, 0x50(%r14)
jl 0x105ef5
cmpq $-0x10, 0x20(%r14)
jne 0x105ef5
cmpq $0x1, 0x8(%r14)
jne 0x105ef5
movq (%r14), %rdi
movl $0x1d2, %esi            # imm = 0x1D2
addq 0x38(%r14), %rsi
leaq 0x45c84(%rip), %rdx     # 0x14bb47
movl $0x9, %ecx
callq 0xf025e
testl %eax, %eax
jne 0x105ef5
movb $-0x34, 0x1(%rbx)
leaq 0x50(%rbx), %rdi
leaq 0x45c71(%rip), %rsi     # 0x14bb51
movl $0x28, %edx
callq 0xe8ded
leaq 0x1d87d(%rip), %rax     # 0x12376e
movq %rax, 0x48(%rbx)
cmpb $0x0, 0x1(%rbx)
jne 0x105fb9
movzbl (%rbx), %eax
cmpl $0xcd, %eax
je 0x105f11
testl %eax, %eax
jne 0x105fb9
cmpq $0xfff0, 0x18(%r14)     # imm = 0xFFF0
jne 0x105fb9
movq $-0x2ee1, %rax          # imm = 0xD11F
addq 0x28(%r14), %rax
cmpq $-0x1389, %rax          # imm = 0xEC77
jb 0x105fb9
movq $-0x137, %rax           # imm = 0xFEC9
addq 0x8(%r14), %rax
cmpq $-0x51, %rax
jb 0x105fb9
movq (%r14), %rdi
movq 0x38(%r14), %rsi
leaq 0x45c09(%rip), %rdx     # 0x14bb5e
movl $0x7, %ecx
callq 0xf025e
testl %eax, %eax
jne 0x105fb9
movq (%r14), %rdi
movl $0x36b0, %ecx           # imm = 0x36B0
addq 0x38(%r14), %rcx
leaq 0x45bf0(%rip), %rsi     # 0x14bb66
movq %rsp, %r9
movl $0x6, %edx
movl $0xfa0, %r8d            # imm = 0xFA0
callq 0xf1a9c
testl %eax, %eax
je 0x105fb9
movq (%rsp), %rax
movq %rax, 0x20(%rbx)
movb $-0x33, 0x1(%rbx)
leaq 0x50(%rbx), %rdi
leaq 0x45bc9(%rip), %rsi     # 0x14bb6d
movl $0x28, %edx
callq 0xe8ded
leaq 0x1d7ed(%rip), %rax     # 0x1237a2
movq %rax, 0x48(%rbx)
cmpb $0x0, 0x50(%rbx)
jne 0x105fd7
addq $0x50, %rbx
leaq 0xc4c2(%rip), %rsi      # 0x11248c
movl $0x28, %edx
movq %rbx, %rdi
callq 0xe8ded
addq $0x8, %rsp
popq %rbx
popq %r14
retq