LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/gulamf[P]NRF24LE1Flash/main.cpp
// Function: set_blocking(int, int)
void
set_blocking (int fd, int should_block)
{
        struct termios tty;
        memset (&tty, 0, sizeof tty);
        if (tcgetattr (fd, &tty) != 0)
        {
                cout << "error from tggetattr: " << errno;
                return;
        }

        tty.c_cc[VMIN]  = should_block ? 1 : 0;
        tty.c_cc[VTIME] = 5;            // 0.5 seconds read timeout

        if (tcsetattr (fd, TCSANOW, &tty) != 0)
                cout << "error setting term attributes:"<<errno;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %r14d
movl %edi, %ebx
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rsi
movups %xmm0, 0x2c(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
callq 0x2250
testl %eax, %eax
je 0x3379
movq 0x6c6d(%rip), %rdi      # 0x9fd8
leaq 0x4090(%rip), %rsi      # 0x7402
movl $0x16, %edx
jmp 0x33a8
testl %r14d, %r14d
leaq -0x50(%rbp), %rdx
setne 0x17(%rdx)
movb $0x5, 0x16(%rdx)
movl %ebx, %edi
xorl %esi, %esi
callq 0x2290
testl %eax, %eax
je 0x33c0
movq 0x6c3c(%rip), %rdi      # 0x9fd8
leaq 0x4076(%rip), %rsi      # 0x7419
movl $0x1e, %edx
callq 0x2270
callq 0x2040
movl (%rax), %esi
movq 0x6c1d(%rip), %rdi      # 0x9fd8
callq 0x2360
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gulamf[P]NRF24LE1Flash/main.cpp
// Function: ReadSerialDataByte(unsigned char*)
BLCommandReturnType ReadSerialDataByte(unsigned char *buffer)
{
  fd_set set;
  struct timeval timeout;
  int rv;

  FD_ZERO(&set); /* clear the set */
  FD_SET(progSerPort, &set); /* add our file descriptor to the set */

  timeout.tv_sec = 0;
  timeout.tv_usec = 2000000;

  rv = select(progSerPort + 1, &set, NULL, NULL, &timeout);
  if(rv == -1)
    return BLCommandReturnType_SerialPortFailure; /* an error accured */
  else if(rv == 0)
    return BLCommandReturnType_Timeout; /* a timeout occured */
  else
    read( progSerPort, (void *)buffer,1 ); /* there was data to read */

    return BLCommandReturnType_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq -0xa0(%rbp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x70(%rsi)
movl 0x6a10(%rip), %edi      # 0xa318
leal 0x3f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %edi, %ecx
subl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
sarl $0x6, %eax
cltq
orq %rdx, -0xa0(%rbp,%rax,8)
leaq -0x18(%rbp), %r8
movq $0x0, (%r8)
movq $0x1e8480, 0x8(%r8)     # imm = 0x1E8480
incl %edi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x21e0
cmpl $-0x1, %eax
je 0x395c
testl %eax, %eax
jne 0x3963
movl $0x2, %eax
jmp 0x3978
movl $0x3, %eax
jmp 0x3978
movl 0x69af(%rip), %edi      # 0xa318
movl $0x1, %edx
movq %rbx, %rsi
callq 0x22d0
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gulamf[P]NRF24LE1Flash/main.cpp
// Function: ReadSerialCommandByte(BLCommand)
BLCommandReturnType ReadSerialCommandByte(BLCommand command)
{
    unsigned char buffer = 0;
    BLCommandReturnType blCommandReturnVal;

    blCommandReturnVal = ReadSerialDataByte(&buffer);

    if (blCommandReturnVal == BLCommandReturnType_OK)
    {
        if ((command == BLCommand_Any) || (buffer == (char)command))
        {
            return BLCommandReturnType_OK;
        }
        else
        {
            return BLCommandReturnType_BadCharacter;
        }
    }
    else
    {
        return blCommandReturnVal;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq -0x9(%rbp), %rdi
movb $0x0, (%rdi)
callq 0x38ca
testl %eax, %eax
jne 0x39af
xorl %eax, %eax
cmpl $0x2a, %ebx
je 0x39af
movzbl -0x9(%rbp), %ecx
movsbl %bl, %edx
xorl %eax, %eax
cmpl %ecx, %edx
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gulamf[P]NRF24LE1Flash/main.cpp
// Function: ExecuteCommandStartBootloader()
BLCommandReturnType ExecuteCommandStartBootloader()
{
    if (!OpenSerialPort(baudrate))
    {
        return BLCommandReturnType_SerialPortFailure;
    }

    //reset the chip
    ResetDevice();

    //send the start byte
    if (WriteSerialByte((unsigned char)BLCommand_Start) != BLCommandReturnType_OK)
    {
        return BLCommandReturnType_SerialPortFailure;
    }

    //wait for the return character and return it
    return ReadSerialCommandByte(BLCommand_Start);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
callq 0x33c9
movl $0x3, %ebx
testb %al, %al
je 0x3a00
callq 0x3745
movl $0x73, %edi
callq 0x3879
testl %eax, %eax
jne 0x3a00
leaq -0x11(%rbp), %r14
movb $0x0, (%r14)
movq %r14, %rdi
callq 0x38ca
xorl %ebx, %ebx
cmpb $0x73, (%r14)
setne %bl
testl %eax, %eax
cmovnel %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gulamf[P]NRF24LE1Flash/main.cpp
// Function: ExecuteCommandGetDevID(unsigned short*)
BLCommandReturnType ExecuteCommandGetDevID(uint16_t *buffer)
{
    unsigned char tempByte = 0;

    if (WriteSerialByte((unsigned char )BLCommand_GetDevID) != BLCommandReturnType_OK)
    {
        return BLCommandReturnType_SerialPortFailure;
    }

    if (ReadSerialDataByte(&tempByte) != BLCommandReturnType_OK)
    {
        return BLCommandReturnType_Timeout;
    }

    *buffer = tempByte;

    if (ReadSerialDataByte(&tempByte) != BLCommandReturnType_OK)
    {
        return BLCommandReturnType_Timeout;
    }

    (*buffer) += ((uint16_t)tempByte) << 8;

    return ReadSerialCommandByte(BLCommand_GetDevID);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movb $0x0, -0x11(%rbp)
movl $0x69, %edi
callq 0x3879
movl $0x3, %r14d
testl %eax, %eax
jne 0x3a80
leaq -0x11(%rbp), %rdi
callq 0x38ca
movl $0x2, %r14d
testl %eax, %eax
jne 0x3a80
leaq -0x11(%rbp), %rdi
movzbl (%rdi), %eax
movw %ax, (%rbx)
callq 0x38ca
testl %eax, %eax
jne 0x3a80
movzbl -0x11(%rbp), %eax
shll $0x8, %eax
addw %ax, (%rbx)
leaq -0x12(%rbp), %rbx
movb $0x0, (%rbx)
movq %rbx, %rdi
callq 0x38ca
xorl %r14d, %r14d
cmpb $0x69, (%rbx)
setne %r14b
testl %eax, %eax
cmovnel %eax, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gulamf[P]NRF24LE1Flash/main.cpp
// Function: ExecuteCommandGetBLVersion(unsigned char*)
BLCommandReturnType ExecuteCommandGetBLVersion(unsigned char *buffer)
{
    if (WriteSerialByte((unsigned char)BLCommand_GetBLVersion) != BLCommandReturnType_OK)
    {
        return BLCommandReturnType_SerialPortFailure;
    }

    if (ReadSerialDataByte(buffer) != BLCommandReturnType_OK)
    {
        return BLCommandReturnType_Timeout;
    }

    return ReadSerialCommandByte(BLCommand_GetBLVersion);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x76, %edi
callq 0x3879
movl %eax, %ecx
movl $0x3, %eax
testl %ecx, %ecx
jne 0x3adb
movq %rbx, %rdi
callq 0x38ca
movl %eax, %ecx
movl $0x2, %eax
testl %ecx, %ecx
jne 0x3adb
leaq -0x9(%rbp), %rbx
movb $0x0, (%rbx)
movq %rbx, %rdi
callq 0x38ca
movl %eax, %ecx
xorl %eax, %eax
cmpb $0x76, (%rbx)
setne %al
testl %ecx, %ecx
cmovnel %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gulamf[P]NRF24LE1Flash/main.cpp
// Function: ExecuteCommandExitBootloader()
BLCommandReturnType ExecuteCommandExitBootloader()
{
    BLCommandReturnType retVal = BLCommandReturnType_Timeout;

    if (WriteSerialByte((unsigned char)BLCommand_Exit) != BLCommandReturnType_OK)
    {
        return BLCommandReturnType_SerialPortFailure;
    }

    retVal = ReadSerialCommandByte(BLCommand_Exit);

    return retVal;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x78, %edi
callq 0x3879
movl %eax, %ecx
movl $0x3, %eax
testl %ecx, %ecx
jne 0x3b1b
leaq -0x9(%rbp), %rbx
movb $0x0, (%rbx)
movq %rbx, %rdi
callq 0x38ca
movl %eax, %ecx
xorl %eax, %eax
cmpb $0x78, (%rbx)
setne %al
testl %ecx, %ecx
cmovnel %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gulamf[P]NRF24LE1Flash/main.cpp
// Function: ConvertBLDevIDToString[abi:cxx11](unsigned short)
string ConvertBLDevIDToString(uint16_t blDevId)
{
    string retVal;

    if(blDevId >= sizeof(&blDevIdToString))
    {
        retVal = "[Invalid Device ID]";
    }
    else
    {
        retVal = blDevIdToString[blDevId];
    }

    retVal += " (ID: " + ToString(blDevId) + ")\n";

    return retVal;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movw %si, -0x2a(%rbp)
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
cmpw $0x8, %si
jb 0x3b6e
leaq 0x394b(%rip), %rcx      # 0x74a5
movl $0x13, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2310
jmp 0x3b86
movzwl %si, %eax
shll $0x5, %eax
leaq 0x66d5(%rip), %rsi      # 0xa250
addq %rax, %rsi
movq %rbx, %rdi
callq 0x2140
leaq -0x90(%rbp), %rdi
leaq -0x2a(%rbp), %rsi
callq 0x5c1f
leaq 0x391c(%rip), %rcx      # 0x74b9
leaq -0x90(%rbp), %rdi
movl $0x6, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2260
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3bd8
movq %rdx, -0x50(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x40(%rbp)
jmp 0x3be0
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq -0x50(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x38be(%rip), %rsi      # 0x74c0
callq 0x23b0
leaq -0x60(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x3c2b
movq %rsi, -0x70(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x60(%rbp)
jmp 0x3c36
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq %r13, %rsi
movq 0x8(%rax), %rdx
movq %rdx, -0x68(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0x20c0
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x3c6a
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0x3c7f
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2220
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c98
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2220
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x3cc7
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x3cc7
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0x3ce1
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x3ce1
movq %rax, %r14
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3d01
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x3d01
jmp 0x3cfe
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x3d14
movq (%r15), %rsi
incq %rsi
callq 0x2220
movq %r14, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O3/gulamf[P]NRF24LE1Flash/main.cpp
// Function: ExecuteCommandErasePage(unsigned char)
BLCommandReturnType ExecuteCommandErasePage(uint8_t pageNum)
{
    if (WriteSerialByte((uint8_t)BLCommand_ErasePage) != BLCommandReturnType_OK)
    {
        return BLCommandReturnType_SerialPortFailure;
    }

    if (WriteSerialByte(pageNum) != BLCommandReturnType_OK)
    {
        return BLCommandReturnType_SerialPortFailure;
    }

    return ReadSerialCommandByte(BLCommand_ErasePage);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %r14d
movl $0x65, %edi
callq 0x3879
movl $0x3, %ebx
testl %eax, %eax
jne 0x3f03
movzbl %r14b, %edi
callq 0x3879
testl %eax, %eax
jne 0x3f03
leaq -0x11(%rbp), %r14
movb $0x0, (%r14)
movq %r14, %rdi
callq 0x38ca
xorl %ebx, %ebx
cmpb $0x65, (%r14)
setne %bl
testl %eax, %eax
cmovnel %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gulamf[P]NRF24LE1Flash/main.cpp
// Function: ExecuteCommandSetRWAddress(unsigned short)
BLCommandReturnType ExecuteCommandSetRWAddress(uint16_t address)
{
    if (WriteSerialByte((uint8_t)BLCommand_SetRWAddress) != BLCommandReturnType_OK)
    {
        return BLCommandReturnType_SerialPortFailure;
    }

    if (WriteSerialByte((uint8_t)address & 0xFF) != BLCommandReturnType_OK)
    {
        return BLCommandReturnType_SerialPortFailure;
    }

    if (WriteSerialByte((uint8_t)(address >> 8)) != BLCommandReturnType_OK)
    {
        return BLCommandReturnType_SerialPortFailure;
    }

    return ReadSerialCommandByte(BLCommand_SetRWAddress);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %r14d
movl $0x61, %edi
callq 0x3879
movl $0x3, %ebx
testl %eax, %eax
jne 0x3f6a
movzbl %r14b, %edi
callq 0x3879
testl %eax, %eax
jne 0x3f6a
movzwl %r14w, %edi
shrl $0x8, %edi
callq 0x3879
testl %eax, %eax
jne 0x3f6a
leaq -0x11(%rbp), %r14
movb $0x0, (%r14)
movq %r14, %rdi
callq 0x38ca
xorl %ebx, %ebx
cmpb $0x61, (%r14)
setne %bl
testl %eax, %eax
cmovnel %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gulamf[P]NRF24LE1Flash/main.cpp
// Function: ExecuteCommandWrite(unsigned char*, unsigned short, unsigned short)
BLCommandReturnType ExecuteCommandWrite(uint8_t buffer[], uint16_t startIndex, uint16_t len)
{
    uint numWritten = 0;

    while(numWritten < len)
    {
        uint numToWrite;

        //The write operation only supports writing up to 256 bytes per write
        if ((len - numWritten) > 256)
        {
            numToWrite = 256;
        }
        else
        {
            numToWrite = len - numWritten;
        }

        //Send write command
        if (WriteSerialByte((uint8_t)BLCommand_Write) != BLCommandReturnType_OK)
        {
            return BLCommandReturnType_SerialPortFailure;
        }

        //Send number of bytes to be written (0 here indicates we want to write 256 bytes, so casting numToWrite to a byte does the trick of getting rid of the MSb)
        if (WriteSerialByte((uint8_t)numToWrite) != BLCommandReturnType_OK)
        {
            return BLCommandReturnType_SerialPortFailure;
        }

        //Send the bytes to be written one by one
        for(unsigned int x = 0; x < numToWrite; x++)
        {
            if (WriteSerialByte(buffer[startIndex + numWritten]) != BLCommandReturnType_OK)
            {
                return BLCommandReturnType_SerialPortFailure;
            }

            numWritten++;
        }

        if (ReadSerialCommandByte(BLCommand_Write) != BLCommandReturnType_OK)
        {
            return BLCommandReturnType_Timeout;
        }
    }

    return BLCommandReturnType_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %ebx
movq %rdi, %r12
movl $0x100, %eax            # imm = 0x100
xorl %r13d, %r13d
movl %edx, -0x30(%rbp)
movl %r15d, %r14d
subl %r13d, %r14d
jbe 0x402a
cmpl %eax, %r14d
cmovael %eax, %r14d
movl $0x77, %edi
callq 0x3879
testl %eax, %eax
jne 0x4016
movzbl %r14b, %edi
callq 0x3879
testl %eax, %eax
jne 0x4016
cmpl $0x1, %r14d
adcl $0x0, %r14d
movq %rbx, %r15
addl %r13d, %ebx
addl %r14d, %r13d
movl %ebx, %eax
movzbl (%r12,%rax), %edi
callq 0x3879
testl %eax, %eax
jne 0x4016
incl %ebx
decl %r14d
jne 0x3fd5
movb $0x0, -0x29(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x38ca
testl %eax, %eax
jne 0x400f
cmpb $0x77, -0x29(%rbp)
movq %r15, %rbx
movl -0x30(%rbp), %r15d
movl $0x100, %eax            # imm = 0x100
je 0x3f96
movl $0x2, %eax
jmp 0x401b
movl $0x3, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x401b
// File: /workspace/github_cpp_makefile_star2_O3/gulamf[P]NRF24LE1Flash/main.cpp
// Function: ExecuteCommandSetUsrMainAddress(unsigned short)
BLCommandReturnType ExecuteCommandSetUsrMainAddress(uint16_t address)
{
    if (WriteSerialByte((uint8_t)BLCommand_SetUsrMainAddress) != BLCommandReturnType_OK)
    {
        return BLCommandReturnType_SerialPortFailure;
    }

    if (WriteSerialByte((uint8_t)address & 0xFF) != BLCommandReturnType_OK)
    {
        return BLCommandReturnType_SerialPortFailure;
    }

    if (WriteSerialByte((uint8_t)address >> 8) != BLCommandReturnType_OK)
    {
        return BLCommandReturnType_SerialPortFailure;
    }

    return ReadSerialCommandByte(BLCommand_SetUsrMainAddress);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %r14d
movl $0x6d, %edi
callq 0x3879
movl $0x3, %ebx
testl %eax, %eax
jne 0x4085
movzbl %r14b, %edi
callq 0x3879
testl %eax, %eax
jne 0x4085
xorl %edi, %edi
callq 0x3879
testl %eax, %eax
jne 0x4085
leaq -0x11(%rbp), %r14
movb $0x0, (%r14)
movq %r14, %rdi
callq 0x38ca
xorl %ebx, %ebx
cmpb $0x6d, (%r14)
setne %bl
testl %eax, %eax
cmovnel %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gulamf[P]NRF24LE1Flash/main.cpp
// Function: ExecuteCommandRead(unsigned char*, unsigned short, unsigned short)
BLCommandReturnType ExecuteCommandRead(uint8_t buffer[], uint16_t startIndex, uint16_t len)
{
    unsigned int numRead = 0;

    while(numRead < len)
    {
        unsigned int numToRead;

        //The read operation only supports reading up to 256 bytes per read
        if ((len - numRead) > 256)
        {
            numToRead = 256;
        }
        else
        {
            numToRead = len - numRead;
        }

        //Send read command
        if (WriteSerialByte((uint8_t)BLCommand_Read) != BLCommandReturnType_OK)
        {
            return BLCommandReturnType_SerialPortFailure;
        }

        //Send number of bytes to be read (0 here indicates we want to read 256 bytes, so casting numToRead to a byte does the trick of getting rid of the MSb)
        if (WriteSerialByte((uint8_t)numToRead) != BLCommandReturnType_OK)
        {
            return BLCommandReturnType_SerialPortFailure;
        }

        //Read in the bytes from the micro one by one
        for(unsigned int x = 0; x < numToRead; x++)
        {
            if (ReadSerialDataByte(&buffer[startIndex + numRead]) != BLCommandReturnType_OK)
            {
                return BLCommandReturnType_SerialPortFailure;
            }

            numRead++;
        }

        if (ReadSerialCommandByte(BLCommand_Read) != BLCommandReturnType_OK)
        {
            return BLCommandReturnType_Timeout;
        }
    }

    return BLCommandReturnType_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %ebx
movq %rdi, %r12
movl $0x100, %eax            # imm = 0x100
xorl %r13d, %r13d
movl %edx, -0x30(%rbp)
movl %r15d, %r14d
subl %r13d, %r14d
jbe 0x4143
cmpl %eax, %r14d
cmovael %eax, %r14d
movl $0x72, %edi
callq 0x3879
testl %eax, %eax
jne 0x412f
movzbl %r14b, %edi
callq 0x3879
testl %eax, %eax
jne 0x412f
cmpl $0x1, %r14d
adcl $0x0, %r14d
movq %rbx, %r15
addl %r13d, %ebx
addl %r14d, %r13d
movl %ebx, %edi
addq %r12, %rdi
callq 0x38ca
testl %eax, %eax
jne 0x412f
incl %ebx
decl %r14d
jne 0x40f0
movb $0x0, -0x29(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x38ca
testl %eax, %eax
jne 0x4128
cmpb $0x72, -0x29(%rbp)
movq %r15, %rbx
movl -0x30(%rbp), %r15d
movl $0x100, %eax            # imm = 0x100
je 0x40b1
movl $0x2, %eax
jmp 0x4134
movl $0x3, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x4134
// File: /workspace/github_cpp_makefile_star2_O3/gulamf[P]NRF24LE1Flash/main.cpp
// Function: main
int main(int argc, char **argv)
{
    if(argc==1) usage();
    if(!processCommandLine(argc, argv)) exit(0);
    if(command==C_CHECK) {
        if(!CheckUC()) return -1;
    } else
    {
        if(!ProgramUC()) return -1;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x1, %edi
jne 0x5ac4
callq 0x282c
movl $0x1, %edi
movq %rbx, %rsi
callq 0x2909
testb %al, %al
je 0x5afe
cmpl $0x0, 0x483d(%rip)      # 0xa314
je 0x5ae5
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
callq 0x4147
jmp 0x5aef
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
callq 0x3d1c
testb %al, %al
je 0x5af5
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %edi, %edi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O3/gulamf[P]NRF24LE1Flash/./include/misc.h
// Function: unsigned char ParseHex<unsigned char>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
T ParseHex(const std::string& str) {
    T value = 0;
    for(unsigned int i=0;i<str.length();i++) {
        value = value << 4;
        if(str[i]>='0' && str[i]<='9') {
            int v = str[i]-'0';
            value += v;
        }
        else if(str[i]>='A' && str[i]<='F') {
            int v = str[i]-'A' + 10;
            value += v;
        }
    }
    return value;
}

// Assembly:
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x6bdd
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rdx
xorl %esi, %esi
xorl %eax, %eax
shlb $0x4, %al
movb (%rdx,%rsi), %dil
cmpb $0x30, %dil
jl 0x6bd1
cmpb $0x39, %dil
ja 0x6bbe
addb %al, %dil
addb $-0x30, %dil
jmp 0x6bcf
leal -0x41(%rdi), %r8d
cmpb $0x5, %r8b
ja 0x6bd1
addb %al, %dil
addb $-0x37, %dil
movl %edi, %eax
incq %rsi
movl %esi, %edi
cmpq %rdi, %rcx
ja 0x6ba2
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./parser/parser.cpp
// Function: getrandom(int)
const int getrandom (const int x)
{
	if (x <= 0)
		return 0;

	// r will be between 0 and 1 (but below 1 as we are dividing by RAND_MAX+1)
	double r = static_cast<double> (std::rand () % RAND_MAX) / (static_cast<double> (RAND_MAX) + 1.0);
	return floor (r * x);

}

// Assembly:
testl %edi, %edi
jle 0x86d7
pushq %rbx
movl %edi, %ebx
callq 0x70e0
cltq
movq %rax, %rcx
shlq $0x1e, %rcx
addq %rax, %rcx
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x3d, %rcx
addl %edx, %ecx
addl %ecx, %eax
shll $0x1f, %ecx
addl %eax, %ecx
cvtsi2sd %ecx, %xmm1
mulsd 0x2b944(%rip), %xmm1    # 0x34008
cvtsi2sd %ebx, %xmm0
mulsd %xmm1, %xmm0
callq 0x7740
cvttsd2si %xmm0, %eax
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./parser/parser.cpp
// Function: roll(int, int)
const int roll (const int howmany, const int die)
{
	int count;
	int total = 0;

	for (count = 0; count < howmany; ++count)
		total += getrandom (die) + 1;

	return total;

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
testl %edi, %edi
jle 0x8750
movl %esi, %ebx
movl %edi, %ebp
cvtsi2sd %esi, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %r14d, %r14d
testl %ebx, %ebx
jle 0x8742
callq 0x70e0
cltq
movq %rax, %rcx
shlq $0x1e, %rcx
addq %rax, %rcx
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x3d, %rcx
addl %edx, %ecx
addl %ecx, %eax
shll $0x1f, %ecx
addl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
mulsd 0x2b8d9(%rip), %xmm0    # 0x34008
mulsd 0x8(%rsp), %xmm0
callq 0x7740
cvttsd2si %xmm0, %eax
incl %eax
jmp 0x8747
movl $0x1, %eax
addl %eax, %r14d
decl %ebp
jne 0x86f7
jmp 0x8753
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./parser/parser.cpp
// Function: percent(int)
const bool percent (const int prob)
  {
  if (prob <= 0)
    return false;
  if (prob >= 100)
    return true;

  return getrandom (100) > (100 - prob);

  }

// Assembly:
testl %edi, %edi
jle 0x87bd
pushq %rbx
movl %edi, %ebx
movb $0x1, %al
cmpl $0x63, %edi
ja 0x87bb
callq 0x70e0
cltq
movq %rax, %rcx
shlq $0x1e, %rcx
addq %rax, %rcx
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x3d, %rcx
addl %edx, %ecx
addl %ecx, %eax
shll $0x1f, %ecx
addl %eax, %ecx
cvtsi2sd %ecx, %xmm0
mulsd 0x2b86a(%rip), %xmm0    # 0x34008
mulsd 0x2b86a(%rip), %xmm0    # 0x34010
callq 0x7740
cvttsd2si %xmm0, %eax
movl $0x64, %ecx
subl %ebx, %ecx
cmpl %eax, %ecx
setl %al
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./parser/parser.cpp
// Function: Parser::Expression(bool)
const double Parser::Expression (const bool get)  // AND and OR
  {
  double left = Comparison (get);
  while (true)
    {
    switch (type_)
      {
      case AND: 
            {
            double d = Comparison (true);   // don't want short-circuit evaluation
            left = (left != 0.0) && (d != 0.0); 
            }
          break;
      case OR:  
            {
            double d = Comparison (true);   // don't want short-circuit evaluation
            left = (left != 0.0) || (d != 0.0); 
            }
          break;
      default:    return left;
      } // end of switch on type
    }   // end of loop
  }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x97d6
movl 0x30(%rbx), %eax
cmpl $0x44, %eax
movapd %xmm0, (%rsp)
je 0x9663
cmpl $0x43, %eax
jne 0x9699
movq %rbx, %rdi
movl $0x1, %esi
callq 0x97d6
xorpd %xmm1, %xmm1
movapd (%rsp), %xmm2
cmpneqpd %xmm1, %xmm2
cmpneqpd %xmm1, %xmm0
andpd %xmm2, %xmm0
jmp 0x9687
movq %rbx, %rdi
movl $0x1, %esi
callq 0x97d6
xorpd %xmm1, %xmm1
movapd (%rsp), %xmm2
cmpneqpd %xmm1, %xmm2
cmpneqpd %xmm1, %xmm0
orpd %xmm2, %xmm0
movd %xmm0, %eax
andb $0x1, %al
movzbl %al, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
jmp 0x962b
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./parser/parser.cpp
// Function: Parser::Term(bool)
const double Parser::Term (const bool get)    // multiply and divide
  {
  double left = Primary (get);
  while (true)
    {
    switch (type_)
      {
      case MULTIPLY:  
        left *= Primary (true); break;
      case DIVIDE: 
          {
          double d = Primary (true);
          if (d == 0.0)
            throw std::runtime_error ("Divide by zero");
          left /= d; 
          break;
          }
      default:    return left;
      } // end of switch on type
    }   // end of loop
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x907e
movl 0x30(%rbx), %eax
cmpl $0x2f, %eax
movsd %xmm0, (%rsp)
je 0x96fc
cmpl $0x2a, %eax
jne 0x9724
movq %rbx, %rdi
movl $0x1, %esi
callq 0x907e
movsd (%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd (%rsp), %xmm0
jmp 0x96c8
movq %rbx, %rdi
movl $0x1, %esi
callq 0x907e
ucomisd 0x2a90f(%rip), %xmm0    # 0x34020
jne 0x9715
jnp 0x972c
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
jmp 0x96c8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x7180
movq %rax, %rbx
leaq 0x2aa12(%rip), %rsi     # 0x34152
movq %rax, %rdi
callq 0x7140
movq 0x3e8a1(%rip), %rsi     # 0x47ff0
movq 0x3e82a(%rip), %rdx     # 0x47f80
movq %rbx, %rdi
callq 0x7660
movq %rax, %r14
movq %rbx, %rdi
callq 0x72a0
movq %r14, %rdi
callq 0x76a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./parser/parser.cpp
// Function: Parser::AddSubtract(bool)
const double Parser::AddSubtract (const bool get)  // add and subtract
  {
  double left = Term (get);
  while (true)
    {
    switch (type_)
      {
      case PLUS:  left += Term (true); break;
      case MINUS: left -= Term (true); break;
      default:    return left;
      } // end of switch on type
    }   // end of loop
  }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x96bc
movl 0x30(%rbx), %eax
cmpl $0x2d, %eax
movsd %xmm0, 0x8(%rsp)
je 0x97ab
cmpl $0x2b, %eax
jne 0x97d0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x96bc
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
jmp 0x97c2
movq %rbx, %rdi
movl $0x1, %esi
callq 0x96bc
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
jmp 0x977f
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./parser/parser.cpp
// Function: Parser::Comparison(bool)
const double Parser::Comparison (const bool get)  // LT, GT, LE, EQ etc.
  {
  double left = AddSubtract (get);
  while (true)
    {
    switch (type_)
      {
      case LT:  left = left <  AddSubtract (true) ? 1.0 : 0.0; break;
      case GT:  left = left >  AddSubtract (true) ? 1.0 : 0.0; break;
      case LE:  left = left <= AddSubtract (true) ? 1.0 : 0.0; break;
      case GE:  left = left >= AddSubtract (true) ? 1.0 : 0.0; break;
      case EQ:  left = left == AddSubtract (true) ? 1.0 : 0.0; break;
      case NE:  left = left != AddSubtract (true) ? 1.0 : 0.0; break;
           default:    return left;
      } // end of switch on type
    }   // end of loop
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x9772
leaq 0x2a887(%rip), %r14     # 0x34070
movl 0x30(%rbx), %eax
addl $-0x3c, %eax
cmpl $0x6, %eax
ja 0x98b4
movslq (%r14,%rax,4), %rax
addq %r14, %rax
movsd %xmm0, (%rsp)
jmpq *%rax
movq %rbx, %rdi
movl $0x1, %esi
callq 0x9772
ucomisd (%rsp), %xmm0
jmp 0x9878
movq %rbx, %rdi
movl $0x1, %esi
callq 0x9772
movsd (%rsp), %xmm1
cmpneqsd %xmm0, %xmm1
jmp 0x9894
movq %rbx, %rdi
movl $0x1, %esi
callq 0x9772
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jmp 0x985d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x9772
ucomisd (%rsp), %xmm0
setae %al
jmp 0x989c
movq %rbx, %rdi
movl $0x1, %esi
callq 0x9772
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
seta %al
jmp 0x989c
movq %rbx, %rdi
movl $0x1, %esi
callq 0x9772
movsd (%rsp), %xmm1
cmpeqsd %xmm0, %xmm1
movq %xmm1, %rax
andl $0x1, %eax
movsd 0x2a774(%rip), %xmm0    # 0x34018
testb %al, %al
jne 0x97e9
xorps %xmm0, %xmm0
jmp 0x97e9
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./parser/parser.cpp
// Function: Parser::Evaluate()
const double Parser::Evaluate ()  // get result
  {
  pWord_    = program_.c_str ();
  type_     = NONE;
  double v = CommaList (true);
  if (type_ != END)
    throw std::runtime_error ("Unexpected text at end of expression: " + std::string (pWordStart_));
  return v;  
  }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %r14
movq (%rdi), %rax
movq %rax, 0x20(%rdi)
movl $0x0, 0x30(%rdi)
movl $0x1, %esi
callq 0x96a0
cmpl $0x3, 0x30(%r14)
jne 0x98ef
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x7180
movq %rax, %rbx
movq 0x28(%r14), %rsi
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x9c98
leaq 0x2a85e(%rip), %rsi     # 0x34174
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x9aa3
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x75d0
xorl %ebp, %ebp
movq 0x3e6b2(%rip), %rsi     # 0x47ff0
movq 0x3e63b(%rip), %rdx     # 0x47f80
movq %rbx, %rdi
callq 0x7660
movq %rax, %r14
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x996b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x7390
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9986
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7390
testb %bpl, %bpl
jne 0x99b0
jmp 0x99b8
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99b0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x99b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x72a0
movq %r14, %rdi
callq 0x76a0
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./parser/parser.cpp
// Function: Parser::Evaluate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
const double Parser::Evaluate (const std::string & program)  // get result
  {
  program_  = program;
  this->IsOne = (program=="1");
  this->IsZero =  (program=="0");
  return Evaluate ();
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x71d0
leaq 0x2d99d(%rip), %rsi     # 0x37373
movq %rbx, %rdi
callq 0x7100
testl %eax, %eax
sete 0x60(%r14)
leaq 0x2bfb3(%rip), %rsi     # 0x3599f
movq %rbx, %rdi
callq 0x7100
testl %eax, %eax
sete 0x61(%r14)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x98bc
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./parser/parser.h
// Function: Parser::CheckToken(Parser::TokenType)
inline void CheckToken (const TokenType wanted)
    {
    if (type_ != wanted)
      {
      std::ostringstream s;
      s << "'" << static_cast <char> (wanted) << "' expected.";
      throw std::runtime_error (s.str ());    
      }
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
cmpl %esi, 0x30(%rdi)
jne 0x9b30
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r14
popq %rbp
retq
movl %esi, %ebx
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x74c0
leaq 0x2a5f7(%rip), %rsi     # 0x3413d
movl $0x1, %edx
movq %r14, %rdi
callq 0x7400
leaq 0x8(%rsp), %rsi
movb %bl, (%rsi)
leaq 0x28(%rsp), %rdi
movl $0x1, %edx
callq 0x7400
leaq 0x2a66d(%rip), %rsi     # 0x341dd
movl $0xb, %edx
movq %rax, %rdi
callq 0x7400
movl $0x10, %edi
callq 0x7180
movq %rax, %rbx
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x75a0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x75d0
xorl %ebp, %ebp
movq 0x3e43e(%rip), %rsi     # 0x47ff0
movq 0x3e3c7(%rip), %rdx     # 0x47f80
movq %rbx, %rdi
callq 0x7660
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9bdf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7390
testb %bpl, %bpl
jne 0x9be9
jmp 0x9bf6
movq %rax, %r14
movq %rbx, %rdi
callq 0x72a0
jmp 0x9bf6
movq %rax, %r14
movq 0x3e38b(%rip), %rsi     # 0x47f88
leaq 0x28(%rsp), %rdi
callq 0x71c0
leaq 0x98(%rsp), %rdi
callq 0x7120
movq %r14, %rdi
callq 0x76a0
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./newran02/extreal.cpp
// Function: ExtReal::operator+(ExtReal const&) const
ExtReal ExtReal::operator+(const ExtReal& er) const
{
   if (c==Finite && er.c==Finite) return ExtReal(value+er.value);
   if (c==Missing || er.c==Missing) return ExtReal(Missing);
   if (c==Indefinite || er.c==Indefinite) return ExtReal(Indefinite);
   if (c==PlusInfinity)
   {
      if (er.c==MinusInfinity) return ExtReal(Indefinite);
      return *this;
   }
   if (c==MinusInfinity)
   {
      if (er.c==PlusInfinity) return ExtReal(Indefinite);
      return *this;
   }
   return er;
}

// Assembly:
movl 0x8(%rdi), %edx
movl 0x8(%rsi), %ecx
movl %edx, %eax
orl %ecx, %eax
jne 0xaeb3
movsd (%rdi), %xmm0
addsd (%rsi), %xmm0
xorl %eax, %eax
retq
cmpl $0x4, %edx
sete %al
cmpl $0x4, %ecx
sete %r8b
orb %al, %r8b
je 0xaecb
movl $0x4, %eax
retq
cmpl $0x3, %edx
sete %al
cmpl $0x3, %ecx
sete %r8b
orb %al, %r8b
movl $0x3, %eax
je 0xaee3
retq
cmpl $0x2, %edx
je 0xaefc
cmpl $0x1, %edx
jne 0xaf0b
cmpl $0x2, %ecx
je 0xaf11
movsd (%rdi), %xmm0
movl $0x1, %eax
retq
cmpl $0x1, %ecx
je 0xaf11
movsd (%rdi), %xmm0
movl $0x2, %eax
retq
movsd (%rsi), %xmm0
movl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./newran02/extreal.cpp
// Function: ExtReal::operator*(ExtReal const&) const
ExtReal ExtReal::operator*(const ExtReal& er) const
{
   if (c==Finite && er.c==Finite) return ExtReal(value*er.value);
   if (c==Missing || er.c==Missing) return ExtReal(Missing);
   if (c==Indefinite || er.c==Indefinite) return ExtReal(Indefinite);
   if (c==Finite)
   {
      if (value==0.0) return ExtReal(Indefinite);
      if (value>0.0) return er;
      return (-er);
   }
   if (er.c==Finite)
   {
      if (er.value==0.0) return ExtReal(Indefinite);
      if (er.value>0.0) return *this;
      return -(*this);
   }
   if (c==PlusInfinity) return er;
   return (-er);
}

// Assembly:
movl 0x8(%rdi), %edx
movl 0x8(%rsi), %ecx
movl %edx, %eax
orl %ecx, %eax
jne 0xaf9f
movsd (%rdi), %xmm0
mulsd (%rsi), %xmm0
xorl %eax, %eax
retq
cmpl $0x4, %edx
sete %al
cmpl $0x4, %ecx
sete %r8b
orb %al, %r8b
je 0xafb7
movl $0x4, %eax
retq
cmpl $0x3, %edx
sete %al
cmpl $0x3, %ecx
sete %r8b
orb %al, %r8b
movl $0x3, %eax
jne 0xafb6
testl %edx, %edx
je 0xafe2
testl %ecx, %ecx
je 0xb010
cmpl $0x1, %edx
jne 0xaff4
movsd (%rsi), %xmm0
movl %ecx, %eax
retq
movsd (%rdi), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xaff2
jnp 0xb04e
ja 0xafdb
cmpl $0x2, %ecx
je 0xb043
cmpl $0x1, %ecx
je 0xb03d
testl %ecx, %ecx
jne 0xb049
movsd (%rsi), %xmm0
xorpd 0x29082(%rip), %xmm0    # 0x34090
jmp 0xaf9c
movsd (%rsi), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xb020
jnp 0xb04e
jbe 0xb029
movsd (%rdi), %xmm0
movl %edx, %eax
retq
cmpl $0x2, %edx
je 0xb043
cmpl $0x1, %edx
je 0xb03d
testl %edx, %edx
jne 0xb049
movsd (%rdi), %xmm0
jmp 0xb006
movl $0x2, %eax
retq
movl $0x1, %eax
retq
xorl %eax, %eax
xorps %xmm0, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./newran02/extreal.cpp
// Function: operator<<(std::ostream&, ExtReal const&)
ostream& operator<<(ostream& os, const ExtReal& er)
{
   switch (er.c)
   {
      case Finite:        os << er.value;         break;
      case PlusInfinity:  os << "plus-infinity";  break;
      case MinusInfinity: os << "minus-infinity"; break;
      case Indefinite:    os << "indefinite";     break;
      case Missing:       os << "missing";        break;
   }
   return os;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rsi), %eax
cmpq $0x4, %rax
ja 0xb0f2
leaq 0x2918b(%rip), %rcx     # 0x34228
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsd (%rsi), %xmm0
movq %rbx, %rdi
callq 0x75c0
jmp 0xb0f2
leaq 0x291a9(%rip), %rsi     # 0x34264
movl $0x7, %edx
jmp 0xb0ea
leaq 0x29181(%rip), %rsi     # 0x3424a
movl $0xe, %edx
jmp 0xb0ea
leaq 0x29182(%rip), %rsi     # 0x34259
movl $0xa, %edx
jmp 0xb0ea
leaq 0x29157(%rip), %rsi     # 0x3423c
movl $0xd, %edx
movq %rbx, %rdi
callq 0x7400
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./newran02/myexcept.cpp
// Function: Exception::Exception(char const*)
Exception::Exception(const char* a_what)
{
   Select++; SoFar = 0;
   if (!what_error)                   // make space for exception message
   {
      LastOne = 511;
      what_error = new char[512];
      if (!what_error)                // fail to make space
      {
         LastOne = 0;
         what_error = (char *)"No heap space for exception message\n";
      }
   }
   AddMessage("\n\nAn exception has been thrown\n");
   AddMessage(a_what);
   if (a_what) Tracer::AddTrace();
}

// Assembly:
pushq %rbx
incq 0x3ce98(%rip)           # 0x48468
movq %rsi, %rbx
movl $0x0, 0x3ce9b(%rip)     # 0x48478
cmpq $0x0, 0x3ce8b(%rip)     # 0x48470
jne 0xb602
movl $0x1ff, 0x3ce8b(%rip)   # imm = 0x1FF
movl $0x200, %edi            # imm = 0x200
callq 0x7030
movq %rax, 0x3ce6e(%rip)     # 0x48470
leaq 0x28cba(%rip), %rdi     # 0x342c3
callq 0xb624
movq %rbx, %rdi
callq 0xb624
testq %rbx, %rbx
je 0xb621
popq %rbx
jmp 0xb6a2
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./newran02/myexcept.cpp
// Function: Exception::AddMessage(char const*)
void Exception::AddMessage(const char* a_what)
{
   if (a_what)
   {
      int l = strlen(a_what); int r = LastOne - SoFar;
      if (l < r) { strcpy(what_error+SoFar, a_what); SoFar += l; }
      else if (r > 0)
      {
         strncpy(what_error+SoFar, a_what, r);
         what_error[LastOne] = 0;
         SoFar = LastOne;
      }
   }
}

// Assembly:
testq %rdi, %rdi
je 0xb6a0
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x7170
movq %rax, %r14
movl 0x3ce3e(%rip), %eax     # 0x4847c
movslq 0x3ce33(%rip), %rdi     # 0x48478
subl %edi, %eax
cmpl %r14d, %eax
jle 0xb664
addq 0x3ce1d(%rip), %rdi     # 0x48470
movq %rbx, %rsi
callq 0x7330
addl 0x3ce16(%rip), %r14d    # 0x48478
jmp 0xb692
testl %eax, %eax
jle 0xb699
addq 0x3ce01(%rip), %rdi     # 0x48470
movl %eax, %edx
movq %rbx, %rsi
callq 0x71a0
movq 0x3cdf0(%rip), %rax     # 0x48470
movslq 0x3cdf5(%rip), %rcx     # 0x4847c
movb $0x0, (%rax,%rcx)
movl 0x3cdea(%rip), %r14d    # 0x4847c
movl %r14d, 0x3cddf(%rip)    # 0x48478
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./newran02/myexcept.cpp
// Function: Tracer::AddTrace()
void Tracer::AddTrace()
{
   if (last)
   {
      Exception::AddMessage("Trace: ");
      Exception::AddMessage(last->entry);
      for (Tracer* et = last->previous; et; et=et->previous)
      {
         Exception::AddMessage("; ");
         Exception::AddMessage(et->entry);
      }
      Exception::AddMessage(".\n");
   }
}

// Assembly:
cmpq $0x0, 0x3cdd6(%rip)     # 0x48480
je 0xb70e
pushq %r14
pushq %rbx
pushq %rax
leaq 0x28c35(%rip), %rdi     # 0x342ec
callq 0xb624
movq 0x3cdbd(%rip), %rax     # 0x48480
movq (%rax), %rdi
callq 0xb624
movq 0x3cdae(%rip), %rax     # 0x48480
movq 0x8(%rax), %r14
testq %r14, %r14
je 0xb6fb
leaq 0x28c12(%rip), %rbx     # 0x342f4
movq %rbx, %rdi
callq 0xb624
movq (%r14), %rdi
callq 0xb624
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0xb6e2
leaq 0x294dc(%rip), %rdi     # 0x34bde
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb624
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./newran02/myexcept.cpp
// Function: Exception::AddInt(int)
void Exception::AddInt(int value)
{
   bool negative;
   if (value == 0) { AddMessage("0"); return; }
   else if (value < 0) { value = -value; negative = true; }
   else negative = false;
   int n = 0; int v = value;        // how many digits will we need?
   while (v > 0) { v /= 10; n++; }
   if (negative) n++;
   if (LastOne-SoFar < n) { AddMessage("***"); return; }

   SoFar += n; n = SoFar; what_error[n] = 0;
   while (value > 0)
   {
      int nv = value / 10; int rm = value - nv * 10;  value = nv;
      what_error[--n] = (char)(rm + '0');
   }
   if (negative) what_error[--n] = '-';
   return;
}

// Assembly:
testl %edi, %edi
je 0xb75a
movl %edi, %eax
negl %eax
cmovsl %edi, %eax
movl %edi, %ecx
shrl $0x1f, %ecx
movl $0xcccccccd, %edx       # imm = 0xCCCCCCCD
movl %eax, %esi
incl %ecx
movl %esi, %r8d
imulq %rdx, %r8
shrq $0x23, %r8
cmpl $0x9, %esi
movl %r8d, %esi
ja 0xb727
movl 0x3cd3a(%rip), %esi     # 0x4847c
movl 0x3cd30(%rip), %edx     # 0x48478
subl %edx, %esi
cmpl %ecx, %esi
jge 0xb766
leaq 0x28b8e(%rip), %rdi     # 0x342e3
jmp 0xb624
leaq 0x2a23e(%rip), %rdi     # 0x3599f
jmp 0xb624
addl %ecx, %edx
movl %edx, 0x3cd0a(%rip)     # 0x48478
movq 0x3ccfb(%rip), %rcx     # 0x48470
movslq %edx, %rdx
movb $0x0, (%rcx,%rdx)
movq %rdx, %rcx
shlq $0x20, %rcx
decq %rdx
movl $0xcccccccd, %esi       # imm = 0xCCCCCCCD
movabsq $-0x100000000, %r8      # imm = 0xFFFFFFFF00000000
addq %r8, %rcx
movl %eax, %r9d
imulq %rsi, %r9
shrq $0x23, %r9
imull $0xf6, %r9d, %r10d
addl %eax, %r10d
addb $0x30, %r10b
movq 0x3ccb8(%rip), %r11     # 0x48470
movb %r10b, (%r11,%rdx)
decq %rdx
cmpl $0x9, %eax
movl %r9d, %eax
ja 0xb795
testl %edi, %edi
js 0xb7cc
retq
movq 0x3cc9d(%rip), %rax     # 0x48470
sarq $0x20, %rcx
movb $0x2d, -0x1(%rax,%rcx)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./newran02/newran.cpp
// Function: Random::Raw()
Real Random::Raw()                           // get new uniform random number
{
   // m = 2147483647 = 2^31 - 1; a = 16807;
   // 127773 = m div a; 2836 = m mod a
   long iseed = (long)seed;
   long hi = iseed / 127773L;                 // integer division
   long lo = iseed - hi * 127773L;            // modulo
   iseed = 16807 * lo - 2836 * hi;
   if (iseed <= 0) iseed += 2147483647L;
   seed = (double)iseed; return seed*4.656612875e-10;
}

// Assembly:
cvttsd2si 0x3c9db(%rip), %rcx # 0x484d8
movabsq $0x41a705af1fe3fb79, %rdx # imm = 0x41A705AF1FE3FB79
movq %rcx, %rax
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0xf, %rdx
addq %rax, %rdx
imulq $-0x1f31d, %rdx, %rax   # imm = 0xFFFE0CE3
addq %rcx, %rax
imulq $0x41a7, %rax, %rax     # imm = 0x41A7
imulq $-0xb14, %rdx, %rcx     # imm = 0xF4EC
leaq (%rax,%rcx), %rdx
testq %rdx, %rdx
leaq 0x7fffffff(%rax,%rcx), %rax
cmovgq %rdx, %rax
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x3c985(%rip)    # 0x484d8
mulsd 0x2885d(%rip), %xmm0    # 0x343b8
retq
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./newran02/newran.cpp
// Function: Random::Next()
Real Random::Next()                          // get new mixed random number
{
   if (!seed)
      Throw(Logic_error("Random number generator not initialised"));
   int i = (int)(Raw()*128);               // 0 <= i < 128
#ifdef _MSC_VER
   DoNothing(i); DoNothing(i);
#endif
   Real f = Buffer[i]; Buffer[i] = Raw();  // Microsoft release gets this wrong
   return f;

   // return Mother(&iseed);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movsd 0x3c92c(%rip), %xmm0    # 0x484d8
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xbbbc
jnp 0xbc97
cvttsd2si %xmm0, %rcx
movabsq $0x41a705af1fe3fb79, %rdi # imm = 0x41A705AF1FE3FB79
movq %rcx, %rax
imulq %rdi
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0xf, %rdx
addq %rax, %rdx
imulq $-0x1f31d, %rdx, %rax   # imm = 0xFFFE0CE3
addq %rcx, %rax
imulq $0x41a7, %rax, %rax     # imm = 0x41A7
imulq $-0xb14, %rdx, %rcx     # imm = 0xF4EC
addq %rax, %rcx
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
leaq (%rcx,%rsi), %rax
testq %rcx, %rcx
cmovgq %rcx, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
cvttsd2si %xmm0, %rcx
movsd 0x28799(%rip), %xmm1    # 0x343b8
mulsd %xmm1, %xmm0
mulsd 0x28795(%rip), %xmm0    # 0x343c0
cvttsd2si %xmm0, %eax
movslq %eax, %r8
leaq 0x3c8a7(%rip), %r9      # 0x484e0
movsd (%r9,%r8,8), %xmm0
movq %rcx, %rax
imulq %rdi
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0xf, %rdx
addq %rax, %rdx
imulq $-0x1f31d, %rdx, %rax   # imm = 0xFFFE0CE3
addq %rcx, %rax
imulq $0x41a7, %rax, %rax     # imm = 0x41A7
imulq $-0xb14, %rdx, %rcx     # imm = 0xF4EC
addq %rax, %rcx
addq %rcx, %rsi
testq %rcx, %rcx
cmovgq %rcx, %rsi
cvtsi2sd %rsi, %xmm2
movsd %xmm2, 0x3c853(%rip)    # 0x484d8
mulsd %xmm1, %xmm2
movsd %xmm2, (%r9,%r8,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x1, %edi
callq 0x7180
movq %rax, %rbx
leaq 0x28aca(%rip), %rsi     # 0x34775
movq %rax, %rdi
callq 0xb8ea
leaq 0x3acfe(%rip), %rsi     # 0x469b8
movq %rbx, %rdi
xorl %edx, %edx
callq 0x7660
movq %rax, %r14
movq %rbx, %rdi
callq 0x72a0
movq %r14, %rdi
callq 0x76a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/melop[P]admixem/./newran02/newran.cpp
// Function: Random::Set(double)
void Random::Set(double s)            // set random number seed
                                      // s must be between 0 and 1
{
   if (s>=1.0 || s<=0.0)
      Throw(Logic_error("Newran: seed out of range"));
   //iseed = 2147483648L * s;         // for Mother
   seed = (long)(s*2147483648L);
   for (int i = 0; i<128; i++) Buffer[i] = Raw();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
ucomisd 0x28322(%rip), %xmm0    # 0x34018
jae 0xbdb9
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0xbdb9
mulsd 0x286b6(%rip), %xmm0    # 0x343c8
cvttsd2si %xmm0, %rax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
movsd %xmm1, 0x3c7b1(%rip)    # 0x484d8
xorl %esi, %esi
movabsq $0x41a705af1fe3fb79, %rdi # imm = 0x41A705AF1FE3FB79
movsd 0x2867d(%rip), %xmm0    # 0x343b8
leaq 0x3c79e(%rip), %r8      # 0x484e0
cvttsd2si %xmm1, %rcx
movq %rcx, %rax
imulq %rdi
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0xf, %rdx
addq %rax, %rdx
imulq $-0x1f31d, %rdx, %rax   # imm = 0xFFFE0CE3
addq %rcx, %rax
imulq $0x41a7, %rax, %rax     # imm = 0x41A7
imulq $-0xb14, %rdx, %rcx     # imm = 0xF4EC
leaq (%rax,%rcx), %rdx
testq %rdx, %rdx
leaq 0x7fffffff(%rax,%rcx), %rax
cmovgq %rdx, %rax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
movapd %xmm1, %xmm2
mulsd %xmm0, %xmm2
movsd %xmm2, (%rsi,%r8)
addq $0x8, %rsi
cmpq $0x400, %rsi            # imm = 0x400
jne 0xbd42
movsd %xmm1, 0x3c727(%rip)    # 0x484d8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x1, %edi
callq 0x7180
movq %rax, %rbx
leaq 0x289d0(%rip), %rsi     # 0x3479d
movq %rax, %rdi
callq 0xb8ea
leaq 0x3abdc(%rip), %rsi     # 0x469b8
movq %rbx, %rdi
xorl %edx, %edx
callq 0x7660
movq %rax, %r14
movq %rbx, %rdi
callq 0x72a0
movq %r14, %rdi
callq 0x76a0
nop