LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/n2kd/gps_ais.c
// Function: convert2kCoordinateToNMEA0183
static double convert2kCoordinateToNMEA0183(const char *coordinateString, const char *hemispheres, char *hemisphere)
{
  double coordinate = strtod(coordinateString, 0);
  double degrees;
  double result;

  if (coordinate < 0)
  {
    *hemisphere = hemispheres[1];
    coordinate  = coordinate * -1.;
  }
  else
  {
    *hemisphere = hemispheres[0];
  }

  degrees = floor(coordinate);
  result  = degrees * 100 + (coordinate - degrees) * 60;
  return result;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
xorl %esi, %esi
callq 0x20a0
movapd 0x47f6(%rip), %xmm1     # 0x9090
xorpd %xmm0, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
maxsd %xmm0, %xmm1
movapd %xmm1, (%rsp)
movb (%r14,%rax), %al
movb %al, (%rbx)
movapd %xmm1, %xmm0
callq 0x22f0
movapd (%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x47a0(%rip), %xmm1     # 0x9070
mulsd 0x47a0(%rip), %xmm0     # 0x9078
addsd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/n2kd/gps_ais.c
// Function: aisETA
long int aisETA(const char *msg)
{
  char         jstr[11];
  unsigned int month = 0, day = 0, hour = 24, minute = 60;

  // Get ais values from json (sscanf not used as it fails for som values)
  if (getJSONValue(msg, "ETA Date", jstr, sizeof(jstr)))
  {
    month = 10 * ((unsigned char) jstr[5] - '0') + ((unsigned char) jstr[6] - '0');
    day   = 10 * ((unsigned char) jstr[8] - '0') + ((unsigned char) jstr[9] - '0');
    if (month > 12)
      month = 0;
    if (day > 31)
      day = 0;
  }

  if (getJSONValue(msg, "ETA Time", jstr, sizeof(jstr)))
  {
    hour   = 10 * ((unsigned char) jstr[0] - '0') + ((unsigned char) jstr[1] - '0');
    minute = 10 * ((unsigned char) jstr[3] - '0') + ((unsigned char) jstr[4] - '0');
    if (hour > 24)
      hour = 24;
    if (minute > 60)
      minute = 60;
  }

  // Pack into ais integer
  return (month << 16) + (day << 11) + (hour << 6) + minute;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0x493d(%rip), %rsi      # 0x9233
leaq 0x5(%rsp), %rdx
pushq $0xb
popq %rcx
callq 0x7415
xorl %ebp, %ebp
movl $0x0, %ebx
testb %al, %al
je 0x494d
movzbl 0xa(%rsp), %eax
imull $0xa, %eax, %eax
movzbl 0xb(%rsp), %ecx
movl $0xfffffdf0, %edx       # imm = 0xFFFFFDF0
addl %edx, %ecx
addl %eax, %ecx
movzbl 0xd(%rsp), %eax
imull $0xa, %eax, %eax
movzbl 0xe(%rsp), %esi
addl %edx, %esi
addl %eax, %esi
movl %ecx, %ebp
shll $0x10, %ebp
movl %esi, %ebx
shll $0xb, %ebx
xorl %eax, %eax
cmpl $0xd, %ecx
cmovael %eax, %ebp
cmpl $0x20, %esi
cmovael %eax, %ebx
leaq 0x48e8(%rip), %rsi      # 0x923c
leaq 0x5(%rsp), %rdx
pushq $0xb
popq %rcx
movq %r14, %rdi
callq 0x7415
testb %al, %al
je 0x49a6
movzbl 0x5(%rsp), %eax
imull $0xa, %eax, %eax
movzbl 0x6(%rsp), %ecx
movl $0xfffffdf0, %edx       # imm = 0xFFFFFDF0
addl %edx, %ecx
addl %eax, %ecx
movzbl 0x8(%rsp), %eax
imull $0xa, %eax, %eax
movzbl 0x9(%rsp), %esi
addl %edx, %esi
addl %eax, %esi
cmpl $0x18, %ecx
pushq $0x18
popq %rax
cmovbl %ecx, %eax
cmpl $0x3c, %esi
pushq $0x3c
popq %rcx
cmovbl %esi, %ecx
shll $0x6, %eax
jmp 0x49ae
pushq $0x3c
popq %rcx
movl $0x600, %eax            # imm = 0x600
addl %ecx, %eax
addl %ebp, %ebx
addl %eax, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/n2kd/gps_ais.c
// Function: aisAtoNName
char *aisAtoNName(const char *msg, bool extended, int *len)
{
  // The name splits in two parts, name and name extension.
  static char jsonString[35];
  int         i;

  // The extended name part is of variable length. Since the len byte has
  // been dropped, we have to rely on NULL termination of the string in
  // the extended part. First 20 chars ordinary name
  for (i = 20; i < 35; i++)
  {
    jsonString[i] = '\0';
  }

  if (!getJSONValue(msg, "AtoN Name", jsonString, sizeof(jsonString)))
    jsonString[0] = '\0';
  jsonString[34] = '\0';

  if (extended)
  {
    char *eName = (char *) jsonString + 20;
    for (i = 0; i <= 14; i++)
    {
      if (*(eName + i) == '\0')
        break;
    }
    // Each ais char is 6 bit. The length shall be padded to a multiple of 8 bits
    i *= 6;
    if (i % 8)
      i += 8 - i % 8;
    *len = i;
    return eName;
  }
  else
  {
    jsonString[20] = '\0';
  }
  return jsonString;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
pushq $-0xf
popq %rax
leaq 0x20a49bd(%rip), %rcx   # 0x20a9390
testq %rax, %rax
je 0x49e2
movb $0x0, 0x23(%rax,%rcx)
incq %rax
jmp 0x49d3
leaq 0x485c(%rip), %rsi      # 0x9245
leaq 0x20a49a0(%rip), %r14   # 0x20a9390
pushq $0x23
popq %rcx
movq %r14, %rdx
callq 0x7415
testb %al, %al
jne 0x4a06
movb $0x0, 0x20a498a(%rip)   # 0x20a9390
movb $0x0, 0x20a49a5(%rip)   # 0x20a93b2
testb %bpl, %bpl
je 0x4a32
leaq 0x20a498b(%rip), %rdx   # 0x20a93a4
xorl %ecx, %ecx
pushq $0x5a
popq %rax
cmpq $0x5a, %rcx
je 0x4a3d
cmpb $0x0, (%rdx)
je 0x4a3b
addq $0x6, %rcx
incq %rdx
jmp 0x4a1e
movb $0x0, 0x20a496b(%rip)   # 0x20a93a4
jmp 0x4a56
movl %ecx, %eax
movl %eax, %ecx
andl $0x7ffffff8, %ecx       # imm = 0x7FFFFFF8
addl $0x8, %ecx
testb $0x6, %al
cmovel %eax, %ecx
movl %ecx, (%rbx)
leaq 0x20a494e(%rip), %r14   # 0x20a93a4
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/n2kd/gps_ais.c
// Function: aisEnum
static int aisEnum(const char *msg, const char *fieldName)
{
  int64_t n;

  if (getJSONInt64(msg, fieldName, &n))
  {
    logDebug("getJSONInt64(msg, '%s') = %" PRId64 "\n", fieldName, n);
    return (int) n;
  }
  logDebug("getJSONInt64(msg, '%s') = no result -> -1\n", fieldName);
  return -1;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
leaq 0x8(%rsp), %rdx
callq 0x77fd
testb %al, %al
je 0x5c6c
movq 0x8(%rsp), %rdx
leaq 0x3812(%rip), %rdi      # 0x946e
movq %rbx, %rsi
xorl %eax, %eax
callq 0x6d78
movl 0x8(%rsp), %eax
jmp 0x5c80
leaq 0x381a(%rip), %rdi      # 0x948d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x6d78
pushq $-0x1
popq %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/n2kd/gps_ais.c
// Function: addAisInt
static int addAisInt(long int value, int len, aisVector *payload)
{
  int           i, k;
  unsigned char nibble;

  // Break if overflow, does not treat signed positive value properly
  if (value >= (long int) (1 << len) || value < -(long int) (1 << (len - 1)))
  {
    return 0;
  }

  // AIS uses big endian. Thus most significant bits shall be stored first.
  while (len > 0)
  {
    i = payload->pos / 8;
    k = 8 - payload->pos % 8;
    payload->bitVector[i] &= ~(unsigned char) ((1 << k) - 1);
    if (len >= k)
    {
      nibble = ((1 << k) - 1) & (value >> (len - k));
      payload->pos += k;
    }
    else
    {
      nibble = ((1 << k) - 1) & (value << (k - len));
      payload->pos += len;
    }
    payload->bitVector[i] |= nibble;
    len -= k;
  }
  return 1;
}

// Assembly:
movq %rdx, %r8
movl $0x1, %eax
movl %eax, %edx
movl %esi, %ecx
shll %cl, %edx
cmpq %rdi, %rdx
jle 0x5d16
leal -0x1(%rsi), %ecx
shll %cl, %eax
negq %rax
cmpq %rdi, %rax
jg 0x5d16
pushq %r14
pushq %rbx
movl $0x8, %r10d
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
testl %esi, %esi
jle 0x5d13
movl 0xe4(%r8), %eax
cltd
idivl %r10d
movl %r10d, %r9d
subl %edx, %r9d
movl %r11d, %ebx
movl %r9d, %ecx
shll %cl, %ebx
cltq
andb %bl, (%r8,%rax)
movl %esi, %edx
subl %r9d, %edx
jae 0x5cf0
subl %esi, %r9d
movq %rdi, %r14
movl %r9d, %ecx
shlq %cl, %r14
movl %esi, %r9d
jmp 0x5cf8
movq %rdi, %r14
movl %edx, %ecx
sarq %cl, %r14
notl %ebx
andl %ebx, %r14d
addl 0xe4(%r8), %r9d
movl %r9d, 0xe4(%r8)
orb %r14b, (%r8,%rax)
movl %edx, %esi
jmp 0x5cb5
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/n2kd/gps_ais.c
// Function: addAisString
static int addAisString(char *string, int len, aisVector *payload)
{
  int           i, k;
  unsigned char nextchar;

  if (string == NULL)
  {
    return 0;
  }

  while (len >= 6)
  {
    // Encode current char to 6-bit ascii
    // 32 -> 63 => 32 -> 63, 64 -> 95 => 0 -> 31
    nextchar = *string;
    if (nextchar == '\0')
    {
      nextchar = 0;
    }
    else if (nextchar < 32 || nextchar > 95)
    {
      nextchar = 32;
    }
    else if (nextchar >= 64)
    {
      nextchar -= 64;
    }
    // Add 6-bit ascii char to payload
    i = payload->pos / 8;
    k = 8 - payload->pos % 8;
    payload->bitVector[i] &= ~(unsigned char) ((1 << k) - 1);
    if (k >= 6)
    {
      payload->bitVector[i] |= ((1 << k) - 1) & (nextchar << (k - 6));
    }
    else
    {
      payload->bitVector[i] |= ((1 << k) - 1) & (nextchar >> (6 - k));
      payload->bitVector[i + 1] = nextchar << (2 + k);
    }
    payload->pos += 6;
    len -= 6;
    if (*string != '\0')
    {
      string++;
    }
  }
  // A string can be padded with extra bits. These should reasonably be cleared
  payload->bitVector[(payload->pos / 8) + 1] = 0;
  payload->pos += len;
  return 1;
}

// Assembly:
testq %rdi, %rdi
je 0x5ffb
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r8
movl $0x8, %r9d
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movl $0x20, %r11d
cmpl $0x6, %esi
jl 0x5fdb
movb (%rdi), %al
testb %al, %al
je 0x5f76
leal -0x60(%rax), %ecx
movl %r11d, %ebx
cmpb $-0x40, %cl
jb 0x5f78
leal -0x40(%rax), %ecx
cmpb $0x40, %al
movzbl %al, %eax
movzbl %cl, %ecx
cmovbl %eax, %ecx
movzbl %cl, %ebx
jmp 0x5f78
xorl %ebx, %ebx
movl 0xe4(%r8), %eax
cltd
idivl %r9d
movb $0x8, %cl
subb %dl, %cl
movl %r10d, %ebp
shll %cl, %ebp
cltq
movb (%r8,%rax), %r14b
andb %bpl, %r14b
cmpl $0x2, %edx
jg 0x5fa2
movb $0x2, %cl
subb %dl, %cl
shll %cl, %ebx
jmp 0x5fb9
leal -0x2(%rdx), %ecx
movl %ebx, %r15d
shrl %cl, %r15d
movb $0xa, %cl
subb %dl, %cl
shll %cl, %ebx
movb %bl, 0x1(%rax,%r8)
movl %r15d, %ebx
notl %ebp
andl %ebx, %ebp
orb %bpl, %r14b
movb %r14b, (%r8,%rax)
addl $0x6, 0xe4(%r8)
addl $-0x6, %esi
cmpb $0x1, (%rdi)
sbbq $-0x1, %rdi
jmp 0x5f49
movl 0xe4(%r8), %eax
cltd
idivl %r9d
cltq
movb $0x0, 0x1(%rax,%r8)
addl %esi, 0xe4(%r8)
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/n2kd/gps_ais.c
// Function: aisShipDimensions
static long int aisShipDimensions(const char *msg, bool ship)
{
  long int length, beam, refBow, refStarboard, toStern, toPort;

  // Fetch pgn values
  if (ship)
  {
    length       = aisFloat(msg, "Length");
    beam         = aisFloat(msg, "Beam");
    refBow       = aisFloat(msg, "Position reference from Bow");
    refStarboard = aisFloat(msg, "Position reference from Starboard");
  }
  else
  {
    length       = aisFloat(msg, "Length/Diameter");
    beam         = aisFloat(msg, "Beam/Diameter");
    refBow       = aisFloat(msg, "Position Reference from True North Facing Edge");
    refStarboard = aisFloat(msg, "Position Reference from Starboard Edge");
  }

  // Calculate sentence values
  toStern = (length - refBow < 5110) ? length - refBow : 5110;
  toPort  = (beam - refStarboard < 630) ? beam - refStarboard : 630;

  // Pack values into 30 bits of the long integer
  return (((refBow + 5) / 10) << 21) + (((toStern + 5) / 10) << 12) + (((toPort + 5) / 10) << 6) + ((refStarboard + 5) / 10);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r15
leaq 0x348c(%rip), %rcx      # 0x94b8
leaq 0x34cf(%rip), %rax      # 0x9502
testl %esi, %esi
cmovneq %rcx, %rax
leaq 0x347f(%rip), %rcx      # 0x94bf
leaq 0x34cb(%rip), %rbx      # 0x9512
cmovneq %rcx, %rbx
leaq 0x3494(%rip), %rcx      # 0x94e6
leaq 0x34ee(%rip), %r12      # 0x9547
cmovneq %rcx, %r12
leaq 0x3460(%rip), %rcx      # 0x94c4
leaq 0x34b5(%rip), %r13      # 0x9520
cmovneq %rcx, %r13
movq %rax, %rsi
callq 0x5da8
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5da8
movq %rax, %rbx
movq %r15, %rdi
movq %r12, %rsi
callq 0x5da8
movq %rax, %r12
movq %r15, %rdi
movq %r13, %rsi
callq 0x5da8
movq %rax, %rcx
subq %r12, %r14
movl $0x13f6, %eax           # imm = 0x13F6
cmpq %rax, %r14
cmovgeq %rax, %r14
subq %rcx, %rbx
movl $0x276, %eax            # imm = 0x276
cmpq %rax, %rbx
cmovgeq %rax, %rbx
addq $0x5, %r12
pushq $0xa
popq %r9
movq %r12, %rax
cqto
idivq %r9
movq %rax, %rsi
shlq $0x15, %rsi
addq $0x5, %r14
movq %r14, %rax
cqto
idivq %r9
movq %rax, %rdi
shlq $0xc, %rdi
addq $0x5, %rbx
movq %rbx, %rax
cqto
idivq %r9
movq %rax, %r8
shlq $0x6, %r8
addq $0x5, %rcx
movq %rcx, %rax
cqto
idivq %r9
addq %rsi, %rax
addq %r8, %rax
addq %rdi, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/n2kd/gps_ais.c
// Function: addAisLongString
static int addAisLongString(const char *msg, const char *fieldName, int maxSize, bool padd, aisVector *payload)
{
  char *jsonString;
  int   len;

  jsonString = (char *) calloc(maxSize + 1, sizeof(char));
  if (jsonString == NULL)
  {
    return 0;
  }

  if (!getJSONValue(msg, fieldName, jsonString, maxSize))
  {
    free(jsonString);
    return 0;
  }

  for (len = 0; len <= maxSize; len++)
  {
    if (*(jsonString + len) == '\0')
    {
      break;
    }
  }

  len *= 6;
  if (padd)
  {
    if (len % 8)
    {
      len += 8 - (len % 8); // Add padd bits
    }
  }

  addAisString(jsonString, len, payload);
  free(jsonString);
  return len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r12
leal 0x1(%r15), %edi
pushq $0x1
popq %rsi
callq 0x21c0
testq %rax, %rax
je 0x6177
movq %rax, %r14
movl %r15d, %ecx
leaq 0x3265(%rip), %rsi      # 0x93b2
movq %r12, %rdi
movq %rax, %rdx
callq 0x7415
testb %al, %al
je 0x619e
movslq %r15d, %rcx
xorl %eax, %eax
xorl %edx, %edx
cmpq %rcx, %rdx
jg 0x6183
cmpb $0x0, (%r14,%rdx)
je 0x6183
incq %rdx
addl $0x6, %eax
jmp 0x6163
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl %eax, %esi
andl $0x7ffffff8, %esi       # imm = 0x7FFFFFF8
addl $0x8, %esi
testb $0x6, %al
cmovel %eax, %esi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x5f25
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2030
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/n2kd/nmea0183.c
// Function: nmea0183CreateMessage
extern void nmea0183CreateMessage(StringBuffer *msg183, int src, const char *format, ...)
{
  uint8_t chk;
  size_t  i;
  char    first, second;
  va_list ap;

  va_start(ap, format);

  // Convert the 8 bit value 'n' into a valid NMEA0183 style sender.
  // The first implementation sent out a 2 digit hexadecimal number,
  // but that throws some implementations of receivers off as they
  // cannot handle numeric senders. So now we produce a 2 character
  // code with the src value 0-255 translated into
  // A..Q A..P with A representing 0, B representing 1, etc.
  // P is skipped for the initial letter, as that represents 'proprietary'
  // and OpenCPN does not allow this.

  first  = 'A' + ((src >> 4) & 0xf);
  second = 'A' + ((src) & 0xf);
  if (first >= 'P')
  {
    first++;
  }

  // Prepare for calculation of checksum
  i = msg183->len;

  if (src > 255)
    sbAppendFormat(msg183, "!%c%c", first, second);
  else
    sbAppendFormat(msg183, "$%c%c", first, second);
  sbAppendFormatV(msg183, format, ap);

  va_end(ap);

  chk = 0;
  for (i++; i < msg183->len; i++)
  {
    chk ^= (uint8_t) msg183->data[i];
  }
  sbAppendFormat(msg183, "*%02X\r\n", chk);
  logDebug("nmea0183 = %s", sbGet(msg183));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %rdx
movq %rcx, 0x18(%rdx)
movq %r8, 0x20(%rdx)
movq %r9, 0x28(%rdx)
testb %al, %al
je 0x6215
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r15
movq %rdx, 0x10(%r15)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%r15)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movl %esi, %edx
shrb $0x4, %dl
leal 0x41(%rdx), %edi
movl %esi, %ecx
andl $0xf, %ecx
addl $0x41, %ecx
cmpb $0xf, %dl
movzbl %dil, %edx
pushq $0x51
popq %rdi
cmovnel %edx, %edi
movq %rax, (%r15)
movq 0x8(%rbx), %r12
cmpl $0x100, %esi            # imm = 0x100
movzbl %dil, %edx
leaq 0x33f1(%rip), %rax      # 0x9658
leaq 0x33f0(%rip), %rsi      # 0x965e
cmovgeq %rax, %rsi
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0x71e6
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x7364
movq 0x8(%rbx), %rax
incq %r12
cmpq %rax, %r12
jae 0x62a1
movq (%rbx), %rcx
xorb (%rcx,%r12), %bpl
jmp 0x6290
movzbl %bpl, %edx
leaq 0x33b8(%rip), %rsi      # 0x9664
movq %rbx, %rdi
xorl %eax, %eax
callq 0x71e6
movq (%rbx), %rax
testq %rax, %rax
leaq 0x259c(%rip), %rsi      # 0x885f
cmovneq %rax, %rsi
leaq 0x339e(%rip), %rdi      # 0x966c
xorl %eax, %eax
callq 0x6d78
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/canboat[P]canboat/n2kd/nmea0183.c
// Function: getJSONNumber
bool getJSONNumber(const char *message, const char *fieldName, double *value, Unit unit)
{
  char valueStr[16];

  // List of conversion values for each unit. When analyser produces SI convert it to 'human standard'.
  static const double UNIT_CONVERSION[U_MAX][2] = {{1, RadianToDegree}, {1, RadianToDegree}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
  static const double UNIT_OFFSET[U_MAX][2]     = {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, -273.15}, {0, 0}};

  if (getJSONValue(message, fieldName, valueStr, sizeof valueStr))
  {
    *value = strtod(valueStr, 0) * UNIT_CONVERSION[unit][unitSI] + UNIT_OFFSET[unit][unitSI];
    return true;
  }
  *value = nan("");
  return false;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %ecx, %r14d
movq %rdx, %rbx
movq %rsp, %rdx
pushq $0x10
popq %rcx
callq 0x7415
movl %eax, %ebp
testb %al, %al
je 0x6b66
movq %rsp, %rdi
xorl %esi, %esi
callq 0x20a0
movl %r14d, %eax
leaq 0x683c(%rip), %rcx      # 0xd378
movzbl (%rcx), %ecx
shlq $0x4, %rax
leaq 0x2d46(%rip), %rdx      # 0x9890
addq %rax, %rdx
shll $0x3, %ecx
leaq 0x2d99(%rip), %rsi      # 0x98f0
addq %rax, %rsi
mulsd (%rcx,%rdx), %xmm0
addsd (%rcx,%rsi), %xmm0
jmp 0x6b72
leaq 0x1cf2(%rip), %rdi      # 0x885f
callq 0x2340
movsd %xmm0, (%rbx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/openshmem-org[P]openshmem-examples/c/bcast2.c
// Function: main
int
main(void)
{
    int i;
    long *target;
    static long source[8] = { 1, 2, 3, 4, 5, 6, 7, 8 };
    int nlong = 8;
    int me, npes;

    shmem_init();
    me = shmem_my_pe();
    npes = shmem_n_pes();

    target = (long *) shmem_malloc(8 * sizeof(*target));

    for (i = 0; i < SHMEM_BCAST_SYNC_SIZE; i += 1) {
        pSync[i] = SHMEM_SYNC_VALUE;
    }
    shmem_barrier_all();

    shmem_broadcast64(target, source, nlong, 0, 0, 0, npes, pSync);

    if (me != 0) {
        int i;
        for (i = 0; i < 8; i++) {
            printf("%d: target[%d] = %ld\n", me, i, target[i]);
        }
    }

    shmem_free(target);

    shmem_finalize();

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
callq 0x1090
callq 0x1060
movl %eax, %ebx
callq 0x1040
movl %eax, %r15d
pushq $0x40
popq %rdi
callq 0x1070
movq %rax, %r14
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0x2ed1(%rip)     # 0x40c0
leaq 0x2eca(%rip), %r12      # 0x40c0
callq 0x1080
leaq 0x2e6e(%rip), %rsi      # 0x4070
pushq $0x8
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r12
pushq %r15
callq 0x10b0
popq %rax
popq %rcx
testl %ebx, %ebx
je 0x1247
leaq 0xdde(%rip), %r15       # 0x2004
xorl %r12d, %r12d
cmpq $0x8, %r12
je 0x1247
movq (%r14,%r12,8), %rcx
movq %r15, %rdi
movl %ebx, %esi
movl %r12d, %edx
xorl %eax, %eax
callq 0x1030
incq %r12
jmp 0x1229
movq %r14, %rdi
callq 0x10a0
callq 0x1050
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/dasJ[P]sd-zfs/src/mount.initrd_zfs.c
// Function: handleBootfs
int handleBootfs(char **pool) {
	char *rpool = NULL;
	int ret = 1;

	// Handle rpool
	if (strncmp(*pool, "ZFS=AUTO:", strlen("ZFS=AUTO:")) == 0) {
		rpool = malloc((strlen(*pool) - strlen("ZFS=AUTO:") + 1) * sizeof(char));
		strcpy(rpool, &((*pool)[strlen("ZFS=AUTO:")]));
	}

	ret = zfs_get_bootfs(rpool, pool);
	free(rpool);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
leaq 0xa1965(%rip), %rsi     # 0x4a3004
pushq $0x9
popq %rdx
movq %r14, %rdi
callq 0x401080
testl %eax, %eax
je 0x4016b3
xorl %r15d, %r15d
jmp 0x4016d6
movq %r14, %rdi
callq 0x4010e0
leaq -0x8(%rax), %rdi
callq 0x420cc0
movq %rax, %r15
addq $0x9, %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x401020
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4021f4
movl %eax, %ebx
movq %r15, %rdi
callq 0x421000
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_destroy_recursively
int zfs_destroy_recursively(char *dataset) {
	char *lines = NULL;
	char *token;

	// Execute command
	char *cmdline[] = { ZFS_CMD, "list", "-tfilesystem", "-Hro", "name", "-Sname", dataset, NULL };
	executeZfs(1, &lines, cmdline);
	if (lines == NULL) {
		return 0;
	}
	// Destoy all datasets
	token = strtok(lines, "\n");
	do {
		if (zfs_destroy(token) != 0) {
			fprintf(stderr, "Not destroying any more datasets\n");
			free(lines);
			return -2;
		}
	} while ((token = strtok(NULL, "\n")) != NULL);

	free(lines);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
leaq -0x20(%rbp), %rbx
andq $0x0, (%rbx)
leaq 0xa1203(%rip), %rax     # 0x4a3205
leaq -0x60(%rbp), %rdx
movq %rax, (%rdx)
leaq 0xa3d89(%rip), %rax     # 0x4a5d99
movq %rax, 0x8(%rdx)
leaq 0xa120c(%rip), %rax     # 0x4a3227
movq %rax, 0x10(%rdx)
leaq 0xa120e(%rip), %rax     # 0x4a3234
movq %rax, 0x18(%rdx)
leaq 0xa120a(%rip), %rax     # 0x4a323b
movq %rax, 0x20(%rdx)
leaq 0xa11fd(%rip), %rax     # 0x4a3239
movq %rax, 0x28(%rdx)
movq %rdi, 0x30(%rdx)
andq $0x0, 0x38(%rdx)
pushq $0x1
popq %rdi
movq %rbx, %rsi
callq 0x401f9b
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x402096
leaq 0xa1847(%rip), %r14     # 0x4a38aa
movq %rbx, %rdi
movq %r14, %rsi
callq 0x423ee0
movq %rax, %rdi
callq 0x4020c9
testl %eax, %eax
jne 0x4020a7
xorl %r15d, %r15d
xorl %edi, %edi
movq %r14, %rsi
callq 0x423ee0
testq %rax, %rax
jne 0x40206e
movq %rbx, %rdi
callq 0x421000
jmp 0x402099
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq $0x4d3708, %rax         # imm = 0x4D3708
movq (%rax), %rcx
leaq 0xa1188(%rip), %rdi     # 0x4a3240
pushq $0x21
popq %rsi
pushq $0x1
popq %rdx
callq 0x413540
pushq $-0x2
popq %r15
jmp 0x40208c
// File: /workspace/github_c_makefile_star2_O2/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_destroy
int zfs_destroy(char *dataset) {
	int status;
	char *cmdline[] = { ZFS_CMD, "destroy", dataset, NULL };

	status = executeZfs(0, NULL, cmdline);
	if (status != 0) {
		fprintf(stderr, "ZFS returned error %d\n", status);
	}
	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
leaq 0xa112c(%rip), %rax     # 0x4a3205
leaq -0x30(%rbp), %rdx
movq %rax, (%rdx)
leaq 0xa117b(%rip), %rax     # 0x4a3262
movq %rax, 0x8(%rdx)
movq %rdi, 0x10(%rdx)
andq $0x0, 0x18(%rdx)
xorl %edi, %edi
xorl %esi, %esi
callq 0x401f9b
movl %eax, %ebx
testl %eax, %eax
jne 0x40210c
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
movq $0x4d3708, %rax         # imm = 0x4D3708
movq (%rax), %rdi
leaq 0xa114d(%rip), %rsi     # 0x4a326a
movl %ebx, %edx
xorl %eax, %eax
callq 0x40c670
jmp 0x402103
// File: /workspace/github_c_makefile_star2_O2/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_snapshot_exists
int zfs_snapshot_exists(char *dataset, char *snapshot) {
	int status;
	char *toCheck;

	toCheck = malloc((strlen(dataset) + strlen(snapshot) + 2) * sizeof(char));
	strcpy(toCheck, dataset);
	strcat(toCheck, "@");
	strcat(toCheck, snapshot);
	
	status = zfs_ds_exists(toCheck);
	free(toCheck);
	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4010e0
movq %rax, %r15
movq %rbx, %rdi
callq 0x4010e0
leaq (%r15,%rax), %rdi
addq $0x2, %rdi
callq 0x420cc0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x401020
movq %r15, %rdi
callq 0x4010e0
movw $0x40, (%r15,%rax)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x401058
movq %r15, %rdi
callq 0x40219c
movl %eax, %ebx
movq %r15, %rdi
callq 0x421000
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_ds_exists
int zfs_ds_exists(char *dataset) {
	int status;
	char *cmdline[] = { ZFS_CMD, "get", "-H", "type", dataset, NULL };

	status = executeZfs(0, NULL, cmdline);

	if (status == 0) {
		return 0;
	} else {
		return 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0xa105a(%rip), %rax     # 0x4a3205
leaq -0x30(%rbp), %rdx
movq %rax, (%rdx)
leaq 0xa10c8(%rip), %rax     # 0x4a3281
movq %rax, 0x8(%rdx)
leaq 0xa10c1(%rip), %rax     # 0x4a3285
movq %rax, 0x10(%rdx)
leaq 0xa2571(%rip), %rax     # 0x4a4740
movq %rax, 0x18(%rdx)
movq %rdi, 0x20(%rdx)
andq $0x0, 0x28(%rdx)
xorl %edi, %edi
xorl %esi, %esi
callq 0x401f9b
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_get_bootfs
int zfs_get_bootfs(char *rpool, char **bootfs) {
	int status;
	char **cmdline;
	char *tok;
	char *line = NULL;

	if (rpool == NULL) {
		cmdline = (char*[]) { ZPOOL_CMD, "list", "-Ho", "bootfs", NULL };
	} else {
		cmdline = (char*[]) { ZPOOL_CMD, "list", "-Ho", "bootfs", rpool, NULL };
	}

	*bootfs = NULL;

	status = executeZpool(1, &line, cmdline);

	if (status != 0) {
		fprintf(stderr, "zpool get returned %d\n", status);
		return status;
	}
	status = 1;

	tok = strtok(line, "\n");
	while (tok != NULL) {
		if (strcmp(tok, "-") != 0) {
			*bootfs = malloc((strlen(tok) + 1) * sizeof(char));
			strcpy(*bootfs, tok);
			status = 0;
			break;
		}
		tok = strtok(NULL, "\n");
	}
	free(line);
	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
andq $0x0, -0x30(%rbp)
testq %rdi, %rdi
je 0x40224f
leaq 0xa0ff9(%rip), %rax     # 0x4a3212
leaq -0x90(%rbp), %rdx
movq %rax, (%rdx)
leaq 0xa3b6f(%rip), %rax     # 0x4a5d99
movq %rax, 0x8(%rdx)
leaq 0xa1053(%rip), %rax     # 0x4a3288
movq %rax, 0x10(%rdx)
leaq 0xa104c(%rip), %rax     # 0x4a328c
movq %rax, 0x18(%rdx)
movq %rdi, 0x20(%rdx)
andq $0x0, 0x28(%rdx)
jmp 0x402273
movq 0xcf762(%rip), %rax     # 0x4d19b8
leaq -0x60(%rbp), %rdx
movq %rax, 0x20(%rdx)
movups 0xcf743(%rip), %xmm0    # 0x4d19a8
movaps %xmm0, 0x10(%rdx)
movups 0xcf728(%rip), %xmm0    # 0x4d1998
movaps %xmm0, (%rdx)
andq $0x0, (%rbx)
pushq $0x1
popq %r14
leaq -0x30(%rbp), %rsi
movl %r14d, %edi
callq 0x401fb4
testl %eax, %eax
jne 0x4022f7
movq -0x30(%rbp), %r15
leaq 0xa1614(%rip), %r13     # 0x4a38aa
movq %r15, %rdi
movq %r13, %rsi
callq 0x423ee0
testq %rax, %rax
je 0x4022dd
movq %rax, %r12
cmpb $0x2d, (%rax)
jne 0x4022bb
cmpb $0x0, 0x1(%r12)
movl $0x0, %edi
je 0x402299
movq %r12, %rdi
callq 0x4010e0
leaq 0x1(%rax), %rdi
callq 0x420cc0
movq %rax, (%rbx)
movq %rax, %rdi
movq %r12, %rsi
callq 0x401020
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x421000
movl %r14d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %r15d
movq $0x4d3708, %rax         # imm = 0x4D3708
movq (%rax), %rdi
leaq 0xa0f88(%rip), %rsi     # 0x4a3293
movl %r15d, %edx
xorl %eax, %eax
callq 0x40c670
movl %r15d, %r14d
jmp 0x4022e5
// File: /workspace/github_c_makefile_star2_O2/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_list_datasets_with_mp
int zfs_list_datasets_with_mp(char *dataset, char **datasets) {
	int status;
	char *cmdline[] = { ZFS_CMD, "list", "-r", dataset, "-t", "filesystem", "-Ho", "name,mountpoint", NULL };

	*datasets = NULL;

	status = executeZfs(1, datasets, cmdline);

	if (status != 0) {
		fprintf(stderr, "zfs returned %d\n", status);
	}
	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
leaq 0xa0edb(%rip), %rax     # 0x4a3205
leaq -0x50(%rbp), %rdx
movq %rax, (%rdx)
leaq 0xa3a61(%rip), %rax     # 0x4a5d99
movq %rax, 0x8(%rdx)
leaq 0xa0f67(%rip), %rax     # 0x4a32aa
movq %rax, 0x10(%rdx)
movq %rdi, 0x18(%rdx)
leaq 0xa0f5b(%rip), %rax     # 0x4a32ad
movq %rax, 0x20(%rdx)
leaq 0xa0ecc(%rip), %rax     # 0x4a3229
movq %rax, 0x28(%rdx)
leaq 0xa0f20(%rip), %rax     # 0x4a3288
movq %rax, 0x30(%rdx)
leaq 0xa0f3d(%rip), %rax     # 0x4a32b0
movq %rax, 0x38(%rdx)
andq $0x0, 0x40(%rdx)
andq $0x0, (%rsi)
pushq $0x1
popq %rdi
callq 0x401f9b
movl %eax, %ebx
testl %eax, %eax
jne 0x402397
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
movq $0x4d3708, %rax         # imm = 0x4D3708
movq (%rax), %rdi
leaq 0xa0f18(%rip), %rsi     # 0x4a32c0
movl %ebx, %edx
xorl %eax, %eax
callq 0x40c670
jmp 0x40238e
// File: /workspace/github_c_makefile_star2_O2/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_list_snapshots
int zfs_list_snapshots(char *dataset, char *snapshot, char **output) {
	int status;
	char *snaps = NULL;
	char *cmdline[] = { ZFS_CMD, "list", "-Ho", "name", "-tsnapshot", "-r", dataset, NULL };
	char *suffix;
	char *tok;

	status = executeZfs(1, &snaps, cmdline);
	if (status != 0) {
		fprintf(stderr, "zfs returned %d\n", status);
		return status;
	}
	// Filter
	suffix = malloc((strlen(snapshot) + 2) * sizeof(char));
	strcpy(suffix, "@");
	strcat(suffix, snapshot);

	*output = malloc(sizeof(char));
	strcpy(*output, "");

	tok = strtok(snaps, "\n");
	while (tok != NULL) {
		if (strlen(tok) < strlen(suffix)) {
			continue;
		}
		if (strncmp(tok + strlen(tok) - strlen(suffix), suffix, strlen(suffix)) == 0) {
			*output = realloc(*output, strlen(*output) + strlen(tok) + 2);
			strcat(*output, tok);
			strcat(*output, "\n");
		}
		tok = strtok(NULL, "\n");
	}
	free(suffix);
	free(snaps);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbx
movq %rsi, %r15
leaq -0x40(%rbp), %rsi
andq $0x0, (%rsi)
leaq 0xa0e2c(%rip), %rax     # 0x4a3205
leaq -0x80(%rbp), %rdx
movq %rax, (%rdx)
leaq 0xa39b2(%rip), %rax     # 0x4a5d99
movq %rax, 0x8(%rdx)
leaq 0xa0e96(%rip), %rax     # 0x4a3288
movq %rax, 0x10(%rdx)
leaq 0xa0e3e(%rip), %rax     # 0x4a323b
movq %rax, 0x18(%rdx)
leaq 0xa0ec9(%rip), %rax     # 0x4a32d1
movq %rax, 0x20(%rdx)
leaq 0xa0e97(%rip), %rax     # 0x4a32aa
movq %rax, 0x28(%rdx)
movq %rdi, 0x30(%rdx)
andq $0x0, 0x38(%rdx)
pushq $0x1
popq %rdi
callq 0x401f9b
testl %eax, %eax
jne 0x402534
movq %r15, %rdi
callq 0x4010e0
leaq 0x2(%rax), %rdi
callq 0x420cc0
movq %rax, %r14
movw $0x40, (%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x401058
pushq $0x1
popq %rdi
callq 0x420cc0
movq %rbx, -0x38(%rbp)
movq %rax, (%rbx)
movb $0x0, (%rax)
movq -0x40(%rbp), %rdi
leaq 0xa1439(%rip), %rbx     # 0x4a38aa
movq %rdi, -0x30(%rbp)
movq -0x38(%rbp), %r12
movq %rbx, %rsi
callq 0x423ee0
testq %rax, %rax
je 0x40250e
movq %rax, %r13
movq %rax, %rdi
callq 0x4010e0
movq %rax, %r15
movq %r14, %rdi
callq 0x4010e0
cmpq %rax, %r15
jb 0x40250c
movq %r13, %rdi
addq %r15, %rdi
subq %rax, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x401080
movl $0x0, %edi
testl %eax, %eax
jne 0x402479
movq (%r12), %rbx
movq %rbx, %rdi
callq 0x4010e0
leaq (%r15,%rax), %rsi
addq $0x2, %rsi
movq %rbx, %rdi
callq 0x421350
movq %rax, %rbx
movq %rax, (%r12)
movq %rax, %rdi
movq %r13, %rsi
callq 0x401058
movq %rbx, %rdi
callq 0x4010e0
movw $0xa, (%rbx,%rax)
leaq 0xa13a5(%rip), %rbx     # 0x4a38aa
xorl %edi, %edi
jmp 0x402479
jmp 0x40250c
movq %r14, %rdi
callq 0x421000
movq -0x30(%rbp), %rdi
callq 0x421000
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %r14d
movq $0x4d3708, %rax         # imm = 0x4D3708
movq (%rax), %rdi
leaq 0xa0d78(%rip), %rsi     # 0x4a32c0
movl %r14d, %edx
xorl %eax, %eax
callq 0x40c670
jmp 0x402522
// File: /workspace/github_c_makefile_star2_O2/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_mount
int zfs_mount(char *what, char *where, char *options) {
	char **cmdline;

	if (options == NULL) {
		cmdline = (char*[]) { MOUNT_CMD, "-t", "zfs", what, where, NULL };
	} else {
		cmdline = (char*[]) { MOUNT_CMD, "-t", "zfs", "-o", options, what, where, NULL };
	}

	return executeMount(0, NULL, cmdline);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
testq %rdx, %rdx
je 0x4025a5
movq %rdx, %rax
leaq 0xa0cb6(%rip), %rcx     # 0x4a3221
leaq -0x70(%rbp), %rdx
movq %rcx, (%rdx)
leaq 0xa0d34(%rip), %rcx     # 0x4a32ad
movq %rcx, 0x8(%rdx)
leaq 0xa0c81(%rip), %rcx     # 0x4a3205
movq %rcx, 0x10(%rdx)
leaq 0xa0d4d(%rip), %rcx     # 0x4a32dc
movq %rcx, 0x18(%rdx)
movq %rax, 0x20(%rdx)
movq %rdi, 0x28(%rdx)
movq %rsi, 0x30(%rdx)
leaq -0x38(%rbp), %rax
jmp 0x4025d5
leaq 0xa0c75(%rip), %rax     # 0x4a3221
leaq -0x30(%rbp), %rdx
movq %rax, (%rdx)
leaq 0xa0cf3(%rip), %rax     # 0x4a32ad
movq %rax, 0x8(%rdx)
leaq 0xa0c40(%rip), %rax     # 0x4a3205
movq %rax, 0x10(%rdx)
movq %rdi, 0x18(%rdx)
movq %rsi, 0x20(%rdx)
leaq -0x8(%rbp), %rax
andq $0x0, (%rax)
xorl %edi, %edi
xorl %esi, %esi
callq 0x401fcd
addq $0x70, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_get_mountpoint
int zfs_get_mountpoint(char *dataset, char **mountpoint) {
	int status;
	char *cmdline[] = { ZFS_CMD, "get", "-Ho", "value", "mountpoint", dataset, NULL };

	status = executeZfs(1, mountpoint, cmdline);
	if (status != 0) {
		fprintf(stderr, "zfs returned %d\n", status);
	}
	if (*mountpoint != NULL) {
		(*mountpoint)[strlen(*mountpoint) - 1] = '\0';
	}
	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
leaq 0xa0c08(%rip), %rax     # 0x4a3205
leaq -0x50(%rbp), %rdx
movq %rax, (%rdx)
leaq 0xa0c76(%rip), %rax     # 0x4a3281
movq %rax, 0x8(%rdx)
leaq 0xa0c72(%rip), %rax     # 0x4a3288
movq %rax, 0x10(%rdx)
leaq 0xa0cbe(%rip), %rax     # 0x4a32df
movq %rax, 0x18(%rdx)
leaq 0xa0c89(%rip), %rax     # 0x4a32b5
movq %rax, 0x20(%rdx)
movq %rdi, 0x28(%rdx)
andq $0x0, 0x30(%rdx)
pushq $0x1
popq %rdi
callq 0x401f9b
movl %eax, %r14d
testl %eax, %eax
jne 0x402669
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x40265d
movq %rbx, %rdi
callq 0x4010e0
movb $0x0, -0x1(%rbx,%rax)
movl %r14d, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq $0x4d3708, %rax         # imm = 0x4D3708
movq (%rax), %rdi
leaq 0xa0c46(%rip), %rsi     # 0x4a32c0
movl %r14d, %edx
xorl %eax, %eax
callq 0x40c670
jmp 0x402648
// File: /workspace/github_c_makefile_star2_O2/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_clone_snap
int zfs_clone_snap(char *snapshot, char *datasetTarget, char *mountpoint) {
	int status;
	char **cmdline;
	char *mountpointParam;

	mountpointParam = malloc((strlen("org.zol:mountpoint=") + strlen(mountpoint) + 1) * sizeof(char));
	strcpy(mountpointParam, "org.zol:mountpoint=");
	strcat(mountpointParam, mountpoint);

	cmdline = (char*[]) { ZFS_CMD, "clone",
		"-o", "canmount=noauto",
		"-o", "mountpoint=none",
		"-o", mountpointParam, snapshot, datasetTarget, NULL };

	status = executeZfs(0, NULL, cmdline);
	free(mountpointParam);
	if (status != 0) {
		fprintf(stderr, "zfs returned %d\n", status);
	}

	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rdi
callq 0x4010e0
leaq 0x14(%rax), %rdi
callq 0x420cc0
movq %rax, %rbx
movups 0xa0c2c(%rip), %xmm0    # 0x4a32e5
movups %xmm0, (%rax)
movl $0x3d746e, 0x10(%rax)   # imm = 0x3D746E
movq %rax, %rdi
movq %r12, %rsi
callq 0x401058
leaq 0xa0b30(%rip), %rax     # 0x4a3205
leaq -0x78(%rbp), %rdx
movq %rax, (%rdx)
leaq 0xa0c16(%rip), %rax     # 0x4a32f9
movq %rax, 0x8(%rdx)
leaq 0xa0bee(%rip), %rax     # 0x4a32dc
movq %rax, 0x10(%rdx)
leaq 0xa0c06(%rip), %rcx     # 0x4a32ff
movq %rcx, 0x18(%rdx)
movq %rax, 0x20(%rdx)
leaq 0xa0c07(%rip), %rcx     # 0x4a330f
movq %rcx, 0x28(%rdx)
movq %rax, 0x30(%rdx)
movq %rbx, 0x38(%rdx)
movq %r15, 0x40(%rdx)
movq %r14, 0x48(%rdx)
andq $0x0, 0x50(%rdx)
xorl %edi, %edi
xorl %esi, %esi
callq 0x401f9b
movl %eax, %r14d
movq %rbx, %rdi
callq 0x421000
testl %r14d, %r14d
jne 0x40274a
movl %r14d, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq $0x4d3708, %rax         # imm = 0x4D3708
movq (%rax), %rdi
leaq 0xa0b65(%rip), %rsi     # 0x4a32c0
movl %r14d, %edx
xorl %eax, %eax
callq 0x40c670
jmp 0x40273a
// File: /workspace/github_c_makefile_star2_O2/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_get_alt_mp
int zfs_get_alt_mp(char *dataset, char **mountpoint) {
	int status;
	char *cmdline[] = { ZFS_CMD, "get", "-Ho", "value", "org.zol:mountpoint", dataset, NULL };

	status = executeZfs(1, mountpoint, cmdline);
	if (*mountpoint != NULL) {
		(*mountpoint)[strlen(*mountpoint) - 1] = '\0';
	}
	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
leaq 0xa0a89(%rip), %rax     # 0x4a3205
leaq -0x50(%rbp), %rdx
movq %rax, (%rdx)
leaq 0xa0af7(%rip), %rax     # 0x4a3281
movq %rax, 0x8(%rdx)
leaq 0xa0af3(%rip), %rax     # 0x4a3288
movq %rax, 0x10(%rdx)
leaq 0xa0b3f(%rip), %rax     # 0x4a32df
movq %rax, 0x18(%rdx)
leaq 0xa0b74(%rip), %rax     # 0x4a331f
movq %rax, 0x20(%rdx)
movq %rdi, 0x28(%rdx)
andq $0x0, 0x30(%rdx)
pushq $0x1
popq %rdi
callq 0x401f9b
movl %eax, %ebx
movq (%r14), %r14
testq %r14, %r14
je 0x4027d8
movq %r14, %rdi
callq 0x4010e0
movb $0x0, -0x1(%r14,%rax)
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/evanwire[P]GitClone/server.c
// Function: readFile
char* readFile(char* fileName){
  //Finding file's size
  struct stat st;
  stat(fileName, &st);
  int size = st.st_size;

  char* file_contents = malloc(size * sizeof(char));
  if(!file_contents){
    printf("\nError: was unable to use malloc(). Please try again.\n");
    exit(1);
  }
  memset(file_contents, 0, size);

  int file_fd = open(fileName, O_RDONLY);

  int bytes_read = read(file_fd, file_contents, size);
  file_contents[bytes_read] = '\0';
  close(file_fd);
  return file_contents;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %r15
leaq -0xa8(%rbp), %rbx
movq %rbx, %rsi
callq 0x1140
movslq 0x30(%rbx), %r14
pushq $0x1
popq %rdi
movq %r14, %rsi
callq 0x10f0
testq %rax, %rax
je 0x327e
movq %rax, %rbx
movq %r15, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x1100
movl %eax, %r15d
movl %eax, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x11f0
cltq
movb $0x0, (%rbx,%rax)
movl %r15d, %edi
callq 0x12b0
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1476(%rip), %rdi      # 0x46fb
callq 0x1230
pushq $0x1
popq %rdi
callq 0x11a0
// File: /workspace/github_c_makefile_star2_O2/evanwire[P]GitClone/server.c
// Function: hashIt
char* hashIt(char* input){
  unsigned char digest[MD5_DIGEST_LENGTH];
  MD5(input, strlen(input), digest);
  int i;
  char * result=(char*)malloc(33*sizeof(char));
  memset(result,'\0',33);
  for(i = 0; i < MD5_DIGEST_LENGTH; i++){
     sprintf(result+2*i, "%02x", digest[i]);
  }

  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x10b0
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1240
pushq $0x1
popq %rdi
pushq $0x21
popq %rsi
callq 0x10f0
movq %rax, %rbx
leaq 0x103d(%rip), %r14      # 0x430a
movq %rax, %r15
xorl %r12d, %r12d
cmpq $0x10, %r12
je 0x32f5
movzbl -0x30(%rbp,%r12), %edx
movq %r15, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1060
incq %r12
addq $0x2, %r15
jmp 0x32d3
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/salextpuru[P]speccy-toochain/src/bin2tap/bin2tap.c
// Function: str2int
int str2int (char *str, int *num) {
	int i=0;

	*num = 0;
	while (str[i] != 0) {
		if (str[i] <= '9' && str[i] >= '0') {
			*num *= 10;
			*num += str[i++] - '0';
		}
		else 
			return 1;
	}
	return 0;
}

// Assembly:
xorl %eax, %eax
pushq $0x1
popq %rcx
xorl %edx, %edx
movl %edx, (%rsi)
movb (%rdi), %r8b
testb %r8b, %r8b
je 0x11fd
addb $-0x30, %r8b
cmpb $0x9, %r8b
ja 0x11fb
imull $0xa, %edx, %edx
movl %edx, (%rsi)
movsbl (%rdi), %r8d
addl %r8d, %edx
addl $-0x30, %edx
incq %rdi
jmp 0x11d3
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/salextpuru[P]speccy-toochain/src/bin2tap/bin2tap.c
// Function: l_copy
void l_copy (char* tap, char* loader, int* tap_index, int* checksum, int len) {
	int i;
	for (i = 0; i < len; i++) {
/*		*(checksum) ^= *(tap+(*tap_index)) = *(loader++);
		*tap_index = *tap_index + 1; */
		*(checksum) ^= tap[(*tap_index)++] = *(loader++);
	}
}

// Assembly:
xorl %eax, %eax
testl %r8d, %r8d
cmovlel %eax, %r8d
cmpl %eax, %r8d
je 0x1246
movsbl (%rsi,%rax), %r9d
movslq (%rdx), %r10
leal 0x1(%r10), %r11d
movl %r11d, (%rdx)
movb %r9b, (%rdi,%r10)
xorl %r9d, (%rcx)
incq %rax
jmp 0x1226
retq
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe.c
// Function: pipe_new
pipe_t* pipe_new(size_t elem_size, size_t original_limit)
{
    assertume(elem_size != 0);

    if(elem_size == 0)
        return NULL;

    pipe_t* p = malloc(sizeof *p);

    assert(DEFAULT_MINCAP >= 1);

    size_t cap = DEFAULT_MINCAP * elem_size;
    char*  buf = malloc(cap);

    // Change the limit from being in "elements" to being in "bytes", and make
    // room for the sentinel element.
    size_t limit = (original_limit + 1) * elem_size;

    if(unlikely(p == NULL || buf == NULL))
        return free(p), free(buf), NULL;

    *p = (pipe_t) {
        .elem_size  = elem_size,
        .min_cap = cap,
        .max_cap = original_limit ? next_pow2(max(limit, cap)) : ~(size_t)0,

        .buffer = buf,
        .bufend = buf + cap,
        .begin  = buf,
        .end    = buf + elem_size,

        // Since we're issuing a pipe_t, it counts as both a producer and a
        // consumer since it can issue new instances of both. Therefore, the
        // refcounts both start at 1; not the intuitive 0.
        .producer_refcount = 1,
        .consumer_refcount = 1,
    };

    mutex_init(&p->begin_lock);
    mutex_init(&p->end_lock);

    cond_init(&p->just_pushed);
    cond_init(&p->just_popped);

    check_invariants(p);

    return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x13a2
movq %rsi, %r13
movq %rdi, %r14
movl $0xf8, %edi
callq 0x1100
movq %rax, %rbx
movq %r14, %r12
shlq $0x5, %r12
movq %r12, %rdi
callq 0x1100
movq %rax, %r15
testq %rbx, %rbx
je 0x138e
testq %r15, %r15
je 0x138e
testq %r13, %r13
je 0x12f6
incq %r13
imulq %r14, %r13
cmpq %r12, %r13
cmovbeq %r12, %r13
movq %r13, %rdi
callq 0x13c1
jmp 0x12f9
pushq $-0x1
popq %rax
leaq (%r15,%r12), %rcx
movq %r15, %rdx
addq %r14, %rdx
movq %r14, (%rbx)
movq %r12, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq %r15, 0x18(%rbx)
movq %rcx, 0x20(%rbx)
movq %r15, 0x28(%rbx)
movq %rdx, 0x30(%rbx)
pushq $0x1
popq %rax
movq %rax, 0x38(%rbx)
movq %rax, 0x40(%rbx)
leaq 0x48(%rbx), %r14
leaq 0x70(%rbx), %r15
leaq 0x98(%rbx), %r12
movq %rbx, %r13
addq $0xc8, %r13
movl $0xb0, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x10a0
movq %r14, %rdi
xorl %esi, %esi
callq 0x1170
movq %r15, %rdi
xorl %esi, %esi
callq 0x1170
movq %r12, %rdi
xorl %esi, %esi
callq 0x10e0
movq %r13, %rdi
xorl %esi, %esi
callq 0x10e0
movq %rbx, %rdi
callq 0x1409
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1030
xorl %ebx, %ebx
jmp 0x1381
leaq 0x2dd9(%rip), %rdi      # 0x4182
leaq 0x2caf(%rip), %rsi      # 0x405f
leaq 0x2caf(%rip), %rcx      # 0x4066
movl $0x223, %edx            # imm = 0x223
callq 0x1090
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe.c
// Function: pipe_producer_new
pipe_producer_t* pipe_producer_new(pipe_t* p)
{
    mutex_lock(&p->begin_lock);
        p->producer_refcount++;
    mutex_unlock(&p->begin_lock);

    return (pipe_producer_t*)p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x48(%rdi), %r14
movq %r14, %rdi
callq 0x1180
incq 0x38(%rbx)
movq %r14, %rdi
callq 0x10f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe.c
// Function: pipe_consumer_new
pipe_consumer_t* pipe_consumer_new(pipe_t* p)
{
    mutex_lock(&p->end_lock);
        p->consumer_refcount++;
    mutex_unlock(&p->end_lock);

    return (pipe_consumer_t*)p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x70(%rdi), %r14
movq %r14, %rdi
callq 0x1180
incq 0x40(%rbx)
movq %r14, %rdi
callq 0x10f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe.c
// Function: pipe_free
void pipe_free(pipe_t* p)
{
    size_t new_producer_refcount,
           new_consumer_refcount;

    mutex_lock(&p->begin_lock);
        assertume(p->producer_refcount > 0);
        new_producer_refcount = --p->producer_refcount;
    mutex_unlock(&p->begin_lock);

    mutex_lock(&p->end_lock);
        assertume(p->consumer_refcount > 0);
        new_consumer_refcount = --p->consumer_refcount;
    mutex_unlock(&p->end_lock);

    if(unlikely(new_consumer_refcount == 0))
    {
        p->buffer = (free(p->buffer), NULL);

        if(likely(new_producer_refcount > 0))
            cond_broadcast(&p->just_popped);
        else
            deallocate(p);
    }
    else if(unlikely(new_producer_refcount == 0))
        cond_broadcast(&p->just_pushed);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x48(%rdi), %r14
movq %r14, %rdi
callq 0x1180
movq 0x38(%rbx), %r15
testq %r15, %r15
je 0x1732
decq %r15
movq %r15, 0x38(%rbx)
movq %r14, %rdi
callq 0x10f0
leaq 0x70(%rbx), %r14
movq %r14, %rdi
callq 0x1180
movq 0x40(%rbx), %r12
testq %r12, %r12
je 0x1751
leaq -0x1(%r12), %rax
movq %rax, 0x40(%rbx)
movq %r14, %rdi
callq 0x10f0
decq %r12
je 0x16fc
testq %r15, %r15
je 0x1718
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x18(%rbx), %rdi
callq 0x1030
andq $0x0, 0x18(%rbx)
testq %r15, %r15
je 0x1770
addq $0xc8, %rbx
jmp 0x171f
addq $0x98, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1040
leaq 0x294e(%rip), %rdi      # 0x4087
leaq 0x291f(%rip), %rsi      # 0x405f
leaq 0x2959(%rip), %rcx      # 0x40a0
movl $0x27c, %edx            # imm = 0x27C
callq 0x1090
leaq 0x2961(%rip), %rdi      # 0x40b9
leaq 0x2900(%rip), %rsi      # 0x405f
leaq 0x293a(%rip), %rcx      # 0x40a0
movl $0x281, %edx            # imm = 0x281
callq 0x1090
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1780
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe.c
// Function: deallocate
static void deallocate(pipe_t* p)
{
    assertume(p->producer_refcount == 0);
    assertume(p->consumer_refcount == 0);

    mutex_destroy(&p->begin_lock);
    mutex_destroy(&p->end_lock);

    cond_destroy(&p->just_pushed);
    cond_destroy(&p->just_popped);

    free(p->buffer);
    free(p);
}

// Assembly:
pushq %rbx
cmpq $0x0, 0x38(%rdi)
jne 0x17ce
movq %rdi, %rbx
cmpq $0x0, 0x40(%rdi)
jne 0x17ed
leaq 0x48(%rbx), %rdi
callq 0x1080
leaq 0x70(%rbx), %rdi
callq 0x1080
leaq 0x98(%rbx), %rdi
callq 0x1130
leaq 0xc8(%rbx), %rdi
callq 0x1130
movq 0x18(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
jmp 0x1030
leaq 0x2ac2(%rip), %rdi      # 0x4297
leaq 0x2883(%rip), %rsi      # 0x405f
leaq 0x2ace(%rip), %rcx      # 0x42b1
movl $0x269, %edx            # imm = 0x269
callq 0x1090
leaq 0x2929(%rip), %rdi      # 0x411d
leaq 0x2864(%rip), %rsi      # 0x405f
leaq 0x2aaf(%rip), %rcx      # 0x42b1
movl $0x26a, %edx            # imm = 0x26A
callq 0x1090