LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/LSM303DLHC/LSM303DLHC.cpp
// Function: LSM303DLHC::getAccelerationY()
int16_t LSM303DLHC::getAccelerationY() {
  I2Cdev::readBytes(devAddrA, LSM303DLHC_RA_OUT_Y_L_A | 0x80, 2, buffer);
  if (endianMode == LSM303DLHC_LITTLE_ENDIAN) {
    return (((int16_t)buffer[1]) << 8) | buffer[0];
  } else {
    return (((int16_t)buffer[0]) << 8) | buffer[1];
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x2(%rbx), %rcx
movq 0x1ae36(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0xaa, %esi
movl $0x2, %edx
callq 0x1f630
cmpb $0x0, 0x8(%rbx)
movzbl 0x3(%rbx), %eax
movzbl 0x2(%rbx), %ecx
movl %ecx, %edx
cmovel %eax, %edx
cmovnel %eax, %ecx
shll $0x8, %edx
movzbl %cl, %eax
orl %edx, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/LSM303DLHC/LSM303DLHC.cpp
// Function: LSM303DLHC::getAccelerationZ()
int16_t LSM303DLHC::getAccelerationZ() {
  I2Cdev::readBytes(devAddrA, LSM303DLHC_RA_OUT_Z_L_A | 0x80, 2, buffer);
  if (endianMode == LSM303DLHC_LITTLE_ENDIAN) {
    return (((int16_t)buffer[1]) << 8) | buffer[0];
  } else {
    return (((int16_t)buffer[0]) << 8) | buffer[1];
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x2(%rbx), %rcx
movq 0x1adf2(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0xac, %esi
movl $0x2, %edx
callq 0x1f630
cmpb $0x0, 0x8(%rbx)
movzbl 0x3(%rbx), %eax
movzbl 0x2(%rbx), %ecx
movl %ecx, %edx
cmovel %eax, %edx
cmovnel %eax, %ecx
shll $0x8, %edx
movzbl %cl, %eax
orl %edx, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/LSM303DLHC/LSM303DLHC.cpp
// Function: LSM303DLHC::setMagOutputDataRate(unsigned char)
void LSM303DLHC::setMagOutputDataRate(uint8_t rate){
  uint8_t writeBit;
  if (rate == 0){
    writeBit = LSM303DLHC_DO_RATE_0;
  } else if (rate == 1){
    writeBit = LSM303DLHC_DO_RATE_1;
  } else if (rate == 3){
    writeBit = LSM303DLHC_DO_RATE_3;
  } else if (rate == 7){
    writeBit = LSM303DLHC_DO_RATE_7;
  } else if (rate == 15){
    writeBit = LSM303DLHC_DO_RATE_15;
  } else if (rate == 30){
    writeBit = LSM303DLHC_DO_RATE_30;
  } else if (rate == 75){
    writeBit = LSM303DLHC_DO_RATE_75;
  } else if (rate == 220){
    writeBit = LSM303DLHC_DO_RATE_220;
  }

  I2Cdev::writeBits(devAddrM, LSM303DLHC_RA_CRA_REG_M, LSM303DLHC_DO_BIT,
    LSM303DLHC_DO_LENGTH, writeBit);
}

// Assembly:
xorl %eax, %eax
cmpl $0xe, %esi
jle 0x2cb48
cmpl $0x4a, %esi
jg 0x2cb5b
cmpl $0xf, %esi
je 0x2cb70
cmpl $0x1e, %esi
jne 0x2cb7a
movb $0x5, %al
jmp 0x2cb7a
cmpl $0x1, %esi
je 0x2cb6c
cmpl $0x3, %esi
je 0x2cb78
cmpl $0x7, %esi
jne 0x2cb7a
movb $0x3, %al
jmp 0x2cb7a
cmpl $0x4b, %esi
je 0x2cb74
cmpl $0xdc, %esi
jne 0x2cb7a
movb $0x7, %al
jmp 0x2cb7a
movb $0x1, %al
jmp 0x2cb7a
movb $0x4, %al
jmp 0x2cb7a
movb $0x6, %al
jmp 0x2cb7a
movb $0x2, %al
movzbl 0x1(%rdi), %edi
movzbl %al, %r8d
xorl %esi, %esi
movl $0x4, %edx
movl $0x3, %ecx
jmp 0x1f6b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/LSM303DLHC/LSM303DLHC.cpp
// Function: LSM303DLHC::setMagGain(unsigned short)
void LSM303DLHC::setMagGain(uint16_t gain){
  uint8_t writeBit;
  if (gain == 230){
    writeBit = LSM303DLHC_GN_230;
  } else if (gain == 330){
    writeBit = LSM303DLHC_GN_330;
  } else if (gain == 400){
    writeBit = LSM303DLHC_GN_400;
  } else if (gain == 450){
    writeBit = LSM303DLHC_GN_450;
  } else if (gain == 670){
    writeBit = LSM303DLHC_GN_670;
  } else if (gain == 855){
    writeBit = LSM303DLHC_GN_855;
  } else if (gain == 1100){
    writeBit = LSM303DLHC_GN_1100;
  }

  I2Cdev::writeBits(devAddrM, LSM303DLHC_RA_CRB_REG_M, LSM303DLHC_GN_BIT, LSM303DLHC_GN_LENGTH,
    writeBit);
}

// Assembly:
movb $0x7, %al
cmpl $0x29d, %esi            # imm = 0x29D
jg 0x2cbfe
cmpl $0x14a, %esi            # imm = 0x14A
je 0x2cc1a
cmpl $0x190, %esi            # imm = 0x190
je 0x2cc22
cmpl $0x1c2, %esi            # imm = 0x1C2
jne 0x2cc28
movb $0x4, %al
jmp 0x2cc28
cmpl $0x29e, %esi            # imm = 0x29E
je 0x2cc1e
cmpl $0x357, %esi            # imm = 0x357
je 0x2cc26
cmpl $0x44c, %esi            # imm = 0x44C
jne 0x2cc28
movb $0x1, %al
jmp 0x2cc28
movb $0x6, %al
jmp 0x2cc28
movb $0x3, %al
jmp 0x2cc28
movb $0x5, %al
jmp 0x2cc28
movb $0x2, %al
movzbl 0x1(%rdi), %edi
movzbl %al, %r8d
movl $0x1, %esi
movl $0x7, %edx
movl $0x3, %ecx
jmp 0x1f6b0
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/LSM303DLHC/LSM303DLHC.cpp
// Function: LSM303DLHC::getMagGain()
uint16_t LSM303DLHC::getMagGain(){
  I2Cdev::readBits(devAddrM, LSM303DLHC_RA_CRB_REG_M, LSM303DLHC_GN_BIT, LSM303DLHC_GN_LENGTH,
    buffer);
  uint8_t gain = buffer[0];
  if (gain == LSM303DLHC_GN_230){
    return 230; 
  } else if (gain == LSM303DLHC_GN_330){
    return 330; 
  } else if (gain == LSM303DLHC_GN_400){
    return 400; 
  } else if (gain == LSM303DLHC_GN_450){
    return 450; 
  } else if (gain == LSM303DLHC_GN_670){
    return 670; 
  } else if (gain == LSM303DLHC_GN_855){
    return 855; 
  } else if (gain == LSM303DLHC_GN_1100){
    return 1100; 
  } 
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl 0x1(%rdi), %edi
leaq 0x2(%rbx), %r8
movq 0x1a2f1(%rip), %rax     # 0x46f48
movzwl (%rax), %r9d
movl $0x1, %esi
movl $0x7, %edx
movl $0x3, %ecx
callq 0x1f930
movb 0x2(%rbx), %cl
addb $-0x2, %cl
movw $0x44c, %ax             # imm = 0x44C
cmpb $0x5, %cl
ja 0x2cc8c
movzbl %cl, %eax
leaq 0x9414(%rip), %rcx      # 0x3609c
movzwl (%rcx,%rax,2), %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/LSM303DLHC/LSM303DLHC.cpp
// Function: LSM303DLHC::getMag(short*, short*, short*)
void LSM303DLHC::getMag(int16_t* x, int16_t* y, int16_t* z){
  I2Cdev::readBytes(devAddrM, LSM303DLHC_RA_OUT_X_H_M, 6, buffer);
  *x = ((((int16_t)buffer[0]) << 8) | buffer[1]);
  *z = ((((int16_t)buffer[2]) << 8) | buffer[3]);
  *y = ((((int16_t)buffer[4]) << 8) | buffer[5]);

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movzbl 0x1(%rdi), %edi
leaq 0x2(%r12), %rcx
movq 0x1a24a(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x6, %edx
callq 0x1f630
movzwl 0x2(%r12), %eax
rolw $0x8, %ax
movw %ax, (%r15)
movzwl 0x4(%r12), %eax
rolw $0x8, %ax
movw %ax, (%rbx)
movzwl 0x6(%r12), %eax
rolw $0x8, %ax
movw %ax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/MPR121/MPR121.cpp
// Function: MPR121::getTouchStatus(unsigned char)
bool MPR121::getTouchStatus(uint8_t channel) {
  const uint8_t statusReg = (channel < 8) ? ELE0_ELE7_TOUCH_STATUS : ELE8_ELE11_ELEPROX_TOUCH_STATUS;
  uint8_t buf = 0;
  I2Cdev::readByte(m_devAddr, statusReg, &buf);
  const bool touchActive = (channel < 8) ? (buf & (1 << channel)) > 0 : (buf & (1 << (channel - 8))) > 0;
  return touchActive;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0x7(%rsp), %rbx
movb $0x0, (%rbx)
movzbl (%rdi), %edi
movq 0x19e1b(%rip), %rax     # 0x46f48
movzwl (%rax), %ecx
leal -0x8(%rsi), %edx
xorl %eax, %eax
cmpb $0x8, %sil
setae %al
movzbl %dl, %ebp
cmovbl %esi, %ebp
movl %eax, %esi
movq %rbx, %rdx
callq 0x1f6d0
movzbl (%rbx), %eax
btl %ebp, %eax
setb %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/MPR121/MPR121.cpp
// Function: MPR121::getTouchStatus()
uint16_t MPR121::getTouchStatus() {
  uint16_t statusBuf;
  uint8_t buf;
  I2Cdev::readByte(m_devAddr, ELE0_ELE7_TOUCH_STATUS, &buf);
  statusBuf = buf;
  I2Cdev::readByte(m_devAddr, ELE8_ELE11_ELEPROX_TOUCH_STATUS, &buf);
  statusBuf += (buf << 8);
  return statusBuf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl (%rdi), %edi
movq 0x19dd8(%rip), %r15     # 0x46f48
movzwl (%r15), %ecx
leaq 0x7(%rsp), %r14
xorl %esi, %esi
movq %r14, %rdx
callq 0x1f6d0
movzbl (%r14), %ebp
movzbl (%rbx), %edi
movzwl (%r15), %ecx
movl $0x1, %esi
movq %r14, %rdx
callq 0x1f6d0
movzbl (%r14), %eax
shll $0x8, %eax
orl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/MPR121/MPR121.cpp
// Function: MPR121::serviceCallbacks()
void MPR121::serviceCallbacks() {
  for (uint8_t channel = 0; channel < NUM_CHANNELS; channel++) { 
    bool touchStatus = getTouchStatus(channel);
    if (touchStatus != m_prevTouchStatus[channel]) {
      for (uint8_t type = 0; type < NUM_EVENTS; type++) { 
        const CallbackPtrType cb = touchStatus ? m_callbackMap[channel][TOUCHED] : m_callbackMap[channel][RELEASED]; 
        if (cb != 0) {
          cb();           
        }
      }
      m_prevTouchStatus[channel] = touchStatus; 
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
xorl %r15d, %r15d
movzbl %r15b, %esi
movq %rbx, %rdi
callq 0x1f370
cmpb %al, 0xc8(%rbx,%r15)
je 0x2d220
movl %eax, %ebp
movq %r15, %rax
shlq $0x4, %rax
leaq (%r14,%rax), %rcx
leaq (%r14,%rax), %r12
addq $0x8, %r12
testb %bpl, %bpl
cmovneq %rcx, %r12
movb $0x1, %r13b
movq (%r12), %rax
testq %rax, %rax
je 0x2d213
callq *%rax
decb %r13b
je 0x2d208
movb %bpl, 0xc8(%rbx,%r15)
incq %r15
cmpq $0xc, %r15
jne 0x2d1d3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/MPU6050/MPU6050.cpp
// Function: MPU6050::initialize()
void MPU6050::initialize() {
    setClockSource(MPU6050_CLOCK_PLL_XGYRO);
    setFullScaleGyroRange(MPU6050_GYRO_FS_250);
    setFullScaleAccelRange(MPU6050_ACCEL_FS_2);
    setSleepEnabled(false); // thanks to Jack Elston for pointing this one out!
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
movl $0x6b, %esi
movl $0x2, %edx
movl $0x3, %ecx
movl $0x1, %r8d
callq 0x1f6b0
movzbl (%rbx), %edi
movl $0x1b, %esi
movl $0x4, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0x1f6b0
movzbl (%rbx), %edi
movl $0x1c, %esi
movl $0x4, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0x1f6b0
movzbl (%rbx), %edi
movl $0x6b, %esi
movl $0x6, %edx
xorl %ecx, %ecx
popq %rbx
jmp 0x1f980
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/MPU6050/MPU6050.cpp
// Function: MPU6050::getMotion6(short*, short*, short*, short*, short*, short*)
void MPU6050::getMotion6(int16_t* ax, int16_t* ay, int16_t* az, int16_t* gx, int16_t* gy, int16_t* gz) {
    I2Cdev::readBytes(devAddr, MPU6050_RA_ACCEL_XOUT_H, 14, buffer);
    *ax = (((int16_t)buffer[0]) << 8) | buffer[1];
    *ay = (((int16_t)buffer[2]) << 8) | buffer[3];
    *az = (((int16_t)buffer[4]) << 8) | buffer[5];
    *gx = (((int16_t)buffer[8]) << 8) | buffer[9];
    *gy = (((int16_t)buffer[10]) << 8) | buffer[11];
    *gz = (((int16_t)buffer[12]) << 8) | buffer[13];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
movzbl (%rdi), %edi
leaq 0x1(%r14), %rcx
movq 0x188ab(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3b, %esi
movl $0xe, %edx
callq 0x1f630
movzwl 0x1(%r14), %eax
rolw $0x8, %ax
movw %ax, (%rbp)
movzwl 0x3(%r14), %eax
rolw $0x8, %ax
movw %ax, (%r13)
movzwl 0x5(%r14), %eax
rolw $0x8, %ax
movw %ax, (%r12)
movzwl 0x9(%r14), %eax
rolw $0x8, %ax
movw %ax, (%r15)
movzwl 0xb(%r14), %eax
rolw $0x8, %ax
movw %ax, (%rbx)
movzwl 0xd(%r14), %eax
rolw $0x8, %ax
movq 0x40(%rsp), %rcx
movw %ax, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/MPU6050/MPU6050.cpp
// Function: MPU6050::getAcceleration(short*, short*, short*)
void MPU6050::getAcceleration(int16_t* x, int16_t* y, int16_t* z) {
    I2Cdev::readBytes(devAddr, MPU6050_RA_ACCEL_XOUT_H, 6, buffer);
    *x = (((int16_t)buffer[0]) << 8) | buffer[1];
    *y = (((int16_t)buffer[2]) << 8) | buffer[3];
    *z = (((int16_t)buffer[4]) << 8) | buffer[5];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movzbl (%rdi), %edi
leaq 0x1(%r12), %rcx
movq 0x18813(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3b, %esi
movl $0x6, %edx
callq 0x1f630
movzwl 0x1(%r12), %eax
rolw $0x8, %ax
movw %ax, (%r15)
movzwl 0x3(%r12), %eax
rolw $0x8, %ax
movw %ax, (%r14)
movzwl 0x5(%r12), %eax
rolw $0x8, %ax
movw %ax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/MPU6050/MPU6050.cpp
// Function: MPU6050::getFIFOBytes(unsigned char*, unsigned char)
void MPU6050::getFIFOBytes(uint8_t *data, uint8_t length) {
    if(length > 0){
        I2Cdev::readBytes(devAddr, MPU6050_RA_FIFO_R_W, length, data);
    } else {
    	*data = 0;
    }
}

// Assembly:
movq %rsi, %rcx
testl %edx, %edx
je 0x2f112
movzbl (%rdi), %edi
movq 0x17e47(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movzbl %dl, %edx
movl $0x74, %esi
jmp 0x1f630
movb $0x0, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/MPU6050/MPU6050.cpp
// Function: MPU6050::setMemoryBank(unsigned char, bool, bool)
void MPU6050::setMemoryBank(uint8_t bank, bool prefetchEnabled, bool userBank) {
    bank &= 0x1F;
    if (userBank) bank |= 0x20;
    if (prefetchEnabled) bank |= 0x40;
    I2Cdev::writeByte(devAddr, MPU6050_RA_BANK_SEL, bank);
}

// Assembly:
andb $0x1f, %sil
movzbl %sil, %eax
orb $0x20, %sil
movzbl %sil, %esi
testl %ecx, %ecx
cmovel %eax, %esi
leal 0x40(%rsi), %eax
movzbl %al, %eax
testl %edx, %edx
cmovel %esi, %eax
movzbl (%rdi), %edi
movzbl %al, %edx
movl $0x6d, %esi
jmp 0x1f5d0
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/MPU6050/MPU6050.cpp
// Function: MPU6050::readMemoryBlock(unsigned char*, unsigned short, unsigned char, unsigned char)
void MPU6050::readMemoryBlock(uint8_t *data, uint16_t dataSize, uint8_t bank, uint8_t address) {
    setMemoryBank(bank);
    setMemoryStartAddress(address);
    uint8_t chunkSize;
    for (uint16_t i = 0; i < dataSize;) {
        // determine correct chunk size according to bank position and data size
        chunkSize = MPU6050_DMP_MEMORY_CHUNK_SIZE;

        // make sure we don't go past the data size
        if (i + chunkSize > dataSize) chunkSize = dataSize - i;

        // make sure this chunk doesn't go past the bank boundary (256 bytes)
        if (chunkSize > 256 - address) chunkSize = 256 - address;

        // read the chunk of data as specified
        I2Cdev::readBytes(devAddr, MPU6050_RA_MEM_R_W, chunkSize, data + i);
        
        // increase byte index by [chunkSize]
        i += chunkSize;

        // uint8_t automatically wraps to 0 at 256
        address += chunkSize;

        // if we aren't done, update bank (if necessary) and address
        if (i < dataSize) {
            if (address == 0) bank++;
            setMemoryBank(bank);
            setMemoryStartAddress(address);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebx
movl %edx, %r14d
movq %rsi, 0x10(%rsp)
movq %rdi, %r12
movzbl (%rdi), %edi
movl %ecx, 0xc(%rsp)
movl %ecx, %edx
andl $0x1f, %edx
movl $0x6d, %esi
callq 0x1f5d0
movzbl (%r12), %edi
movl $0x6e, %esi
movl %ebx, %edx
callq 0x1f5d0
testl %r14d, %r14d
je 0x2fb4d
xorl %r15d, %r15d
xorl %ebp, %ebp
leal 0x10(%r15), %eax
cmpl %r14d, %eax
ja 0x2fab5
movl $0x10, %eax
jmp 0x2faba
movl %r14d, %eax
subl %ebp, %eax
movl %eax, %ecx
movl $0xff, %edx
andl %edx, %ecx
movzbl %bl, %ebx
movl $0x100, %r13d           # imm = 0x100
subl %ebx, %r13d
cmpl %ecx, %r13d
cmovael %eax, %r13d
movzbl (%r12), %edi
movl %r15d, %ecx
addq 0x10(%rsp), %rcx
movq 0x1745e(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl %r13d, %ebp
andl %edx, %ebp
movl $0x6f, %esi
movl %ebp, %edx
callq 0x1f630
addl %r15d, %ebp
addb %r13b, %bl
movzwl %bp, %eax
cmpl %r14d, %eax
jae 0x2fb40
cmpb $0x1, %bl
movl 0xc(%rsp), %eax
adcb $0x0, %al
movl %eax, 0xc(%rsp)
andb $0x1f, %al
movzbl (%r12), %edi
movzbl %al, %edx
movl $0x6d, %esi
callq 0x1f5d0
movzbl (%r12), %edi
movzbl %bl, %edx
movl $0x6e, %esi
callq 0x1f5d0
movzwl %bp, %r15d
cmpl %r14d, %r15d
jb 0x2faa5
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/MPU6050/MPU6050.cpp
// Function: MPU6050::CalibrateGyro(unsigned char)
void MPU6050::CalibrateGyro(uint8_t Loops ) {
  double kP = 0.3;
  double kI = 90;
  float x;
  x = (100 - map(Loops, 1, 5, 20, 0)) * .01;
  kP *= x;
  kI *= x;
  
  PID( 0x43,  kP, kI,  Loops);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %edi
movl $0x1, %esi
movl $0x5, %edx
movl $0x14, %ecx
xorl %r8d, %r8d
callq 0x1f2a0
movl $0x64, %ecx
subq %rax, %rcx
cvtsi2sd %rcx, %xmm0
mulsd 0x6101(%rip), %xmm0     # 0x360a8
cvtsd2ss %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
mulsd 0x60f6(%rip), %xmm0     # 0x360b0
cvtsd2ss %xmm0, %xmm0
mulss 0x6102(%rip), %xmm1     # 0x360c8
movq %r14, %rdi
movl $0x43, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1f950
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/MPU6050/MPU6050.cpp
// Function: MPU6050::CalibrateAccel(unsigned char)
void MPU6050::CalibrateAccel(uint8_t Loops ) {

	float kP = 0.3;
	float kI = 20;
	float x;
	x = (100 - map(Loops, 1, 5, 20, 0)) * .01;
	kP *= x;
	kI *= x;
	PID( 0x3B, kP, kI,  Loops);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %edi
movl $0x1, %esi
movl $0x5, %edx
movl $0x14, %ecx
xorl %r8d, %r8d
callq 0x1f2a0
movl $0x64, %ecx
subq %rax, %rcx
cvtsi2sd %rcx, %xmm0
mulsd 0x5c35(%rip), %xmm0     # 0x360a8
cvtsd2ss %xmm0, %xmm1
movss 0x5c69(%rip), %xmm0     # 0x360e8
mulss %xmm1, %xmm0
mulss 0x5c61(%rip), %xmm1     # 0x360ec
movq %r14, %rdi
movl $0x3b, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1f950
nop
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/MPU9150/MPU9150.cpp
// Function: MPU9150::getMotion9(short*, short*, short*, short*, short*, short*, short*, short*, short*)
void MPU9150::getMotion9(int16_t* ax, int16_t* ay, int16_t* az, int16_t* gx, int16_t* gy, int16_t* gz, int16_t* mx, int16_t* my, int16_t* mz) {

    //get accel and gyro
    getMotion6(ax, ay, az, gx, gy, gz);

    //read mag
    I2Cdev::writeByte(devAddr, MPU9150_RA_INT_PIN_CFG, 0x02); //set i2c bypass enable pin to true to access magnetometer
    delay(10);
    I2Cdev::writeByte(MPU9150_RA_MAG_ADDRESS, 0x0A, 0x01); //enable the magnetometer
    delay(10);
    I2Cdev::readBytes(MPU9150_RA_MAG_ADDRESS, MPU9150_RA_MAG_XOUT_L, 6, buffer);
    *mx = (((int16_t)buffer[0]) << 8) | buffer[1];
    *my = (((int16_t)buffer[2]) << 8) | buffer[3];
    *mz = (((int16_t)buffer[4]) << 8) | buffer[5];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x48(%rsp), %r14
movq 0x40(%rsp), %r15
movq 0x38(%rsp), %r12
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
callq 0x1f2e0
movzbl (%rbx), %edi
movl $0x37, %esi
movl $0x2, %edx
callq 0x1f5d0
movl $0xa, %edi
callq 0x1f460
movl $0xc, %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0x1f5d0
movl $0xa, %edi
callq 0x1f460
leaq 0x1(%rbx), %rcx
movq 0x153b9(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0xc, %edi
movl $0x3, %esi
movl $0x6, %edx
callq 0x1f630
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
movw %ax, (%r12)
movzwl 0x3(%rbx), %eax
rolw $0x8, %ax
movw %ax, (%r15)
movzwl 0x5(%rbx), %eax
rolw $0x8, %ax
movw %ax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/MPU9150/MPU9150.cpp
// Function: MPU9150::readMemoryBlock(unsigned char*, unsigned short, unsigned char, unsigned char)
void MPU9150::readMemoryBlock(uint8_t *data, uint16_t dataSize, uint8_t bank, uint8_t address) {
    setMemoryBank(bank);
    setMemoryStartAddress(address);
    uint8_t chunkSize;
    for (uint16_t i = 0; i < dataSize;) {
        // determine correct chunk size according to bank position and data size
        chunkSize = MPU9150_DMP_MEMORY_CHUNK_SIZE;

        // make sure we don't go past the data size
        if (i + chunkSize > dataSize) chunkSize = dataSize - i;

        // make sure this chunk doesn't go past the bank boundary (256 bytes)
        if (chunkSize > 256 - address) chunkSize = 256 - address;

        // read the chunk of data as specified
        I2Cdev::readBytes(devAddr, MPU9150_RA_MEM_R_W, chunkSize, data + i);
        
        // increase byte index by [chunkSize]
        i += chunkSize;

        // uint8_t automatically wraps to 0 at 256
        address += chunkSize;

        // if we aren't done, update bank (if necessary) and address
        if (i < dataSize) {
            if (address == 0) bank++;
            setMemoryBank(bank);
            setMemoryStartAddress(address);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebx
movl %edx, %r14d
movq %rsi, 0x10(%rsp)
movq %rdi, %r12
movzbl (%rdi), %edi
movl %ecx, 0xc(%rsp)
movl %ecx, %edx
andl $0x1f, %edx
movl $0x6d, %esi
callq 0x1f5d0
movzbl (%r12), %edi
movl $0x6e, %esi
movl %ebx, %edx
callq 0x1f5d0
testl %r14d, %r14d
je 0x32d61
xorl %r15d, %r15d
xorl %ebp, %ebp
leal 0x10(%r15), %eax
cmpl %r14d, %eax
ja 0x32cc9
movl $0x10, %eax
jmp 0x32cce
movl %r14d, %eax
subl %ebp, %eax
movl %eax, %ecx
movl $0xff, %edx
andl %edx, %ecx
movzbl %bl, %ebx
movl $0x100, %r13d           # imm = 0x100
subl %ebx, %r13d
cmpl %ecx, %r13d
cmovael %eax, %r13d
movzbl (%r12), %edi
movl %r15d, %ecx
addq 0x10(%rsp), %rcx
movq 0x1424a(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl %r13d, %ebp
andl %edx, %ebp
movl $0x6f, %esi
movl %ebp, %edx
callq 0x1f630
addl %r15d, %ebp
addb %r13b, %bl
movzwl %bp, %eax
cmpl %r14d, %eax
jae 0x32d54
cmpb $0x1, %bl
movl 0xc(%rsp), %eax
adcb $0x0, %al
movl %eax, 0xc(%rsp)
andb $0x1f, %al
movzbl (%r12), %edi
movzbl %al, %edx
movl $0x6d, %esi
callq 0x1f5d0
movzbl (%r12), %edi
movzbl %bl, %edx
movl $0x6e, %esi
callq 0x1f5d0
movzwl %bp, %r15d
cmpl %r14d, %r15d
jb 0x32cb9
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/MS5803/MS5803.cpp
// Function: MS5803::_getCalConstants()
void MS5803::_getCalConstants(){
	/* Query and parse calibration constants */
	I2Cdev::readBytes(_dev_address,MS5803_PROM_C1,2,_buffer);
	_c1_SENSt1 =   (((uint16_t)_buffer[0] << 8) + _buffer[1]);
	I2Cdev::readBytes(_dev_address,MS5803_PROM_C2,2,_buffer);
	_c2_OFFt1 =    (((uint16_t)_buffer[0] << 8) + _buffer[1]);
	I2Cdev::readBytes(_dev_address,MS5803_PROM_C3,2,_buffer);
	_c3_TCS =      (((uint16_t)_buffer[0] << 8) + _buffer[1]);
	I2Cdev::readBytes(_dev_address,MS5803_PROM_C4,2,_buffer);
	_c4_TCO =      (((uint16_t)_buffer[0] << 8) + _buffer[1]);
	I2Cdev::readBytes(_dev_address,MS5803_PROM_C5,2,_buffer);
	_c5_Tref =     (((uint16_t)_buffer[0] << 8) + _buffer[1]);
	I2Cdev::readBytes(_dev_address,MS5803_PROM_C6,2,_buffer);
	_c6_TEMPSENS = (((uint16_t)_buffer[0] << 8) + _buffer[1]);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl 0xe(%rdi), %edi
movq 0x13b80(%rip), %r14     # 0x46f48
movzwl (%r14), %r8d
movl $0xa2, %esi
movl $0x2, %edx
movq %rbx, %rcx
callq 0x1f630
movzwl (%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x18(%rbx)
movzbl 0xe(%rbx), %edi
movzwl (%r14), %r8d
movl $0xa4, %esi
movl $0x2, %edx
movq %rbx, %rcx
callq 0x1f630
movzwl (%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x1c(%rbx)
movzbl 0xe(%rbx), %edi
movzwl (%r14), %r8d
movl $0xa6, %esi
movl $0x2, %edx
movq %rbx, %rcx
callq 0x1f630
movzwl (%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x20(%rbx)
movzbl 0xe(%rbx), %edi
movzwl (%r14), %r8d
movl $0xa8, %esi
movl $0x2, %edx
movq %rbx, %rcx
callq 0x1f630
movzwl (%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x24(%rbx)
movzbl 0xe(%rbx), %edi
movzwl (%r14), %r8d
movl $0xaa, %esi
movl $0x2, %edx
movq %rbx, %rcx
callq 0x1f630
movzwl (%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x28(%rbx)
movzbl 0xe(%rbx), %edi
movzwl (%r14), %r8d
movl $0xac, %esi
movl $0x2, %edx
movq %rbx, %rcx
callq 0x1f630
movzwl (%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x2c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/MS5803/MS5803.cpp
// Function: MS5803::_getCalConstant(unsigned char)
int32_t MS5803::_getCalConstant(uint8_t constant_no){
	switch ( constant_no ) {
		case 1: return _c1_SENSt1;
		case 2: return _c2_OFFt1;
		case 3: return _c3_TCS;
		case 4: return _c4_TCO;
		case 5: return _c5_Tref;
		case 6: return _c6_TEMPSENS;
		default: return 0;
	}
}

// Assembly:
decl %esi
cmpl $0x5, %esi
ja 0x334e5
leaq 0x2ce4(%rip), %rax      # 0x361a8
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl 0x18(%rdi), %eax
retq
movl 0x28(%rdi), %eax
retq
movl 0x20(%rdi), %eax
retq
movl 0x24(%rdi), %eax
retq
movl 0x1c(%rdi), %eax
retq
movl 0x2c(%rdi), %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/MS5803/MS5803.cpp
// Function: serialPrint64(long)
void serialPrint64(int64_t val64){
	int32_t result_high = val64 / 10000000L;
	int32_t result_low = val64 - (10000000LL * result_high);
	Serial.print(result_high);
	Serial.print(result_low);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movabsq $-0x29406b2a1a85bd43, %rcx # imm = 0xD6BF94D5E57A42BD
movq %rdi, %rax
imulq %rcx
leaq (%rdx,%rdi), %rsi
movq %rsi, %rax
shrq $0x3f, %rax
shrq $0x17, %rsi
addl %eax, %esi
imull $0xff676980, %esi, %ebx # imm = 0xFF676980
addl %edi, %ebx
movq 0x13176(%rip), %r14     # 0x46f90
movq %r14, %rdi
callq 0x1f9f0
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1f9f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/SSD1308/SSD1308.cpp
// Function: SSD1308::clearDisplay()
void SSD1308::clearDisplay()
{
  setDisplayOff();
  setPageAddress(0, 7);     // all pages
  setColumnAddress(0, 127); // all columns
  for (uint8_t page = 0; page < 8; page++)
  {
    for (uint8_t col = 0; col < 128; col++)
    {
      sendData(0x0);
    }
  }
  setDisplayOn();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movzbl (%rdi), %edi
movl $0x80, %esi
movl $0xae, %edx
callq 0x1f5d0
leaq 0xa(%rsp), %rcx
movw $0x22, (%rcx)
movb $0x7, 0x2(%rcx)
movzbl (%rbx), %edi
movl $0x80, %esi
movl $0x3, %edx
callq 0x1f150
leaq 0xd(%rsp), %rcx
movw $0x21, (%rcx)
movb $0x7f, 0x2(%rcx)
movzbl (%rbx), %edi
movl $0x80, %esi
movl $0x3, %edx
callq 0x1f150
xorl %ebp, %ebp
movb $-0x80, %r14b
movzbl (%rbx), %edi
movl $0x40, %esi
xorl %edx, %edx
callq 0x1f5d0
decb %r14b
jne 0x3403c
incb %bpl
cmpb $0x8, %bpl
jne 0x34039
movzbl (%rbx), %edi
movl $0x80, %esi
movl $0xaf, %edx
callq 0x1f5d0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/SSD1308/SSD1308.cpp
// Function: SSD1308::fillDisplay()
void SSD1308::fillDisplay()
{
  setPageAddress(0, MAX_PAGE);      // all pages
  setColumnAddress(0, MAX_COL); // all columns

  uint8_t b = 0;
  for (uint8_t page = 0; page < PAGES; page++)
  {
    for (uint8_t col = 0; col < COLUMNS; col++)
    {
      sendData(b++);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2(%rsp), %rcx
movw $0x22, (%rcx)
movb $0x7, 0x2(%rcx)
movzbl (%rdi), %edi
movl $0x80, %esi
movl $0x3, %edx
callq 0x1f150
leaq 0x5(%rsp), %rcx
movw $0x21, (%rcx)
movb $0x7f, 0x2(%rcx)
movzbl (%rbx), %edi
movl $0x80, %esi
movl $0x3, %edx
callq 0x1f150
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %r14d, %r14d
movzbl (%rbx), %edi
movzbl %r14b, %edx
incb %r14b
movl $0x40, %esi
callq 0x1f5d0
movl %r15d, %eax
xorb %r14b, %al
negb %al
jno 0x34142
incb %bpl
movl %r14d, %r15d
cmpb $0x8, %bpl
jne 0x34142
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/SSD1308/SSD1308.cpp
// Function: SSD1308::writeChar(char)
void SSD1308::writeChar(char chr)
{
//#ifdef SSD1308_USE_FONT
  const uint8_t char_index = chr - 0x20;
  for (uint8_t i = 0; i < 8; i++) {
     const uint8_t b = pgm_read_byte( &fontData[char_index][i] );
     sendData( b ); 
  }
//#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
addb $-0x20, %sil
movzbl %sil, %r14d
shll $0x3, %r14d
xorl %r15d, %r15d
leaq 0x2257(%rip), %r12      # 0x363f0
leaq (%r14,%r15), %rax
movzbl (%r12,%rax), %edx
movzbl (%rbx), %edi
movl $0x40, %esi
callq 0x1f5d0
incq %r15
cmpq $0x8, %r15
jne 0x34199
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/TCA6424A/TCA6424A.cpp
// Function: TCA6424A::readAll(unsigned char*, unsigned char*, unsigned char*)
void TCA6424A::readAll(uint8_t *bank0, uint8_t *bank1, uint8_t *bank2) {
    I2Cdev::readBytes(devAddr, TCA6424A_RA_INPUT0, 3, buffer);
    *bank0 = buffer[0];
    *bank1 = buffer[1];
    *bank2 = buffer[2];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movzbl (%rdi), %edi
leaq 0x1(%r12), %rcx
movq 0x129bf(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
xorl %esi, %esi
movl $0x3, %edx
callq 0x1f630
movb 0x1(%r12), %al
movb %al, (%r15)
movb 0x2(%r12), %al
movb %al, (%r14)
movb 0x3(%r12), %al
movb %al, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/TCA6424A/TCA6424A.cpp
// Function: TCA6424A::writeAll(unsigned char, unsigned char, unsigned char)
void TCA6424A::writeAll(uint8_t bank0, uint8_t bank1, uint8_t bank2) {
    buffer[0] = bank0;
    buffer[1] = bank1;
    buffer[2] = bank2;
    I2Cdev::writeBytes(devAddr, TCA6424A_RA_OUTPUT0 | TCA6424A_AUTO_INCREMENT, 3, buffer);
}

// Assembly:
leaq 0x1(%rdi), %rax
movb %sil, 0x1(%rdi)
movb %dl, 0x2(%rdi)
movb %cl, 0x3(%rdi)
movzbl (%rdi), %edi
movl $0x84, %esi
movl $0x3, %edx
movq %rax, %rcx
jmp 0x1f150
nop
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/TCA6424A/TCA6424A.cpp
// Function: TCA6424A::setAllPolarity(unsigned char, unsigned char, unsigned char)
void TCA6424A::setAllPolarity(uint8_t bank0, uint8_t bank1, uint8_t bank2) {
    buffer[0] = bank0;
    buffer[1] = bank1;
    buffer[2] = bank2;
    I2Cdev::writeBytes(devAddr, TCA6424A_RA_POLARITY0 | TCA6424A_AUTO_INCREMENT, 3, buffer);
}

// Assembly:
leaq 0x1(%rdi), %rax
movb %sil, 0x1(%rdi)
movb %dl, 0x2(%rdi)
movb %cl, 0x3(%rdi)
movzbl (%rdi), %edi
movl $0x88, %esi
movl $0x3, %edx
movq %rax, %rcx
jmp 0x1f150
nop
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/TCA6424A/TCA6424A.cpp
// Function: TCA6424A::getAllDirection(unsigned char*, unsigned char*, unsigned char*)
void TCA6424A::getAllDirection(uint8_t *bank0, uint8_t *bank1, uint8_t *bank2) {
    I2Cdev::readBytes(devAddr, TCA6424A_RA_CONFIG0, 3, buffer);
    *bank0 = buffer[0];
    *bank1 = buffer[1];
    *bank2 = buffer[2];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movzbl (%rdi), %edi
leaq 0x1(%r12), %rcx
movq 0x12679(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0xc, %esi
movl $0x3, %edx
callq 0x1f630
movb 0x1(%r12), %al
movb %al, (%r15)
movb 0x2(%r12), %al
movb %al, (%r14)
movb 0x3(%r12), %al
movb %al, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/TCA6424A/TCA6424A.cpp
// Function: TCA6424A::setAllDirection(unsigned char, unsigned char, unsigned char)
void TCA6424A::setAllDirection(uint8_t bank0, uint8_t bank1, uint8_t bank2) {
    buffer[0] = bank0;
    buffer[1] = bank1;
    buffer[2] = bank2;
    I2Cdev::writeBytes(devAddr, TCA6424A_RA_CONFIG0 | TCA6424A_AUTO_INCREMENT, 3, buffer);
}

// Assembly:
leaq 0x1(%rdi), %rax
movb %sil, 0x1(%rdi)
movb %dl, 0x2(%rdi)
movb %cl, 0x3(%rdi)
movzbl (%rdi), %edi
movl $0x8c, %esi
movl $0x3, %edx
movq %rax, %rcx
jmp 0x1f150
// File: /workspace/github_cpp_makefile_star2_O1/yasz24[P]eau2/src/network/./network_ip.h
// Function: NetworkIP::send_msg(Message*)
void send_msg(Message* msg) {
        size_t target_node = msg->target();
        //std::cout << "send msg target: " << target_node << "\n";
        NodeInfo &target = nodes_[target_node];
        int server_port = ntohs(target.address.sin_port);
        char server_ip[INET_ADDRSTRLEN];
        inet_ntop(AF_INET, &target.address.sin_addr, server_ip, INET_ADDRSTRLEN);
        //std::cout << "attempting to send msg to: " << server_ip << ":" << server_port << "\n";
        int connection = socket(AF_INET, SOCK_STREAM, 0);
        assert(connection >= 0);
        if (connect(connection, (sockaddr*)&target.address, sizeof(target.address)) < 0) {
            perror("connection failed. Error");
            return;
        }
        msg->id_ = msg_id;
        msg_id++;
        //assert(connect(connection, (sockaddr*)&target.address, sizeof(target.address)) >= 0);
        char* serialized = msg->serialize();
        //std::cout << "sending msg: " << serialized << "\n";
        size_t length = strlen(serialized);
        send(connection, &length, sizeof(size_t), 0);
        send(connection, serialized, length, 0);
        close(connection);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq 0x20(%rsi), %rax
movq 0x10(%rdi), %r12
leaq (%rax,%rax,4), %r13
leaq 0x1c(%r12,%r13,8), %rsi
leaq -0x40(%rbp), %rdx
movl $0x2, %edi
movl $0x10, %ecx
callq 0x7260
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x7090
testl %eax, %eax
js 0x7da0
movl %eax, %ebx
leaq (%r12,%r13,8), %rsi
addq $0x18, %rsi
movl %eax, %edi
movl $0x10, %edx
callq 0x71b0
testl %eax, %eax
js 0x7d92
movq 0x40(%r15), %rax
movq %rax, 0x28(%r14)
incq %rax
movq %rax, 0x40(%r15)
movq (%r14), %rax
movq %r14, %rdi
callq *0x38(%rax)
movq %rax, %r14
movq %rax, %rdi
callq 0x7100
leaq -0x30(%rbp), %r15
movq %rax, (%r15)
movl $0x8, %edx
movl %ebx, %edi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x7130
movq (%r15), %rdx
movl %ebx, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x7130
movl %ebx, %edi
callq 0x7400
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x153b6(%rip), %rdi     # 0x1d14f
callq 0x71c0
jmp 0x7d83
leaq 0x1535d(%rip), %rdi     # 0x1d104
leaq 0x15366(%rip), %rsi     # 0x1d114
leaq 0x1536e(%rip), %rcx     # 0x1d123
movl $0x89, %edx
callq 0x7150
nop
// File: /workspace/github_cpp_makefile_star2_O1/yasz24[P]eau2/src/network/./network_ip.h
// Function: NetworkIP::recv_msg()
Message* recv_msg() {
        sockaddr_in sender;
        socklen_t addrlen = sizeof(sender);
        int req = accept(sock_, (sockaddr*)&sender, &addrlen);
        size_t size = 0;
        read(req, &size, sizeof(size_t));
        char* buf = new char[size];
        int rd = 0;
        while (rd != size) {
            rd+= read(req, buf + rd, size - rd);
        }
        //std::cout << "received msg: " << buf << "\n";
        Deserializable ds;
        Message* msg = dynamic_cast<Message*>(ds.deserialize(buf));
        close(req);
        return msg;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
leaq -0x28(%rbp), %rdx
movl $0x10, (%rdx)
movl 0x28(%rdi), %edi
leaq -0x40(%rbp), %rsi
callq 0x70d0
movl %eax, %ebx
leaq -0x30(%rbp), %r14
movq $0x0, (%r14)
movl $0x8, %edx
movl %eax, %edi
movq %r14, %rsi
callq 0x7300
movq (%r14), %r14
movq %r14, %rdi
callq 0x7030
movq %rax, %r15
testq %r14, %r14
je 0x7e33
xorl %r12d, %r12d
leaq (%r15,%r12), %rsi
movq %r14, %rdx
subq %r12, %rdx
movl %ebx, %edi
callq 0x7300
addl %eax, %r12d
movslq %r12d, %r12
cmpq %r14, %r12
jne 0x7e17
leaq -0x21(%rbp), %rdi
movq %r15, %rsi
callq 0x14b60
testq %rax, %rax
je 0x7e61
leaq 0x203fd(%rip), %rsi     # 0x28248
leaq 0x2048e(%rip), %rdx     # 0x282e0
movq %rax, %rdi
xorl %ecx, %ecx
callq 0x7280
movq %rax, %r14
jmp 0x7e64
xorl %r14d, %r14d
movl %ebx, %edi
callq 0x7400
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yasz24[P]eau2/src/network/./network_ip.h
// Function: NetworkIP::init_sock_(char*, unsigned long)
void init_sock_(char* ip, size_t port) {
        assert((sock_ = socket(AF_INET, SOCK_STREAM, 0)) >= 0);
        int opt =1;
        assert(setsockopt(sock_, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt) == 0));
        ip_.sin_family = AF_INET;
        //ip_.sin_addr.s_addr = inet_addr(ip);
        inet_pton(AF_INET, ip, &ip_.sin_addr);
        ip_.sin_port = htons(port);
        //int res = bind(sock_, (sockaddr*) &ip_, sizeof(ip_));
        if( bind(sock_, (sockaddr*) &ip_, sizeof(ip_)) < 0){
            perror("bind failed. Error");
            return;
        }
        if( (listen(sock_, 100)) < 0){
            perror("listen failed. Error");
            return;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x7090
movl %eax, 0x28(%rbx)
testl %eax, %eax
js 0x7f4e
leaq -0x24(%rbp), %rcx
movl $0x1, (%rcx)
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
xorl %r8d, %r8d
callq 0x73c0
testl %eax, %eax
je 0x7f6d
leaq 0x2c(%rbx), %r12
movw $0x2, 0x2c(%rbx)
leaq 0x30(%rbx), %rdx
movl $0x2, %edi
movq %r15, %rsi
callq 0x73e0
rolw $0x8, %r14w
movw %r14w, 0x2e(%rbx)
movl 0x28(%rbx), %edi
movq %r12, %rsi
movl $0x10, %edx
callq 0x7060
testl %eax, %eax
js 0x7f37
movl 0x28(%rbx), %edi
movl $0x64, %esi
callq 0x7270
testl %eax, %eax
js 0x7f40
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15310(%rip), %rdi     # 0x1d24e
jmp 0x7f47
leaq 0x1531a(%rip), %rdi     # 0x1d261
callq 0x71c0
jmp 0x7f2a
leaq 0x1525b(%rip), %rdi     # 0x1d1b0
leaq 0x151b8(%rip), %rsi     # 0x1d114
leaq 0x1527c(%rip), %rcx     # 0x1d1df
movl $0x6e, %edx
callq 0x7150
leaq 0x15296(%rip), %rdi     # 0x1d20a
leaq 0x15199(%rip), %rsi     # 0x1d114
leaq 0x1525d(%rip), %rcx     # 0x1d1df
movl $0x70, %edx
callq 0x7150
// File: /workspace/github_cpp_makefile_star2_O1/yasz24[P]eau2/src/network/./network.h
// Function: Register::serialize()
char* serialize() {
        Serializable* sb = new Serializable();
        sb->initSerialize("Register");
        sb->write("kind_", (int)kind_);
        sb->write("sender_", sender_);
        sb->write("target_", target_);
        sb->write("id_", id_);
        sb->write("port", port_);
        sb->write("client", client);
        sb->endSerialize();
        char* value = sb->get();
        delete sb;
        return value;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x8, %edi
callq 0x7230
movq %rax, %rbx
movq %rax, %rdi
callq 0x80aa
leaq 0x15370(%rip), %rsi     # 0x1d336
movq %rbx, %rdi
callq 0x810c
movl 0x10(%r14), %edx
leaq 0x1529d(%rip), %rsi     # 0x1d276
movq %rbx, %rdi
callq 0x8178
movq 0x18(%r14), %rdx
leaq 0x15290(%rip), %rsi     # 0x1d27c
movq %rbx, %rdi
callq 0x81e6
movq 0x20(%r14), %rdx
leaq 0x15285(%rip), %rsi     # 0x1d284
movq %rbx, %rdi
callq 0x81e6
movq 0x28(%r14), %rdx
leaq 0x155b0(%rip), %rsi     # 0x1d5c2
movq %rbx, %rdi
callq 0x81e6
movq 0x38(%r14), %rdx
leaq 0x1531a(%rip), %rsi     # 0x1d33f
movq %rbx, %rdi
callq 0x81e6
movq 0x30(%r14), %rdx
leaq 0x1530c(%rip), %rsi     # 0x1d344
movq %rbx, %rdi
callq 0x8576
movq (%rbx), %r14
movl $0x4, %esi
movq %r14, %rdi
callq 0x8260
movq 0x10(%r14), %rax
movq 0x20(%r14), %rcx
movl $0x7d207d20, (%rax,%rcx) # imm = 0x7D207D20
addq $0x4, 0x20(%r14)
movq (%rbx), %rdi
callq 0x82d0
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x8086
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x7200
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x7200
movq %r14, %rdi
callq 0x73b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/yasz24[P]eau2/src/network/./../utils/string.h
// Function: StrBuff::grow_by_(unsigned long)
void grow_by_(size_t step) {
        if (step + size_ < capacity_) return;
        capacity_ *= 2;
        if (step + size_ >= capacity_) capacity_ += step;        
        char* oldV = val_;
        val_ = new char[capacity_];
        memcpy(val_, oldV, size_);
        delete[] oldV;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rax
movq 0x20(%rdi), %rbx
leaq (%rbx,%rsi), %rcx
cmpq %rax, %rcx
jb 0x82c5
movq %rdi, %r14
leaq (%rax,%rax), %rdx
xorl %edi, %edi
cmpq %rdx, %rcx
cmovbq %rdi, %rsi
leaq (%rsi,%rax,2), %rdi
movq %rdi, 0x18(%r14)
movq 0x10(%r14), %r15
callq 0x7030
movq %rax, 0x10(%r14)
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x71a0
testq %r15, %r15
je 0x82c5
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x72b0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/yasz24[P]eau2/src/network/./../utils/string.h
// Function: StrBuff::get()
String* get() {
        assert(val_ != nullptr); // can be called only once
        grow_by_(1);     // ensure space for terminator
        val_[size_] = '\0'; // terminate
        String *res = new String(true, val_, size_);
        val_ = new char[capacity_ = 10]; // val_ was consumed above
        size_ = 0;
        return res;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpq $0x0, 0x10(%rdi)
je 0x8352
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8260
movq 0x10(%rbx), %rax
movq 0x20(%rbx), %rcx
movb $0x0, (%rax,%rcx)
movl $0x20, %edi
callq 0x7230
movq %rax, %r14
movq 0x10(%rbx), %rax
movq 0x20(%rbx), %rcx
movq $0x0, 0x8(%r14)
leaq 0x2013d(%rip), %rdx     # 0x28458
movq %rdx, (%r14)
cmpb $0x0, (%rax,%rcx)
jne 0x8371
movq %rcx, 0x10(%r14)
movq %rax, 0x18(%r14)
movq $0xa, 0x18(%rbx)
movl $0xa, %edi
callq 0x7030
movq %rax, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x14f5c(%rip), %rdi     # 0x1d2b5
leaq 0x14f65(%rip), %rsi     # 0x1d2c5
leaq 0x14f72(%rip), %rcx     # 0x1d2d9
movl $0x8e, %edx
callq 0x7150
leaq 0x14f78(%rip), %rdi     # 0x1d2f0
leaq 0x14f46(%rip), %rsi     # 0x1d2c5
leaq 0x14f80(%rip), %rcx     # 0x1d306
movl $0x1d, %edx
callq 0x7150
// File: /workspace/github_cpp_makefile_star2_O1/yasz24[P]eau2/src/network/./../utils/string.h
// Function: String::equals(Object*)
bool equals(Object* other) {
        if (other == this) return true;
        String* x = dynamic_cast<String *>(other);
        if (x == nullptr) return false;
        if (size_ != x->size_) return false;
        return strncmp(cstr_, x->cstr_, size_) == 0;
    }

// Assembly:
cmpq %rdi, %rsi
je 0x848a
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x848d
leaq 0x1fdd4(%rip), %rax     # 0x28248
leaq 0x2001d(%rip), %rdx     # 0x28498
movq %rsi, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x7280
jmp 0x848f
movb $0x1, %al
retq
xorl %eax, %eax
testq %rax, %rax
je 0x84b2
movq 0x10(%rbx), %rdx
cmpq 0x10(%rax), %rdx
jne 0x84b2
movq 0x18(%rbx), %rdi
movq 0x18(%rax), %rsi
callq 0x7120
testl %eax, %eax
sete %al
jmp 0x84b4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yasz24[P]eau2/src/network/./../utils/string.h
// Function: String::hash_me()
size_t hash_me() {
        size_t hash = 0;
        for (size_t i = 0; i < size_; ++i)
            hash = cstr_[i] + (hash << 6) + (hash << 16) - hash;
        return hash;
    }

// Assembly:
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x8568
pushq %rbp
movq %rsp, %rbp
movq 0x18(%rdi), %rdx
xorl %esi, %esi
xorl %eax, %eax
movsbq (%rdx,%rsi), %rdi
imulq $0x1003f, %rax, %rax    # imm = 0x1003F
addq %rdi, %rax
incq %rsi
cmpq %rsi, %rcx
jne 0x854f
popq %rbp
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yasz24[P]eau2/src/network/./../serialize/serial.h
// Function: Serializable::write(char const*, char*)
void write(const char* name, char* val) {
        int SIZEOFINSERTS = 10;
        char str[strlen(val) + strlen(name) + SIZEOFINSERTS];
        sprintf(str, "'%s' : '%s', ", name, val);
        buff->c(str);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x7100
movq %rax, %r14
movq %r12, %rdi
callq 0x7100
addq %r14, %rax
addq $0x19, %rax
andq $-0x10, %rax
movq %rsp, %r14
subq %rax, %r14
movq %r14, %rsp
leaq 0x14d93(%rip), %rsi     # 0x1d34b
movq %r14, %rdi
movq %r12, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x7080
movq (%rbx), %rbx
movq %r14, %rdi
callq 0x7100
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8260
movq 0x10(%rbx), %rdi
addq 0x20(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x71a0
addq %r15, 0x20(%rbx)
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yasz24[P]eau2/src/network/./../application/application.h
// Function: Demo::run_()
void run_() override {
    switch(this_node()) {
    case 0:   producer();     break;
    case 1:   counter();      break;
    case 2:   summarizer();
   }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x18(%rdi), %rax
cmpq $0x2, %rax
je 0x8751
cmpq $0x1, %rax
je 0x874b
testq %rax, %rax
jne 0x8757
popq %rbp
jmp 0x9228
popq %rbp
jmp 0x92a8
popq %rbp
jmp 0x9390
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yasz24[P]eau2/src/network/./../application/../store/kvstore.h
// Function: KVStore::KVStore(unsigned long, unsigned long, NetworkIP*)
KVStore(size_t num_nodes, size_t this_node, NetworkIP* network) {
        this->num_nodes_ = num_nodes;
        this->this_node_ = this_node;
        network_ = network;
        wait_for_key_ = nullptr;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x8(%rdi)
leaq 0x1fe1f(%rip), %rcx     # 0x285a0
movq %rcx, (%rdi)
leaq 0x28(%rdi), %rcx
movl $0x0, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movq %rcx, 0x38(%rdi)
movq %rcx, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movq %rax, 0x60(%rdi)
leaq 0x1fe5e(%rip), %rcx     # 0x28608
movq %rcx, 0x58(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x78(%rdi)
movq %rax, 0x88(%rdi)
leaq 0x90(%rdi), %r13
movq %r13, %rdi
callq 0x8a0c
movq $0x0, 0xe0(%rbx)
leaq 0x1ff3f(%rip), %rax     # 0x28720
movq %rax, 0xd8(%rbx)
movl $0x28, %edi
callq 0x7030
movq %rax, 0xe8(%rbx)
movq $0x5, 0xf8(%rbx)
movq $0x0, 0xf0(%rbx)
movb $0x0, 0x110(%rbx)
movq %r12, 0x10(%rbx)
movq %r15, 0x18(%rbx)
movq %r14, 0x50(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x100(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x1fdc3(%rip), %rax     # 0x28608
movq %rax, 0x58(%rbx)
movq %r13, %rdi
callq 0x8f56
jmp 0x8856
movq %rax, %r14
addq $0x20, %rbx
movq %rbx, %rdi
callq 0x8fe8
movq %r14, %rdi
callq 0x73b0
// File: /workspace/github_cpp_makefile_star2_O1/yasz24[P]eau2/src/network/./../application/../store/kvstore.h
// Function: KVStore::serialize()
char* serialize() {
        Serializable* sb = new Serializable();
        sb->initSerialize("KVStore");
        sb->write("num_nodes_", num_nodes_);
        sb->write("this_node_", this_node_);
        sb->endSerialize();
        char* value = sb->get();
        return value;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x8, %edi
callq 0x7230
movq %rax, %rbx
movq %rax, %rdi
callq 0x80aa
leaq 0x149f5(%rip), %rsi     # 0x1d387
movq %rbx, %rdi
callq 0x810c
movq 0x10(%r14), %rdx
leaq 0x149ea(%rip), %rsi     # 0x1d38f
movq %rbx, %rdi
callq 0x81e6
movq 0x18(%r14), %rdx
leaq 0x149e2(%rip), %rsi     # 0x1d39a
movq %rbx, %rdi
callq 0x81e6
movq (%rbx), %r14
movl $0x4, %esi
movq %r14, %rdi
callq 0x8260
movq 0x10(%r14), %rax
movq 0x20(%r14), %rcx
movl $0x7d207d20, (%rax,%rcx) # imm = 0x7D207D20
addq $0x4, 0x20(%r14)
movq (%rbx), %rdi
callq 0x82d0
movq (%rax), %rcx
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmpq *0x30(%rcx)
movq %rax, %r14
movq %rbx, %rdi
callq 0x7200
movq %r14, %rdi
callq 0x73b0