LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: pwmWrite
void pwmWrite (int pin, int value)
{
  struct wiringPiNodeStruct *node = wiringPiNodes ;

  setupCheck ("pwmWrite") ;

  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 ;

    usingGpioMemCheck ("pwmWrite") ;
    *(pwm + gpioToPwmPort [pin]) = value ;
  }
  else
  {
    if ((node = wiringPiFindNode (pin)) != NULL)
      node->pwmWrite (node, pin, value) ;
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
leaq 0x1141d(%rip), %rdi     # 0x35acb
callq 0x2412c
cmpl $0x3f, %ebp
ja 0x246d5
movl 0x230b6(%rip), %eax     # 0x47774
testl %eax, %eax
je 0x2470a
cmpl $0x1, %eax
je 0x24719
cmpl $0x3, %eax
jne 0x2473d
leaq 0x23dad(%rip), %rax     # 0x48480
jmp 0x24711
movq 0x228dc(%rip), %rax     # 0x46fb8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x246f3
cmpl %ebp, (%rdi)
jg 0x246ed
cmpl %ebp, 0x4(%rdi)
jge 0x246f5
movq 0x58(%rdi), %rdi
jmp 0x246df
xorl %edi, %edi
testq %rdi, %rdi
je 0x2473d
movq 0x40(%rdi), %rax
movl %ebp, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rax
leaq 0x23d67(%rip), %rax     # 0x48478
movq (%rax), %rax
movl %ebp, %ecx
movl (%rax,%rcx,4), %ebp
leaq 0x113ab(%rip), %rdi     # 0x35acb
callq 0x243a7
movq 0x23d6c(%rip), %rax     # 0x48498
movslq %ebp, %rcx
leaq 0x10d7a(%rip), %rdx     # 0x354b0
movzbl (%rcx,%rdx), %ecx
movl %ebx, (%rax,%rcx,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: analogRead
int analogRead (int pin)
{
  struct wiringPiNodeStruct *node = wiringPiNodes ;

  if ((node = wiringPiFindNode (pin)) == NULL)
    return 0 ;
  else
    return node->analogRead (node, pin) ;
}

// Assembly:
movl %edi, %esi
movq 0x2286b(%rip), %rax     # 0x46fb8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x24764
cmpl %esi, (%rdi)
jg 0x2475e
cmpl %esi, 0x4(%rdi)
jge 0x24766
movq 0x58(%rdi), %rdi
jmp 0x24750
xorl %edi, %edi
testq %rdi, %rdi
je 0x24771
movq 0x48(%rdi), %rax
jmpq *%rax
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: analogWrite
void analogWrite (int pin, int value)
{
  struct wiringPiNodeStruct *node = wiringPiNodes ;

  if ((node = wiringPiFindNode (pin)) == NULL)
    return ;

  node->analogWrite (node, pin, value) ;
}

// Assembly:
movl %esi, %edx
movl %edi, %esi
movq 0x22839(%rip), %rax     # 0x46fb8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x24796
cmpl %esi, (%rdi)
jg 0x24790
cmpl %esi, 0x4(%rdi)
jge 0x24798
movq 0x58(%rdi), %rdi
jmp 0x24782
xorl %edi, %edi
testq %rdi, %rdi
je 0x247a3
movq 0x50(%rdi), %rax
jmpq *%rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: pwmToneWrite
void pwmToneWrite (int pin, int freq)
{
  int range ;

  setupCheck ("pwmToneWrite") ;

  if (freq == 0)
    pwmWrite (pin, 0) ;             // Off
  else
  {
    range = 600000 / freq ;
    pwmSetRange (range) ;
    pwmWrite    (pin, freq / 2) ;
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movl %edi, %ebx
leaq 0x11322(%rip), %rdi     # 0x35ad4
callq 0x2412c
testl %ebp, %ebp
je 0x247d6
movl $0x927c0, %eax          # imm = 0x927C0
xorl %edx, %edx
idivl %ebp
movl %eax, %edi
callq 0x1f330
movl %ebp, %esi
shrl $0x1f, %esi
addl %ebp, %esi
sarl %esi
jmp 0x247d8
xorl %esi, %esi
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1f1d0
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: digitalWriteByte
void digitalWriteByte (const int value)
{
  uint32_t pinSet = 0 ;
  uint32_t pinClr = 0 ;
  int mask = 1 ;
  int pin ;

  /**/ if (wiringPiMode == WPI_MODE_GPIO_SYS)
  {
    for (pin = 0 ; pin < 8 ; ++pin)
    {
      digitalWrite (pinToGpio [pin], value & mask) ;
      mask <<= 1 ;
    }
    return ;
  }
  else
  {
    for (pin = 0 ; pin < 8 ; ++pin)
    {
      if ((value & mask) == 0)
	pinClr |= (1 << pinToGpio [pin]) ;
      else
	pinSet |= (1 << pinToGpio [pin]) ;

      mask <<= 1 ;
    }

    *(gpio + gpioToGPCLR [0]) = pinClr ;
    *(gpio + gpioToGPSET [0]) = pinSet ;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
cmpl $0x2, 0x22f82(%rip)     # 0x47774
jne 0x2481d
movl $0x1, %ebp
xorl %r14d, %r14d
movq 0x23c75(%rip), %rax     # 0x48478
movl (%rax,%r14,4), %edi
movl %ebp, %esi
andl %ebx, %esi
callq 0x1fb30
addl %ebp, %ebp
incq %r14
cmpq $0x8, %r14
jne 0x247fc
jmp 0x24870
xorl %eax, %eax
movl $0x1, %edx
movq 0x23c4d(%rip), %rsi     # 0x48478
xorl %r9d, %r9d
xorl %edi, %edi
xorl %r8d, %r8d
movl %edx, %r10d
movb (%rsi,%r9,4), %cl
movl $0x1, %r11d
shll %cl, %r11d
andl %ebx, %r10d
testl %r10d, %r10d
cmovnel %r11d, %r10d
cmovnel %eax, %r11d
orl %r10d, %r8d
orl %r11d, %edi
addl %edx, %edx
incq %r9
cmpq $0x8, %r9
jne 0x24833
movq 0x23c27(%rip), %rax     # 0x48490
movl %edi, 0x28(%rax)
movl %r8d, 0x1c(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: digitalReadByte
unsigned int digitalReadByte (void)
{
  int pin, x ;
  uint32_t raw ;
  uint32_t data = 0 ;

  /**/ if (wiringPiMode == WPI_MODE_GPIO_SYS)
  {
    for (pin = 0 ; pin < 8 ; ++pin)
    {
      x = digitalRead (pinToGpio [pin]) ;
      data = (data << 1) | x ;
    }
  }
  else
  {
    raw = *(gpio + gpioToGPLEV [0]) ; // First bank for these pins
    for (pin = 0 ; pin < 8 ; ++pin)
    {
      x = pinToGpio [pin] ;
      data = (data << 1) | (((raw & (1 << x)) == 0) ? 0 : 1) ;
    }
  }
  return data ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x2, 0x22ef4(%rip)     # 0x47774
jne 0x248a6
xorl %r14d, %r14d
xorl %ebx, %ebx
movq 0x23bea(%rip), %rax     # 0x48478
movl (%rax,%r14,4), %edi
callq 0x1f1c0
addl %ebx, %ebx
orl %eax, %ebx
incq %r14
cmpq $0x8, %r14
jne 0x24887
jmp 0x248d3
movq 0x23be3(%rip), %rax     # 0x48490
movl 0x34(%rax), %eax
xorl %ecx, %ecx
movq 0x23bbf(%rip), %rdx     # 0x48478
xorl %ebx, %ebx
movl (%rdx,%rcx,4), %esi
xorl %edi, %edi
btl %esi, %eax
setb %dil
leal (%rdi,%rbx,2), %ebx
incq %rcx
cmpq $0x8, %rcx
jne 0x248bb
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: digitalWriteByte2
void digitalWriteByte2 (const int value)
{
  register int mask = 1 ;
  register int pin ;

  /**/ if (wiringPiMode == WPI_MODE_GPIO_SYS)
  {
    for (pin = 20 ; pin < 28 ; ++pin)
    {
      digitalWrite (pin, value & mask) ;
      mask <<= 1 ;
    }
    return ;
  }
  else
  {
    *(gpio + gpioToGPCLR [0]) = (~value & 0xFF) << 20 ; // 0x0FF00000; ILJ > CHANGE: Old causes glitch
    *(gpio + gpioToGPSET [0]) = ( value & 0xFF) << 20 ;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
cmpl $0x2, 0x22e8a(%rip)     # 0x47774
jne 0x2490f
movl $0x1, %r14d
movl $0x14, %ebp
movl %r14d, %esi
andl %ebx, %esi
movl %ebp, %edi
callq 0x1fb30
addl %r14d, %r14d
incl %ebp
cmpl $0x1c, %ebp
jne 0x248f7
jmp 0x2492a
movzbl %bl, %eax
shll $0x14, %eax
movl %eax, %ecx
xorl $0xff00000, %ecx        # imm = 0xFF00000
movq 0x23b6c(%rip), %rdx     # 0x48490
movl %ecx, 0x28(%rdx)
movl %eax, 0x1c(%rdx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: digitalReadByte2
unsigned int digitalReadByte2 (void)
{
  int pin, x ;
  uint32_t data = 0 ;

  /**/ if (wiringPiMode == WPI_MODE_GPIO_SYS)
  {
    for (pin = 20 ; pin < 28 ; ++pin)
    {
      x = digitalRead (pin) ;
      data = (data << 1) | x ;
    }
  }
  else
    data = ((*(gpio + gpioToGPLEV [0])) >> 20) & 0xFF ; // First bank for these pins

  return data ;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
cmpl $0x2, 0x22e3b(%rip)     # 0x47774
jne 0x24956
movl $0x14, %ebp
xorl %ebx, %ebx
movl %ebp, %edi
callq 0x1f1c0
addl %ebx, %ebx
orl %eax, %ebx
incl %ebp
cmpl $0x1c, %ebp
jne 0x24942
jmp 0x24966
movq 0x23b33(%rip), %rax     # 0x48490
movl 0x34(%rax), %eax
shrl $0x14, %eax
movzbl %al, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: waitForInterrupt
int waitForInterrupt (int pin, int mS)
{
  int fd, x ;
  uint8_t c ;
  struct pollfd polls ;

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

  if ((fd = sysFds [pin]) == -1)
    return -2 ;

// Setup poll structure

  polls.fd     = fd ;
  polls.events = POLLPRI | POLLERR ;

// Wait for it ...

  x = poll (&polls, 1, mS) ;

// If no error, do a dummy read to clear the interrupt
//	A one character read appars to be enough.

  if (x > 0)
  {
    lseek (fd, 0, SEEK_SET) ;	// Rewind
    (void)read (fd, &c, 1) ;	// Read & clear
  }

  return x ;
}

// Assembly:
movl %esi, %edx
movl 0x22dfd(%rip), %eax     # 0x47774
testl %eax, %eax
je 0x24989
cmpl $0x3, %eax
jne 0x24999
leaq 0x23af9(%rip), %rax     # 0x48480
jmp 0x24990
leaq 0x23ae8(%rip), %rax     # 0x48478
movq (%rax), %rax
movslq %edi, %rcx
movl (%rax,%rcx,4), %edi
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movslq %edi, %rax
leaq 0x22dd7(%rip), %rcx     # 0x47780
movl (%rcx,%rax,4), %ebx
cmpl $-0x1, %ebx
je 0x249ec
leaq 0x10(%rsp), %rdi
movl %ebx, (%rdi)
movw $0xa, 0x4(%rdi)
movl $0x1, %esi
callq 0x1f8c0
movl %eax, %ebp
testl %eax, %eax
jle 0x249f1
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1fac0
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
movl %ebx, %edi
callq 0x1f890
jmp 0x249f1
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: interruptHandler
static void *interruptHandler (UNU void *arg)
{
  int myPin ;

  (void)piHiPri (55) ;	// Only effective if we run as root

  myPin   = pinPass ;
  pinPass = -1 ;

  for (;;)
    if (waitForInterrupt (myPin, -1) > 0)
      isrFunctions [myPin] () ;

  return NULL ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x37, %edi
callq 0x1f0f0
movslq 0x22bb0(%rip), %rbx     # 0x47880
movl $0xffffffff, 0x22ba6(%rip) # imm = 0xFFFFFFFF
leaq 0x237df(%rip), %r14     # 0x484c0
movl %ebx, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1f100
testl %eax, %eax
jle 0x24ce1
callq *(%r14,%rbx,8)
jmp 0x24ce1
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: delay
void delay (unsigned int howLong)
{
  struct timespec sleeper, dummy ;

  sleeper.tv_sec  = (time_t)(howLong / 1000) ;
  sleeper.tv_nsec = (long)(howLong % 1000) * 1000000 ;

  nanosleep (&sleeper, &dummy) ;
}

// Assembly:
subq $0x28, %rsp
movl %edi, %eax
imulq $0x10624dd3, %rax, %rcx # imm = 0x10624DD3
shrq $0x26, %rcx
leaq 0x18(%rsp), %rax
movq %rcx, (%rax)
imull $0x3e8, %ecx, %ecx      # imm = 0x3E8
subl %ecx, %edi
imull $0xf4240, %edi, %ecx    # imm = 0xF4240
movq %rcx, 0x8(%rax)
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x1f160
addq $0x28, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: delayMicrosecondsHard
void delayMicrosecondsHard (unsigned int howLong)
{
  struct timeval tNow, tLong, tEnd ;

  gettimeofday (&tNow, NULL) ;
  tLong.tv_sec  = howLong / 1000000 ;
  tLong.tv_usec = howLong % 1000000 ;
  timeradd (&tNow, &tLong, &tEnd) ;

  while (timercmp (&tNow, &tEnd, <))
    gettimeofday (&tNow, NULL) ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x1f960
movl %ebx, %eax
imulq $0x431bde83, %rax, %rax # imm = 0x431BDE83
shrq $0x32, %rax
imull $0xf4240, %eax, %ecx    # imm = 0xF4240
subl %ecx, %ebx
movq (%r14), %rcx
movq 0x8(%r14), %rdx
addq %rcx, %rax
leaq (%rdx,%rbx), %rsi
xorl %r14d, %r14d
cmpq $0xf4240, %rsi          # imm = 0xF4240
setge %r14b
leaq -0xf4240(%rdx,%rbx), %r15
cmovlq %rsi, %r15
addq %rax, %r14
xorl %eax, %eax
cmpq %r15, %rdx
setl %al
xorl %edx, %edx
cmpq %r14, %rcx
setl %dl
cmovel %eax, %edx
cmpb $0x1, %dl
jne 0x24dcb
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1f960
xorl %eax, %eax
cmpq %r15, 0x8(%rsp)
setl %al
xorl %ecx, %ecx
cmpq %r14, (%rsp)
setl %cl
cmovel %eax, %ecx
testb %cl, %cl
jne 0x24da7
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: wiringPiSetupGpio
int wiringPiSetupGpio (void)
{
  (void)wiringPiSetup () ;

  if (wiringPiDebug)
    printf ("wiringPi: wiringPiSetupGpio called\n") ;

  wiringPiMode = WPI_MODE_GPIO ;

  return 0 ;
}

// Assembly:
pushq %rax
callq 0x1fa10
movq 0x21cb0(%rip), %rax     # 0x46f60
cmpl $0x0, (%rax)
je 0x252c1
leaq 0x10c70(%rip), %rdi     # 0x35f2c
callq 0x1f900
movl $0x1, 0x224a9(%rip)     # 0x47774
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: wiringPiSetupPhys
int wiringPiSetupPhys (void)
{
  (void)wiringPiSetup () ;

  if (wiringPiDebug)
    printf ("wiringPi: wiringPiSetupPhys called\n") ;

  wiringPiMode = WPI_MODE_PHYS ;

  return 0 ;
}

// Assembly:
pushq %rax
callq 0x1fa10
movq 0x21c84(%rip), %rax     # 0x46f60
cmpl $0x0, (%rax)
je 0x252ed
leaq 0x10c67(%rip), %rdi     # 0x35f4f
callq 0x1f900
movl $0x3, 0x2247d(%rip)     # 0x47774
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: wiringPiSetupSys
int wiringPiSetupSys (void)
{
  int pin ;
  char fName [128] ;

  if (wiringPiSetuped)
    return 0 ;

  wiringPiSetuped = TRUE ;

  if (getenv (ENV_DEBUG) != NULL)
    wiringPiDebug = TRUE ;

  if (getenv (ENV_CODES) != NULL)
    wiringPiReturnCodes = TRUE ;

  if (wiringPiDebug)
    printf ("wiringPi: wiringPiSetupSys called\n") ;

  if (piGpioLayout () == 1)
  {
     pinToGpio =  pinToGpioR1 ;
    physToGpio = physToGpioR1 ;
  }
  else
  {
     pinToGpio =  pinToGpioR2 ;
    physToGpio = physToGpioR2 ;
  }

// Open and scan the directory, looking for exported GPIOs, and pre-open
//	the 'value' interface to speed things up for later

  for (pin = 0 ; pin < 64 ; ++pin)
  {
    sprintf (fName, "/sys/class/gpio/gpio%d/value", pin) ;
    sysFds [pin] = open (fName, O_RDWR) ;
  }

  initialiseEpoch () ;

  wiringPiMode = WPI_MODE_GPIO_SYS ;

  return 0 ;
}

// Assembly:
cmpb $0x0, 0x233f6(%rip)     # 0x486f8
jne 0x2547e
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movb $0x1, 0x233db(%rip)     # 0x486f8
leaq 0x10908(%rip), %rdi     # 0x35c2c
callq 0x1f710
testq %rax, %rax
je 0x2533b
movq 0x21c2b(%rip), %rax     # 0x46f60
movl $0x1, (%rax)
leaq 0x108f9(%rip), %rdi     # 0x35c3b
callq 0x1f710
testq %rax, %rax
je 0x25359
movq 0x21c5d(%rip), %rax     # 0x46fb0
movl $0x1, (%rax)
movq 0x21c00(%rip), %rax     # 0x46f60
cmpl $0x0, (%rax)
je 0x25371
leaq 0x10c06(%rip), %rdi     # 0x35f72
callq 0x1f900
callq 0x1fb20
cmpl $0x1, %eax
leaq 0x22510(%rip), %rax     # 0x47890
leaq 0x22709(%rip), %rcx     # 0x47a90
cmoveq %rax, %rcx
leaq 0x225fe(%rip), %rax     # 0x47990
leaq 0x227f7(%rip), %rdx     # 0x47b90
cmoveq %rax, %rdx
movq %rcx, 0x230d4(%rip)     # 0x48478
movq %rdx, 0x230d5(%rip)     # 0x48480
leaq 0x223ce(%rip), %r12     # 0x47780
leaq 0x10832(%rip), %rbx     # 0x35beb
leaq 0x10(%rsp), %r14
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x1f090
movq %r14, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x1f3c0
movl %eax, (%r12)
incq %r15
addq $0x4, %r12
cmpq $0x40, %r15
jne 0x253c1
movq %rsp, %rbx
movl $0x4, %edi
movq %rbx, %rsi
callq 0x1f530
movq (%rbx), %rsi
movq 0x8(%rbx), %rcx
imulq $0x3e8, %rsi, %rdi      # imm = 0x3E8
movabsq $0x431bde82d7b634db, %rdx # imm = 0x431BDE82D7B634DB
movq %rcx, %rax
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %rdx
addq %rax, %rdx
addq %rdi, %rdx
movq %rdx, 0x232b1(%rip)     # 0x486e8
imulq $0xf4240, %rsi, %rsi    # imm = 0xF4240
movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF
movq %rcx, %rax
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
addq %rsi, %rdx
movq %rdx, 0x2328a(%rip)     # 0x486f0
movl $0x2, 0x22304(%rip)     # 0x47774
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
xorl %eax, %eax
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/BMA150/BMA150.cpp
// Function: BMA150::getAcceleration(short*, short*, short*)
void BMA150::getAcceleration(int16_t* x, int16_t* y, int16_t* z) {
    I2Cdev::readBytes(devAddr, BMA150_RA_X_AXIS_LSB, 6, buffer);
    *x = ((((int16_t)buffer[1]) << 8) | buffer[0]) >> 6;
    *y = ((((int16_t)buffer[3]) << 8) | buffer[2]) >> 6;
    *z = ((((int16_t)buffer[5]) << 8) | buffer[4]) >> 6;
}

// 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 0x219bf(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x2, %esi
movl $0x6, %edx
callq 0x1f630
movzwl 0x1(%r12), %eax
shrl $0x6, %eax
movw %ax, (%r15)
movzwl 0x3(%r12), %eax
shrl $0x6, %eax
movw %ax, (%r14)
movzwl 0x5(%r12), %eax
shrl $0x6, %eax
movw %ax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/BMP085/BMP085.cpp
// Function: BMP085::loadCalibration()
void BMP085::loadCalibration() {
    uint8_t buf2[22];
    I2Cdev::readBytes(devAddr, BMP085_RA_AC1_H, 22, buf2);
    ac1 = ((int16_t)buf2[0] << 8) + buf2[1];
    ac2 = ((int16_t)buf2[2] << 8) + buf2[3];
    ac3 = ((int16_t)buf2[4] << 8) + buf2[5];
    ac4 = ((uint16_t)buf2[6] << 8) + buf2[7];
    ac5 = ((uint16_t)buf2[8] << 8) + buf2[9];
    ac6 = ((uint16_t)buf2[10] << 8) + buf2[11];
    b1 = ((int16_t)buf2[12] << 8) + buf2[13];
    b2 = ((int16_t)buf2[14] << 8) + buf2[15];
    mb = ((int16_t)buf2[16] << 8) + buf2[17];
    mc = ((int16_t)buf2[18] << 8) + buf2[19];
    md = ((int16_t)buf2[20] << 8) + buf2[21];
    calibrationLoaded = true;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movzbl (%rdi), %edi
movq 0x20eba(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movq %rsp, %r14
movl $0xaa, %esi
movl $0x16, %edx
movq %r14, %rcx
callq 0x1f630
movzwl (%r14), %eax
rolw $0x8, %ax
movw %ax, 0x6(%rbx)
movzwl 0x2(%r14), %eax
rolw $0x8, %ax
movw %ax, 0x8(%rbx)
movzwl 0x4(%r14), %eax
rolw $0x8, %ax
movw %ax, 0xa(%rbx)
movzwl 0x6(%r14), %eax
rolw $0x8, %ax
movw %ax, 0x16(%rbx)
movzwl 0x8(%r14), %eax
rolw $0x8, %ax
movw %ax, 0x18(%rbx)
movzwl 0xa(%r14), %eax
rolw $0x8, %ax
movw %ax, 0x1a(%rbx)
movzwl 0xc(%r14), %eax
rolw $0x8, %ax
movw %ax, 0xc(%rbx)
movzwl 0xe(%r14), %eax
rolw $0x8, %ax
movw %ax, 0xe(%rbx)
movzwl 0x10(%r14), %eax
rolw $0x8, %ax
movw %ax, 0x10(%rbx)
movzwl 0x12(%r14), %eax
rolw $0x8, %ax
movw %ax, 0x12(%rbx)
movzwl 0x14(%r14), %eax
rolw $0x8, %ax
movw %ax, 0x14(%rbx)
movb $0x1, 0x4(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/BMP085/BMP085.cpp
// Function: BMP085::getMeasurement2()
uint16_t BMP085::getMeasurement2() {
    // wait for end of conversion
    while(getControl() & 0x20);
    I2Cdev::readBytes(devAddr, BMP085_RA_MSB, 2, buffer);
    return ((uint16_t)buffer[0] << 8) + buffer[1];
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x1(%rdi), %r14
movq 0x20d85(%rip), %r15     # 0x46f48
movzbl (%rbx), %edi
movzwl (%r15), %ecx
movl $0xf4, %esi
movq %r14, %rdx
callq 0x1f6d0
testb $0x20, 0x1(%rbx)
jne 0x261c3
movzbl (%rbx), %edi
movzwl (%r15), %r8d
movl $0xf6, %esi
movl $0x2, %edx
movq %r14, %rcx
callq 0x1f630
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/BMP085/BMP085.cpp
// Function: BMP085::getMeasurement3()
uint32_t BMP085::getMeasurement3() {
    // wait for end of conversion
    while(getControl() & 0x20);
    I2Cdev::readBytes(devAddr, BMP085_RA_MSB, 3, buffer);
    return ((uint32_t)buffer[0] << 16) + ((uint16_t)buffer[1] << 8) + buffer[2];
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x1(%rdi), %r14
movq 0x20d31(%rip), %r15     # 0x46f48
movzbl (%rbx), %edi
movzwl (%r15), %ecx
movl $0xf4, %esi
movq %r14, %rdx
callq 0x1f6d0
testb $0x20, 0x1(%rbx)
jne 0x26217
movzbl (%rbx), %edi
movzwl (%r15), %r8d
movl $0xf6, %esi
movl $0x3, %edx
movq %r14, %rcx
callq 0x1f630
movzbl 0x1(%rbx), %eax
shll $0x10, %eax
movzbl 0x2(%rbx), %ecx
shll $0x8, %ecx
orl %eax, %ecx
movzbl 0x3(%rbx), %eax
orl %ecx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/BMP085/BMP085.cpp
// Function: BMP085::getTemperatureC()
float BMP085::getTemperatureC() {
    /*
    Datasheet formula:
        UT = raw temperature
        X1 = (UT - AC6) * AC5 / 2^15
        X2 = MC * 2^11 / (X1 + MD)
        B5 = X1 + X2
        T = (B5 + 8) / 2^4
    */
    int32_t ut = getRawTemperature();
    if(ut == 0) return NAN;
    int32_t x1 = ((ut - (int32_t)ac6) * (int32_t)ac5) >> 15;
    int32_t x2 = ((int32_t)mc << 11) / (x1 + md);
    b5 = x1 + x2;
    return (float)((b5 + 8) >> 4) / 10.0f;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x2e, 0x20(%rdi)
jne 0x262fc
movq %rbx, %rdi
callq 0x1f210
jmp 0x262fe
xorl %eax, %eax
testw %ax, %ax
je 0x26342
movzwl %ax, %eax
movzwl 0x1a(%rbx), %ecx
subl %ecx, %eax
movzwl 0x18(%rbx), %ecx
imull %eax, %ecx
sarl $0xf, %ecx
movswl 0x12(%rbx), %eax
shll $0xb, %eax
movswl 0x14(%rbx), %esi
addl %ecx, %esi
cltd
idivl %esi
leal (%rcx,%rax), %edx
addl $0x8, %edx
sarl $0x4, %edx
cvtsi2ss %edx, %xmm0
addl %ecx, %eax
movl %eax, 0x1c(%rbx)
divss 0xfc58(%rip), %xmm0     # 0x35f98
jmp 0x2634a
movss 0xfc4a(%rip), %xmm0     # 0x35f94
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/BMP085/BMP085.cpp
// Function: BMP085::getPressure()
int32_t BMP085::getPressure() {
    /*
    Datasheet forumla
        UP = raw pressure
        B6 = B5 - 4000
        X1 = (B2 * (B6 * B6 / 2^12)) / 2^11
        X2 = AC2 * B6 / 2^11
        X3 = X1 + X2
        B3 = ((AC1 * 4 + X3) << oss + 2) / 4
        X1 = AC3 * B6 / 2^13
        X2 = (B1 * (B6 * B6 / 2^12)) / 2^16
        X3 = ((X1 + X2) + 2) / 2^2
        B4 = AC4 * (unsigned long)(X3 + 32768) / 2^15
        B7 = ((unsigned long)UP - B3) * (50000 >> oss)
        if (B7 < 0x80000000) { p = (B7 * 2) / B4 }
        else { p = (B7 / B4) * 2 }
        X1 = (p / 2^8) * (p / 2^8)
        X1 = (X1 * 3038) / 2^16
        X2 = (-7357 * p) / 2^16
        p = p + (X1 + X2 + 3791) / 2^4
    */
    uint32_t up = getRawPressure();
    if(up == 0) return 0;
    uint8_t oss = (measureMode & 0xC0) >> 6;
    int32_t p;
    int32_t b6 = b5 - 4000;
    int32_t x1 = ((int32_t)b2 * ((b6 * b6) >> 12)) >> 11;
    int32_t x2 = ((int32_t)ac2 * b6) >> 11;
    int32_t x3 = x1 + x2;
    int32_t b3 = ((((int32_t)ac1 * 4 + x3) << oss) + 2) >> 2;
    x1 = ((int32_t)ac3 * b6) >> 13;
    x2 = ((int32_t)b1 * ((b6 * b6) >> 12)) >> 16;
    x3 = ((x1 + x2) + 2) >> 2;
    uint32_t b4 = ((uint32_t)ac4 * (uint32_t)(x3 + 32768)) >> 15;
    uint32_t b7 = ((uint32_t)up - b3) * (uint32_t)(50000UL >> oss);
    if (b7 < 0x80000000) {
        p = (b7 << 1) / b4;
    } else {
        p = (b7 / b4) << 1;
    }
    x1 = (p >> 8) * (p >> 8);
    x1 = (x1 * 3038) >> 16;
    x2 = (-7357 * p) >> 16;
    return p + ((x1 + x2 + (int32_t)3791) >> 4);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %ebp, %ebp
testb $0x34, 0x20(%rdi)
movl $0x0, %eax
je 0x263b6
movq %rbx, %rdi
callq 0x1f030
movzbl 0x20(%rbx), %edx
shrl $0x6, %edx
movb $0x8, %cl
subb %dl, %cl
shrl %cl, %eax
testl %eax, %eax
je 0x26473
movzbl 0x20(%rbx), %ecx
shrl $0x6, %ecx
movl $0xfffff060, %esi       # imm = 0xFFFFF060
addl 0x1c(%rbx), %esi
movswl 0xe(%rbx), %edx
movswl 0x8(%rbx), %edi
imull %esi, %edi
movswl 0xa(%rbx), %r8d
imull %esi, %r8d
imull %esi, %esi
shrl $0xc, %esi
imull %esi, %edx
sarl $0xb, %edx
sarl $0xb, %edi
addl %edx, %edi
movswl 0x6(%rbx), %edx
leal (%rdi,%rdx,4), %edi
shll %cl, %edi
addl $0x2, %edi
sarl $0x2, %edi
sarl $0xd, %r8d
movswl 0xc(%rbx), %edx
imull %esi, %edx
sarl $0x10, %edx
leal (%r8,%rdx), %esi
addl $0x2, %esi
sarl $0x2, %esi
movzwl 0x16(%rbx), %edx
addl $0x8000, %esi           # imm = 0x8000
imull %edx, %esi
movl $0xc350, %edx           # imm = 0xC350
shrl %cl, %edx
shrl $0xf, %esi
subl %edi, %eax
imull %eax, %edx
testl %edx, %edx
js 0x26443
addl %edx, %edx
movl %edx, %eax
xorl %edx, %edx
divl %esi
jmp 0x2644b
movl %edx, %eax
xorl %edx, %edx
divl %esi
addl %eax, %eax
movl %eax, %ecx
sarl $0x8, %ecx
imull %ecx, %ecx
imull $0xbde, %ecx, %ecx      # imm = 0xBDE
shrl $0x10, %ecx
imull $0xffffe343, %eax, %edx # imm = 0xFFFFE343
sarl $0x10, %edx
leal (%rdx,%rcx), %ebp
addl $0xecf, %ebp            # imm = 0xECF
sarl $0x4, %ebp
addl %eax, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/DS1307/DS1307.cpp
// Function: DS1307::getSeconds()
uint8_t DS1307::getSeconds() {
    // Byte: [7 = CH] [6:4 = 10SEC] [3:0 = 1SEC]
    I2Cdev::readByte(devAddr, DS1307_RA_SECONDS, buffer);
    clockHalt = buffer[0] & 0x80;
    return (buffer[0] & 0x0F) + ((buffer[0] & 0x70) >> 4) * 10;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x1(%rbx), %rdx
movq 0x2098c(%rip), %rax     # 0x46f48
movzwl (%rax), %ecx
xorl %esi, %esi
callq 0x1f6d0
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x7, %cl
movb %cl, 0x3(%rbx)
movl %eax, %ecx
andb $0xf, %cl
shrb $0x4, %al
andb $0x7, %al
movzbl %al, %eax
addl %eax, %eax
leal (%rax,%rax,4), %eax
addb %cl, %al
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/DS1307/DS1307.cpp
// Function: DS1307::getHours12()
uint8_t DS1307::getHours12() {
    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]
        return (buffer[0] & 0x0F) + ((buffer[0] & 0x10) >> 4) * 10;
    } else {
        // bit 6 is low, 24-hour mode (default)
        // Byte: [5:4 = 10HR] [3:0 = 1HR]
        uint8_t hours = (buffer[0] & 0x0F) + ((buffer[0] & 0x30) >> 4) * 10;

        // convert 24-hour to 12-hour format, since that's what's requested
        if (hours > 12) hours -= 12;
        else if (hours == 0) hours = 12;
        return hours;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
leaq 0x1(%rbx), %rdx
movq 0x2085c(%rip), %rax     # 0x46f48
movzwl (%rax), %ecx
movl $0x2, %esi
callq 0x1f6d0
movb 0x1(%rbx), %al
movl %eax, %edx
andb $0x40, %dl
movl %edx, %esi
shrb $0x6, %sil
movl %eax, %ecx
andb $0xf, %cl
movb %sil, 0x2(%rbx)
testb %dl, %dl
jne 0x2673d
shrb $0x4, %al
andb $0x3, %al
movzbl %al, %eax
addl %eax, %eax
leal (%rax,%rax,4), %eax
addb %cl, %al
leal -0xc(%rax), %ecx
testb %al, %al
movzbl %al, %eax
movl $0xc, %edx
cmovnel %eax, %edx
cmpb $0xd, %al
movzbl %cl, %eax
cmovbl %edx, %eax
jmp 0x26747
shlb $0x3, %al
sarb $0x7, %al
andb $0xa, %al
addb %cl, %al
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x26752
retq
cmpb $0x1, 0x2(%rdi)
jne 0x26785
testb %dl, %dl
setne %al
shlb $0x5, %al
movzbl %sil, %ecx
imull $0xcd, %ecx, %ecx
shrl $0xb, %ecx
movl %ecx, %edx
shlb $0x4, %dl
orb %al, %dl
addl %ecx, %ecx
leal (%rcx,%rcx,4), %eax
subb %al, %sil
orb %dl, %sil
orb $0x40, %sil
jmp 0x267b9
leal 0xc(%rsi), %eax
testb %dl, %dl
movzbl %sil, %ecx
movzbl %al, %eax
cmovel %ecx, %eax
cmpb $0x18, %al
movzbl %al, %eax
movl $0xc, %ecx
movl %eax, %edx
cmovel %ecx, %edx
testb %al, %al
cmovel %ecx, %edx
imulq $0x1999999a, %rdx, %rax # imm = 0x1999999A
shrq $0x20, %rax
leal (%rax,%rax,2), %eax
leal (%rdx,%rax,2), %esi
movzbl (%rdi), %edi
movzbl %sil, %edx
movl $0x2, %esi
jmp 0x1f5d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2076c(%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 0x26814
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 0x26848
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 0x26839
xorl %edx, %edx
cmpb $0xc, %cl
movzbl %cl, %eax
cmovel %edx, %eax
jmp 0x26848
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_O1/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 0x26851
retq
cmpb $0x1, 0x2(%rdi)
jne 0x268a3
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 0x268b9
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_O1/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 0x26a1b
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_O1/mrlordkaj[P]i2cdevlib-pi/DS1307/DS1307.cpp
// Function: DS1307::getTime12(unsigned char*, unsigned char*, unsigned char*, unsigned char*)
void DS1307::getTime12(uint8_t *hours, uint8_t *minutes, uint8_t *seconds, uint8_t *ampm) {
    *hours = getHours12();
    *minutes = getMinutes();
    *seconds = getSeconds();
    *ampm = getAMPM();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %r14
callq 0x1f2c0
movb %al, (%r12)
movzbl (%r14), %edi
leaq 0x1(%r14), %r12
movq 0x2025c(%rip), %rbp     # 0x46f48
movzwl (%rbp), %ecx
movl $0x1, %esi
movq %r12, %rdx
callq 0x1f6d0
movb 0x1(%r14), %al
movl %eax, %ecx
andb $0xf, %cl
shrb $0x4, %al
andb $0x7, %al
movzbl %al, %eax
addl %eax, %eax
leal (%rax,%rax,4), %eax
addb %cl, %al
movb %al, (%r13)
movzbl (%r14), %edi
movzwl (%rbp), %ecx
xorl %esi, %esi
movq %r12, %rdx
callq 0x1f6d0
movb 0x1(%r14), %al
movl %eax, %ecx
shrb $0x7, %cl
movb %cl, 0x3(%r14)
movl %eax, %ecx
andb $0xf, %cl
shrb $0x4, %al
andb $0x7, %al
movzbl %al, %eax
addl %eax, %eax
leal (%rax,%rax,4), %eax
addb %cl, %al
movb %al, (%r15)
movzbl (%r14), %edi
movzwl (%rbp), %r8d
movl $0x2, %esi
movl $0x5, %edx
movq %r12, %rcx
callq 0x1fa20
movb 0x1(%r14), %al
movb %al, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/DS1307/DS1307.cpp
// Function: DS1307::setTime12(unsigned char, unsigned char, unsigned char, unsigned char)
void DS1307::setTime12(uint8_t hours, uint8_t minutes, uint8_t seconds, uint8_t ampm) {
    // write seconds first to reset divider chain and give
    // us 1 second to write remaining time info
    setSeconds(seconds);
    setMinutes(minutes);
    setHours12(hours, ampm);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %r8d, %ebx
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %r14
movl %ecx, %esi
callq 0x1f1f0
cmpb $0x3b, %r15b
ja 0x26dc6
movzbl %r15b, %eax
imull $0xcd, %eax, %eax
shrl $0xa, %eax
andl $-0x2, %eax
leal (%rax,%rax,2), %eax
addb %r15b, %al
movzbl (%r14), %edi
movzbl %al, %edx
movl $0x1, %esi
callq 0x1f5d0
movzbl %bpl, %esi
movzbl %bl, %edx
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1f3a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/DS1307/DS1307.cpp
// Function: DS1307::setTime24(unsigned char, unsigned char, unsigned char)
void DS1307::setTime24(uint8_t hours, uint8_t minutes, uint8_t seconds) {
    // write seconds first to reset divider chain and give
    // us 1 second to write remaining time info
    setSeconds(seconds);
    setMinutes(minutes);
    setHours24(hours);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
movl %ecx, %esi
callq 0x1f1f0
cmpb $0x3b, %r14b
ja 0x26eb9
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 $0x1, %esi
callq 0x1f5d0
movzbl %bpl, %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1fb10
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x27193
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 0x271f2
movzbl %r15b, %eax
imull $0xcd, %eax, %eax
shrl $0xa, %eax
andl $-0x2, %eax
leal (%rax,%rax,2), %eax
addb %r15b, %al
movzbl (%rbx), %edi
movzbl %al, %edx
movl $0x5, %esi
callq 0x1f5d0
movl %r14d, %eax
andl $0xfe, %eax
imull $0x199a, %eax, %eax     # imm = 0x199A
shrl $0xf, %eax
andl $-0x2, %eax
leal (%rax,%rax,2), %eax
addl %r14d, %eax
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
// File: /workspace/github_cpp_makefile_star2_O1/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
cmpl $0x1e28500, %esi        # imm = 0x1E28500
jae 0x27298
movb $0x1, %cl
xorl %edx, %edx
jmp 0x272c2
movl $0x16e, %esi            # imm = 0x16E
xorl %edx, %edx
movl %eax, %r8d
movl %r8d, %eax
subl %esi, %eax
incb %dl
xorl %ecx, %ecx
testb $0x3, %dl
sete %cl
movzwl %ax, %r8d
movl %ecx, %esi
addl $0x16d, %esi            # imm = 0x16D
cmpl %esi, %r8d
jae 0x272a2
movb %dl, (%rdi)
xorl %esi, %esi
leaq 0xed3f(%rip), %rdx      # 0x3600c
cmpb $0x1, %sil
leal 0x1(%rsi), %esi
movzbl %sil, %r8d
sete %r9b
andb %cl, %r9b
addb -0x1(%r8,%rdx), %r9b
movzbl %r9b, %r8d
movl $0x0, %r9d
cmpw %r8w, %ax
jb 0x272f7
movl %r8d, %r9d
movl %eax, %r10d
subl %r9d, %r10d
cmpw %r8w, %ax
movl %r10d, %eax
jae 0x272cd
movb %sil, 0x1(%rdi)
incb %al
movb %al, 0x2(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/DS1307/DS1307.cpp
// Function: DateTime::DateTime(unsigned short, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)
DateTime::DateTime (uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t min, uint8_t sec) {
        if (year >= 2000)
            year -= 2000;
        yOff = year;
        m = month;
        d = day;
        hh = hour;
        mm = min;
        ss = sec;
    }

// Assembly:
movb 0x8(%rsp), %al
leal 0x30(%rsi), %r10d
cmpl $0x7d0, %esi            # imm = 0x7D0
movzbl %r10b, %r10d
cmovbl %esi, %r10d
movb %r10b, (%rdi)
movb %dl, 0x1(%rdi)
movb %cl, 0x2(%rdi)
movb %r8b, 0x3(%rdi)
movb %r9b, 0x4(%rdi)
movb %al, 0x5(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mrlordkaj[P]i2cdevlib-pi/DS1307/DS1307.cpp
// Function: DateTime::DateTime(char const*, char const*)
static uint8_t conv2d(const char* p) {
        uint8_t v = 0;
        if ('0' <= *p && *p <= '9')
            v = *p - '0';
        return 10 * v + *++p - '0';
    }

// 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 0x273c2
leaq 0xec4d(%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 0x273bf
movb $0xb, %cl
jmp 0x273bf
movb $0xc, %cl
jmp 0x273bf
movb $0xa, %cl
jmp 0x273bf
movb $0x9, %cl
jmp 0x273bf
movb $0x2, %cl
jmp 0x273bf
movb $0x1, %cl
cmpb $0x61, 0x1(%rsi)
je 0x273bf
cmpb $0x6e, 0x2(%rsi)
sete %cl
xorb $0x7, %cl
jmp 0x273bf
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_O1/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 0x274ad
leaq -0x1(%rdx), %rsi
xorl %r8d, %r8d
leaq 0xeb6f(%rip), %r9       # 0x3600c
movzbl (%r8,%r9), %r10d
addl %r10d, %eax
incq %r8
cmpq %r8, %rsi
jne 0x2749d
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_O1/mrlordkaj[P]i2cdevlib-pi/HMC5843/HMC5843.cpp
// Function: HMC5843::initialize()
void HMC5843::initialize() {
    // write CONFIG_A register
    I2Cdev::writeByte(devAddr, HMC5843_RA_CONFIG_A,
        (HMC5843_RATE_10     << (HMC5843_CRA_RATE_BIT - HMC5843_CRA_RATE_LENGTH + 1)) |
        (HMC5843_BIAS_NORMAL << (HMC5843_CRA_BIAS_BIT - HMC5843_CRA_BIAS_LENGTH + 1)));

    // write CONFIG_B register
    setGain(HMC5843_GAIN_1300);
    
    // write MODE register
    setMode(HMC5843_MODE_SINGLE);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1f5d0
movzbl (%rbx), %edi
movl $0x1, %esi
movl $0x20, %edx
callq 0x1f5d0
movzbl (%rbx), %edi
movl $0x2, %esi
movl $0x1, %edx
callq 0x1f5d0
movb $0x1, 0x7(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1f872(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x6, %edx
callq 0x1f630
cmpb $0x1, 0x7(%r15)
jne 0x27703
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_O1/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 0x1f800(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x6, %edx
callq 0x1f630
cmpb $0x1, 0x7(%rbx)
jne 0x27773
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_O1/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 0x1f7b8(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x6, %edx
callq 0x1f630
cmpb $0x1, 0x7(%rbx)
jne 0x277bb
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_O1/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 0x1f770(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x6, %edx
callq 0x1f630
cmpb $0x1, 0x7(%rbx)
jne 0x27803
movzbl (%rbx), %edi
movl $0x2, %esi
movl $0x1, %edx
callq 0x1f5d0
movzwl 0x5(%rbx), %eax
rolw $0x8, %ax
popq %rbx
retq
nop