LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jsh58[P]Genrich/Genrich.c
// Function: loadFields
bool loadFields(uint16_t* flag, char** rname, uint32_t* pos,
    uint8_t* mapq, char** cigar, char** rnext, uint32_t* pnext,
    int32_t* tlen, char** seq, char** qual, char** extra) {
  *extra = NULL;  // reset 'extra' fields
  int i = 2;
  char* field = strtok(NULL, TAB);
  while (field != NULL) {
    switch (i) {
      case FLAG: *flag = getInt(field); break;
      case RNAME: *rname = field; break;
      case POS: *pos = getInt(field) - 1; break;  // convert to 0-based
      case MAPQ: *mapq = getInt(field); break;
      case CIGAR: *cigar = field; break;
      case RNEXT: *rnext = field; break;
      case PNEXT: *pnext = getInt(field) - 1; break;  // convert to 0-based
      case TLEN: *tlen = getInt(field); break;
      case SEQ: *seq = field; break;
      case QUAL: *qual = field; break;
      default: return false;
    }
    if (++i > 11) {
      *extra = strtok(NULL, "\n");
      break;
    }
    field = strtok(NULL, TAB);
  }
  return i > 11;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, %r13
movq %rdi, %rbp
movq 0x80(%rsp), %rax
movq $0x0, (%rax)
leaq 0x6eb1(%rip), %rsi      # 0x13b61
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x2280
testq %rax, %rax
je 0xcd6b
movl $0x2, %r15d
leaq 0x5698(%rip), %r12      # 0x12368
leaq 0x6e8a(%rip), %rbx      # 0x13b61
leal -0x2(%r15), %ecx
movslq (%r12,%rcx,4), %rcx
addq %r12, %rcx
jmpq *%rcx
movq %rax, %rdi
callq 0x3961
movw %ax, (%rbp)
jmp 0xcd52
movq 0x18(%rsp), %rcx
jmp 0xcd4f
movq %rax, %rdi
callq 0x3961
decl %eax
movq 0x8(%rsp), %rcx
jmp 0xcd46
movq %rax, %rdi
callq 0x3961
movq 0x10(%rsp), %rcx
movb %al, (%rcx)
jmp 0xcd52
movq %rax, %rdi
callq 0x3961
movq 0x68(%rsp), %rcx
jmp 0xcd46
movq %rax, (%r13)
jmp 0xcd52
movq 0x20(%rsp), %rcx
jmp 0xcd4f
movq %rax, %rdi
callq 0x3961
decl %eax
movq 0x60(%rsp), %rcx
movl %eax, (%rcx)
jmp 0xcd52
movq 0x70(%rsp), %rcx
movq %rax, (%rcx)
incl %r15d
xorl %r14d, %r14d
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2280
testq %rax, %rax
jne 0xccd7
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x78(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x6923(%rip), %rsi      # 0x136af
xorl %edi, %edi
callq 0x2280
movq 0x80(%rsp), %rcx
movq %rax, (%rcx)
movb $0x1, %r14b
jmp 0xcd6b
// File: /workspace/github_c_makefile_star2_O3/jsh58[P]Genrich/Genrich.c
// Function: getScore
float getScore(char* extra) {
  if (extra == NULL)
    return NOSCORE;
  char* end;
  char* field = strtok_r(extra, TAB, &end);
  while (field != NULL) {
    char* tag = strtok(field, COL);
    if (!strcmp(tag, SCORE)) {
      for (int i = 0; i < 2; i++) {
        tag = strtok(NULL, COL);
        if (tag == NULL)
          return NOSCORE;
        if (i)
          return getFloat(tag);
      }
    }
    field = strtok_r(NULL, TAB, &end);
  }
  return NOSCORE;
}

// Assembly:
testq %rdi, %rdi
je 0xce71
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x6da3(%rip), %rsi      # 0x13b61
movq %rsp, %rdx
callq 0x2190
movss 0x53a6(%rip), %xmm0     # 0x12174
testq %rax, %rax
sete %bpl
je 0xce87
movq %rax, %rbx
leaq 0x6d90(%rip), %r14      # 0x13b75
movq %rsp, %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2280
cmpb $0x41, (%rax)
jne 0xce4e
cmpb $0x53, 0x1(%rax)
jne 0xce4e
movb 0x2(%rax), %r13b
testb %r13b, %r13b
jne 0xce4e
movb $0x1, %r15b
xorl %edi, %edi
movq %r14, %rsi
callq 0x2280
testq %rax, %rax
je 0xce3f
testb $0x1, %r15b
movl $0x0, %r15d
jne 0xce0a
testb %r13b, %r13b
sete %r15b
movq %rax, %rdi
callq 0x3937
orb %bpl, %r15b
testb $0x1, %r15b
je 0xcde8
jmp 0xce7a
testb %r13b, %r13b
sete %al
orb %bpl, %al
testb $0x1, %al
je 0xcde8
jmp 0xce7f
xorl %edi, %edi
leaq 0x6d0a(%rip), %rsi      # 0x13b61
movq %r12, %rdx
callq 0x2190
movq %rax, %rbx
testq %rax, %rax
sete %bpl
jne 0xcde8
jmp 0xce7f
movss 0x52fb(%rip), %xmm0     # 0x12174
retq
testb %r13b, %r13b
je 0xce87
movss 0x52ed(%rip), %xmm0     # 0x12174
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsh58[P]Genrich/Genrich.c
// Function: parseCigar
int parseCigar(char* cigar, int* offset) {
  int length = 0; // length of sequence
  int pos = 0;    // position of current op in cigar
  char op;
  int len = strlen(cigar);
  for (int i = 0; i < len; i++) {
    if (cigar[i] < 0x30 || cigar[i] > 0x39) {
      op = cigar[i];
      cigar[i] = '\0';
      int opLen = getInt(cigar + pos); // length of current op
      switch (op) {
        case 'M':
        case '=':
        case 'X':
          length += opLen;
          break;
        case 'I':
        case 'S':
          length += opLen;
          *offset -= opLen;
          break;
        case 'D':
          *offset += opLen;
          break;
        case 'N':
        case 'H':
        case 'P':
          break;
        default: ;
          char msg[4] = "' '";
          msg[1] = op;
          exit(error(msg, ERRCIGAR));
      }
      pos = i + 1;
    }
  }
  return length;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
callq 0x20f0
movq %rax, %r15
testl %r15d, %r15d
jle 0xcf46
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movl $0x141, %ebx            # imm = 0x141
xorl %ebp, %ebp
xorl %eax, %eax
movzbl (%r14,%r13), %r12d
leal -0x3a(%r12), %ecx
cmpb $-0xa, %cl
jae 0xcf22
movb $0x0, (%r14,%r13)
movslq %eax, %rdi
addq %r14, %rdi
callq 0x3961
leal -0x48(%r12), %ecx
cmpl $0x10, %ecx
ja 0xcf12
btl %ecx, %ebx
jb 0xcf39
movl $0x802, %edx            # imm = 0x802
btl %ecx, %edx
jb 0xcf27
movl $0x10020, %edx          # imm = 0x10020
btl %ecx, %edx
jb 0xcf1e
cmpl $0x44, %r12d
je 0xcf32
cmpl $0x3d, %r12d
jne 0xcf59
addl %eax, %ebp
jmp 0xcf39
incq %r13
jmp 0xcf3f
addl %eax, %ebp
movq 0x8(%rsp), %rcx
subl %eax, (%rcx)
jmp 0xcf39
movq 0x8(%rsp), %rcx
addl %eax, (%rcx)
incq %r13
movl %r13d, %eax
cmpq %r15, %r13
jne 0xced0
jmp 0xcf48
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x14(%rsp), %rdi
movl %r12d, %esi
callq 0x2fce
// File: /workspace/github_c_makefile_star2_O3/jsh58[P]Genrich/Genrich.c
// Function: calcDist
int calcDist(char* qname, char* seq, char* cigar) {
  int length = strcmp(seq, "*") ? strlen(seq) : 0;
  int offset = 0;
  if (strcmp(cigar, "*")) {
    int len = parseCigar(cigar, &offset);
    if (! length)
      length = len;
    else if (length != len)
      exit(error(qname, ERRMISM));
  } else if (! length)
    exit(error(qname, ERRINFO));
  return length + offset;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rdi, %rbx
cmpb $0x2a, (%rsi)
jne 0xcf80
cmpb $0x0, 0x1(%rsi)
je 0xcfc4
movq %rsi, %rdi
callq 0x20f0
movq %rax, %r14
movl $0x0, 0xc(%rsp)
cmpb $0x2a, (%r15)
jne 0xcfa0
cmpb $0x0, 0x1(%r15)
je 0xcfc9
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
callq 0xce96
testl %r14d, %r14d
je 0xcfbf
cmpl %eax, %r14d
je 0xcfce
movq %rbx, %rdi
callq 0x2fe9
movl %eax, %r14d
jmp 0xcfce
xorl %r14d, %r14d
jmp 0xcf8b
testl %r14d, %r14d
je 0xcfe0
addl 0xc(%rsp), %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x2ffa
// File: /workspace/github_c_makefile_star2_O3/jsh58[P]Genrich/Genrich.c
// Function: readInt32
int32_t readInt32(gzFile in, bool end) {
  int32_t ans = 0;
  for (int i = 0; i < sizeof(int32_t); i++) {
    int m = gzgetc(in);
    if (m == -1) {
      if (end)
        exit(error("", ERRBAM));
      else
        return EOF;
    }
    ans = ans | ((m & 0xFF) << (i*8));
  }
  return ans;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
xorl %ebp, %ebp
movl (%r14), %eax
testl %eax, %eax
je 0xd9d9
decl %eax
movl %eax, (%r14)
incq 0x10(%r14)
movq 0x8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r14)
movzbl (%rax), %eax
jmp 0xd9e6
movq %r14, %rdi
callq 0x20a0
cmpl $-0x1, %eax
je 0xd9fc
movzbl %al, %eax
movl %r15d, %ecx
shll %cl, %eax
orl %eax, %ebp
addl $0x8, %r15d
cmpl $0x20, %r15d
jne 0xd9b8
jmp 0xda05
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %bl, %bl
jne 0xda12
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x3060
// File: /workspace/github_c_makefile_star2_O3/jsh58[P]Genrich/Genrich.c
// Function: loadInt32
int32_t loadInt32(char** block) {
  int32_t ans = 0;
  for (int i = 0; i < sizeof(int32_t); i++) {
    ans = ans | ((**block & 0xFF) << (i*8));
    (*block)++;
  }
  return ans;
}

// Assembly:
movq (%rdi), %rdx
incq %rdx
xorl %ecx, %ecx
xorl %eax, %eax
movzbl -0x1(%rdx), %esi
shll %cl, %esi
orl %esi, %eax
movq %rdx, (%rdi)
addl $0x8, %ecx
incq %rdx
cmpl $0x20, %ecx
jne 0xda21
retq
// File: /workspace/github_c_makefile_star2_O3/jsh58[P]Genrich/Genrich.c
// Function: calcDistBAM
int calcDistBAM(int32_t l_seq, uint16_t n_cigar_op,
    uint32_t* cigar) {
  int length = l_seq;
  for (int i = 0; i < n_cigar_op; i++) {
    uint8_t op = cigar[i] & 0xF;
    uint32_t op_len = cigar[i] >> 4;
    if (op == 1 || op == 4)  // 'I' or 'S'
      length -= op_len;
    else if (op == 2)        // 'D'
      length += op_len;
  }
  return length;
}

// Assembly:
movl %edi, %eax
testl %esi, %esi
je 0xdc00
movzwl %si, %ecx
xorl %esi, %esi
movl (%rdx,%rsi,4), %edi
movl %edi, %r8d
andl $0xf, %r8d
shrl $0x4, %edi
cmpl $0x4, %r8d
je 0xdbf2
cmpl $0x2, %r8d
je 0xdbf6
cmpl $0x1, %r8d
jne 0xdbf8
subl %edi, %eax
jmp 0xdbf8
addl %edi, %eax
incq %rsi
cmpq %rsi, %rcx
jne 0xdbd3
retq
// File: /workspace/github_c_makefile_star2_O3/jsh58[P]Genrich/Genrich.c
// Function: arrayLen
int arrayLen(char* extra) {
  int size = 0;
  switch (extra[0]) {
    case 'c': size = sizeof(int8_t); break;
    case 'C': size = sizeof(uint8_t); break;
    case 's': size = sizeof(int16_t); break;
    case 'S': size = sizeof(uint16_t); break;
    case 'i': size = sizeof(int32_t); break;
    case 'I': size = sizeof(uint32_t); break;
    case 'f': size = sizeof(float); break;
    default: ;
      char msg[4] = "' '";
      msg[1] = extra[0];
      exit(error(msg, ERRTYPE));
  }
  extra++;
  int32_t count = loadInt32(&extra);
  return 1 + sizeof(int32_t) + size * count;
}

// Assembly:
pushq %rax
movzbl (%rdi), %esi
movl $0x1, %edx
cmpl $0x62, %esi
jle 0xdc20
cmpl $0x68, %esi
jg 0xdc39
cmpl $0x63, %esi
je 0xdc4f
cmpl $0x66, %esi
je 0xdc4a
jmp 0xdc2f
cmpl $0x43, %esi
je 0xdc4f
cmpl $0x49, %esi
je 0xdc4a
cmpl $0x53, %esi
je 0xdc43
leaq 0x4(%rsp), %rdi
callq 0x3078
cmpl $0x69, %esi
je 0xdc4a
cmpl $0x73, %esi
jne 0xdc2f
movl $0x2, %edx
jmp 0xdc4f
movl $0x4, %edx
incq %rdi
xorl %ecx, %ecx
xorl %eax, %eax
movzbl (%rdi), %esi
shll %cl, %esi
orl %esi, %eax
addl $0x8, %ecx
incq %rdi
cmpl $0x20, %ecx
jne 0xdc56
imull %edx, %eax
addl $0x5, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/jsh58[P]Genrich/Genrich.c
// Function: loadInt
int64_t loadInt(char* block, size_t size) {
  int64_t ans = 0;
  for (int i = 0; i < size; i++)
    ans = ans | ((block[i] & 0xFF) << (i*8));
  return ans;
}

// Assembly:
xorl %ecx, %ecx
testq %rsi, %rsi
je 0xdc95
xorl %edx, %edx
xorl %eax, %eax
movzbl (%rdi,%rdx), %r8d
shll %cl, %r8d
movslq %r8d, %r8
orq %r8, %rax
incq %rdx
addl $0x8, %ecx
cmpq %rdx, %rsi
jne 0xdc7b
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jsh58[P]Genrich/Genrich.c
// Function: openWrite
void openWrite(char* outFile, File* out, bool gz) {
  if (outFile[0] == '-' && strlen(outFile) > 1)
    exit(error(outFile, ERRNAME));
  if (gz) {
    if (!strcmp(outFile + strlen(outFile) - strlen(GZEXT), GZEXT)
        || !strcmp(outFile, "/dev/null"))
      out->gzf = gzopen(outFile, "w");
    else if (!strcmp(outFile, "-"))
      out->gzf = gzdopen(fileno(stdout), "wb");
    else {
      // add ".gz" to outFile
      char* outFile2 = memalloc(strlen(outFile)
        + strlen(GZEXT) + 1);
      strcpy(outFile2, outFile);
      strcat(outFile2, GZEXT);
      out->gzf = gzopen(outFile2, "w");
      free(outFile2);
    }
    if (out->gzf == NULL)
      exit(error(outFile, ERROPENW));
  } else {
    out->f = (strcmp(outFile, "-") ?
      fopen(outFile, "w") : stdout);
    if (out->f == NULL)
      exit(error(outFile, ERROPENW));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movb (%rdi), %r12b
cmpb $0x2d, %r12b
jne 0xec2c
movq %rbx, %rdi
callq 0x20f0
cmpq $0x2, %rax
jae 0xed29
testb %bpl, %bpl
jne 0xec35
cmpb $0x0, 0x1(%rbx)
jne 0xecc8
movq 0xb39c(%rip), %rax      # 0x19fc0
movq (%rax), %rax
jmp 0xecd7
testb %bpl, %bpl
je 0xecc8
movq %rbx, %rdi
callq 0x20f0
movq %rax, %r15
leaq (%rbx,%rax), %rdi
addq $-0x3, %rdi
leaq 0x4f59(%rip), %rsi      # 0x13ba8
callq 0x21b0
testl %eax, %eax
je 0xece7
leaq 0x4f49(%rip), %rsi      # 0x13bac
movq %rbx, %rdi
callq 0x21b0
testl %eax, %eax
je 0xece7
cmpb $0x2d, %r12b
jne 0xec7f
cmpb $0x0, 0x1(%rbx)
je 0xed0a
addq $0x4, %r15
movq %r15, %rdi
callq 0x3913
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2070
movq %r12, %rdi
callq 0x20f0
movl $0x7a672e, (%r12,%rax)  # imm = 0x7A672E
leaq 0x4f06(%rip), %rsi      # 0x13bb6
movq %r12, %rdi
callq 0x2260
movq %rax, %r15
movq %rax, (%r14)
movq %r12, %rdi
callq 0x2040
jmp 0xecfc
leaq 0x4ee7(%rip), %rsi      # 0x13bb6
movq %rbx, %rdi
callq 0x2270
movq %rax, (%r14)
testq %rax, %rax
jne 0xed01
movq %rbx, %rdi
callq 0x31e2
leaq 0x4ec8(%rip), %rsi      # 0x13bb6
movq %rbx, %rdi
callq 0x2260
movq %rax, %r15
movq %rax, (%r14)
testq %r15, %r15
je 0xed31
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xb2af(%rip), %rax      # 0x19fc0
movq (%rax), %rdi
callq 0x2220
leaq 0x4e98(%rip), %rsi      # 0x13bb8
movl %eax, %edi
callq 0x20c0
jmp 0xecf6
movq %rbx, %rdi
callq 0x3204
movq %rbx, %rdi
callq 0x31f3
// File: /workspace/github_c_makefile_star2_O3/jsh58[P]Genrich/Genrich.c
// Function: checkBAM
bool checkBAM(File in, bool gz) {
  if (! gz)
    return false;
  char magic[5] = "BAM\1";  // BAM magic string
  for (int i = 0; i < 4; i++) {
    char m = gzgetc(in.gzf);
    if (m == -1)
      exit(error("", ERROPEN));
    if (m != magic[i]) {
      // push back chars before returning false
      if (gzungetc(m, in.gzf) == -1)
        exit(error("", ERRUNGET));
      for (int j = i - 1; j > -1; j--)
        if (gzungetc(magic[j], in.gzf) == -1)
          exit(error("", ERRUNGET));
      return false;
    }
  }
  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testl %esi, %esi
je 0xedbc
movq %rdi, %rbx
xorl %r14d, %r14d
leaq 0x4e6c(%rip), %r15      # 0x13bbb
movl (%rbx), %eax
testl %eax, %eax
je 0xed6d
decl %eax
movl %eax, (%rbx)
incq 0x10(%rbx)
movq 0x8(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rbx)
movb (%rax), %al
jmp 0xed75
movq %rbx, %rdi
callq 0x20a0
cmpb $-0x1, %al
je 0xedc4
cmpb (%r14,%r15), %al
jne 0xed8c
incq %r14
cmpq $0x4, %r14
jne 0xed4f
movb $0x1, %al
jmp 0xedbe
movsbl %al, %edi
movq %rbx, %rsi
callq 0x20b0
cmpl $-0x1, %eax
je 0xedc9
testq %r14, %r14
jle 0xedbc
movsbl -0x1(%r14,%r15), %edi
decq %r14
movq %rbx, %rsi
callq 0x20b0
cmpl $-0x1, %eax
jne 0xed9c
callq 0x3215
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
callq 0x3245
callq 0x322d
// File: /workspace/github_c_makefile_star2_O3/jsh58[P]Genrich/Genrich.c
// Function: openRead
bool openRead(char* inFile, File* in) {

  // open file or stdin
  bool stdinBool = ! strcmp(inFile, "-");
  FILE* dummy = (stdinBool ? stdin : fopen(inFile, "r"));
  if (dummy == NULL)
    exit(error(inFile, ERROPEN));

  // check for gzip compression: magic number 0x1F, 0x8B
  bool gzip = true;
  int save = 0;  // first char to pushback (for stdin)
  int i, j;
  for (i = 0; i < 2; i++) {
    j = fgetc(dummy);
    if (j == EOF)
      exit(error(inFile, ERROPEN));
    if ( (i && (unsigned char) j != 0x8B)
        || (! i && (unsigned char) j != 0x1F) ) {
      gzip = false;
      break;
    }
    if (! i)
      save = j;
  }

  // for stdin, push back chars
  if (stdinBool) {
    if (gzip)
      exit(error("", ERRGZIP));
    if (ungetc(j, dummy) == EOF)
      exit(error("", ERRUNGET));
    if (i && ungetc(save, dummy) == EOF)
      exit(error("", ERRUNGET));
  }

  // open file
  if (gzip) {
    if (fclose(dummy))
      exit(error("<dummy>", ERRCLOSE));
    in->gzf = gzopen(inFile, "r");
    if (in->gzf == NULL)
      exit(error(inFile, ERROPEN));
  } else {
    if (! stdinBool)
      rewind(dummy);
    in->f = dummy;
  }

  return gzip;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
cmpb $0x2d, (%rdi)
movq %rdi, 0x8(%rsp)
jne 0xedf5
cmpb $0x0, 0x1(%rdi)
je 0xeeeb
leaq 0x39ee(%rip), %rsi      # 0x127ea
callq 0x2270
movq %rax, %r15
movl $0x0, 0x4(%rsp)
testq %r15, %r15
je 0xef0a
xorl %ebp, %ebp
movb $0x1, %bl
movl $0x1f, %r14d
movq %r15, %rdi
callq 0x2150
cmpl $-0x1, %eax
je 0xef00
movzbl %al, %r12d
testb $0x1, %bl
movl $0x8b, %r13d
cmovnel %r14d, %r13d
cmpl %r13d, %r12d
jne 0xee97
testb $0x1, %bl
cmovnel %eax, %ebp
movl $0x0, %ebx
jne 0xee1f
cmpb $0x0, 0x4(%rsp)
jne 0xef14
movq %r15, %rdi
callq 0x20d0
testl %eax, %eax
jne 0xef19
leaq 0x3975(%rip), %rsi      # 0x127ea
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2260
movq 0x10(%rsp), %rcx
movq %rax, (%rcx)
testq %rax, %rax
jne 0xeed6
movq %rbx, %rdi
callq 0x32a6
cmpb $0x0, 0x4(%rsp)
je 0xeec6
movl %eax, %edi
movq %r15, %rsi
callq 0x2240
cmpl $-0x1, %eax
je 0xef1e
testb $0x1, %bl
jne 0xeece
movl %ebp, %edi
movq %r15, %rsi
callq 0x2240
cmpl $-0x1, %eax
jne 0xeece
callq 0x325e
movq %r15, %rdi
callq 0x2120
movq 0x10(%rsp), %rax
movq %r15, (%rax)
cmpl %r13d, %r12d
sete %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xb0d6(%rip), %rax      # 0x19fc8
movq (%rax), %r15
movb $0x1, %al
movl %eax, 0x4(%rsp)
jmp 0xee0c
movq 0x8(%rsp), %rdi
callq 0x32d0
movq 0x8(%rsp), %rdi
callq 0x32e2
callq 0x32b8
callq 0x328e
callq 0x3276
// File: /workspace/github_c_makefile_star2_O3/jsh58[P]Genrich/Genrich.c
// Function: saveXChrom
int saveXChrom(char* xchrom, char*** xchrList) {
  int i = 0;
  char* chrom = strtok(xchrom, COM);
  while (chrom != NULL) {
    *xchrList = (char**) memrealloc(*xchrList,
      (i + 1) * sizeof(char*));
    (*xchrList)[i] = (char*) memalloc(1 + strlen(chrom));
    strcpy((*xchrList)[i], chrom);
    i++;
    chrom = strtok(NULL, COM);
  }
  return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x2fb2(%rip), %rsi      # 0x13bc8
callq 0x2280
testq %rax, %rax
je 0x10c86
movq %rax, %r13
movl $0x8, %r15d
xorl %r14d, %r14d
leaq 0x2f95(%rip), %r12      # 0x13bc8
movq %r14, %rbp
movq (%rbx), %rdi
incq %r14
movq %r15, %rsi
callq 0x3925
movq %rax, (%rbx)
movq %r13, %rdi
callq 0x20f0
leaq 0x1(%rax), %rdi
callq 0x3913
movq (%rbx), %rcx
movq %rax, (%rcx,%rbp,8)
movq (%rbx), %rax
movq (%rax,%rbp,8), %rdi
movq %r13, %rsi
callq 0x2070
xorl %edi, %edi
movq %r12, %rsi
callq 0x2280
movq %rax, %r13
addq $0x8, %r15
testq %rax, %rax
jne 0x10c33
jmp 0x10c89
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/croutine.c
// Function: xCoRoutineCreate
signed portBASE_TYPE xCoRoutineCreate( crCOROUTINE_CODE pxCoRoutineCode, unsigned portBASE_TYPE uxPriority, unsigned portBASE_TYPE uxIndex )
{
signed portBASE_TYPE xReturn;
corCRCB *pxCoRoutine;

	/* Allocate the memory that will store the co-routine control block. */
	pxCoRoutine = ( corCRCB * ) pvPortMalloc( sizeof( corCRCB ) );
	if( pxCoRoutine )
	{
		/* If pxCurrentCoRoutine is NULL then this is the first co-routine to
		be created and the co-routine data structures need initialising. */
		if( pxCurrentCoRoutine == NULL )
		{
			pxCurrentCoRoutine = pxCoRoutine;
			prvInitialiseCoRoutineLists();
		}

		/* Check the priority is within limits. */
		if( uxPriority >= configMAX_CO_ROUTINE_PRIORITIES )
		{
			uxPriority = configMAX_CO_ROUTINE_PRIORITIES - 1;
		}

		/* Fill out the co-routine control block from the function parameters. */
		pxCoRoutine->uxState = corINITIAL_STATE;
		pxCoRoutine->uxPriority = uxPriority;
		pxCoRoutine->uxIndex = uxIndex;
		pxCoRoutine->pxCoRoutineFunction = pxCoRoutineCode;

		/* Initialise all the other co-routine control block parameters. */
		vListInitialiseItem( &( pxCoRoutine->xGenericListItem ) );
		vListInitialiseItem( &( pxCoRoutine->xEventListItem ) );

		/* Set the co-routine control block as a link back from the xListItem.
		This is so we can get back to the containing CRCB from a generic item
		in a list. */
		listSET_LIST_ITEM_OWNER( &( pxCoRoutine->xGenericListItem ), pxCoRoutine );
		listSET_LIST_ITEM_OWNER( &( pxCoRoutine->xEventListItem ), pxCoRoutine );
	
		/* Event lists are always in priority order. */
		listSET_LIST_ITEM_VALUE( &( pxCoRoutine->xEventListItem ), configMAX_PRIORITIES - ( portTickType ) uxPriority );
		
		/* Now the co-routine has been initialised it can be added to the ready
		list at the correct priority. */
		prvAddCoRoutineToReadyQueue( pxCoRoutine );

		xReturn = pdPASS;
	}
	else
	{		
		xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY;
	}
	
	return xReturn;	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movl $0x70, %edi
callq 0x42e0
testq %rax, %rax
je 0x4925
movq %rax, %rbx
movq 0x7730(%rip), %rax      # 0xbfd0
cmpq $0x0, (%rax)
jne 0x48ae
movq %rbx, (%rax)
callq 0x4490
xorl %r13d, %r13d
testq %r12, %r12
setne %r13b
movw $0x0, 0x68(%rbx)
movq %r13, 0x58(%rbx)
movq %r14, 0x60(%rbx)
movq %r15, (%rbx)
leaq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x4050
movq %rbx, %rdi
addq $0x30, %rdi
callq 0x4050
movq %rbx, 0x20(%rbx)
movq %rbx, 0x48(%rbx)
movl $0xa, %eax
subl %r13d, %eax
movl %eax, 0x30(%rbx)
movq 0x58(%rbx), %rax
movq 0x7679(%rip), %rcx      # 0xbf78
cmpq (%rcx), %rax
jbe 0x4907
movq %rax, (%rcx)
leaq (%rax,%rax,4), %rdi
shlq $0x3, %rdi
addq 0x758a(%rip), %rdi      # 0xbea0
movq %r14, %rsi
callq 0x4730
movl $0x1, %eax
jmp 0x492c
movq $-0x1, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/croutine.c
// Function: prvInitialiseCoRoutineLists
static void prvInitialiseCoRoutineLists( void )
{
unsigned portBASE_TYPE uxPriority;

	for( uxPriority = 0; uxPriority < configMAX_CO_ROUTINE_PRIORITIES; uxPriority++ )
	{
		vListInitialise( ( xList * ) &( pxReadyCoRoutineLists[ uxPriority ] ) );
	}

	vListInitialise( ( xList * ) &xDelayedCoRoutineList1 );
	vListInitialise( ( xList * ) &xDelayedCoRoutineList2 );
	vListInitialise( ( xList * ) &xPendingReadyCoRoutineList );

	/* Start with pxDelayedCoRoutineList using list1 and the
	pxOverflowDelayedCoRoutineList using list2. */
	pxDelayedCoRoutineList = &xDelayedCoRoutineList1;
	pxOverflowDelayedCoRoutineList = &xDelayedCoRoutineList2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x7557(%rip), %rbx      # 0xbea0
movq %rbx, %rdi
callq 0x4390
addq $0x28, %rbx
movq %rbx, %rdi
callq 0x4390
movq 0x760c(%rip), %rbx      # 0xbf70
movq %rbx, %rdi
callq 0x4390
movq 0x753d(%rip), %r14      # 0xbeb0
movq %r14, %rdi
callq 0x4390
movq 0x7596(%rip), %rdi      # 0xbf18
callq 0x4390
movq 0x763a(%rip), %rax      # 0xbfc8
movq %rbx, (%rax)
movq 0x74f0(%rip), %rax      # 0xbe88
movq %r14, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/croutine.c
// Function: vCoRoutineAddToDelayedList
void vCoRoutineAddToDelayedList( portTickType xTicksToDelay, xList *pxEventList )
{
portTickType xTimeToWake;

	/* Calculate the time to wake - this may overflow but this is
	not a problem. */
	xTimeToWake = xCoRoutineTickCount + xTicksToDelay;

	/* We must remove ourselves from the ready list before adding
	ourselves to the blocked list as the same list item is used for
	both lists. */
	vListRemove( ( xListItem * ) &( pxCurrentCoRoutine->xGenericListItem ) );

	/* The list item will be inserted in wake time order. */
	listSET_LIST_ITEM_VALUE( &( pxCurrentCoRoutine->xGenericListItem ), xTimeToWake );

	if( xTimeToWake < xCoRoutineTickCount )
	{
		/* Wake time has overflowed.  Place this item in the
		overflow list. */
		vListInsert( ( xList * ) pxOverflowDelayedCoRoutineList, ( xListItem * ) &( pxCurrentCoRoutine->xGenericListItem ) );
	}
	else
	{
		/* The wake time has not overflowed, so we can use the
		current block list. */
		vListInsert( ( xList * ) pxDelayedCoRoutineList, ( xListItem * ) &( pxCurrentCoRoutine->xGenericListItem ) );
	}

	if( pxEventList )
	{
		/* Also add the co-routine to an event list.  If this is done then the
		function must be called with interrupts disabled. */
		vListInsert( pxEventList, &( pxCurrentCoRoutine->xEventListItem ) );
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %r14d
movq 0x75eb(%rip), %r12      # 0xbfa0
addl (%r12), %r14d
movq %rsi, %rbx
movq 0x760d(%rip), %r15      # 0xbfd0
movq (%r15), %rdi
addq $0x8, %rdi
callq 0x4040
movq (%r15), %rsi
movl %r14d, 0x8(%rsi)
addq $0x8, %rsi
cmpl (%r12), %r14d
jae 0x49e9
movq 0x74a1(%rip), %rax      # 0xbe88
jmp 0x49f0
movq 0x75d8(%rip), %rax      # 0xbfc8
movq (%rax), %rdi
callq 0x4090
testq %rbx, %rbx
je 0x4a14
movq (%r15), %rsi
addq $0x30, %rsi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4090
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/croutine.c
// Function: prvCheckPendingReadyList
static void prvCheckPendingReadyList( void )
{
	/* Are there any co-routines waiting to get moved to the ready list?  These
	are co-routines that have been readied by an ISR.  The ISR cannot access
	the	ready lists itself. */
	while( !listLIST_IS_EMPTY( &xPendingReadyCoRoutineList ) )
	{
		corCRCB *pxUnblockedCRCB;

		/* The pending ready list can be accessed by an ISR. */
		portDISABLE_INTERRUPTS();
		{	
			pxUnblockedCRCB = ( corCRCB * ) listGET_OWNER_OF_HEAD_ENTRY( (&xPendingReadyCoRoutineList) );			
			vListRemove( &( pxUnblockedCRCB->xEventListItem ) );
		}
		portENABLE_INTERRUPTS();

		vListRemove( &( pxUnblockedCRCB->xGenericListItem ) );
		prvAddCoRoutineToReadyQueue( pxUnblockedCRCB );	
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x74e6(%rip), %r14      # 0xbf18
cmpq $0x0, (%r14)
je 0x4a9d
movq 0x7539(%rip), %r15      # 0xbf78
movq 0x745a(%rip), %r12      # 0xbea0
callq 0x4310
cmpq $0x0, (%r14)
je 0x4a5b
movq 0x18(%r14), %rax
movq 0x18(%rax), %r13
jmp 0x4a5e
xorl %r13d, %r13d
leaq 0x30(%r13), %rdi
callq 0x4040
callq 0x43c0
leaq 0x8(%r13), %rbx
movq %rbx, %rdi
callq 0x4040
movq 0x58(%r13), %rax
cmpq (%r15), %rax
jbe 0x4a84
movq %rax, (%r15)
leaq (%rax,%rax,4), %rdi
shlq $0x3, %rdi
addq %r12, %rdi
movq %rbx, %rsi
callq 0x4730
cmpq $0x0, (%r14)
jne 0x4a46
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/croutine.c
// Function: vCoRoutineSchedule
void vCoRoutineSchedule( void )
{
	/* See if any co-routines readied by events need moving to the ready lists. */
	prvCheckPendingReadyList();

	/* See if any delayed co-routines have timed out. */
	prvCheckDelayedList();

	/* Find the highest priority queue that contains ready co-routines. */
	while( listLIST_IS_EMPTY( &( pxReadyCoRoutineLists[ uxTopCoRoutineReadyPriority ] ) ) )
	{
		if( uxTopCoRoutineReadyPriority == 0 )
		{
			/* No more co-routines to check. */
			return;
		}
		--uxTopCoRoutineReadyPriority;
	}

	/* listGET_OWNER_OF_NEXT_ENTRY walks through the list, so the co-routines
	 of the	same priority get an equal share of the processor time. */
	listGET_OWNER_OF_NEXT_ENTRY( pxCurrentCoRoutine, &( pxReadyCoRoutineLists[ uxTopCoRoutineReadyPriority ] ) );

	/* Call the co-routine. */
	( pxCurrentCoRoutine->pxCoRoutineFunction )( pxCurrentCoRoutine, pxCurrentCoRoutine->uxIndex );

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x41d0
callq 0x4370
movq 0x73b3(%rip), %rax      # 0xbf78
movq (%rax), %rcx
leaq (%rcx,%rcx,4), %rdx
movq 0x72cd(%rip), %rsi      # 0xbea0
cmpq $0x0, (%rsi,%rdx,8)
je 0x4be0
leaq (%rsi,%rdx,8), %rsi
jmp 0x4c08
decq %rcx
shlq $0x3, %rdx
addq 0x72b2(%rip), %rdx      # 0xbea0
cmpq $-0x1, %rcx
je 0x4c3d
movq %rcx, (%rax)
leaq -0x28(%rdx), %rsi
decq %rcx
cmpq $0x0, -0x28(%rdx)
movq %rsi, %rdx
je 0x4bee
movq 0x8(%rsi), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsi)
leaq 0x10(%rsi), %rcx
cmpq %rcx, %rax
jne 0x4c25
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsi)
movq 0x18(%rax), %rdi
movq 0x73a0(%rip), %rax      # 0xbfd0
movq %rdi, (%rax)
movq (%rdi), %rax
movq 0x60(%rdi), %rsi
popq %rbp
jmpq *%rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/croutine.c
// Function: xCoRoutineRemoveFromEventList
signed portBASE_TYPE xCoRoutineRemoveFromEventList( const xList *pxEventList )
{
corCRCB *pxUnblockedCRCB;
signed portBASE_TYPE xReturn;

	/* This function is called from within an interrupt.  It can only access
	event lists and the pending ready list. */
	pxUnblockedCRCB = ( corCRCB * ) listGET_OWNER_OF_HEAD_ENTRY( pxEventList );
	vListRemove( &( pxUnblockedCRCB->xEventListItem ) );
	vListInsertEnd( ( xList * ) &( xPendingReadyCoRoutineList ), &( pxUnblockedCRCB->xEventListItem ) );

	if( pxUnblockedCRCB->uxPriority >= pxCurrentCoRoutine->uxPriority )
	{
		xReturn = pdTRUE;
	}
	else
	{
		xReturn = pdFALSE;
	}

	return xReturn;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpq $0x0, (%rdi)
je 0x4c56
movq 0x18(%rdi), %rax
movq 0x18(%rax), %r14
jmp 0x4c59
xorl %r14d, %r14d
leaq 0x30(%r14), %rbx
movq %rbx, %rdi
callq 0x4040
movq 0x72ac(%rip), %rdi      # 0xbf18
movq %rbx, %rsi
callq 0x4730
movq 0x58(%r14), %rcx
movq 0x7351(%rip), %rax      # 0xbfd0
movq (%rax), %rdx
xorl %eax, %eax
cmpq 0x58(%rdx), %rcx
setae %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/queue.c
// Function: xQueueCreate
xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBASE_TYPE uxItemSize )
{
xQUEUE *pxNewQueue;
size_t xQueueSizeInBytes;

	/* Allocate the new queue structure. */
	if( uxQueueLength > ( unsigned portBASE_TYPE ) 0 )
	{
		pxNewQueue = ( xQUEUE * ) pvPortMalloc( sizeof( xQUEUE ) );
		if( pxNewQueue != NULL )
		{
			/* Create the list of pointers to queue items.  The queue is one byte
			longer than asked for to make wrap checking easier/faster. */
			xQueueSizeInBytes = ( size_t ) ( uxQueueLength * uxItemSize ) + ( size_t ) 1;

			pxNewQueue->pcHead = ( signed char * ) pvPortMalloc( xQueueSizeInBytes );
			if( pxNewQueue->pcHead != NULL )
			{
				/* Initialise the queue members as described above where the
				queue type is defined. */
				pxNewQueue->pcTail = pxNewQueue->pcHead + ( uxQueueLength * uxItemSize );
				pxNewQueue->uxMessagesWaiting = 0;
				pxNewQueue->pcWriteTo = pxNewQueue->pcHead;
				pxNewQueue->pcReadFrom = pxNewQueue->pcHead + ( ( uxQueueLength - 1 ) * uxItemSize );
				pxNewQueue->uxLength = uxQueueLength;
				pxNewQueue->uxItemSize = uxItemSize;
				pxNewQueue->xRxLock = queueUNLOCKED;
				pxNewQueue->xTxLock = queueUNLOCKED;

				/* Likewise ensure the event queues start with the correct state. */
				vListInitialise( &( pxNewQueue->xTasksWaitingToSend ) );
				vListInitialise( &( pxNewQueue->xTasksWaitingToReceive ) );

				traceQUEUE_CREATE( pxNewQueue );
				return  pxNewQueue;
			}
			else
			{
				traceQUEUE_CREATE_FAILED();
				vPortFree( pxNewQueue );
			}
		}
	}

	/* Will only reach here if we could not allocate enough memory or no memory
	was required. */
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x4e11
movq %rsi, %r14
movq %rdi, %r15
movl $0x98, %edi
callq 0x42e0
testq %rax, %rax
je 0x4e11
movq %rax, %rbx
movq %r14, %r12
imulq %r15, %r12
leaq 0x1(%r12), %rdi
callq 0x42e0
movq %rax, (%rbx)
testq %rax, %rax
je 0x4e09
addq %rax, %r12
movq %r12, 0x8(%rbx)
movq $0x0, 0x70(%rbx)
movq %rax, 0x10(%rbx)
leaq -0x1(%r15), %rcx
imulq %r14, %rcx
addq %rax, %rcx
movq %rcx, 0x18(%rbx)
movq %r15, 0x78(%rbx)
movq %r14, 0x80(%rbx)
leaq 0x20(%rbx), %rdi
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x88(%rbx)
callq 0x4390
movq %rbx, %rdi
addq $0x48, %rdi
callq 0x4390
jmp 0x4e13
movq %rbx, %rdi
callq 0x4190
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/queue.c
// Function: xQueueTakeMutexRecursive
portBASE_TYPE xQueueTakeMutexRecursive( xQueueHandle pxMutex, portTickType xBlockTime )
	{
	portBASE_TYPE xReturn;

		/* Comments regarding mutual exclusion as per those within
		xQueueGiveMutexRecursive(). */

		traceTAKE_MUTEX_RECURSIVE( pxMutex );

		if( pxMutex->pxMutexHolder == xTaskGetCurrentTaskHandle() )
		{
			( pxMutex->uxRecursiveCallCount )++;
			xReturn = pdPASS;
		}
		else
		{
			xReturn = xQueueGenericReceive( pxMutex, NULL, xBlockTime, pdFALSE );

			/* pdPASS will only be returned if we successfully obtained the mutex,
			we may have blocked to reach here. */
			if( xReturn == pdPASS )
			{
				( pxMutex->uxRecursiveCallCount )++;
			}
		}

		return xReturn;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
movq 0x8(%rdi), %r14
callq 0x40d0
cmpq %rax, %r14
je 0x5052
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
movl %r15d, %edx
xorl %ecx, %ecx
callq 0x4270
testq %rax, %rax
je 0x505c
incq 0x18(%rbx)
movl $0x1, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/queue.c
// Function: prvCopyDataToQueue
static void prvCopyDataToQueue( xQUEUE *pxQueue, const void *pvItemToQueue, portBASE_TYPE xPosition )
{
	if( pxQueue->uxItemSize == ( unsigned portBASE_TYPE ) 0 )
	{
		#if ( configUSE_MUTEXES == 1 )
		{
			if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
			{
				/* The mutex is no longer being held. */
				vTaskPriorityDisinherit( ( void * ) pxQueue->pxMutexHolder );
				pxQueue->pxMutexHolder = NULL;
			}
		}
		#endif
	}
	else if( xPosition == queueSEND_TO_BACK )
	{
		memcpy( ( void * ) pxQueue->pcWriteTo, pvItemToQueue, ( unsigned ) pxQueue->uxItemSize );
		pxQueue->pcWriteTo += pxQueue->uxItemSize;
		if( pxQueue->pcWriteTo >= pxQueue->pcTail )
		{
			pxQueue->pcWriteTo = pxQueue->pcHead;
		}
	}
	else
	{
		memcpy( ( void * ) pxQueue->pcReadFrom, pvItemToQueue, ( unsigned ) pxQueue->uxItemSize );
		pxQueue->pcReadFrom -= pxQueue->uxItemSize;
		if( pxQueue->pcReadFrom < pxQueue->pcHead )
		{
			pxQueue->pcReadFrom = ( pxQueue->pcTail - pxQueue->uxItemSize );
		}
	}

	++( pxQueue->uxMessagesWaiting );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x80(%rdi), %rcx
testq %rcx, %rcx
je 0x52af
movq %rdx, %rax
movl %ecx, %edx
testq %rax, %rax
je 0x52c8
movq 0x18(%rbx), %rdi
callq 0x4350
movq 0x18(%rbx), %rcx
movq 0x80(%rbx), %rax
subq %rax, %rcx
movq %rcx, 0x18(%rbx)
cmpq (%rbx), %rcx
jae 0x52ed
negq %rax
addq 0x8(%rbx), %rax
movq %rax, 0x18(%rbx)
jmp 0x52ed
cmpq $0x0, (%rbx)
jne 0x52ed
movq 0x8(%rbx), %rdi
callq 0x43a0
movq $0x0, 0x8(%rbx)
jmp 0x52ed
movq 0x10(%rbx), %rdi
callq 0x4350
movq 0x10(%rbx), %rax
addq 0x80(%rbx), %rax
movq %rax, 0x10(%rbx)
cmpq 0x8(%rbx), %rax
jb 0x52ed
movq (%rbx), %rax
movq %rax, 0x10(%rbx)
incq 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/queue.c
// Function: xQueueGenericSendFromISR
signed portBASE_TYPE xQueueGenericSendFromISR( xQueueHandle pxQueue, const void * const pvItemToQueue, signed portBASE_TYPE *pxHigherPriorityTaskWoken, portBASE_TYPE xCopyPosition )
{
signed portBASE_TYPE xReturn;
unsigned portBASE_TYPE uxSavedInterruptStatus;

	/* Similar to xQueueGenericSend, except we don't block if there is no room
	in the queue.  Also we don't directly wake a task that was blocked on a
	queue read, instead we return a flag to say whether a context switch is
	required or not (i.e. has a task with a higher priority than us been woken
	by this	post). */
	uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
	{
		if( pxQueue->uxMessagesWaiting < pxQueue->uxLength )
		{
			traceQUEUE_SEND_FROM_ISR( pxQueue );

			prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition );

			/* If the queue is locked we do not alter the event list.  This will
			be done when the queue is unlocked later. */
			if( pxQueue->xTxLock == queueUNLOCKED )
			{
				if( !listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) )
				{
					if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
					{
						/* The task waiting has a higher priority so record that a
						context	switch is required. */
						*pxHigherPriorityTaskWoken = pdTRUE;
					}
				}
			}
			else
			{
				/* Increment the lock count so the task that unlocks the queue
				knows that data was posted while it was locked. */
				++( pxQueue->xTxLock );
			}

			xReturn = pdPASS;
		}
		else
		{
			traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue );
			xReturn = errQUEUE_FULL;
		}
	}
	portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );

	return xReturn;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r12
callq 0x41b0
movq %rax, %rbx
movq 0x70(%r12), %rax
cmpq 0x78(%r12), %rax
jae 0x5409
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x5263
movq 0x90(%r12), %rax
cmpq $-0x1, %rax
je 0x5426
incq %rax
movq %rax, 0x90(%r12)
movl $0x1, %r15d
jmp 0x540c
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x4700
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %r15d
cmpq $0x0, 0x48(%r12)
je 0x540c
addq $0x48, %r12
movq %r12, %rdi
callq 0x4210
testq %rax, %rax
je 0x540c
movq $0x1, (%r14)
jmp 0x540c
// File: /workspace/github_c_makefile_star2_O3/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/queue.c
// Function: xQueueReceiveFromISR
signed portBASE_TYPE xQueueReceiveFromISR( xQueueHandle pxQueue, void * const pvBuffer, signed portBASE_TYPE *pxTaskWoken )
{
signed portBASE_TYPE xReturn;
unsigned portBASE_TYPE uxSavedInterruptStatus;

	uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
	{
		/* We cannot block from an ISR, so check there is data available. */
		if( pxQueue->uxMessagesWaiting > ( unsigned portBASE_TYPE ) 0 )
		{
			traceQUEUE_RECEIVE_FROM_ISR( pxQueue );

			prvCopyDataFromQueue( pxQueue, pvBuffer );
			--( pxQueue->uxMessagesWaiting );

			/* If the queue is locked we will not modify the event list.  Instead
			we update the lock count so the task that unlocks the queue will know
			that an ISR has removed data while the queue was locked. */
			if( pxQueue->xRxLock == queueUNLOCKED )
			{
				if( !listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) )
				{
					if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
					{
						/* The task waiting has a higher priority than us so
						force a context switch. */
						*pxTaskWoken = pdTRUE;
					}
				}
			}
			else
			{
				/* Increment the lock count so the task that unlocks the queue
				knows that data was removed while it was locked. */
				++( pxQueue->xRxLock );
			}

			xReturn = pdPASS;
		}
		else
		{
			xReturn = pdFAIL;
			traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue );
		}
	}
	portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );

	return xReturn;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
callq 0x41b0
movq %rax, %rbx
cmpq $0x0, 0x70(%r15)
je 0x54c0
movq (%r15), %rsi
testq %rsi, %rsi
je 0x549d
movq 0x80(%r15), %rax
movq 0x18(%r15), %rcx
addq %rax, %rcx
cmpq 0x8(%r15), %rcx
cmovbq %rcx, %rsi
movq %rsi, 0x18(%r15)
movl %eax, %edx
movq %r12, %rdi
callq 0x4350
decq 0x70(%r15)
movq 0x88(%r15), %rax
cmpq $-0x1, %rax
je 0x54d7
incq %rax
movq %rax, 0x88(%r15)
movl $0x1, %r12d
jmp 0x54c3
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x4700
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %r12d
cmpq $0x0, 0x20(%r15)
je 0x54c3
addq $0x20, %r15
movq %r15, %rdi
callq 0x4210
testq %rax, %rax
je 0x54c3
movq $0x1, (%r14)
jmp 0x54c3
// File: /workspace/github_c_makefile_star2_O3/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/queue.c
// Function: xQueueCRSendFromISR
signed portBASE_TYPE xQueueCRSendFromISR( xQueueHandle pxQueue, const void *pvItemToQueue, signed portBASE_TYPE xCoRoutinePreviouslyWoken )
{
	/* Cannot block within an ISR so if there is no space on the queue then
	exit without doing anything. */
	if( pxQueue->uxMessagesWaiting < pxQueue->uxLength )
	{
		prvCopyDataToQueue( pxQueue, pvItemToQueue, queueSEND_TO_BACK );

		/* We only want to wake one co-routine per ISR, so check that a
		co-routine has not already been woken. */
		if( !xCoRoutinePreviouslyWoken )
		{
			if( !listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) )
			{
				if( xCoRoutineRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
				{
					return pdTRUE;
				}
			}
		}
	}

	return xCoRoutinePreviouslyWoken;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq 0x70(%rdi), %rax
cmpq 0x78(%rdi), %rax
jae 0x5705
movq %rdi, %r14
xorl %edx, %edx
callq 0x5263
testq %rbx, %rbx
je 0x570d
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
cmpq $0x0, 0x48(%r14)
je 0x5705
addq $0x48, %r14
movq %r14, %rdi
callq 0x4670
movq %rax, %rcx
movl $0x1, %eax
testq %rcx, %rcx
jne 0x5708
jmp 0x5705
// File: /workspace/github_c_makefile_star2_O3/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/queue.c
// Function: xQueueCRReceiveFromISR
signed portBASE_TYPE xQueueCRReceiveFromISR( xQueueHandle pxQueue, void *pvBuffer, signed portBASE_TYPE *pxCoRoutineWoken )
{
signed portBASE_TYPE xReturn;

	/* We cannot block from an ISR, so check there is data available. If
	not then just leave without doing anything. */
	if( pxQueue->uxMessagesWaiting > ( unsigned portBASE_TYPE ) 0 )
	{
		/* Copy the data from the queue. */
		pxQueue->pcReadFrom += pxQueue->uxItemSize;
		if( pxQueue->pcReadFrom >= pxQueue->pcTail )
		{
			pxQueue->pcReadFrom = pxQueue->pcHead;
		}
		--( pxQueue->uxMessagesWaiting );
		memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->pcReadFrom, ( unsigned ) pxQueue->uxItemSize );

		if( !( *pxCoRoutineWoken ) )
		{
			if( !listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) )
			{
				if( xCoRoutineRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
				{
					*pxCoRoutineWoken = pdTRUE;
				}
			}
		}

		xReturn = pdPASS;
	}
	else
	{
		xReturn = pdFAIL;
	}

	return xReturn;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x70(%rdi)
je 0x57a3
movq %rdx, %rbx
movq %rdi, %r14
movq 0x80(%rdi), %rcx
movq 0x18(%rdi), %rax
addq %rcx, %rax
movq %rax, 0x18(%rdi)
cmpq 0x8(%rdi), %rax
jb 0x5765
movq (%r14), %rax
movq %rax, 0x18(%r14)
decq 0x70(%r14)
movl %ecx, %edx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x4350
movl $0x1, %r15d
cmpq $0x0, (%rbx)
jne 0x57a6
cmpq $0x0, 0x20(%r14)
je 0x57a6
addq $0x20, %r14
movq %r14, %rdi
callq 0x4670
testq %rax, %rax
je 0x57a6
movq $0x1, (%rbx)
jmp 0x57a6
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/tasks.c
// Function: prvAllocateTCBAndStack
static tskTCB *prvAllocateTCBAndStack( unsigned short usStackDepth, portSTACK_TYPE *puxStackBuffer )
{
tskTCB *pxNewTCB;

	/* Allocate space for the TCB.  Where the memory comes from depends on
	the implementation of the port malloc function. */
	pxNewTCB = ( tskTCB * ) pvPortMalloc( sizeof( tskTCB ) );

	if( pxNewTCB != NULL )
	{
		/* Allocate space for the stack used by the task being created.
		The base of the stack memory stored in the TCB so the task can
		be deleted later if required. */
		pxNewTCB->pxStack = ( portSTACK_TYPE * ) pvPortMallocAligned( ( ( ( size_t )usStackDepth ) * sizeof( portSTACK_TYPE ) ), puxStackBuffer );

		if( pxNewTCB->pxStack == NULL )
		{
			/* Could not allocate the stack.  Delete the allocated TCB. */
			vPortFree( pxNewTCB );
			pxNewTCB = NULL;
		}
		else
		{
			/* Just to help debugging. */
			memset( pxNewTCB->pxStack, tskSTACK_FILL_BYTE, usStackDepth * sizeof( portSTACK_TYPE ) );
		}
	}

	return pxNewTCB;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %r15d
movl $0x98, %edi
callq 0x42e0
testq %rax, %rax
je 0x5985
movq %rax, %rbx
testq %r14, %r14
je 0x594f
movq %r14, 0x60(%rbx)
movzwl %r15w, %r15d
shll $0x3, %r15d
jmp 0x596b
movzwl %r15w, %r15d
shll $0x3, %r15d
movq %r15, %rdi
callq 0x42e0
movq %rax, %r14
movq %rax, 0x60(%rbx)
testq %rax, %rax
je 0x597d
movq %r14, %rdi
movl $0xa5, %esi
movq %r15, %rdx
callq 0x41e0
jmp 0x5987
movq %rbx, %rdi
callq 0x4190
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/tasks.c
// Function: prvInitialiseTaskLists
static void prvInitialiseTaskLists( void )
{
unsigned portBASE_TYPE uxPriority;

	for( uxPriority = 0; uxPriority < configMAX_PRIORITIES; uxPriority++ )
	{
		vListInitialise( ( xList * ) &( pxReadyTasksLists[ uxPriority ] ) );
	}

	vListInitialise( ( xList * ) &xDelayedTaskList1 );
	vListInitialise( ( xList * ) &xDelayedTaskList2 );
	vListInitialise( ( xList * ) &xPendingReadyList );

	#if ( INCLUDE_vTaskDelete == 1 )
	{
		vListInitialise( ( xList * ) &xTasksWaitingTermination );
	}
	#endif

	#if ( INCLUDE_vTaskSuspend == 1 )
	{
		vListInitialise( ( xList * ) &xSuspendedTaskList );
	}
	#endif

	/* Start with pxDelayedTaskList using list1 and the pxOverflowDelayedTaskList
	using list2. */
	pxDelayedTaskList = &xDelayedTaskList1;
	pxOverflowDelayedTaskList = &xDelayedTaskList2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
xorl %ebx, %ebx
movq 0x64f6(%rip), %r14      # 0xbf10
leaq (%rbx,%r14), %rdi
callq 0x4390
addq $0x28, %rbx
cmpq $0x190, %rbx            # imm = 0x190
jne 0x5a1a
movq 0x6511(%rip), %rbx      # 0xbf48
movq %rbx, %rdi
callq 0x4390
movq 0x6462(%rip), %r14      # 0xbea8
movq %r14, %rdi
callq 0x4390
movq 0x6543(%rip), %rdi      # 0xbf98
callq 0x4390
movq 0x6527(%rip), %rdi      # 0xbf88
callq 0x4390
movq 0x649b(%rip), %rdi      # 0xbf08
callq 0x4390
movq 0x6547(%rip), %rax      # 0xbfc0
movq %rbx, (%rax)
movq 0x64dd(%rip), %rax      # 0xbf60
movq %r14, (%rax)
popq %rbx
popq %r14
popq %rbp
retq