// File: 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:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl %esi, 0x10(%rsp)
cmpl $0x40, 0x14(%rsp)
jge 0x2bafa
movl 0x14(%rsp), %edx
movl $0x1, %edi
leaq 0x1fb8b(%rip), %rsi     # 0x4b67e
movb $0x0, %al
callq 0x225a0
movl 0x14(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl 0x14(%rsp), %ecx
addl 0x10(%rsp), %ecx
cmpl %ecx, %eax
jge 0x2bb47
movl 0xc(%rsp), %edi
callq 0x22cd0
cmpq $0x0, %rax
je 0x2bb38
movl 0xc(%rsp), %edx
movl $0x1, %edi
leaq 0x1fb75(%rip), %rsi     # 0x4b6a6
movb $0x0, %al
callq 0x225a0
jmp 0x2bb3a
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x2bb02
movl $0x60, %edi
movl $0x1, %esi
callq 0x22730
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x2bb83
callq 0x22050
movl (%rax), %edi
callq 0x222f0
movq %rax, %rdx
movl $0x1, %edi
leaq 0x1fb65(%rip), %rsi     # 0x4b6e1
movb $0x0, %al
callq 0x225a0
movl 0x14(%rsp), %ecx
movq (%rsp), %rax
movl %ecx, (%rax)
movl 0x14(%rsp), %ecx
addl 0x10(%rsp), %ecx
subl $0x1, %ecx
movq (%rsp), %rax
movl %ecx, 0x4(%rax)
movq (%rsp), %rax
leaq 0x96(%rip), %rcx        # 0x2bc40
movq %rcx, 0x20(%rax)
movq (%rsp), %rax
leaq 0x97(%rip), %rcx        # 0x2bc50
movq %rcx, 0x28(%rax)
movq (%rsp), %rax
leaq 0x98(%rip), %rcx        # 0x2bc60
movq %rcx, 0x30(%rax)
movq (%rsp), %rax
leaq 0x99(%rip), %rcx        # 0x2bc70
movq %rcx, 0x38(%rax)
movq (%rsp), %rax
leaq 0x9a(%rip), %rcx        # 0x2bc80
movq %rcx, 0x40(%rax)
movq (%rsp), %rax
leaq 0x9b(%rip), %rcx        # 0x2bc90
movq %rcx, 0x48(%rax)
movq (%rsp), %rax
leaq 0x9c(%rip), %rcx        # 0x2bca0
movq %rcx, 0x50(%rax)
movq 0x303a1(%rip), %rax     # 0x5bfb0
movq (%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x58(%rax)
movq (%rsp), %rcx
movq 0x3038b(%rip), %rax     # 0x5bfb0
movq %rcx, (%rax)
movq (%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)