LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_fcount_lines_match
long util_fcount_lines_match(FILE *fh, const char *starts_with) {
  char buf[UTIL_FGETS_BUF_SZ];
  long line_count;
  int started_with, at_line_start;
  int match_len, len;

  if(fseek(fh, 0L, SEEK_SET) != 0) {
    my_err("%s:%d: could not rewind filehandle", __FILE__, __LINE__);
  }

  match_len = strlen(starts_with);
  if(match_len == 0) {
    return 0;
  }

  if(match_len > UTIL_FGETS_BUF_SZ) {
    my_err("%s:%d: length of string to match must be"
	    "<= %d bytes", __FILE__, __LINE__, UTIL_FGETS_BUF_SZ);
  }

  line_count = 0;
  started_with  = FALSE;
  at_line_start = TRUE;

  while(fgets(buf, UTIL_FGETS_BUF_SZ, fh) != NULL) {
    if(at_line_start) {
      /* we are at the beginning of a line, does it match the string? */
      if(strncmp(starts_with, buf, match_len) == 0) {
	started_with = TRUE;
      }
    }

    len = strlen(buf);
    if(buf[len-1] == '\n') {
      /* we are at the end of the line, did the beginning match? */
      if(started_with) {
	line_count++;
	started_with = FALSE;
      }
      at_line_start = TRUE;
    } else {
      at_line_start = FALSE;
    }
  }

  if(fseek(fh, 0L, SEEK_SET) != 0) {
    my_err("%s:%d: could not rewind filehandle", __FILE__, __LINE__);
  }

  return line_count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3ff8, %rsp           # imm = 0x3FF8
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x2080
testl %eax, %eax
je 0x27e2
leaq 0x18db(%rip), %rdi      # 0x40aa
leaq 0x1b6b(%rip), %rsi      # 0x4341
movl $0x91, %edx
xorl %eax, %eax
callq 0x3534
movq 0x8(%rsp), %rdi
callq 0x2160
movq %rax, %r15
testl %r15d, %r15d
je 0x28c0
cmpl $0x3fdd, %r15d          # imm = 0x3FDD
jl 0x2820
leaq 0x18c5(%rip), %rdi      # 0x40cd
leaq 0x1b32(%rip), %rsi      # 0x4341
movl $0x9b, %edx
movl $0x3fdc, %ecx           # imm = 0x3FDC
xorl %eax, %eax
callq 0x3534
movslq %r15d, %r12
pushq $0x1
popq %rbp
leaq 0x10(%rsp), %r13
xorl %r14d, %r14d
xorl %r15d, %r15d
movq %r13, %rdi
movl $0x3fdc, %esi           # imm = 0x3FDC
movq %rbx, %rdx
callq 0x2120
testq %rax, %rax
je 0x2894
testl %ebp, %ebp
je 0x2863
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x20e0
testl %eax, %eax
pushq $0x1
popq %rax
cmovel %eax, %r14d
movq %r13, %rdi
callq 0x2160
decl %eax
cltq
testl %r14d, %r14d
setne %cl
xorl %ebp, %ebp
cmpb $0xa, 0x10(%rsp,%rax)
movl $0x0, %eax
cmovel %eax, %r14d
sete %bpl
andb %bpl, %cl
movzbl %cl, %eax
addq %rax, %r15
jmp 0x2831
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2080
testl %eax, %eax
je 0x28c3
leaq 0x17ff(%rip), %rdi      # 0x40aa
leaq 0x1a8f(%rip), %rsi      # 0x4341
movl $0xb8, %edx
xorl %eax, %eax
callq 0x3534
jmp 0x28c3
xorl %r15d, %r15d
movq %r15, %rax
addq $0x3ff8, %rsp           # imm = 0x3FF8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_gzcount_lines_match
long util_gzcount_lines_match(gzFile gzf, const char *starts_with) {
  char buf[UTIL_FGETS_BUF_SZ];
  long line_count;
  int started_with, at_line_start;
  int match_len, len;

  if(gzseek(gzf, 0L, SEEK_SET) != 0) {
    my_err("%s:%d: could not rewind filehandle", __FILE__, __LINE__);
  }

  match_len = strlen(starts_with);
  if(match_len == 0) {
    return 0;
  }

  if(match_len > UTIL_FGETS_BUF_SZ) {
    my_err("%s:%d: length of string to match must be"
	    "<= %d bytes", __FILE__, __LINE__, UTIL_FGETS_BUF_SZ);
  }

  line_count = 0;
  started_with  = FALSE;
  at_line_start = TRUE;

  while(gzgets(gzf, buf, UTIL_FGETS_BUF_SZ) != NULL) {
    if(at_line_start) {
      /* we are at the beginning of a line, does it match the string? */
      if(strncmp(starts_with, buf, match_len) == 0) {
	started_with = TRUE;
      }
    }

    len = strlen(buf);
    if(buf[len-1] == '\n') {
      /* we are at the end of the line, did the beginning match? */
      if(started_with) {
	line_count++;
	started_with = FALSE;
      }
      at_line_start = TRUE;
    } else {
      at_line_start = FALSE;
    }
  }

  if(gzseek(gzf, 0L, SEEK_SET) != 0) {
    my_err("%s:%d: could not rewind filehandle", __FILE__, __LINE__);
  }

  return line_count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3ff8, %rsp           # imm = 0x3FF8
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x2110
testq %rax, %rax
je 0x2919
leaq 0x17a4(%rip), %rdi      # 0x40aa
leaq 0x1a34(%rip), %rsi      # 0x4341
movl $0xcc, %edx
xorl %eax, %eax
callq 0x3534
movq 0x8(%rsp), %rdi
callq 0x2160
movq %rax, %r15
testl %r15d, %r15d
je 0x29f8
cmpl $0x3fdd, %r15d          # imm = 0x3FDD
jl 0x2957
leaq 0x178e(%rip), %rdi      # 0x40cd
leaq 0x19fb(%rip), %rsi      # 0x4341
movl $0xd6, %edx
movl $0x3fdc, %ecx           # imm = 0x3FDC
xorl %eax, %eax
callq 0x3534
movslq %r15d, %r12
pushq $0x1
popq %rbp
leaq 0x10(%rsp), %r13
xorl %r14d, %r14d
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r13, %rsi
movl $0x3fdc, %edx           # imm = 0x3FDC
callq 0x2240
testq %rax, %rax
je 0x29cb
testl %ebp, %ebp
je 0x299a
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x20e0
testl %eax, %eax
pushq $0x1
popq %rax
cmovel %eax, %r14d
movq %r13, %rdi
callq 0x2160
decl %eax
cltq
testl %r14d, %r14d
setne %cl
xorl %ebp, %ebp
cmpb $0xa, 0x10(%rsp,%rax)
movl $0x0, %eax
cmovel %eax, %r14d
sete %bpl
andb %bpl, %cl
movzbl %cl, %eax
addq %rax, %r15
jmp 0x2968
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2110
testq %rax, %rax
je 0x29fb
leaq 0x16c7(%rip), %rdi      # 0x40aa
leaq 0x1957(%rip), %rsi      # 0x4341
movl $0xf3, %edx
xorl %eax, %eax
callq 0x3534
jmp 0x29fb
xorl %r15d, %r15d
movq %r15, %rax
addq $0x3ff8, %rsp           # imm = 0x3FF8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_str_concat
char *util_str_concat(const char *str1, ...) {
  size_t ttl_len;
  char *next_str, *new_str;
  va_list args;
  
  if(str1 == NULL) {
    return NULL;
  }

  /* first pass through variable args: determine total size of str */
  va_start(args, str1);

  ttl_len = strlen(str1);

  while(1) {
    next_str = va_arg(args, char *);
    if(next_str == NULL) {
      /* end of args list */
      break;
    }
    ttl_len += strlen(next_str);
  }

  va_end(args);


  /* second pass through args: paste strings together */
  new_str = my_new(char, ttl_len + 1);
  
  strcpy(new_str, str1);
  ttl_len = strlen(str1);

  va_start(args, str1);
  while(1) {
    next_str = va_arg(args, char *);
    if(next_str == NULL) {
      break;
    }

    /* append next string to end of current str */
    strcpy(&new_str[ttl_len], next_str);

    ttl_len += strlen(next_str);
  }
  va_end(args);

  return new_str;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2a97
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)
testq %rdi, %rdi
je 0x2b97
movq %rdi, %rbx
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %r13     # imm = 0x3000000008
movq %r13, (%rsp)
callq 0x2160
movq %rax, %r14
movl (%rsp), %ebp
movq 0x10(%rsp), %r15
movq 0x8(%rsp), %rax
cmpl $0x28, %ebp
ja 0x2af2
movq %rax, %r12
movl %ebp, %eax
addq %r15, %rax
addl $0x8, %ebp
movl %ebp, (%rsp)
jmp 0x2afb
leaq 0x8(%rax), %r12
movq %r12, 0x8(%rsp)
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2b10
callq 0x2160
addq %rax, %r14
movq %r12, %rax
jmp 0x2add
incq %r14
movq %r14, %rdi
callq 0x36e0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x2160
movq %rax, %rbx
movq %r13, (%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x2b68
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x2b76
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %r15
testq %r15, %r15
je 0x2b9a
leaq (%r14,%rbx), %rdi
movq %r15, %rsi
callq 0x2200
movq %r15, %rdi
callq 0x2160
addq %rax, %rbx
jmp 0x2b4f
xorl %r14d, %r14d
movq %r14, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_gzgets_line
char *util_gzgets_line(gzFile gzf) {
  char buf[UTIL_FGETS_BUF_SZ];
  char *line, *old_line;;
  long len, ttl_len;

  if(gzgets(gzf, buf, UTIL_FGETS_BUF_SZ) == NULL) {
    return NULL;
  }

  len = strlen(buf);
  ttl_len = len;
  line = my_new(char, len+1);
  strcpy(line, buf);

  /* keep extending the line until a newline or EOF is reached */
  while(buf[len-1] != '\n') {
    if(gzgets(gzf, buf, UTIL_FGETS_BUF_SZ) == NULL) {
      return line;
    }

    /* extend the line */
    len = strlen(buf);
    old_line = line;

    line = util_str_concat(old_line, buf, NULL);
    ttl_len += len;

    my_free(old_line);
  }

  /* remove trailing newline char */
  if(line[ttl_len-1] == '\n') {
    line[ttl_len-1] = '\0';
  }

  return line;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3fe8, %rsp           # imm = 0x3FE8
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rsi
movl $0x3fdc, %edx           # imm = 0x3FDC
callq 0x2240
testq %rax, %rax
je 0x2c53
movq %r14, %rdi
callq 0x2160
movq %rax, %r13
leaq 0x1(%rax), %rdi
callq 0x36e0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x2200
movq %r13, %r12
cmpb $0xa, -0x1(%r13,%r14)
je 0x2c58
movq %rbx, %rdi
movq %r14, %rsi
movl $0x3fdc, %edx           # imm = 0x3FDC
callq 0x2240
testq %rax, %rax
je 0x2c66
movq %r14, %rdi
callq 0x2160
movq %rax, %r13
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2a32
movq %rax, %rbp
addq %r13, %r12
movq %r15, %rdi
leaq 0x16fd(%rip), %rsi      # 0x4341
movl $0x163, %edx            # imm = 0x163
callq 0x3731
movq %rbp, %r15
jmp 0x2bfd
xorl %r15d, %r15d
jmp 0x2c66
cmpb $0xa, -0x1(%r12,%r15)
jne 0x2c66
movb $0x0, -0x1(%r15,%r12)
movq %r15, %rax
addq $0x3fe8, %rsp           # imm = 0x3FE8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_fgets_line
char *util_fgets_line(FILE *fh) {
  char buf[UTIL_FGETS_BUF_SZ];
  char *line, *old_line;;
  long len, ttl_len;

  if(fgets(buf, UTIL_FGETS_BUF_SZ, fh) == NULL) {
    return NULL;
  }

  len = strlen(buf);
  ttl_len = len;
  line = my_new(char, len+1);
  strcpy(line, buf);

  /* keep extending the line until a newline or EOF is reached */
  while(buf[len-1] != '\n') {
    if(fgets(buf, UTIL_FGETS_BUF_SZ, fh) == NULL) {
      return line;
    }

    /* extend the line */
    len = strlen(buf);
    old_line = line;

    line = util_str_concat(old_line, buf, NULL);
    ttl_len += len;

    my_free(old_line);
  }

  /* remove trailing newline char */
  if(line[ttl_len-1] == '\n') {
    line[ttl_len-1] = '\0';
  }

  return line;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3fe8, %rsp           # imm = 0x3FE8
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
movl $0x3fdc, %esi           # imm = 0x3FDC
movq %rbx, %rdx
callq 0x2120
testq %rax, %rax
je 0x2d22
movq %r14, %rdi
callq 0x2160
movq %rax, %r13
leaq 0x1(%rax), %rdi
callq 0x36e0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x2200
movq %r13, %r12
cmpb $0xa, -0x1(%r13,%r14)
je 0x2d27
movq %r14, %rdi
movl $0x3fdc, %esi           # imm = 0x3FDC
movq %rbx, %rdx
callq 0x2120
testq %rax, %rax
je 0x2d35
movq %r14, %rdi
callq 0x2160
movq %rax, %r13
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2a32
movq %rax, %rbp
addq %r13, %r12
movq %r15, %rdi
leaq 0x162e(%rip), %rsi      # 0x4341
movl $0x191, %edx            # imm = 0x191
callq 0x3731
movq %rbp, %r15
jmp 0x2ccc
xorl %r15d, %r15d
jmp 0x2d35
cmpb $0xa, -0x1(%r12,%r15)
jne 0x2d35
movb $0x0, -0x1(%r15,%r12)
movq %r15, %rax
addq $0x3fe8, %rsp           # imm = 0x3FE8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_str_ndup
char *util_str_ndup(const char *str, size_t n) {
  char *new_str;
  size_t len;

  len = 0;
  while(len < n && str[len] != '\0') {
    len++;
  }

  new_str = my_new(char, len+1);
  strncpy(new_str, str, len);
  new_str[len] = '\0';

  return new_str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
cmpq %rax, %rbx
je 0x2d89
cmpb $0x0, (%r14,%rax)
je 0x2d86
incq %rax
jmp 0x2d75
movq %rax, %rbx
leaq 0x1(%rbx), %rdi
callq 0x36e0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2230
movb $0x0, (%r15,%rbx)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_str_uc
void util_str_uc(char *str) {
  size_t i;

  i = 0;
  while(str[i] != '\0') {
    str[i] = toupper(str[i]);
    i++;
  }

  return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsbq (%rbx), %r14
testq %r14, %r14
je 0x2dd4
callq 0x2140
movq (%rax), %rax
movb (%rax,%r14,4), %al
movb %al, (%rbx)
incq %rbx
jmp 0x2db8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_str_lc
void util_str_lc(char *str) {
  size_t i;

  i = 0;
  while(str[i] != '\0') {
    str[i] = tolower(str[i]);
    i++;
  }

  return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsbq (%rbx), %r14
testq %r14, %r14
je 0x2dff
callq 0x2220
movq (%rax), %rax
movb (%rax,%r14,4), %al
movb %al, (%rbx)
incq %rbx
jmp 0x2de3
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_str_remove_char
void util_str_remove_char(char *str, const char c) {
  size_t i,j;

  i = j = 0;
  while(str[i] != '\0') {
    if(str[i] != c) {
      str[j] = str[i];
      j++;
    }
    i++;
  }
  str[j] = '\0';
}

// Assembly:
xorl %eax, %eax
movq %rdi, %rcx
movb (%rcx), %dl
testb %dl, %dl
je 0x2e35
cmpb %sil, %dl
je 0x2e30
movb %dl, (%rdi,%rax)
incq %rax
incq %rcx
jmp 0x2e1f
movb $0x0, (%rdi,%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_long_to_comma_str
char *util_long_to_comma_str(const long x) {
  char *str, *comma_str;
  int len,i,j,k;
  int max_commas;

  str = my_new(char, UTIL_STR_BUF_SZ);
  max_commas = (UTIL_STR_BUF_SZ / 3);
  
  len = snprintf(str, UTIL_STR_BUF_SZ-max_commas, "%lu", x);

  if(len == 0) {
    my_err("%s:%d: could not write number %lu to string", 
	    __FILE__, __LINE__, x);
  }
  
  max_commas = len / 3;
  comma_str = my_new(char, len + max_commas + 1);

  /* copy the string in reverse, adding commas every three */
  j = 0;
  k = 0;
  for(i = len-1; i >= 0; i--) {
    comma_str[j] = str[i];
    k++;
    
    if(i > 0 && ((k %3) == 0)) {
      /* insert comma */
      j++;
      comma_str[j] = ',';
    }
    j++;
  }

  comma_str[j] = '\0';
  my_free(str);

  util_breverse(comma_str, j);

  return comma_str;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x14
popq %rdi
callq 0x36e0
movq %rax, %rbx
leaq 0x12a7(%rip), %rdx      # 0x4101
xorl %r12d, %r12d
pushq $0xe
popq %rsi
movq %rax, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2050
movl %eax, %ebp
testl %eax, %eax
jne 0x2e90
leaq 0x128b(%rip), %rdi      # 0x4105
leaq 0x14c0(%rip), %rsi      # 0x4341
movl $0x21e, %edx            # imm = 0x21E
movq %r14, %rcx
xorl %eax, %eax
callq 0x3534
pushq $0x3
popq %r13
movl %ebp, %eax
cltd
idivl %r13d
movslq %ebp, %rcx
cltq
leaq (%rcx,%rax), %rdi
incq %rdi
callq 0x36e0
movq %rax, %r14
movl %ebp, %esi
pushq $-0x1
popq %rdi
pushq $0x1
popq %rcx
movl %ecx, %eax
xorl %edx, %edx
divl %r13d
movslq %r12d, %r15
testl %esi, %esi
jle 0x2ef1
movb -0x1(%rbx,%rsi), %dl
movb %dl, (%r14,%r15)
cmpq $0x1, %rsi
je 0x2ee5
leal (%rax,%rax,2), %eax
addl %edi, %eax
jne 0x2ee5
movb $0x2c, 0x1(%r14,%r15)
incq %r15
movl %r15d, %r12d
incl %r12d
decl %edi
incl %ecx
decq %rsi
jmp 0x2eb6
movb $0x0, (%r14,%r15)
leaq 0x1444(%rip), %rsi      # 0x4341
movq %rbx, %rdi
movl $0x234, %edx            # imm = 0x234
callq 0x3731
movq %r14, %rdi
movq %r15, %rsi
callq 0x2f27
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_reverse
void util_reverse(void *base, const size_t nmemb, const size_t size) {
  void *tmp;
  unsigned char *fwd_ptr, *rev_ptr;

  /* allocate mem for holding swap */
  tmp = malloc(size);
  if(tmp == NULL) {
    my_err("%s:%d: could not allocate mem", __FILE__, __LINE__);
  }
  
  /* initiailize pointers so that they point to beginning and end of array */
  fwd_ptr = (unsigned char *)base;
  rev_ptr = &((unsigned char *)base)[nmemb*size - size];

  /* move ptrs towards each other from either end of array */
  while(fwd_ptr < rev_ptr) {
    /* swap memory at each pointer */
    tmp = memcpy(tmp, fwd_ptr, size);
    memcpy(fwd_ptr, rev_ptr, size);
    memcpy(rev_ptr, tmp, size);

    /* advance ptrs */
    fwd_ptr += size;
    rev_ptr -= size;
  }

  free(tmp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rdi
callq 0x20f0
movq %rax, %r12
testq %rax, %rax
jne 0x2f6b
leaq 0x11d9(%rip), %rdi      # 0x4131
leaq 0x13e2(%rip), %rsi      # 0x4341
movl $0x24b, %edx            # imm = 0x24B
xorl %eax, %eax
callq 0x3534
decq %r14
imulq %rbx, %r14
addq %r15, %r14
movq %rbx, %r13
negq %r13
cmpq %r14, %r15
jae 0x2fb2
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x22a0
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x22a0
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x22a0
addq %rbx, %r15
addq %r13, %r14
jmp 0x2f7b
movq %r12, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x22c0
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_str_remove_whitespace
void util_str_remove_whitespace(char *str) {
  long i,j;

  i = j = 0;
  while(str[i] != '\0') {
    if(!isspace((unsigned char)str[i])) {
      str[j] = str[i];
      j++;
    }
    i++;
  }

  str[j] = '\0';
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq %rdi, %r15
movzbl (%r15), %r12d
testq %r12, %r12
je 0x300e
callq 0x2180
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r12,2)
jne 0x3009
movb %r12b, (%rbx,%r14)
incq %r14
incq %r15
jmp 0x2fe9
movb $0x0, (%rbx,%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_str_lstrip
void util_str_lstrip(char *str) {
  long leading_ws, len;
  
  leading_ws = 0;
  while(str[leading_ws] != '\0' && isspace((unsigned char)str[leading_ws])) {
    leading_ws++;
  }

  if(leading_ws > 0) {
    len = strlen(str);
    memmove(str, &str[leading_ws], len-leading_ws+1);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $-0x1
popq %r15
movzbl 0x1(%rbx,%r15), %r14d
testq %r14, %r14
je 0x304b
callq 0x2180
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r14,2)
je 0x304b
incq %r15
jmp 0x302b
cmpq $-0x1, %r15
je 0x3076
leaq (%rbx,%r15), %r14
incq %r14
movq %rbx, %rdi
callq 0x2160
subq %r15, %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x21d0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_str_rstrip
void util_str_rstrip(char *str) {
  long len,i;

  len = strlen(str);
  
  i = len-1;
  while(i >= 0 && isspace((unsigned char)str[i])) {
    str[i] = '\0';
    i--;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2160
movq %rax, %r14
testq %r14, %r14
jle 0x30b0
callq 0x2180
movq (%rax), %rax
movzbl -0x1(%rbx,%r14), %ecx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x30b0
movb $0x0, -0x1(%rbx,%r14)
decq %r14
jmp 0x308b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_str_ends_with
int util_str_ends_with(const char *str, const char *end) {
  size_t i, j;

  i = strlen(str);
  j = strlen(end);

  if(j > i) {
    /* string to match is longer than provided string */
    return FALSE;
  }

  while(j > 0) {
    if(str[i-1] != end[j-1]) {
      /* character does not match */
      return FALSE;
    }
    i--;
    j--;
  }

  return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2160
movq %rax, %r15
movq %rbx, %rdi
callq 0x2160
cmpq %r15, %rax
jbe 0x310d
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rcx
leaq (%r15,%r14), %rdx
decq %rdx
leaq (%rax,%rbx), %rsi
decq %rsi
negq %rcx
xorl %edi, %edi
pushq $0x1
popq %rax
cmpq %rdi, %rcx
je 0x3107
movb (%rdx,%rdi), %r8b
cmpb (%rsi,%rdi), %r8b
jne 0x3105
decq %rdi
jmp 0x3126
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_str_split
int util_str_split(char *str, char **tokens, const size_t n_tok) {  
  size_t i = 0;

  if(n_tok < 1) {
    my_err("%s:%d: number of tokens must be at least 1\n",
	   __FILE__, __LINE__);
  }

  while(((tokens[i] = strsep(&str, " \t")) != NULL)) {
    if(tokens[i][0] != '\0') {
      i++;

      if(i == n_tok) {
	break;
      }
    }
  }
  
  return i;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
testq %rdx, %rdx
jne 0x3171
leaq 0xff1(%rip), %rdi       # 0x414f
leaq 0x11dc(%rip), %rsi      # 0x4341
movl $0x2f5, %edx            # imm = 0x2F5
xorl %eax, %eax
callq 0x3534
xorl %r15d, %r15d
leaq 0x1000(%rip), %r12      # 0x417b
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x2250
movq %rax, (%r14,%r15,8)
testq %rax, %rax
je 0x31a4
cmpb $0x0, (%rax)
je 0x3180
incq %r15
cmpq %rbx, %r15
jne 0x3180
movq %rbx, %r15
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_must_fread
void util_must_fread(FILE *file, void *buf, size_t size) {
  if(size != 0 && fread(buf, size, 1, file) != 1) {
    if(ferror(file)) {
      my_err("error reading %lld bytes: %s", (long long)size, 
	     strerror(ferror(file)));
    } else {
      my_err("end of file reading %lld bytes", (long long)size);
    }
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x31f7
movq %rdx, %rbx
movq %rdi, %r14
pushq $0x1
popq %rdx
movq %rsi, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x21e0
cmpq $0x1, %rax
jne 0x31ff
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x2170
testl %eax, %eax
je 0x322d
movl %eax, %edi
callq 0x21a0
leaq 0xf65(%rip), %rdi       # 0x417e
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3534
leaq 0xf67(%rip), %rdi       # 0x419b
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3534
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_must_fopen
FILE *util_must_fopen(const char *path, const char *mode) {
  FILE *f;

  errno = 0;
  f = fopen(path, mode);
  if(f == NULL) {
    my_err("%s:%d: error opening file '%s' in mode '%s': %s", 
	   __FILE__, __LINE__, path, mode, strerror(errno));
  }

  return f;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x21f0
movq %rax, %r12
andl $0x0, (%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2100
movq %rax, %r15
testq %rax, %rax
jne 0x329d
movl (%r12), %edi
callq 0x21a0
leaq 0xf39(%rip), %rdi       # 0x41ba
leaq 0x10b9(%rip), %rsi      # 0x4341
movl $0x331, %edx            # imm = 0x331
movq %r14, %rcx
movq %rbx, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x3534
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_must_gzopen
gzFile util_must_gzopen(const char *path, const char *mode) {
  gzFile f;

  if((strcmp(mode, "wb") == 0) && !util_str_ends_with(path, ".gz")) {
    my_warn("%s:%d: file '%s' does not end with '.gz' but "
	    "opening with gzopen anyway\n", __FILE__, __LINE__,
	    path);
  }

  errno = 0;
  f = gzopen(path, mode);
  if(f == NULL) {
    if(errno) {
      my_err("%s:%d: error opening file '%s' in mode '%s': %s", 
	     __FILE__, __LINE__, path, mode, strerror(errno));
    } else {
      my_err("%s:%d: error opening file '%s' in mode '%s'", 
	     __FILE__, __LINE__, path, mode);
    }
  }

  return f;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x77, (%rsi)
jne 0x32fb
cmpb $0x62, 0x1(%rbx)
jne 0x32fb
cmpb $0x0, 0x2(%rbx)
jne 0x32fb
leaq 0xd86(%rip), %rsi       # 0x4058
movq %r14, %rdi
callq 0x30e5
testl %eax, %eax
jne 0x32fb
leaq 0xf05(%rip), %rdi       # 0x41ea
leaq 0x1055(%rip), %rsi      # 0x4341
movl $0x342, %edx            # imm = 0x342
movq %r14, %rcx
xorl %eax, %eax
callq 0x3605
callq 0x21f0
movq %rax, %r12
andl $0x0, (%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2090
movq %rax, %r15
testq %rax, %rax
jne 0x336b
movl (%r12), %edi
testl %edi, %edi
je 0x334b
callq 0x21a0
leaq 0xe8d(%rip), %rdi       # 0x41ba
leaq 0x100d(%rip), %rsi      # 0x4341
movl $0x34b, %edx            # imm = 0x34B
movq %r14, %rcx
movq %rbx, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x3534
jmp 0x336b
leaq 0xee1(%rip), %rdi       # 0x4233
leaq 0xfe8(%rip), %rsi       # 0x4341
movl $0x34e, %edx            # imm = 0x34E
movq %r14, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x3534
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_must_fwrite
void util_must_fwrite(FILE *file, void *buf, size_t size) {
  if(size != 0 && fwrite(buf, size, 1, file) != 1) {
    if(ferror(file)) {
      my_err("error writing %lld bytes: %s", (long long)size, 
	     strerror(ferror(file)));
    } else {
      my_err("error writing %lld bytes\n", (long long)size);
    }
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x33a0
movq %rdx, %rbx
movq %rdi, %r14
pushq $0x1
popq %rdx
movq %rsi, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x2260
cmpq $0x1, %rax
jne 0x33a8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x2170
testl %eax, %eax
je 0x33d6
movl %eax, %edi
callq 0x21a0
leaq 0xe9d(%rip), %rdi       # 0x425f
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3534
leaq 0xe9f(%rip), %rdi       # 0x427c
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3534
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_parse_long
long util_parse_long(const char *str) {
  long val;

  errno = 0;
  val = strtol(str, NULL, 10);
  if(val == 0 && errno) {
    perror("strtol");
    my_err("%s:%d: failed to parse long string '%s'", __FILE__, __LINE__, str);
  }

  return val;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x21f0
movq %rax, %r15
andl $0x0, (%rax)
pushq $0xa
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x21c0
movq %rax, %r14
testq %rax, %rax
jne 0x341c
cmpl $0x0, (%r15)
jne 0x3425
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0xe6a(%rip), %rdi       # 0x4296
callq 0x2270
leaq 0xe65(%rip), %rdi       # 0x429d
leaq 0xf02(%rip), %rsi       # 0x4341
movl $0x371, %edx            # imm = 0x371
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3534
jmp 0x341c
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/util.c
// Function: util_parse_double
double util_parse_double(const char *str) {
  double val;

  if(is_nan_str(str)) {
    return NAN;
  }

  errno = 0;
  val = strtod(str, NULL);
  if(errno) {
    perror("strtod");
    my_err("%s:%d: failed to parse double string '%s'", __FILE__, __LINE__,
	   str);
  }

  return val;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
movsbq (%rbx,%r14), %r15
testq %r15, %r15
je 0x3499
callq 0x2180
cmpq $0x2, %r14
ja 0x3499
movq (%rax), %rax
movzwl (%rax,%r15,2), %eax
andl $0x2000, %eax           # imm = 0x2000
jne 0x3499
callq 0x2140
movq (%rax), %rax
movb (%rax,%r15,4), %al
movb %al, 0x4(%rsp,%r14)
incq %r14
jmp 0x345f
movb $0x0, 0x4(%rsp,%r14)
cmpq $0x3, %r14
jne 0x34b5
leaq 0xe4a(%rip), %rsi       # 0x42f6
leaq 0x4(%rsp), %rdi
pushq $0x3
jmp 0x34c3
leaq 0xe3e(%rip), %rsi       # 0x42fa
leaq 0x4(%rsp), %rdi
pushq $0x2
popq %rdx
callq 0x21b0
testl %eax, %eax
je 0x351f
callq 0x21f0
movq %rax, %r14
andl $0x0, (%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x22b0
cmpl $0x0, (%r14)
je 0x3527
leaq 0xdd6(%rip), %rdi       # 0x42c5
movsd %xmm0, 0x8(%rsp)
callq 0x2270
leaq 0xdcb(%rip), %rdi       # 0x42cc
leaq 0xe39(%rip), %rsi       # 0x4341
movl $0x39f, %edx            # imm = 0x39F
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3534
movsd 0x8(%rsp), %xmm0
jmp 0x3527
movsd 0xb29(%rip), %xmm0      # 0x4050
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/err.c
// Function: my_err
void my_err(const char *format, ...) {
  int i;

  va_list args;
  va_start(args, format);
  fprintf(stderr, "ERROR: ");
  vfprintf(stderr, format, args);
  
  i = strlen(format);
  if(i < 1 || format[i-1] != '\n') {
    /* add new line */
    fprintf(stderr, "\n");
  }

  va_end(args);
  abort();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x3597
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, %r14
movq %rdi, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0x3a22(%rip), %r15      # 0x6fe0
movq (%r15), %rcx
leaq 0xd35(%rip), %rdi       # 0x42fd
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
callq 0x2260
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2130
movq %rbx, %rdi
callq 0x2160
testl %eax, %eax
jle 0x35f5
decl %eax
cmpb $0xa, (%rbx,%rax)
je 0x3600
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x2150
callq 0x2070
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/err.c
// Function: my_warn
void my_warn(const char *format, ...) {
  int i;

  va_list args;
  va_start(args, format);
  fprintf(stderr, "WARNING: ");
  vfprintf(stderr, format, args);
  
  i = strlen(format);
  if(i < 1 || format[i-1] != '\n') {
    /* add new line */
    fprintf(stderr, "\n");
  }

  va_end(args);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x3668
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, %r14
movq %rdi, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0x3951(%rip), %r15      # 0x6fe0
movq (%r15), %rcx
leaq 0xc6c(%rip), %rdi       # 0x4305
pushq $0x9
popq %rsi
pushq $0x1
popq %rdx
callq 0x2260
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2130
movq %rbx, %rdi
callq 0x2160
testl %eax, %eax
jle 0x36c6
decl %eax
cmpb $0xa, (%rbx,%rax)
je 0x36d1
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x2150
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/memutil.c
// Function: my_malloc
void *my_malloc(size_t n_bytes) {
  void *mem;
 
  mem = malloc(n_bytes);
  if(!mem) {
    my_err("%s:%d: could not allocate %ld bytes of memory\n",
	  __FILE__, __LINE__, n_bytes);
  }

  return mem;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x20f0
movq %rax, %rbx
testq %rax, %rax
jne 0x370f
leaq 0xc14(%rip), %rdi       # 0x430f
leaq 0xc3c(%rip), %rsi       # 0x433e
pushq $0x13
popq %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x3534
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gmcvicker[P]check_fastq/memutil.c
// Function: _MY_FREE
void __MY_FREE(void *ptr, const char *filename, const int line_num) {
  if(ptr == NULL) {
    my_err("%s:%d: attempt to free NULL ptr at: %s:%d\n",
	  __FILE__, __LINE__, filename, line_num);
  }
  free(ptr);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x3758
movl %edx, %r8d
movq %rsi, %rcx
leaq 0xc01(%rip), %rdi       # 0x4348
leaq 0xbf0(%rip), %rsi       # 0x433e
pushq $0x2e
popq %rdx
xorl %eax, %eax
callq 0x3534
movq %rbx, %rdi
popq %rbx
jmp 0x22c0
// File: /workspace/github_c_makefile_star2_O2/adelciotto[P]scg/examples/matrix.c
// Function: init_code_string
static void init_code_string(code_string_t *code_string, int num_columns) {
    float32_t x = (float32_t)((rand() % num_columns) * CODE_STRING_CHAR_SIZE);
    float32_t y = -10.0f;
    float32_t speed = (float32_t)((rand() % 40) + 5);
    int num_chars = (rand() % (CODE_STRING_MAX_CHARS - 10)) + 10;

    for (int i = 0; i < num_chars; i++) {
        code_string->chars[i] = random_wchar();
    }

    code_string->x = x;
    code_string->y = y;
    code_string->speed = speed;
    code_string->num_chars = num_chars;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, 0x4(%rsp)
movq %rdi, %rbx
callq 0x2080
movl %eax, %r14d
callq 0x2080
movl %eax, %r12d
callq 0x2080
pushq $0x50
popq %rcx
cltd
idivl %ecx
movl %edx, %r15d
addl $0xa, %r15d
xorl %r13d, %r13d
testl %r15d, %r15d
movl $0x0, %ebp
cmovgl %r15d, %ebp
cmpq %r13, %rbp
je 0x54a4
callq 0x54e6
movl %eax, 0x10(%rbx,%r13,4)
incq %r13
jmp 0x5490
pushq $0x28
popq %rcx
movl %r12d, %eax
cltd
idivl %ecx
addl $0x5, %edx
cvtsi2ss %edx, %xmm0
movl %r14d, %eax
cltd
idivl 0x4(%rsp)
shll $0x3, %edx
cvtsi2ss %edx, %xmm1
movss %xmm1, (%rbx)
movl $0xc1200000, 0x4(%rbx)  # imm = 0xC1200000
movss %xmm0, 0x8(%rbx)
movl %r15d, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/adelciotto[P]scg/examples/matrix.c
// Function: random_wchar
static inline wchar_t random_wchar(void) {
    // One in ten chance of being an english ASCII character.
    if ((rand() % 10) == 0) {
        return (wchar_t)(rand() % (126 - 33) + 33);
    }

    // Otherwise return a Hiragana character.
    return (wchar_t)(rand() % (0x3094 - 0x3041) + 0x3041);
}

// Assembly:
pushq %rbx
callq 0x2080
pushq $0xa
popq %rcx
cltd
idivl %ecx
movl %edx, %ebx
callq 0x2080
testl %ebx, %ebx
pushq $0x5d
popq %rcx
pushq $0x53
popq %rsi
cmovel %ecx, %esi
cltd
idivl %esi
leal 0x21(%rdx), %ecx
leal 0x3041(%rdx), %eax
testl %ebx, %ebx
cmovel %ecx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/adelciotto[P]scg/examples/matrix.c
// Function: shade_pixel
static inline scg_pixel_t shade_pixel(scg_pixel_t color, float32_t shade) {
    uint8_t r = (uint8_t)((float32_t)color.data.r * shade);
    uint8_t g = (uint8_t)((float32_t)color.data.g * shade);
    uint8_t b = (uint8_t)((float32_t)color.data.b * shade);

    return scg_pixel_new_rgb(r, g, b);
}

// Assembly:
movl %edi, %eax
movl %edi, %ecx
shrl $0x10, %ecx
movl $0xff, %edx
andl %edx, %ecx
cvtsi2ss %ecx, %xmm1
shrl $0x8, %eax
mulss %xmm0, %xmm1
cvttss2si %xmm1, %ecx
andl %edx, %eax
cvtsi2ss %eax, %xmm1
mulss %xmm0, %xmm1
cvttss2si %xmm1, %esi
andl %edx, %edi
cvtsi2ss %edi, %xmm1
mulss %xmm0, %xmm1
cvttss2si %xmm1, %eax
shll $0x10, %ecx
andl %edx, %esi
shll $0x8, %esi
orl %ecx, %esi
andl %edx, %eax
orl %esi, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
retq
// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/test-lexing.c
// Function: main
int main(int argc, char **argv)
{
	struct string_list *filelist = NULL;
	char *file;

	preprocess_only = 1;
	sparse_initialize(argc, argv, &filelist);
	FOR_EACH_PTR(filelist, file) {
		sparse(file);
	} END_FOR_EACH_PTR(file);
	show_identifier_stats();
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
andq $0x0, (%rbx)
leaq 0x51637(%rip), %rax     # 0x5fa6c
movl $0x1, (%rax)
movq %rbx, %rdx
callq 0xec0c
movq (%rbx), %rbx
testq %rbx, %rbx
je 0xe480
movq %rbx, %r14
xorl %r15d, %r15d
movl (%r14), %eax
movsbq %al, %rcx
cmpq %rcx, %r15
jge 0xe477
movq 0x18(%r14,%r15,8), %rdi
cmpw $0x100, %ax             # imm = 0x100
jb 0xe46d
testq %rdi, %rdi
je 0xe472
callq 0xef30
incq %r15
jmp 0xe451
movq 0x10(%r14), %r14
cmpq %rbx, %r14
jne 0xe44e
callq 0x1db50
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/usgs[P]nshmp-haz-catalogs/src/agrid/adaptive/read_write_params.c
// Function: read_params_new_old
int read_params_new_old(char *parf, struct compl_levels* cat_comp, struct boundaries* reg, 
  struct catalog* cat, struct smoothp* smp, char *outfnm, int new_style_formatting) 
/*--------------------------------------------------------------------------*/
{
  int retVal=0;

// read parameters
  if ( new_style_formatting ) {
//    retVal=read_params_new(parf, &cat_compl, &region, &cat, &smoothing_params, outf);
    retVal=read_params_new(parf, cat_comp, reg, cat, smp, outfnm);
    if ( (cat_comp->variableCompleteness) == 1 ) read_completenessVals(cat_comp);
    if ( ! retVal ) fprintf(stderr, "\nError reading parameter file, %s with newer-style formatting\n", outfnm); 
  }
  else {
//    retVal=read_params(parf, &cat_comp, &reg, &cat, &smp, outfnm);
    retVal=read_params(parf, cat_comp, reg, cat, smp, outfnm);
    if ( ! retVal ) fprintf(stderr, "\nError reading parameter file, %s with older-style formatting\n", outfnm); 
    fprintf(stderr,"Old-style formatting for parameter input is deprecated and is no longer supported. The option remains in the code for legacy comparisons but requires to user to modify the code to remove the exit statment in the read_write_params.c function.\n");
    exit(1);
  }
  cat_comp->end_yr=cat->end_yr;
  cat_comp->dMag=cat->dMag;

  return retVal;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %rcx, %r14
movq %rsi, %r15
cmpl $0x0, 0x30(%rsp)
je 0x1715
movq %r15, %rsi
movq %r14, %rcx
movq %rbx, %r9
callq 0x1768
movl %eax, %ebp
cmpl $0x1, (%r15)
jne 0x16d4
movq %r15, %rdi
callq 0x1c0c
testl %ebp, %ebp
je 0x16f8
movl (%r14), %eax
movl %eax, 0x10(%r15)
movss 0x8(%r14), %xmm0
movss %xmm0, 0x64(%r15)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x88f9(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x4cba(%rip), %rsi      # 0x63c3
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10f0
jmp 0x16d8
movq %r15, %rsi
movq %r14, %rcx
movq %rbx, %r9
callq 0x1cf8
testl %eax, %eax
jne 0x1742
movq 0x88ca(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x4cca(%rip), %rsi      # 0x6402
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10f0
movq 0x88af(%rip), %rax      # 0x9ff8
movq (%rax), %rcx
leaq 0x4cee(%rip), %rdi      # 0x6441
pushq $0x1
popq %rdx
movl $0xf2, %esi
callq 0x1190
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/usgs[P]nshmp-haz-catalogs/src/agrid/adaptive/read_write_params.c
// Function: read_completenessVals
void read_completenessVals(struct compl_levels* cat_comp)
/*--------------------------------------------------------------------------*/
{
  FILE *fp;
  int cnt=0;
  char buff[BUFFLEN];

  if( (fp = fopen(cat_comp->completenessFile, "r"))==NULL) {
    fprintf(stderr,"File with variable completeness values (lon-lat-year) not found, %s\n", cat_comp->completenessFile);
    exit(1);
  }
  while( fgets(buff,BUFFLEN,fp) ) {
    sscanf(buff, "%f %f %d", &(cat_comp->lon_arr[cnt]), &(cat_comp->lat_arr[cnt]), &(cat_comp->yrCompl_arr[cnt]) );
    cnt++;
  }
  fclose(fp);

//
  cat_comp->nVarComp=cnt;
  fprintf(stderr,"Read variable completeness values from file, %s, with %d points\n", cat_comp->completenessFile, cat_comp->nVarComp);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdi, %r14
addq $0x68, %rdi
leaq 0x4ca0(%rip), %rsi      # 0x68cb
movq %rdi, 0x8(%rsp)
callq 0x1150
testq %rax, %rax
je 0x1cd3
movq %rax, %r15
leaq 0x1f2384(%r14), %r12
leaq 0x10(%rsp), %r13
leaq 0x4925(%rip), %rbx      # 0x6579
xorl %ebp, %ebp
movq %r13, %rdi
movl $0x12c, %esi            # imm = 0x12C
movq %r15, %rdx
callq 0x10d0
testq %rax, %rax
je 0x1c93
leaq -0xa6040(%r12), %rdx
leaq -0x1f20c0(%r12), %r8
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0x1110
incl %ebp
addq $0x4, %r12
jmp 0x1c56
movq %r15, %rdi
callq 0x1080
movl %ebp, 0x2c0(%r14)
movq 0x834f(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x48cf(%rip), %rsi      # 0x6582
movq 0x8(%rsp), %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x10f0
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x831e(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x4850(%rip), %rsi      # 0x6534
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x10f0
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/usgs[P]nshmp-haz-catalogs/src/agrid/adaptive/smooth_seis_rates.c
// Function: get_sigma_value
float get_sigma_value(struct smoothp* smp, struct eqcat* catn, int eqno)
/*--------------------------------------------------------------------------*/
{
  int neighbor_num=-999, neighbor_num_2=-999;
  float sigma;

// fixed-radius smoothing
  if (smp->adapt_sm == 0 ) {
    sigma=smp->sigfix;
  }
// adaptive-radius smoothing
  else {
// shift for c array indexing
    neighbor_num=smp->nnum-1;
    if ( smp->nnum2_log == 0 ) {
      sigma=catn->dist_nbr[eqno][neighbor_num];
    }
    else {
      neighbor_num_2=smp->nnum2-1;
      sigma=(catn->dist_nbr[eqno][neighbor_num]+catn->dist_nbr[eqno][neighbor_num_2])/2;
    }
    if (sigma < smp->sigmin) sigma=smp->sigmin;
  }
  
  return sigma;
}

// Assembly:
cmpl $0x0, 0xc(%rdi)
je 0x39c7
movslq 0x18(%rdi), %rax
decq %rax
cmpl $0x0, 0x10(%rdi)
je 0x39cd
movslq 0x1c(%rdi), %rcx
movslq %edx, %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rsi
cltq
movss 0xbe6e4(%rsi,%rax,4), %xmm0
addss 0xbe6e0(%rsi,%rcx,4), %xmm0
mulss 0x3723(%rip), %xmm0     # 0x70e8
jmp 0x39e0
movss 0x2c(%rdi), %xmm0
retq
movslq %edx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rsi
movss 0xbe6e4(%rsi,%rax,4), %xmm0
movss 0x24(%rdi), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x39cc
movaps %xmm1, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/usgs[P]nshmp-haz-catalogs/src/agrid/adaptive/smooth_seis_rates.c
// Function: check_earthquake_catalog_gaps
float check_earthquake_catalog_gaps(struct eqcat* eqcatp, struct compl_levels* cat_compp, int eqno)
/*--------------------------------------------------------------------------*/
{
  int cnt, cnt1, np, nyrs;
  int eqyr, eqmon, eqday, eqlineno;
  float eqlon, eqlat, eqmag;
  float plon[NPP], plat[NPP];

// assign coordinates
  eqlon=eqcatp->lon[eqno];
  eqlat=eqcatp->lat[eqno];
  eqmag=eqcatp->mag[eqno];
  eqyr=eqcatp->year[eqno];
  eqmon=eqcatp->month[eqno];
  eqday=eqcatp->day[eqno];
  eqlineno=eqcatp->lineno[eqno];

// loop through polygons and check if eq epicenter is within polygons
  for(cnt=0;cnt<cat_compp->polygons.npoly; cnt++) {
    np=cat_compp->polygons.elem[cnt].npts;
    nyrs=cat_compp->polygons.elem[cnt].nyears;
    for(cnt1=0;cnt1<np;cnt1++) {
      plon[cnt1]=cat_compp->polygons.elem[cnt].lon[cnt1];
      plat[cnt1]=cat_compp->polygons.elem[cnt].lat[cnt1];
    }
    if ( lxyint_(&eqlon,&eqlat,plon,plat,&np) ) { 
      fprintf(
          stderr,
          "EQ-reduced-time-for-rate: %8.3f %8.3f %6d %4d %4d %8.4f %6d\n",
          eqlon, eqlat, eqyr, eqmon, eqday, eqmag, eqlineno);
      return nyrs;
    }
  }

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r12
movslq %edx, %rax
movss 0x668a4(%rdi,%rax,4), %xmm0
leaq 0x4(%rsp), %rcx
movss %xmm0, (%rcx)
movss 0x75304(%rdi,%rax,4), %xmm0
movq %rsp, %rcx
movss %xmm0, (%rcx)
movss 0x57e44(%rdi,%rax,4), %xmm0
movss %xmm0, 0x8(%rsp)
movl 0x4(%rdi,%rax,4), %ecx
movl %ecx, 0x14(%rsp)
movl 0xea64(%rdi,%rax,4), %ecx
movl %ecx, 0x10(%rsp)
movl 0x1d4c4(%rdi,%rax,4), %ecx
movl %ecx, 0xc(%rsp)
movl 0x3a984(%rdi,%rax,4), %eax
movl %eax, 0x18(%rsp)
leaq 0x2983c8(%rsi), %rbx
leaq 0x298420(%rsi), %r14
leaq 0x1c(%rsp), %rbp
xorl %r15d, %r15d
movslq 0x2983c4(%r12), %rax
cmpq %rax, %r15
jge 0x3b32
imulq $0xa8, %r15, %rcx
movl (%rbx,%rcx), %eax
movl %eax, 0x1c(%rsp)
movl 0x4(%rbx,%rcx), %r13d
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x3ac8
movss -0x50(%r14,%rcx,4), %xmm0
movss %xmm0, 0x70(%rsp,%rcx,4)
movss (%r14,%rcx,4), %xmm0
movss %xmm0, 0x20(%rsp,%rcx,4)
incq %rcx
jmp 0x3aa5
leaq 0x4(%rsp), %rdi
movq %rsp, %rsi
leaq 0x70(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %rbp, %r8
callq 0x329b
incq %r15
addq $0xa8, %r14
testl %eax, %eax
je 0x3a75
movq 0x6501(%rip), %rax      # 0x9ff8
cvtss2sd 0x4(%rsp), %xmm0
movq (%rax), %rdi
cvtss2sd (%rsp), %xmm1
cvtss2sd 0x8(%rsp), %xmm2
leaq 0x36ee(%rip), %rsi      # 0x7200
movl 0x14(%rsp), %edx
movl 0x10(%rsp), %ecx
movl 0xc(%rsp), %r8d
movl 0x18(%rsp), %r9d
movb $0x3, %al
callq 0x10f0
cvtsi2ss %r13d, %xmm0
jmp 0x3b35
xorps %xmm0, %xmm0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/usgs[P]nshmp-haz-catalogs/src/agrid/adaptive/write_asum_to_file.c
// Function: write_unsmoothed_asum_to_file
void write_unsmoothed_asum_to_file(struct rates* seisr, char *fbasenm)
/*--------------------------------------------------------------------------*/
{ 
  FILE *fpout;
//  int nsrc, cnt, ierr;
  int nsrc, cnt, ierr;
  float asum[NV];
  char fileout[200];
//  struct header headr;


// get rate array and naming based on magnitude input values
  nsrc=seisr->nv;
// no-smoothing
  sprintf(fileout,"%s_noSmooth.out", fbasenm);
  for(cnt=0; cnt<nsrc; cnt++) asum[cnt]=seisr->asum_noSm[cnt];

// write results to file, fileout
  fpout=fopen(fileout,"wb+");
  ierr=fwrite(asum,4,nsrc,fpout);
  fclose(fpout);
  fprintf(stderr,"Wrote un-smoothed results to file, %s.\n", fileout);
  

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa6110, %rsp          # imm = 0xA6110
movq %rsi, %rdx
movq %rdi, %r14
movslq 0x298100(%rdi), %rbx
leaq 0x2845(%rip), %rsi      # 0x7602
xorl %r15d, %r15d
movq %rsp, %rdi
xorl %eax, %eax
callq 0x1170
testl %ebx, %ebx
movl $0x0, %eax
cmovgl %ebx, %eax
cmpq %r15, %rax
je 0x4df2
movss 0x1f20c0(%r14,%r15,4), %xmm0
movss %xmm0, 0xd0(%rsp,%r15,4)
incq %r15
jmp 0x4dd4
leaq 0x279f(%rip), %rsi      # 0x7598
movq %rsp, %r14
movq %r14, %rdi
callq 0x1150
movq %rax, %r15
leaq 0xd0(%rsp), %rdi
pushq $0x4
popq %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x1190
movq %r15, %rdi
callq 0x1080
movq 0x51cc(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x27dc(%rip), %rsi      # 0x7612
movq %r14, %rdx
xorl %eax, %eax
callq 0x10f0
addq $0xa6110, %rsp          # imm = 0xA6110
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)