LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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:
movl 0x48(%rdi), %eax
cmpq $0x12, %rax
jne 0xea2f
pushq %rbp
movq %rsp, %rbp
movss 0x9c(%rdi), %xmm0
movss 0x140(%rdi), %xmm1
mulss 0x3d7d(%rip), %xmm0     # 0x12660
ucomiss %xmm0, %xmm1
jb 0xea2e
xorps %xmm0, %xmm0
cvtss2sd 0x1d0(%rdi), %xmm0
movsd 0x3b71(%rip), %xmm1     # 0x12470
mulsd %xmm0, %xmm1
cvtss2sd 0x1dc(%rdi), %xmm2
ucomisd %xmm1, %xmm2
ja 0xea2e
movss 0x18c(%rdi), %xmm1
movss 0x1e4(%rdi), %xmm2
movss 0x3caf(%rip), %xmm3     # 0x125dc
mulss %xmm1, %xmm3
ucomiss %xmm3, %xmm2
ja 0xea2e
mulss 0x3bc2(%rip), %xmm1     # 0x12504
ucomiss %xmm2, %xmm1
ja 0xea2e
mulsd 0x38ad(%rip), %xmm0     # 0x12200
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xe8(%rdi)
leaq 0xa0(%rdi), %rdx
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rdi)
movq 0x38(%rdi), %rsi
movq %rsi, 0xc8(%rdi)
movq $0x0, 0xc0(%rdi)
leal -0x1(%rax), %r8d
movb $0x1, %cl
xorl %r9d, %r9d
movss (%rsi,%r9,8), %xmm1
movss 0xe8(%rdi), %xmm0
ucomiss %xmm0, %xmm1
jbe 0xe9c9
movss 0x4(%rsi,%r9,8), %xmm1
ucomiss %xmm0, %xmm1
jbe 0xe9b3
cmpq %r8, %r9
jb 0xe9d6
movl %r9d, %ecx
andb $0x7, %cl
movb $0x1, %r10b
shlb %cl, %r10b
movl %r9d, %ecx
shrl $0x3, %ecx
orb %r10b, (%rdx,%rcx)
incq %r9
cmpq %rax, %r9
setb %cl
jne 0xe98f
jmp 0xe9db
testb $0x1, %cl
jne 0xea2e
movq 0x148(%rdi), %rax
movabsq $0x6e6f7473797242, %rcx # imm = 0x6E6F7473797242
movq %rcx, (%rax)
movzbl 0xa0(%rdi), %eax
movzbl 0xa1(%rdi), %ecx
andl $0x3, %ecx
shll $0x8, %ecx
orl %eax, %ecx
movq 0x160(%rdi), %rax
movl %ecx, (%rax)
movb 0xa1(%rdi), %al
movb 0xa2(%rdi), %cl
shrb $0x2, %al
shlb $0x6, %cl
orb %al, %cl
movzbl %cl, %eax
movq 0x170(%rdi), %rcx
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xed20
movq %rdi, %rbx
movss 0x3933(%rip), %xmm0     # 0x1261c
ucomiss 0x98(%rdi), %xmm0
ja 0xed20
xorps %xmm0, %xmm0
cvtss2sd 0x180(%rbx), %xmm0
movsd 0x3733(%rip), %xmm1     # 0x12438
ucomisd %xmm0, %xmm1
ja 0xed20
xorps %xmm0, %xmm0
cvtss2sd 0x184(%rbx), %xmm0
ucomisd 0x3722(%rip), %xmm0     # 0x12440
jbe 0xed27
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movss 0x140(%rbx), %xmm0
ucomiss 0x38ea(%rip), %xmm0     # 0x12620
jb 0xed20
movss 0x9c(%rbx), %xmm0
ucomiss 0x38dd(%rip), %xmm0     # 0x12624
ja 0xed20
movss 0x1e0(%rbx), %xmm0
ucomiss 0x38d0(%rip), %xmm0     # 0x12628
ja 0xed20
movq 0x38(%rbx), %rcx
movss 0x38c6(%rip), %xmm0     # 0x1262c
ucomiss (%rcx), %xmm0
ja 0xed20
movss 0x190(%rbx), %xmm0
ucomiss 0x394e(%rip), %xmm0     # 0x126c8
ja 0xed20
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rbx)
movq %rcx, 0xc8(%rbx)
movq $0x0, 0xc0(%rbx)
movss 0x392c(%rip), %xmm1     # 0x126cc
xorps %xmm0, %xmm0
movq %rbx, %rdi
xorl %esi, %esi
movl $0xe, %edx
callq 0x1096e
testb %al, %al
je 0xed20
cmpl $0xe, 0xc0(%rbx)
jne 0xed20
leaq 0xa0(%rbx), %rax
movzbl (%rax), %eax
movl %eax, %ecx
andl $-0x40, %ecx
cmpl $0x40, %ecx
jne 0xed20
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 0xed20
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0xee95
pushq %rbp
movq %rsp, %rbp
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
movl %edx, %r8d
movl $0x0, %r9d
xorpd %xmm1, %xmm1
subl %esi, %r8d
jle 0xee6d
movq 0x8(%rdi), %rdi
movslq %esi, %rsi
movslq %edx, %rdx
xorl %r9d, %r9d
movswl (%rax,%rsi,4), %r10d
xorps %xmm2, %xmm2
cvtss2sd (%rdi,%rsi,8), %xmm2
addl %r10d, %r9d
addsd %xmm2, %xmm1
incq %rsi
cmpq %rsi, %rdx
jne 0xee51
ucomisd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %r9d, %xmm0
mulsd 0x3637(%rip), %xmm0     # 0x124b8
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
cmovbel %ecx, %eax
cmpl %r8d, %r9d
cmovel %ecx, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
movq %rsp, %rbp
movl %esi, %r10d
sarl $0x3, %r10d
andl $0x7, %esi
movl $0x8, %eax
subl %esi, %eax
movslq %r10d, %r9
movzbl 0xa0(%rdi,%r9), %r11d
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r8d
notl %r8d
andl %r11d, %r8d
movl %eax, %ecx
subl %edx, %ecx
jge 0xfe75
movl %edx, %ecx
subl %eax, %ecx
cmpl $0x8, %ecx
jl 0xfe5a
addl %esi, %edx
movl %r8d, %eax
shll $0x8, %eax
movzbl 0xa1(%rdi,%r9), %r8d
incq %r9
orl %eax, %r8d
addl $-0x8, %edx
cmpl $0xf, %edx
jg 0xfe35
addl $-0x8, %edx
movl %edx, %ecx
movl %r9d, %r10d
shll %cl, %r8d
movslq %r10d, %rax
movzbl 0xa1(%rdi,%rax), %eax
movb $0x8, %dl
subb %cl, %dl
movl %edx, %ecx
shrl %cl, %eax
addl %r8d, %eax
jmp 0xfe7b
shrl %cl, %r8d
movl %r8d, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
movq %rsp, %rbp
movl %esi, %ecx
movl %esi, %r9d
sarl $0x3, %r9d
andl $0x7, %ecx
movslq %r9d, %rax
movzbl 0xa0(%rdi,%rax), %r8d
shrl %cl, %r8d
movl $0x8, %esi
subl %ecx, %esi
cmpl %edx, %esi
jge 0xfef9
movl $0x10, %r10d
subl %ecx, %r10d
cmpl %edx, %r10d
jge 0xfed5
movl %esi, %ecx
movzbl 0xa1(%rdi,%rax), %esi
incq %rax
shll %cl, %esi
addl %esi, %r8d
leal 0x8(%rcx), %esi
addl $0x10, %ecx
cmpl %edx, %ecx
jl 0xfeb6
movl %eax, %r9d
movslq %r9d, %r9
subl %esi, %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %edx, %ecx
shll %cl, %eax
movzbl 0xa1(%rdi,%r9), %ecx
notl %eax
andl %ecx, %eax
movl %esi, %ecx
shll %cl, %eax
addl %r8d, %eax
jmp 0xff0a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %edx, %ecx
shll %cl, %eax
notl %eax
andl %eax, %r8d
movl %r8d, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
addl %esi, %eax
cmpl $0x80, %eax
ja 0x10008
testl %esi, %esi
jle 0x10006
incl %esi
movq 0xc8(%rdi), %rax
movss (%rax), %xmm0
ucomiss 0xe8(%rdi), %xmm0
jbe 0xfff1
movl 0xc0(%rdi), %eax
movl %eax, %ecx
andb $0x7, %cl
movl $0x1, %edx
shll %cl, %edx
sarl $0x3, %eax
cltq
orb %dl, 0xa0(%rdi,%rax)
addq $0x8, 0xc8(%rdi)
incl 0xc0(%rdi)
decl %esi
cmpl $0x1, %esi
jg 0xffbf
popq %rbp
retq
leaq 0x28de(%rip), %rdi      # 0x128ed
leaq 0x28f6(%rip), %rsi      # 0x1290c
leaq 0x28fc(%rip), %rcx      # 0x12919
movl $0x2ec, %edx            # imm = 0x2EC
callq 0x20d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
addl %esi, %eax
cmpl $0x80, %eax
ja 0x1008f
testl %esi, %esi
jle 0x1008d
incl %esi
movq 0xc8(%rdi), %rax
movss (%rax), %xmm0
addss 0x4(%rax), %xmm0
ucomiss 0xe8(%rdi), %xmm0
jbe 0x10078
movl 0xc0(%rdi), %eax
movl %eax, %ecx
andb $0x7, %cl
movl $0x1, %edx
shll %cl, %edx
sarl $0x3, %eax
cltq
orb %dl, 0xa0(%rdi,%rax)
addq $0x8, 0xc8(%rdi)
incl 0xc0(%rdi)
decl %esi
cmpl $0x1, %esi
jg 0x10041
popq %rbp
retq
leaq 0x2857(%rip), %rdi      # 0x128ed
leaq 0x286f(%rip), %rsi      # 0x1290c
leaq 0x288f(%rip), %rcx      # 0x12933
movl $0x2fb, %edx            # imm = 0x2FB
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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), %eax
addl %edx, %eax
cmpl $0x81, %eax
jae 0x1016c
movslq %esi, %rsi
shlq $0x2, %rsi
addq 0x38(%rdi), %rsi
xorl %eax, %eax
cmpq 0x10(%rdi), %rsi
jae 0x1016a
leal (%rdx,%rdx), %ecx
movslq %ecx, %rcx
leaq (%rsi,%rcx,4), %rcx
cmpq 0x18(%rdi), %rcx
ja 0x1016a
incl %edx
decl %edx
testl %edx, %edx
jle 0x10165
movss (%rsi), %xmm4
movss 0x4(%rsi), %xmm3
addss %xmm4, %xmm3
ucomiss %xmm3, %xmm0
setbe %cl
movaps %xmm2, %xmm5
cmpnltps %xmm4, %xmm5
movaps %xmm1, %xmm4
cmpnltps %xmm3, %xmm4
andps %xmm5, %xmm4
movd %xmm4, %r8d
andb %cl, %r8b
cmpb $0x1, %r8b
jne 0x1015e
ucomiss 0xe8(%rdi), %xmm3
jbe 0x10154
movl 0xc0(%rdi), %r9d
movl %r9d, %ecx
andb $0x7, %cl
movl $0x1, %r10d
shll %cl, %r10d
sarl $0x3, %r9d
movslq %r9d, %rcx
orb %r10b, 0xa0(%rdi,%rcx)
addq $0x8, %rsi
incl 0xc0(%rdi)
testb %r8b, %r8b
jne 0x100ee
jmp 0x1016a
movl $0x1, %eax
popq %rbp
retq
leaq 0x27db(%rip), %rdi      # 0x1294e
leaq 0x2792(%rip), %rsi      # 0x1290c
leaq 0x27eb(%rip), %rcx      # 0x1296c
movl $0x309, %edx            # imm = 0x309
callq 0x20d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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), %eax
addl %esi, %eax
cmpl $0x7f, %eax
ja 0x102c1
movl %esi, %r15d
movq %rdi, %rbx
testl %r15d, %r15d
jle 0x102a8
movq 0x40(%rbx), %r13
movq 0xc8(%rbx), %r12
movl $0x0, -0x2c(%rbp)
cmpq %r13, %r12
ja 0x102af
movss (%r12), %xmm0
movl 0x38(%rbx), %eax
movl %r12d, %r14d
subl %eax, %r14d
mulss 0xfc(%rbx), %xmm0
andl $0x4, %r14d
addss 0x100(%rbx,%r14), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
callq 0x21f0
cmpq %r13, %r12
jae 0x1023a
xorl %ecx, %ecx
ucomisd 0x22a6(%rip), %xmm0     # 0x124c0
jne 0x1021e
jnp 0x10248
movsd -0x38(%rbp), %xmm2
subsd %xmm0, %xmm2
xorps %xmm1, %xmm1
cvtss2sd 0x108(%rbx), %xmm1
ucomisd %xmm1, %xmm2
jbe 0x1024d
jmp 0x10248
ucomisd 0x227e(%rip), %xmm0     # 0x124c0
jne 0x1024d
jp 0x1024d
xorl %ecx, %ecx
movl %r15d, %eax
jmp 0x1029b
cvttsd2si %xmm0, %edx
movl %r15d, %eax
subl %edx, %eax
cmovsl %r15d, %edx
testq %r14, %r14
jne 0x1028b
movl 0xc0(%rbx), %esi
movl %esi, %ecx
andb $0x7, %cl
movl $0x1, %edi
shll %cl, %edi
sarl $0x3, %esi
movslq %esi, %rcx
orb %dil, 0xa0(%rbx,%rcx)
incl 0xc0(%rbx)
decl %edx
jne 0x1025f
jmp 0x10291
addl %edx, 0xc0(%rbx)
addq $0x4, 0xc8(%rbx)
movb $0x1, %cl
movl %eax, %r15d
testb %cl, %cl
jne 0x101b4
jmp 0x102af
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x26dc(%rip), %rdi      # 0x129a4
leaq 0x263d(%rip), %rsi      # 0x1290c
leaq 0x26f3(%rip), %rcx      # 0x129c9
movl $0x325, %edx            # imm = 0x325
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/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), %rsi
movss (%rsi), %xmm0
movss 0xe4(%rdi), %xmm1
xorl %eax, %eax
ucomiss %xmm0, %xmm1
ja 0x1096b
movss 0xf0(%rdi), %xmm1
ucomiss %xmm1, %xmm0
ja 0x1096b
movl 0xc0(%rdi), %edx
cmpq $0x7f, %rdx
ja 0x1096b
movss 0xec(%rdi), %xmm2
ucomiss %xmm2, %xmm0
jae 0x10909
ucomiss 0xe8(%rdi), %xmm0
ja 0x1096b
leaq 0x4(%rsi), %rax
movq %rax, 0xc8(%rdi)
movss 0x4(%rsi), %xmm3
movss 0xf4(%rdi), %xmm4
ucomiss %xmm3, %xmm4
jbe 0x1091c
movss 0xe0(%rdi), %xmm4
xorl %eax, %eax
movl $0x1, %ecx
ucomiss %xmm3, %xmm4
jb 0x1093c
addq $0x8, %rsi
movq %rsi, 0xc8(%rdi)
cmpq 0x40(%rdi), %rsi
jae 0x1093c
addss (%rsi), %xmm3
addss %xmm3, %xmm0
ucomiss %xmm2, %xmm0
jb 0x1093c
ucomiss %xmm0, %xmm1
jb 0x1093c
movl $0x1, %eax
subl 0xc4(%rdi), %eax
movl %eax, 0xc4(%rdi)
movl $0x2, %ecx
jmp 0x1093c
movl $0x1, %eax
subl 0xc4(%rdi), %eax
movl %eax, 0xc4(%rdi)
jmp 0x10941
cmpq 0x40(%rdi), %rax
je 0x10932
xorl %ecx, %ecx
ucomiss 0xf8(%rdi), %xmm3
seta %cl
xorl %eax, %eax
jmp 0x1093c
movl $0x1, %ecx
movl $0x1, %eax
testb $0x1, %cl
jne 0x1096b
addq $0x4, 0xc8(%rdi)
movl 0xc4(%rdi), %eax
movl %edx, %ecx
andb $0x7, %cl
shll %cl, %eax
shrl $0x3, %edx
orb %al, 0xa0(%rdi,%rdx)
incl 0xc0(%rdi)
movl $0x1, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1a67(%rip), %xmm2     # 0x123e8
cvtsd2ss %xmm2, %xmm2
movss 0x1b83(%rip), %xmm3     # 0x12510
mulss %xmm1, %xmm3
movq 0x40(%rdi), %r9
subq %rcx, %r9
shrq $0x2, %r9
subss %xmm3, %xmm1
cmpl $0x2, %edx
movl $0x1, %r10d
cmovgel %edx, %r10d
xorl %edx, %edx
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
xorps %xmm0, %xmm0
cvtsi2ss %esi, %xmm0
ucomiss %xmm0, %xmm2
jbe 0x10a5b
movl %eax, %esi
andl $0x1, %esi
movl %r11d, %ecx
andb $0x7, %cl
shll %cl, %esi
movl %edx, %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
xorps %xmm0, %xmm0
cvtsi2ss %esi, %xmm0
xorl %ecx, %ecx
ucomiss %xmm0, %xmm2
seta %cl
leal (%rcx,%rax), %esi
incl %esi
xorl %eax, %eax
cmpl %r9d, %esi
jg 0x10a5d
cmpl $0x7f, %edx
je 0x10a5d
cmpltss %xmm2, %xmm0
andnps %xmm1, %xmm0
incl %edx
decl %r11d
cmpl %edx, %r10d
jne 0x109b5
movslq %esi, %rax
leaq (%r8,%rax,4), %rax
movq %rax, 0xc8(%rdi)
movl %edx, 0xc0(%rdi)
movb $0x1, %al
jmp 0x10a5d
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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, %eax
movaps 0x164e(%rip), %xmm0     # 0x120c0
movaps %xmm0, -0x30(%rbp)
xorl %r8d, %r8d
xorps %xmm1, %xmm1
movss 0x1c50(%rip), %xmm0     # 0x126d4
movl $0xaaaaaaab, %r10d      # imm = 0xAAAAAAAB
movl %esi, %r9d
movl $0x2, %r11d
subl %r8d, %r11d
subl %r8d, %r11d
andl $0x2, %r11d
movslq %r8d, %rbx
movss (%rdx,%rbx,4), %xmm3
subss %xmm1, %xmm3
leaq -0x30(,%r11,4), %rcx
addq %rbp, %rcx
xorl %esi, %esi
movss (%rcx,%rsi,4), %xmm2
movaps %xmm3, %xmm4
subss %xmm2, %xmm4
cvttss2si %xmm4, %r14d
movl %r14d, %r15d
negl %r15d
cmovsl %r14d, %r15d
cmpl $0x34, %r15d
jbe 0x10ae7
incq %rsi
cmpq $0x1, %rsi
je 0x10ab6
movl $0x2, %esi
jmp 0x10b38
addl %esi, %r11d
leal (%r9,%r9), %ecx
notb %cl
andb $0x6, %cl
shll %cl, %r11d
movl %r9d, %ecx
sarl $0x2, %ecx
movslq %ecx, %rcx
orb %r11b, 0xa0(%rdi,%rcx)
movss 0x4(%rdx,%rbx,4), %xmm3
movaps %xmm0, %xmm1
subss %xmm2, %xmm1
subss %xmm1, %xmm3
cvttss2si %xmm3, %ecx
movl %ecx, %r11d
negl %r11d
cmovsl %ecx, %r11d
cmpl $0x35, %r11d
jae 0x10b35
addl $0x2, %r8d
xorps %xmm1, %xmm1
jmp 0x10b38
incl %r8d
cmpl $0x1, %esi
ja 0x10b7e
leal 0x1(%r9), %esi
cmpl $0x3f, %esi
ja 0x10b7e
movl %esi, %ecx
imulq %r10, %rcx
shrq $0x23, %rcx
shll $0x2, %ecx
leal (%rcx,%rcx,2), %ebx
xorl %r11d, %r11d
movl %esi, %ecx
xorps %xmm2, %xmm2
subl %ebx, %ecx
sete %bl
je 0x10b68
movaps %xmm1, %xmm2
movb %bl, %r11b
addl %r11d, %r8d
movaps %xmm2, %xmm1
cmpl %eax, %r8d
jl 0x10a8a
testl %ecx, %ecx
je 0x10b87
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
sarl $0x2, %r9d
movslq %r9d, %rax
testb $0x3, 0xa0(%rdi,%rax)
setne %al
jmp 0x10b80
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10c8a
movq %rdi, %r14
movss 0x8(%r15), %xmm0
movss 0x1e0(%rdi), %xmm1
ucomiss %xmm0, %xmm1
jae 0x10c8a
ucomiss 0x1dc(%r14), %xmm0
ja 0x10c8a
movss 0x4(%r15), %xmm1
movss 0xe8(%r14), %xmm0
ucomiss %xmm0, %xmm1
ja 0x10c8a
movss (%rax), %xmm1
ucomiss %xmm0, %xmm1
ja 0x10c8a
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 0x10c83
movq %r14, %rdi
callq 0x10840
testl %eax, %eax
je 0x10c83
cmpl %ebx, 0xc0(%r14)
jne 0x10c31
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 0x10c9a
movss 0x1dc(%r14), %xmm0
ucomiss (%rax), %xmm0
jbe 0x10c9a
movq %r15, 0xc8(%r14)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
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 0xfe7e
// File: /workspace/github_cpp_makefile_star2_O1/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 0x11722
movss -0xc(%rbp), %xmm1
movss 0x30(%rbx), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x11438
movss 0x34(%rbx), %xmm0
ucomiss %xmm0, %xmm1
jae 0x1142c
movss %xmm0, 0x30(%rbx)
movss 0x38(%rbx), %xmm0
ucomiss %xmm0, %xmm1
jae 0x11433
movss %xmm0, 0x34(%rbx)
movss %xmm1, 0x38(%rbx)
jmp 0x11438
movss %xmm1, 0x30(%rbx)
jmp 0x11438
movss %xmm1, 0x34(%rbx)
ucomiss 0x4c(%rbx), %xmm1
jbe 0x1146f
movss 0x48(%rbx), %xmm0
ucomiss %xmm1, %xmm0
jae 0x11463
movss %xmm0, 0x4c(%rbx)
movss 0x44(%rbx), %xmm0
ucomiss %xmm1, %xmm0
jae 0x1146a
movss %xmm0, 0x48(%rbx)
movss %xmm1, 0x44(%rbx)
jmp 0x1146f
movss %xmm1, 0x4c(%rbx)
jmp 0x1146f
movss %xmm1, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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), %rdi
leaq 0x8(%rbx), %r14
movss 0x20(%rdi), %xmm0
movss %xmm0, -0x14(%rbp)
movss %xmm0, 0x3c(%rbx)
movss %xmm0, 0x40(%rbx)
callq 0x2170
movss -0x14(%rbp), %xmm1
cmpq %r14, %rax
je 0x114ef
xorps %xmm0, %xmm0
movss %xmm0, -0x18(%rbp)
movss 0x20(%rax), %xmm2
movaps %xmm2, %xmm0
subss %xmm1, %xmm0
ucomiss -0x18(%rbp), %xmm0
jbe 0x114d8
movss %xmm1, 0x3c(%rbx)
movss %xmm2, 0x40(%rbx)
movss %xmm0, -0x18(%rbp)
movq %rax, %rdi
movss %xmm2, -0x14(%rbp)
callq 0x2170
movss -0x14(%rbp), %xmm1
cmpq %r14, %rax
jne 0x114b7
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/probonopd[P]decodeir/./DecodeIR.h
// Function: setBurst::insert(float*)
void insert( burst b )
    {
        double x = b[0]+b[1];
        super::insert( x );
        bool redo = ( x > mid1 && x < mid2 );
        if ( x < min3 )
        {
            if ( x >= min2 )
            {
                min3 = x;
            }
            else
            {
                min3 = min2;
                double g = min1 - x;
                if ( g <= 0 )
                {
                    min2 = x;
                }
                else
                {
                    min2 = min1;
                    min1 = x;
                    if ( g > mid2-mid1 ) redo = true;
                }
            }
        }
        if ( x > max3 )
        {
            if ( x <= max2 )
            {
                max3 = x;
            }
            else
            {
                max3 = max2;
                double g = x-max1;
                if ( g <= 0 )
                {
                    max2 = x;
                }
                else
                {
                    max2 = max1;
                    max1 = x;
                    if ( g > mid2-mid1 ) redo = true;
                }
            }
        }
        if (redo)
        {
            findMid();
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
movss (%rsi), %xmm1
addss 0x4(%rsi), %xmm1
movaps %xmm1, -0x30(%rbp)
movq %rdi, %rbx
cvtss2sd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
leaq -0x14(%rbp), %rsi
movss %xmm1, (%rsi)
callq 0x11722
movaps -0x30(%rbp), %xmm5
movss 0x30(%rbx), %xmm2
movss 0x3c(%rbx), %xmm0
movss 0x40(%rbx), %xmm1
movaps %xmm0, %xmm3
cmpltps %xmm5, %xmm3
movaps %xmm5, %xmm4
cmpltps %xmm1, %xmm4
andps %xmm3, %xmm4
movd %xmm4, %eax
ucomiss %xmm5, %xmm2
jbe 0x115a8
movss 0x34(%rbx), %xmm2
ucomiss %xmm2, %xmm5
jae 0x1159c
movss %xmm2, 0x30(%rbx)
movss 0x38(%rbx), %xmm3
xorps %xmm2, %xmm2
cvtss2sd %xmm3, %xmm2
subsd -0x10(%rbp), %xmm2
xorps %xmm4, %xmm4
ucomisd %xmm2, %xmm4
jae 0x115a3
movss %xmm3, 0x34(%rbx)
movss %xmm5, 0x38(%rbx)
movaps %xmm1, %xmm3
subss %xmm0, %xmm3
cvtss2sd %xmm3, %xmm3
ucomisd %xmm3, %xmm2
jbe 0x115a8
movb $0x1, %al
jmp 0x115a8
movss %xmm5, 0x30(%rbx)
jmp 0x115a8
movss %xmm5, 0x34(%rbx)
ucomiss 0x4c(%rbx), %xmm5
jbe 0x1160d
movss 0x48(%rbx), %xmm2
ucomiss %xmm5, %xmm2
jae 0x11601
movss %xmm2, 0x4c(%rbx)
movss 0x44(%rbx), %xmm2
xorps %xmm3, %xmm3
cvtss2sd %xmm2, %xmm3
movsd -0x10(%rbp), %xmm4
subsd %xmm3, %xmm4
xorpd %xmm3, %xmm3
ucomisd %xmm4, %xmm3
jae 0x11608
movss %xmm2, 0x48(%rbx)
movss %xmm5, 0x44(%rbx)
subss %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
ucomisd %xmm0, %xmm4
seta %cl
orb %al, %cl
testb $0x1, %cl
jne 0x11611
jmp 0x11619
movss %xmm5, 0x4c(%rbx)
jmp 0x1160d
movss %xmm5, 0x48(%rbx)
testb $0x1, %al
je 0x11619
movq %rbx, %rdi
callq 0x11476
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/probonopd[P]decodeir/./DecodeIR.h
// Function: Signal::lead_in(float, float, float, float, float)
int lead_in(float minTot, float maxTot, float maxOn, float minOff, float minFrameInc)
	{
        if (pLead)
        {
            if ( pLead[1] >= minOff && pLead[0] <= maxOn )
            {
                float t = pLead[0] + pLead[1];
                if ( t >= minTot && t <= maxTot && nFrame1 >= t+minFrameInc )
                    return 1;
            }
            if (pLead2)
            {
                if ( pLead2[1] >= minOff && pLead2[0] <= maxOn )
                {
                    float t = pLead2[0] + pLead2[1];
                    if ( t >= minTot && t <= maxTot && nFrame2 >= t+minFrameInc )
                        return 1;
                }
            }
        }
        return 0;
	}

// Assembly:
movq 0xd0(%rdi), %rax
testq %rax, %rax
je 0x11666
pushq %rbp
movq %rsp, %rbp
movss 0x4(%rax), %xmm5
ucomiss %xmm3, %xmm5
jb 0x11643
movss (%rax), %xmm6
ucomiss %xmm6, %xmm2
jae 0x11669
movq 0xd8(%rdi), %rax
testq %rax, %rax
je 0x11662
movss 0x4(%rax), %xmm5
ucomiss %xmm3, %xmm5
jb 0x11662
movss (%rax), %xmm3
ucomiss %xmm3, %xmm2
jae 0x1168f
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
addss %xmm6, %xmm5
ucomiss %xmm0, %xmm5
jb 0x11643
ucomiss %xmm5, %xmm1
jb 0x11643
movss 0x134(%rdi), %xmm6
addss %xmm4, %xmm5
movl $0x1, %eax
ucomiss %xmm5, %xmm6
jb 0x11643
jmp 0x11664
addss %xmm3, %xmm5
ucomiss %xmm0, %xmm5
jb 0x11662
ucomiss %xmm5, %xmm1
jb 0x11662
movss 0x138(%rdi), %xmm0
addss %xmm4, %xmm5
movl $0x1, %eax
ucomiss %xmm5, %xmm0
jb 0x11662
jmp 0x11664
// File: /workspace/github_cpp_makefile_star2_O1/Dalgona[P]mine/mine.cpp
// Function: initColors()
void initColors(void)
{
  init_pair(11, 255, 0);    // white on black
  init_pair(12, 234, 234);  // menu unselected
  init_pair(13, 82, 82);    // menu selected
  init_pair(14, 123, 0);    // leaderboard title
  init_pair(15, 82, 0);     // beginner
  init_pair(16, 172, 0);    // intermediate
  init_pair(17, 198, 0);    // expert
  init_pair(18, 227, 0);    // name title 1
  init_pair(19, 214, 0);    // name title 2
  init_pair(20, 227, 0);    // 1st
  init_pair(21, 254, 0);    // 2nd
  init_pair(22, 178, 0);    // 3rd
  init_pair(23, 243, 0);    // 4th
  init_pair(24, 243, 0);    // 5th
  init_pair(30, 238, 234);  // name blank
  init_pair(31, 123, 17);   // name char
}

// Assembly:
pushq %rax
movl $0xb, %edi
movl $0xff, %esi
xorl %edx, %edx
callq 0x2070
movl $0xc, %edi
movl $0xea, %esi
movl $0xea, %edx
callq 0x2070
movl $0xd, %edi
movl $0x52, %esi
movl $0x52, %edx
callq 0x2070
movl $0xe, %edi
movl $0x7b, %esi
xorl %edx, %edx
callq 0x2070
movl $0xf, %edi
movl $0x52, %esi
xorl %edx, %edx
callq 0x2070
movl $0x10, %edi
movl $0xac, %esi
xorl %edx, %edx
callq 0x2070
movl $0x11, %edi
movl $0xc6, %esi
xorl %edx, %edx
callq 0x2070
movl $0x12, %edi
movl $0xe3, %esi
xorl %edx, %edx
callq 0x2070
movl $0x13, %edi
movl $0xd6, %esi
xorl %edx, %edx
callq 0x2070
movl $0x14, %edi
movl $0xe3, %esi
xorl %edx, %edx
callq 0x2070
movl $0x15, %edi
movl $0xfe, %esi
xorl %edx, %edx
callq 0x2070
movl $0x16, %edi
movl $0xb2, %esi
xorl %edx, %edx
callq 0x2070
movl $0x17, %edi
movl $0xf3, %esi
xorl %edx, %edx
callq 0x2070
movl $0x18, %edi
movl $0xf3, %esi
xorl %edx, %edx
callq 0x2070
movl $0x1e, %edi
movl $0xee, %esi
movl $0xea, %edx
callq 0x2070
movl $0x1f, %edi
movl $0x7b, %esi
movl $0x11, %edx
popq %rax
jmp 0x2070
// File: /workspace/github_cpp_makefile_star2_O1/Dalgona[P]mine/game.cpp
// Function: game::initColors()
void game::initColors()
{
  init_pair(1, 255, 0);      // Guide text
  init_pair(2, 197, 0);      // Game over message
  init_pair(3, 118, 0);      // Game cleared message
  init_pair(4, 86, 0);       // New game message
  /* pairs 11~100 are reserved */
  init_pair(101, 21, 250);   // Number 1
  init_pair(102, 22, 250);   // Number 2
  init_pair(103, 88, 250);   // Number 3
  init_pair(104, 18, 250);   // Number 4
  init_pair(105, 100, 250);  // Number 5
  init_pair(106, 24, 250);   // Number 6
  init_pair(107, 240, 250);  // Number 7
  init_pair(108, 240, 250);  // Number 8
  init_pair(109, 240, 250);  // Number 9
  init_pair(200, 250, 253);  // Unexplored
  init_pair(201, 196, 253);  // Flag
  init_pair(202, 235, 253);  // Question
  init_pair(203, 250, 250);  // Blank
  init_pair(204, 226, 202);  // Explosion
  init_pair(205, 235, 28);   // Correct
}

// Assembly:
pushq %rax
movl $0x1, %edi
movl $0xff, %esi
xorl %edx, %edx
callq 0x2070
movl $0x2, %edi
movl $0xc5, %esi
xorl %edx, %edx
callq 0x2070
movl $0x3, %edi
movl $0x76, %esi
xorl %edx, %edx
callq 0x2070
movl $0x4, %edi
movl $0x56, %esi
xorl %edx, %edx
callq 0x2070
movl $0x65, %edi
movl $0x15, %esi
movl $0xfa, %edx
callq 0x2070
movl $0x66, %edi
movl $0x16, %esi
movl $0xfa, %edx
callq 0x2070
movl $0x67, %edi
movl $0x58, %esi
movl $0xfa, %edx
callq 0x2070
movl $0x68, %edi
movl $0x12, %esi
movl $0xfa, %edx
callq 0x2070
movl $0x69, %edi
movl $0x64, %esi
movl $0xfa, %edx
callq 0x2070
movl $0x6a, %edi
movl $0x18, %esi
movl $0xfa, %edx
callq 0x2070
movl $0x6b, %edi
movl $0xf0, %esi
movl $0xfa, %edx
callq 0x2070
movl $0x6c, %edi
movl $0xf0, %esi
movl $0xfa, %edx
callq 0x2070
movl $0x6d, %edi
movl $0xf0, %esi
movl $0xfa, %edx
callq 0x2070
movl $0xc8, %edi
movl $0xfa, %esi
movl $0xfd, %edx
callq 0x2070
movl $0xc9, %edi
movl $0xc4, %esi
movl $0xfd, %edx
callq 0x2070
movl $0xca, %edi
movl $0xeb, %esi
movl $0xfd, %edx
callq 0x2070
movl $0xcb, %edi
movl $0xfa, %esi
movl $0xfa, %edx
callq 0x2070
movl $0xcc, %edi
movl $0xe2, %esi
movl $0xca, %edx
callq 0x2070
movl $0xcd, %edi
movl $0xeb, %esi
movl $0x1c, %edx
popq %rax
jmp 0x2070
// File: /workspace/github_cpp_makefile_star2_O1/Dalgona[P]mine/game.cpp
// Function: game::setFlag()
void game::setFlag()
{
  int &cp = field[index(cY, cX)];

  if (cp & MF_DISP_UNKNOWN)
  {
    cp &= ~MF_DISP_UNKNOWN;
    cp |= MF_DISP_FLAG;
    nFlags++;
  }
  else if (cp & MF_DISP_QUESTION)
  {
    cp &= ~MF_DISP_QUESTION;
    cp |= MF_DISP_FLAG;
    nFlags++;
  }
  else if (cp & MF_DISP_FLAG)
  {
    cp &= ~MF_DISP_FLAG;
    cp |= MF_DISP_UNKNOWN;
    nFlags--;
  }
}

// Assembly:
movslq 0x28(%rdi), %rcx
movslq 0x2c(%rdi), %rdx
movslq 0x24(%rdi), %rax
imulq %rcx, %rax
addq %rdx, %rax
movq 0x8(%rdi), %rcx
movl (%rcx,%rax,4), %edx
movl $0x1, %esi
movl $0x40000, %r9d          # imm = 0x40000
movl $0xfffaffff, %r8d       # imm = 0xFFFAFFFF
btl $0x10, %edx
jb 0x5718
movl $0xfff2ffff, %r8d       # imm = 0xFFF2FFFF
btl $0x13, %edx
jb 0x5718
btl $0x12, %edx
jae 0x5724
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x10000, %r9d          # imm = 0x10000
andl %r8d, %edx
orl %r9d, %edx
movl %edx, (%rcx,%rax,4)
addl %esi, 0x34(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Dalgona[P]mine/screen.cpp
// Function: screen::enable()
void screen::enable()
{
  if (enabled) return;
  initscr();
  cbreak();
  noecho();
  keypad(stdscr, true);
  updateMaxYX();
  if (has_colors())
    start_color();
  enabled = true;
}

// Assembly:
cmpb $0x0, (%rdi)
jne 0x6513
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2320
callq 0x20c0
callq 0x2290
movq 0x4b12(%rip), %r14      # 0xafd8
movq (%r14), %rdi
movl $0x1, %esi
callq 0x2100
movq (%r14), %rax
testq %rax, %rax
je 0x64ec
movswl 0x4(%rax), %ecx
incl %ecx
movl %ecx, 0x4(%rbx)
movswl 0x6(%rax), %eax
incl %eax
jmp 0x64f8
movl $0xffffffff, 0x4(%rbx)  # imm = 0xFFFFFFFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x8(%rbx)
callq 0x2360
testb %al, %al
je 0x6509
callq 0x2080
movb $0x1, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/Dalgona[P]mine/screen.cpp
// Function: screen::mvprintw(int, int, char const*, ...)
void screen::mvprintw(int row, int col, const char *format, ...)
{
  va_list args;
  va_start(args, format);

  if (row < 0) row = rows + row;
  if (col < 0) col = cols + col;
  wmove(stdscr, row, col);
  vwprintw(stdscr, format, args);

  va_end(args);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rcx, %rbx
leaq 0x20(%rsp), %rcx
movq %r8, 0x20(%rcx)
movq %r9, 0x28(%rcx)
testb %al, %al
je 0x6649
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r14
movq %rcx, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000020, %rax     # imm = 0x3000000020
movq %rax, (%r14)
movl %esi, %eax
sarl $0x1f, %eax
andl 0x4(%rdi), %eax
movl %edx, %ecx
sarl $0x1f, %ecx
andl 0x8(%rdi), %ecx
addl %eax, %esi
addl %ecx, %edx
movq 0x4954(%rip), %r15      # 0xafd8
movq (%r15), %rdi
callq 0x2240
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x23e0
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/conf2img/conf2img.cpp
// Function: CaptureInteger(gaps::R2Grid&)
static int
CaptureInteger(R2Grid& image)
{
  // Allocate pixel buffer
  unsigned char *pixels = new unsigned char [ 4 * width * height ];

  // Read pixels
  glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels);

  // Fill image
  unsigned char *pixelp = pixels;
  for (int iy = 0; iy < height; iy++) {
    for (int ix = 0; ix < width; ix++) {
      unsigned int red = *pixelp++;
      unsigned int green = *pixelp++;
      unsigned int blue = *pixelp++;
      unsigned int alpha = *pixelp++;
      unsigned int value = 0;
      value |= red << 24;
      value |= green << 16;
      value |= blue <<  8;
      value |= alpha;
      image.SetGridValue(ix, iy, value);
    }
  }

  // Delete pixels
  delete [] pixels;
  
  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x151214(%rip), %ebp    # 0x17ca60
movl 0x151211(%rip), %r15d   # 0x17ca64
movl %ebp, %eax
imull %r15d, %eax
shll $0x2, %eax
movslq %eax, %rdi
callq 0x23040
movq %rax, %rbx
movq %rax, (%rsp)
xorl %edi, %edi
xorl %esi, %esi
movl %ebp, %edx
movl %r15d, %ecx
movl $0x1908, %r8d           # imm = 0x1908
movl $0x1401, %r9d           # imm = 0x1401
callq 0x233a0
movslq 0x1511d8(%rip), %rax    # 0x17ca64
testq %rax, %rax
jle 0x2b8e9
movl 0x1511c9(%rip), %ecx    # 0x17ca60
movq 0xb8(%r14), %rdx
movslq 0xc8(%r14), %rsi
shlq $0x3, %rsi
movq %rcx, %rdi
shlq $0x2, %rdi
xorl %r8d, %r8d
movq %rbx, %r9
testl %ecx, %ecx
jle 0x2b8de
xorl %r10d, %r10d
movl (%r9,%r10), %r11d
bswapl %r11d
xorps %xmm0, %xmm0
cvtsi2sd %r11, %xmm0
movsd %xmm0, (%rdx,%r10,2)
addq $0x4, %r10
cmpq %r10, %rdi
jne 0x2b8bd
addq %r10, %r9
incq %r8
addq %rsi, %rdx
cmpq %rax, %r8
jne 0x2b8b6
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x23c40
nop
// File: /workspace/github_cpp_makefile_star2_O1/gabryatfendor[P]SocietySimulator/src/configuration.cpp
// Function: Configuration::loadConfiguration(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vector<string> Configuration::loadConfiguration(string filename)
{
    vector<string> cfg;
    ifstream input(filename);
    if (!input.is_open())
    {
        cerr << "could not open " << filename << " for reading.\n";
        exit(1);
    }
    string line;
    while(getline(input, line))
    {
        if(line[0] != '#') //avoid commented lines
        {
            //trim out spaces
            line.erase(remove(line.begin(),line.end(),' '),line.end());
            //to lower
            transform(line.begin(), line.end(), line.begin(), ::tolower);
            cfg.push_back(line);
        }
    }

    return cfg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rdx, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x38(%rbp)
movq $0x0, 0x10(%rdi)
leaq -0x260(%rbp), %r14
movq %r14, %rdi
movq %rdx, %rsi
movl $0x8, %edx
callq 0x2260
leaq -0x1e8(%rbp), %rdi
callq 0x2050
testb %al, %al
je 0x2783
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x58(%rbp), %r15
movq -0x260(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x22c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
movq -0x58(%rbp), %rdi
jne 0x274c
cmpb $0x23, (%rdi)
je 0x26b7
movq -0x50(%rbp), %rsi
addq %rdi, %rsi
movb $0x20, -0x29(%rbp)
leaq -0x29(%rbp), %rdx
callq 0x2c27
movq %rax, %rcx
subq -0x58(%rbp), %rcx
movq %rcx, -0x50(%rbp)
movb $0x0, (%rax)
movq -0x50(%rbp), %r13
testq %r13, %r13
je 0x273b
movq -0x58(%rbp), %r12
xorl %ebx, %ebx
movsbl (%r12,%rbx), %edi
callq 0x2230
movb %al, (%r12,%rbx)
incq %rbx
cmpq %rbx, %r13
jne 0x2725
movq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0x2a90
jmp 0x26b7
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x2761
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2190
leaq -0x260(%rbp), %rdi
callq 0x2060
movq -0x38(%rbp), %rax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x5866(%rip), %rdi      # 0x7ff0
leaq 0x2873(%rip), %rsi      # 0x5004
movl $0xf, %edx
callq 0x21c0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x5847(%rip), %rdi      # 0x7ff0
callq 0x21c0
leaq 0x285f(%rip), %rsi      # 0x5014
movq %rax, %rdi
callq 0x2170
movl $0x1, %edi
callq 0x21d0
movq %rax, %r14
jmp 0x27ef
movq %rax, %r14
jmp 0x27fb
jmp 0x27d3
movq %rax, %r14
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x27ef
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2190
leaq -0x260(%rbp), %rdi
callq 0x2060
movq -0x38(%rbp), %rdi
callq 0x2adc
movq %r14, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O1/gabryatfendor[P]SocietySimulator/src/map.cpp
// Function: update()
void update()
{
	printMap();
	int k,x,y;
	for(int i=0;i<POPULATION;i++)
	{
		people[i].work();
		if(!people[i].working)
		{
			people[i].move();
		}
	}

	if(cfg.automated)
	sleep(cfg.speed);
	else
	getchar();
	system("clear");

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
callq 0x30e8
xorl %r14d, %r14d
leaq 0x9c53(%rip), %r15      # 0xcce0
leaq (%r15,%r14), %rbx
movq %rbx, %rdi
callq 0x3b66
cmpb $0x0, 0x15(%r15,%r14)
jne 0x30a9
movq %rbx, %rdi
callq 0x3910
addq $0x30, %r14
cmpq $0x4b0, %r14            # imm = 0x4B0
jne 0x308d
leaq 0x50db(%rip), %rax      # 0x8198
cmpb $0x0, 0x3c(%rax)
je 0x30cd
movl 0x40(%rax), %edi
callq 0x20f0
jmp 0x30d2
callq 0x2200
leaq 0x1f95(%rip), %rdi      # 0x506e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2120
// File: /workspace/github_cpp_makefile_star2_O1/gabryatfendor[P]SocietySimulator/src/map.cpp
// Function: initMap()
void initMap()
{
	if(cfg.maxLakes>0)
	{
		setWater();
	}

	if(cfg.maxWoods>0)
	{
		setWood();
	}

	if(cfg.maxMountains>0)
	{
		setMountain();
	}

	if(cfg.mapIsland)
	{
		setIsland();
	}

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x4e71(%rip), %rbx      # 0x8198
cmpl $0x0, 0x24(%rbx)
jle 0x3332
callq 0x3360
cmpl $0x0, 0x2c(%rbx)
jle 0x333d
callq 0x3450
cmpl $0x0, 0x28(%rbx)
jle 0x3348
callq 0x3542
cmpb $0x1, 0x44(%rbx)
jne 0x3359
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3634
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gabryatfendor[P]SocietySimulator/src/map.cpp
// Function: setWater()
void setWater()
{
    int lakes = randBetween(1, cfg.maxLakes);
    for(int i=0;i<lakes;i++)
    {
        int ray = randBetween(1, cfg.maxLakesRay);
				int x = randBetween(ray, WIDTH-ray);
				int y = randBetween(ray, HEIGHT-ray);
        for(int j=x-ray;j<x+ray;j++)
        {
            for(int k=y-ray;k<y+ray;k++)
            {
                map[j][k].kind='-';
                map[j][k].origin='-';
                map[j][k].walkable=true;
            }
        }
    }

    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x4e23(%rip), %r12      # 0x8198
movl 0x24(%r12), %esi
movl $0x1, %edi
callq 0x45ac
testl %eax, %eax
jle 0x3441
movl %eax, %ebx
xorl %r13d, %r13d
movl 0x30(%r12), %esi
movl $0x1, %edi
callq 0x45ac
movl %eax, %r14d
movl $0x50, %esi
subl %eax, %esi
movl %eax, %edi
callq 0x45ac
movl %eax, %r15d
movl $0x14, %esi
subl %r14d, %esi
movl %r14d, %edi
callq 0x45ac
movl %r15d, %esi
subl %r14d, %esi
leal (%r15,%r14), %ecx
cmpl %ecx, %esi
jge 0x3435
movl %eax, %edx
subl %r14d, %edx
movslq %esi, %rsi
movslq %r15d, %rdi
imulq $0xf0, %rdi, %rdi
movslq %eax, %r8
addl %r14d, %eax
leaq (%r8,%r8,2), %r8
leaq (%rdi,%r8,4), %rdi
movslq %r14d, %r8
imulq $0xfc, %r8, %r8
subq %r8, %rdi
addq 0x4bb2(%rip), %rdi      # 0x7fb8
addl %r14d, %r14d
movl %r14d, %r8d
movq %rdi, %r9
cmpl %eax, %edx
jge 0x3427
movw $0x2d2d, (%r9)          # imm = 0x2D2D
movb $0x1, 0x9(%r9)
addq $0xc, %r9
decl %r8d
jne 0x3413
incq %rsi
addq $0xf0, %rdi
cmpl %esi, %ecx
jne 0x3409
incl %r13d
cmpl %ebx, %r13d
jne 0x3391
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq