LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/DS1307/DS1307.cpp
// Function: DS1307::setHours12(unsigned char, unsigned char)
void DS1307::setHours12(uint8_t hours, uint8_t ampm) {
    if (hours > 12 || hours < 1) return;
    if (mode12) {
        // bit 6 is high, 12-hour mode
        // Byte: [5 = AM/PM] [4 = 10HR] [3:0 = 1HR]
        if (ampm > 0) ampm = 0x20;
        uint8_t value = 0x40 + ampm + ((hours / 10) << 4) + (hours % 10);
        I2Cdev::writeByte(devAddr, DS1307_RA_HOURS, value);
    } else {
        // bit 6 is low, 24-hour mode (default)
        // Byte: [5:4 = 10HR] [3:0 = 1HR]
        if (ampm > 0) hours += 12;
        if (hours == 0) hours = 12; // 12 AM
        else if (hours == 24) hours = 12; // 12 PM, after +12 adjustment
        uint8_t value = ((hours / 10) << 4) + (hours % 10);
        I2Cdev::writeByte(devAddr, DS1307_RA_HOURS, value);
    }
}

// Assembly:
leal -0xd(%rsi), %eax
cmpb $-0xc, %al
jae 0x266ea
retq
cmpb $0x1, 0x2(%rdi)
jne 0x26719
testb %dl, %dl
setne %cl
shlb $0x5, %cl
movzbl %sil, %edx
subb $0xa, %sil
setae %r8b
movzbl %sil, %eax
cmovbl %edx, %eax
shlb $0x4, %r8b
orb %cl, %r8b
orb %r8b, %al
orb $0x40, %al
jmp 0x26746
leal 0xc(%rsi), %eax
testb %dl, %dl
movzbl %sil, %ecx
movzbl %al, %eax
cmovel %ecx, %eax
cmpb $0x18, %al
movl $0xc, %ecx
cmovnel %eax, %ecx
movzbl %cl, %eax
imull $0xcd, %eax, %ecx
shrl $0xa, %ecx
andl $-0x2, %ecx
leal (%rcx,%rcx,2), %ecx
addb %cl, %al
movzbl (%rdi), %edi
movzbl %al, %edx
movl $0x2, %esi
jmp 0x1f5d0
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/DS1307/DS1307.cpp
// Function: DS1307::getHours24()
uint8_t DS1307::getHours24() {
    I2Cdev::readByte(devAddr, DS1307_RA_HOURS, buffer);
    mode12 = buffer[0] & 0x40;
    if (mode12) {
        // bit 6 is high, 12-hour mode
        // Byte: [5 = AM/PM] [4 = 10HR] [3:0 = 1HR]
        uint8_t hours = (buffer[0] & 0x0F) + ((buffer[0] & 0x10) >> 4) * 10;

        // convert 12-hour to 24-hour format, since that's what's requested
        if (buffer[0] & 0x20) {
            // currently PM
            if (hours < 12) hours += 12;
        } else {
            // currently AM
            if (hours == 12) hours = 0;
        }
        return hours;
    } else {
        // bit 6 is low, 24-hour mode (default)
        // Byte: [5:4 = 10HR] [3:0 = 1HR]
        return (buffer[0] & 0x0F) + ((buffer[0] & 0x30) >> 4) * 10;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x1(%rbx), %rdx
movq 0x207e0(%rip), %rax     # 0x46f48
movzwl (%rax), %ecx
movl $0x2, %esi
callq 0x1f6d0
movzbl 0x1(%rbx), %eax
movl %eax, %ecx
andb $0x40, %cl
movl %ecx, %edx
shrb $0x6, %dl
movb %dl, 0x2(%rbx)
testb %cl, %cl
jne 0x267a0
movl %eax, %ecx
andb $0xf, %cl
shrb $0x4, %al
andb $0x3, %al
movzbl %al, %eax
addl %eax, %eax
leal (%rax,%rax,4), %eax
addb %cl, %al
jmp 0x267d4
movl %eax, %edx
andb $0xf, %dl
movl %eax, %esi
andl $0x10, %esi
movl $0xa, %ecx
cmovel %esi, %ecx
addb %dl, %cl
testb $0x20, %al
jne 0x267c5
xorl %edx, %edx
cmpb $0xc, %cl
movzbl %cl, %eax
cmovel %edx, %eax
jmp 0x267d4
leal 0xc(%rcx), %eax
cmpb $0xc, %cl
movzbl %cl, %ecx
movzbl %al, %eax
cmovael %ecx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/DS1307/DS1307.cpp
// Function: DS1307::setHours24(unsigned char)
void DS1307::setHours24(uint8_t hours) {
    if (hours > 23) return;
    if (mode12) {
        // bit 6 is high, 12-hour mode
        // Byte: [5 = AM/PM] [4 = 10HR] [3:0 = 1HR]
        uint8_t ampm = 0;
        if (hours > 11) ampm = 0x20;
        if (hours > 12) hours -= 12;
        else if (hours == 0) hours = 12;
        uint8_t value = 0x40 + ampm + ((hours / 10) << 4) + (hours % 10);
        I2Cdev::writeByte(devAddr, DS1307_RA_HOURS, value);
    } else {
        // bit 6 is low, 24-hour mode (default)
        // Byte: [5:4 = 10HR] [3:0 = 1HR]
        uint8_t value = ((hours / 10) << 4) + (hours % 10);
        I2Cdev::writeByte(devAddr, DS1307_RA_HOURS, value);
    }
}

// Assembly:
cmpb $0x17, %sil
jbe 0x267dd
retq
cmpb $0x1, 0x2(%rdi)
jne 0x2682f
cmpb $0xc, %sil
setae %cl
leal -0xc(%rsi), %eax
testb %sil, %sil
movzbl %sil, %edx
movl $0xc, %r8d
cmovnel %edx, %r8d
cmpb $0xd, %sil
movzbl %al, %eax
cmovbl %r8d, %eax
shlb $0x5, %cl
movzbl %al, %eax
imull $0xcd, %eax, %edx
shrl $0xb, %edx
movl %edx, %esi
shlb $0x4, %sil
addb %cl, %sil
addl %edx, %edx
leal (%rdx,%rdx,4), %ecx
subb %cl, %al
addb %sil, %al
addb $0x40, %al
jmp 0x26845
movzbl %sil, %eax
imull $0xcd, %eax, %eax
shrl $0xa, %eax
andl $-0x2, %eax
leal (%rax,%rax,2), %eax
addb %sil, %al
movzbl (%rdi), %edi
movzbl %al, %edx
movl $0x2, %esi
jmp 0x1f5d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/DS1307/DS1307.cpp
// Function: DS1307::setYear(unsigned short)
void DS1307::setYear(uint16_t year) {
    if (year < 2000) return;
    year -= 2000;
    uint8_t value = ((year / 10) << 4) + (year % 10);
    I2Cdev::writeByte(devAddr, DS1307_RA_YEAR, value);
}

// Assembly:
cmpl $0x7d0, %esi            # imm = 0x7D0
jae 0x269a5
retq
leal -0x7d0(%rsi), %eax
movzwl %ax, %eax
imull $0xcccd, %eax, %eax     # imm = 0xCCCD
shrl $0x12, %eax
andl $-0x2, %eax
leal (%rax,%rax,2), %eax
addl %esi, %eax
addl $0xfffff830, %eax       # imm = 0xFFFFF830
movzbl (%rdi), %edi
movzbl %al, %edx
movl $0x6, %esi
jmp 0x1f5d0
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/DS1307/DS1307.cpp
// Function: DS1307::setDateTime(DateTime)
void DS1307::setDateTime(DateTime dt) {
        setSeconds(dt.second());
        setMinutes(dt.minute());
        setHours24(dt.hour());
        setDay(dt.day());
        setMonth(dt.month());
        setYear(dt.year());
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl %r14d, %r15d
shrl $0x8, %r15d
movl %r14d, %ebp
shrl $0x10, %ebp
movl %r14d, %r12d
shrl $0x18, %r12d
movq %rsi, %r13
shrq $0x20, %r13
movq %rsi, %rax
shrq $0x28, %rax
movzbl %al, %esi
callq 0x1f1f0
cmpb $0x3b, %r13b
ja 0x2711d
movzbl %r13b, %eax
imull $0xcd, %eax, %eax
shrl $0xa, %eax
andl $-0x2, %eax
leal (%rax,%rax,2), %eax
addb %r13b, %al
movzbl (%rbx), %edi
movzbl %al, %edx
movl $0x1, %esi
callq 0x1f5d0
movzbl %r12b, %esi
movq %rbx, %rdi
callq 0x1fb10
movzbl %bpl, %eax
imull $0xcd, %eax, %ecx
shrl $0xa, %ecx
andl $-0x2, %ecx
leal (%rcx,%rcx,2), %ecx
addb %cl, %al
movzbl (%rbx), %edi
movzbl %al, %edx
movl $0x4, %esi
callq 0x1f5d0
leal -0xd(%r15), %eax
cmpb $-0xc, %al
jb 0x27177
xorl %eax, %eax
cmpb $0xa, %r15b
movl $0x6, %ecx
cmovbl %eax, %ecx
addb %r15b, %cl
movzbl (%rbx), %edi
movzbl %cl, %edx
movl $0x5, %esi
callq 0x1f5d0
movzbl %r14b, %eax
imull $0xcd, %eax, %eax
shrl $0xa, %eax
andl $-0x2, %eax
leal (%rax,%rax,2), %eax
addb %r14b, %al
movzbl (%rbx), %edi
movzbl %al, %edx
movl $0x6, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1f5d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/DS1307/DS1307.cpp
// Function: DateTime::DateTime(unsigned int)
DateTime::DateTime (uint32_t t) {
      t -= SECONDS_FROM_1970_TO_2000;    // bring to 2000 timestamp from 1970
    
        ss = t % 60;
        t /= 60;
        mm = t % 60;
        t /= 60;
        hh = t % 24;
        uint16_t days = t / 24;
        uint8_t leap;
        for (yOff = 0; ; ++yOff) {
            leap = yOff % 4 == 0;
            if (days < 365 + leap)
                break;
            days -= 365 + leap;
        }
        for (m = 1; ; ++m) {
            uint8_t daysPerMonth = pgm_read_byte(daysInMonth + m - 1);
            if (leap && m == 2)
                ++daysPerMonth;
            if (days < daysPerMonth)
                break;
            days -= daysPerMonth;
        }
        d = days + 1;
    }

// Assembly:
addl $0xc792bc80, %esi       # imm = 0xC792BC80
movl $0x88888889, %eax       # imm = 0x88888889
imulq %rsi, %rax
shrq $0x25, %rax
imull $0x3c, %eax, %ecx
movl %esi, %edx
subl %ecx, %edx
movb %dl, 0x5(%rdi)
imulq $0x8888889, %rax, %rcx  # imm = 0x8888889
shrq $0x21, %rcx
imull $0x3c, %ecx, %ecx
subl %ecx, %eax
movb %al, 0x4(%rdi)
movl $0x91a2b3c5, %eax       # imm = 0x91A2B3C5
imulq %rsi, %rax
shrq $0x2b, %rax
imulq $0xaaaaaab, %rax, %rcx  # imm = 0xAAAAAAB
shrq $0x20, %rcx
shll $0x3, %ecx
leal (%rcx,%rcx,2), %ecx
subl %ecx, %eax
movb %al, 0x3(%rdi)
movl $0xc22e4507, %eax       # imm = 0xC22E4507
imulq %rsi, %rax
shrq $0x30, %rax
movb $0x1, %cl
cmpl $0x1e28500, %esi        # imm = 0x1E28500
jae 0x2721c
xorl %esi, %esi
movb $0x1, %dl
jmp 0x2724c
movl $0x16e, %r8d            # imm = 0x16E
xorl %esi, %esi
movl %eax, %r9d
movl %r9d, %eax
subl %r8d, %eax
incb %sil
xorl %edx, %edx
testb $0x3, %sil
sete %dl
movzwl %ax, %r9d
movl %edx, %r8d
addl $0x16d, %r8d            # imm = 0x16D
cmpl %r8d, %r9d
jae 0x27227
movb %sil, (%rdi)
cmpw $0x1f, %ax
jb 0x2728c
movb $0x1, %r8b
movw $0x1f, %r9w
leaq 0xeda8(%rip), %rsi      # 0x3600c
subl %r9d, %eax
leal 0x1(%r8), %ecx
movzbl %cl, %r9d
cmpb $0x1, %r8b
sete %r8b
andb %dl, %r8b
addb -0x1(%r9,%rsi), %r8b
movzbl %r8b, %r9d
movl %ecx, %r8d
cmpw %r9w, %ax
jae 0x27264
movb %cl, 0x1(%rdi)
incb %al
movb %al, 0x2(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/DS1307/DS1307.cpp
// Function: DateTime::DateTime(char const*, char const*)
DateTime::DateTime (const char* date, const char* time) {
        // sample input: date = "Dec 26 2009", time = "12:34:56"
        yOff = conv2d(date + 9);
        // Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 
        switch (date[0]) {
            case 'J': m = (date[1] == 'a' ? 1 : (date[2] == 'n' ? 6 : 7)); break;
            case 'F': m = 2; break;
            case 'A': m = date[2] == 'r' ? 4 : 8; break;
            case 'M': m = date[2] == 'r' ? 3 : 5; break;
            case 'S': m = 9; break;
            case 'O': m = 10; break;
            case 'N': m = 11; break;
            case 'D': m = 12; break;
        }
        d = conv2d(date + 4);
        hh = conv2d(time);
        mm = conv2d(time + 3);
        ss = conv2d(time + 6);
    }

// Assembly:
movzbl 0x9(%rsi), %eax
leal -0x30(%rax), %ecx
addl %eax, %eax
leal (%rax,%rax,4), %r8d
addb $0x20, %r8b
xorl %eax, %eax
cmpb $0xa, %cl
movzbl %r8b, %ecx
cmovael %eax, %ecx
addb 0xa(%rsi), %cl
addb $-0x30, %cl
movb %cl, (%rdi)
movzbl (%rsi), %ecx
addl $-0x41, %ecx
cmpl $0x12, %ecx
ja 0x27348
leaq 0xecc7(%rip), %r8       # 0x35fc0
movslq (%r8,%rcx,4), %rcx
addq %r8, %rcx
jmpq *%rcx
cmpb $0x72, 0x2(%rsi)
setne %cl
shlb $0x2, %cl
addb $0x4, %cl
jmp 0x27345
movb $0xb, %cl
jmp 0x27345
movb $0xc, %cl
jmp 0x27345
movb $0xa, %cl
jmp 0x27345
movb $0x9, %cl
jmp 0x27345
movb $0x2, %cl
jmp 0x27345
movb $0x1, %cl
cmpb $0x61, 0x1(%rsi)
je 0x27345
cmpb $0x6e, 0x2(%rsi)
sete %cl
xorb $0x7, %cl
jmp 0x27345
cmpb $0x72, 0x2(%rsi)
setne %cl
addb %cl, %cl
addb $0x3, %cl
movb %cl, 0x1(%rdi)
movzbl 0x4(%rsi), %ecx
leal -0x30(%rcx), %r8d
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
addb $0x20, %cl
cmpb $0xa, %r8b
movzbl %cl, %ecx
cmovael %eax, %ecx
addb 0x5(%rsi), %cl
addb $-0x30, %cl
movb %cl, 0x2(%rdi)
movzbl (%rdx), %ecx
leal -0x30(%rcx), %esi
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
addb $0x20, %cl
cmpb $0xa, %sil
movzbl %cl, %ecx
cmovael %eax, %ecx
addb 0x1(%rdx), %cl
addb $-0x30, %cl
movb %cl, 0x3(%rdi)
movzbl 0x3(%rdx), %ecx
leal -0x30(%rcx), %esi
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
addb $0x20, %cl
cmpb $0xa, %sil
movzbl %cl, %ecx
cmovael %eax, %ecx
addb 0x4(%rdx), %cl
addb $-0x30, %cl
movb %cl, 0x4(%rdi)
movzbl 0x6(%rdx), %ecx
leal -0x30(%rcx), %esi
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
addb $0x20, %cl
cmpb $0xa, %sil
movzbl %cl, %ecx
cmovael %eax, %ecx
addb 0x7(%rdx), %cl
addb $-0x30, %cl
movb %cl, 0x5(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/DS1307/DS1307.cpp
// Function: DateTime::secondstime() const
long DateTime::secondstime(void) const {
        uint32_t t;
        uint16_t days = date2days(yOff, m, d);
        t = time2long(days, hh, mm, ss);    
        return t;
    }

// Assembly:
movzbl (%rdi), %ecx
movzbl 0x1(%rdi), %edx
movzbl 0x2(%rdi), %eax
cmpq $0x2, %rdx
jb 0x27445
leaq -0x1(%rdx), %rsi
xorl %r8d, %r8d
leaq 0xebd7(%rip), %r9       # 0x3600c
movzbl (%r8,%r9), %r10d
addl %r10d, %eax
incq %r8
cmpq %r8, %rsi
jne 0x27435
cmpb $0x3, %dl
setae %dl
movzwl %cx, %ecx
testb $0x3, %cl
sete %sil
andb %dl, %sil
movzbl %sil, %edx
imull $0x16d, %ecx, %esi      # imm = 0x16D
addl $0x3, %ecx
shrl $0x2, %ecx
addl %esi, %ecx
addl %edx, %ecx
addl %ecx, %eax
decl %eax
movzbl 0x3(%rdi), %ecx
movzbl 0x4(%rdi), %edx
movzbl 0x5(%rdi), %esi
movzwl %ax, %eax
leal (%rax,%rax,2), %eax
leal (%rcx,%rax,8), %eax
imull $0x3c, %eax, %eax
addl %edx, %eax
imull $0x3c, %eax, %eax
addl %esi, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/HMC5843/HMC5843.cpp
// Function: HMC5843::getHeading(short*, short*, short*)
void HMC5843::getHeading(int16_t *x, int16_t *y, int16_t *z) {
    I2Cdev::readBytes(devAddr, HMC5843_RA_DATAX_H, 6, buffer);
    if (mode == HMC5843_MODE_SINGLE) I2Cdev::writeByte(devAddr, HMC5843_RA_MODE, HMC5843_MODE_SINGLE << (HMC5843_MODEREG_BIT - HMC5843_MODEREG_LENGTH + 1));
    *x = (((int16_t)buffer[0]) << 8) | buffer[1];
    *y = (((int16_t)buffer[2]) << 8) | buffer[3];
    *z = (((int16_t)buffer[4]) << 8) | buffer[5];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movzbl (%rdi), %edi
leaq 0x1(%r15), %rcx
movq 0x1f8da(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x6, %edx
callq 0x1f630
cmpb $0x1, 0x7(%r15)
jne 0x2769b
movzbl (%r15), %edi
movl $0x2, %esi
movl $0x1, %edx
callq 0x1f5d0
movzwl 0x1(%r15), %eax
rolw $0x8, %ax
movw %ax, (%r12)
movzwl 0x3(%r15), %eax
rolw $0x8, %ax
movw %ax, (%r14)
movzwl 0x5(%r15), %eax
rolw $0x8, %ax
movw %ax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/HMC5843/HMC5843.cpp
// Function: HMC5843::getHeadingX()
int16_t HMC5843::getHeadingX() {
    // each axis read requires that ALL axis registers be read, even if only
    // one is used; this was not done ineffiently in the code by accident
    I2Cdev::readBytes(devAddr, HMC5843_RA_DATAX_H, 6, buffer);
    if (mode == HMC5843_MODE_SINGLE) I2Cdev::writeByte(devAddr, HMC5843_RA_MODE, HMC5843_MODE_SINGLE << (HMC5843_MODEREG_BIT - HMC5843_MODEREG_LENGTH + 1));
    return (((int16_t)buffer[0]) << 8) | buffer[1];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x1(%rbx), %rcx
movq 0x1f868(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x6, %edx
callq 0x1f630
cmpb $0x1, 0x7(%rbx)
jne 0x2770b
movzbl (%rbx), %edi
movl $0x2, %esi
movl $0x1, %edx
callq 0x1f5d0
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/HMC5843/HMC5843.cpp
// Function: HMC5843::getHeadingY()
int16_t HMC5843::getHeadingY() {
    // each axis read requires that ALL axis registers be read, even if only
    // one is used; this was not done ineffiently in the code by accident
    I2Cdev::readBytes(devAddr, HMC5843_RA_DATAX_H, 6, buffer);
    if (mode == HMC5843_MODE_SINGLE) I2Cdev::writeByte(devAddr, HMC5843_RA_MODE, HMC5843_MODE_SINGLE << (HMC5843_MODEREG_BIT - HMC5843_MODEREG_LENGTH + 1));
    return (((int16_t)buffer[2]) << 8) | buffer[3];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x1(%rbx), %rcx
movq 0x1f820(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x6, %edx
callq 0x1f630
cmpb $0x1, 0x7(%rbx)
jne 0x27753
movzbl (%rbx), %edi
movl $0x2, %esi
movl $0x1, %edx
callq 0x1f5d0
movzwl 0x3(%rbx), %eax
rolw $0x8, %ax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/HMC5843/HMC5843.cpp
// Function: HMC5843::getHeadingZ()
int16_t HMC5843::getHeadingZ() {
    // each axis read requires that ALL axis registers be read, even if only
    // one is used; this was not done ineffiently in the code by accident
    I2Cdev::readBytes(devAddr, HMC5843_RA_DATAX_H, 6, buffer);
    if (mode == HMC5843_MODE_SINGLE) I2Cdev::writeByte(devAddr, HMC5843_RA_MODE, HMC5843_MODE_SINGLE << (HMC5843_MODEREG_BIT - HMC5843_MODEREG_LENGTH + 1));
    return (((int16_t)buffer[4]) << 8) | buffer[5];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x1(%rbx), %rcx
movq 0x1f7d8(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x6, %edx
callq 0x1f630
cmpb $0x1, 0x7(%rbx)
jne 0x2779b
movzbl (%rbx), %edi
movl $0x2, %esi
movl $0x1, %edx
callq 0x1f5d0
movzwl 0x5(%rbx), %eax
rolw $0x8, %ax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/HMC5883L/HMC5883L.cpp
// Function: HMC5883L::getHeading(short*, short*, short*)
void HMC5883L::getHeading(int16_t *x, int16_t *y, int16_t *z) {
    I2Cdev::readBytes(devAddr, HMC5883L_RA_DATAX_H, 6, buffer);
    if (mode == HMC5883L_MODE_SINGLE) I2Cdev::writeByte(devAddr, HMC5883L_RA_MODE, HMC5883L_MODE_SINGLE << (HMC5883L_MODEREG_BIT - HMC5883L_MODEREG_LENGTH + 1));
    *x = (((int16_t)buffer[0]) << 8) | buffer[1];
    *y = (((int16_t)buffer[4]) << 8) | buffer[5];
    *z = (((int16_t)buffer[2]) << 8) | buffer[3];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movzbl (%rdi), %edi
leaq 0x1(%r15), %rcx
movq 0x1f49a(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x6, %edx
callq 0x1f630
cmpb $0x1, 0x7(%r15)
jne 0x27adb
movzbl (%r15), %edi
movl $0x2, %esi
movl $0x1, %edx
callq 0x1f5d0
movzwl 0x1(%r15), %eax
rolw $0x8, %ax
movw %ax, (%r12)
movzwl 0x5(%r15), %eax
rolw $0x8, %ax
movw %ax, (%r14)
movzwl 0x3(%r15), %eax
rolw $0x8, %ax
movw %ax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/HMC5883L/HMC5883L.cpp
// Function: HMC5883L::getHeadingX()
int16_t HMC5883L::getHeadingX() {
    // each axis read requires that ALL axis registers be read, even if only
    // one is used; this was not done ineffiently in the code by accident
    I2Cdev::readBytes(devAddr, HMC5883L_RA_DATAX_H, 6, buffer);
    if (mode == HMC5883L_MODE_SINGLE) I2Cdev::writeByte(devAddr, HMC5883L_RA_MODE, HMC5883L_MODE_SINGLE << (HMC5883L_MODEREG_BIT - HMC5883L_MODEREG_LENGTH + 1));
    return (((int16_t)buffer[0]) << 8) | buffer[1];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x1(%rbx), %rcx
movq 0x1f428(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x6, %edx
callq 0x1f630
cmpb $0x1, 0x7(%rbx)
jne 0x27b4b
movzbl (%rbx), %edi
movl $0x2, %esi
movl $0x1, %edx
callq 0x1f5d0
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/HMC5883L/HMC5883L.cpp
// Function: HMC5883L::getHeadingY()
int16_t HMC5883L::getHeadingY() {
    // each axis read requires that ALL axis registers be read, even if only
    // one is used; this was not done ineffiently in the code by accident
    I2Cdev::readBytes(devAddr, HMC5883L_RA_DATAX_H, 6, buffer);
    if (mode == HMC5883L_MODE_SINGLE) I2Cdev::writeByte(devAddr, HMC5883L_RA_MODE, HMC5883L_MODE_SINGLE << (HMC5883L_MODEREG_BIT - HMC5883L_MODEREG_LENGTH + 1));
    return (((int16_t)buffer[4]) << 8) | buffer[5];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x1(%rbx), %rcx
movq 0x1f3e0(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x6, %edx
callq 0x1f630
cmpb $0x1, 0x7(%rbx)
jne 0x27b93
movzbl (%rbx), %edi
movl $0x2, %esi
movl $0x1, %edx
callq 0x1f5d0
movzwl 0x5(%rbx), %eax
rolw $0x8, %ax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/HMC5883L/HMC5883L.cpp
// Function: HMC5883L::getHeadingZ()
int16_t HMC5883L::getHeadingZ() {
    // each axis read requires that ALL axis registers be read, even if only
    // one is used; this was not done ineffiently in the code by accident
    I2Cdev::readBytes(devAddr, HMC5883L_RA_DATAX_H, 6, buffer);
    if (mode == HMC5883L_MODE_SINGLE) I2Cdev::writeByte(devAddr, HMC5883L_RA_MODE, HMC5883L_MODE_SINGLE << (HMC5883L_MODEREG_BIT - HMC5883L_MODEREG_LENGTH + 1));
    return (((int16_t)buffer[2]) << 8) | buffer[3];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x1(%rbx), %rcx
movq 0x1f398(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x6, %edx
callq 0x1f630
cmpb $0x1, 0x7(%rbx)
jne 0x27bdb
movzbl (%rbx), %edi
movl $0x2, %esi
movl $0x1, %edx
callq 0x1f5d0
movzwl 0x3(%rbx), %eax
rolw $0x8, %ax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/HTU21D/HTU21D.cpp
// Function: HTU21D::getTemperature()
float HTU21D::getTemperature() {
    // Ignore the CRC byte
    uint16_t t = 0;
    if (1!=I2Cdev::readWord(devAddr, HTU21D_RA_TEMPERATURE, &t)){
        return NAN;
    }
    // clear the status bits (bit0 & bit1) and calculate the temperature 
    // as per the formula in the datasheet
    return ((float)(t&0xFFFC))*175.72/65536.0-46.85;
}

// Assembly:
pushq %rax
leaq 0x6(%rsp), %rdx
movw $0x0, (%rdx)
movzbl (%rdi), %edi
movq 0x1f205(%rip), %rax     # 0x46f48
movzwl (%rax), %ecx
movl $0xe3, %esi
callq 0x1f6a0
cmpb $0x1, %al
jne 0x27d7e
movzwl 0x6(%rsp), %eax
andl $-0x4, %eax
cvtsi2sd %eax, %xmm0
mulsd 0xe2b0(%rip), %xmm0     # 0x36018
mulsd 0xe2b0(%rip), %xmm0     # 0x36020
addsd 0xe2b0(%rip), %xmm0     # 0x36028
cvtsd2ss %xmm0, %xmm0
jmp 0x27d86
movss 0xe20e(%rip), %xmm0     # 0x35f94
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/HTU21D/HTU21D.cpp
// Function: HTU21D::getHumidity()
float HTU21D::getHumidity() {
    // Ignore the CRC byte
    uint16_t t = 0;
    if (1!=I2Cdev::readWord(devAddr, HTU21D_RA_HUMIDITY, &t)){
        return NAN;
    }
    // clear the status bits (bit0 & bit1) and calculate the humidity 
    // as per the formula in the datasheet
    return ((float)(t&0xFFFC))*125.0/65536.0-6.0;
}

// Assembly:
pushq %rax
leaq 0x6(%rsp), %rdx
movw $0x0, (%rdx)
movzbl (%rdi), %edi
movq 0x1f1ab(%rip), %rax     # 0x46f48
movzwl (%rax), %ecx
movl $0xe5, %esi
callq 0x1f6a0
cmpb $0x1, %al
jne 0x27dd8
movzwl 0x6(%rsp), %eax
andl $-0x4, %eax
cvtsi2sd %eax, %xmm0
mulsd 0xe26e(%rip), %xmm0     # 0x36030
mulsd 0xe256(%rip), %xmm0     # 0x36020
addsd 0xe266(%rip), %xmm0     # 0x36038
cvtsd2ss %xmm0, %xmm0
jmp 0x27de0
movss 0xe1b4(%rip), %xmm0     # 0x35f94
popq %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/I2Cdev/I2Cdev.cpp
// Function: I2Cdev::readBits(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char*, unsigned short)
int8_t I2Cdev::readBits(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint8_t *data, uint16_t timeout) {
    // 01101001 read byte
    // 76543210 bit numbers
    //    xxx   args: bitStart=4, length=3
    //    010   masked
    //   -> 010 shifted
    uint8_t count, b;
    if ((count = readByte(devAddr, regAddr, &b, timeout)) != 0) {
        uint8_t mask = ((1 << length) - 1) << (bitStart - length + 1);
        b &= mask;
        b >>= (bitStart - length + 1);
        *data = b;
    }
    return count;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movl %ecx, %r14d
movl %edx, %ebp
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
movl %r9d, %r8d
callq 0x1f630
testb %al, %al
je 0x27ec9
movzbl %r14b, %ecx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
shll %cl, %esi
notl %esi
movzbl %bpl, %edx
subl %ecx, %edx
incb %dl
movl %edx, %ecx
shll %cl, %esi
andb 0xf(%rsp), %sil
movzbl %sil, %esi
shrl %cl, %esi
movb %sil, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/I2Cdev/I2Cdev.cpp
// Function: I2Cdev::readBitsW(unsigned char, unsigned char, unsigned char, unsigned char, unsigned short*, unsigned short)
int8_t I2Cdev::readBitsW(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint16_t *data, uint16_t timeout) {
    // 1101011001101001 read byte
    // fedcba9876543210 bit numbers
    //    xxx           args: bitStart=12, length=3
    //    010           masked
    //           -> 010 shifted
    uint8_t count;
    uint16_t w;
    if ((count = readWord(devAddr, regAddr, &w, timeout)) != 0) {
        uint16_t mask = ((1 << length) - 1) << (bitStart - length + 1);
        w &= mask;
        w >>= (bitStart - length + 1);
        *data = w;
    }
    return count;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movl %ecx, %r14d
movl %edx, %ebp
leaq 0xe(%rsp), %rcx
movl $0x1, %edx
movl %r9d, %r8d
callq 0x1f230
testb %al, %al
je 0x27f1e
movzbl %r14b, %ecx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
shll %cl, %esi
notl %esi
movzbl %bpl, %edx
subl %ecx, %edx
incb %dl
movl %edx, %ecx
shll %cl, %esi
andw 0xe(%rsp), %si
movzwl %si, %esi
shrl %cl, %esi
movw %si, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/I2Cdev/I2Cdev.cpp
// Function: I2Cdev::writeBitW(unsigned char, unsigned char, unsigned char, unsigned short)
bool I2Cdev::writeBitW(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t data) {
    uint16_t w;
    readWord(devAddr, regAddr, &w);
    w = (data != 0) ? (w | (1 << bitNum)) : (w & ~(1 << bitNum));
    return writeWord(devAddr, regAddr, w);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %r15d
movq 0x1ecb5(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
leaq 0xc(%rsp), %r12
movl $0x1, %edx
movq %r12, %rcx
callq 0x1f230
movzwl (%r12), %eax
movl %eax, %ecx
btsl %ebp, %ecx
btrl %ebp, %eax
testl %ebx, %ebx
cmovnel %ecx, %eax
leaq 0xe(%rsp), %rcx
movw %ax, (%rcx)
movl %r15d, %edi
movl %r14d, %esi
movl $0x1, %edx
callq 0x1f7d0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/I2Cdev/I2Cdev.cpp
// Function: I2Cdev::writeBits(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)
bool I2Cdev::writeBits(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint8_t data) {
    //      010 value to write
    // 76543210 bit numbers
    //    xxx   args: bitStart=4, length=3
    // 00011100 mask byte
    // 10101111 original value (sample)
    // 10100011 original & ~mask
    // 10101011 masked | value
    uint8_t b;
    if (readByte(devAddr, regAddr, &b) != 0) {
        uint8_t mask = ((1 << length) - 1) << (bitStart - length + 1);
        data <<= (bitStart - length + 1); // shift data into correct position
        data &= mask; // zero all non-important bits in data
        b &= ~(mask); // zero all important bits in existing byte
        b |= data; // combine data with existing byte
        return writeByte(devAddr, regAddr, b);
    } else {
        return false;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %r14d
movl %ecx, %r12d
movl %edx, %r15d
movl %esi, %ebx
movl %edi, %ebp
movq 0x1ec32(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
leaq 0xe(%rsp), %rcx
movl $0x1, %edx
callq 0x1f630
testb %al, %al
je 0x28372
movzbl %r12b, %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
shll %cl, %edx
notl %edx
movzbl %r15b, %eax
subl %ecx, %eax
incb %al
movzbl %r14b, %esi
andl %edx, %esi
movl %eax, %ecx
shll %cl, %edx
shll %cl, %esi
notb %dl
andb 0xe(%rsp), %dl
orb %dl, %sil
leaq 0xf(%rsp), %rcx
movb %sil, (%rcx)
movzbl %bpl, %edi
movzbl %bl, %esi
movl $0x1, %edx
callq 0x1f150
jmp 0x28374
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/I2Cdev/I2Cdev.cpp
// Function: I2Cdev::writeBitsW(unsigned char, unsigned char, unsigned char, unsigned char, unsigned short)
bool I2Cdev::writeBitsW(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint16_t data) {
    //              010 value to write
    // fedcba9876543210 bit numbers
    //    xxx           args: bitStart=12, length=3
    // 0001110000000000 mask word
    // 1010111110010110 original value (sample)
    // 1010001110010110 original & ~mask
    // 1010101110010110 masked | value
    uint16_t w;
    if (readWord(devAddr, regAddr, &w) != 0) {
        uint16_t mask = ((1 << length) - 1) << (bitStart - length + 1);
        data <<= (bitStart - length + 1); // shift data into correct position
        data &= mask; // zero all non-important bits in data
        w &= ~(mask); // zero all important bits in existing word
        w |= data; // combine data with existing word
        return writeWord(devAddr, regAddr, w);
    } else {
        return false;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %r14d
movl %ecx, %r12d
movl %edx, %r15d
movl %esi, %ebx
movl %edi, %ebp
movq 0x1eba6(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
leaq 0xc(%rsp), %rcx
movl $0x1, %edx
callq 0x1f230
testb %al, %al
je 0x283fd
movzbl %r12b, %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
shll %cl, %edx
notl %edx
movzbl %r15b, %eax
subl %ecx, %eax
incb %al
andl %edx, %r14d
movl %eax, %ecx
shll %cl, %edx
shll %cl, %r14d
notl %edx
andw 0xc(%rsp), %dx
orl %r14d, %edx
leaq 0xe(%rsp), %rcx
movw %dx, (%rcx)
movzbl %bpl, %edi
movzbl %bl, %esi
movl $0x1, %edx
callq 0x1f7d0
jmp 0x283ff
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/IAQ2000/IAQ2000.cpp
// Function: IAQ2000::testConnection()
bool IAQ2000::testConnection() {
    if (getIaqpred() >= 450) {
        return true;
    }
    else {
    return false;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %esi
leaq 0x1(%rdi), %rcx
movq 0x1ea34(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x2, %edx
callq 0x1f7e0
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
cmpl $0x1c2, %eax            # imm = 0x1C2
setae %al
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/IAQ2000/IAQ2000.cpp
// Function: IAQ2000::readAllBytes(unsigned char, unsigned char, unsigned char*, unsigned short)
int8_t IAQ2000::readAllBytes(uint8_t devAddr, uint8_t length, uint8_t *data, uint16_t timeout) {
#ifdef I2CDEV_SERIAL_DEBUG
    Serial.print("I2C (0x");
    Serial.print(devAddr, HEX);
    Serial.print(") reading ");
    Serial.print(length, DEC);
    Serial.print(" bytes...");
#endif
    
    int8_t count = 0;

    Wire.requestFrom(devAddr, length);
    
    uint32_t t1 = millis();
    for (; Wire.available() && (timeout == 0 || millis() - t1 < timeout); count++) {
#if ((I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE && ARDUINO < 100) || I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_NBWIRE)
        data[count] = Wire.receive();
#elif (I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE && ARDUINO >= 100)
        data[count] = Wire.read();
#endif
#ifdef I2CDEV_SERIAL_DEBUG
        Serial.print(data[count], HEX);
        if (count + 1 < length) Serial.print(" ");
#endif
    }
    if (timeout > 0 && millis() - t1 >= timeout && count < length) count = -1; // timeout
    
#ifdef I2CDEV_SERIAL_DEBUG
    Serial.print(". Done (");
    Serial.print(count, DEC);
    Serial.println(" read).");
#endif
    
    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r15d
movq %rcx, %r12
movq 0x1e9fe(%rip), %r14     # 0x46f78
movq %r14, %rdi
movl %edx, 0x4(%rsp)
callq 0x1f8b0
callq 0x1f600
movl %eax, %ebp
movq %r14, %rdi
callq 0x1f4b0
movzwl %r15w, %ebx
xorl %r14d, %r14d
testl %eax, %eax
je 0x285d7
movq 0x1e9d1(%rip), %r13     # 0x46f78
testw %r15w, %r15w
je 0x285b8
callq 0x1f600
subl %ebp, %eax
cmpl %ebx, %eax
jae 0x285dd
movq %r13, %rdi
callq 0x1f9b0
movsbq %r14b, %r14
movb %al, (%r12,%r14)
incb %r14b
movq %r13, %rdi
callq 0x1f4b0
testl %eax, %eax
jne 0x285a7
testw %r15w, %r15w
je 0x28600
callq 0x1f600
subl %ebp, %eax
cmpl %ebx, %eax
jb 0x28600
movsbl %r14b, %eax
movzbl 0x4(%rsp), %ecx
cmpl %ecx, %eax
movzbl %al, %eax
movl $0xff, %r14d
cmovgel %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/L3G4200D/L3G4200D.cpp
// Function: L3G4200D::setOutputDataRate(unsigned short)
void L3G4200D::setOutputDataRate(uint16_t rate) {
	uint8_t writeVal;
	
	if (rate == 100) {
		writeVal = L3G4200D_RATE_100;
	} else if (rate == 200) {
		writeVal = L3G4200D_RATE_200;
	} else if (rate == 400) {
		writeVal = L3G4200D_RATE_400;
	} else {
		writeVal = L3G4200D_RATE_800;
	}
	
	I2Cdev::writeBits(devAddr, L3G4200D_RA_CTRL_REG1, L3G4200D_ODR_BIT,
		L3G4200D_ODR_LENGTH, writeVal); 
}

// Assembly:
cmpl $0x64, %esi
je 0x28d25
cmpl $0x190, %esi            # imm = 0x190
je 0x28d21
cmpl $0xc8, %esi
jne 0x28d29
movb $0x1, %al
jmp 0x28d2b
movb $0x2, %al
jmp 0x28d2b
xorl %eax, %eax
jmp 0x28d2b
movb $0x3, %al
movzbl (%rdi), %edi
movzbl %al, %r8d
movl $0x20, %esi
movl $0x7, %edx
movl $0x2, %ecx
jmp 0x1f6b0
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/L3G4200D/L3G4200D.cpp
// Function: L3G4200D::getOutputDataRate()
uint16_t L3G4200D::getOutputDataRate() {
	I2Cdev::readBits(devAddr, L3G4200D_RA_CTRL_REG1, L3G4200D_ODR_BIT, 
		L3G4200D_ODR_LENGTH, buffer);
	uint8_t rate = buffer[0];

	if (rate == L3G4200D_RATE_100) {
		return 100;
	} else if (rate == L3G4200D_RATE_200) {
		return 200;
	} else if (rate == L3G4200D_RATE_400) {
		return 400;
	}
	return 800;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x1(%rbx), %r8
movq 0x1e1f0(%rip), %rax     # 0x46f48
movzwl (%rax), %r9d
movl $0x20, %esi
movl $0x7, %edx
movl $0x2, %ecx
callq 0x1f930
movzbl 0x1(%rbx), %eax
movl %eax, %ecx
shll $0x4, %ecx
movabsq $0x19000c80064, %rdx    # imm = 0x19000C80064
shrq %cl, %rdx
cmpb $0x3, %al
movl $0x320, %eax            # imm = 0x320
cmovbl %edx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/L3G4200D/L3G4200D.cpp
// Function: L3G4200D::getBandwidthCutOff()
float L3G4200D::getBandwidthCutOff() {
	uint16_t dataRate = getOutputDataRate();
	uint8_t bandwidthMode = getBandwidthCutOffMode();

	if (dataRate == 100) {
		if (bandwidthMode == L3G4200D_BW_LOW) {
			return 12.5;
		} else {
			return 25.0;
		}
	} else if (dataRate == 200) {
		if (bandwidthMode == L3G4200D_BW_LOW) {
			return 12.5;
		} else if (bandwidthMode == L3G4200D_BW_MED_LOW) {
			return 25.0;
		} else if (bandwidthMode == L3G4200D_BW_MED_HIGH) {
			return 50.0;
		} else {
			return 70.0;
		}
	} else if (dataRate == 400) {
		if (bandwidthMode == L3G4200D_BW_LOW) {
			return 20.0;
		} else if (bandwidthMode == L3G4200D_BW_MED_LOW) {
			return 25.0;
		} else if (bandwidthMode == L3G4200D_BW_MED_HIGH) {
			return 50.0;
		} else {
			return 110.0;
		}
	} else {
		if (bandwidthMode == L3G4200D_BW_LOW) {
			return 30.0;
		} else if (bandwidthMode == L3G4200D_BW_MED_LOW) {
			return 35.0;
		} else if (bandwidthMode == L3G4200D_BW_MED_HIGH) {
			return 50.0;
		} else {
			return 110.0;
		}
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1f7a0
movl %eax, %ebp
movzbl (%rbx), %edi
leaq 0x1(%rbx), %r8
movq 0x1e151(%rip), %rax     # 0x46f48
movzwl (%rax), %r9d
movl $0x20, %esi
movl $0x5, %edx
movl $0x2, %ecx
callq 0x1f930
movzbl 0x1(%rbx), %eax
movzwl %bp, %ecx
cmpl $0x190, %ecx            # imm = 0x190
je 0x28e4e
cmpl $0xc8, %ecx
je 0x28e41
cmpl $0x64, %ecx
jne 0x28e5b
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
leaq 0xd20e(%rip), %rax      # 0x36048
movss (%rax,%rcx,4), %xmm0
jmp 0x28e7f
cmpb $0x3, %al
jae 0x28e77
leaq 0xd204(%rip), %rcx      # 0x36050
jmp 0x28e66
cmpb $0x3, %al
jae 0x28e6d
leaq 0xd203(%rip), %rcx      # 0x3605c
jmp 0x28e66
cmpb $0x3, %al
jae 0x28e6d
leaq 0xd202(%rip), %rcx      # 0x36068
movss (%rcx,%rax,4), %xmm0
jmp 0x28e7f
movss 0xd1cb(%rip), %xmm0     # 0x36040
jmp 0x28e7f
movss 0xd1c5(%rip), %xmm0     # 0x36044
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/L3G4200D/L3G4200D.cpp
// Function: L3G4200D::getDataFilter()
uint8_t L3G4200D::getDataFilter() {
	I2Cdev::readBits(devAddr, L3G4200D_RA_CTRL_REG5, L3G4200D_OUT_SEL_BIT, 
		L3G4200D_OUT_SEL_LENGTH, buffer);
	uint8_t outBits = buffer[0];

	if (outBits == L3G4200D_NON_HIGH_PASS || outBits == L3G4200D_HIGH_PASS) {
		return outBits;
	}

	if (getHighPassFilterEnabled()) {
		return L3G4200D_LOW_HIGH_PASS;
	} else {
		return L3G4200D_LOW_PASS;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x1(%rbx), %r14
movq 0x1daa8(%rip), %r15     # 0x46f48
movzwl (%r15), %r9d
movl $0x24, %esi
movl $0x1, %edx
movl $0x2, %ecx
movq %r14, %r8
callq 0x1f930
movb 0x1(%rbx), %al
cmpb $0x2, %al
jb 0x294e4
movzbl (%rbx), %edi
movzwl (%r15), %r8d
movl $0x24, %esi
movl $0x4, %edx
movq %r14, %rcx
callq 0x1fa20
cmpb $0x0, 0x1(%rbx)
sete %al
xorb $0x3, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/L3G4200D/L3G4200D.cpp
// Function: L3G4200D::getAngularVelocityX()
int16_t L3G4200D::getAngularVelocityX() {
	uint8_t bufferL[6];
	uint8_t bufferH[6];
	I2Cdev::readBytes(devAddr, L3G4200D_RA_OUT_X_L, 1, bufferL);
	I2Cdev::readBytes(devAddr, L3G4200D_RA_OUT_X_H, 1, bufferH);
	if (getEndianMode() == L3G4200D_BIG_ENDIAN) {
		return (((int16_t) bufferL[0]) << 8) | bufferH[0];
	} else {
		return (((int16_t) bufferH[0]) << 8) | bufferL[0];
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movzbl (%rdi), %edi
movq 0x1d840(%rip), %r12     # 0x46f48
movzwl (%r12), %r8d
leaq 0x12(%rsp), %r14
movl $0x28, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x1f630
movzbl (%rbx), %edi
movzwl (%r12), %r8d
leaq 0xc(%rsp), %r15
movl $0x29, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x1f630
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rcx
movzwl (%r12), %r8d
movl $0x23, %esi
movl $0x6, %edx
callq 0x1fa20
cmpb $0x0, 0x1(%rbx)
movzbl (%r15), %eax
movzbl (%r14), %ecx
movl %ecx, %edx
cmovel %eax, %edx
cmovnel %eax, %ecx
shll $0x8, %edx
movzbl %cl, %eax
orl %edx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/L3G4200D/L3G4200D.cpp
// Function: L3G4200D::getAngularVelocityY()
int16_t L3G4200D::getAngularVelocityY() {
	uint8_t bufferL[6];
	uint8_t bufferH[6];
	I2Cdev::readBytes(devAddr, L3G4200D_RA_OUT_Y_L, 1, bufferL);
	I2Cdev::readBytes(devAddr, L3G4200D_RA_OUT_Y_H, 1, bufferH);
	if (getEndianMode() == L3G4200D_BIG_ENDIAN) {
		return (((int16_t) bufferL[0]) << 8) | bufferH[0];
	} else {
		return (((int16_t) bufferH[0]) << 8) | bufferL[0];
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movzbl (%rdi), %edi
movq 0x1d7aa(%rip), %r12     # 0x46f48
movzwl (%r12), %r8d
leaq 0x12(%rsp), %r14
movl $0x2a, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x1f630
movzbl (%rbx), %edi
movzwl (%r12), %r8d
leaq 0xc(%rsp), %r15
movl $0x2b, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x1f630
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rcx
movzwl (%r12), %r8d
movl $0x23, %esi
movl $0x6, %edx
callq 0x1fa20
cmpb $0x0, 0x1(%rbx)
movzbl (%r15), %eax
movzbl (%r14), %ecx
movl %ecx, %edx
cmovel %eax, %edx
cmovnel %eax, %ecx
shll $0x8, %edx
movzbl %cl, %eax
orl %edx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/L3G4200D/L3G4200D.cpp
// Function: L3G4200D::getAngularVelocityZ()
int16_t L3G4200D::getAngularVelocityZ() {
	uint8_t bufferL[6];
	uint8_t bufferH[6];
	I2Cdev::readBytes(devAddr, L3G4200D_RA_OUT_Z_L, 1, bufferL);
	I2Cdev::readBytes(devAddr, L3G4200D_RA_OUT_Z_H, 1, bufferH);
	if (getEndianMode() == L3G4200D_BIG_ENDIAN) {
		return (((int16_t) bufferL[0]) << 8) | bufferH[0];
	} else {
		return (((int16_t) bufferH[0]) << 8) | bufferL[0];
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movzbl (%rdi), %edi
movq 0x1d714(%rip), %r12     # 0x46f48
movzwl (%r12), %r8d
leaq 0x12(%rsp), %r14
movl $0x2c, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x1f630
movzbl (%rbx), %edi
movzwl (%r12), %r8d
leaq 0xc(%rsp), %r15
movl $0x2d, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x1f630
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rcx
movzwl (%r12), %r8d
movl $0x23, %esi
movl $0x6, %edx
callq 0x1fa20
cmpb $0x0, 0x1(%rbx)
movzbl (%r15), %eax
movzbl (%r14), %ecx
movl %ecx, %edx
cmovel %eax, %edx
cmovnel %eax, %ecx
shll $0x8, %edx
movzbl %cl, %eax
orl %edx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/L3GD20H/L3GD20H.cpp
// Function: L3GD20H::setOutputDataRate(unsigned short)
void L3GD20H::setOutputDataRate(uint16_t rate) {
	uint8_t writeVal;
	bool lowODRwriteVal;

	if (rate ==12) {
		writeVal = L3GD20H_RATE_100_12;
		setLowODREnabled(true);
	} else if (rate == 25) {
		writeVal = L3GD20H_RATE_200_25;
		setLowODREnabled(true);
	} else if (rate == 50) {
		writeVal = L3GD20H_RATE_400_50;
		setLowODREnabled(true);
	} else if (rate == 100) {
		writeVal = L3GD20H_RATE_100_12;
		setLowODREnabled(false);
	} else if (rate == 200) {
		writeVal = L3GD20H_RATE_200_25;
		setLowODREnabled(false);
	} else if (rate == 400) {
		writeVal = L3GD20H_RATE_400_50;
		setLowODREnabled(false);
	} else {
		writeVal = L3GD20H_RATE_800_50;
		setLowODREnabled(false);
	}
	
	I2Cdev::writeBits(devAddr, L3GD20H_RA_CTRL1, L3GD20H_ODR_BIT,
		L3GD20H_ODR_LENGTH, writeVal); 
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb (%rdi), %al
cmpl $0x63, %esi
jg 0x29fe3
movb $0x1, %cl
cmpl $0xc, %esi
je 0x29fff
cmpl $0x19, %esi
je 0x2a008
cmpl $0x32, %esi
jne 0x2a003
movb $0x2, %bpl
jmp 0x2a014
cmpl $0x64, %esi
je 0x29ffd
cmpl $0xc8, %esi
je 0x2a00f
cmpl $0x190, %esi            # imm = 0x190
jne 0x2a003
movb $0x2, %bpl
jmp 0x2a012
xorl %ecx, %ecx
xorl %ebp, %ebp
jmp 0x2a014
movb $0x3, %bpl
jmp 0x2a012
movb $0x1, %cl
movb $0x1, %bpl
jmp 0x2a014
movb $0x1, %bpl
xorl %ecx, %ecx
movzbl %al, %edi
movzbl %cl, %ecx
movl $0x39, %esi
xorl %edx, %edx
callq 0x1f980
movzbl (%rbx), %edi
movzbl %bpl, %r8d
movl $0x20, %esi
movl $0x7, %edx
movl $0x2, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1f6b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/L3GD20H/L3GD20H.cpp
// Function: L3GD20H::getOutputDataRate()
uint16_t L3GD20H::getOutputDataRate() {
	I2Cdev::readBits(devAddr, L3GD20H_RA_CTRL1, L3GD20H_ODR_BIT, 
		L3GD20H_ODR_LENGTH, buffer);
	uint8_t rate = buffer[0];

	if (rate == L3GD20H_RATE_100_12) {
		if (getLowODREnabled() == true) {
			return 12;
		} else {
			return 100;	
		}
	} else if (rate == L3GD20H_RATE_200_25) {
		if (getLowODREnabled() == true) {
			return 25;
		} else {
			return 200;
		}
	} else if (rate == L3GD20H_RATE_400_50) {
		if (getLowODREnabled() == true) {
			return 50;
		} else {
			return 400;
		}
	} else if (rate == L3GD20H_RATE_800_50) {
		if (getLowODREnabled() == true) {
			return 50;
		} else {
			return 800;
		}
	}
	return 800;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x1(%rbx), %r14
movq 0x1ced8(%rip), %r15     # 0x46f48
movzwl (%r15), %r9d
movl $0x20, %esi
movl $0x7, %edx
movl $0x2, %ecx
movq %r14, %r8
callq 0x1f930
movzbl 0x1(%rbx), %eax
cmpq $0x3, %rax
ja 0x2a143
leaq 0xbfd4(%rip), %rcx      # 0x36074
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl (%rbx), %edi
movzwl (%r15), %r8d
movl $0x39, %esi
xorl %edx, %edx
movq %r14, %rcx
callq 0x1fa20
cmpb $0x0, 0x1(%rbx)
movl $0x64, %ecx
movl $0xc, %eax
jmp 0x2a13a
movzbl (%rbx), %edi
movzwl (%r15), %r8d
movl $0x39, %esi
xorl %edx, %edx
movq %r14, %rcx
callq 0x1fa20
cmpb $0x0, 0x1(%rbx)
movl $0x190, %ecx            # imm = 0x190
jmp 0x2a10f
movzbl (%rbx), %edi
movzwl (%r15), %r8d
movl $0x39, %esi
xorl %edx, %edx
movq %r14, %rcx
callq 0x1fa20
cmpb $0x0, 0x1(%rbx)
movl $0x320, %ecx            # imm = 0x320
movl $0x32, %eax
jmp 0x2a13a
movzbl (%rbx), %edi
movzwl (%r15), %r8d
movl $0x39, %esi
xorl %edx, %edx
movq %r14, %rcx
callq 0x1fa20
cmpb $0x0, 0x1(%rbx)
movl $0xc8, %ecx
movl $0x19, %eax
cmovel %ecx, %eax
popq %rbx
popq %r14
popq %r15
retq
movw $0x320, %ax             # imm = 0x320
jmp 0x2a13d
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/L3GD20H/L3GD20H.cpp
// Function: L3GD20H::getDataFilter()
uint8_t L3GD20H::getDataFilter() {
	I2Cdev::readBits(devAddr, L3GD20H_RA_CTRL5, L3GD20H_OUT_SEL_BIT, 
		L3GD20H_OUT_SEL_LENGTH, buffer);
	uint8_t outBits = buffer[0];

	if (outBits == L3GD20H_NON_HIGH_PASS || outBits == L3GD20H_HIGH_PASS) {
		return outBits;
	}

	if (getHighPassFilterEnabled()) {
		return L3GD20H_LOW_HIGH_PASS;
	} else {
		return L3GD20H_LOW_PASS;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x1(%rbx), %r14
movq 0x1c6fc(%rip), %r15     # 0x46f48
movzwl (%r15), %r9d
movl $0x24, %esi
movl $0x1, %edx
movl $0x2, %ecx
movq %r14, %r8
callq 0x1f930
movb 0x1(%rbx), %al
cmpb $0x2, %al
jb 0x2a890
movzbl (%rbx), %edi
movzwl (%r15), %r8d
movl $0x24, %esi
movl $0x4, %edx
movq %r14, %rcx
callq 0x1fa20
cmpb $0x0, 0x1(%rbx)
sete %al
xorb $0x3, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/L3GD20H/L3GD20H.cpp
// Function: L3GD20H::getAngularVelocity(short*, short*, short*)
void L3GD20H::getAngularVelocity(int16_t* x, int16_t* y, int16_t* z) {
	I2Cdev::readBytes(devAddr, L3GD20H_RA_OUT_X_L | 0x80, 6, buffer);
	if (endianMode == L3GD20H_LITTLE_ENDIAN) {
		*x = (((int16_t)buffer[1]) << 8) | buffer[0];
		*y = (((int16_t)buffer[3]) << 8) | buffer[2];
		*z = (((int16_t)buffer[5]) << 8) | buffer[4];
	} else {
		*x = (((int16_t)buffer[0]) << 8) | buffer[1];
		*y = (((int16_t)buffer[2]) << 8) | buffer[3];
		*z = (((int16_t)buffer[4]) << 8) | buffer[5];
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movzbl (%rdi), %edi
leaq 0x1(%r14), %rcx
movq 0x1c4ca(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0xa8, %esi
movl $0x6, %edx
callq 0x1f630
cmpb $0x0, 0x7(%r14)
je 0x2aabe
movzwl 0x1(%r14), %eax
rolw $0x8, %ax
movw %ax, (%r12)
movzwl 0x3(%r14), %eax
rolw $0x8, %ax
movw %ax, (%r15)
movzwl 0x5(%r14), %eax
rolw $0x8, %ax
jmp 0x2aad6
movzwl 0x1(%r14), %eax
movw %ax, (%r12)
movzwl 0x3(%r14), %eax
movw %ax, (%r15)
movzwl 0x5(%r14), %eax
movw %ax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/L3GD20H/L3GD20H.cpp
// Function: L3GD20H::getAngularVelocityX()
int16_t L3GD20H::getAngularVelocityX() {
	I2Cdev::readBytes(devAddr, L3GD20H_RA_OUT_X_L | 0x80, 2, buffer);
	if (endianMode == L3GD20H_LITTLE_ENDIAN) {
		return (((int16_t)buffer[1]) << 8) | buffer[0];
	} else {
		return (((int16_t)buffer[0]) << 8) | buffer[1];
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x1(%rbx), %r14
movq 0x1c44d(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0xa8, %esi
movl $0x2, %edx
movq %r14, %rcx
callq 0x1f630
cmpb $0x0, 0x7(%rbx)
je 0x2ab21
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
jmp 0x2ab25
movzwl (%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/L3GD20H/L3GD20H.cpp
// Function: L3GD20H::getAngularVelocityY()
int16_t L3GD20H::getAngularVelocityY() {
	I2Cdev::readBytes(devAddr, L3GD20H_RA_OUT_Y_L | 0x80, 2, buffer);
	if (endianMode == L3GD20H_LITTLE_ENDIAN) {
		return (((int16_t)buffer[1]) << 8) | buffer[0];
	} else {
		return (((int16_t)buffer[0]) << 8) | buffer[1];
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x1(%rbx), %r14
movq 0x1c405(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0xaa, %esi
movl $0x2, %edx
movq %r14, %rcx
callq 0x1f630
cmpb $0x0, 0x7(%rbx)
je 0x2ab69
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
jmp 0x2ab6d
movzwl (%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop