LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tap3edit[P]tap3xml/TreeParser.cpp
// Function: TreeParser::_process(treenode*, int)
void TreeParser::_process(treenode *tree, int depth)
{

    vector<treenode *>::iterator   vii;

    _treeitem->tree(tree);
    _bfout->write(_treeitem->encode(depth));

    if (tree->children != NULL)
    {

        for(vii=tree->children->begin();vii!=tree->children->end();vii++)
        {
            this->_process((*vii), depth+1);
        }

    }

    _treeitem->tree(tree);
    _bfout->write(_treeitem->enc_close(depth));

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xacf0
movq -0xa0(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
movq 0x8(%rax), %rax
callq *%rax
movq -0xa0(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x98(%rbp)
movq 0x10(%rax), %rsi
movl -0x14(%rbp), %edx
movq (%rsi), %rax
movq 0x10(%rax), %rax
leaq -0x40(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq *%rax
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x181f0
jmp 0x22653
leaq -0x40(%rbp), %rdi
callq 0x41e0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x226f3
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0xaef0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0xaf60
movq %rax, -0x60(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xaf20
testb $0x1, %al
jne 0x226a8
jmp 0x226f1
leaq -0x20(%rbp), %rdi
callq 0xaf90
movq -0xa0(%rbp), %rdi
movq (%rax), %rsi
movl -0x14(%rbp), %edx
addl $0x1, %edx
callq 0x225d0
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0xafb0
movq %rax, -0x68(%rbp)
jmp 0x22684
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x41e0
jmp 0x2277c
jmp 0x226f3
movq -0xa0(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
movq 0x8(%rax), %rax
callq *%rax
movq -0xa0(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0xb0(%rbp)
movq 0x10(%rax), %rsi
movl -0x14(%rbp), %edx
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq -0x88(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq *%rax
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0x181f0
jmp 0x2274f
leaq -0x88(%rbp), %rdi
callq 0x41e0
addq $0xb0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x41e0
movq -0x48(%rbp), %rdi
callq 0x46d0
nopw %cs:(%rax,%rax)
// File: tap3edit[P]tap3xml/Xml.cpp
// Function: Xml::Xml()
Xml::Xml() 
{
    _xmlitem=new XmlItem;
    _tree=NULL;
    _bfin=NULL;
    _bfout=NULL;
    _ofile=NULL;
    _ifile=NULL;
    _header=NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x48, %edi
callq 0x4360
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x20(%rbp)
callq 0x22df0
jmp 0x227cf
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq $0x0, 0x18(%rax)
movq $0x0, (%rax)
movq $0x0, 0x8(%rax)
movq $0x0, 0x28(%rax)
movq $0x0, 0x20(%rax)
movq $0x0, 0x30(%rax)
addq $0x30, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x48, %esi
callq 0x4370
movq -0x10(%rbp), %rdi
callq 0x46d0
nopw %cs:(%rax,%rax)
// File: tap3edit[P]tap3xml/Xml.cpp
// Function: Xml::decode()
void Xml::decode()
{

    extern int run_xmlparser(FILE *ifile, treenode *tree);


    /* 1. Parse xml structure */

    if (_ifile == NULL )
    {
        cerr << "The XML input file should be specified with the \"ifile\" method";
        err_trace(__FILE__, __LINE__);
    }

    if (run_xmlparser(_ifile, _tree))
    {
        cerr << "Error decoding XML input file\n";
        err_trace(__FILE__, __LINE__);
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, 0x20(%rax)
jne 0x228f3
movq 0xe77f(%rip), %rdi      # 0x30fe8
leaq 0x39ca(%rip), %rsi      # 0x2623a
callq 0x4340
leaq -0x29(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x46e0
movq -0x78(%rbp), %rdx
leaq 0x39ec(%rip), %rsi      # 0x26279
leaq -0x28(%rbp), %rdi
callq 0x7670
jmp 0x22898
movl $0x42, -0x40(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x151c0
jmp 0x228ae
leaq -0x28(%rbp), %rdi
callq 0x41e0
leaq -0x29(%rbp), %rdi
callq 0x43d0
jmp 0x228f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x228e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x41e0
leaq -0x29(%rbp), %rdi
callq 0x43d0
jmp 0x229a4
movq -0x70(%rbp), %rax
movq 0x20(%rax), %rdi
movq 0x18(%rax), %rsi
callq 0x12a50
cmpl $0x0, %eax
je 0x2299b
movq 0xe6d4(%rip), %rdi      # 0x30fe8
leaq 0x3966(%rip), %rsi      # 0x26281
callq 0x4340
leaq -0x61(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x46e0
movq -0x80(%rbp), %rdx
leaq 0x3941(%rip), %rsi      # 0x26279
leaq -0x60(%rbp), %rdi
callq 0x7670
jmp 0x22943
movl $0x48, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x151c0
jmp 0x22959
leaq -0x60(%rbp), %rdi
callq 0x41e0
leaq -0x61(%rbp), %rdi
callq 0x43d0
jmp 0x2299b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x22990
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x41e0
leaq -0x61(%rbp), %rdi
callq 0x43d0
jmp 0x229a4
addq $0x80, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x46d0
nopl (%rax)
// File: tap3edit[P]tap3xml/Xml.cpp
// Function: Xml::encode()
void Xml::encode()
{

    _bfout->write(get_header());

    TreeParser *tparser=new TreeParser;
    tparser->handler(_xmlitem);
    tparser->buffout(_bfout);
    tparser->tree(_tree);
    tparser->process();
    delete tparser;

    _bfout->flush();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x58(%rbp)
movq 0x8(%rsi), %rax
movq %rax, -0x50(%rbp)
leaq -0x28(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x22ad0
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x181f0
jmp 0x229e8
leaq -0x28(%rbp), %rdi
callq 0x41e0
movl $0x18, %edi
callq 0x4360
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x60(%rbp)
callq 0x224a0
jmp 0x22a0c
movq -0x58(%rbp), %rax
movq -0x60(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq 0x10(%rax), %rsi
callq 0x224d0
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rdi
movq 0x8(%rax), %rsi
callq 0x22550
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rdi
movq 0x18(%rax), %rsi
callq 0x22510
movq -0x40(%rbp), %rdi
callq 0x225a0
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, %rax
je 0x22a75
movq -0x68(%rbp), %rdi
callq 0x22790
movq -0x68(%rbp), %rdi
movl $0x18, %esi
callq 0x4370
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x18240
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x41e0
jmp 0x22ab9
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x18, %esi
callq 0x4370
movq -0x30(%rbp), %rdi
callq 0x46d0
nopw %cs:(%rax,%rax)
// File: tap3edit[P]tap3xml/Xml.cpp
// Function: Xml::get_header[abi:cxx11]()
string Xml::get_header()
{
    if (_header != NULL)
    {
        return *_header;
    }
    else
    {
        return "";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x40(%rbp)
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, 0x30(%rax)
je 0x22b0d
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0x4170
jmp 0x22b52
leaq -0x11(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x46e0
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rdx
leaq 0x2fc5(%rip), %rsi      # 0x25aee
callq 0x7670
jmp 0x22b30
leaq -0x11(%rbp), %rdi
callq 0x43d0
jmp 0x22b52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x43d0
jmp 0x22b5c
movq -0x38(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x46d0
nopw %cs:(%rax,%rax)
// File: tap3edit[P]tap3xml/XmlItem.cpp
// Function: XmlItem::enc_close[abi:cxx11](int)
string XmlItem::enc_close(int depth)
{
    ostringstream item;


    if (_tree==NULL) {
        cerr << "treenode structure was not set with tree() method";
        err_trace(__FILE__, __LINE__);
    }


    /* 1. Preparing XML closing Item */

    if ( _tree->pc )
    {
        item << string(depth*4, ' ') << "</" << _tree->tagname << ">\n";
    }


    /* 2. Return */

    return item.str();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x208(%rbp)
movq %rdi, %rax
movq %rax, -0x200(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1f8(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x4540
movq -0x1f8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x23447
movq 0xdc71(%rip), %rdi      # 0x30fe8
leaq 0x293c(%rip), %rsi      # 0x25cba
callq 0x4340
jmp 0x23385
leaq -0x1c1(%rbp), %rdi
movq %rdi, -0x210(%rbp)
callq 0x46e0
movq -0x210(%rbp), %rdx
leaq 0x2f16(%rip), %rsi      # 0x262bc
leaq -0x1c0(%rbp), %rdi
callq 0x7670
jmp 0x233b4
movl $0x66, -0x1c8(%rbp)
leaq -0x1c0(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x151c0
jmp 0x233d3
leaq -0x1c0(%rbp), %rdi
callq 0x41e0
leaq -0x1c1(%rbp), %rdi
callq 0x43d0
jmp 0x23447
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0x235a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0x23436
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x41e0
leaq -0x1c1(%rbp), %rdi
callq 0x43d0
jmp 0x235a3
movq -0x1f8(%rbp), %rax
movq 0x40(%rax), %rax
movw 0x20(%rax), %ax
shrw $0x2, %ax
andw $0x1, %ax
cmpw $0x0, %ax
je 0x23572
movl -0x14(%rbp), %eax
shll $0x2, %eax
cltq
movq %rax, -0x220(%rbp)
leaq -0x1e9(%rbp), %rdi
movq %rdi, -0x218(%rbp)
callq 0x46e0
movq -0x220(%rbp), %rsi
movq -0x218(%rbp), %rcx
leaq -0x1e8(%rbp), %rdi
movl $0x20, %edx
callq 0x1f2f0
jmp 0x234ab
leaq -0x190(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x42e0
movq %rax, -0x228(%rbp)
jmp 0x234c7
movq -0x228(%rbp), %rdi
leaq 0x2df3(%rip), %rsi      # 0x262c8
callq 0x4340
movq %rax, -0x230(%rbp)
jmp 0x234e3
movq -0x230(%rbp), %rdi
movq -0x1f8(%rbp), %rax
movq 0x40(%rax), %rsi
callq 0x42e0
movq %rax, -0x238(%rbp)
jmp 0x23503
movq -0x238(%rbp), %rdi
leaq 0xc67(%rip), %rsi       # 0x24178
callq 0x4340
jmp 0x23518
leaq -0x1e8(%rbp), %rdi
callq 0x41e0
leaq -0x1e9(%rbp), %rdi
callq 0x43d0
jmp 0x23572
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0x23564
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x1e8(%rbp), %rdi
callq 0x41e0
leaq -0x1e9(%rbp), %rdi
callq 0x43d0
jmp 0x235a3
movq -0x208(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x4380
jmp 0x23587
leaq -0x190(%rbp), %rdi
callq 0x40c0
movq -0x200(%rbp), %rax
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
leaq -0x190(%rbp), %rdi
callq 0x40c0
movq -0x198(%rbp), %rdi
callq 0x46d0
nopl (%rax,%rax)
// File: lucaong[P]elixir_mlx90640/src/main.cpp
// Function: write_fixed(unsigned char*, int)
void write_fixed(uint8_t *msg, int len) {
  int written = 0;
  while(written < len) {
    int this_write = fwrite(msg + written, sizeof(uint8_t), len - written, stdout);
    if (this_write <= 0 && errno != EINTR) {
      err(EXIT_FAILURE, "%s: %d", "writing data", this_write);
    }
    written += this_write;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x1351
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rax
addq %rax, %rdi
movl -0xc(%rbp), %eax
subl -0x10(%rbp), %eax
movslq %eax, %rdx
movq 0x7cbf(%rip), %rax      # 0x8fc8
movq (%rax), %rcx
movl $0x1, %esi
callq 0x1140
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jg 0x1346
callq 0x1030
cmpl $0x4, (%rax)
je 0x1346
movl -0x14(%rbp), %ecx
movl $0x1, %edi
leaq 0x4cdc(%rip), %rsi      # 0x6014
leaq 0x4cdc(%rip), %rdx      # 0x601b
movb $0x0, %al
callq 0x10d0
movl -0x14(%rbp), %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x12e6
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: lucaong[P]elixir_mlx90640/src/main.cpp
// Function: measurement_to_bytes(float*, unsigned char*)
void measurement_to_bytes(float *measurement, uint8_t *buffer) {
  for (int i = 0; i < PIXELS; i++) {
    double integral;
    double fraction = modf(measurement[i], &integral);
    uint8_t sign = (integral < 0 ? 1 : 0) << 7;
    buffer[i * 2] = (uint8_t) abs((int) integral);
    buffer[i * 2 + 1] = ((uint8_t) ((int) (fraction * 100)) | sign);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x300, -0x14(%rbp)     # imm = 0x300
jge 0x1418
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
leaq -0x20(%rbp), %rdi
callq 0x1120
movsd %xmm0, -0x28(%rbp)
movsd -0x20(%rbp), %xmm1
xorps %xmm0, %xmm0
xorl %eax, %eax
movl $0x1, %ecx
ucomisd %xmm1, %xmm0
cmoval %ecx, %eax
shll $0x7, %eax
movb %al, -0x29(%rbp)
cvttsd2si -0x20(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movsd 0x4c24(%rip), %xmm0     # 0x6008
mulsd -0x28(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movzbl %al, %eax
movzbl -0x29(%rbp), %ecx
orl %ecx, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1377
addq $0x30, %rsp
popq %rbp
retq
nop
// File: lucaong[P]elixir_mlx90640/src/main.cpp
// Function: output_measurement(float*)
void output_measurement(float *measurement) {
  uint8_t msg[PIXELS * 2];
  measurement_to_bytes(measurement, msg);
  unsigned long len = PIXELS * 2;
  uint8_t size_header[2] = {(uint8_t) (len >> 8 & 0xff), (uint8_t) (len & 0xff)};
  write_fixed(size_header, 2);
  write_fixed(msg, len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x620, %rsp            # imm = 0x620
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x610(%rbp), %rsi
callq 0x1360
movq $0x600, -0x618(%rbp) # imm = 0x600
movq -0x618(%rbp), %rax
shrq $0x8, %rax
andq $0xff, %rax
movb %al, -0x61a(%rbp)
movq -0x618(%rbp), %rax
andq $0xff, %rax
movb %al, -0x619(%rbp)
leaq -0x61a(%rbp), %rdi
movl $0x2, %esi
callq 0x12d0
leaq -0x610(%rbp), %rdi
movq -0x618(%rbp), %rax
movl %eax, %esi
callq 0x12d0
addq $0x620, %rsp            # imm = 0x620
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: MLX90640_ExtractParameters(unsigned short*, paramsMLX90640*)
int MLX90640_ExtractParameters(uint16_t *eeData, paramsMLX90640 *mlx90640)
{
    int error = CheckEEPROMValid(eeData);
    
    if(error == 0)
    {
        ExtractVDDParameters(eeData, mlx90640);
        ExtractPTATParameters(eeData, mlx90640);
        ExtractGainParameters(eeData, mlx90640);
        ExtractTgcParameters(eeData, mlx90640);
        ExtractResolutionParameters(eeData, mlx90640);
        ExtractKsTaParameters(eeData, mlx90640);
        ExtractKsToParameters(eeData, mlx90640);
        ExtractAlphaParameters(eeData, mlx90640);
        ExtractOffsetParameters(eeData, mlx90640);
        ExtractKtaPixelParameters(eeData, mlx90640);
        ExtractKvPixelParameters(eeData, mlx90640);
        ExtractCPParameters(eeData, mlx90640);
        ExtractCILCParameters(eeData, mlx90640);
        error = ExtractDeviatingPixels(eeData, mlx90640);  
    }
    
    return error;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2040
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x202f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2080
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2110
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2260
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x22a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2310
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2340
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x23c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2580
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2a60
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2ef0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3190
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3370
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3630
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x37a0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: CheckEEPROMValid(unsigned short*)
int CheckEEPROMValid(uint16_t *eeData)  
 {
     int deviceSelect;
     deviceSelect = eeData[10] & 0x0040;
     if(deviceSelect == 0)
     {
         return 0;
     }
     
     return -7;    
 }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x14(%rax), %eax
andl $0x40, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x2065
movl $0x0, -0x4(%rbp)
jmp 0x206c
movl $0xfffffff9, -0x4(%rbp) # imm = 0xFFFFFFF9
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: ExtractVDDParameters(unsigned short*, paramsMLX90640*)
void ExtractVDDParameters(uint16_t *eeData, paramsMLX90640 *mlx90640)
{
    int16_t kVdd;
    int16_t vdd25;
    
    kVdd = eeData[51];
    
    kVdd = (eeData[51] & 0xFF00) >> 8;
    if(kVdd > 127)
    {
        kVdd = kVdd - 256;
    }
    kVdd = 32 * kVdd;
    vdd25 = eeData[51] & 0x00FF;
    vdd25 = ((vdd25 - 256) << 5) - 8192;
    
    mlx90640->kVdd = kVdd;
    mlx90640->vdd25 = vdd25; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movw 0x66(%rax), %ax
movw %ax, -0x12(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x66(%rax), %eax
andl $0xff00, %eax           # imm = 0xFF00
sarl $0x8, %eax
movw %ax, -0x12(%rbp)
movswl -0x12(%rbp), %eax
cmpl $0x7f, %eax
jle 0x20c2
movswl -0x12(%rbp), %eax
subl $0x100, %eax            # imm = 0x100
movw %ax, -0x12(%rbp)
movswl -0x12(%rbp), %eax
shll $0x5, %eax
movw %ax, -0x12(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x66(%rax), %eax
andl $0xff, %eax
movw %ax, -0x14(%rbp)
movswl -0x14(%rbp), %eax
subl $0x100, %eax            # imm = 0x100
shll $0x5, %eax
subl $0x2000, %eax           # imm = 0x2000
movw %ax, -0x14(%rbp)
movw -0x12(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movw -0x14(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x2(%rax)
popq %rbp
retq
nopl (%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: ExtractPTATParameters(unsigned short*, paramsMLX90640*)
void ExtractPTATParameters(uint16_t *eeData, paramsMLX90640 *mlx90640)
{
    float KvPTAT;
    float KtPTAT;
    int16_t vPTAT25;
    float alphaPTAT;
    
    KvPTAT = (eeData[50] & 0xFC00) >> 10;
    if(KvPTAT > 31)
    {
        KvPTAT = KvPTAT - 64;
    }
    KvPTAT = KvPTAT/4096;
    
    KtPTAT = eeData[50] & 0x03FF;
    if(KtPTAT > 511)
    {
        KtPTAT = KtPTAT - 1024;
    }
    KtPTAT = KtPTAT/8;
    
    vPTAT25 = eeData[49];
    
    alphaPTAT = (eeData[16] & 0xF000) / pow(2, (double)14) + 8.0f;
    
    mlx90640->KvPTAT = KvPTAT;
    mlx90640->KtPTAT = KtPTAT;    
    mlx90640->vPTAT25 = vPTAT25;
    mlx90640->alphaPTAT = alphaPTAT;   
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x64(%rax), %eax
andl $0xfc00, %eax           # imm = 0xFC00
sarl $0xa, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
movss 0x3efa(%rip), %xmm1     # 0x6040
ucomiss %xmm1, %xmm0
jbe 0x2161
movss -0x14(%rbp), %xmm0
movss 0x3eec(%rip), %xmm1     # 0x6044
subss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
movss 0x3ede(%rip), %xmm1     # 0x604c
divss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x64(%rax), %eax
andl $0x3ff, %eax            # imm = 0x3FF
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x18(%rbp)
movss -0x18(%rbp), %xmm0
movss 0x3eae(%rip), %xmm1     # 0x6048
ucomiss %xmm1, %xmm0
jbe 0x21b5
movss -0x18(%rbp), %xmm0
movss 0x3ea4(%rip), %xmm1     # 0x6050
subss %xmm1, %xmm0
movss %xmm0, -0x18(%rbp)
movss -0x18(%rbp), %xmm0
movss 0x3e92(%rip), %xmm1     # 0x6054
divss %xmm1, %xmm0
movss %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movw 0x62(%rax), %ax
movw %ax, -0x1a(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x20(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x28(%rbp)
movl $0x2, %edi
movsd 0x3e9e(%rip), %xmm0     # 0x6098
callq 0x5ab0
movaps %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd 0x3e7d(%rip), %xmm1     # 0x6090
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x20(%rbp)
movss -0x14(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x4(%rax)
movss -0x18(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x8(%rax)
movw -0x1a(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, 0xc(%rax)
movss -0x20(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x10(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: ExtractGainParameters(unsigned short*, paramsMLX90640*)
void ExtractGainParameters(uint16_t *eeData, paramsMLX90640 *mlx90640)
{
    int16_t gainEE;
    
    gainEE = eeData[48];
    if(gainEE > 32767)
    {
        gainEE = gainEE -65536;
    }
    
    mlx90640->gainEE = gainEE;    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movw 0x60(%rax), %ax
movw %ax, -0x12(%rbp)
movswl -0x12(%rbp), %eax
cmpl $0x7fff, %eax           # imm = 0x7FFF
jle 0x2290
movswl -0x12(%rbp), %eax
subl $0x10000, %eax          # imm = 0x10000
movw %ax, -0x12(%rbp)
movw -0x12(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x14(%rax)
popq %rbp
retq
nop
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: ExtractTgcParameters(unsigned short*, paramsMLX90640*)
void ExtractTgcParameters(uint16_t *eeData, paramsMLX90640 *mlx90640)
{
    float tgc;
    tgc = eeData[60] & 0x00FF;
    if(tgc > 127)
    {
        tgc = tgc - 256;
    }
    tgc = tgc / 32.0f;
    
    mlx90640->tgc = tgc;        
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x78(%rax), %eax
andl $0xff, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
movss 0x3d89(%rip), %xmm1     # 0x6058
ucomiss %xmm1, %xmm0
jbe 0x22ea
movss -0x14(%rbp), %xmm0
movss 0x3d7b(%rip), %xmm1     # 0x605c
subss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
movss 0x3d69(%rip), %xmm1     # 0x6060
divss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x18(%rax)
popq %rbp
retq
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: ExtractKsTaParameters(unsigned short*, paramsMLX90640*)
void ExtractKsTaParameters(uint16_t *eeData, paramsMLX90640 *mlx90640)
{
    float KsTa;
    KsTa = (eeData[60] & 0xFF00) >> 8;
    if(KsTa > 127)
    {
        KsTa = KsTa -256;
    }
    KsTa = KsTa / 8192.0f;
    
    mlx90640->KsTa = KsTa;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x78(%rax), %eax
andl $0xff00, %eax           # imm = 0xFF00
sarl $0x8, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
movss 0x3ce6(%rip), %xmm1     # 0x6058
ucomiss %xmm1, %xmm0
jbe 0x238d
movss -0x14(%rbp), %xmm0
movss 0x3cd8(%rip), %xmm1     # 0x605c
subss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
movss 0x3cca(%rip), %xmm1     # 0x6064
divss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x28(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: ExtractCILCParameters(unsigned short*, paramsMLX90640*)
void ExtractCILCParameters(uint16_t *eeData, paramsMLX90640 *mlx90640)
{
    float ilChessC[3];
    uint8_t calibrationModeEE;
    
    calibrationModeEE = (eeData[10] & 0x0800) >> 4;
    calibrationModeEE = calibrationModeEE ^ 0x80;

    ilChessC[0] = (eeData[53] & 0x003F);
    if (ilChessC[0] > 31)
    {
        ilChessC[0] = ilChessC[0] - 64;
    }
    ilChessC[0] = ilChessC[0] / 16.0f;
    
    ilChessC[1] = (eeData[53] & 0x07C0) >> 6;
    if (ilChessC[1] > 15)
    {
        ilChessC[1] = ilChessC[1] - 32;
    }
    ilChessC[1] = ilChessC[1] / 2.0f;
    
    ilChessC[2] = (eeData[53] & 0xF800) >> 11;
    if (ilChessC[2] > 15)
    {
        ilChessC[2] = ilChessC[2] - 32;
    }
    ilChessC[2] = ilChessC[2] / 8.0f;
    
    mlx90640->calibrationModeEE = calibrationModeEE;
    mlx90640->ilChessC[0] = ilChessC[0];
    mlx90640->ilChessC[1] = ilChessC[1];
    mlx90640->ilChessC[2] = ilChessC[2];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x14(%rax), %eax
andl $0x800, %eax            # imm = 0x800
sarl $0x4, %eax
movb %al, -0x1d(%rbp)
movzbl -0x1d(%rbp), %eax
xorl $0x80, %eax
movb %al, -0x1d(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x6a(%rax), %eax
andl $0x3f, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x1c(%rbp)
movss -0x1c(%rbp), %xmm0
movss 0x29c4(%rip), %xmm1     # 0x6040
ucomiss %xmm1, %xmm0
jbe 0x3697
movss -0x1c(%rbp), %xmm0
movss 0x29b6(%rip), %xmm1     # 0x6044
subss %xmm1, %xmm0
movss %xmm0, -0x1c(%rbp)
movss -0x1c(%rbp), %xmm0
movss 0x29d0(%rip), %xmm1     # 0x6074
divss %xmm1, %xmm0
movss %xmm0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x6a(%rax), %eax
andl $0x7c0, %eax            # imm = 0x7C0
sarl $0x6, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x18(%rbp)
movss -0x18(%rbp), %xmm0
movss 0x299d(%rip), %xmm1     # 0x6070
ucomiss %xmm1, %xmm0
jbe 0x36ee
movss -0x18(%rbp), %xmm0
movss 0x297b(%rip), %xmm1     # 0x6060
subss %xmm1, %xmm0
movss %xmm0, -0x18(%rbp)
movss -0x18(%rbp), %xmm0
movss 0x297d(%rip), %xmm1     # 0x6078
divss %xmm1, %xmm0
movss %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x6a(%rax), %eax
andl $0xf800, %eax           # imm = 0xF800
sarl $0xb, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
movss 0x2946(%rip), %xmm1     # 0x6070
ucomiss %xmm1, %xmm0
jbe 0x3745
movss -0x14(%rbp), %xmm0
movss 0x2924(%rip), %xmm1     # 0x6060
subss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
movss 0x2902(%rip), %xmm1     # 0x6054
divss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
movb -0x1d(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x25(%rax)
movss -0x1c(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x2a50(%rax)
movss -0x18(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x2a54(%rax)
movss -0x14(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x2a58(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: MLX90640_SetResolution(unsigned char, unsigned char)
int MLX90640_SetResolution(uint8_t slaveAddr, uint8_t resolution)
{
    uint16_t controlRegister1;
    int value;
    int error;
    
    value = (resolution & 0x03) << 10;
    
    error = MLX90640_I2CRead(slaveAddr, 0x800D, 1, &controlRegister1);
    
    if(error == 0)
    {
        value = (controlRegister1 & 0xF3FF) | value;
        error = MLX90640_I2CWrite(slaveAddr, 0x800D, value);        
    }    
    
    return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movb %dil, %cl
movb %cl, -0x1(%rbp)
movb %al, -0x2(%rbp)
movzbl -0x2(%rbp), %eax
andl $0x3, %eax
shll $0xa, %eax
movl %eax, -0x8(%rbp)
movl $0x800d, %esi           # imm = 0x800D
movl $0x1, %edx
leaq -0x4(%rbp), %rcx
movzbl -0x1(%rbp), %edi
callq 0x5b10
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x3b09
movzwl -0x4(%rbp), %eax
andl $0xf3ff, %eax           # imm = 0xF3FF
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movb -0x1(%rbp), %cl
movl -0x8(%rbp), %eax
movl $0x800d, %esi           # imm = 0x800D
movzbl %cl, %edi
movzwl %ax, %edx
callq 0x5ce0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: MLX90640_GetCurResolution(unsigned char)
int MLX90640_GetCurResolution(uint8_t slaveAddr)
{
    uint16_t controlRegister1;
    int resolutionRAM;
    int error;
    
    error = MLX90640_I2CRead(slaveAddr, 0x800D, 1, &controlRegister1);
    if(error != 0)
    {
        return error;
    }    
    resolutionRAM = (controlRegister1 & 0x0C00) >> 10;
    
    return resolutionRAM; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x5(%rbp)
movl $0x800d, %esi           # imm = 0x800D
movl $0x1, %edx
leaq -0x8(%rbp), %rcx
movzbl -0x5(%rbp), %edi
callq 0x5b10
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x3b56
movl -0x10(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3b6b
movzwl -0x8(%rbp), %eax
andl $0xc00, %eax            # imm = 0xC00
sarl $0xa, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: MLX90640_SetRefreshRate(unsigned char, unsigned char)
int MLX90640_SetRefreshRate(uint8_t slaveAddr, uint8_t refreshRate)
{
    uint16_t controlRegister1;
    int value;
    int error;
    
    value = (refreshRate & 0x07)<<7;
    
    error = MLX90640_I2CRead(slaveAddr, 0x800D, 1, &controlRegister1);
    if(error == 0)
    {
        value = (controlRegister1 & 0xFC7F) | value;
        error = MLX90640_I2CWrite(slaveAddr, 0x800D, value);
    }    
    
    return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movb %dil, %cl
movb %cl, -0x1(%rbp)
movb %al, -0x2(%rbp)
movzbl -0x2(%rbp), %eax
andl $0x7, %eax
shll $0x7, %eax
movl %eax, -0x8(%rbp)
movl $0x800d, %esi           # imm = 0x800D
movl $0x1, %edx
leaq -0x4(%rbp), %rcx
movzbl -0x1(%rbp), %edi
callq 0x5b10
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x3be9
movzwl -0x4(%rbp), %eax
andl $0xfc7f, %eax           # imm = 0xFC7F
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movb -0x1(%rbp), %cl
movl -0x8(%rbp), %eax
movl $0x800d, %esi           # imm = 0x800D
movzbl %cl, %edi
movzwl %ax, %edx
callq 0x5ce0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: MLX90640_GetRefreshRate(unsigned char)
int MLX90640_GetRefreshRate(uint8_t slaveAddr)
{
    uint16_t controlRegister1;
    int refreshRate;
    int error;
    
    error = MLX90640_I2CRead(slaveAddr, 0x800D, 1, &controlRegister1);
    if(error != 0)
    {
        return error;
    }    
    refreshRate = (controlRegister1 & 0x0380) >> 7;
    
    return refreshRate;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x5(%rbp)
movl $0x800d, %esi           # imm = 0x800D
movl $0x1, %edx
leaq -0x8(%rbp), %rcx
movzbl -0x5(%rbp), %edi
callq 0x5b10
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x3c36
movl -0x10(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3c4b
movzwl -0x8(%rbp), %eax
andl $0x380, %eax            # imm = 0x380
sarl $0x7, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: MLX90640_SetInterleavedMode(unsigned char)
int MLX90640_SetInterleavedMode(uint8_t slaveAddr)
{
    uint16_t controlRegister1;
    int value;
    int error;
    
    error = MLX90640_I2CRead(slaveAddr, 0x800D, 1, &controlRegister1);
    
    if(error == 0)
    {
        value = (controlRegister1 & 0xEFFF);
        error = MLX90640_I2CWrite(slaveAddr, 0x800D, value);        
    }    
    
    return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movl $0x800d, %esi           # imm = 0x800D
movl $0x1, %edx
leaq -0x4(%rbp), %rcx
movzbl -0x1(%rbp), %edi
callq 0x5b10
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x3cb3
movzwl -0x4(%rbp), %eax
andl $0xefff, %eax           # imm = 0xEFFF
movl %eax, -0x8(%rbp)
movb -0x1(%rbp), %cl
movl -0x8(%rbp), %eax
movl $0x800d, %esi           # imm = 0x800D
movzbl %cl, %edi
movzwl %ax, %edx
callq 0x5ce0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: MLX90640_SetChessMode(unsigned char)
int MLX90640_SetChessMode(uint8_t slaveAddr)
{
    uint16_t controlRegister1;
    int value;
    int error;
        
    error = MLX90640_I2CRead(slaveAddr, 0x800D, 1, &controlRegister1);
    
    if(error == 0)
    {
        value = (controlRegister1 | 0x1000);
        error = MLX90640_I2CWrite(slaveAddr, 0x800D, value);        
    }    
    
    return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movl $0x800d, %esi           # imm = 0x800D
movl $0x1, %edx
leaq -0x4(%rbp), %rcx
movzbl -0x1(%rbp), %edi
callq 0x5b10
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x3d13
movzwl -0x4(%rbp), %eax
orl $0x1000, %eax           # imm = 0x1000
movl %eax, -0x8(%rbp)
movb -0x1(%rbp), %cl
movl -0x8(%rbp), %eax
movl $0x800d, %esi           # imm = 0x800D
movzbl %cl, %edi
movzwl %ax, %edx
callq 0x5ce0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: MLX90640_GetCurMode(unsigned char)
int MLX90640_GetCurMode(uint8_t slaveAddr)
{
    uint16_t controlRegister1;
    int modeRAM;
    int error;
    
    error = MLX90640_I2CRead(slaveAddr, 0x800D, 1, &controlRegister1);
    if(error != 0)
    {
        return error;
    }    
    modeRAM = (controlRegister1 & 0x1000) >> 12;
    
    return modeRAM; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x5(%rbp)
movl $0x800d, %esi           # imm = 0x800D
movl $0x1, %edx
leaq -0x8(%rbp), %rcx
movzbl -0x5(%rbp), %edi
callq 0x5b10
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x3d56
movl -0x10(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3d6b
movzwl -0x8(%rbp), %eax
andl $0x1000, %eax           # imm = 0x1000
sarl $0xc, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: MLX90640_GetVdd(unsigned short*, paramsMLX90640 const*)
float MLX90640_GetVdd(uint16_t *frameData, const paramsMLX90640 *params)
{
    float vdd;
    float resolutionCorrection;

    int resolutionRAM;    
    
    vdd = frameData[810];
    if(vdd > 32767)
    {
        vdd = vdd - 65536;
    }
    resolutionRAM = (frameData[832] & 0x0C00) >> 10;
    resolutionCorrection = pow(2, (double)params->resolutionEE) / pow(2, (double)resolutionRAM);
    vdd = (resolutionCorrection * vdd - params->vdd25) / params->kVdd + 3.3;
    
    return vdd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x654(%rax), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
movss 0x193b(%rip), %xmm1     # 0x607c
ucomiss %xmm1, %xmm0
jbe 0x475c
movss -0x14(%rbp), %xmm0
movss 0x1931(%rip), %xmm1     # 0x6084
subss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x680(%rax), %eax
shrl $0xa, %eax
andl $0x3, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x24(%rax), %eax
cvtsi2sd %eax, %xmm0
movl $0x2, %edi
callq 0x5ab0
movsd %xmm0, -0x28(%rbp)
cvtsi2sdl -0x1c(%rbp), %xmm0
movl $0x2, %edi
callq 0x5ab0
movaps %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x18(%rbp)
movss -0x18(%rbp), %xmm0
movss -0x14(%rbp), %xmm2
movq -0x10(%rbp), %rax
movswl 0x2(%rax), %eax
cvtsi2ss %eax, %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x10(%rbp), %rax
movswl (%rax), %eax
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x18c3(%rip), %xmm1     # 0x60b8
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: MLX90640_GetTa(unsigned short*, paramsMLX90640 const*)
float MLX90640_GetTa(uint16_t *frameData, const paramsMLX90640 *params)
{
    float ptat;
    float ptatArt;
    float vdd;
    float ta;
    
    vdd = MLX90640_GetVdd(frameData, params);
    
    ptat = frameData[800];
    if(ptat > 32767)
    {
        ptat = ptat - 65536;
    }
    
    ptatArt = frameData[768];
    if(ptatArt > 32767)
    {
        ptatArt = ptatArt - 65536;
    }
    ptatArt = (ptat / (ptat * params->alphaPTAT + ptatArt)) * pow(2, (double)18);
    
    ta = (ptatArt / (1 + params->KvPTAT * (vdd - 3.3)) - params->vPTAT25);
    ta = ta / params->KtPTAT + 25;
    
    return ta;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4710
movss %xmm0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x640(%rax), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
movss 0x1829(%rip), %xmm1     # 0x607c
ucomiss %xmm1, %xmm0
jbe 0x486e
movss -0x14(%rbp), %xmm0
movss 0x181f(%rip), %xmm1     # 0x6084
subss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x600(%rax), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x18(%rbp)
movss -0x18(%rbp), %xmm0
movss 0x17ed(%rip), %xmm1     # 0x607c
ucomiss %xmm1, %xmm0
jbe 0x48aa
movss -0x18(%rbp), %xmm0
movss 0x17e3(%rip), %xmm1     # 0x6084
subss %xmm1, %xmm0
movss %xmm0, -0x18(%rbp)
movss -0x14(%rbp), %xmm0
movss -0x14(%rbp), %xmm1
movq -0x10(%rbp), %rax
movss 0x10(%rax), %xmm3
movss -0x18(%rbp), %xmm2
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
movl $0x2, %edi
movsd 0x17e4(%rip), %xmm0     # 0x60c8
callq 0x5ab0
movaps %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x18(%rbp)
movss -0x18(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movss 0x4(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movss -0x1c(%rbp), %xmm2
cvtss2sd %xmm2, %xmm2
movsd 0x1793(%rip), %xmm3     # 0x60b8
subsd %xmm3, %xmm2
mulsd %xmm2, %xmm1
movsd 0x177b(%rip), %xmm2     # 0x60b0
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movzwl 0xc(%rax), %eax
cvtsi2sd %eax, %xmm1
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x20(%rbp)
movss -0x20(%rbp), %xmm0
movq -0x10(%rbp), %rax
divss 0x8(%rax), %xmm0
movss 0x171c(%rip), %xmm1     # 0x6088
addss %xmm1, %xmm0
movss %xmm0, -0x20(%rbp)
movss -0x20(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: GetMedian(float*, int)
float GetMedian(float *values, int n)
 {
    float temp;
    
    for(int i=0; i<n-1; i++)
    {
        for(int j=i+1; j<n; j++)
        {
            if(values[j] < values[i]) 
            {                
                temp = values[i];
                values[i] = values[j];
                values[j] = temp;
            }
        }
    }
    
    if(n%2==0) 
    {
        return ((values[n/2] + values[n/2 - 1]) / 2.0);
        
    } 
    else 
    {
        return values[n/2];
    }
    
 }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x572e
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x571e
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x5711
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movss -0x18(%rbp), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
jmp 0x5713
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x56ac
jmp 0x5720
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5692
movl -0x14(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x579e
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x28(%rbp), %rax
subl $0x1, %ecx
movslq %ecx, %rcx
addss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x941(%rip), %xmm1      # 0x60d0
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x57c4
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x14(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x4(%rbp), %xmm0
popq %rbp
retq
nopl (%rax,%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: IsPixelBad(unsigned short, paramsMLX90640*)
int IsPixelBad(uint16_t pixel,paramsMLX90640 *params)
{
    for(int i=0; i<5; i++)
    {
        if(pixel == params->outlierPixels[i] || pixel == params->brokenPixels[i])
        {
            return 1;
        }    
    }   
    
    return 0;     
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %di, %ax
movw %ax, -0x6(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x5, -0x14(%rbp)
jge 0x5832
movzwl -0x6(%rbp), %eax
movq -0x10(%rbp), %rcx
movslq -0x14(%rbp), %rdx
movzwl 0x2a66(%rcx,%rdx,2), %ecx
cmpl %ecx, %eax
je 0x581c
movzwl -0x6(%rbp), %eax
movq -0x10(%rbp), %rcx
movslq -0x14(%rbp), %rdx
movzwl 0x2a5c(%rcx,%rdx,2), %ecx
cmpl %ecx, %eax
jne 0x5825
movl $0x1, -0x4(%rbp)
jmp 0x5839
jmp 0x5827
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x57e6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: CheckAdjacentPixels(unsigned short, unsigned short)
int CheckAdjacentPixels(uint16_t pix1, uint16_t pix2)
 {
     int pixPosDif;
     
     pixPosDif = pix1 - pix2;
     if(pixPosDif > -34 && pixPosDif < -30)
     {
         return -6;
     } 
     if(pixPosDif > -2 && pixPosDif < 2)
     {
         return -6;
     } 
     if(pixPosDif > 30 && pixPosDif < 34)
     {
         return -6;
     }
     
     return 0;    
 }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movw %di, %cx
movw %cx, -0x6(%rbp)
movw %ax, -0x8(%rbp)
movzwl -0x6(%rbp), %eax
movzwl -0x8(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0xc(%rbp)
cmpl $-0x22, -0xc(%rbp)
jle 0x5874
cmpl $-0x1e, -0xc(%rbp)
jge 0x5874
movl $0xfffffffa, -0x4(%rbp) # imm = 0xFFFFFFFA
jmp 0x58a5
cmpl $-0x2, -0xc(%rbp)
jle 0x5889
cmpl $0x2, -0xc(%rbp)
jge 0x5889
movl $0xfffffffa, -0x4(%rbp) # imm = 0xFFFFFFFA
jmp 0x58a5
cmpl $0x1e, -0xc(%rbp)
jle 0x589e
cmpl $0x22, -0xc(%rbp)
jge 0x589e
movl $0xfffffffa, -0x4(%rbp) # imm = 0xFFFFFFFA
jmp 0x58a5
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: MLX90640_SetSubPageMode(unsigned char, unsigned char)
int MLX90640_SetSubPageMode(uint8_t slaveAddr, uint8_t deviceMode)
{
    uint16_t controlRegister1;
    int value;
    int error;
    
    value = (deviceMode & 0x01);
    
    error = MLX90640_I2CRead(slaveAddr, 0x800D, 1, &controlRegister1);
    if(error == 0)
    {
        value = (controlRegister1 & 0b11111111111111110) | value;
        error = MLX90640_I2CWrite(slaveAddr, 0x800D, value);
    }    
    
    return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movb %dil, %cl
movb %cl, -0x1(%rbp)
movb %al, -0x2(%rbp)
movzbl -0x2(%rbp), %eax
andl $0x1, %eax
movl %eax, -0x8(%rbp)
movl $0x800d, %esi           # imm = 0x800D
movl $0x1, %edx
leaq -0x4(%rbp), %rcx
movzbl -0x1(%rbp), %edi
callq 0x5b10
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x5916
movzwl -0x4(%rbp), %eax
andl $0x1fffe, %eax          # imm = 0x1FFFE
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movb -0x1(%rbp), %cl
movl -0x8(%rbp), %eax
movl $0x800d, %esi           # imm = 0x800D
movzbl %cl, %edi
movzwl %ax, %edx
callq 0x5ce0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: MLX90640_SetSubPageRepeat(unsigned char, unsigned char)
int MLX90640_SetSubPageRepeat(uint8_t slaveAddr, uint8_t subPageRepeat)
{
    uint16_t controlRegister1;
    int value;
    int error;
    
    value = (subPageRepeat & 0x01)<<3;
    
    error = MLX90640_I2CRead(slaveAddr, 0x800D, 1, &controlRegister1);
    if(error == 0)
    {
        value = (controlRegister1 & 0b1111111111110111) | value;
        error = MLX90640_I2CWrite(slaveAddr, 0x800D, value);
    }    
    
    return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movb %dil, %cl
movb %cl, -0x1(%rbp)
movb %al, -0x2(%rbp)
movzbl -0x2(%rbp), %eax
andl $0x1, %eax
shll $0x3, %eax
movl %eax, -0x8(%rbp)
movl $0x800d, %esi           # imm = 0x800D
movl $0x1, %edx
leaq -0x4(%rbp), %rcx
movzbl -0x1(%rbp), %edi
callq 0x5b10
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x5989
movzwl -0x4(%rbp), %eax
andl $0xfff7, %eax           # imm = 0xFFF7
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movb -0x1(%rbp), %cl
movl -0x8(%rbp), %eax
movl $0x800d, %esi           # imm = 0x800D
movzbl %cl, %edi
movzwl %ax, %edx
callq 0x5ce0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lucaong[P]elixir_mlx90640/src/MLX90640_API.cpp
// Function: MLX90640_SetDataHold(unsigned char, unsigned char)
int MLX90640_SetDataHold(uint8_t slaveAddr, uint8_t dataHold)
{
    uint16_t controlRegister1;
    int value;
    int error;
    
    value = (dataHold & 0x01)<<2;
    
    error = MLX90640_I2CRead(slaveAddr, 0x800D, 1, &controlRegister1);
    if(error == 0)
    {
        value = (controlRegister1 & 0b1111111111111011) | value;
        error = MLX90640_I2CWrite(slaveAddr, 0x800D, value);
    }    
    
    return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movb %dil, %cl
movb %cl, -0x1(%rbp)
movb %al, -0x2(%rbp)
movzbl -0x2(%rbp), %eax
andl $0x1, %eax
shll $0x2, %eax
movl %eax, -0x8(%rbp)
movl $0x800d, %esi           # imm = 0x800D
movl $0x1, %edx
leaq -0x4(%rbp), %rcx
movzbl -0x1(%rbp), %edi
callq 0x5b10
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x5a09
movzwl -0x4(%rbp), %eax
andl $0xfffb, %eax           # imm = 0xFFFB
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movb -0x1(%rbp), %cl
movl -0x8(%rbp), %eax
movl $0x800d, %esi           # imm = 0x800D
movzbl %cl, %edi
movzwl %ax, %edx
callq 0x5ce0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)