LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: pwmSetClock
void pwmSetClock (int divisor)
{
  uint32_t pwm_control ;

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

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

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

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

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

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

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

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

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movl 0x26b33(%rip), %eax     # 0x4a760
cmpl $0xfe000000, %eax       # imm = 0xFE000000
jne 0x23c44
imull $0x21c, %ebx, %eax      # imm = 0x21C
movl $0xc0, %ecx
cltd
idivl %ecx
movl %eax, %ebx
movl 0x25dea(%rip), %eax     # 0x49a34
cmpl $0x3, %eax
ja 0x23d16
cmpl $0x2, %eax
je 0x23d16
andl $0xfff, %ebx            # imm = 0xFFF
movq 0x252f7(%rip), %r14     # 0x48f60
cmpl $0x0, (%r14)
je 0x23c8c
movq 0x26af2(%rip), %rax     # 0x4a768
movl 0xa4(%rax), %edx
leaq 0xfd30(%rip), %rdi      # 0x339b3
movl %ebx, %esi
xorl %eax, %eax
callq 0x1f050
movq 0x26ac5(%rip), %rax     # 0x4a758
movl (%rax), %ebp
movl $0x0, (%rax)
movq 0x26ac6(%rip), %rax     # 0x4a768
movl $0x5a000001, 0xa0(%rax) # imm = 0x5A000001
pushq $0x6e
popq %rdi
pushq $0x1
popq %r15
callq 0x1f430
movq 0x26aa9(%rip), %rax     # 0x4a768
movl 0xa0(%rax), %ecx
movl %r15d, %edi
testb %cl, %cl
js 0x23cb3
movl %ebx, %ecx
shll $0xc, %ecx
orl $0x5a000000, %ecx       # imm = 0x5A000000
movl %ecx, 0xa4(%rax)
movl $0x5a000011, 0xa0(%rax) # imm = 0x5A000011
movq 0x26a6a(%rip), %rcx     # 0x4a758
movl %ebp, (%rcx)
cmpl $0x0, (%r14)
je 0x23d16
movl 0xa4(%rax), %edx
leaq 0xfcd1(%rip), %rdi      # 0x339d4
movl %ebx, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1f050
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: gpioClockSet
void gpioClockSet (int pin, int freq)
{
  int divi, divr, divf ;

  pin &= 63 ;

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

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

  if (divi > 4095)
    divi = 4095 ;

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

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

// Assembly:
andl $0x3f, %edi
movl 0x25d0a(%rip), %eax     # 0x49a34
testl %eax, %eax
je 0x23d45
cmpl $0x1, %eax
je 0x23d54
cmpl $0x3, %eax
jne 0x23dc5
leaq 0x269fd(%rip), %rax     # 0x4a740
jmp 0x23d4c
leaq 0x269ec(%rip), %rax     # 0x4a738
movq (%rax), %rax
movl %edi, %ecx
movl (%rax,%rcx,4), %edi
movl $0x124f800, %eax        # imm = 0x124F800
xorl %edx, %edx
idivl %esi
cvtsi2sd %edx, %xmm0
mulsd 0xf44f(%rip), %xmm0     # 0x331b8
divsd 0xf44f(%rip), %xmm0     # 0x331c0
cvttsd2si %xmm0, %r8d
movq 0x269eb(%rip), %rcx     # 0x4a768
movslq %edi, %rsi
leaq 0xf529(%rip), %rdx      # 0x332b0
movzbl (%rsi,%rdx), %edx
movl $0x5a000001, (%rcx,%rdx,4) # imm = 0x5A000001
movl (%rcx,%rdx,4), %edi
testb %dil, %dil
js 0x23d92
movl $0xfff, %edi            # imm = 0xFFF
cmpl %edi, %eax
cmovll %eax, %edi
shll $0xc, %edi
orl %r8d, %edi
orl $0x5a000000, %edi       # imm = 0x5A000000
leaq 0xf539(%rip), %rax      # 0x332f0
movzbl (%rsi,%rax), %eax
movl %edi, (%rcx,%rax,4)
movl $0x5a000011, (%rcx,%rdx,4) # imm = 0x5A000011
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: wiringPiFindNode
struct wiringPiNodeStruct *wiringPiFindNode (int pin)
{
  struct wiringPiNodeStruct *node = wiringPiNodes ;

  while (node != NULL)
    if ((pin >= node->pinBase) && (pin <= node->pinMax))
      return node ;
    else
      node = node->next ;

  return NULL ;
}

// Assembly:
movq 0x251eb(%rip), %rax     # 0x48fb8
movq (%rax), %rax
testq %rax, %rax
je 0x23de4
cmpl %edi, (%rax)
jg 0x23dde
cmpl %edi, 0x4(%rax)
jge 0x23de4
addq $0x58, %rax
jmp 0x23dcd
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: wiringPiNewNode
struct wiringPiNodeStruct *wiringPiNewNode (int pinBase, int numPins)
{
  int    pin ;
  struct wiringPiNodeStruct *node ;

// Minimum pin base is 64

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

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

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

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

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

  return node ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
cmpl $0x3f, %edi
jg 0x23e09
leaq 0xfbf8(%rip), %rsi      # 0x339f5
pushq $0x1
popq %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1f380
addl %ebp, %ebx
leaq 0xfc0b(%rip), %r14      # 0x33a1d
pushq $0x1
popq %r15
movl %ebp, %r12d
cmpl %ebx, %r12d
jge 0x23e40
movl %r12d, %edi
callq 0x1f9a0
testq %rax, %rax
je 0x23e3b
movl %r15d, %edi
movq %r14, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x1f380
incl %r12d
jmp 0x23e19
pushq $0x60
popq %rdi
pushq $0x1
popq %rsi
callq 0x1f4d0
movq %rax, %r14
testq %rax, %rax
jne 0x23e73
callq 0x1f040
movl (%rax), %edi
callq 0x1f230
leaq 0xfbf2(%rip), %rsi      # 0x33a58
pushq $0x1
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1f380
movl %ebp, (%r14)
decl %ebx
movl %ebx, 0x4(%r14)
leaq 0x63(%rip), %rax        # 0x23ee6
movq %rax, 0x20(%r14)
leaq 0x59(%rip), %rax        # 0x23ee7
movq %rax, 0x28(%r14)
leaq 0x4f(%rip), %rax        # 0x23ee8
movq %rax, 0x30(%r14)
leaq 0x47(%rip), %rax        # 0x23eeb
movq %rax, 0x38(%r14)
leaq 0x3d(%rip), %rax        # 0x23eec
movq %rax, 0x40(%r14)
leaq 0x33(%rip), %rax        # 0x23eed
movq %rax, 0x48(%r14)
leaq 0x2b(%rip), %rax        # 0x23ef0
movq %rax, 0x50(%r14)
movq 0x250e8(%rip), %rax     # 0x48fb8
movq (%rax), %rcx
movq %rcx, 0x58(%r14)
movq %r14, (%rax)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: pinModeAlt
void pinModeAlt (int pin, int mode)
{
  int fSel, shift ;

  setupCheck ("pinModeAlt") ;

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

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

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

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
leaq 0xfb89(%rip), %rdi      # 0x33a88
callq 0x23f6f
cmpl $0x3f, %ebp
ja 0x23f68
movl 0x25b25(%rip), %eax     # 0x49a34
testl %eax, %eax
je 0x23f26
cmpl $0x1, %eax
je 0x23f35
cmpl $0x3, %eax
jne 0x23f68
leaq 0x2681c(%rip), %rax     # 0x4a740
jmp 0x23f2d
leaq 0x2680b(%rip), %rax     # 0x4a738
movq (%rax), %rax
movl %ebp, %ecx
movl (%rax,%rcx,4), %ebp
movslq %ebp, %rax
leaq 0xf2f1(%rip), %rdx      # 0x33230
leaq 0xf32a(%rip), %rcx      # 0x33270
movb (%rax,%rcx), %cl
pushq $0x7
popq %rsi
shll %cl, %esi
movzbl (%rax,%rdx), %eax
movq 0x267f7(%rip), %rdx     # 0x4a750
notl %esi
andl $0x7, %ebx
shll %cl, %ebx
andl (%rdx,%rax,4), %esi
orl %esi, %ebx
movl %ebx, (%rdx,%rax,4)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: digitalRead
int digitalRead (int pin)
{
  char c ;
  struct wiringPiNodeStruct *node = wiringPiNodes ;
  if ((pin & PI_GPIO_MASK) == 0)		// On-Board Pin
  {
    /**/ if (wiringPiMode == WPI_MODE_GPIO_SYS)	// Sys mode
    {
      if (sysFds [pin] == -1)
	return LOW ;

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

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpl $0x3f, %edi
ja 0x24338
movl 0x25721(%rip), %ecx     # 0x49a34
xorl %eax, %eax
cmpq $0x3, %rcx
ja 0x243c2
leaq 0xeec6(%rip), %rdx      # 0x331ec
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x26402(%rip), %rax     # 0x4a738
jmp 0x2439a
movl %ebx, %edi
callq 0x1f9a0
testq %rax, %rax
je 0x24356
movq 0x30(%rax), %rcx
movq %rax, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
xorl %eax, %eax
jmp 0x243c2
movl %ebx, %ebx
leaq 0x256dd(%rip), %r14     # 0x49a40
movl (%r14,%rbx,4), %edi
cmpl $-0x1, %edi
je 0x243c2
xorl %esi, %esi
xorl %edx, %edx
callq 0x1ffb0
movl (%r14,%rbx,4), %edi
leaq 0x7(%rsp), %rbx
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x1fc60
xorl %eax, %eax
cmpb $0x30, (%rbx)
setne %al
jmp 0x243c2
leaq 0x263a6(%rip), %rax     # 0x4a740
movq (%rax), %rax
movl %ebx, %ecx
movl (%rax,%rcx,4), %ebx
movq 0x263a7(%rip), %rax     # 0x4a750
movslq %ebx, %rcx
leaq 0xefbd(%rip), %rdx      # 0x33370
movzbl (%rcx,%rdx), %edx
movl (%rax,%rdx,4), %edx
xorl %eax, %eax
btl %ecx, %edx
setb %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/wiringPi.c
// Function: digitalWrite
void digitalWrite (int pin, int value)
{
  struct wiringPiNodeStruct *node = wiringPiNodes ;

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

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

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
cmpl $0x3f, %edi
ja 0x243ff
movl 0x25658(%rip), %eax     # 0x49a34
cmpq $0x3, %rax
ja 0x24477
leaq 0xee0f(%rip), %rcx      # 0x331fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2633b(%rip), %rax     # 0x4a738
jmp 0x24443
movl %ebp, %edi
callq 0x1f9a0
testq %rax, %rax
je 0x24477
movq 0x38(%rax), %rcx
movq %rax, %rdi
movl %ebp, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rcx
movl %ebp, %eax
leaq 0x25619(%rip), %rcx     # 0x49a40
movl (%rcx,%rax,4), %edi
cmpl $-0x1, %edi
je 0x24477
testl %ebx, %ebx
je 0x2447e
leaq 0xf68e(%rip), %rsi      # 0x33ac8
jmp 0x24485
leaq 0x262fd(%rip), %rax     # 0x4a740
movq (%rax), %rax
movl %ebp, %ecx
movl (%rax,%rcx,4), %ebp
pushq $0x1
popq %rax
movl %ebp, %ecx
shll %cl, %eax
movq 0x262f7(%rip), %rcx     # 0x4a750
movslq %ebp, %rdx
testl %ebx, %ebx
je 0x24469
leaq 0xef89(%rip), %rsi      # 0x333f0
jmp 0x24470
leaq 0xef40(%rip), %rsi      # 0x333b0
movzbl (%rdx,%rsi), %edx
movl %eax, (%rcx,%rdx,4)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xf640(%rip), %rsi      # 0x33ac5
pushq $0x2
popq %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1f240
// File: /workspace/github_cpp_makefile_star2_O2/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 0xf62a(%rip), %rdi      # 0x33acb
callq 0x23f6f
cmpl $0x3f, %ebp
ja 0x244c8
movl 0x25583(%rip), %eax     # 0x49a34
testl %eax, %eax
je 0x244e7
cmpl $0x1, %eax
je 0x244f6
cmpl $0x3, %eax
jne 0x2451a
leaq 0x2627a(%rip), %rax     # 0x4a740
jmp 0x244ee
movl %ebp, %edi
callq 0x1f9a0
testq %rax, %rax
je 0x2451a
movq 0x40(%rax), %rcx
movq %rax, %rdi
movl %ebp, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rcx
leaq 0x2624a(%rip), %rax     # 0x4a738
movq (%rax), %rax
movl %ebp, %ecx
movl (%rax,%rcx,4), %ebp
leaq 0xf5ce(%rip), %rdi      # 0x33acb
callq 0x241b7
movq 0x2624f(%rip), %rax     # 0x4a758
movslq %ebp, %rcx
leaq 0xef9d(%rip), %rdx      # 0x334b0
movzbl (%rcx,%rdx), %ecx
movl %ebx, (%rax,%rcx,4)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xf55d(%rip), %rdi      # 0x33ad4
callq 0x23f6f
testl %ebp, %ebp
je 0x2459c
movl $0x927c0, %eax          # imm = 0x927C0
xorl %edx, %edx
idivl %ebp
movl %eax, %edi
callq 0x1f4b0
pushq $0x2
popq %rcx
movl %ebp, %eax
cltd
idivl %ecx
movl %eax, %esi
jmp 0x2459e
xorl %esi, %esi
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1f280
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x2547c(%rip)     # 0x49a34
jne 0x245e1
pushq $0x1
popq %rbp
xorl %r14d, %r14d
cmpq $0x8, %r14
je 0x24632
movq 0x2616b(%rip), %rax     # 0x4a738
movl (%rax,%r14,4), %edi
movl %ebp, %esi
andl %ebx, %esi
callq 0x200b0
addl %ebp, %ebp
incq %r14
jmp 0x245c0
pushq $0x1
popq %rax
xorl %edx, %edx
movq 0x2614b(%rip), %rdi     # 0x4a738
xorl %r9d, %r9d
xorl %esi, %esi
xorl %r8d, %r8d
movl %eax, %r10d
cmpq $0x8, %r9
je 0x24624
movl %r10d, %r11d
andl %ebx, %r11d
movb (%rdi,%r9,4), %cl
movl %eax, %ebp
shll %cl, %ebp
testl %r11d, %r11d
cmovnel %ebp, %r11d
cmovnel %edx, %ebp
orl %r11d, %esi
orl %ebp, %r8d
addl %r10d, %r10d
incq %r9
jmp 0x245f8
movq 0x26125(%rip), %rax     # 0x4a750
movl %r8d, 0x28(%rax)
movl %esi, 0x1c(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x253f2(%rip)     # 0x49a34
jne 0x24668
xorl %r14d, %r14d
xorl %ebx, %ebx
cmpq $0x8, %r14
je 0x24697
movq 0x260e2(%rip), %rax     # 0x4a738
movl (%rax,%r14,4), %edi
callq 0x1f270
addl %ebx, %ebx
orl %eax, %ebx
incq %r14
jmp 0x24649
movq 0x260e1(%rip), %rax     # 0x4a750
movl 0x34(%rax), %eax
xorl %ecx, %ecx
movq 0x260bd(%rip), %rdx     # 0x4a738
xorl %ebx, %ebx
cmpq $0x8, %rcx
je 0x24697
movl (%rdx,%rcx,4), %esi
xorl %edi, %edi
btl %esi, %eax
setb %dil
leal (%rdi,%rbx,2), %ebx
incq %rcx
jmp 0x2467d
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x25386(%rip)     # 0x49a34
jne 0x246cf
pushq $0x14
popq %rbp
pushq $0x1
popq %r14
cmpl $0x1c, %ebp
je 0x246ea
movl %r14d, %esi
andl %ebx, %esi
movl %ebp, %edi
callq 0x200b0
addl %r14d, %r14d
incl %ebp
jmp 0x246b7
movzbl %bl, %eax
shll $0x14, %eax
movl %eax, %ecx
xorl $0xff00000, %ecx        # imm = 0xFF00000
movq 0x2606c(%rip), %rdx     # 0x4a750
movl %ecx, 0x28(%rdx)
movl %eax, 0x1c(%rdx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x2533b(%rip)     # 0x49a34
jne 0x24714
xorl %ebx, %ebx
pushq $0x14
popq %rbp
cmpl $0x1c, %ebp
je 0x24724
movl %ebp, %edi
callq 0x1f270
addl %ebx, %ebx
orl %eax, %ebx
incl %ebp
jmp 0x24700
movq 0x26035(%rip), %rax     # 0x4a750
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_O2/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 0x252ff(%rip), %eax     # 0x49a34
testl %eax, %eax
je 0x24747
cmpl $0x3, %eax
jne 0x24757
leaq 0x25ffb(%rip), %rax     # 0x4a740
jmp 0x2474e
leaq 0x25fea(%rip), %rax     # 0x4a738
movq (%rax), %rax
movslq %edi, %rcx
movl (%rax,%rcx,4), %edi
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movslq %edi, %rax
leaq 0x252d9(%rip), %rcx     # 0x49a40
movl (%rcx,%rax,4), %ebx
cmpl $-0x1, %ebx
je 0x247a6
leaq 0x10(%rsp), %rdi
movl %ebx, (%rdi)
movw $0xa, 0x4(%rdi)
pushq $0x1
popq %rsi
callq 0x1fcb0
movl %eax, %ebp
testl %eax, %eax
jle 0x247a9
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1ffb0
leaq 0xf(%rsp), %rsi
pushq $0x1
popq %rdx
movl %ebx, %edi
callq 0x1fc60
jmp 0x247a9
pushq $-0x2
popq %rbp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
pushq $0x37
popq %rdi
callq 0x1f140
movslq 0x250ed(%rip), %rbx     # 0x49b40
movl $0xffffffff, 0x250e3(%rip) # imm = 0xFFFFFFFF
pushq $-0x1
popq %rbp
leaq 0x25d19(%rip), %r14     # 0x4a780
movl %ebx, %edi
movl %ebp, %esi
callq 0x1f170
testl %eax, %eax
jle 0x24a67
callq *(%r14,%rbx,8)
jmp 0x24a67
// File: /workspace/github_cpp_makefile_star2_O2/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
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divl %ecx
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
imull $0xf4240, %edx, %eax    # imm = 0xF4240
movq %rax, 0x8(%rdi)
leaq 0x8(%rsp), %rsi
callq 0x1f200
addq $0x28, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebp
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1fd80
movl $0xf4240, %ecx          # imm = 0xF4240
movl %ebp, %eax
xorl %edx, %edx
divl %ecx
movq (%rbx), %rcx
movq 0x8(%rbx), %rsi
leaq (%rsi,%rdx), %rdi
xorl %r14d, %r14d
cmpq $0xf4240, %rdi          # imm = 0xF4240
leaq -0xf4240(%rsi,%rdx), %r15
cmovlq %rdi, %r15
setge %r14b
addq %rcx, %r14
addq %rax, %r14
xorl %eax, %eax
cmpq %r15, %rsi
setl %al
xorl %edx, %edx
cmpq %r14, %rcx
setl %dl
cmovel %eax, %edx
cmpb $0x1, %dl
jne 0x24b29
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1fd80
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rsi
jmp 0x24afb
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1feb0
movq 0x23f9c(%rip), %rax     # 0x48f60
cmpl $0x0, (%rax)
je 0x24fd5
leaq 0xef5c(%rip), %rdi      # 0x33f2c
callq 0x1fd00
movl $0x1, 0x24a55(%rip)     # 0x49a34
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1feb0
movq 0x23f70(%rip), %rax     # 0x48f60
cmpl $0x0, (%rax)
je 0x25001
leaq 0xef53(%rip), %rdi      # 0x33f4f
callq 0x1fd00
movl $0x3, 0x24a29(%rip)     # 0x49a34
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x259a2(%rip)     # 0x4a9b8
jne 0x25124
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movb $0x1, 0x25986(%rip)     # 0x4a9b8
leaq 0xebf3(%rip), %rdi      # 0x33c2c
callq 0x1f9f0
testq %rax, %rax
je 0x25050
movq 0x23f16(%rip), %rax     # 0x48f60
movl $0x1, (%rax)
leaq 0xebe4(%rip), %rdi      # 0x33c3b
callq 0x1f9f0
testq %rax, %rax
je 0x2506e
movq 0x23f48(%rip), %rax     # 0x48fb0
movl $0x1, (%rax)
movq 0x23eeb(%rip), %rax     # 0x48f60
cmpl $0x0, (%rax)
je 0x25086
leaq 0xeef1(%rip), %rdi      # 0x33f72
callq 0x1fd00
callq 0x20090
cmpl $0x1, %eax
leaq 0x24abb(%rip), %rax     # 0x49b50
leaq 0x24cb4(%rip), %rcx     # 0x49d50
cmoveq %rax, %rcx
leaq 0x24ba9(%rip), %rax     # 0x49c50
leaq 0x24da2(%rip), %rdx     # 0x49e50
cmoveq %rax, %rdx
movq %rcx, 0x2567f(%rip)     # 0x4a738
movq %rdx, 0x25680(%rip)     # 0x4a740
leaq 0x24979(%rip), %r12     # 0x49a40
leaq 0xeb1d(%rip), %rbx      # 0x33beb
movq %rsp, %r14
pushq $0x2
popq %rbp
xorl %r15d, %r15d
cmpq $0x40, %r15
je 0x25106
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x1f0b0
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x1f540
movl %eax, (%r12)
incq %r15
addq $0x4, %r12
jmp 0x250d7
callq 0x24f5a
movl $0x2, 0x2491f(%rip)     # 0x49a34
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x23d65(%rip), %rax     # 0x48f48
movzwl (%rax), %r8d
pushq $0x2
popq %rsi
pushq $0x6
popq %rdx
callq 0x1f870
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_O2/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 0x23392(%rip), %rax     # 0x48f48
movzwl (%rax), %r8d
pushq $0x16
popq %rdx
movq %rsp, %r14
movl $0xaa, %esi
movq %r14, %rcx
callq 0x1f870
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_O2/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 %rbx
movq %rdi, %rbx
movq %rbx, %rdi
callq 0x1f8f0
testb $0x20, %al
jne 0x25cda
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rcx
movq 0x23254(%rip), %rax     # 0x48f48
movzwl (%rax), %r8d
pushq $0x2
popq %rdx
movl $0xf6, %esi
callq 0x1f870
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
movq %rbx, %rdi
callq 0x1f8f0
testb $0x20, %al
jne 0x25d14
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rcx
movq 0x2321a(%rip), %rax     # 0x48f48
movzwl (%rax), %r8d
pushq $0x3
popq %rdx
movl $0xf6, %esi
callq 0x1f870
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
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
callq 0x1f260
testw %ax, %ax
je 0x25e1f
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 0xe17b(%rip), %xmm0     # 0x33f98
jmp 0x25e27
movss 0xe16d(%rip), %xmm0     # 0x33f94
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
callq 0x1f300
testl %eax, %eax
je 0x25f02
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 0x25f06
addl %edx, %edx
movl %edx, %eax
xorl %edx, %edx
divl %esi
jmp 0x25f0e
xorl %ecx, %ecx
jmp 0x25f35
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
addl %edx, %ecx
addl $0xecf, %ecx            # imm = 0xECF
sarl $0x4, %ecx
addl %eax, %ecx
movl %ecx, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x22f1e(%rip), %rax     # 0x48f48
movzwl (%rax), %ecx
xorl %esi, %esi
callq 0x1f9b0
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
imull $0xa, %eax, %eax
addb %cl, %al
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x22e16(%rip), %rax     # 0x48f48
movzwl (%rax), %ecx
pushq $0x2
popq %rsi
callq 0x1f9b0
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 0x2617d
shrb $0x4, %al
andb $0x3, %al
movzbl %al, %eax
imull $0xa, %eax, %eax
addb %cl, %al
leal -0xc(%rax), %ecx
testb %al, %al
movzbl %al, %eax
pushq $0xc
popq %rdx
cmovnel %eax, %edx
cmpb $0xd, %al
movzbl %cl, %eax
cmovbl %edx, %eax
jmp 0x26187
shlb $0x3, %al
sarb $0x7, %al
andb $0xa, %al
addb %cl, %al
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x26192
retq
cmpb $0x1, 0x2(%rdi)
jne 0x261c2
testb %dl, %dl
setne %al
shlb $0x5, %al
movzbl %sil, %edx
subb $0xa, %sil
setae %r8b
movzbl %sil, %ecx
cmovbl %edx, %ecx
shlb $0x4, %r8b
orb %al, %r8b
orb %r8b, %cl
orb $0x40, %cl
jmp 0x261eb
leal 0xc(%rsi), %eax
testb %dl, %dl
movzbl %sil, %ecx
movzbl %al, %eax
cmovel %ecx, %eax
cmpb $0x18, %al
pushq $0xc
popq %rcx
cmovnel %eax, %ecx
movzbw %cl, %cx
movb $0xa, %dl
movl %ecx, %eax
divb %dl
movzbl %al, %eax
imull $0x6, %eax, %eax
addb %al, %cl
movzbl (%rdi), %edi
movzbl %cl, %edx
pushq $0x2
popq %rsi
jmp 0x1f7f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x22d3c(%rip), %rax     # 0x48f48
movzwl (%rax), %ecx
pushq $0x2
popq %rsi
callq 0x1f9b0
movzbl 0x1(%rbx), %eax
movl %eax, %ecx
andb $0x40, %cl
movl %ecx, %edx
shrb $0x6, %dl
movb %dl, 0x2(%rbx)
testb %cl, %cl
jne 0x26240
movl %eax, %ecx
andb $0xf, %cl
shrb $0x4, %al
andb $0x3, %al
movzbl %al, %eax
imull $0xa, %eax, %eax
addb %cl, %al
jmp 0x26272
movl %eax, %edx
andb $0xf, %dl
movl %eax, %esi
andl $0x10, %esi
pushq $0xa
popq %rcx
cmovel %esi, %ecx
addb %dl, %cl
testb $0x20, %al
jne 0x26263
xorl %edx, %edx
cmpb $0xc, %cl
movzbl %cl, %eax
cmovel %edx, %eax
jmp 0x26272
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_O2/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 0x2627b
retq
cmpb $0x1, 0x2(%rdi)
jne 0x262be
cmpb $0xc, %sil
setae %dl
leal -0xc(%rsi), %eax
testb %sil, %sil
movzbl %sil, %ecx
pushq $0xc
popq %r8
cmovnel %ecx, %r8d
cmpb $0xd, %sil
movzbl %al, %eax
cmovbl %r8d, %eax
movzbl %al, %eax
movb $0xa, %cl
divb %cl
shlb $0x5, %dl
movzbl %ah, %ecx
shlb $0x4, %al
addb %dl, %cl
addb %al, %cl
addb $0x40, %cl
jmp 0x262cf
movzbl %sil, %eax
movb $0xa, %cl
divb %cl
movzbl %al, %eax
imull $0x6, %eax, %ecx
addb %sil, %cl
movzbl (%rdi), %edi
movzbl %cl, %edx
pushq $0x2
popq %rsi
jmp 0x1f7f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpw $0x7d0, %si             # imm = 0x7D0
jae 0x2640c
retq
leal -0x7d0(%rsi), %eax
movw $0xa, %cx
xorl %edx, %edx
divw %cx
imull $0x6, %eax, %eax
addl %esi, %eax
addl $0xfffff830, %eax       # imm = 0xFFFFF830
movzbl (%rdi), %edi
movzbl %al, %edx
pushq $0x6
popq %rsi
jmp 0x1f7f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
callq 0x1f3f0
movb %al, (%r12)
movq %r13, %rdi
callq 0x1fbd0
movb %al, (%r15)
movq %r13, %rdi
callq 0x1f060
movb %al, (%r14)
movq %r13, %rdi
callq 0x1f330
movb %al, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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, %ebp
movl %esi, %r14d
movq %rdi, %r15
movl %ecx, %esi
callq 0x1f2b0
movq %r15, %rdi
movl %ebp, %esi
callq 0x1f480
movq %r15, %rdi
movl %r14d, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1f520
// File: /workspace/github_cpp_makefile_star2_O2/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, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl %ecx, %esi
callq 0x1f2b0
movq %r14, %rdi
movl %ebx, %esi
callq 0x1f480
movq %r14, %rdi
movl %ebp, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x20080
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %r15
shrq $0x20, %r15
shrq $0x28, %rsi
movl $0xff, %ebp
andl %ebp, %esi
callq 0x1f2b0
andl %ebp, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x1f480
movl %ebx, %esi
shrl $0x18, %esi
movq %r14, %rdi
callq 0x20080
movl %ebx, %esi
shrl $0x10, %esi
andl %ebp, %esi
movq %r14, %rdi
callq 0x1fb20
movl %ebx, %esi
shrl $0x8, %esi
andl %ebp, %esi
movq %r14, %rdi
callq 0x1fa10
andl %ebp, %ebx
addl $0x7d0, %ebx            # imm = 0x7D0
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1f360
nop