LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Thilotilo[P]DoaERando/NPCManipulator.cpp
// Function: DoaERando::NPCManipulator::ReplacePangTong(unsigned char)
void NPCManipulator::ReplacePangTong(BYTE generalId)
{
    // Set the flags for the new general after the "Pang Tong went out
    // with his soldiers" Text
    myRom.WriteByte(0x36EAF, generalId);
    // Read the new general's recruitment flags, which are used to determine
    // whether to launch the battle.
    myRom.WriteByte(0x3B3C5, generalId);
    // Actual replacement for who joined our army after the battle
    myRom.WriteByte(0x36ECC, generalId);
    // Text replace for Pang Tong went out with his soldiers
    myRom.WriteByte(0x2EA09, generalId);
    // Text replace for Pang Tong joined our army
    myRom.WriteByte(0x2EA62, generalId);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rdi
movl $0x36eaf, %esi          # imm = 0x36EAF
movl %ebx, %edx
callq 0x404a28
movq (%r14), %rdi
movl $0x3b3c5, %esi          # imm = 0x3B3C5
movl %ebx, %edx
callq 0x404a28
movq (%r14), %rdi
movl $0x36ecc, %esi          # imm = 0x36ECC
movl %ebx, %edx
callq 0x404a28
movq (%r14), %rdi
movl $0x2ea09, %esi          # imm = 0x2EA09
movl %ebx, %edx
callq 0x404a28
movq (%r14), %rdi
movl $0x2ea62, %esi          # imm = 0x2EA62
movl %ebx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x404a28
nop
// File: /workspace/github_cpp_makefile_star2_O1/Thilotilo[P]DoaERando/NPCManipulator.cpp
// Function: DoaERando::NPCManipulator::ReplaceZhugeLiang(unsigned char)
void NPCManipulator::ReplaceZhugeLiang(BYTE generalId)
{
    // Replace 2 versions of Zhuge Liang in his house.
    // This is the lying down version
    myRom.WriteByte(0x312C5, generalId);
    // This is the standing up version
    myRom.WriteByte(0x312D3, generalId);
    // Replace Zhuge Liang in Gui Yang
    myRom.WriteByte(0x31343, generalId);
    // Text replace for "X is sleeping"
    myRom.WriteByte(0x2B9B2, generalId);
    // Text replace for "My brother X is not home"
    myRom.WriteByte(0x2B8F7, generalId);
    // Text replace for "X has joined them!"
    myRom.WriteByte(0x2BAE5, generalId);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rdi
movl $0x312c5, %esi          # imm = 0x312C5
movl %ebx, %edx
callq 0x404a28
movq (%r14), %rdi
movl $0x312d3, %esi          # imm = 0x312D3
movl %ebx, %edx
callq 0x404a28
movq (%r14), %rdi
movl $0x31343, %esi          # imm = 0x31343
movl %ebx, %edx
callq 0x404a28
movq (%r14), %rdi
movl $0x2b9b2, %esi          # imm = 0x2B9B2
movl %ebx, %edx
callq 0x404a28
movq (%r14), %rdi
movl $0x2b8f7, %esi          # imm = 0x2B8F7
movl %ebx, %edx
callq 0x404a28
movq (%r14), %rdi
movl $0x2bae5, %esi          # imm = 0x2BAE5
movl %ebx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x404a28
// File: /workspace/github_cpp_makefile_star2_O1/Thilotilo[P]DoaERando/NPCManipulator.cpp
// Function: DoaERando::NPCManipulator::ReplaceXuZheBridgeTrigger(unsigned char)
void NPCManipulator::ReplaceXuZheBridgeTrigger(BYTE generalId)
{
    // Replace the general that the bridge lady looks for
    myRom.WriteByte(0x3684F, generalId);

    // Xu Zhe, my love, where are you?
    myRom.WriteByte(0x2AF53, generalId); // Replace Id
    myRom.WriteByte(0x2AF55, 0xE0); // newline in case of long name

    // Xu Zhe!  Oh, I'm blocking the bridge...
    myRom.WriteByte(0x2AF65, generalId); // Replace ID
    // Adjust text to protect against long names.
    myRom.WriteByte(0x2AF67, 0xFB);
    myRom.WriteByte(0x2AF68, 0x18);
    myRom.WriteByte(0x2AF69, 0x0A);
    myRom.WriteByte(0x2AF6A, 0x30);
    myRom.WriteByte(0x2AF6B, 0x3C);
    myRom.WriteByte(0x2AF6C, 0x8E);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movq (%rdi), %rdi
movl $0x3684f, %esi          # imm = 0x3684F
movl %r14d, %edx
callq 0x404a28
movq (%rbx), %rdi
movl $0x2af53, %esi          # imm = 0x2AF53
movl %r14d, %edx
callq 0x404a28
movq (%rbx), %rdi
movl $0x2af55, %esi          # imm = 0x2AF55
movl $0xe0, %edx
callq 0x404a28
movq (%rbx), %rdi
movl $0x2af65, %esi          # imm = 0x2AF65
movl %r14d, %edx
callq 0x404a28
movq (%rbx), %rdi
movl $0x2af67, %esi          # imm = 0x2AF67
movl $0xfb, %edx
callq 0x404a28
movq (%rbx), %rdi
movl $0x2af68, %esi          # imm = 0x2AF68
movl $0x18, %edx
callq 0x404a28
movq (%rbx), %rdi
movl $0x2af69, %esi          # imm = 0x2AF69
movl $0xa, %edx
callq 0x404a28
movq (%rbx), %rdi
movl $0x2af6a, %esi          # imm = 0x2AF6A
movl $0x30, %edx
callq 0x404a28
movq (%rbx), %rdi
movl $0x2af6b, %esi          # imm = 0x2AF6B
movl $0x3c, %edx
callq 0x404a28
movq (%rbx), %rdi
movl $0x2af6c, %esi          # imm = 0x2AF6C
movl $0x8e, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x404a28
nop
// File: /workspace/github_cpp_makefile_star2_O1/Thilotilo[P]DoaERando/NPCManipulator.cpp
// Function: DoaERando::NPCManipulator::ReplaceMaYuanyi(unsigned char)
void NPCManipulator::ReplaceMaYuanyi(BYTE generalId)
{
    // Replace the actual NPC
    myRom.WriteByte(0x31A73, generalId);
    // This requires a bit of explanation.  There are 2 bits that can tell the NPC to
    // use text 2 instead of text 1.  One of those bits is set when the yellow scarves
    // are defeated, the other is set when Ma Yuanyi is defeated.  It doesn't matter
    // if one or both are set - as long as both aren't clear, we will move to text 2.
    // EXCEPT we can actually move one id past text 2 if both bits are set AND bit 6 of
    // the YZone is set.  Thus, we swizzle this a bit so that both of Ma Yuanyi's texts
    // are the battle text (the textId + 1 is the text we get on future interactions), and
    // then set both bits when the battle is complete.  This way, we can't lock the battle
    // out when we clear the yellow scarves.  (Note that this will go ahead and change the
    // other NPCs in Qing Zhou texts, but those aren't really relevant any more anyway)
    myRom.WriteByte(0x31A6E, 0xCB); // Set bit 6 of YZone
    myRom.WriteByte(0x31A72, 0xAB); // Set text 2 to the battle text
    myRom.WriteByte(0x3B076, 0x83); // Set bit 7 & bit 0 of the location flags
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %esi, %edx
movq %rdi, %rbx
movq (%rdi), %rdi
movl $0x31a73, %esi          # imm = 0x31A73
callq 0x404a28
movq (%rbx), %rdi
movl $0x31a6e, %esi          # imm = 0x31A6E
movl $0xcb, %edx
callq 0x404a28
movq (%rbx), %rdi
movl $0x31a72, %esi          # imm = 0x31A72
movl $0xab, %edx
callq 0x404a28
movq (%rbx), %rdi
movl $0x3b076, %esi          # imm = 0x3B076
movl $0x83, %edx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x404a28
// File: /workspace/github_cpp_makefile_star2_O1/Thilotilo[P]DoaERando/NPCManipulator.cpp
// Function: DoaERando::NPCManipulator::ReplaceYuanShang(unsigned char)
void NPCManipulator::ReplaceYuanShang(BYTE generalId)
{
    // Replace the actual NPC
    myRom.WriteByte(0x317C3, generalId);
    myRom.WriteByte(0x3695A, generalId);
    // Set the correct general's flags to 0x90 (recruitable & encounterable)
    // rather than setting Yuan Shang's flags to 00 after defeating the
    // Yuan Shang battle.
    myRom.WriteByte(0x3693A, 0x90);
    myRom.WriteByte(0x3693C, generalId);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rdi
movl $0x317c3, %esi          # imm = 0x317C3
movl %ebx, %edx
callq 0x404a28
movq (%r14), %rdi
movl $0x3695a, %esi          # imm = 0x3695A
movl %ebx, %edx
callq 0x404a28
movq (%r14), %rdi
movl $0x3693a, %esi          # imm = 0x3693A
movl $0x90, %edx
callq 0x404a28
movq (%r14), %rdi
movl $0x3693c, %esi          # imm = 0x3693C
movl %ebx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x404a28
nop
// File: /workspace/github_cpp_makefile_star2_O1/saumya-prakash[P]AssemblerEmulator/Assembler.cpp
// Function: Assembler::str_to_int(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) const
int Assembler::str_to_int(string &num) const
{
    istringstream iss(num);

    int a = 0;

    string::iterator it=num.begin();
    
    if(*it=='+' || *it=='-')
        ++it;
    

    if(*it=='0')    // oct or hex
    {
        ++it;

        if(it==num.end())
            return 0;

        if(*it=='x' || *it=='X')
            iss>>hex>>a;
            

        else
            iss>>oct>>a;
        
    }

    else        // normal decimal
        iss>>a;


    iss>>dec;
    return a;
}

// Assembly:
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rsi, %rbx
leaq 0x10(%rsp), %rdi
movl $0x8, %edx
callq 0x22d0
movl $0x0, 0xc(%rsp)
movq (%rbx), %rax
movzbl (%rax), %edx
cmpl $0x2d, %edx
je 0x36d3
movq %rax, %rcx
cmpl $0x2b, %edx
jne 0x36d7
leaq 0x1(%rax), %rcx
cmpb $0x30, (%rcx)
jne 0x3711
incq %rcx
addq 0x8(%rbx), %rax
cmpq %rax, %rcx
je 0x3764
movb (%rcx), %al
addb $-0x58, %al
testb $-0x21, %al
movl $0x8, %eax
movl $0x40, %ecx
cmovel %eax, %ecx
movq 0x10(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x28(%rsp,%rax), %edx
andl $-0x4b, %edx
orl %ecx, %edx
movl %edx, 0x28(%rsp,%rax)
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x2100
movq 0x10(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x28(%rsp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x28(%rsp,%rax)
movl 0xc(%rsp), %ebx
movq 0xa88e(%rip), %rsi      # 0xdfd0
leaq 0x10(%rsp), %rdi
callq 0x2270
leaq 0x88(%rsp), %rdi
callq 0x20b0
movl %ebx, %eax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
retq
xorl %ebx, %ebx
jmp 0x373b
movq %rax, %rbx
movq 0xa85e(%rip), %rsi      # 0xdfd0
leaq 0x10(%rsp), %rdi
callq 0x2270
leaq 0x88(%rsp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/saumya-prakash[P]AssemblerEmulator/Assembler.cpp
// Function: Assembler::assemble()
void Assembler::assemble()
{   
    if(assembled==true)
        return;

    lines.clear();
    aux_lines.clear();
    errors.clear();
    warnings.clear();
    reset_pc();
    reset_data_addr();
    reset_line_cnt();

    first_pass();

    second_pass();

    generate_warnings();
    
    if(errors.empty())
    {
        generate_object_file();
        assembled = true;
    }

    if(!warnings.empty())
        warn = true;

    return ;
}

// Assembly:
cmpb $0x0, 0x128(%rdi)
jne 0x3859
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x60(%rdi), %r14
movq %r14, %rdi
callq 0x3346
movq %r14, 0x68(%rbx)
movq %r14, 0x60(%rbx)
xorl %r15d, %r15d
movq %r15, 0x70(%rbx)
leaq 0x78(%rbx), %r14
movq %r14, %rdi
callq 0x3346
movq %r14, 0x80(%rbx)
movq %r14, 0x78(%rbx)
movq %r15, 0x88(%rbx)
leaq 0xc8(%rbx), %rdi
callq 0x89e0
leaq 0xf8(%rbx), %rdi
callq 0x8a0e
movabsq $0x40000000000, %rax    # imm = 0x40000000000
movq %rax, 0x90(%rbx)
movl $0x0, 0x98(%rbx)
movq %rbx, %rdi
callq 0x385a
movq %rbx, %rdi
callq 0x39b4
movq %rbx, %rdi
callq 0x3cbc
cmpq %r15, 0xf0(%rbx)
jne 0x3843
movq %rbx, %rdi
callq 0x3e08
movb $0x1, 0x128(%rbx)
cmpq $0x0, 0x120(%rbx)
je 0x3854
movb $0x1, 0x129(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/saumya-prakash[P]AssemblerEmulator/Assembler.cpp
// Function: Assembler::first_pass()
void Assembler::first_pass()
{
    string s;

    while(getline(src, s))
    {
        ++line_cnt;

        string::iterator it = s.begin();

        while(it!=s.end() && *it <= 32)     // remove leading whitespace
            ++it;
        
        string::iterator jt=it;

        while(jt!=s.end() && *jt!=';')      // remove comment part
            ++jt;

                                // removing trailing spaces -> NO NEED
        string tmp(it, jt);

        if(tmp.size()>0)    // put the non-empty line in the list
        {
            analyze(tmp);
        }

    }

    return ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x18(%rsp), %rbp
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %r15
movq 0xa0(%rbx), %r12
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x2300
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x394d
incl 0x98(%rbx)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rcx
leaq (%rsi,%rcx), %rax
testq %rcx, %rcx
je 0x38f5
cmpb $0x20, (%rsi)
jg 0x38f5
incq %rsi
decq %rcx
jne 0x38e5
movq %rax, %rsi
movq %rsi, %rdx
cmpq %rax, %rsi
je 0x390d
movq %rsi, %rdx
cmpb $0x3b, (%rdx)
je 0x390d
incq %rdx
cmpq %rax, %rdx
jne 0x3900
movq %rbp, 0x8(%rsp)
movq %r15, %rdi
callq 0x8a3c
cmpq $0x0, 0x10(%rsp)
je 0x392d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4076
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3890
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0x3890
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x3964
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21c0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3994
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0x3994
jmp 0x3991
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x39ab
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/saumya-prakash[P]AssemblerEmulator/Assembler.cpp
// Function: Assembler::insert_into_symtab(label&)
void Assembler::insert_into_symtab(struct label& l)
{
    if(symtab.find(l.name)!=symtab.end())
    {
        errors.insert({line_cnt, Error(7)});
    }

    else
    {
        symtab[l.name] = l;
    }
    
    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r15
callq 0x8f7e
leaq 0x8(%r15), %rcx
cmpq %rcx, %rax
je 0x6423
leaq 0xc8(%r15), %r14
leaq 0x2c(%rsp), %rsi
movl $0x7, (%rsi)
leaq 0x7e20(%rip), %rdi      # 0xe1f0
callq 0x839a
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x32b6
movl 0x98(%r15), %eax
leaq 0x48(%rsp), %r15
movl %eax, -0x18(%r15)
movq %r15, -0x10(%r15)
movq (%r12), %rax
cmpq %rbx, %rax
je 0x644d
movq %rax, 0x38(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x48(%rsp)
jmp 0x6454
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8184
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x20f0
movl 0x28(%rbx), %eax
movl %eax, 0x28(%r14)
movq 0x20(%rbx), %rax
movq %rax, 0x20(%r14)
jmp 0x64ab
movups (%rbx), %xmm0
movups %xmm0, (%r15)
movq 0x10(%rsp), %rax
leaq 0x30(%rsp), %rsi
movq %rax, 0x10(%rsi)
movq %rbx, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq %r14, %rdi
callq 0x8ab0
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x6494
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x64ab
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x64d1
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21c0
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x2359
movq %r14, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O1/saumya-prakash[P]AssemblerEmulator/Assembler.cpp
// Function: Assembler::encode_zeroth(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int const&, unsigned int const&)
unsigned Assembler::encode_zeroth(const string& s, const unsigned& opcode, const unsigned& line_no)
{
    istringstream iss(s);
    string t;

    iss>>t;     // 'dump' mnemonic

    string more;
    iss>>more;

    if(!more.empty())   // more operands than required
    {
        errors.insert({line_no, Error(6)});
        return 0xffffffff;
    }

    return opcode;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x90(%rsp), %r12
movq %r12, %rdi
movl $0x8, %edx
callq 0x22d0
leaq 0x80(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x70(%rsp), %rsi
movq %r12, %rdi
callq 0x2230
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x90(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x2230
cmpq $0x0, 0x30(%rsp)
je 0x65cf
leaq 0x24(%rsp), %rsi
movl $0x6, (%rsi)
leaq 0x7c72(%rip), %rdi      # 0xe1f0
callq 0x839a
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x32b6
addq $0xc8, %rbx
movl (%r14), %eax
leaq 0x60(%rsp), %r14
movl %eax, -0x18(%r14)
movq %r14, -0x10(%r14)
movq (%rsp), %rax
cmpq %r15, %rax
je 0x65d4
movq %rax, 0x50(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x65dc
movl (%r15), %ebx
jmp 0x6636
movups (%r15), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rsp), %rax
leaq 0x48(%rsp), %rsi
movq %rax, 0x10(%rsi)
movq %r15, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %rbx, %rdi
callq 0x8ab0
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x661b
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x21c0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x6631
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21c0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x664d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x6667
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x7962(%rip), %rsi      # 0xdfd0
leaq 0x90(%rsp), %rdi
callq 0x2270
leaq 0x108(%rsp), %rdi
callq 0x20b0
movl %ebx, %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x66b5
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x21c0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x66d7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0x66d7
jmp 0x66d4
movq %rax, %rbx
jmp 0x66ee
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x66ee
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x6708
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x78c1(%rip), %rsi      # 0xdfd0
leaq 0x90(%rsp), %rdi
callq 0x2270
leaq 0x108(%rsp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/saumya-prakash[P]AssemblerEmulator/Assembler.cpp
// Function: Assembler::print_bytes(std::ostream&, unsigned int) const
void Assembler::print_bytes(ostream& os, unsigned a) const
{
    char *ptr = (char *) &a;

    if(machine_type==lil_endian)     // reverse bytes
    {
        ptr += 3;

        os.write(ptr, 1);

        ptr--;
        os.write(ptr, 1);

        ptr--;
        os.write(ptr, 1);

        ptr--;
        os.write(ptr, 1);    
    }

    else        // no need to reverse bytes
    {
        os.write(ptr, 1);

        ptr++;
        os.write(ptr, 1);

        ptr++;
        os.write(ptr, 1);

        ptr++;
        os.write(ptr, 1);
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edx, 0xc(%rsp)
cmpl $0x0, 0x680b(%rip)      # 0xe250
je 0x7a84
leaq 0xc(%rsp), %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2250
leaq 0xd(%rsp), %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2250
leaq 0xe(%rsp), %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2250
leaq 0xf(%rsp), %rsi
jmp 0x7abf
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2250
leaq 0xe(%rsp), %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2250
leaq 0xd(%rsp), %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2250
leaq 0xc(%rsp), %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2250
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/saumya-prakash[P]AssemblerEmulator/Assembler.cpp
// Function: Assembler::print_errors(std::ostream&) const
void Assembler::print_errors(ostream &os) const
{
    for(map<unsigned, class Error>::const_iterator it=errors.begin(); it!=errors.end(); ++it)
    {
        unsigned line_no = it->first;

        class Error tmp = it->second;

        os<<"Line "<<line_no<<": "<<tmp.message<<endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq 0xe0(%rdi), %r15
addq $0xd0, %r14
cmpq %r14, %r15
je 0x7d40
movq %rsi, %rbx
leaq 0x18(%rsp), %r13
leaq 0x23df(%rip), %rbp      # 0xa068
movl 0x20(%r15), %r12d
movq %r13, 0x8(%rsp)
movq 0x28(%r15), %rsi
movq 0x30(%r15), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x32b6
movl $0x5, %edx
movq %rbx, %rdi
leaq 0x2539(%rip), %rsi      # 0xa1ef
callq 0x2200
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2120
movq %rax, %r12
movl $0x2, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2200
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r12, %rdi
callq 0x2200
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x7d2c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movq %r15, %rdi
callq 0x2210
movq %rax, %r15
cmpq %r14, %rax
jne 0x7c89
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x7d69
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/saumya-prakash[P]AssemblerEmulator/Assembler.cpp
// Function: Assembler::print_symtab(std::ostream&) const
void Assembler::print_symtab(ostream& os) const
{
    for(map<string, struct label>::const_iterator it=symtab.begin(); it!=symtab.end(); ++it)
    {
        string name = it->first;
        struct label l = it->second;

        os<<name<<'\t'<<l.addr<<endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r14
movq 0x18(%rdi), %r15
addq $0x8, %r14
cmpq %r14, %r15
je 0x7e85
movq %rsi, %rbx
leaq 0x18(%rsp), %r13
leaq 0x38(%rsp), %rbp
movq %r13, 0x8(%rsp)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x32b6
movq %rbp, 0x28(%rsp)
movq 0x40(%r15), %rsi
movq 0x48(%r15), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x32b6
movl 0x68(%r15), %eax
movl %eax, 0x18(%rbp)
movq 0x60(%r15), %rax
movq %rax, 0x10(%rbp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x2200
movb $0x9, 0x7(%rsp)
movl $0x1, %edx
movq %rax, %rdi
leaq 0x7(%rsp), %rsi
callq 0x2200
movl 0x48(%rsp), %esi
movq %rax, %rdi
callq 0x2120
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x7e5a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x7e71
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movq %r15, %rdi
callq 0x2210
movq %rax, %r15
cmpq %r14, %rax
jne 0x7da1
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x7eb3
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x7eb3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x7eca
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O1/saumya-prakash[P]AssemblerEmulator/Assembler.cpp
// Function: Assembler::print_warnings(std::ostream&) const
void Assembler::print_warnings(ostream& os) const
{
    for(map<unsigned, class Warning>::const_iterator it=warnings.begin(); it!=warnings.end(); ++it)
    {
        unsigned a = it->first;
        class Warning b = it->second;

        os<<"Line "<<a<<": "<<b.message<<endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq 0x110(%rdi), %r15
addq $0x100, %r14            # imm = 0x100
cmpq %r14, %r15
je 0x7fc0
movq %rsi, %rbx
leaq 0x18(%rsp), %r13
leaq 0x215f(%rip), %rbp      # 0xa068
movl 0x20(%r15), %r12d
movq %r13, 0x8(%rsp)
movq 0x28(%r15), %rsi
movq 0x30(%r15), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x32b6
movl $0x5, %edx
movq %rbx, %rdi
leaq 0x22b9(%rip), %rsi      # 0xa1ef
callq 0x2200
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2120
movq %rax, %r12
movl $0x2, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2200
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r12, %rdi
callq 0x2200
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x7fac
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movq %r15, %rdi
callq 0x2210
movq %rax, %r15
cmpq %r14, %rax
jne 0x7f09
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x7fe9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/saumya-prakash[P]AssemblerEmulator/./Assembler.h
// Function: label::validate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string validate(const string &s)    // checks for valid label name
        {
            if(isalpha(s[0])==0)    // first character should be an alphabet
                return string();
                
            for(string::const_iterator it=s.begin(); it!=s.end(); ++it)     // should consist of only alpha-numerics
                if(*it<=32 || isalnum(*it)==0)
                    return string();

            return s;
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rdi, %rbx
movq (%rdx), %r14
movsbl (%r14), %edi
callq 0x22b0
testl %eax, %eax
je 0x837b
movq 0x8(%r15), %r15
testq %r15, %r15
sete %bpl
je 0x8361
movb (%r14), %al
cmpb $0x21, %al
jl 0x8348
movl $0x1, %r12d
movzbl %al, %edi
callq 0x21d0
testl %eax, %eax
je 0x8348
cmpq %r12, %r15
sete %bpl
je 0x8361
movb (%r14,%r12), %al
incq %r12
cmpb $0x21, %al
jge 0x8328
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
testb $0x1, %bpl
je 0x838e
addq %r14, %r15
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x32b6
jmp 0x838e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/hollanderic[P]dp832/dp832.cpp
// Function: dp830::write_(char const*)
int dp830::write_(const char *command) {
    assert(fhandle_);
    int len = strlen(command);
    fhandle_.write(command,len);
    //printf("write: -->%s<--\n",command);
    fhandle_.flush();
    return len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rdi,%rax)
jne 0x2557
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x20b0
addq $0x10, %rbx
movslq %eax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2190
movq %rbx, %rdi
callq 0x20f0
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1ab2(%rip), %rdi      # 0x4010
leaq 0x1ab4(%rip), %rsi      # 0x4019
leaq 0x1ab7(%rip), %rcx      # 0x4023
movl $0x10, %edx
callq 0x20e0
// File: /workspace/github_cpp_makefile_star2_O1/hollanderic[P]dp832/dp832.cpp
// Function: dp830::read_(char*, int)
int dp830::read_(char *buf, int len){
    assert(fhandle_);
    if (!buf) return 0;
    memset(buf,0,len);
    fhandle_.getline(buf,len);
    return fhandle_.gcount();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rdi,%rax)
jne 0x25d6
movq %rsi, %r14
testq %rsi, %rsi
je 0x25ce
movq %rdi, %rbx
movslq %edx, %r15
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %ecx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2210
movl 0x8(%rbx), %eax
jmp 0x25d0
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1a33(%rip), %rdi      # 0x4010
leaq 0x1a35(%rip), %rsi      # 0x4019
leaq 0x1a58(%rip), %rcx      # 0x4043
movl $0x19, %edx
callq 0x20e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/hollanderic[P]dp832/dp832.cpp
// Function: dp830::GetState(int)
int dp830::GetState(int channel){
    char buf[40];
    char buf2[40];
    snprintf(buf,sizeof(buf),":OUTP:STAT? CH%d",channel);
    write_(buf);
    read_(buf2,sizeof(buf2));
    return strcmp(buf2,"OFF")?1:0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movl %esi, %ecx
movq %rdi, %rbx
leaq 0x1a58(%rip), %rdx      # 0x4061
leaq 0x30(%rsp), %r14
movl $0x28, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x21e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2510
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
movl $0x28, %edx
callq 0x2576
xorl %eax, %eax
cmpl $0x46464f, (%r14)       # imm = 0x46464F
setne %al
addq $0x58, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/hollanderic[P]dp832/dp832.cpp
// Function: dp830::On(int)
int dp830::On(int channel) {
    char buf[40];
    snprintf(buf,sizeof(buf),":SOUR%d:CURR:PROT:CLEAR",channel);
    write_(buf);
    snprintf(buf,sizeof(buf),":OUTP:STAT CH%d,ON",channel);
    return write_(buf);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x1a0e(%rip), %rdx      # 0x4072
movq %rsp, %r14
movl $0x28, %esi
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x21e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2510
leaq 0x1a00(%rip), %rdx      # 0x408a
movl $0x28, %esi
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x21e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2510
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/hollanderic[P]dp832/dp832.cpp
// Function: dp830::AllOn()
int dp830::AllOn() {
    On(1);
    On(2);
    On(3);
    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x2650
movq %rbx, %rdi
movl $0x2, %esi
callq 0x2650
movq %rbx, %rdi
movl $0x3, %esi
callq 0x2650
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/hollanderic[P]dp832/dp832.cpp
// Function: dp830::AllOff()
int dp830::AllOff() {
    Off(1);
    Off(2);
    Off(3);
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x1976(%rip), %r14      # 0x409d
movq %rsp, %r15
movl $0x28, %esi
movq %r15, %rdi
movq %r14, %rdx
movl $0x1, %ecx
xorl %eax, %eax
callq 0x21e0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2510
movq %rsp, %r15
movl $0x28, %esi
movq %r15, %rdi
movq %r14, %rdx
movl $0x2, %ecx
xorl %eax, %eax
callq 0x21e0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2510
movq %rsp, %r15
movl $0x28, %esi
movq %r15, %rdi
movq %r14, %rdx
movl $0x3, %ecx
xorl %eax, %eax
callq 0x21e0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2510
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/hollanderic[P]dp832/dp832.cpp
// Function: dp830::SetOCP(int, double)
int dp830::SetOCP(int channel, double limit) {
    char buf[60];
    snprintf(buf,sizeof(buf),":SOUR%d:CURR:PROT:STAT ON",channel);
    write_(buf);
    snprintf(buf,sizeof(buf),":SOUR%d:CURR:PROT %6.3f",channel,limit);
    return write_(buf);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movsd %xmm0, 0x8(%rsp)
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x1853(%rip), %rdx      # 0x40cb
leaq 0x10(%rsp), %r14
movl $0x3c, %esi
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x21e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2510
leaq 0x1845(%rip), %rdx      # 0x40e5
movl $0x3c, %esi
movq %r14, %rdi
movl %ebp, %ecx
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x21e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2510
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/hollanderic[P]dp832/dp832.cpp
// Function: dp830::GetOCP(int)
double dp830::GetOCP(int channel) {
    char buf[40];
    snprintf(buf,sizeof(buf),":SOUR%d:CURR:PROT?",channel);
    write_(buf);
    read_(buf,sizeof(buf));
    return std::stod(buf,NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %esi, %ecx
movq %rdi, %r14
leaq 0x1819(%rip), %rdx      # 0x40fd
leaq 0x30(%rsp), %rbx
movl $0x28, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2510
movq %r14, %rdi
movq %rbx, %rsi
movl $0x28, %edx
callq 0x2576
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rbx, %rdi
callq 0x20b0
leaq (%rsp,%rax), %rdx
addq $0x30, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2d74
movq (%r14), %r14
callq 0x2030
movq %rax, %rbx
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x28(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2110
cmpq %r14, (%r15)
je 0x29ac
movl (%rbx), %eax
testl %eax, %eax
je 0x297c
cmpl $0x22, %eax
jne 0x297e
leaq 0x17d1(%rip), %rdi      # 0x4148
callq 0x21b0
movl %ebp, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x299f
movq 0x18(%rsp), %rsi
incq %rsi
movsd %xmm0, (%rsp)
callq 0x2160
movsd (%rsp), %xmm0
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1795(%rip), %rdi      # 0x4148
callq 0x20d0
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x29c2
movl %ebp, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x29d9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2160
movq %r14, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/hollanderic[P]dp832/dp832.cpp
// Function: dp830::GetOCPTripped(int)
int dp830::GetOCPTripped(int channel) {
    char buf[40];
    snprintf(buf,sizeof(buf),":SOUR%d:CURR:PROT:TRIP?",channel);
    write_(buf);
    read_(buf,sizeof(buf));
    return (strcmp(buf,"YES")==0)?1:0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ecx
movq %rdi, %rbx
leaq 0x171b(%rip), %rdx      # 0x4110
movq %rsp, %r14
movl $0x28, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x21e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2510
movq %rbx, %rdi
movq %r14, %rsi
movl $0x28, %edx
callq 0x2576
xorl %eax, %eax
cmpl $0x534559, (%r14)       # imm = 0x534559
sete %al
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/hollanderic[P]dp832/dp832.cpp
// Function: dp830::GetSetPoint_(int, char const*)
double dp830::GetSetPoint_(int channel, const char *tag) {
    char buf[40];
    char buf2[40];
    snprintf(buf,sizeof(buf),":SOUR%d:%s?",channel,tag);
    write_(buf);
    read_(buf2,sizeof(buf2));
    return std::stod(buf2,NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rdx, %r8
movl %esi, %ecx
movq %rdi, %rbx
leaq 0x16d4(%rip), %rdx      # 0x4128
leaq 0x60(%rsp), %r14
movl $0x28, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x21e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2510
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl $0x28, %edx
callq 0x2576
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r14, %rdi
callq 0x20b0
leaq (%rsp,%rax), %rdx
addq $0x30, %rdx
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2d74
movq (%rbx), %r14
callq 0x2030
movq %rax, %rbx
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x28(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2110
cmpq %r14, (%r15)
je 0x2b24
movl (%rbx), %eax
testl %eax, %eax
je 0x2af1
cmpl $0x22, %eax
jne 0x2af3
leaq 0x165c(%rip), %rdi      # 0x4148
callq 0x21b0
movl %ebp, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b14
movq 0x18(%rsp), %rsi
incq %rsi
movsd %xmm0, (%rsp)
callq 0x2160
movsd (%rsp), %xmm0
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x161d(%rip), %rdi      # 0x4148
callq 0x20d0
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x2b3a
movl %ebp, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b51
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2160
movq %r14, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/hollanderic[P]dp832/dp832.cpp
// Function: dp830::Measure_(int, char const*)
double dp830::Measure_(int channel, const char *tag) {
    char buf[40];
    char buf2[40];
    snprintf(buf,sizeof(buf),":MEAS:%s? CH%d",tag,channel);
    write_(buf);
    read_(buf2,sizeof(buf2));
    return std::stod(buf2,NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rdx, %rcx
movl %esi, %r8d
movq %rdi, %rbx
leaq 0x15a3(%rip), %rdx      # 0x4134
leaq 0x60(%rsp), %r14
movl $0x28, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x21e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2510
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl $0x28, %edx
callq 0x2576
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r14, %rdi
callq 0x20b0
leaq (%rsp,%rax), %rdx
addq $0x30, %rdx
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2d74
movq (%rbx), %r14
callq 0x2030
movq %rax, %rbx
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x28(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2110
cmpq %r14, (%r15)
je 0x2c61
movl (%rbx), %eax
testl %eax, %eax
je 0x2c2e
cmpl $0x22, %eax
jne 0x2c30
leaq 0x151f(%rip), %rdi      # 0x4148
callq 0x21b0
movl %ebp, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2c51
movq 0x18(%rsp), %rsi
incq %rsi
movsd %xmm0, (%rsp)
callq 0x2160
movsd (%rsp), %xmm0
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x14e0(%rip), %rdi      # 0x4148
callq 0x20d0
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x2c77
movl %ebp, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2c8e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2160
movq %r14, %rdi
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O1/hollanderic[P]dp832/dp832.cpp
// Function: dp830::Bounce(int, double)
int dp830::Bounce(int channel, double delay) {
    double volt = GetVoltageSetPoint(channel);
    SetVoltage(channel, 0.0);
    usleep(delay*1e6);
    SetVoltage(channel, volt);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movsd %xmm0, (%rsp)
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x13ea(%rip), %r14      # 0x40c1
movq %r14, %rdx
callq 0x2a36
movsd %xmm0, 0x8(%rsp)
leaq 0x13c0(%rip), %r15      # 0x40ac
leaq 0x10(%rsp), %r12
movl $0x28, %esi
xorps %xmm0, %xmm0
movq %r12, %rdi
movq %r15, %rdx
movl %ebp, %ecx
movq %r14, %r8
movb $0x1, %al
callq 0x21e0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2510
movsd (%rsp), %xmm0
mulsd 0x12e5(%rip), %xmm0     # 0x4008
cvttsd2si %xmm0, %rdi
callq 0x21a0
leaq 0x10(%rsp), %r12
movl $0x28, %esi
movq %r12, %rdi
movq %r15, %rdx
movl %ebp, %ecx
movq %r14, %r8
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x21e0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2510
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/hollanderic[P]dp832/main.cpp
// Function: getDevicePathArg[abi:cxx11](int, char**)
const std::string getDevicePathArg(int argc, char** argv) {
    char opt;
    std::string result = kDefaultUSBDevicePath;
    while ((opt = getopt(argc, argv, kValidArgs.c_str())) >= 0) {
        if (opt == 'd') {
            result = string(optarg);
            break;
        }
    }

    // Reset option parser.
    optind = 1; 

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq 0x333c(%rip), %rsi      # 0x6160
movq 0x333d(%rip), %rdx      # 0x6168
addq %rsi, %rdx
callq 0x374a
movq 0x3306(%rip), %rdx      # 0x6140
movl %ebp, %edi
movq %r14, %rsi
callq 0x2080
shll $0x18, %eax
js 0x2e93
cmpl $0x64000000, %eax       # imm = 0x64000000
jne 0x2e33
movq 0x3169(%rip), %rax      # 0x5fc0
movq (%rax), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x370c
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2180
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2e93
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2160
movq 0x313e(%rip), %rax      # 0x5fd8
movl $0x1, (%rax)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x2ec4
movq (%r15), %rsi
incq %rsi
callq 0x2160
movq %r14, %rdi
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O1/hollanderic[P]dp832/main.cpp
// Function: isExtraMode(int, char**)
bool isExtraMode(int argc, char** argv) {
    char opt;
    bool result = false;
    while ((opt = getopt(argc, argv, kValidArgs.c_str())) >= 0) {
        if (opt == 'x') {
            result = true;
            break;
        }
    }

    // Reset option parser.
    optind = 1; 

    return result;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movq 0x3265(%rip), %rdx      # 0x6140
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2080
shll $0x18, %eax
cmpl $0x78000000, %eax       # imm = 0x78000000
je 0x2ef3
testl %eax, %eax
jns 0x2ed4
testl %eax, %eax
setns %al
movq 0x30d9(%rip), %rcx      # 0x5fd8
movl $0x1, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nanjiangshu[P]calSOV/calSOV.cpp
// Function: my_strcpy(char*, char const*, int)
int my_strcpy(char* to, const char* from, int max)/*{{{*/
/******************************************************************************
 * my modification of strcpy
 * copy max characters from "from" to "to", add NULL terminator automatically
 * updated 2008-04-23, memcpy win in speed when the copying string is long
 * updated 2011-10-27:
 *   since calling strlen will be time consuming for very large from string,
 *   e.g. when "from" is the buffer of a whole trunk of file. Therefore, strlen
 *   part is removed.
 *****************************************************************************/
{
    if(max < 200) {
        strncpy(to,from,max);
    } else {
        memcpy(to,from,max);
    }
    to[max] = '\0';
    return max;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
movslq %edx, %r15
cmpl $0xc7, %edx
jg 0x28c0
movq %r14, %rdi
movq %r15, %rdx
callq 0x20f0
jmp 0x28ca
movl %ebx, %edx
movq %r14, %rdi
callq 0x2130
movb $0x0, (%r14,%r15)
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/nanjiangshu[P]calSOV/calSOV.cpp
// Function: rootname(char const*, char*, int)
char *rootname(const char* filename, char* rtname, int max_rtname /*= MAX_PATH*/)/*{{{*/
/*****************************************************************************
 * rootname
 * given the file name, 
 * return the rootname of the filename
 ****************************************************************************/
{
    const char *pch;
    char *pstr;
    if((pch = strrchr(filename,'/')) != NULL)
        pstr = (char*) pch+1;
    else
        pstr = (char*) filename;

    if((pch = strrchr(pstr,'.')) != NULL)
        my_strcpy(rtname,pstr, min((int)(pch - pstr), max_rtname));
    else
        rtname = pstr;
    return rtname;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r15
movl $0x2f, %esi
callq 0x21b0
leaq 0x1(%rax), %r14
testq %rax, %rax
cmoveq %r15, %r14
movq %r14, %rdi
movl $0x2e, %esi
callq 0x21b0
testq %rax, %rax
je 0x292f
subl %r14d, %eax
cmpl %ebp, %eax
cmovgel %ebp, %eax
movslq %eax, %r15
cmpl $0xc7, %eax
jg 0x2934
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x20f0
jmp 0x2941
movq %r14, %rbx
jmp 0x2946
movl %eax, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2130
movb $0x0, (%rbx,%r15)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nanjiangshu[P]calSOV/calSOV.cpp
// Function: option_parser_filename(int, char**, int, char*)
int option_parser_filename(int argc, char **argv, int beg, char *filename)/*{{{*/
/*****************************************************************************
 * beg is the current index of argument list, e.g., argv[i] = "--out"
 ****************************************************************************/
{
    int i ; 
    bool isNonOptionArg = false;
    bool isFileNameSet = false;

    for(i = beg +1 ; i < argc ; i++)
    {
        if(argv[i][0] == '-' && strcmp(argv[i], "--") != 0 && !isNonOptionArg)
        {
            fprintf(stderr,"option '%s' must be followed by a filename, not option\n", argv[beg]);
            return -1;
        }
        else if(strcmp(argv[i], "--") == 0 && !isNonOptionArg)
        {
            isNonOptionArg = true;
        }
        else
        {
            my_strcpy(filename, argv[i], MAX_PATH-1);
            isFileNameSet = true;
            break;
        }
    }

    if(!isFileNameSet)
    {
        fprintf(stderr,"option '%s' must be followed by a filename\n", argv[beg]);
        return -1;
    }
    else 
    {
        return i+1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq %rsi, %r15
movslq %edx, %rcx
movslq %edi, %r14
leal 0x1(%rcx), %ebx
movq %rcx, 0x8(%rsp)
leaq 0x1(%rcx), %rbp
xorl %r12d, %r12d
cmpq %r14, %rbp
jge 0x29fc
movq (%r15,%rbp,8), %r13
cmpb $0x2d, (%r13)
jne 0x29aa
movq %r13, %rdi
leaq 0x4cfa(%rip), %rsi      # 0x7693
callq 0x2230
testl %eax, %eax
sete %al
orb %r12b, %al
testb $0x1, %al
je 0x2a18
movq %r13, %rdi
leaq 0x4cdf(%rip), %rsi      # 0x7693
callq 0x2230
testl %eax, %eax
sete %al
notb %r12b
incl %ebx
incq %rbp
testb %al, %r12b
movb $0x1, %r12b
jne 0x297f
movl $0x1f3, %edx            # imm = 0x1F3
movq 0x10(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x2130
movb $0x0, 0x1f3(%r14)
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x85d5(%rip), %rax      # 0xafd8
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movq (%r15,%rax,8), %rdx
leaq 0x4cb8(%rip), %rsi      # 0x76ce
jmp 0x2a32
movq 0x85b9(%rip), %rax      # 0xafd8
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movq (%r15,%rax,8), %rdx
leaq 0x4c64(%rip), %rsi      # 0x7696
xorl %eax, %eax
callq 0x2240
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x29eb
// File: /workspace/github_cpp_makefile_star2_O1/nanjiangshu[P]calSOV/calSOV.cpp
// Function: IsNumeric(char const*)
bool IsNumeric(const char* str)/*{{{*/
//**********************************************************************
//IsNumeric(char*)
//check if a string is a numeric number
{
	int i = 0;
    int cntdot = 0;
	while(str[i] != '\0')
	{
        if( i == 0)
        {
            if(!isdigit(str[i]) && str[i] != '+' && str[i] != '-' && str[i] != '.' )
                return false;
            if(str[i] == '.')
                cntdot ++;
        }
        else
        {
            if(! isdigit(str[i]) && str[i] != '.')
                return false;
            if(str[i] == '.')
                cntdot ++;
        }
        i ++;
	}
    if(cntdot >= 2)
        return false;
    else 
        return true;
}

// Assembly:
movb (%rdi), %r8b
testb %r8b, %r8b
je 0x2ab2
xorl %ecx, %ecx
movabsq $0x680000000000, %rdx   # imm = 0x680000000000
xorl %esi, %esi
movsbl %r8b, %eax
addl $-0x30, %eax
testq %rcx, %rcx
je 0x2a7b
cmpl $0xa, %eax
setae %r9b
cmpb $0x2e, %r8b
sete %al
setne %r8b
testb %r9b, %r8b
je 0x2a99
jmp 0x2ab5
cmpl $0xa, %eax
jb 0x2a92
xorl %eax, %eax
cmpb $0x2e, %r8b
ja 0x2ab1
movzbl %r8b, %r9d
btq %r9, %rdx
jae 0x2ab1
cmpb $0x2e, %r8b
sete %al
movzbl %al, %eax
addl %eax, %esi
movb 0x1(%rdi,%rcx), %r8b
incq %rcx
testb %r8b, %r8b
jne 0x2a56
cmpl $0x2, %esi
setb %al
retq
movb $0x1, %al
retq
xorl %eax, %eax
retq