LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/Neurochrom[P]hours_calc/hours_calc.cpp
// Function: parseHourMin(HourMin*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool parseHourMin(HourMin* result, const std::string& s)
{
   std::vector<std::string> ss = splitIntoTokens(s, ".:");
   if (ss.size() != 2)
      return false;
   unsigned h,m;
   try
   {
      h = std::stoi(ss[0]);
      m = std::stoi(ss[1]);
   }
   catch (std::exception&)
   {
      return false;
   }
   if (m > 59)
      return false;
   if (h > 47)  // We shall allow 26 instead of 2am the next day but there is a limit
      return false;
   if (result != 0)
      *result = HourMin(h, m);
   return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x371a(%rip), %rdx      # 0x60dd
leaq 0x38da(%rip), %rcx      # 0x62a4
leaq -0x30(%rbp), %r14
movq %r14, %rdi
callq 0x2807
movq (%r14), %rdi
movq 0x8(%r14), %rax
subq %rdi, %rax
cmpq $0x40, %rax
jne 0x2a16
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x4379
movl %eax, %r14d
movq -0x30(%rbp), %rdi
addq $0x20, %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x4379
cmpl $0x3c, %eax
setae %cl
cmpl $0x30, %r14d
setae %dl
orb %cl, %dl
je 0x2a30
xorl %r15d, %r15d
leaq -0x30(%rbp), %rdi
callq 0x434e
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %r15b
testq %rbx, %rbx
je 0x2a19
shlq $0x20, %rax
movl %r14d, %ecx
orq %rax, %rcx
movq %rcx, (%rbx)
jmp 0x2a19
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x2a61
movq %rbx, %rdi
callq 0x2100
callq 0x2370
jmp 0x2a16
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x434e
movq %rbx, %rdi
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O2/Neurochrom[P]hours_calc/hours_calc.cpp
// Function: MinutesMap::PersonMonStats::calcTotal() const
unsigned calcTotal() const
      {
         unsigned sum = 0;
         for (auto& it : s)
            sum += it.second;
         return sum;
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
addq $0x8, %rbx
xorl %r14d, %r14d
cmpq %rbx, %rax
je 0x4528
addl 0x40(%rax), %r14d
movq %rax, %rdi
callq 0x2250
jmp 0x4515
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Neurochrom[P]hours_calc/hours_calc.cpp
// Function: MinutesMap::PersonMonStats::update(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int)
void update(const std::string& tow, unsigned minutes)
      {
         auto mi = s.find(tow);
         if (mi != s.end())
            mi->second += minutes;
         else
            s[tow] = minutes;
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
callq 0x5130
leaq 0x8(%r15), %rcx
cmpq %rcx, %rax
je 0x4d31
addl %ebx, 0x40(%rax)
jmp 0x4d3e
movq %r15, %rdi
movq %r14, %rsi
callq 0x50c6
movl %ebx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Neurochrom[P]hours_calc/hours_calc.cpp
// Function: YearMon::operator<(YearMon const&) const
bool operator<(const YearMon& other) const
   {
      if (y < other.y)
         return true;
      if (y > other.y)
         return false;
      return m < other.m;
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %ecx
movl (%rsi), %edx
movb $0x1, %al
cmpl %edx, %ecx
jb 0x4e53
jbe 0x4e4a
xorl %eax, %eax
jmp 0x4e53
movl 0x4(%rdi), %eax
cmpl 0x4(%rsi), %eax
setb %al
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/shirookad[P]propcpp/main.cpp
// Function: measure_block(std::function<void ()> const&)
inline auto measure_block(const std::function<void ()> &f) {
	std::chrono::time_point<std::chrono::high_resolution_clock> start, end;
	start = std::chrono::high_resolution_clock::now();
	f();
	end = std::chrono::high_resolution_clock::now();
	return std::chrono::duration_cast<std::chrono::nanoseconds>(end - start).count();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x1030
movq %rax, %r14
movq %rbx, %rdi
callq 0x1842
callq 0x1030
subq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/shirookad[P]propcpp/include/prop.h
// Function: prop::observable_property<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
inline T& set(const param_t value) {
			willSet(value);
			T oldValue = std::move(m_value);
			m_value = value;
			didSet(oldValue);
			return m_value;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x20, %rdi
callq 0x1dca
leaq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x10f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10a0
leaq 0x40(%rbx), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1dca
leaq -0x30(%rbp), %rdi
callq 0x1080
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x1080
movq %rbx, %rdi
callq 0x1120
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/AD7746/AD7746.cpp
// Function: AD7746::getCapacitance()
uint32_t AD7746::getCapacitance() {
    uint32_t capacitance;
    I2Cdev::readBytes(devAddr, 0, 4, buffer);
    capacitance = ((uint32_t)buffer[1] << 16) | ((uint32_t)buffer[2] << 8) | (uint32_t)buffer[3];
    
    return capacitance;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x1(%rbx), %rcx
movq 0x288f8(%rip), %rax     # 0x48f48
movzwl (%rax), %r8d
pushq $0x4
popq %rdx
xorl %esi, %esi
callq 0x1f870
movzbl 0x2(%rbx), %eax
shll $0x10, %eax
movzbl 0x3(%rbx), %ecx
shll $0x8, %ecx
orl %eax, %ecx
movzbl 0x4(%rbx), %eax
orl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/ADS1115/ADS1115.cpp
// Function: ADS1115::initialize()
void ADS1115::initialize() {
  setMultiplexer(ADS1115_MUX_P0_N1);
  setGain(ADS1115_PGA_2P048);
  setMode(ADS1115_MODE_SINGLESHOT);
  setRate(ADS1115_RATE_128);
  setComparatorMode(ADS1115_COMP_MODE_HYSTERESIS);
  setComparatorPolarity(ADS1115_COMP_POL_ACTIVE_LOW);
  setComparatorLatchEnabled(ADS1115_COMP_LAT_NON_LATCHING);
  setComparatorQueueMode(ADS1115_COMP_QUE_DISABLE);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x1f1d0
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x1f860
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x1fe80
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x1fe60
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1f0a0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1fc50
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1fce0
pushq $0x3
popq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x1f920
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/ADS1115/ADS1115.cpp
// Function: ADS1115::setMultiplexer(unsigned char)
void ADS1115::setMultiplexer(uint8_t mux) {
    if (I2Cdev::writeBitsW(devAddr, ADS1115_RA_CONFIG, ADS1115_CFG_MUX_BIT, ADS1115_CFG_MUX_LENGTH, mux)) {
        muxMode = mux;
        if (devMode == ADS1115_MODE_CONTINUOUS) {
          // Force a stop/start
          setMode(ADS1115_MODE_SINGLESHOT);
          getConversion();
          setMode(ADS1115_MODE_CONTINUOUS);
        }
    }
    
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movzbl (%rdi), %edi
pushq $0x1
popq %rsi
pushq $0xe
popq %rdx
pushq $0x3
popq %rcx
movl %ebp, %r8d
callq 0x1f370
testb %al, %al
je 0x20754
movb %bpl, 0x7(%rbx)
cmpb $0x0, 0x6(%rbx)
je 0x2075b
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1fe80
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1faf0
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1fe80
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/ADS1115/ADS1115.cpp
// Function: ADS1115::setGain(unsigned char)
void ADS1115::setGain(uint8_t gain) {
    if (I2Cdev::writeBitsW(devAddr, ADS1115_RA_CONFIG, ADS1115_CFG_PGA_BIT, ADS1115_CFG_PGA_LENGTH, gain)) {
      pgaMode = gain;
         if (devMode == ADS1115_MODE_CONTINUOUS) {
            // Force a stop/start
            setMode(ADS1115_MODE_SINGLESHOT);
            getConversion();
            setMode(ADS1115_MODE_CONTINUOUS);
         }
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movzbl (%rdi), %edi
pushq $0x1
popq %rsi
pushq $0xb
popq %rdx
pushq $0x3
popq %rcx
movl %ebp, %r8d
callq 0x1f370
testb %al, %al
je 0x207ac
movb %bpl, 0x8(%rbx)
cmpb $0x0, 0x6(%rbx)
je 0x207b3
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1fe80
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1faf0
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1fe80
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/ADS1115/ADS1115.cpp
// Function: ADS1115::getConversion(bool)
int16_t ADS1115::getConversion(bool triggerAndPoll) {
    if (triggerAndPoll && devMode == ADS1115_MODE_SINGLESHOT) {
      triggerConversion();
      pollConversion(I2CDEV_DEFAULT_READ_TIMEOUT);
    }
    I2Cdev::readWord(devAddr, ADS1115_RA_CONVERSION, buffer);
    return buffer[0];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
je 0x208ff
cmpb $0x1, 0x6(%rbx)
jne 0x208ff
movq %rbx, %rdi
callq 0x1f8a0
movq %rbx, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x1f5e0
movzbl (%rbx), %edi
leaq 0x2(%rbx), %rdx
movq 0x2863b(%rip), %rax     # 0x48f48
movzwl (%rax), %ecx
xorl %esi, %esi
callq 0x1f930
movzwl 0x2(%rbx), %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/ADS1115/ADS1115.cpp
// Function: ADS1115::setConversionReadyPinMode()
void ADS1115::setConversionReadyPinMode() {
    I2Cdev::writeBitW(devAddr, ADS1115_RA_HI_THRESH, 15, 1);
    I2Cdev::writeBitW(devAddr, ADS1115_RA_LO_THRESH, 15, 0);
    setComparatorPolarity(0);
    setComparatorQueueMode(0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl (%rdi), %edi
pushq $0x3
popq %rsi
pushq $0xf
popq %rbp
pushq $0x1
popq %rcx
movl %ebp, %edx
callq 0x1fa80
movzbl (%rbx), %edi
pushq $0x2
popq %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x1fa80
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1fc50
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1f920
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/ADS1115/ADS1115.cpp
// Function: createMask(unsigned int, unsigned int)
unsigned createMask(unsigned a, unsigned b) {
   unsigned mask = 0;
   for (unsigned i=a; i<=b; i++)
       mask |= 1 << i;
   return mask;
}

// Assembly:
xorl %eax, %eax
cmpl %esi, %edi
ja 0x20c8b
btsl %edi, %eax
incl %edi
jmp 0x20c80
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/ADXL345/ADXL345.cpp
// Function: ADXL345::getOffset(signed char*, signed char*, signed char*)
void ADXL345::getOffset(int8_t* x, int8_t* y, int8_t* z) {
    I2Cdev::readBytes(devAddr, ADXL345_RA_OFSX, 3, buffer);
    *x = buffer[0];
    *y = buffer[1];
    *z = 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 0x2819d(%rip), %rax     # 0x48f48
movzwl (%rax), %r8d
pushq $0x1e
popq %rsi
pushq $0x3
popq %rdx
callq 0x1f870
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_O2/mrlordkaj[P]i2cdevlib-pi/ADXL345/ADXL345.cpp
// Function: ADXL345::getAcceleration(short*, short*, short*)
void ADXL345::getAcceleration(int16_t* x, int16_t* y, int16_t* z) {
    I2Cdev::readBytes(devAddr, ADXL345_RA_DATAX0, 6, buffer);
    *x = (((int16_t)buffer[1]) << 8) | buffer[0];
    *y = (((int16_t)buffer[3]) << 8) | buffer[2];
    *z = (((int16_t)buffer[5]) << 8) | buffer[4];
}

// 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 0x27389(%rip), %rax     # 0x48f48
movzwl (%rax), %r8d
pushq $0x32
popq %rsi
pushq $0x6
popq %rdx
callq 0x1f870
movzwl 0x1(%r12), %eax
movw %ax, (%r15)
movzwl 0x3(%r12), %eax
movw %ax, (%r14)
movzwl 0x5(%r12), %eax
movw %ax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/AK8963/AK8963.cpp
// Function: AK8963::getHeading(short*, short*, short*)
void AK8963::getHeading(int16_t *x, int16_t *y, int16_t *z) {
    I2Cdev::readBytes(devAddr, AK8963_RA_HXL, 6, buffer);
    *x = (((int16_t)buffer[1]) << 8) | buffer[0];
    *y = (((int16_t)buffer[3]) << 8) | buffer[2];
    *z = (((int16_t)buffer[5]) << 8) | buffer[4];
}

// 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 0x270df(%rip), %rax     # 0x48f48
movzwl (%rax), %r8d
pushq $0x3
popq %rsi
pushq $0x6
popq %rdx
callq 0x1f870
movzwl 0x1(%r12), %eax
movw %ax, (%r15)
movzwl 0x3(%r12), %eax
movw %ax, (%r14)
movzwl 0x5(%r12), %eax
movw %ax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/AK8963/AK8963.cpp
// Function: AK8963::getAdjustment(signed char*, signed char*, signed char*)
void AK8963::getAdjustment(int8_t *x, int8_t *y, int8_t *z) {
    I2Cdev::readBytes(devAddr, AK8963_RA_ASAX, 3, buffer);
    *x = buffer[0];
    *y = buffer[1];
    *z = 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 0x26f17(%rip), %rax     # 0x48f48
movzwl (%rax), %r8d
pushq $0x10
popq %rsi
pushq $0x3
popq %rdx
callq 0x1f870
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_O2/mrlordkaj[P]i2cdevlib-pi/AK8963/AK8963.cpp
// Function: AK8963::setAdjustment(signed char, signed char, signed char)
void AK8963::setAdjustment(int8_t x, int8_t y, int8_t z) {
    buffer[0] = x;
    buffer[1] = y;
    buffer[2] = z;
    I2Cdev::writeBytes(devAddr, AK8963_RA_ASAX, 3, buffer);
}

// Assembly:
leaq 0x1(%rdi), %rax
movb %sil, 0x1(%rdi)
movb %dl, 0x2(%rdi)
movb %cl, 0x3(%rdi)
movzbl (%rdi), %edi
pushq $0x10
popq %rsi
pushq $0x3
popq %rdx
movq %rax, %rcx
jmp 0x1f1f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/AK8975/AK8975.cpp
// Function: AK8975::getHeading(short*, short*, short*)
void AK8975::getHeading(int16_t *x, int16_t *y, int16_t *z) {
    I2Cdev::writeByte(devAddr, AK8975_RA_CNTL, AK8975_MODE_SINGLE);
    delay(10);
    I2Cdev::readBytes(devAddr, AK8975_RA_HXL, 6, buffer);
    *x = (((int16_t)buffer[1]) << 8) | buffer[0];
    *y = (((int16_t)buffer[3]) << 8) | buffer[2];
    *z = (((int16_t)buffer[5]) << 8) | buffer[4];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movzbl (%rdi), %edi
pushq $0xa
popq %rbp
pushq $0x1
popq %rdx
movl %ebp, %esi
callq 0x1f7f0
movl %ebp, %edi
callq 0x1f630
movzbl (%r15), %edi
leaq 0x1(%r15), %rcx
movq 0x26d56(%rip), %rax     # 0x48f48
movzwl (%rax), %r8d
pushq $0x3
popq %rsi
pushq $0x6
popq %rdx
callq 0x1f870
movzwl 0x1(%r15), %eax
movw %ax, (%r12)
movzwl 0x3(%r15), %eax
movw %ax, (%r14)
movzwl 0x5(%r15), %eax
movw %ax, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/AK8975/AK8975.cpp
// Function: AK8975::getHeadingX()
int16_t AK8975::getHeadingX() {
    I2Cdev::writeByte(devAddr, AK8975_RA_CNTL, AK8975_MODE_SINGLE);
    delay(10);
    I2Cdev::readBytes(devAddr, AK8975_RA_HXL, 2, buffer);
    return (((int16_t)buffer[1]) << 8) | buffer[0];
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl (%rdi), %edi
pushq $0xa
popq %rbp
pushq $0x1
popq %rdx
movl %ebp, %esi
callq 0x1f7f0
movl %ebp, %edi
callq 0x1f630
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rcx
movq 0x26cf7(%rip), %rax     # 0x48f48
movzwl (%rax), %r8d
pushq $0x3
popq %rsi
pushq $0x2
popq %rdx
callq 0x1f870
movzwl 0x1(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/AK8975/AK8975.cpp
// Function: AK8975::getHeadingY()
int16_t AK8975::getHeadingY() {
    I2Cdev::writeByte(devAddr, AK8975_RA_CNTL, AK8975_MODE_SINGLE);
    delay(10);
    I2Cdev::readBytes(devAddr, AK8975_RA_HYL, 2, buffer);
    return (((int16_t)buffer[1]) << 8) | buffer[0];
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl (%rdi), %edi
pushq $0xa
popq %rbp
pushq $0x1
popq %rdx
movl %ebp, %esi
callq 0x1f7f0
movl %ebp, %edi
callq 0x1f630
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rcx
movq 0x26cb1(%rip), %rax     # 0x48f48
movzwl (%rax), %r8d
pushq $0x5
popq %rsi
pushq $0x2
popq %rdx
callq 0x1f870
movzwl 0x1(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/AK8975/AK8975.cpp
// Function: AK8975::getHeadingZ()
int16_t AK8975::getHeadingZ() {
    I2Cdev::writeByte(devAddr, AK8975_RA_CNTL, AK8975_MODE_SINGLE);
    delay(10);
    I2Cdev::readBytes(devAddr, AK8975_RA_HZL, 2, buffer);
    return (((int16_t)buffer[1]) << 8) | buffer[0];
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl (%rdi), %edi
pushq $0xa
popq %rbp
pushq $0x1
popq %rdx
movl %ebp, %esi
callq 0x1f7f0
movl %ebp, %edi
callq 0x1f630
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rcx
movq 0x26c6b(%rip), %rax     # 0x48f48
movzwl (%rax), %r8d
pushq $0x7
popq %rsi
pushq $0x2
popq %rdx
callq 0x1f870
movzwl 0x1(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/AK8975/AK8975.cpp
// Function: AK8975::getAdjustment(signed char*, signed char*, signed char*)
void AK8975::getAdjustment(int8_t *x, int8_t *y, int8_t *z) {
    I2Cdev::writeByte(devAddr, AK8975_RA_CNTL, 0x0F); // Enter Fuse ROM access mode
    delay(10);
    I2Cdev::readBytes(devAddr, AK8975_RA_ASAX, 3, buffer);
    *x = buffer[0];
    *y = buffer[1];
    *z = buffer[2];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movzbl (%rdi), %edi
pushq $0xa
popq %rbp
pushq $0xf
popq %rdx
movl %ebp, %esi
callq 0x1f7f0
movl %ebp, %edi
callq 0x1f630
movzbl (%r15), %edi
leaq 0x1(%r15), %rcx
movq 0x26b50(%rip), %rax     # 0x48f48
movzwl (%rax), %r8d
pushq $0x10
popq %rsi
pushq $0x3
popq %rdx
callq 0x1f870
movb 0x1(%r15), %al
movb %al, (%r12)
movb 0x2(%r15), %al
movb %al, (%r14)
movb 0x3(%r15), %al
movb %al, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/AK8975/AK8975.cpp
// Function: AK8975::setAdjustment(signed char, signed char, signed char)
void AK8975::setAdjustment(int8_t x, int8_t y, int8_t z) {
    I2Cdev::writeByte(devAddr, AK8975_RA_CNTL, 0x0F); // Enter Fuse ROM access mode
    delay(10);
    buffer[0] = x;
    buffer[1] = y;
    buffer[2] = z;
    I2Cdev::writeBytes(devAddr, AK8975_RA_ASAX, 3, buffer);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movzbl (%rdi), %edi
pushq $0xa
popq %r12
pushq $0xf
popq %rdx
movl %r12d, %esi
callq 0x1f7f0
movl %r12d, %edi
callq 0x1f630
leaq 0x1(%r15), %rcx
movb %r14b, 0x1(%r15)
movb %bpl, 0x2(%r15)
movb %bl, 0x3(%r15)
movzbl (%r15), %edi
pushq $0x10
popq %rsi
pushq $0x3
popq %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1f1f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/AK8975/AK8975.cpp
// Function: AK8975::getAdjustmentX()
uint8_t AK8975::getAdjustmentX() {
    I2Cdev::writeByte(devAddr, AK8975_RA_CNTL, 0x0F); // Enter Fuse ROM access mode
    delay(10);
    I2Cdev::readByte(devAddr, AK8975_RA_ASAX, buffer);
    return buffer[0];
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl (%rdi), %edi
pushq $0xa
popq %rbp
pushq $0xf
popq %rdx
movl %ebp, %esi
callq 0x1f7f0
movl %ebp, %edi
callq 0x1f630
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rdx
movq 0x26aa3(%rip), %rax     # 0x48f48
movzwl (%rax), %ecx
pushq $0x10
popq %rsi
callq 0x1f9b0
movb 0x1(%rbx), %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/AK8975/AK8975.cpp
// Function: AK8975::getAdjustmentY()
uint8_t AK8975::getAdjustmentY() {
    I2Cdev::writeByte(devAddr, AK8975_RA_CNTL, 0x0F); // Enter Fuse ROM access mode
    delay(10);
    I2Cdev::readByte(devAddr, AK8975_RA_ASAY, buffer);
    return buffer[0];
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl (%rdi), %edi
pushq $0xa
popq %rbp
pushq $0xf
popq %rdx
movl %ebp, %esi
callq 0x1f7f0
movl %ebp, %edi
callq 0x1f630
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rdx
movq 0x26a31(%rip), %rax     # 0x48f48
movzwl (%rax), %ecx
pushq $0x11
popq %rsi
callq 0x1f9b0
movb 0x1(%rbx), %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/AK8975/AK8975.cpp
// Function: AK8975::getAdjustmentZ()
uint8_t AK8975::getAdjustmentZ() {
    I2Cdev::writeByte(devAddr, AK8975_RA_CNTL, 0x0F); // Enter Fuse ROM access mode
    delay(10);
    I2Cdev::readByte(devAddr, AK8975_RA_ASAZ, buffer);
    return buffer[0];
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl (%rdi), %edi
pushq $0xa
popq %rbp
pushq $0xf
popq %rdx
movl %ebp, %esi
callq 0x1f7f0
movl %ebp, %edi
callq 0x1f630
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rdx
movq 0x269bf(%rip), %rax     # 0x48f48
movzwl (%rax), %ecx
pushq $0x12
popq %rsi
callq 0x1f9b0
movb 0x1(%rbx), %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/Arduino.cpp
// Function: Serial::begin(int)
void _Serial::begin(int baudrate) {
    if (!inRunning) {
        inRunning = true;
        std::thread inThread(getLineFromCin, this);
        inThread.detach();
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
cmpb $0x0, (%rdi)
jne 0x22645
movb $0x1, (%rdi)
leaq 0x8(%rsp), %rdx
movq %rdi, (%rdx)
leaq 0x34(%rip), %rsi        # 0x2265e
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x1f5b0
movq %rbx, %rdi
callq 0x1fee0
movq %rsp, %rdi
callq 0x1fd20
addq $0x10, %rsp
popq %rbx
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1fd20
movq %rbx, %rdi
callq 0x1ff00
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/Arduino.cpp
// Function: getLineFromCin(_Serial*)
static void getLineFromCin(_Serial *serial) {
    std::string line;
    while (serial->inRunning) {
        std::getline(std::cin, line);
        serial->inChars.append(line);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x8(%rdi), %r14
movq 0x26948(%rip), %r15     # 0x48fd0
leaq 0x8(%rsp), %r12
cmpb $0x1, (%rbx)
jne 0x226aa
movq %r15, %rdi
movq %r12, %rsi
callq 0x1f0c0
movq %r14, %rdi
movq %r12, %rsi
callq 0x20060
jmp 0x2268d
leaq 0x8(%rsp), %rdi
callq 0x1f2f0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1f2f0
movq %rbx, %rdi
callq 0x1ff00
nop
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/Arduino.cpp
// Function: Serial::read()
int _Serial::read() {
    if (inChars.length() > 0) {
        int d = inChars.at(0);
        inChars.erase(0);
        return d;
    }
    return -1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
cmpq $0x0, 0x10(%rdi)
je 0x2270b
movq %rdi, %rbx
addq $0x8, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x20010
movsbl (%rax), %ebp
pushq $-0x1
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1f160
jmp 0x2270e
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/Arduino.cpp
// Function: Serial::print(long, int)
void _Serial::print(long val, int format) {
    switch (format) {
        case HEX:
            std::cout << std::hex << std::uppercase << val;
            return;
        case DEC:
            std::cout << std::dec << val;
            return;
        case OCT:
            std::cout << std::oct << val;
            return;
        case BIN:
            std::cout << std::bitset<8>(val);
            return;
    }
}

// Assembly:
addl $-0x2, %edx
rorl %edx
cmpl $0x7, %edx
ja 0x22763
leaq 0x10921(%rip), %rax     # 0x33060
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
pushq %rax
movzbl %sil, %eax
movq %rsp, %rsi
movq %rax, (%rsi)
movq 0x26836(%rip), %rdi     # 0x48f90
callq 0x1fa50
addq $0x8, %rsp
retq
movq 0x26825(%rip), %rdi     # 0x48f90
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x18(%rdi,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
jmp 0x22796
movq 0x2680b(%rip), %rdi     # 0x48f90
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x18(%rdi,%rax), %ecx
andl $-0x4b, %ecx
orl $0x40, %ecx
movl %ecx, 0x18(%rdi,%rax)
jmp 0x1f760
movq 0x267ea(%rip), %rdi     # 0x48f90
movq (%rdi), %rax
movq -0x18(%rax), %rcx
movl 0x18(%rdi,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rdi,%rcx)
movq -0x18(%rax), %rax
orl $0x4000, 0x18(%rdi,%rax) # imm = 0x4000
jmp 0x1f760
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/Wire.cpp
// Function: TwoWire::begin()
void TwoWire::begin() {
    if (fd < 0) {
        int rev = piGpioLayout();
        const char *device = (rev == 1) ? "/dev/i2c-0" : "/dev/i2c-1";
        if ((fd = open(device, O_RDWR)) < 0) {
            std::cerr << "Failed to open I2C port: " << strerror(errno) << "\r\n" << std::flush;
        }
    }
}

// Assembly:
pushq %rbx
cmpl $0x0, 0x4(%rdi)
jns 0x22a39
movq %rdi, %rbx
callq 0x20090
cmpl $0x1, %eax
leaq 0x10719(%rip), %rax     # 0x33136
leaq 0x1071d(%rip), %rdi     # 0x33141
cmoveq %rax, %rdi
pushq $0x2
popq %rsi
xorl %eax, %eax
callq 0x1f540
movl %eax, 0x4(%rbx)
testl %eax, %eax
js 0x22a3b
popq %rbx
retq
movq 0x265ae(%rip), %rdi     # 0x48ff0
leaq 0x10703(%rip), %rsi     # 0x3314c
callq 0x1f7c0
movq %rax, %rbx
callq 0x1f040
movl (%rax), %edi
callq 0x1f230
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1f7c0
leaq 0x1073c(%rip), %rsi     # 0x331ab
movq %rax, %rdi
callq 0x1f7c0
movq %rax, %rdi
popq %rbx
jmp 0x1f500
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/Wire.cpp
// Function: TwoWire::begin(unsigned char)
void TwoWire::begin(uint8_t address) {
    begin();
    if (address != addr) {
        addr = address;
        if (fd < 0 || ioctl(fd, I2C_SLAVE, address) < 0) {
            std::cerr << "Failed to open I2C device: " << strerror(errno) << "\r\n" << std::flush;
            addr = 0;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x1fac0
cmpb %bpl, (%rbx)
je 0x22af6
movb %bpl, (%rbx)
movl 0x4(%rbx), %edi
testl %edi, %edi
js 0x22aaf
movl $0x703, %esi            # imm = 0x703
movl %ebp, %edx
xorl %eax, %eax
callq 0x1fba0
testl %eax, %eax
jns 0x22af6
movq 0x2653a(%rip), %rdi     # 0x48ff0
leaq 0x106a9(%rip), %rsi     # 0x33166
callq 0x1f7c0
movq %rax, %r14
callq 0x1f040
movl (%rax), %edi
callq 0x1f230
movq %r14, %rdi
movq %rax, %rsi
callq 0x1f7c0
leaq 0x106c8(%rip), %rsi     # 0x331ab
movq %rax, %rdi
callq 0x1f7c0
movq %rax, %rdi
callq 0x1f500
movb $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/Wire.cpp
// Function: TwoWire::end()
void TwoWire::end() {
    if (fd >= 0) {
        close(fd);
        fd = -1;
    }
    addr = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x4(%rdi), %edi
testl %edi, %edi
js 0x22b1a
callq 0x20070
orl $-0x1, 0x4(%rbx)
movb $0x0, (%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/Wire.cpp
// Function: TwoWire::endTransmission(bool)
uint8_t TwoWire::endTransmission(bool sendStop) {
    // TODO: sendStop
    if (addr > 0 && fd >= 0) {
        if (writeOffset > 0) {
            int written = i2cWrite(fd, &writeBuffer, writeOffset);
            if (written < 0) {
                return 2; // address send, NACK received
            } else if (written < writeOffset) {
                return 3; // data send, NACK received
            }
        }
        return 0; // success
    }
    return 4; // other error
}

// Assembly:
movb $0x4, %al
cmpb $0x0, (%rdi)
je 0x22b96
pushq %rbx
movq %rdi, %rbx
movl 0x4(%rdi), %edi
testl %edi, %edi
js 0x22b95
movslq 0x50(%rbx), %rdx
testq %rdx, %rdx
jle 0x22b93
leaq 0x30(%rbx), %rsi
callq 0x1f240
movq %rax, %rcx
testl %ecx, %ecx
setns %al
orb $0x2, %al
testl %ecx, %ecx
js 0x22b95
cmpl %ecx, 0x50(%rbx)
jg 0x22b95
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/Wire.cpp
// Function: TwoWire::write(unsigned char const*, unsigned long)
size_t TwoWire::write(const uint8_t *data, size_t quantity) {
    if (addr > 0) {
        quantity = min(BUFFER_LENGTH-writeOffset, quantity);
        if (quantity > 0) {
            memcpy(writeBuffer+writeOffset, data, quantity);
            writeOffset += quantity;
            return quantity;
        }
        return 0;
    }
    return -1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, (%rdi)
je 0x22bd8
movq %rdi, %r14
movslq 0x50(%rdi), %rax
pushq $0x20
popq %rbx
subq %rax, %rbx
cmpq %rdx, %rbx
cmovaeq %rdx, %rbx
testq %rbx, %rbx
je 0x22bdd
leaq (%r14,%rax), %rdi
addq $0x30, %rdi
movq %rbx, %rdx
callq 0x1f650
addl %ebx, 0x50(%r14)
jmp 0x22bdf
pushq $-0x1
popq %rbx
jmp 0x22bdf
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/Wire.cpp
// Function: TwoWire::requestFrom(unsigned char, unsigned char, unsigned int, unsigned char, unsigned char)
uint8_t TwoWire::requestFrom(uint8_t address, uint8_t quantity, uint32_t iaddress, uint8_t isize, uint8_t sendStop) {
    // TODO: sendStop
    
    if (isize > 0) {
        // send internal address
        beginTransmission(address);
        // the maximum size of internal address is 3 bytes
        if (isize > 3){
            isize = 3;
        }
        // write internal register address - most significant byte first
        while (isize-- > 0)
            write((uint8_t)(iaddress >> (isize*8)));
        endTransmission(false);
    }
    
    // send data
    beginTransmission(address);
    if (addr > 0) {
        if (quantity > BUFFER_LENGTH) {
            // clamp to buffer length
            quantity = BUFFER_LENGTH;
        }
        readAvailable = i2cRead(fd, (uint8_t*)&readBuffer, quantity);
        return readAvailable;
    }
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rdi, %rbx
movzbl %sil, %r14d
testl %r8d, %r8d
je 0x22c67
movl %r8d, %r12d
movl %ecx, %r15d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1f640
movzbl %r12b, %eax
cmpb $0x3, %al
pushq $0x3
popq %rcx
cmovbl %eax, %ecx
movzbl %cl, %eax
leal -0x8(,%rax,8), %r12d
cmpl $-0x8, %r12d
je 0x22c5d
movl %r15d, %eax
movl %r12d, %ecx
shrl %cl, %eax
movzbl %al, %esi
movq %rbx, %rdi
callq 0x1f5a0
addl $-0x8, %r12d
jmp 0x22c3e
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1f8d0
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1f640
cmpb $0x0, (%rbx)
je 0x22c97
movzbl %bpl, %eax
cmpb $0x20, %al
pushq $0x20
popq %rcx
cmovbl %eax, %ecx
movl 0x4(%rbx), %edi
leaq 0x8(%rbx), %rsi
movzbl %cl, %edx
callq 0x1fc60
movl %eax, 0x28(%rbx)
jmp 0x22c99
movb $-0x1, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/Wire.cpp
// Function: TwoWire::read()
int TwoWire::read() {
    if (readAvailable > 0) {
        uint8_t d = readBuffer[readOffset];
        readOffset++;
        readAvailable--;
        return d;
    }
    return -1;
}

// Assembly:
movl 0x28(%rdi), %ecx
testl %ecx, %ecx
jle 0x22cff
movslq 0x2c(%rdi), %rdx
movzbl 0x8(%rdi,%rdx), %eax
incl %edx
movl %edx, 0x2c(%rdi)
decl %ecx
movl %ecx, 0x28(%rdi)
retq
pushq $-0x1
popq %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/avr/dtostrf.c
// Function: dtostrf
char *dtostrf (double val, signed char width, unsigned char prec, char *sout) {
  char fmt[20];
  sprintf(fmt, "%%%d.%df", width, prec);
  sprintf(sout, fmt, val);
  return sout;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movl %esi, %ecx
movl %edi, %edx
movsd %xmm0, 0x8(%rsp)
leaq 0x10477(%rip), %rsi     # 0x331ae
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x1f0b0
movq %rbx, %rdi
movq %r14, %rsi
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x1f0b0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/softPwm.c
// Function: softPwmWrite
void softPwmWrite (int pin, int value)
{
  if (pin < MAX_PINS)
  {
    /**/ if (value < 0)
      value = 0 ;
    else if (value > range [pin])
      value = range [pin] ;

    marks [pin] = value ;
  }
}

// Assembly:
cmpl $0x3f, %edi
jg 0x22dc3
movslq %edi, %rax
testl %esi, %esi
js 0x22db7
leaq 0x27275(%rip), %rcx     # 0x4a020
movl (%rcx,%rax,4), %edx
cmpl %esi, %edx
jge 0x22db9
movl (%rcx,%rax,4), %esi
jmp 0x22db9
xorl %esi, %esi
leaq 0x27360(%rip), %rcx     # 0x4a120
movl %esi, (%rcx,%rax,4)
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/softPwm.c
// Function: softPwmCreate
int softPwmCreate (int pin, int initialValue, int pwmRange)
{
  int res ;
  pthread_t myThread ;
  int *passPin ;

  if (pin >= MAX_PINS)
    return -1 ;

  if (range [pin] != 0)	// Already running on this pin
    return -1 ;

  if (pwmRange <= 0)
    return -1 ;

  passPin = malloc (sizeof (*passPin)) ;
  if (passPin == NULL)
    return -1 ;

  digitalWrite (pin, LOW) ;
  pinMode      (pin, OUTPUT) ;

  marks [pin] = initialValue ;
  range [pin] = pwmRange ;

  *passPin = pin ;
  newPin   = pin ;
  res      = pthread_create (&myThread, NULL, softPwmThread, (void *)passPin) ;

  if (res != 0)
    return res ;
  
  while (newPin != -1)
    delay (1) ;

  threads [pin] = myThread ;

  return res ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
pushq $-0x1
popq %r14
cmpl $0x3f, %edi
jle 0x22dea
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edx, %ebp
movl %edi, %ebx
movslq %edi, %r13
leaq 0x27228(%rip), %rax     # 0x4a020
movl (%rax,%r13,4), %eax
testl %edx, %edx
jle 0x22dd8
testl %eax, %eax
jne 0x22dd8
movl %esi, %r15d
pushq $0x4
popq %rdi
callq 0x1fab0
testq %rax, %rax
je 0x22dd8
movq %rax, %r12
movl %ebx, %edi
xorl %esi, %esi
callq 0x200b0
pushq $0x1
popq %rsi
movl %ebx, %edi
callq 0x1f450
leaq 0x272ef(%rip), %rax     # 0x4a120
movl %r15d, (%rax,%r13,4)
leaq 0x271e4(%rip), %rax     # 0x4a020
movl %ebp, (%rax,%r13,4)
movl %ebx, (%r12)
movl %ebx, 0x26a26(%rip)     # 0x49870
leaq 0x46(%rip), %rdx        # 0x22e97
movq %rsp, %rdi
xorl %esi, %esi
movq %r12, %rcx
callq 0x1ff70
movl %eax, %r14d
testl %eax, %eax
jne 0x22dd8
pushq $0x1
popq %rbx
movl 0x269fe(%rip), %eax     # 0x49870
cmpl $-0x1, %eax
je 0x22e80
movl %ebx, %edi
callq 0x1f630
jmp 0x22e6c
movq (%rsp), %rax
leaq 0x27395(%rip), %rcx     # 0x4a220
movq %rax, (%rcx,%r13,8)
xorl %r14d, %r14d
jmp 0x22dd8
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/softPwm.c
// Function: softPwmThread
static void *softPwmThread (void *arg)
{
  int pin, mark, space ;
  struct sched_param param ;

  param.sched_priority = sched_get_priority_max (SCHED_RR) ;
  pthread_setschedparam (pthread_self (), SCHED_RR, &param) ;

  pin = *((int *)arg) ;
  free (arg) ;

  pin    = newPin ;
  newPin = -1 ;

  piHiPri (90) ;

  for (;;)
  {
    mark  = marks [pin] ;
    space = range [pin] - mark ;

    if (mark != 0)
      digitalWrite (pin, HIGH) ;
    delayMicroseconds (mark * 100) ;

    if (space != 0)
      digitalWrite (pin, LOW) ;
    delayMicroseconds (space * 100) ;
  }

  return NULL ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x2
popq %rbp
movl %ebp, %edi
callq 0x1f780
leaq 0x4(%rsp), %r14
movl %eax, (%r14)
callq 0x1f6e0
movq %rax, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x1f4e0
movq %rbx, %rdi
callq 0x1f9c0
movslq 0x26998(%rip), %rbx     # 0x49870
movl $0xffffffff, 0x2698e(%rip) # imm = 0xFFFFFFFF
pushq $0x5a
popq %rdi
callq 0x1f140
leaq 0x2722f(%rip), %r14     # 0x4a120
leaq 0x27128(%rip), %r15     # 0x4a020
pushq $0x1
popq %rbp
movl (%r14,%rbx,4), %r12d
movl (%r15,%rbx,4), %r13d
testl %r12d, %r12d
je 0x22f11
movl %ebx, %edi
movl %ebp, %esi
callq 0x200b0
imull $0x64, %r12d, %edi
callq 0x1f430
cmpl %r12d, %r13d
je 0x22f28
movl %ebx, %edi
xorl %esi, %esi
callq 0x200b0
subl %r12d, %r13d
imull $0x64, %r13d, %edi
callq 0x1f430
jmp 0x22efb
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/softPwm.c
// Function: softPwmStop
void softPwmStop (int pin)
{
  if (pin < MAX_PINS)
  {
    if (range [pin] != 0)
    {
      pthread_cancel (threads [pin]) ;
      pthread_join   (threads [pin], NULL) ;
      range [pin] = 0 ;
      digitalWrite (pin, LOW) ;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x3f, %edi
jg 0x22f8d
movl %edi, %ebx
movslq %edi, %r14
leaq 0x270d1(%rip), %r15     # 0x4a020
cmpl $0x0, (%r15,%r14,4)
je 0x22f8d
leaq 0x272c3(%rip), %r12     # 0x4a220
movq (%r12,%r14,8), %rdi
callq 0x1fb70
movq (%r12,%r14,8), %rdi
xorl %esi, %esi
callq 0x1f6f0
movl $0x0, (%r15,%r14,4)
movl %ebx, %edi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x200b0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/softTone.c
// Function: softToneCreate
int softToneCreate (int pin)
{
  int res ;
  pthread_t myThread ;

  pinMode      (pin, OUTPUT) ;
  digitalWrite (pin, LOW) ;

  if (threads [pin] != 0)
    return -1 ;

  freqs [pin] = 0 ;

  newPin = pin ;
  res    = pthread_create (&myThread, NULL, softToneThread, NULL) ;

  while (newPin != -1)
    delay (1) ;

  threads [pin] = myThread ;

  return res ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x1
popq %rsi
callq 0x1f450
movl %ebx, %edi
xorl %esi, %esi
callq 0x200b0
movslq %ebx, %r14
leaq 0x27541(%rip), %r15     # 0x4a520
cmpq $0x0, (%r15,%r14,8)
je 0x22feb
pushq $-0x1
popq %rbx
jmp 0x23030
leaq 0x2742e(%rip), %rax     # 0x4a420
andl $0x0, (%rax,%r14,4)
movl %r14d, 0x26876(%rip)    # 0x49874
leaq 0x38(%rip), %rdx        # 0x2303d
movq %rsp, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1ff70
movl %eax, %ebx
pushq $0x1
popq %rbp
cmpl $-0x1, 0x26857(%rip)    # 0x49874
je 0x23028
movl %ebp, %edi
callq 0x1f630
jmp 0x23016
movq (%rsp), %rax
movq %rax, (%r15,%r14,8)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/softTone.c
// Function: softToneThread
static PI_THREAD (softToneThread)
{
  int pin, freq, halfPeriod ;
  struct sched_param param ;

  param.sched_priority = sched_get_priority_max (SCHED_RR) ;
  pthread_setschedparam (pthread_self (), SCHED_RR, &param) ;

  pin    = newPin ;
  newPin = -1 ;

  piHiPri (50) ;

  for (;;)
  {
    freq = freqs [pin] ;
    if (freq == 0)
      delay (1) ;
    else
    {
      halfPeriod = 500000 / freq ;

      digitalWrite (pin, HIGH) ;
      delayMicroseconds (halfPeriod) ;

      digitalWrite (pin, LOW) ;
      delayMicroseconds (halfPeriod) ;
    }
  }

  return NULL ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
pushq $0x2
popq %rbx
movl %ebx, %edi
callq 0x1f780
leaq 0x4(%rsp), %r14
movl %eax, (%r14)
callq 0x1f6e0
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rdx
callq 0x1f4e0
movslq 0x26805(%rip), %rbx     # 0x49874
orl $-0x1, 0x267fe(%rip)    # 0x49874
pushq $0x32
popq %rdi
callq 0x1f140
leaq 0x2739b(%rip), %r15     # 0x4a420
pushq $0x1
popq %rbp
movl (%r15,%rbx,4), %ecx
testl %ecx, %ecx
je 0x230c0
movl $0x7a120, %eax          # imm = 0x7A120
xorl %edx, %edx
idivl %ecx
movl %eax, %r14d
movl %ebx, %edi
movl %ebp, %esi
callq 0x200b0
movl %r14d, %edi
callq 0x1f430
movl %ebx, %edi
xorl %esi, %esi
callq 0x200b0
movl %r14d, %edi
callq 0x1f430
jmp 0x23088
movl %ebp, %edi
callq 0x1f630
jmp 0x23088
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/softTone.c
// Function: softToneStop
void softToneStop (int pin)
{
  if (threads [pin] != 0)
  {
    pthread_cancel (threads [pin]) ;
    pthread_join   (threads [pin], NULL) ;
    threads [pin] = 0 ;
    digitalWrite (pin, LOW) ;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movslq %edi, %rbx
leaq 0x27449(%rip), %r14     # 0x4a520
movq (%r14,%rbx,8), %rdi
testq %rdi, %rdi
je 0x23105
callq 0x1fb70
movq (%r14,%rbx,8), %rdi
xorl %esi, %esi
callq 0x1f6f0
andq $0x0, (%r14,%rbx,8)
movl %ebx, %edi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x200b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: wiringPiFailure
int wiringPiFailure (int fatal, const char *message, ...)
{
  va_list argp ;
  char buffer [1024] ;

  if (!fatal && wiringPiReturnCodes)
    return -1 ;

  va_start (argp, message) ;
    vsnprintf (buffer, 1023, message, argp) ;
  va_end (argp) ;

  fprintf (stderr, "%s", buffer) ;
  exit (EXIT_FAILURE) ;

  return 0 ;
}

// Assembly:
pushq %rbx
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rsi, %r10
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2316a
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
testl %edi, %edi
jne 0x23186
movq 0x25e3b(%rip), %rax     # 0x48fb0
cmpl $0x0, (%rax)
je 0x23186
pushq $-0x1
popq %rax
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbx
retq
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x4e0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rcx)
leaq 0xd0(%rsp), %rbx
movl $0x3ff, %esi            # imm = 0x3FF
movq %rbx, %rdi
movq %r10, %rdx
callq 0x1f4c0
movq 0x25dce(%rip), %rax     # 0x48f98
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x1f8e0
pushq $0x1
popq %rdi
callq 0x1f9e0
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: piGpioLayoutOops
static void piGpioLayoutOops (const char *why)
{
  fprintf (stderr, "Oops: Unable to determine board revision from /proc/cpuinfo\n") ;
  fprintf (stderr, " -> %s\n", why) ;
  fprintf (stderr, " ->  You'd best google the error to find out why.\n") ;
//fprintf (stderr, " ->  http://www.raspberrypi.org/phpBB3/viewtopic.php?p=184410#p184410\n") ;
  exit (EXIT_FAILURE) ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x25b8e(%rip), %r15     # 0x48f98
movq (%r15), %rcx
leaq 0x109d1(%rip), %rdi     # 0x33de5
pushq $0x3c
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
callq 0x20050
movq (%r15), %rdi
leaq 0x109f5(%rip), %rsi     # 0x33e22
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1fc30
movq (%r15), %rcx
leaq 0x109e9(%rip), %rdi     # 0x33e2a
pushq $0x32
popq %rsi
movq %r14, %rdx
callq 0x20050
pushq $0x1
popq %rdi
callq 0x1f9e0
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: setPadDrive
void setPadDrive (int group, int value)
{
  uint32_t wrVal ;

  if ((wiringPiMode == WPI_MODE_PINS) || (wiringPiMode == WPI_MODE_PHYS) || (wiringPiMode == WPI_MODE_GPIO))
  {
    if ((group < 0) || (group > 2))
      return ;

    wrVal = BCM_PASSWORD | 0x18 | (value & 7) ;
    *(pads + group + 11) = wrVal ;

    if (wiringPiDebug)
    {
      printf ("setPadDrive: Group: %d, value: %d (%08X)\n", group, value, wrVal) ;
      printf ("Read : %08X\n", *(pads + group + 11)) ;
    }
  }
}

// Assembly:
pushq %rbx
movl 0x25f76(%rip), %eax     # 0x49a34
cmpl $0x3, %eax
ja 0x23b1d
cmpl $0x2, %eax
je 0x23b1d
movl %esi, %edx
movl %edi, %esi
cmpl $0x2, %edi
ja 0x23b1d
movl %edx, %ecx
andl $0x7, %ecx
orl $0x5a000018, %ecx       # imm = 0x5A000018
movq 0x26c65(%rip), %rax     # 0x4a748
movl %esi, %ebx
movl %ecx, 0x2c(%rax,%rbx,4)
movq 0x25470(%rip), %rax     # 0x48f60
cmpl $0x0, (%rax)
je 0x23b1d
leaq 0xfe80(%rip), %rdi      # 0x3397c
xorl %eax, %eax
callq 0x1f050
movq 0x26c3e(%rip), %rax     # 0x4a748
movl 0x2c(%rax,%rbx,4), %esi
leaq 0xfe91(%rip), %rdi      # 0x339a6
xorl %eax, %eax
popq %rbx
jmp 0x1f050
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: getAlt
int getAlt (int pin)
{
  int fSel, shift, alt ;

  pin &= 63 ;

  /**/ if (wiringPiMode == WPI_MODE_PINS)
    pin = pinToGpio [pin] ;
  else if (wiringPiMode == WPI_MODE_PHYS)
    pin = physToGpio [pin] ;
  else if (wiringPiMode != WPI_MODE_GPIO)
    return 0 ;

  fSel    = gpioToGPFSEL [pin] ;
  shift   = gpioToShift  [pin] ;

  alt = (*(gpio + fSel) >> shift) & 7 ;

  return alt ;
}

// Assembly:
andl $0x3f, %edi
movl 0x25f0c(%rip), %ecx     # 0x49a34
testl %ecx, %ecx
je 0x23b41
cmpl $0x1, %ecx
je 0x23b50
xorl %eax, %eax
cmpl $0x3, %ecx
jne 0x23b77
leaq 0x26c01(%rip), %rax     # 0x4a740
jmp 0x23b48
leaq 0x26bf0(%rip), %rax     # 0x4a738
movq (%rax), %rax
movl %edi, %ecx
movl (%rax,%rcx,4), %edi
movslq %edi, %rax
leaq 0xf6d6(%rip), %rcx      # 0x33230
movzbl (%rax,%rcx), %edx
leaq 0xf70b(%rip), %rcx      # 0x33270
movb (%rax,%rcx), %cl
movq 0x26be1(%rip), %rax     # 0x4a750
movl (%rax,%rdx,4), %eax
shrl %cl, %eax
andl $0x7, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: delayMicroseconds
void delayMicroseconds (unsigned int howLong)
{
  struct timespec sleeper ;
  unsigned int uSecs = howLong % 1000000 ;
  unsigned int wSecs = howLong / 1000000 ;

  /**/ if (howLong ==   0)
    return ;
  else if (howLong  < 100)
    delayMicrosecondsHard (howLong) ;
  else
  {
    sleeper.tv_sec  = wSecs ;
    sleeper.tv_nsec = (long)(uSecs * 1000L) ;
    nanosleep (&sleeper, NULL) ;
  }
}

// Assembly:
movl $0xf4240, %ecx          # imm = 0xF4240
movl %edi, %eax
xorl %edx, %edx
divl %ecx
testl %edi, %edi
je 0x23c1d
cmpl $0x63, %edi
jbe 0x1f340
subq $0x18, %rsp
movl %eax, %eax
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
imull $0x3e8, %edx, %eax      # imm = 0x3E8
movq %rax, 0x8(%rdi)
xorl %esi, %esi
callq 0x1f200
addq $0x18, %rsp
retq