LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2522f(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x6, %edx
callq 0x1f630
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_O1/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
movl $0x10, %esi
movl $0x3, %edx
movq %rax, %rcx
jmp 0x1f150
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movzbl (%rdi), %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0x1f5d0
movl $0xa, %edi
callq 0x1f460
movzbl (%r12), %edi
leaq 0x1(%r12), %rcx
movq 0x24e4f(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x6, %edx
callq 0x1f630
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_O1/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 %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0x1f5d0
movl $0xa, %edi
callq 0x1f460
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rcx
movq 0x24de4(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x2, %edx
callq 0x1f630
movzwl 0x1(%rbx), %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0x1f5d0
movl $0xa, %edi
callq 0x1f460
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rcx
movq 0x24d9c(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x5, %esi
movl $0x2, %edx
callq 0x1f630
movzwl 0x1(%rbx), %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0x1f5d0
movl $0xa, %edi
callq 0x1f460
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rcx
movq 0x24d54(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x7, %esi
movl $0x2, %edx
callq 0x1f630
movzwl 0x1(%rbx), %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movzbl (%rdi), %edi
movl $0xa, %esi
movl $0xf, %edx
callq 0x1f5d0
movl $0xa, %edi
callq 0x1f460
movzbl (%r12), %edi
leaq 0x1(%r12), %rcx
movq 0x24c11(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x10, %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/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 %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movzbl (%rdi), %edi
movl $0xa, %esi
movl $0xf, %edx
callq 0x1f5d0
movl $0xa, %edi
callq 0x1f460
leaq 0x1(%r15), %rcx
movb %r14b, 0x1(%r15)
movb %bpl, 0x2(%r15)
movb %bl, 0x3(%r15)
movzbl (%r15), %edi
movl $0x10, %esi
movl $0x3, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1f150
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
movl $0xa, %esi
movl $0xf, %edx
callq 0x1f5d0
movl $0xa, %edi
callq 0x1f460
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rdx
movq 0x24b52(%rip), %rax     # 0x46f48
movzwl (%rax), %ecx
movl $0x10, %esi
callq 0x1f6d0
movb 0x1(%rbx), %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
movl $0xa, %esi
movl $0xf, %edx
callq 0x1f5d0
movl $0xa, %edi
callq 0x1f460
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rdx
movq 0x24a5a(%rip), %rax     # 0x46f48
movzwl (%rax), %ecx
movl $0x12, %esi
callq 0x1f6d0
movb 0x1(%rbx), %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x225b0
movb $0x1, (%rdi)
leaq 0x8(%rsp), %rdx
movq %rdi, (%rdx)
leaq 0x34(%rip), %rsi        # 0x225ca
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x1f420
movq %rbx, %rdi
callq 0x1fa30
cmpq $0x0, (%rsp)
jne 0x225c5
addq $0x10, %rsp
popq %rbx
retq
cmpq $0x0, (%rsp)
jne 0x225c5
movq %rax, %rdi
callq 0x1fa40
callq 0x1f130
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x8(%rdi), %r14
movq 0x249d5(%rip), %r15     # 0x46fd0
movq %rsp, %r12
cmpb $0x1, (%rbx)
jne 0x22638
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1f560
movsbl %al, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1fa90
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x1f180
jmp 0x225fe
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2264e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1f5f0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x22675
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1f5f0
movq %rbx, %rdi
callq 0x1fa40
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
cmpq $0x0, 0x10(%rdi)
je 0x226a0
movq 0x8(%rdi), %rcx
movsbl (%rcx), %eax
movq $0x0, 0x10(%rdi)
movb $0x0, (%rcx)
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x22703
leaq 0x12981(%rip), %rax     # 0x35060
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
pushq %rax
movzbl %sil, %eax
movq %rsp, %rsi
movq %rax, (%rsi)
movq 0x24896(%rip), %rdi     # 0x46f90
callq 0x1f760
addq $0x8, %rsp
retq
movq 0x24885(%rip), %rdi     # 0x46f90
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x18(%rdi,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
jmp 0x22736
movq 0x2486b(%rip), %rdi     # 0x46f90
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x18(%rdi,%rax), %ecx
andl $-0x4b, %ecx
orl $0x40, %ecx
movl %ecx, 0x18(%rdi,%rax)
jmp 0x1f550
movq 0x2484a(%rip), %rdi     # 0x46f90
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 0x1f550
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x4(%rdi)
jns 0x22a46
movq %rdi, %rbx
callq 0x1fb20
cmpl $0x1, %eax
leaq 0x1270e(%rip), %rax     # 0x35136
leaq 0x12712(%rip), %rdi     # 0x35141
cmoveq %rax, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x1f3c0
movl %eax, 0x4(%rbx)
testl %eax, %eax
js 0x22a4e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x2459b(%rip), %rbx     # 0x46ff0
leaq 0x126f0(%rip), %rsi     # 0x3514c
movl $0x19, %edx
movq %rbx, %rdi
callq 0x1f680
callq 0x1f040
movl (%rax), %edi
callq 0x1f190
testq %rax, %rax
je 0x22a99
movq %rax, %r14
movq %rax, %rdi
callq 0x1f200
movq 0x24564(%rip), %rdi     # 0x46ff0
movq %r14, %rsi
movq %rax, %rdx
callq 0x1f680
jmp 0x22ab0
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x1f9e0
movq 0x24539(%rip), %rbx     # 0x46ff0
leaq 0x126ed(%rip), %rsi     # 0x351ab
movl $0x2, %edx
movq %rbx, %rdi
callq 0x1f680
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1f390
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x1f7c0
cmpb %bpl, (%rbx)
je 0x22b9d
movb %bpl, (%rbx)
movl 0x4(%rbx), %edi
testl %edi, %edi
js 0x22b14
movl $0x703, %esi            # imm = 0x703
movl %ebp, %edx
xorl %eax, %eax
callq 0x1f840
testl %eax, %eax
jns 0x22b9d
movq 0x244d5(%rip), %r14     # 0x46ff0
leaq 0x12644(%rip), %rsi     # 0x35166
movl $0x1b, %edx
movq %r14, %rdi
callq 0x1f680
callq 0x1f040
movl (%rax), %edi
callq 0x1f190
testq %rax, %rax
je 0x22b5f
movq %rax, %r15
movq %rax, %rdi
callq 0x1f200
movq 0x2449e(%rip), %rdi     # 0x46ff0
movq %r15, %rsi
movq %rax, %rdx
callq 0x1f680
jmp 0x22b77
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x1f9e0
movq 0x24472(%rip), %r14     # 0x46ff0
leaq 0x12626(%rip), %rsi     # 0x351ab
movl $0x2, %edx
movq %r14, %rdi
callq 0x1f680
movq %r14, %rdi
callq 0x1f390
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x22bc9
callq 0x1fb00
movl $0xffffffff, 0x4(%rbx)  # imm = 0xFFFFFFFF
movb $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x22c5a
pushq %rbx
movq %rdi, %rbx
movl 0x4(%rdi), %edi
testl %edi, %edi
js 0x22c59
movslq 0x50(%rbx), %rdx
testq %rdx, %rdx
jle 0x22c57
leaq 0x30(%rbx), %rsi
callq 0x1f1a0
movq %rax, %rcx
testl %ecx, %ecx
setns %al
orb $0x2, %al
testl %ecx, %ecx
js 0x22c59
cmpl %ecx, 0x50(%rbx)
jg 0x22c59
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x22c9e
movq %rdi, %r14
movslq 0x50(%rdi), %rax
movl $0x20, %ebx
subq %rax, %rbx
cmpq %rdx, %rbx
cmovaeq %rdx, %rbx
testq %rbx, %rbx
je 0x22ca7
leaq (%r14,%rax), %rdi
addq $0x30, %rdi
movq %rbx, %rdx
callq 0x1f480
addl %ebx, 0x50(%r14)
jmp 0x22ca9
movq $-0x1, %rbx
jmp 0x22ca9
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x22d7b
movl %r8d, %r12d
movl %ecx, %r15d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1f4e0
xorl %ecx, %ecx
movzbl %r12b, %edx
cmpb $0x3, %dl
movl $0x3, %eax
cmovbl %edx, %eax
movl %ecx, 0x2c(%rbx)
movl %ecx, 0x50(%rbx)
leal -0x1(%rax), %ecx
movzbl %cl, %ecx
shll $0x3, %ecx
movl %r15d, %edx
shrl %cl, %edx
cmpb $0x0, (%rbx)
je 0x22d68
movslq 0x50(%rbx), %rsi
cmpq $0x20, %rsi
je 0x22d68
movb %dl, 0x30(%rbx,%rsi)
incl 0x50(%rbx)
decb %al
addl $-0x8, %ecx
testb %al, %al
jne 0x22d4d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1f660
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1f4e0
xorl %eax, %eax
movl %eax, 0x2c(%rbx)
movl %eax, 0x50(%rbx)
cmpb $0x0, (%rbx)
je 0x22db5
movzbl %bpl, %eax
cmpb $0x20, %al
movl $0x20, %ecx
cmovbl %eax, %ecx
movl 0x4(%rbx), %edi
leaq 0x8(%rbx), %rsi
movzbl %cl, %edx
callq 0x1f890
movl %eax, 0x28(%rbx)
jmp 0x22db7
movb $-0x1, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x22e2f
movslq 0x2c(%rdi), %rdx
movzbl 0x8(%rdi,%rdx), %eax
incl %edx
movl %edx, 0x2c(%rdi)
decl %ecx
movl %ecx, 0x28(%rdi)
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x12343(%rip), %rsi     # 0x351ae
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x1f090
movq %rbx, %rdi
movq %r14, %rsi
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x1f090
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/piHiPri.c
// Function: piHiPri
int piHiPri (const int pri)
{
  struct sched_param sched ;

  memset (&sched, 0, sizeof(sched)) ;

  if (pri > sched_get_priority_max (SCHED_RR))
    sched.sched_priority = sched_get_priority_max (SCHED_RR) ;
  else
    sched.sched_priority = pri ;

  return sched_setscheduler (0, SCHED_RR, &sched) ;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movl $0x0, 0xc(%rsp)
movl $0x2, %edi
callq 0x1f570
cmpl %ebx, %eax
jge 0x22ec1
movl $0x2, %edi
callq 0x1f570
movl %eax, %ebx
leaq 0xc(%rsp), %rdx
movl %ebx, (%rdx)
xorl %edi, %edi
movl $0x2, %esi
callq 0x1f990
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x22f07
movslq %edi, %rax
testl %esi, %esi
js 0x22efb
leaq 0x24e71(%rip), %rcx     # 0x47d60
movl (%rcx,%rax,4), %edx
cmpl %esi, %edx
jge 0x22efd
movl (%rcx,%rax,4), %esi
jmp 0x22efd
xorl %esi, %esi
leaq 0x24f5c(%rip), %rcx     # 0x47e60
movl %esi, (%rcx,%rax,4)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3f, %edi
jle 0x22f2e
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edx, %r14d
movl %edi, %ebp
movslq %edi, %r13
leaq 0x24e23(%rip), %rax     # 0x47d60
movl (%rax,%r13,4), %eax
testl %edx, %edx
jle 0x22f1d
testl %eax, %eax
jne 0x22f1d
movl %esi, %r15d
movl $0x4, %edi
callq 0x1f7b0
testq %rax, %rax
je 0x22f1d
movq %rax, %r12
movl %ebp, %edi
xorl %esi, %esi
callq 0x1fb30
movl %ebp, %edi
movl $0x1, %esi
callq 0x1f310
leaq 0x24ee6(%rip), %rax     # 0x47e60
movl %r15d, (%rax,%r13,4)
leaq 0x24ddb(%rip), %rax     # 0x47d60
movl %r14d, (%rax,%r13,4)
movl %ebp, (%r12)
movl %ebp, 0x2461d(%rip)     # 0x475b0
leaq 0x42(%rip), %rdx        # 0x22fdc
movq %rsp, %rdi
xorl %esi, %esi
movq %r12, %rcx
callq 0x1fa70
movl %eax, %ebx
testl %eax, %eax
jne 0x22f1d
jmp 0x22fbd
movl $0x1, %edi
callq 0x1f460
movl 0x245ed(%rip), %eax     # 0x475b0
cmpl $-0x1, %eax
jne 0x22fb3
movq (%rsp), %rax
leaq 0x24f8d(%rip), %rcx     # 0x47f60
movq %rax, (%rcx,%r13,8)
jmp 0x22f1d
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x2, %edi
callq 0x1f570
leaq 0xc(%rsp), %r14
movl %eax, (%r14)
callq 0x1f500
movq %rax, %rdi
movl $0x2, %esi
movq %r14, %rdx
callq 0x1f360
movq %rbx, %rdi
callq 0x1f6e0
movslq 0x2458f(%rip), %rbx     # 0x475b0
movl $0xffffffff, 0x24585(%rip) # imm = 0xFFFFFFFF
movl $0x5a, %edi
callq 0x1f0f0
leaq 0x24e24(%rip), %r14     # 0x47e60
leaq 0x24d1d(%rip), %r15     # 0x47d60
movl (%r14,%rbx,4), %ebp
movl (%r15,%rbx,4), %r12d
testl %ebp, %ebp
je 0x2305b
movl %ebx, %edi
movl $0x1, %esi
callq 0x1fb30
imull $0x64, %ebp, %edi
callq 0x1f2f0
cmpl %ebp, %r12d
je 0x23071
movl %ebx, %edi
xorl %esi, %esi
callq 0x1fb30
subl %ebp, %r12d
imull $0x64, %r12d, %edi
callq 0x1f2f0
jmp 0x23043
// File: /workspace/github_cpp_makefile_star2_O1/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 0x230d6
movl %edi, %ebx
movslq %edi, %r14
leaq 0x24cc8(%rip), %r15     # 0x47d60
cmpl $0x0, (%r15,%r14,4)
je 0x230d6
leaq 0x24eba(%rip), %r12     # 0x47f60
movq (%r12,%r14,8), %rdi
callq 0x1f810
movq (%r12,%r14,8), %rdi
xorl %esi, %esi
callq 0x1f510
movl $0x0, (%r15,%r14,4)
movl %ebx, %edi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1fb30
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movl $0x1, %esi
callq 0x1f310
movl %ebx, %edi
xorl %esi, %esi
callq 0x1fb30
movslq %ebx, %r14
leaq 0x25135(%rip), %r15     # 0x48260
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpq $0x0, (%r15,%r14,8)
jne 0x23182
leaq 0x25022(%rip), %rax     # 0x48160
movl $0x0, (%rax,%r14,4)
movl %r14d, 0x24467(%rip)    # 0x475b4
leaq 0x3a(%rip), %rdx        # 0x2318e
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1fa70
movl %eax, %ebx
cmpl $-0x1, 0x24449(%rip)    # 0x475b4
je 0x23179
movl $0x1, %edi
callq 0x1f460
jmp 0x23164
movq 0x8(%rsp), %rax
movq %rax, (%r15,%r14,8)
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x10, %rsp
movl $0x2, %edi
callq 0x1f570
leaq 0xc(%rsp), %rbx
movl %eax, (%rbx)
callq 0x1f500
movq %rax, %rdi
movl $0x2, %esi
movq %rbx, %rdx
callq 0x1f360
movslq 0x243f1(%rip), %rbx     # 0x475b4
movl $0xffffffff, 0x243e7(%rip) # imm = 0xFFFFFFFF
movl $0x32, %edi
callq 0x1f0f0
leaq 0x24f82(%rip), %r14     # 0x48160
movl (%r14,%rbx,4), %ecx
testl %ecx, %ecx
je 0x23216
movl $0x7a120, %eax          # imm = 0x7A120
xorl %edx, %edx
idivl %ecx
movl %eax, %ebp
movl %ebx, %edi
movl $0x1, %esi
callq 0x1fb30
movl %ebp, %edi
callq 0x1f2f0
movl %ebx, %edi
xorl %esi, %esi
callq 0x1fb30
movl %ebp, %edi
callq 0x1f2f0
jmp 0x231de
movl $0x1, %edi
callq 0x1f460
jmp 0x231de
// File: /workspace/github_cpp_makefile_star2_O1/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 0x25030(%rip), %r14     # 0x48260
movq (%r14,%rbx,8), %rdi
testq %rdi, %rdi
je 0x23261
callq 0x1f810
movq (%r14,%rbx,8), %rdi
xorl %esi, %esi
callq 0x1f510
movq $0x0, (%r14,%rbx,8)
movl %ebx, %edi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1fb30
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/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 0x232c6
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 0x232e4
movq 0x23cdf(%rip), %rax     # 0x46fb0
cmpl $0x0, (%rax)
je 0x232e4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
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 0x1f340
movq 0x23c70(%rip), %rax     # 0x46f98
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x1f670
movl $0x1, %edi
callq 0x1f700
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x23a2d(%rip), %r14     # 0x46f98
movq (%r14), %rcx
leaq 0x12870(%rip), %rdi     # 0x35de5
movl $0x3c, %esi
movl $0x1, %edx
callq 0x1faf0
movq (%r14), %rdi
leaq 0x12894(%rip), %rsi     # 0x35e22
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1f880
movq (%r14), %rcx
leaq 0x12888(%rip), %rdi     # 0x35e2a
movl $0x32, %esi
movl $0x1, %edx
callq 0x1faf0
movl $0x1, %edi
callq 0x1f700
// File: /workspace/github_cpp_makefile_star2_O1/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 0x23b39(%rip), %eax     # 0x47774
cmpl $0x3, %eax
ja 0x23c9a
cmpl $0x2, %eax
je 0x23c9a
movl %esi, %edx
movl %edi, %esi
cmpl $0x2, %edi
ja 0x23c9a
movl %edx, %ecx
andl $0x7, %ecx
orl $0x5a000018, %ecx       # imm = 0x5A000018
movq 0x24828(%rip), %rax     # 0x48488
movl %esi, %ebx
movl %ecx, 0x2c(%rax,%rbx,4)
movq 0x232f3(%rip), %rax     # 0x46f60
cmpl $0x0, (%rax)
je 0x23c9a
leaq 0x11d03(%rip), %rdi     # 0x3597c
xorl %eax, %eax
callq 0x1f050
movq 0x24801(%rip), %rax     # 0x48488
movl 0x2c(%rax,%rbx,4), %esi
leaq 0x11d14(%rip), %rdi     # 0x359a6
xorl %eax, %eax
popq %rbx
jmp 0x1f050
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x23acf(%rip), %ecx     # 0x47774
testl %ecx, %ecx
je 0x23cbe
cmpl $0x1, %ecx
je 0x23ccd
xorl %eax, %eax
cmpl $0x3, %ecx
jne 0x23cf4
leaq 0x247c4(%rip), %rax     # 0x48480
jmp 0x23cc5
leaq 0x247b3(%rip), %rax     # 0x48478
movq (%rax), %rax
movl %edi, %ecx
movl (%rax,%rcx,4), %edi
movslq %edi, %rax
leaq 0x11559(%rip), %rcx     # 0x35230
movzbl (%rax,%rcx), %edx
leaq 0x1158e(%rip), %rcx     # 0x35270
movb (%rax,%rcx), %cl
movq 0x247a4(%rip), %rax     # 0x48490
movl (%rax,%rdx,4), %eax
shrl %cl, %eax
andl $0x7, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
testl %edi, %edi
je 0x23da3
cmpl $0x63, %edi
jbe 0x1f240
subq $0x18, %rsp
movl %edi, %eax
imulq $0x431bde83, %rax, %rax # imm = 0x431BDE83
shrq $0x32, %rax
imull $0xf4240, %eax, %ecx    # imm = 0xF4240
subl %ecx, %edi
movl %eax, %ecx
leaq 0x8(%rsp), %rax
movq %rcx, (%rax)
imull $0x3e8, %edi, %ecx      # imm = 0x3E8
movq %rcx, 0x8(%rax)
movq %rax, %rdi
xorl %esi, %esi
callq 0x1f160
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: pwmSetClock
void pwmSetClock (int divisor)
{
  uint32_t pwm_control ;

  if (piGpioBase == GPIO_PERI_BASE_2711)
  {
    divisor = 540*divisor/192;
  }
  divisor &= 4095 ;

  if ((wiringPiMode == WPI_MODE_PINS) || (wiringPiMode == WPI_MODE_PHYS) || (wiringPiMode == WPI_MODE_GPIO))
  {
    if (wiringPiDebug)
      printf ("Setting to: %d. Current: 0x%08X\n", divisor, *(clk + PWMCLK_DIV)) ;

    pwm_control = *(pwm + PWM_CONTROL) ;		// preserve PWM_CONTROL

// We need to stop PWM prior to stopping PWM clock in MS mode otherwise BUSY
// stays high.

    *(pwm + PWM_CONTROL) = 0 ;				// Stop PWM

// Stop PWM clock before changing divisor. The delay after this does need to
// this big (95uS occasionally fails, 100uS OK), it's almost as though the BUSY
// flag is not working properly in balanced mode. Without the delay when DIV is
// adjusted the clock sometimes switches to very slow, once slow further DIV
// adjustments do nothing and it's difficult to get out of this mode.

    *(clk + PWMCLK_CNTL) = BCM_PASSWORD | 0x01 ;	// Stop PWM Clock
      delayMicroseconds (110) ;			// prevents clock going sloooow

    while ((*(clk + PWMCLK_CNTL) & 0x80) != 0)	// Wait for clock to be !BUSY
      delayMicroseconds (1) ;

    *(clk + PWMCLK_DIV)  = BCM_PASSWORD | (divisor << 12) ;

    *(clk + PWMCLK_CNTL) = BCM_PASSWORD | 0x11 ;	// Start PWM clock
    *(pwm + PWM_CONTROL) = pwm_control ;		// restore PWM_CONTROL

    if (wiringPiDebug)
      printf ("Set     to: %d. Now    : 0x%08X\n", divisor, *(clk + PWMCLK_DIV)) ;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movl 0x246ec(%rip), %eax     # 0x484a0
cmpl $0xfe000000, %eax       # imm = 0xFE000000
jne 0x23dd7
imull $0x21c, %ebx, %eax      # imm = 0x21C
cltq
imulq $0x2aaaaaab, %rax, %rbx # imm = 0x2AAAAAAB
movq %rbx, %rax
shrq $0x3f, %rax
sarq $0x25, %rbx
addl %eax, %ebx
movl 0x23997(%rip), %eax     # 0x47774
cmpl $0x3, %eax
ja 0x23eb5
cmpl $0x2, %eax
je 0x23eb5
andl $0xfff, %ebx            # imm = 0xFFF
movq 0x23164(%rip), %r14     # 0x46f60
cmpl $0x0, (%r14)
je 0x23e1f
movq 0x2469f(%rip), %rax     # 0x484a8
movl 0xa4(%rax), %edx
leaq 0x11b9d(%rip), %rdi     # 0x359b3
movl %ebx, %esi
xorl %eax, %eax
callq 0x1f050
movq 0x24672(%rip), %rax     # 0x48498
movl (%rax), %ebp
movl $0x0, (%rax)
movq 0x24673(%rip), %rax     # 0x484a8
movl $0x5a000001, 0xa0(%rax) # imm = 0x5A000001
movq %rsp, %rdi
movq $0x0, (%rdi)
movq $0x1adb0, 0x8(%rdi)     # imm = 0x1ADB0
xorl %esi, %esi
callq 0x1f160
movq 0x24649(%rip), %rax     # 0x484a8
movl 0xa0(%rax), %ecx
testb %cl, %cl
jns 0x23e75
movl $0x1, %edi
callq 0x1f240
jmp 0x23e58
movl %ebx, %ecx
shll $0xc, %ecx
orl $0x5a000000, %ecx       # imm = 0x5A000000
movl %ecx, 0xa4(%rax)
movl $0x5a000011, 0xa0(%rax) # imm = 0x5A000011
movq 0x24601(%rip), %rcx     # 0x48498
movl %ebp, (%rcx)
cmpl $0x0, (%r14)
je 0x23eb5
movl 0xa4(%rax), %edx
leaq 0x11b28(%rip), %rdi     # 0x359d4
movl %ebx, %esi
xorl %eax, %eax
callq 0x1f050
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: gpioClockSet
void gpioClockSet (int pin, int freq)
{
  int divi, divr, divf ;

  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 ;

  divi = 19200000 / freq ;
  divr = 19200000 % freq ;
  divf = (int)((double)divr * 4096.0 / 19200000.0) ;

  if (divi > 4095)
    divi = 4095 ;

  *(clk + gpioToClkCon [pin]) = BCM_PASSWORD | GPIO_CLOCK_SOURCE ;		// Stop GPIO Clock
  while ((*(clk + gpioToClkCon [pin]) & 0x80) != 0)				// ... and wait
    ;

  *(clk + gpioToClkDiv [pin]) = BCM_PASSWORD | (divi << 12) | divf ;		// Set dividers
  *(clk + gpioToClkCon [pin]) = BCM_PASSWORD | 0x10 | GPIO_CLOCK_SOURCE ;	// Start Clock
}

// Assembly:
andl $0x3f, %edi
movl 0x238ad(%rip), %eax     # 0x47774
testl %eax, %eax
je 0x23ee2
cmpl $0x1, %eax
je 0x23ef1
cmpl $0x3, %eax
jne 0x23f62
leaq 0x245a0(%rip), %rax     # 0x48480
jmp 0x23ee9
leaq 0x2458f(%rip), %rax     # 0x48478
movq (%rax), %rax
movl %edi, %ecx
movl (%rax,%rcx,4), %edi
movl $0x124f800, %eax        # imm = 0x124F800
xorl %edx, %edx
idivl %esi
cvtsi2sd %edx, %xmm0
mulsd 0x112b2(%rip), %xmm0    # 0x351b8
divsd 0x112b2(%rip), %xmm0    # 0x351c0
cvttsd2si %xmm0, %r8d
movq 0x2458e(%rip), %rcx     # 0x484a8
movslq %edi, %rsi
leaq 0x1138c(%rip), %rdx     # 0x352b0
movzbl (%rsi,%rdx), %edx
movl $0x5a000001, (%rcx,%rdx,4) # imm = 0x5A000001
movl (%rcx,%rdx,4), %edi
testb %dil, %dil
js 0x23f2f
movl $0xfff, %edi            # imm = 0xFFF
cmpl %edi, %eax
cmovll %eax, %edi
shll $0xc, %edi
orl %r8d, %edi
orl $0x5a000000, %edi       # imm = 0x5A000000
leaq 0x1139c(%rip), %rax     # 0x352f0
movzbl (%rsi,%rax), %eax
movl %edi, (%rcx,%rax,4)
movl $0x5a000011, (%rcx,%rdx,4) # imm = 0x5A000011
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: wiringPiNewNode
struct wiringPiNodeStruct *wiringPiNewNode (int pinBase, int numPins)
{
  int    pin ;
  struct wiringPiNodeStruct *node ;

// Minimum pin base is 64

  if (pinBase < 64)
    (void)wiringPiFailure (WPI_FATAL, "wiringPiNewNode: pinBase of %d is < 64\n", pinBase) ;

// Check all pins in-case there is overlap:

  for (pin = pinBase ; pin < (pinBase + numPins) ; ++pin)
    if (wiringPiFindNode (pin) != NULL)
      (void)wiringPiFailure (WPI_FATAL, "wiringPiNewNode: Pin %d overlaps with existing definition\n", pin) ;

  node = (struct wiringPiNodeStruct *)calloc (sizeof (struct wiringPiNodeStruct), 1) ;	// calloc zeros
  if (node == NULL)
    (void)wiringPiFailure (WPI_FATAL, "wiringPiNewNode: Unable to allocate memory: %s\n", strerror (errno)) ;

  node->pinBase          = pinBase ;
  node->pinMax           = pinBase + numPins - 1 ;
  node->pinMode          = pinModeDummy ;
  node->pullUpDnControl  = pullUpDnControlDummy ;
  node->digitalRead      = digitalReadDummy ;
//node->digitalRead8     = digitalRead8Dummy ;
  node->digitalWrite     = digitalWriteDummy ;
//node->digitalWrite8    = digitalWrite8Dummy ;
  node->pwmWrite         = pwmWriteDummy ;
  node->analogRead       = analogReadDummy ;
  node->analogWrite      = analogWriteDummy ;
  node->next             = wiringPiNodes ;
  wiringPiNodes          = node ;

  return node ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movl %edi, %ebx
cmpl $0x3f, %edi
jg 0x23fab
leaq 0x11a58(%rip), %rsi     # 0x359f5
movl $0x1, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1f270
leal (%r14,%rbx), %r15d
testl %r14d, %r14d
jle 0x23ff4
movq 0x22ffd(%rip), %r12     # 0x46fb8
leaq 0x11a5b(%rip), %r14     # 0x35a1d
movl %ebx, %ebp
movq (%r12), %rax
testq %rax, %rax
je 0x23fed
cmpl %ebp, (%rax)
jg 0x23fd6
cmpl %ebp, 0x4(%rax)
jge 0x23fdc
movq 0x58(%rax), %rax
jmp 0x23fc8
movl $0x1, %edi
movq %r14, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1f270
incl %ebp
cmpl %r15d, %ebp
jl 0x23fc4
movl $0x60, %edi
movl $0x1, %esi
callq 0x1f350
movq %rax, %r14
testq %rax, %rax
jne 0x2402d
callq 0x1f040
movl (%rax), %edi
callq 0x1f190
leaq 0x11a3a(%rip), %rsi     # 0x35a58
movl $0x1, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1f270
movl %ebx, (%r14)
decl %r15d
movl %r15d, 0x4(%r14)
leaq 0x63(%rip), %rax        # 0x240a1
movq %rax, 0x20(%r14)
leaq 0x59(%rip), %rax        # 0x240a2
movq %rax, 0x28(%r14)
leaq 0x4f(%rip), %rax        # 0x240a3
movq %rax, 0x30(%r14)
leaq 0x47(%rip), %rax        # 0x240a6
movq %rax, 0x38(%r14)
leaq 0x3d(%rip), %rax        # 0x240a7
movq %rax, 0x40(%r14)
leaq 0x33(%rip), %rax        # 0x240a8
movq %rax, 0x48(%r14)
leaq 0x2b(%rip), %rax        # 0x240ab
movq %rax, 0x50(%r14)
movq 0x22f2d(%rip), %rax     # 0x46fb8
movq (%rax), %rcx
movq %rcx, 0x58(%r14)
movq %r14, (%rax)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: pinModeAlt
void pinModeAlt (int pin, int mode)
{
  int fSel, shift ;

  setupCheck ("pinModeAlt") ;

  if ((pin & PI_GPIO_MASK) == 0)		// On-board pin
  {
    /**/ if (wiringPiMode == WPI_MODE_PINS)
      pin = pinToGpio [pin] ;
    else if (wiringPiMode == WPI_MODE_PHYS)
      pin = physToGpio [pin] ;
    else if (wiringPiMode != WPI_MODE_GPIO)
      return ;

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

    *(gpio + fSel) = (*(gpio + fSel) & ~(7 << shift)) | ((mode & 0x7) << shift) ;
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
leaq 0x119ce(%rip), %rdi     # 0x35a88
callq 0x2412c
cmpl $0x3f, %ebp
ja 0x24125
movl 0x236aa(%rip), %eax     # 0x47774
testl %eax, %eax
je 0x240e1
cmpl $0x1, %eax
je 0x240f0
cmpl $0x3, %eax
jne 0x24125
leaq 0x243a1(%rip), %rax     # 0x48480
jmp 0x240e8
leaq 0x24390(%rip), %rax     # 0x48478
movq (%rax), %rax
movl %ebp, %ecx
movl (%rax,%rcx,4), %ebp
movslq %ebp, %rax
leaq 0x11136(%rip), %rdx     # 0x35230
leaq 0x1116f(%rip), %rcx     # 0x35270
movb (%rax,%rcx), %cl
movl $0x7, %esi
shll %cl, %esi
movzbl (%rax,%rdx), %eax
movq 0x2437a(%rip), %rdx     # 0x48490
notl %esi
andl $0x7, %ebx
shll %cl, %ebx
andl (%rdx,%rax,4), %esi
orl %esi, %ebx
movl %ebx, (%rdx,%rax,4)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: digitalRead
int digitalRead (int pin)
{
  char c ;
  struct wiringPiNodeStruct *node = wiringPiNodes ;
  if ((pin & PI_GPIO_MASK) == 0)		// On-Board Pin
  {
    /**/ if (wiringPiMode == WPI_MODE_GPIO_SYS)	// Sys mode
    {
      if (sysFds [pin] == -1)
	return LOW ;

      lseek  (sysFds [pin], 0L, SEEK_SET) ;
      read   (sysFds [pin], &c, 1) ;
      return (c == '0') ? LOW : HIGH ;
    }
    else if (wiringPiMode == WPI_MODE_PINS)
      pin = pinToGpio [pin] ;
    else if (wiringPiMode == WPI_MODE_PHYS)
      pin = physToGpio [pin] ;
    else if (wiringPiMode != WPI_MODE_GPIO)
      return LOW ;

    if ((*(gpio + gpioToGPLEV [pin]) & (1 << (pin & 31))) != 0)
      return HIGH ;
    else
      return LOW ;
  }
  else
  {
    if ((node = wiringPiFindNode (pin)) == NULL)
      return LOW ;
    return node->digitalRead (node, pin) ;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %esi
cmpl $0x3f, %edi
ja 0x24533
movl 0x23266(%rip), %ecx     # 0x47774
xorl %eax, %eax
cmpq $0x3, %rcx
ja 0x245d1
leaq 0x10ccb(%rip), %rdx     # 0x351ec
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x23f47(%rip), %rax     # 0x48478
jmp 0x245a9
movq 0x22a7e(%rip), %rax     # 0x46fb8
movq (%rax), %rdi
xorl %eax, %eax
testq %rdi, %rdi
je 0x24553
cmpl %esi, (%rdi)
jg 0x2454d
cmpl %esi, 0x4(%rdi)
jge 0x24555
movq 0x58(%rdi), %rdi
jmp 0x2453f
xorl %edi, %edi
testq %rdi, %rdi
je 0x245d1
movq 0x30(%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
movl %esi, %ebx
leaq 0x23210(%rip), %r14     # 0x47780
movl (%r14,%rbx,4), %edi
cmpl $-0x1, %edi
je 0x245d1
xorl %esi, %esi
xorl %edx, %edx
callq 0x1fac0
movl (%r14,%rbx,4), %edi
leaq 0x7(%rsp), %rbx
movl $0x1, %edx
movq %rbx, %rsi
callq 0x1f890
xorl %eax, %eax
cmpb $0x30, (%rbx)
setne %al
jmp 0x245d1
leaq 0x23ed7(%rip), %rax     # 0x48480
movq (%rax), %rax
movl %esi, %ecx
movl (%rax,%rcx,4), %esi
movq 0x23ed8(%rip), %rax     # 0x48490
movslq %esi, %rcx
leaq 0x10dae(%rip), %rdx     # 0x35370
movzbl (%rcx,%rdx), %edx
movl (%rax,%rdx,4), %edx
xorl %eax, %eax
btl %ecx, %edx
setb %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: digitalWrite
void digitalWrite (int pin, int value)
{
  struct wiringPiNodeStruct *node = wiringPiNodes ;

  if ((pin & PI_GPIO_MASK) == 0)		// On-Board Pin
  {
    /**/ if (wiringPiMode == WPI_MODE_GPIO_SYS)	// Sys mode
    {
      if (sysFds [pin] != -1)
      {
	if (value == LOW)
	  write (sysFds [pin], "0\n", 2) ;
	else
	  write (sysFds [pin], "1\n", 2) ;
      }
      return ;
    }
    else if (wiringPiMode == WPI_MODE_PINS)
      pin = pinToGpio [pin] ;
    else if (wiringPiMode == WPI_MODE_PHYS)
      pin = physToGpio [pin] ;
    else if (wiringPiMode != WPI_MODE_GPIO)
      return ;

    if (value == LOW)
      *(gpio + gpioToGPCLR [pin]) = 1 << (pin & 31) ;
    else
      *(gpio + gpioToGPSET [pin]) = 1 << (pin & 31) ;
  }
  else
  {
    if ((node = wiringPiFindNode (pin)) != NULL)
      node->digitalWrite (node, pin, value) ;
  }
}

// Assembly:
movl %esi, %edx
movl %edi, %esi
cmpl $0x3f, %edi
ja 0x24607
movl 0x2318c(%rip), %eax     # 0x47774
cmpq $0x3, %rax
ja 0x24650
leaq 0x10c07(%rip), %rcx     # 0x351fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x23e73(%rip), %rax     # 0x48478
jmp 0x24658
movq 0x229aa(%rip), %rax     # 0x46fb8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x24625
cmpl %esi, (%rdi)
jg 0x2461f
cmpl %esi, 0x4(%rdi)
jge 0x24627
movq 0x58(%rdi), %rdi
jmp 0x24611
xorl %edi, %edi
testq %rdi, %rdi
je 0x24650
movq 0x38(%rdi), %rax
jmpq *%rax
movl %esi, %eax
leaq 0x23145(%rip), %rcx     # 0x47780
movl (%rcx,%rax,4), %edi
cmpl $-0x1, %edi
je 0x24650
testl %edx, %edx
je 0x2468f
leaq 0x1147a(%rip), %rsi     # 0x35ac8
jmp 0x24696
retq
leaq 0x23e28(%rip), %rax     # 0x48480
movq (%rax), %rax
movl %esi, %ecx
movl (%rax,%rcx,4), %esi
movl $0x1, %eax
movl %esi, %ecx
shll %cl, %eax
movq 0x23e20(%rip), %rcx     # 0x48490
movslq %esi, %rsi
testl %edx, %edx
je 0x24680
leaq 0x10d72(%rip), %rdx     # 0x353f0
jmp 0x24687
leaq 0x10d29(%rip), %rdx     # 0x353b0
movzbl (%rsi,%rdx), %edx
movl %eax, (%rcx,%rdx,4)
retq
leaq 0x1142f(%rip), %rsi     # 0x35ac5
movl $0x2, %edx
jmp 0x1f1a0