LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: get_data_symbol[abi:cxx11](unsigned long)
string get_data_symbol(size_t offset)
{
	auto it = data_symbol_dict.find(offset);
	if (it == data_symbol_dict.end()) {
		err("Unknown data symbol offset '%zd'\n", offset);
		exit(1);
	}
	return it->second;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x10(%rbp), %rax
movq %rsi, (%rax)
leaq 0x1318f(%rip), %rdi     # 0x213c8
movq %rax, %rsi
callq 0x12cf6
testq %rax, %rax
je 0xe25f
addq $0x10, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3270
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq -0x10(%rbp), %rsi
leaq 0x8f63(%rip), %rdi      # 0x171cd
xorl %eax, %eax
callq 0xf410
pushq $0x1
popq %rdi
callq 0x3220
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: main
int main(int argc, const char** argv)
{
	bool assembly = false;
	const char* filename = nullptr;
	for (--argc, ++argv; argc > 0 && !filename; --argc, ++argv) {
		if (**argv == '-') {
			if (*(*argv+1) == 'v') { ++verbose; }
			if (*(*argv+1) == 's') { assembly = true; }
		} else {
			filename = *argv;
		}
	}
	if (!filename) {
		log("usage: icpp [-s] [-v] <foo.cpp> ...\n");
		return false;
	}
	on_err = print_current_and_exit;
	if (load(filename)) parse();
	return assembly ? show() : run(argc, argv);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movl %edi, %r14d
movl 0x127f6(%rip), %eax     # 0x215d0
xorl %r12d, %r12d
addq $0x8, %rbx
xorl %esi, %esi
movl %r14d, %ecx
leal -0x1(%rcx), %r14d
cmpl $0x2, %ecx
jl 0xee1f
testq %rsi, %rsi
jne 0xee1f
movq (%rbx), %rsi
addq $0x8, %rbx
cmpb $0x2d, (%rsi)
jne 0xede3
movb 0x1(%rsi), %cl
cmpb $0x76, %cl
jne 0xee10
incl %eax
movl %eax, 0x127c0(%rip)     # 0x215d0
addq $-0x8, %rbx
cmpb $0x73, %cl
sete %cl
orb %cl, %r12b
jmp 0xeddd
testq %rsi, %rsi
je 0xee6f
leaq -0xac2f(%rip), %rax     # 0x41fc
movq %rax, 0x127ae(%rip)     # 0x215e0
leaq -0x48(%rbp), %r15
leaq -0x21(%rbp), %rdx
movq %r15, %rdi
callq 0xf1f8
movq %r15, %rdi
callq 0xcec8
movl %eax, %r15d
leaq -0x48(%rbp), %rdi
callq 0x3368
testb %r15b, %r15b
je 0xee60
callq 0xd6e0
testb $0x1, %r12b
je 0xee81
callq 0xdc8f
xorl %ebx, %ebx
jmp 0xee8e
leaq 0x8654(%rip), %rdi      # 0x174ca
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xf09e
jmp 0xee8e
movl %r14d, %edi
movq %rbx, %rsi
callq 0xe62f
movl %eax, %ebx
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x3368
movq %rbx, %rdi
callq 0x3310
nop
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::setPreempt(int)
void Signal::setPreempt(int prValue)
// GD 2009.  This sets a preempt value when there is a valid decode which
// is not reported at the time, so we could not use NewPreemptValue as
// that only takes effect when protocol is reported.
{
	if (	preemptValue < prValue	
		||	preemptValue == prValue	
			&&	nFrameL > preemptLength )	
	{										
		preemptValue = prValue;
		preemptLength = nFrameL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl %esi, 0x54(%rdi)
jge 0x265e
movl 0x48(%rdi), %eax
movl %esi, 0x54(%rdi)
movl %eax, 0x50(%rdi)
jmp 0x2668
jne 0x2668
movl 0x48(%rdi), %eax
cmpl 0x50(%rdi), %eax
jg 0x2656
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::trySingleBurstSize()
void Signal::trySingleBurstSize()
{
    // pid-0003 16 bits, no end pulse

    if ( nFrameL != 16 )
        return;

    if ( sortBurst.min1 * 1.3 < sortBurst.max1 )
        return;

    if ( sortOn.min1 * 1.4 < sortOn.max1 )
        nMaxShort = (sortOn.min1 + sortOn.max1) * .5;
    else
        nMaxShort = (sortBurst.min1 + sortBurst.max1) * .25;
    cleanup();
    while ( nBit <= nFrameL )
    {
        if ( pBit[0] > nMaxShort )
        {
			cBits[nBit>>3] |= 1 << (nBit & 7);
        }
        pBit += 2;
        nBit++;
    }

    switch ( nFrameL )
    {
        case 16:
            if ( cBits[0] + cBits[1] == 255 )
            {
                // {40.2k,389}<2,-2|3,-1>(F:8,~F:8,^102k)+
                //
        		strcpy(pProtocol, "pid-0003");
            	*pOBC = cBits[0];
                *pHex = msb(*pOBC);

				newPreemptValue = prByPid_0001;    // Avoid Async decode
				newPreemptLength = 16;
            }
            return;
    }

}

// Assembly:
cmpl $0x10, 0x48(%rdi)
jne 0xc881
pushq %rbp
movq %rsp, %rbp
movss 0x1d0(%rdi), %xmm0
cvtss2sd %xmm0, %xmm1
mulsd 0x4acc(%rip), %xmm1     # 0x111e0
movss 0x1dc(%rdi), %xmm2
cvtss2sd %xmm2, %xmm3
ucomisd %xmm1, %xmm3
ja 0xc880
movss 0x180(%rdi), %xmm1
cvtss2sd %xmm1, %xmm4
mulsd 0x4c42(%rip), %xmm4     # 0x11380
movss 0x184(%rdi), %xmm3
cvtss2sd %xmm3, %xmm5
ucomisd %xmm4, %xmm5
ja 0xc761
addss %xmm2, %xmm0
mulss 0x4e38(%rip), %xmm0     # 0x11594
movaps %xmm0, %xmm1
jmp 0xc76d
addss %xmm3, %xmm1
mulss 0x4da3(%rip), %xmm1     # 0x11510
movss %xmm1, 0xe8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rdi)
movq 0x38(%rdi), %rcx
movq %rcx, 0xc8(%rdi)
andq $0x0, 0xc0(%rdi)
xorl %edx, %edx
movl $0x10, %esi
movl $0x1, %eax
cmpl %esi, %edx
jg 0xc7eb
movss (%rcx), %xmm0
ucomiss 0xe8(%rdi), %xmm0
jbe 0xc7d6
movl %edx, %ecx
andb $0x7, %cl
movl %eax, %esi
shll %cl, %esi
sarl $0x3, %edx
movslq %edx, %rcx
orb %sil, 0xa0(%rdi,%rcx)
movq 0xc8(%rdi), %rcx
movl 0x48(%rdi), %esi
movl 0xc0(%rdi), %edx
addq $0x8, %rcx
movq %rcx, 0xc8(%rdi)
incl %edx
movl %edx, 0xc0(%rdi)
jmp 0xc79e
cmpl $0x10, %esi
jne 0xc880
movzbl 0xa0(%rdi), %eax
movzbl 0xa1(%rdi), %ecx
addl %eax, %ecx
cmpl $0xff, %ecx
jne 0xc880
movq 0x148(%rdi), %rax
movabsq $0x333030302d646970, %rcx # imm = 0x333030302D646970
movq %rcx, (%rax)
movb $0x0, 0x8(%rax)
movzbl 0xa0(%rdi), %eax
movq 0x170(%rdi), %rcx
movl %eax, (%rcx)
bswapl %eax
movl %eax, %ecx
shll $0x4, %ecx
shrl $0x4, %eax
andl $0xf000000, %eax        # imm = 0xF000000
orl %ecx, %eax
movl $0x33000000, %ecx       # imm = 0x33000000
movl %eax, %edx
andl %ecx, %edx
shrl $0x2, %eax
andl %ecx, %eax
leal (%rax,%rdx,4), %eax
movl $0x55000000, %ecx       # imm = 0x55000000
movl %eax, %edx
andl %ecx, %edx
shrl %eax
andl %ecx, %eax
leal (%rax,%rdx,2), %eax
shrl $0x18, %eax
movq 0x178(%rdi), %rcx
movl %eax, (%rcx)
movabsq $0x200000010, %rax      # imm = 0x200000010
movq %rax, 0x58(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::tryGXB()
void Signal::tryGXB()
// GXB  {38.3k,520}<1,-3|3,-1>(1,-1,D:4,F:8,P:1,1,^???)+
// P is odd parity for F
{
	if (nFrameL != 15)
		return;
	if (   sortBurst.min2 != sortBurst.mid2
		|| sortBurst.min1 >= sortOn.max1
		|| sortBurst.min1 != pFrame[0] + pFrame[1]
		|| sortBurst.min1*1.5 > sortBurst.mid2
		|| sortBurst.mid2*1.25 < sortBurst.max1 )
	{
		return;
	}
	nMaxShort = sortBurst.mid2*.5;
	cleanup();
	pBit+=2;
	decodeX( 13 );
	makeMsb();
	*pDevice = getMsb(0,4);
	*pOBC = getMsb(4,8);
	if ( parity( getMsb(4,9) ) )
	{
		strcpy(pProtocol, "GXB");
	}
	else
	{
		sprintf(pProtocol, "GXB-%03X.%d", getMsb(0,12), getMsb(12,1));
	}


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpl $0xf, 0x48(%rdi)
jne 0xc9af
movq %rdi, %rbx
movss 0x1cc(%rdi), %xmm1
movss 0x1d8(%rdi), %xmm0
ucomiss %xmm0, %xmm1
jne 0xc9af
jp 0xc9af
movss 0x1d0(%rbx), %xmm1
ucomiss 0x184(%rbx), %xmm1
jae 0xc9af
movq 0x38(%rbx), %rax
movss (%rax), %xmm2
addss 0x4(%rax), %xmm2
ucomiss %xmm2, %xmm1
jne 0xc9af
jp 0xc9af
cvtss2sd %xmm1, %xmm2
mulsd 0x4886(%rip), %xmm2     # 0x11178
cvtss2sd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
ja 0xc9af
mulsd 0x4a10(%rip), %xmm1     # 0x11318
cvtss2sd 0x1dc(%rbx), %xmm2
ucomisd %xmm1, %xmm2
ja 0xc9af
mulss 0x4bee(%rip), %xmm0     # 0x11510
movss %xmm0, 0xe8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rbx)
andq $0x0, 0xc0(%rbx)
addq $0x8, %rax
movq %rax, 0xc8(%rbx)
pushq $0xd
popq %rsi
movq %rbx, %rdi
callq 0xece0
movq %rbx, %rdi
callq 0xec52
movzbl 0xa0(%rbx), %eax
shrl $0x4, %eax
movq 0x160(%rbx), %rcx
movl %eax, (%rcx)
pushq $0x4
popq %r14
pushq $0x8
popq %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0xeb6a
movq 0x170(%rbx), %rcx
movl %eax, (%rcx)
pushq $0x9
popq %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0xeb6a
movl %eax, %edi
callq 0x1032e
movq 0x148(%rbx), %r14
testl %eax, %eax
je 0xc9b4
movl $0x425847, (%r14)       # imm = 0x425847
popq %rbx
popq %r14
popq %rbp
retq
pushq $0xc
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xeb6a
movzbl 0xa1(%rbx), %ecx
shrl $0x3, %ecx
andl $0x1, %ecx
leaq 0x55c6(%rip), %rsi      # 0x11f9b
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x2060
nop
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::tryAirAsync()
void Signal::tryAirAsync()
{
	if (!framed(22*8*105))
		return;
	if ( nFrameL < 5 )
		return;
	if (preemptValue >= prAsync)
		return;

	// Longest > 22 bits is treated as a decode boundary
	// Longest < 2 (shortened) bits makes false decode too likely
	if (sortOff.max1 > 22*8*105 || sortOff.max1 < 2*7*105)
		return;
    if (sortOn.max1 > 9*9*105)
        return;

	int result = decodeAsync(pFrame, 0, 0, 7*105, 9*105, 11, 11);
	if (result)
	{
		sprintf(pProtocol, "AirAsync%d-", result);
		for (int nn=0; nn<result; ++nn)
		{
			sprintf(pProtocol+strlen(pProtocol),
				   ( nn ? ".%02X" : "%02X" )
				, cBits[nn] );
		}
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movss 0x140(%rdi), %xmm0
ucomiss 0x49c3(%rip), %xmm0     # 0x11670
jb 0xcd9e
movq %rdi, %rbx
cmpl $0x5, 0x48(%rdi)
jl 0xcd9e
cmpl $0x0, 0x54(%rbx)
jg 0xcd9e
movss 0x190(%rbx), %xmm0
ucomiss 0x4997(%rip), %xmm0     # 0x11670
ja 0xcd9e
movss 0x490d(%rip), %xmm1     # 0x115f4
ucomiss %xmm0, %xmm1
ja 0xcd9e
movss 0x184(%rbx), %xmm0
ucomiss 0x4981(%rip), %xmm0     # 0x11680
ja 0xcd9e
movq 0x38(%rbx), %rsi
xorl %r15d, %r15d
movsd 0x4784(%rip), %xmm0     # 0x11498
movsd 0x4784(%rip), %xmm1     # 0x114a0
pushq $0xb
popq %r8
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r8d, %r9d
callq 0xf01e
testl %eax, %eax
je 0xcd9e
movl %eax, %r14d
movq 0x148(%rbx), %rdi
leaq 0x528d(%rip), %rsi      # 0x11fd1
movl %eax, %edx
xorl %eax, %eax
callq 0x2060
testl %r14d, %r14d
cmovlel %r15d, %r14d
leaq 0x5270(%rip), %r13      # 0x11fcb
xorl %r12d, %r12d
cmpq %r12, %r14
je 0xcd9e
movq 0x148(%rbx), %r15
movq %r15, %rdi
callq 0x20a0
addq %rax, %r15
testq %r12, %r12
movq %r13, %rsi
leaq 0x518a(%rip), %rax      # 0x11f0c
cmoveq %rax, %rsi
movzbl 0xa0(%rbx,%r12), %edx
movq %r15, %rdi
xorl %eax, %eax
callq 0x2060
incq %r12
jmp 0xcd5e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::trySunfire()
void Signal::trySunfire()
{
	if (nFrameL != 25)
		return;
	if ( pFrame[1] <= sortBurst.max2 )
		return;
	if ( ! framed(sortBurst.max1) )
		return;
	cleanup();
   	pBit = pFrame+2;
	nMaxShort = sortBurst.min1;
	decodeX(24);
	if (getLsb(0,12) + getLsb(12,12) != 0xFFF )
		return;
	makeMsb();
	strcpy(pProtocol, "Sunfire");
	*pDevice = getMsb(0,4);
	*pOBC = getMsb(4,8);

}

// Assembly:
cmpl $0x19, 0x48(%rdi)
jne 0xd0ec
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rax
movss 0x1e0(%rdi), %xmm0
ucomiss 0x4(%rax), %xmm0
jae 0xd0e2
movss 0x140(%rbx), %xmm0
ucomiss 0x1dc(%rbx), %xmm0
jb 0xd0e2
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rbx)
andq $0x0, 0xc0(%rbx)
addq $0x8, %rax
movq %rax, 0xc8(%rbx)
movss 0x1d0(%rbx), %xmm0
movss %xmm0, 0xe8(%rbx)
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0xece0
pushq $0xc
popq %r14
movq %rbx, %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0xebd6
movl %eax, %r15d
movq %rbx, %rdi
movl %r14d, %esi
movl %r14d, %edx
callq 0xebd6
addl %r15d, %eax
cmpl $0xfff, %eax            # imm = 0xFFF
jne 0xd0e2
movq %rbx, %rdi
callq 0xec52
movq 0x148(%rbx), %rax
movabsq $0x657269666e7553, %rcx # imm = 0x657269666E7553
movq %rcx, (%rax)
movzbl 0xa0(%rbx), %eax
shrl $0x4, %eax
movq 0x160(%rbx), %rcx
movl %eax, (%rcx)
pushq $0x4
popq %rsi
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0xeb6a
movq 0x170(%rbx), %rcx
movl %eax, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::tryPid13()
void Signal::tryPid13()
// GD 2009 Added comment:  Decode assumes frame contains at least one 1 bit
{
	// {37.9k,1082}<0,-1|1,-0>(1,-1,F:6,-26)+
	if ( nFrameL > 5 )	
		return;
	if (   pFrame[0] < 900.
		|| pFrame[0] > 1200. )
	{
		return;
	}

	if ( ! framed(nTotDur) )
		return;
	m_rawUnit =  1. / pFrame[0];
	m_rawPulseAdjust = .4f;  // Pulse from -.4 to +.2
	m_rawGapAdjust = .2f;    // Gap from -.2 to +.4
	m_rawErrorLimit = .6f;

	cleanup();
	pBit += 1;
	if ( ! decodeRaw(7) || pBit < pFrameEnd )	
	{
		return;
	}

	// GD 2009 Start: Add any trailing 0's concatenated with lead-out into 
	// nTotDur and re-test framing.  Eliminates spurious decodes of final
	// 2 frames of G.I.4DTV and probably others.
	float n = 7.f;	// number of trailing 0's
	unsigned char xBits = cBits[0];
	for ( ; xBits != 0; n-- ) { xBits >>= 1; }
	if ( ! framed(nTotDur + (n - m_rawGapAdjust) / m_rawUnit ) )
	{
		return;
	}
	// GD 2009 End

	strcpy(pProtocol,"pid-0013");
	*pOBC = getLsb(1,6);
	*pHex = ((msb(cBits[0]) >> 1) & 0x3F) | 0x80;
}

// Assembly:
cmpl $0x5, 0x48(%rdi)
jg 0xd4b7
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rax
movss (%rax), %xmm0
movss 0x420b(%rip), %xmm1     # 0x1155c
ucomiss %xmm0, %xmm1
ja 0xd4b1
ucomiss 0x434b(%rip), %xmm0     # 0x116ac
ja 0xd4b1
movss 0x140(%rbx), %xmm1
ucomiss 0x98(%rbx), %xmm1
jb 0xd4b1
movss 0x432c(%rip), %xmm1     # 0x116b0
divss %xmm0, %xmm1
movss %xmm1, 0xfc(%rbx)
movabsq $0x3e4ccccd3ecccccd, %rcx # imm = 0x3E4CCCCD3ECCCCCD
movq %rcx, 0x100(%rbx)
movl $0x3f19999a, 0x108(%rbx) # imm = 0x3F19999A
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rbx)
andq $0x0, 0xc0(%rbx)
addq $0x4, %rax
movq %rax, 0xc8(%rbx)
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0xeebe
testl %eax, %eax
je 0xd4b1
movq 0xc8(%rbx), %rax
cmpq 0x40(%rbx), %rax
jb 0xd4b1
leaq 0xa0(%rbx), %rax
movb (%rax), %al
movss 0x4117(%rip), %xmm0     # 0x11514
movss 0x4163(%rip), %xmm1     # 0x11568
testb %al, %al
je 0xd411
shrb %al
addss %xmm1, %xmm0
jmp 0xd405
subss 0x104(%rbx), %xmm0
divss 0xfc(%rbx), %xmm0
addss 0x98(%rbx), %xmm0
movss 0x140(%rbx), %xmm1
ucomiss %xmm0, %xmm1
jb 0xd4b1
movq 0x148(%rbx), %rax
movabsq $0x333130302d646970, %rcx # imm = 0x333130302D646970
movq %rcx, (%rax)
movb $0x0, 0x8(%rax)
movl 0xa0(%rbx), %eax
shrl %eax
andl $0x3f, %eax
movq 0x170(%rbx), %rcx
movl %eax, (%rcx)
movl 0xa0(%rbx), %eax
bswapl %eax
movl %eax, %ecx
shrl $0x4, %ecx
movl $0xf0f0f0f, %edx        # imm = 0xF0F0F0F
andl %edx, %ecx
andl %edx, %eax
shll $0x4, %eax
orl %ecx, %eax
movl $0x33333333, %ecx       # imm = 0x33333333
movl %eax, %edx
andl %ecx, %edx
shrl $0x2, %eax
andl %ecx, %eax
leal (%rax,%rdx,4), %eax
movl %eax, %ecx
andl $0x15000000, %ecx       # imm = 0x15000000
shrl %eax
andl $0x54000000, %eax       # imm = 0x54000000
leal (%rax,%rcx,2), %eax
shrl $0x19, %eax
orl $0x80, %eax
movq 0x178(%rbx), %rcx
movl %eax, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::tryElan()
void Signal::tryElan()   // {40.2k,398,msb}<1,-1|1,-2>(3,-2,D:8,~D:8,2,-2,F:8,~F:8,1,^50m)+  DAR 2012
{
	if ( nFrameL != 35)
		return;
    if ( sortOff.min1 * 3.6 < sortBurst.max3  || sortOff.min1 * 2.4 > sortBurst.max3)
        return;
	if (pFrame[34] > 2.4 * sortOff.min1 || pFrame[34] < 1.6 * sortOff.min1 
		|| pFrame[35] > 2.4 * sortOff.min1 || pFrame[35] < 1.6 * sortOff.min1 )
		return;
	cleanup();
	nMaxShort = sortBurst.min1 * .4;
	int cNdx = 0;
	for (int ndx=1; ndx<35; ++ndx)
	{
		if (ndx == 17) ndx++;
		if (pFrame[2*ndx] > nMaxShort)
		{
			if (pFrame[2*ndx+1] > 2 * nMaxShort)
				cBits[cNdx>>3] |= 0x80 >> (cNdx&7);
		}
		cNdx++;
	}
	int dev = cBits[0];
	int devComp = cBits[1];
	int cmd = cBits[2];
	int cmdComp = cBits[3];
	if ((0xFF ^ devComp) !=  dev || (0xFF ^ cmdComp) != cmd)
		return;
	strcpy(pProtocol,"Elan");
	*pDevice = dev;
	*pOBC = cmd;
}

// Assembly:
cmpl $0x23, 0x48(%rdi)
jne 0xd8f1
pushq %rbp
movq %rsp, %rbp
cvtss2sd 0x18c(%rdi), %xmm0
movsd 0x3d20(%rip), %xmm1     # 0x114b0
mulsd %xmm0, %xmm1
cvtss2sd 0x1e4(%rdi), %xmm2
ucomisd %xmm1, %xmm2
ja 0xd8f0
movsd 0x39b2(%rip), %xmm1     # 0x11160
mulsd %xmm0, %xmm1
ucomisd %xmm2, %xmm1
ja 0xd8f0
movq 0x38(%rdi), %rax
cvtss2sd 0x88(%rax), %xmm2
ucomisd %xmm1, %xmm2
ja 0xd8f0
mulsd 0x39e6(%rip), %xmm0     # 0x111c0
ucomisd %xmm2, %xmm0
ja 0xd8f0
cvtss2sd 0x8c(%rax), %xmm2
ucomisd %xmm1, %xmm2
ja 0xd8f0
ucomisd %xmm2, %xmm0
ja 0xd8f0
xorpd %xmm0, %xmm0
movupd %xmm0, 0xa0(%rdi)
movq %rax, 0xc8(%rdi)
andq $0x0, 0xc0(%rdi)
leaq 0xa0(%rdi), %rdx
cvtss2sd 0x1d0(%rdi), %xmm0
mulsd 0x39ce(%rip), %xmm0     # 0x11200
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xe8(%rdi)
xorl %esi, %esi
movl $0x1, %r8d
movl $0x12, %r9d
cmpl $0x21, %esi
je 0xd8a5
cmpl $0x11, %r8d
cmovel %r9d, %r8d
leal (%r8,%r8), %ecx
movslq %ecx, %r10
movss (%rax,%r10,4), %xmm1
movss 0xe8(%rdi), %xmm0
ucomiss %xmm0, %xmm1
jbe 0xd89e
orl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
addss %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jbe 0xd89e
movl %esi, %ecx
andb $0x7, %cl
movl $0x80, %r10d
shrl %cl, %r10d
movl %esi, %ecx
shrl $0x3, %ecx
orb %r10b, (%rdx,%rcx)
incl %esi
incl %r8d
jmp 0xd84c
movzbl 0xa0(%rdi), %eax
movb 0xa1(%rdi), %cl
xorb %al, %cl
cmpb $-0x1, %cl
jne 0xd8f0
movzbl 0xa2(%rdi), %ecx
movb 0xa3(%rdi), %dl
xorb %cl, %dl
cmpb $-0x1, %dl
jne 0xd8f0
movq 0x148(%rdi), %rdx
movb $0x0, 0x4(%rdx)
movl $0x6e616c45, (%rdx)     # imm = 0x6E616C45
movq 0x160(%rdi), %rdx
movl %eax, (%rdx)
movq 0x170(%rdi), %rax
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::tryBryston()
void Signal::tryBryston()   //  {38.0k,315} <1,-6|6,-1>(D:10, F:8, -18)  //DAR 2012 
{
	if ( nFrameL != 18 || !framed(nMaxDur*16) )
		return;
    if ( sortBurst.min1 * 1.15 < sortBurst.max1 )
        return;
	 if ( sortOff.min1 * 8 < sortBurst.max3  || sortOff.min1 * 6 > sortBurst.max3)
        return;
    nMaxShort = sortBurst.min1 * .4;
    cleanup();
	for (int ndx=0; ndx<nFrameL; ++ndx)
	{
		if (pFrame[2*ndx] > nMaxShort)
		{
			if (pFrame[2*ndx+1] > nMaxShort && ndx<nFrameL-1)
				return;
			cBits[ndx>>3] |= 1 << (ndx&7);
		}
	}
	strcpy(pProtocol,"Bryston");
	*pDevice = getLsb(0,10);
	*pOBC = getLsb(10,8);
}

// Assembly:
cmpl $0x12, 0x48(%rdi)
jne 0xda50
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movss 0x9c(%rdi), %xmm0
movss 0x140(%rdi), %xmm1
mulss 0x3d3e(%rip), %xmm0     # 0x1165c
ucomiss %xmm0, %xmm1
jb 0xda4c
cvtss2sd 0x1d0(%rbx), %xmm0
movsd 0x3b39(%rip), %xmm1     # 0x11470
mulsd %xmm0, %xmm1
cvtss2sd 0x1dc(%rbx), %xmm2
ucomisd %xmm1, %xmm2
ja 0xda4c
movss 0x18c(%rbx), %xmm1
movss 0x1e4(%rbx), %xmm2
movss 0x3c73(%rip), %xmm3     # 0x115d8
mulss %xmm1, %xmm3
ucomiss %xmm3, %xmm2
ja 0xda4c
mulss 0x3b8a(%rip), %xmm1     # 0x11504
ucomiss %xmm2, %xmm1
ja 0xda4c
mulsd 0x3875(%rip), %xmm0     # 0x11200
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xe8(%rbx)
leaq 0xa0(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rbx)
movq 0x38(%rbx), %rdx
movq %rdx, 0xc8(%rbx)
andq $0x0, 0xc0(%rbx)
xorl %esi, %esi
cmpq $0x12, %rsi
je 0xda07
movss (%rdx,%rsi,8), %xmm1
movss 0xe8(%rbx), %xmm0
ucomiss %xmm0, %xmm1
jbe 0xda02
movss 0x4(%rdx,%rsi,8), %xmm1
ucomiss %xmm0, %xmm1
seta %cl
cmpq $0x11, %rsi
setb %dil
testb %dil, %cl
jne 0xda4c
movl %esi, %ecx
andb $0x7, %cl
movb $0x1, %dil
shlb %cl, %dil
movl %esi, %ecx
shrl $0x3, %ecx
orb %dil, (%rax,%rcx)
incq %rsi
jmp 0xd9bd
movq 0x148(%rbx), %rax
movabsq $0x6e6f7473797242, %rcx # imm = 0x6E6F7473797242
movq %rcx, (%rax)
pushq $0xa
popq %r14
movq %rbx, %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0xebd6
movq 0x160(%rbx), %rcx
movl %eax, (%rcx)
pushq $0x8
popq %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0xebd6
movq 0x170(%rbx), %rcx
movl %eax, (%rcx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::tryAdNotam()
void Signal::tryAdNotam()
//
// Ad Notam        {35.7Khz,895,msb}<1,-1|-1,1>(0:1,1:1,D:6,F:6,^114m)+   DAR  August 2012

{
	if ( nFrameL < 6 )
		return;
	const float HB = 889; 
	if ( nTotDur < 10.*HB )
		return;
	if ( sortOn.min1 < HB * .3 )
		return;
	if ( sortOn.max1 > HB * 2.4 )
		return;
	if (   !framed(20*HB)  //framed(nGap) is: return nGap <= frame, which pFramedEnd
		|| nMaxDur > HB*6.5    
        || sortBurst.max2 > HB*4.5  // nominal 2,-2
		|| *pFrame < HB*.5
		|| sortOff.max1 > 3 * HB )
	{
		return;
	}
	cleanup();
    if (!processManchesterAtoms(0, 14, 0, 2*HB, pFrame)) 
		return;
	if (nBit != 14)
		return;
	if (getMsb(0,2) != 1 )
		return;
	*pDevice = getMsb(2,6);
	*pOBC = getMsb(8,6);
	strcpy(pProtocol, "Ad Notam");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0x6, 0x48(%rdi)
jl 0xdcc2
movq %rdi, %rbx
movss 0x3987(%rip), %xmm0     # 0x11618
ucomiss 0x98(%rdi), %xmm0
ja 0xdcc2
cvtss2sd 0x180(%rbx), %xmm0
movsd 0x378e(%rip), %xmm1     # 0x11438
ucomisd %xmm0, %xmm1
ja 0xdcc2
cvtss2sd 0x184(%rbx), %xmm0
ucomisd 0x3780(%rip), %xmm0     # 0x11440
jbe 0xdcc9
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movss 0x140(%rbx), %xmm0
ucomiss 0x3944(%rip), %xmm0     # 0x1161c
jb 0xdcc2
movss 0x9c(%rbx), %xmm0
ucomiss 0x3937(%rip), %xmm0     # 0x11620
ja 0xdcc2
movss 0x1e0(%rbx), %xmm0
ucomiss 0x392a(%rip), %xmm0     # 0x11624
ja 0xdcc2
movq 0x38(%rbx), %rcx
movss 0x3920(%rip), %xmm0     # 0x11628
ucomiss (%rcx), %xmm0
ja 0xdcc2
movss 0x190(%rbx), %xmm0
ucomiss 0x39ac(%rip), %xmm0     # 0x116c8
ja 0xdcc2
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rbx)
movq %rcx, 0xc8(%rbx)
andq $0x0, 0xc0(%rbx)
pushq $0xe
popq %rdx
movss 0x398a(%rip), %xmm1     # 0x116cc
xorps %xmm0, %xmm0
movq %rbx, %rdi
xorl %esi, %esi
callq 0xf5f8
testb %al, %al
je 0xdcc2
cmpl $0xe, 0xc0(%rbx)
jne 0xdcc2
leaq 0xa0(%rbx), %rax
movzbl (%rax), %eax
movl %eax, %ecx
andl $-0x40, %ecx
cmpl $0x40, %ecx
jne 0xdcc2
andl $0x3f, %eax
movq 0x160(%rbx), %rcx
movl %eax, (%rcx)
movzbl 0xa1(%rbx), %eax
shrl $0x2, %eax
movq 0x170(%rbx), %rcx
movl %eax, (%rcx)
movq 0x148(%rbx), %rax
movabsq $0x6d61746f4e206441, %rcx # imm = 0x6D61746F4E206441
movq %rcx, (%rax)
movb $0x0, 0x8(%rax)
jmp 0xdcc2
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::getFreq(int, int)
unsigned int Signal::getFreq(int start, int end)
{
	int s=0;
	double t=0;
	double freq;

	if (pCounts == NULL) return 0;

	for (int n=start; n<end; n++)
	{	
		{
			s += pCounts[2*n];
			t += pDuration[2*n];
		}
	}
	freq = ((s!=end-start)&&(t > 0)) ? s*1000000./t : 0;

	return (unsigned int)freq;
}

// Assembly:
movq 0x90(%rdi), %rax
testq %rax, %rax
je 0xde1f
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rdi
movslq %esi, %r8
movslq %edx, %r9
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
cmpq %r9, %r8
jge 0xddf4
movswl (%rax,%r8,4), %r10d
addl %r10d, %ecx
cvtss2sd (%rdi,%r8,8), %xmm1
addsd %xmm1, %xmm0
incq %r8
jmp 0xddd8
subl %esi, %edx
xorl %esi, %esi
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
cvtsi2sd %ecx, %xmm1
mulsd 0x36ac(%rip), %xmm1     # 0x114b8
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
cmovbel %esi, %eax
cmpl %edx, %ecx
cmovel %esi, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::getMsb(int, int)
unsigned int Signal::getMsb(int first, int bits)
{
	int byte = first >> 3;
	int bt = 8-(first & 7);
	unsigned int rslt = cBits[byte] & ((1<<bt)-1);
	if ( bt >= bits )
	{
		return rslt >> (bt - bits);
	}
	for (bits-=bt; bits>=8; bits-=8)
		rslt = (rslt<<8) + cBits[++byte];
	return (rslt<<bits) + ((unsigned int)(cBits[1+byte]) >> (8-bits));
}

// Assembly:
movl %esi, %eax
sarl $0x3, %eax
andl $0x7, %esi
movl $0x8, %ecx
subl %esi, %ecx
movslq %eax, %r8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
movzbl 0xa0(%rdi,%r8), %r9d
notl %eax
andl %r9d, %eax
subl %edx, %ecx
jge 0xebd2
pushq %rbp
movq %rsp, %rbp
addq %r8, %rdi
addq $0xa1, %rdi
addl %esi, %edx
addl $-0x10, %edx
leal 0x8(%rdx), %ecx
cmpl $0x8, %ecx
jl 0xebc0
shll $0x8, %eax
movzbl (%rdi), %ecx
orl %ecx, %eax
incq %rdi
addl $-0x8, %edx
jmp 0xeba8
leal 0x8(%rdx), %ecx
shll %cl, %eax
movzbl (%rdi), %esi
negb %dl
movl %edx, %ecx
shrl %cl, %esi
addl %esi, %eax
popq %rbp
retq
shrl %cl, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::getLsb(int, int)
unsigned int Signal::getLsb(int first, int bits)
{
	int byte = first >> 3;
	int bt = first & 7;
	unsigned int rslt = cBits[byte] >> bt;
	bt = 8-bt;
	if ( bt >= bits )
	{
		return rslt & ((1<<bits)-1);
	}
	while ( bt+8 < bits )
	{
		rslt += cBits[++byte] << bt;
		bt += 8;
	}
	return rslt + ( ( cBits[1+byte] & ((1<<(bits-bt))-1) ) << bt );
}

// Assembly:
movl %esi, %ecx
movl %esi, %eax
sarl $0x3, %eax
andl $0x7, %ecx
movslq %eax, %r8
movzbl 0xa0(%rdi,%r8), %eax
shrl %cl, %eax
movl $0x8, %esi
subl %ecx, %esi
cmpl %edx, %esi
jge 0xec44
pushq %rbp
movq %rsp, %rbp
addq %r8, %rdi
addq $0xa1, %rdi
leal 0x8(%rsi), %r8d
cmpl %edx, %r8d
jge 0xec24
movzbl (%rdi), %r9d
movl %esi, %ecx
shll %cl, %r9d
addl %r9d, %eax
incq %rdi
movl %r8d, %esi
jmp 0xec07
subl %esi, %edx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl %edx, %ecx
shll %cl, %r8d
movzbl (%rdi), %ecx
notl %r8d
andl %ecx, %r8d
movl %esi, %ecx
shll %cl, %r8d
addl %r8d, %eax
popq %rbp
retq
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl %edx, %ecx
shll %cl, %esi
notl %esi
andl %esi, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::decodeX(int)
void Signal::decodeX( int nCount )
{
	_ASSERT(nBit+nCount <= sizeof(cBits)*8);
	while (--nCount >= 0)
	{
		float nDelta = nMaxShort - *pBit;
		if ( nDelta < 0 )
		{
			cBits[nBit>>3] |= 1 << (nBit & 7);
		}
		pBit += 2;
		nBit++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0xc0(%rdi), %eax
leal (%rax,%rsi), %ecx
cmpl $0x80, %ecx
ja 0xed4e
pushq $0x1
popq %rdx
testl %esi, %esi
jle 0xed4c
movq 0xc8(%rdi), %rcx
movss (%rcx), %xmm0
ucomiss 0xe8(%rdi), %xmm0
jbe 0xed35
movl %eax, %ecx
andb $0x7, %cl
movl %edx, %r8d
shll %cl, %r8d
sarl $0x3, %eax
cltq
orb %r8b, 0xa0(%rdi,%rax)
movq 0xc8(%rdi), %rcx
movl 0xc0(%rdi), %eax
addq $0x8, %rcx
movq %rcx, 0xc8(%rdi)
incl %eax
movl %eax, 0xc0(%rdi)
decl %esi
jmp 0xecf8
popq %rbp
retq
leaq 0x2b8f(%rip), %rdi      # 0x118e4
leaq 0x2ba7(%rip), %rsi      # 0x11903
leaq 0x2bad(%rip), %rcx      # 0x11910
movl $0x2ec, %edx            # imm = 0x2EC
callq 0x20e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::decodeX2(int)
void Signal::decodeX2( int nCount )
{
	_ASSERT(nBit+nCount <= sizeof(cBits)*8);
	while (--nCount >= 0)
	{
		if ( pBit[0]+pBit[1] > nMaxShort )
		{
			cBits[nBit>>3] |= 1 << (nBit & 7);
		}
		pBit += 2;
		nBit++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0xc0(%rdi), %eax
leal (%rax,%rsi), %ecx
cmpl $0x80, %ecx
ja 0xede1
pushq $0x1
popq %rdx
testl %esi, %esi
jle 0xeddf
movq 0xc8(%rdi), %rcx
movss (%rcx), %xmm0
addss 0x4(%rcx), %xmm0
ucomiss 0xe8(%rdi), %xmm0
jbe 0xedc8
movl %eax, %ecx
andb $0x7, %cl
movl %edx, %r8d
shll %cl, %r8d
sarl $0x3, %eax
cltq
orb %r8b, 0xa0(%rdi,%rax)
movq 0xc8(%rdi), %rcx
movl 0xc0(%rdi), %eax
addq $0x8, %rcx
movq %rcx, 0xc8(%rdi)
incl %eax
movl %eax, 0xc0(%rdi)
decl %esi
jmp 0xed86
popq %rbp
retq
leaq 0x2afc(%rip), %rdi      # 0x118e4
leaq 0x2b14(%rip), %rsi      # 0x11903
leaq 0x2b34(%rip), %rcx      # 0x1192a
movl $0x2fb, %edx            # imm = 0x2FB
callq 0x20e0
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::checkDecodeX(int, int, float, float, float)
int Signal::checkDecodeX( int start, int count, float minShort, float maxLong, float maxFront )
{
	_ASSERT(nBit+count <= sizeof(cBits)*8);
	float *pB = pFrame+start;
	if (   pB >= pMainLimit
		|| pB+2*count > pFullLimit )
	{
		return 0;
	}
	while (--count >= 0)
	{
		double burst = pB[0]+pB[1];
		if (   burst < minShort
			|| burst > maxLong
			|| pB[0] > maxFront )
		{
			return 0;
		}
		if ( burst > nMaxShort )
		{
			cBits[nBit>>3] |= 1 << (nBit & 7);
		}
		pB += 2;
		nBit++;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0xc0(%rdi), %r8d
leal (%r8,%rdx), %eax
cmpl $0x81, %eax
jae 0xee9f
movslq %esi, %rsi
shlq $0x2, %rsi
addq 0x38(%rdi), %rsi
xorl %eax, %eax
cmpq 0x10(%rdi), %rsi
jae 0xee9d
leal (%rdx,%rdx), %ecx
movslq %ecx, %rcx
leaq (%rsi,%rcx,4), %rcx
cmpq 0x18(%rdi), %rcx
ja 0xee9d
pushq $0x1
popq %r9
testl %edx, %edx
jle 0xee9a
movss (%rsi), %xmm3
ucomiss %xmm2, %xmm3
ja 0xee9d
addss 0x4(%rsi), %xmm3
ucomiss %xmm3, %xmm0
ja 0xee9d
ucomiss %xmm1, %xmm3
ja 0xee9d
ucomiss 0xe8(%rdi), %xmm3
jbe 0xee88
movl %r8d, %ecx
andb $0x7, %cl
movl %r9d, %r10d
shll %cl, %r10d
sarl $0x3, %r8d
movslq %r8d, %rcx
orb %r10b, 0xa0(%rdi,%rcx)
movl 0xc0(%rdi), %r8d
addq $0x8, %rsi
incl %r8d
movl %r8d, 0xc0(%rdi)
decl %edx
jmp 0xee41
movl %r9d, %eax
popq %rbp
retq
leaq 0x2a9f(%rip), %rdi      # 0x11945
leaq 0x2a56(%rip), %rsi      # 0x11903
leaq 0x2aaf(%rip), %rcx      # 0x11963
movl $0x309, %edx            # imm = 0x309
callq 0x20e0
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::decodeRaw(int)
int Signal::decodeRaw( int bitsRequested )
{
	_ASSERT(nBit+bitsRequested < sizeof(cBits)*8);
	while ( bitsRequested > 0 )
	{
		if (pBit>pFrameEnd)
		{
			return 0;
		}
		double x =   *pBit * m_rawUnit
				   + ( ((pBit-pFrame)&1) ? m_rawGapAdjust : m_rawPulseAdjust );
		double y = floor(x);
		// GD Added test pBit<pFrameEnd as this return should not occur on a lead-out
		if ( pBit < pFrameEnd && x-y > m_rawErrorLimit || y==0. )
		{
			return 0;
		}
		int bits = (int)y;
		if ( (bitsRequested -= bits) < 0 )
		{
			bits += bitsRequested;
		}
		if ( (pBit-pFrame) & 1 )
		{
			nBit += bits;
		}
		else
		{
			do
			{
				cBits[nBit>>3] |= 1 << (nBit & 7);
				nBit++;
			} while (--bits);
		}
		pBit++;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl 0xc0(%rdi), %r12d
leal (%r12,%rsi), %eax
cmpl $0x7f, %eax
ja 0xeffe
movq %rdi, %rbx
pushq $0x1
popq %rdi
testl %esi, %esi
jle 0xefe9
movq 0x40(%rbx), %r13
movq 0xc8(%rbx), %r15
movl $0x0, -0x2c(%rbp)
cmpq %r13, %r15
ja 0xefec
movq %rsi, -0x40(%rbp)
movss (%r15), %xmm0
movl 0x38(%rbx), %eax
movl %r15d, %r14d
subl %eax, %r14d
mulss 0xfc(%rbx), %xmm0
andl $0x4, %r14d
addss 0x100(%rbx,%r14), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
callq 0x2210
cmpq %r13, %r15
jae 0xef70
ucomisd 0x2571(%rip), %xmm0     # 0x114c0
jne 0xef57
jnp 0xefec
movsd -0x38(%rbp), %xmm2
subsd %xmm0, %xmm2
cvtss2sd 0x108(%rbx), %xmm1
ucomisd %xmm1, %xmm2
jbe 0xef7c
jmp 0xefec
ucomisd 0x2548(%rip), %xmm0     # 0x114c0
jne 0xef7c
jnp 0xefec
cvttsd2si %xmm0, %edx
movq -0x40(%rbp), %rcx
movl %ecx, %eax
subl %edx, %eax
cmovsl %ecx, %edx
testq %r14, %r14
jne 0xefca
pushq $0x1
popq %rdi
movl %r12d, %ecx
andb $0x7, %cl
movl %edi, %esi
shll %cl, %esi
sarl $0x3, %r12d
movslq %r12d, %rcx
orb %sil, 0xa0(%rbx,%rcx)
movl 0xc0(%rbx), %r12d
incl %r12d
movl %r12d, 0xc0(%rbx)
decl %edx
jne 0xef93
movq 0xc8(%rbx), %r15
jmp 0xefd7
addl %edx, %r12d
movl %r12d, 0xc0(%rbx)
pushq $0x1
popq %rdi
addq $0x4, %r15
movq %r15, 0xc8(%rbx)
movl %eax, %esi
jmp 0xeee9
movl %edi, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2996(%rip), %rdi      # 0x1199b
leaq 0x28f7(%rip), %rsi      # 0x11903
leaq 0x29ad(%rip), %rcx      # 0x119c0
movl $0x325, %edx            # imm = 0x325
callq 0x20e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::phaseBit()
int Signal::phaseBit()
{
	// On entry pBit points to a mid bit boundary (prior bit)
	// Find the next mid bit boundary (current bit) and emit the decode of that bit.
	// If nMinShort <= *pBit <= nMaxShort
	//    then *pBit represents just the second half of the prior bit
	//         and ( nMinShort2 <= *++pBit <= nMaxShort2 ) represents the first half
	//             of the current bit.
	// If nMinLong <= *pBit <= nMaxLong
	//    then *pBit represents both the second half of the prior bit and the first
	//         half of the current bit.
	// In other cases return failure.

    float dur = *pBit;
	if (dur < nMinShort || dur > nMaxLong || nBit >= sizeof(cBits)*8)
    {
		return 0;
    }
	if (dur >= nMinLong)
	{
		nState = 1-nState;
	}
	else if (dur > nMaxShort )
	{
		return 0;
	}
    else
	{
        float dur2 = *++pBit;
		if (dur2 < nMinShort2 )
		{
            if (dur2 <= minGlitch)
            {
                if ( ++pBit < pFrameEnd )
                {
                    dur += dur2 + *pBit;
                    if ( dur >= nMinLong && dur <= nMaxLong )
                    {
                		nState = 1-nState;
                        goto ok;
                    }
                }
            }
			return 0;
		}
		if ( pBit == pFrameEnd )
			return 1;	// Last bit was Lo/Hi and the frame ended on a bit boundary, so caller
						// went too far.  So return success, but don't emit a decoded bit.
						// (When last bit is Hi/Lo the frame ends on a mid bit boundary,
						//  so the caller would know when to quit and we wouldn't get here).
		if ( dur2 > nMaxShort2 )
			return 0;
	}
ok:
	++pBit;
	cBits[nBit>>3] |= nState << (nBit&7);
	nBit++;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xc8(%rdi), %rcx
movss (%rcx), %xmm0
movss 0xe4(%rdi), %xmm1
xorl %eax, %eax
ucomiss %xmm0, %xmm1
ja 0xf5dc
movss 0xf0(%rdi), %xmm1
ucomiss %xmm1, %xmm0
ja 0xf5dc
movl 0xc0(%rdi), %edx
cmpq $0x7f, %rdx
ja 0xf5dc
movss 0xec(%rdi), %xmm2
ucomiss %xmm2, %xmm0
movl $0x1, %esi
jae 0xf5aa
ucomiss 0xe8(%rdi), %xmm0
ja 0xf5dc
leaq 0x4(%rcx), %r8
movq %r8, 0xc8(%rdi)
movss 0x4(%rcx), %xmm3
movss 0xf4(%rdi), %xmm4
ucomiss %xmm3, %xmm4
jbe 0xf5de
movss 0xe0(%rdi), %xmm4
ucomiss %xmm3, %xmm4
jb 0xf5dc
addq $0x8, %rcx
movq %rcx, 0xc8(%rdi)
cmpq 0x40(%rdi), %rcx
jae 0xf5dc
addss (%rcx), %xmm3
addss %xmm3, %xmm0
ucomiss %xmm2, %xmm0
jb 0xf5dc
ucomiss %xmm0, %xmm1
jb 0xf5dc
movl $0x1, %eax
jmp 0xf5ac
movl %esi, %eax
subl 0xc4(%rdi), %eax
movl %eax, 0xc4(%rdi)
addq $0x4, %rcx
movq %rcx, 0xc8(%rdi)
movl %edx, %ecx
andb $0x7, %cl
shll %cl, %eax
shrl $0x3, %edx
orb %al, 0xa0(%rdi,%rdx)
incl 0xc0(%rdi)
movl %esi, %eax
popq %rbp
retq
cmpq 0x40(%rdi), %r8
je 0xf5da
ucomiss 0xf8(%rdi), %xmm3
ja 0xf5dc
movl 0xc4(%rdi), %eax
movq %r8, %rcx
jmp 0xf5b8
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::processManchesterAtoms(int, int, float, float, float*)
bool Signal::processManchesterAtoms(int burstStart, int numBits, float used, float bitDur, float* pFr)   
{
	int i;
	float delta = 0.1 * bitDur;
	float edge;
	float first[2];
	first[0] = 0.5 * bitDur; first[1] = bitDur; 
	int burstIdx = burstStart;
	int burstMax = pFrameEnd - pFr;
	int bitIdx = 0;
	int (*_abs)( int ) = & std::abs;
	do {	
		for (i=0; i<1; i++) { 
			edge = first[i]; 
			if (_abs(pFr[burstIdx]- used - edge) < delta) { 
				cBits[bitIdx >> 3] |= (burstIdx&1) << (7 - bitIdx&7);
				burstIdx++;
				if (_abs(pFr[burstIdx] - (bitDur - edge)) < delta) {
					used = 0.0;
					burstIdx++;
				}
				else
					used = bitDur - edge;
				break;
			}
			else  
				 return false;
		}
		if (i > 1 || burstIdx > burstMax) 
			return false;  //arrive here if no match found
		bitIdx++;
		if (bitIdx >= sizeof(cBits)*8) 
			return false;  //not enough room in cBits
	} while (bitIdx < numBits);
	pBit = pFr + burstIdx;
	nBit = bitIdx;
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rcx, %r8
cvtss2sd %xmm1, %xmm2
mulsd 0x1ddd(%rip), %xmm2     # 0x113e8
cvtsd2ss %xmm2, %xmm2
movss 0x1ef9(%rip), %xmm3     # 0x11510
mulss %xmm1, %xmm3
movq 0x40(%rdi), %r9
subq %rcx, %r9
shrq $0x2, %r9
subss %xmm3, %xmm1
xorl %r10d, %r10d
movl $0x7, %r11d
movslq %esi, %rax
movss (%r8,%rax,4), %xmm4
subss %xmm0, %xmm4
subss %xmm3, %xmm4
cvttss2si %xmm4, %ecx
movl %ecx, %esi
negl %esi
cmovsl %ecx, %esi
cvtsi2ss %esi, %xmm0
ucomiss %xmm0, %xmm2
jbe 0xf6d7
movl %eax, %esi
andl $0x1, %esi
movl %r11d, %ecx
andb $0x7, %cl
shll %cl, %esi
movl %r10d, %ecx
shrl $0x3, %ecx
orb %sil, 0xa0(%rdi,%rcx)
movss 0x4(%r8,%rax,4), %xmm0
subss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
movl %ecx, %esi
negl %esi
cmovsl %ecx, %esi
cvtsi2ss %esi, %xmm0
xorl %ecx, %ecx
ucomiss %xmm0, %xmm2
seta %cl
leal (%rcx,%rax), %esi
incl %esi
xorl %eax, %eax
cmpl %r9d, %esi
jg 0xf6d9
cmpl $0x7f, %r10d
je 0xf6d9
cmpltss %xmm2, %xmm0
andnps %xmm1, %xmm0
incl %r10d
decl %r11d
cmpl %edx, %r10d
jl 0xf633
movslq %esi, %rax
leaq (%r8,%rax,4), %rax
movq %rax, 0xc8(%rdi)
movl %r10d, 0xc0(%rdi)
movb $0x1, %al
jmp 0xf6d9
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::processHumaxAtoms(int, float*, int)
bool Signal::processHumaxAtoms(int bitStart, float* pFr, int maxBursts)   
{
	int atomIdx,i;
	float one = 105.0;
	float four = 4* one;
	float delta = one * 0.5;
	float edge, used = 0.0;
	float first[4];
	first[0] = 2*one; first[1] = 3*one; first[2] = one; first[3] = 2*one;
	int burstIdx = 0;
	int bitIdx=bitStart;
	int (*_abs)( int ) = & std::abs;
	do {	
		atomIdx=2 * (1 - burstIdx&1); //odd burstIdx is "off" signal, which can only be the beginning of bits value 0 or 1
		for (i=0; i<2; i++) { //<-2,2|-3,1|1,-3|2,-2>
			edge = first[atomIdx + i ]; 
			if (_abs(pFr[burstIdx]- used - edge) < delta) {
				cBits[bitIdx >> 2] |= (atomIdx + i) << (6- 2*(bitIdx&3));
				burstIdx++;
				if (_abs(pFr[burstIdx] - (four - edge)) < delta) {
					used = 0.0;
					burstIdx++;
				}
				else
					used = four - edge;
				break;
			}
		}
		if (i > 1) 
			return false;  //arrive here if no match found
		bitIdx++;
		if (bitIdx >= sizeof(cBits)*4) 
			return false;  //not enough room in cBits
		if (bitIdx % 12 == 0) {
			used = 0.0;
			burstIdx++;
		}
	} while (burstIdx < maxBursts );
	if (bitIdx % 12 != 0)
		return false;  // wrong frame length
	int cIdx = (bitIdx - 1) >> 2;
	if ((cBits[cIdx] & 2) == (cBits[cIdx] & 1)) 
		return false;  // failed check bit
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movl %ecx, %r8d
movaps 0x19d1(%rip), %xmm0     # 0x110c0
movaps %xmm0, -0x30(%rbp)
xorl %ecx, %ecx
xorps %xmm1, %xmm1
movl $0x2, %r9d
movss 0x1fce(%rip), %xmm0     # 0x116d4
movb $0xc, %r10b
movl %r9d, %r11d
subl %ecx, %r11d
subl %ecx, %r11d
andl $0x2, %r11d
movslq %ecx, %rax
movss (%rdx,%rax,4), %xmm2
subss %xmm1, %xmm2
leaq -0x30(,%r11,4), %rbx
addq %rbp, %rbx
xorl %ecx, %ecx
cmpq $0x2, %rcx
je 0xf7ed
movss (%rbx,%rcx,4), %xmm1
movaps %xmm2, %xmm3
subss %xmm1, %xmm3
cvttss2si %xmm3, %r14d
movl %r14d, %r15d
negl %r15d
cmovsl %r14d, %r15d
incq %rcx
cmpl $0x34, %r15d
ja 0xf72f
addl %ecx, %r11d
decl %r11d
leal (%rsi,%rsi), %ecx
notb %cl
andb $0x6, %cl
shll %cl, %r11d
movl %esi, %ecx
sarl $0x2, %ecx
movslq %ecx, %rcx
orb 0xa0(%rdi,%rcx), %r11b
movb %r11b, 0xa0(%rdi,%rcx)
incl %esi
cmpl $0x3f, %esi
ja 0xf7ed
leal 0x1(%rax), %ebx
movss 0x4(%rdx,%rax,4), %xmm3
movaps %xmm0, %xmm2
subss %xmm1, %xmm2
subss %xmm2, %xmm3
cvttss2si %xmm3, %ecx
movl %ecx, %r14d
negl %r14d
cmovsl %ecx, %r14d
leal 0x2(%rax), %ecx
movzbl %sil, %eax
divb %r10b
movzbl %ah, %eax
xorps %xmm1, %xmm1
xorps %xmm3, %xmm3
cmpl $0x35, %r14d
cmovael %ebx, %ecx
jb 0xf7ce
movaps %xmm2, %xmm3
xorl %ebx, %ebx
testb %al, %al
sete %r14b
je 0xf7db
movaps %xmm3, %xmm1
movb %r14b, %bl
addl %ebx, %ecx
cmpl %r8d, %ecx
jl 0xf709
testb %al, %al
je 0xf7f6
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testb $0x3, %r11b
setne %al
jmp 0xf7ef
nop
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::moreBlaupunkt(int)
int Signal::moreBlaupunkt(int bits)
{
	if (   pBit+3 >= pMainLimit
		|| pBit[2] <= sortBurst.max2
		|| pBit[2] > sortBurst.max1
		|| pBit[1] > nMaxShort
		|| pBit[3] > nMaxShort )
	{
		return -1;
	}
	float* save_pBit = pBit;
	cleanup();
	pBit = save_pBit + 4;      // Middle of first bit
	nState = 1;
	for (;;)
	{
		if ( pBit >= pFullLimit )
			break;
		if ( ! phaseBit() )
			break;
		if ( nBit == bits )
		{
			pBit = ((pBit-pDuration)|1)+pDuration;
			if (pBit < pFullLimit && pBit[0] < sortBurst.max1)
				break;
			return getLsb(0,bits);
		}
	}
	pBit = save_pBit;
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0xc8(%rdi), %r15
leaq 0xc(%r15), %rax
cmpq 0x10(%rdi), %rax
jae 0xf8ee
movq %rdi, %r14
movss 0x8(%r15), %xmm0
movss 0x1e0(%rdi), %xmm1
ucomiss %xmm0, %xmm1
jae 0xf8ee
ucomiss 0x1dc(%r14), %xmm0
ja 0xf8ee
movss 0x4(%r15), %xmm1
movss 0xe8(%r14), %xmm0
ucomiss %xmm0, %xmm1
ja 0xf8ee
movss (%rax), %xmm1
ucomiss %xmm0, %xmm1
ja 0xf8ee
movl %esi, %ebx
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%r14)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0xc0(%r14)
leaq 0x10(%r15), %rax
movq %rax, 0xc8(%r14)
movq 0xc8(%r14), %rax
cmpq 0x18(%r14), %rax
jae 0xf8e7
movq %r14, %rdi
callq 0xf4f4
testl %eax, %eax
je 0xf8e7
cmpl %ebx, 0xc0(%r14)
jne 0xf895
movq 0x8(%r14), %rcx
movq 0xc8(%r14), %rax
subq %rcx, %rax
orq $0x4, %rax
addq %rcx, %rax
movq %rax, 0xc8(%r14)
cmpq 0x18(%r14), %rax
jae 0xf8fc
movss 0x1dc(%r14), %xmm0
ucomiss (%rax), %xmm0
jbe 0xf8fc
movq %r15, 0xc8(%r14)
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
xorl %esi, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xebd6
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/./DecodeIR.h
// Function: setOn::insert(float*)
void insert( burst b )
    {
        double x = b[0];
        if ( x < min1 ) min1 = x;
        if ( x > max2 )
        {
            if ( x > max1 )
            {
                max2 = max1;
                max1 = x;
                return;
            }
            max2 = x;
        }
    }

// Assembly:
movss (%rsi), %xmm0
movss (%rdi), %xmm1
ucomiss %xmm0, %xmm1
jbe 0xfff7
movss %xmm0, (%rdi)
ucomiss 0x8(%rdi), %xmm0
jbe 0x1001f
leaq 0x8(%rdi), %rax
movss 0x4(%rdi), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x10016
addq $0x4, %rdi
movss %xmm1, (%rax)
movq %rdi, %rax
pushq %rbp
movq %rsp, %rbp
movss %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/./DecodeIR.h
// Function: setBurst::insert1(float*)
void insert1( burst b )
    {
        double x = b[0]+b[1];
        super::insert( x );
        if ( x < min3 )
        {
            if ( x >= min2 )
            {
                min3 = x;
            }
            else
            {
                min3 = min2;
                if ( x >= min1 )
                {
                    min2 = x;
                }
                else
                {
                    min2 = min1;
                    min1 = x;
                }
            }
        }
        if ( x > max3 )
        {
            if ( x <= max2 )
            {
                max3 = x;
            }
            else
            {
                max3 = max2;
                if ( x <= max1 )
                {
                    max2 = x;
                }
                else
                {
                    max2 = max1;
                    max1 = x;
                }
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movss (%rsi), %xmm0
addss 0x4(%rsi), %xmm0
movss %xmm0, -0xc(%rbp)
leaq -0x10(%rbp), %rsi
movss %xmm0, (%rsi)
callq 0x103c4
movss -0xc(%rbp), %xmm1
movss 0x30(%rbx), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x100a6
movss 0x34(%rbx), %xmm0
ucomiss %xmm0, %xmm1
jae 0x1009a
movss %xmm0, 0x30(%rbx)
movss 0x38(%rbx), %xmm0
ucomiss %xmm0, %xmm1
jae 0x100a1
movss %xmm0, 0x34(%rbx)
movss %xmm1, 0x38(%rbx)
jmp 0x100a6
movss %xmm1, 0x30(%rbx)
jmp 0x100a6
movss %xmm1, 0x34(%rbx)
ucomiss 0x4c(%rbx), %xmm1
jbe 0x100dd
movss 0x48(%rbx), %xmm0
ucomiss %xmm1, %xmm0
jae 0x100d1
movss %xmm0, 0x4c(%rbx)
movss 0x44(%rbx), %xmm0
ucomiss %xmm1, %xmm0
jae 0x100d8
movss %xmm0, 0x48(%rbx)
movss %xmm1, 0x44(%rbx)
jmp 0x100dd
movss %xmm1, 0x4c(%rbx)
jmp 0x100dd
movss %xmm1, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/./DecodeIR.h
// Function: setBurst::findMid()
void findMid()
    {
        iterator it = begin();
        iterator limit = end();
        float x = (*it);
        mid1 = x;
        mid2 = x;
        float m = 0;
        while ( ++it != limit )
        {
            float y = (*it);
            float z = y-x;
            if ( z > m )
            {
                m = z;
                mid1 = x;
                mid2 = y;
            }
            x = y;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rax
leaq 0x8(%rdi), %r14
movss 0x20(%rax), %xmm0
movss %xmm0, 0x3c(%rdi)
xorps %xmm1, %xmm1
movss %xmm1, -0x14(%rbp)
movss %xmm0, 0x40(%rbx)
movss %xmm0, -0x18(%rbp)
movq %rax, %rdi
callq 0x2190
cmpq %r14, %rax
je 0x10141
movss 0x20(%rax), %xmm0
movaps %xmm0, %xmm1
movss -0x18(%rbp), %xmm2
subss %xmm2, %xmm1
ucomiss -0x14(%rbp), %xmm1
jbe 0x10111
movss %xmm2, 0x3c(%rbx)
jmp 0x10107
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq