LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/viewing.c
// Function: Frustum
static int Frustum(lua_State *L)
    {
    mat_t m;
    double l = luaL_checknumber(L, 1); /* left */
    double r = luaL_checknumber(L, 2); /* right */
    double b = luaL_checknumber(L, 3); /* bottom */
    double t = luaL_checknumber(L, 4); /* top */
    double n = luaL_checknumber(L, 5); /* near */
    double f = luaL_checknumber(L, 6); /* far */
    frustum(m, l, r, b, t, n, f);
    return pushmat(L, m, 4, 4, 4, 4);
    }

// Assembly:
pushq %rbx
subq $0xc0, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8320
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8320
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8320
movapd %xmm0, 0x30(%rsp)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x8320
movapd %xmm0, 0x20(%rsp)
movq %rbx, %rdi
movl $0x5, %esi
callq 0x8320
movapd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
movl $0x6, %esi
callq 0x8320
xorps %xmm1, %xmm1
leaq 0x40(%rsp), %rsi
movups %xmm1, 0x8(%rsi)
movups %xmm1, 0x48(%rsi)
movups %xmm1, 0x58(%rsi)
movups %xmm1, 0x68(%rsi)
movups %xmm1, 0x18(%rsi)
movups %xmm1, 0x38(%rsi)
movq $0x0, 0x78(%rsi)
movsd (%rsp), %xmm3
movapd %xmm3, %xmm1
movsd 0x8(%rsp), %xmm2
subsd %xmm2, %xmm1
addsd %xmm3, %xmm2
divsd %xmm1, %xmm2
movsd %xmm2, 0x10(%rsi)
movapd 0x20(%rsp), %xmm5
movapd %xmm5, %xmm2
movapd 0x30(%rsp), %xmm4
subsd %xmm4, %xmm2
movapd 0x10(%rsp), %xmm6
movapd %xmm6, %xmm3
unpcklpd %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0]
movapd 0x1435(%rip), %xmm4     # 0x17b70
unpcklpd %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0]
movapd %xmm3, %xmm5
mulpd %xmm4, %xmm5
addpd %xmm3, %xmm4
movsd %xmm5, %xmm4            # xmm4 = xmm5[0],xmm4[1]
divsd %xmm1, %xmm5
movsd %xmm5, (%rsi)
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
divpd %xmm2, %xmm4
movapd %xmm6, %xmm1
addsd %xmm0, %xmm1
xorpd 0x961(%rip), %xmm1      # 0x170d0
movupd %xmm4, 0x28(%rsi)
movapd %xmm0, %xmm2
mulsd 0x1400(%rip), %xmm0     # 0x17b80
subsd %xmm6, %xmm2
mulsd %xmm6, %xmm0
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
divpd %xmm2, %xmm1
movapd %xmm1, 0x50(%rsi)
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x70(%rsi)
movl $0x4, %edx
movl $0x4, %ecx
movl $0x4, %r8d
movl $0x4, %r9d
movq %rbx, %rdi
callq 0x84d0
addq $0xc0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/viewing.c
// Function: Perspective
static int Perspective(lua_State *L)
/* perspective(fovy, aspect, near, far)
 */
    {
    mat_t m;
    double fovy = luaL_checknumber(L, 1); /* radians */
    double aspect = luaL_checknumber(L, 2);
    double n = luaL_checknumber(L, 3); /* near */
    double f = luaL_checknumber(L, 4); /* far */
    perspective(m, fovy, aspect, n, f);
    return pushmat(L, m, 4, 4, 4, 4);
    }

// Assembly:
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8320
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8320
movsd %xmm0, 0x18(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8320
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x8320
movaps %xmm0, 0x20(%rsp)
movsd 0x10(%rsp), %xmm0
mulsd 0xf69(%rip), %xmm0      # 0x17798
callq 0x88a0
movsd 0x8(%rsp), %xmm2
mulsd %xmm2, %xmm0
movsd 0x18(%rsp), %xmm3
mulsd %xmm0, %xmm3
xorps %xmm1, %xmm1
leaq 0x30(%rsp), %rsi
movups %xmm1, 0x28(%rsi)
movups %xmm1, 0x48(%rsi)
movups %xmm1, 0x58(%rsi)
movups %xmm1, 0x68(%rsi)
movups %xmm1, 0x8(%rsi)
movups %xmm1, 0x18(%rsi)
movups %xmm1, 0x38(%rsi)
movq $0x0, 0x78(%rsi)
movapd %xmm2, %xmm1
divsd %xmm3, %xmm1
movsd %xmm1, (%rsi)
movapd %xmm2, %xmm1
divsd %xmm0, %xmm1
movapd %xmm2, %xmm0
movapd 0x20(%rsp), %xmm3
addsd %xmm3, %xmm0
xorpd 0x832(%rip), %xmm0      # 0x170d0
movsd %xmm1, 0x28(%rsi)
movapd %xmm3, %xmm1
mulsd 0x12d1(%rip), %xmm3     # 0x17b80
subsd %xmm2, %xmm1
mulsd %xmm2, %xmm3
unpcklpd %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0]
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
divpd %xmm1, %xmm0
movapd %xmm0, 0x50(%rsi)
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x70(%rsi)
movl $0x4, %edx
movl $0x4, %ecx
movl $0x4, %r8d
movl $0x4, %r9d
movq %rbx, %rdi
callq 0x84d0
addq $0xb0, %rsp
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/aes128poetv1aes4/ni/poet.c
// Function: encrypt_block
void encrypt_block(struct poet_ctx *ctx, const uint8_t plaintext[16],
		   uint8_t ciphertext[16])
{
  block tmp;
  TOP_HASH;
  xor_block(ctx->x, plaintext,ctx->x);

  AESNI_encrypt(ctx->x, tmp, ctx->aes_enc);

  BOTTOM_HASH;
  xor_block(ciphertext, tmp,ctx->y);

  memcpy(ctx->y, tmp, BLOCKLEN);
  ctx->mlen+=BLOCKLEN_BITS;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x250(%rdi), %r15
leaq 0x160(%rdi), %rdx
movq %r15, %rdi
movq %r15, %rsi
callq 0x1030
movl $0x250, %eax            # imm = 0x250
movb -0x250(%r12,%rax), %cl
xorb %cl, (%rbx,%rax)
incq %rax
cmpq $0x260, %rax            # imm = 0x260
jne 0x1b2e
movq %rsp, %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x1120
leaq 0x260(%rbx), %r15
leaq 0x1b0(%rbx), %rdx
movq %r15, %rdi
movq %r15, %rsi
callq 0x1030
xorl %eax, %eax
movb (%r15,%rax), %cl
xorb (%rsp,%rax), %cl
movb %cl, (%r14,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x1b6d
vmovaps (%rsp), %xmm0
vmovaps %xmm0, (%r15)
subq $-0x80, 0x280(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/aes128poetv1aes4/ni/poet.c
// Function: decrypt_block
void decrypt_block(struct poet_ctx *ctx, const uint8_t ciphertext[16],
		   uint8_t plaintext[16])
{
  block tmp;
  BOTTOM_HASH;
  xor_block(ctx->y, ciphertext,ctx->y);

  AESNI_decrypt(ctx->y, tmp, ctx->aes_dec);

  TOP_HASH;
  xor_block(plaintext, tmp,ctx->x);

  memcpy(ctx->x, tmp, BLOCKLEN);
  ctx->mlen+=BLOCKLEN_BITS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x260(%rdi), %r15
leaq 0x1b0(%rdi), %rdx
movq %r15, %rdi
movq %r15, %rsi
callq 0x1030
xorl %eax, %eax
movb (%r12,%rax), %cl
xorb %cl, (%r15,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x1dcd
leaq 0xb0(%rbx), %rdx
movq %rsp, %rsi
movq %r15, %rdi
callq 0x1070
leaq 0x250(%rbx), %r15
leaq 0x160(%rbx), %rdx
movq %r15, %rdi
movq %r15, %rsi
callq 0x1030
xorl %eax, %eax
movb (%r15,%rax), %cl
xorb (%rsp,%rax), %cl
movb %cl, (%r14,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x1e0b
vmovaps (%rsp), %xmm0
vmovaps %xmm0, (%r15)
subq $-0x80, 0x280(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x234d
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 0x3c6c(%rip), %r15      # 0x5fe0
movq (%r15), %rcx
leaq 0x1f87(%rip), %rdi      # 0x4305
pushq $0x9
popq %rsi
pushq $0x1
popq %rdx
callq 0x2250
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2130
movq %rbx, %rdi
callq 0x2160
testl %eax, %eax
jle 0x23ab
decl %eax
cmpb $0xa, (%rbx,%rax)
je 0x23b6
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x2150
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/gmcvicker[P]check_fastq/util.c
// Function: util_has_gz_ext
int util_has_gz_ext(const char *filename) {
  size_t len;

  len = strlen(filename);

  if((len > 3) && (strncmp(&filename[len-3], ".gz",3)==0)) {
    return TRUE;
  }
  return FALSE;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x2160
cmpq $0x4, %rax
jb 0x26bd
cmpb $0x2e, -0x3(%rbx,%rax)
jne 0x26bd
cmpb $0x67, -0x2(%rbx,%rax)
jne 0x26bd
movl $0x1, %ecx
cmpb $0x7a, -0x1(%rbx,%rax)
je 0x26bf
xorl %ecx, %ecx
movl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gmcvicker[P]check_fastq/util.c
// Function: util_read_entire_file
char *util_read_entire_file(char *filename) {
  FILE *fh;
  struct stat fs;
  char *buf;

  fh = fopen(filename, "r");

  if(fh == NULL) {
    my_err("%s:%d: Could not open tree file '%s'", __FILE__, 
	    __LINE__, filename);
  }

  /* determine file size */
  fstat(fileno(fh), &fs);

  /* read entire file at once */
  buf = my_new(char, fs.st_size + 1);
  if(fread(buf, fs.st_size, 1, fh) == 0) {
    my_err("%s:%d: Could not read entire file '%s'", __FILE__,
	    __LINE__, filename);
  }

  buf[fs.st_size] = '\0';

  return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
leaq 0x1981(%rip), %rsi      # 0x405c
callq 0x2100
movq %rax, %r14
testq %rax, %rax
jne 0x2705
leaq 0x196f(%rip), %rdi      # 0x405e
leaq 0x1c4b(%rip), %rsi      # 0x4341
movl $0x31, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3790
movq %r14, %rdi
callq 0x2030
leaq 0x8(%rsp), %r15
movl %eax, %edi
movq %r15, %rsi
callq 0x20b0
movq 0x30(%r15), %r15
leaq 0x1(%r15), %rdi
callq 0x3868
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x21d0
testq %rax, %rax
jne 0x2761
leaq 0x1938(%rip), %rdi      # 0x4083
leaq 0x1bef(%rip), %rsi      # 0x4341
movl $0x3b, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3790
movb $0x0, (%r12,%r15)
movq %r12, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gmcvicker[P]check_fastq/util.c
// Function: util_fcount_lines
long util_fcount_lines(FILE *fh) {
  char buf[UTIL_FGETS_BUF_SZ];
  long line_count;
  int len;

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

  line_count = 0;
  while(fgets(buf, UTIL_FGETS_BUF_SZ, fh) != NULL) {
    len = strlen(buf);
    if(buf[len-1] == '\n') {
      line_count++;
    }
  }

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

  return line_count;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x3fe0, %rsp           # imm = 0x3FE0
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x2080
testl %eax, %eax
je 0x27ae
leaq 0x190f(%rip), %rdi      # 0x40aa
leaq 0x1b9f(%rip), %rsi      # 0x4341
movl $0x50, %edx
xorl %eax, %eax
callq 0x3790
movq %rsp, %rdi
movl $0x3fdc, %esi           # imm = 0x3FDC
movq %rbx, %rdx
callq 0x2120
xorl %r14d, %r14d
testq %rax, %rax
je 0x27f6
movq %rsp, %r15
movq %r15, %rdi
callq 0x2160
decl %eax
cltq
xorl %ecx, %ecx
cmpb $0xa, (%rsp,%rax)
sete %cl
addq %rcx, %r14
movq %r15, %rdi
movl $0x3fdc, %esi           # imm = 0x3FDC
movq %rbx, %rdx
callq 0x2120
testq %rax, %rax
jne 0x27c9
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2080
testl %eax, %eax
je 0x2820
leaq 0x189d(%rip), %rdi      # 0x40aa
leaq 0x1b2d(%rip), %rsi      # 0x4341
movl $0x5c, %edx
xorl %eax, %eax
callq 0x3790
movq %r14, %rax
addq $0x3fe0, %rsp           # imm = 0x3FE0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gmcvicker[P]check_fastq/util.c
// Function: util_gzcount_lines
long util_gzcount_lines(gzFile gzf) {
  char buf[UTIL_FGETS_BUF_SZ];
  long line_count;
  size_t len;

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

  line_count = 0;

  while(gzgets(gzf, buf, UTIL_FGETS_BUF_SZ) != NULL) {
    len = strlen(buf);
    if(buf[len-1] == '\n') {
      line_count++;
    }
  }

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

  return line_count;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x3fe0, %rsp           # imm = 0x3FE0
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x2110
testq %rax, %rax
je 0x2867
leaq 0x1856(%rip), %rdi      # 0x40aa
leaq 0x1ae6(%rip), %rsi      # 0x4341
movl $0x6f, %edx
xorl %eax, %eax
callq 0x3790
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0x3fdc, %edx           # imm = 0x3FDC
callq 0x2230
xorl %r14d, %r14d
testq %rax, %rax
je 0x28aa
movq %r15, %rdi
callq 0x2160
xorl %ecx, %ecx
cmpb $0xa, -0x1(%rax,%r15)
sete %cl
addq %rcx, %r14
movq %rbx, %rdi
movq %r15, %rsi
movl $0x3fdc, %edx           # imm = 0x3FDC
callq 0x2230
jmp 0x287d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2110
testq %rax, %rax
je 0x28d5
leaq 0x17e8(%rip), %rdi      # 0x40aa
leaq 0x1a78(%rip), %rsi      # 0x4341
movl $0x7c, %edx
xorl %eax, %eax
callq 0x3790
movq %r14, %rax
addq $0x3fe0, %rsp           # imm = 0x3FE0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2925
leaq 0x1798(%rip), %rdi      # 0x40aa
leaq 0x1a28(%rip), %rsi      # 0x4341
movl $0x91, %edx
xorl %eax, %eax
callq 0x3790
movq 0x8(%rsp), %rdi
callq 0x2160
movq %rax, %r15
testl %r15d, %r15d
je 0x29f2
cmpl $0x3fdd, %r15d          # imm = 0x3FDD
jl 0x2963
leaq 0x1782(%rip), %rdi      # 0x40cd
leaq 0x19ef(%rip), %rsi      # 0x4341
movl $0x9b, %edx
movl $0x3fdc, %ecx           # imm = 0x3FDC
xorl %eax, %eax
callq 0x3790
leaq 0x10(%rsp), %rdi
movl $0x3fdc, %esi           # imm = 0x3FDC
movq %rbx, %rdx
callq 0x2120
testq %rax, %rax
je 0x29f7
movslq %r15d, %r12
leaq 0x10(%rsp), %r13
xorl %r15d, %r15d
movl $0x1, %ebp
xorl %r14d, %r14d
testl %ebp, %ebp
je 0x29ac
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x20e0
testl %eax, %eax
movl $0x1, %eax
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
movq %r13, %rdi
movl $0x3fdc, %esi           # imm = 0x3FDC
movq %rbx, %rdx
callq 0x2120
testq %rax, %rax
jne 0x298d
jmp 0x29fa
xorl %r15d, %r15d
jmp 0x2a24
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2080
testl %eax, %eax
je 0x2a24
leaq 0x1699(%rip), %rdi      # 0x40aa
leaq 0x1929(%rip), %rsi      # 0x4341
movl $0xb8, %edx
xorl %eax, %eax
callq 0x3790
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_O3/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 0x2a7a
leaq 0x1643(%rip), %rdi      # 0x40aa
leaq 0x18d3(%rip), %rsi      # 0x4341
movl $0xcc, %edx
xorl %eax, %eax
callq 0x3790
movq 0x8(%rsp), %rdi
callq 0x2160
movq %rax, %r15
testl %r15d, %r15d
je 0x2b47
cmpl $0x3fdd, %r15d          # imm = 0x3FDD
jl 0x2ab8
leaq 0x162d(%rip), %rdi      # 0x40cd
leaq 0x189a(%rip), %rsi      # 0x4341
movl $0xd6, %edx
movl $0x3fdc, %ecx           # imm = 0x3FDC
xorl %eax, %eax
callq 0x3790
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movl $0x3fdc, %edx           # imm = 0x3FDC
callq 0x2230
testq %rax, %rax
je 0x2b4c
movslq %r15d, %r12
leaq 0x10(%rsp), %r13
xorl %r15d, %r15d
movl $0x1, %ebp
xorl %r14d, %r14d
testl %ebp, %ebp
je 0x2b01
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x20e0
testl %eax, %eax
movl $0x1, %eax
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
movq %rbx, %rdi
movq %r13, %rsi
movl $0x3fdc, %edx           # imm = 0x3FDC
callq 0x2230
testq %rax, %rax
jne 0x2ae2
jmp 0x2b4f
xorl %r15d, %r15d
jmp 0x2b7a
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2110
testq %rax, %rax
je 0x2b7a
leaq 0x1543(%rip), %rdi      # 0x40aa
leaq 0x17d3(%rip), %rsi      # 0x4341
movl $0xf3, %edx
xorl %eax, %eax
callq 0x3790
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_O3/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, %r14
movq %rsp, %rsi
movl $0x3fdc, %edx           # imm = 0x3FDC
callq 0x2230
testq %rax, %rax
je 0x2df1
movq %rsp, %r12
movq %r12, %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x1(%rax), %rdi
callq 0x3868
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
cmpb $0xa, -0x1(%rsp,%rbx)
jne 0x2d89
decq %rbx
jmp 0x2de3
movq %r14, %rdi
movq %r12, %rsi
movl $0x3fdc, %edx           # imm = 0x3FDC
callq 0x2230
testq %rax, %rax
je 0x2df4
movq %r12, %rdi
callq 0x2160
movq %rax, %r13
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2bb1
movq %rax, %rbp
addq %r13, %rbx
movq %r15, %rdi
leaq 0x1579(%rip), %rsi      # 0x4341
movl $0x163, %edx            # imm = 0x163
callq 0x38bb
cmpb $0xa, -0x1(%r13,%r12)
movq %rbp, %r15
jne 0x2d89
decq %rbx
movq %rbp, %r15
cmpb $0xa, (%r15,%rbx)
jne 0x2df4
movb $0x0, (%r15,%rbx)
jmp 0x2df4
xorl %r15d, %r15d
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_O3/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, %r14
movq %rsp, %rdi
movl $0x3fdc, %esi           # imm = 0x3FDC
movq %r14, %rdx
callq 0x2120
testq %rax, %rax
je 0x2ecf
movq %rsp, %r12
movq %r12, %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x1(%rax), %rdi
callq 0x3868
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
cmpb $0xa, -0x1(%rsp,%rbx)
jne 0x2e67
decq %rbx
jmp 0x2ec1
movq %r12, %rdi
movl $0x3fdc, %esi           # imm = 0x3FDC
movq %r14, %rdx
callq 0x2120
testq %rax, %rax
je 0x2ed2
movq %r12, %rdi
callq 0x2160
movq %rax, %r13
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2bb1
movq %rax, %rbp
addq %r13, %rbx
movq %r15, %rdi
leaq 0x149b(%rip), %rsi      # 0x4341
movl $0x191, %edx            # imm = 0x191
callq 0x38bb
cmpb $0xa, -0x1(%r13,%r12)
movq %rbp, %r15
jne 0x2e67
decq %rbx
movq %rbp, %r15
cmpb $0xa, (%r15,%rbx)
jne 0x2ed2
movb $0x0, (%r15,%rbx)
jmp 0x2ed2
xorl %r15d, %r15d
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_O3/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 %rdi, %rbx
xorl %r14d, %r14d
testq %rsi, %rsi
je 0x2f27
cmpb $0x0, (%rbx,%r14)
je 0x2f27
incq %r14
cmpq %r14, %rsi
jne 0x2f15
movq %rsi, %r14
leaq 0x1(%r14), %rdi
callq 0x3868
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2220
movb $0x0, (%r15,%r14)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %rbx
pushq %rax
movb (%rdi), %bpl
testb %bpl, %bpl
je 0x2f7d
movq %rdi, %rbx
callq 0x2140
incq %rbx
movq (%rax), %rcx
movsbq %bpl, %rdx
movb (%rcx,%rdx,4), %cl
movb %cl, -0x1(%rbx)
movb (%rbx), %bpl
incq %rbx
testb %bpl, %bpl
jne 0x2f65
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %rbx
pushq %rax
movb (%rdi), %bpl
testb %bpl, %bpl
je 0x2fb2
movq %rdi, %rbx
callq 0x2210
incq %rbx
movq (%rax), %rcx
movsbq %bpl, %rdx
movb (%rcx,%rdx,4), %cl
movb %cl, -0x1(%rbx)
movb (%rbx), %bpl
incq %rbx
testb %bpl, %bpl
jne 0x2f9a
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gmcvicker[P]check_fastq/util.c
// Function: util_str_replace
void util_str_replace(char *str, char from, char to) {
  size_t i;

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

// Assembly:
movb (%rdi), %al
testb %al, %al
je 0x2fd3
incq %rdi
cmpb %sil, %al
jne 0x2fca
movb %dl, -0x1(%rdi)
movb (%rdi), %al
incq %rdi
testb %al, %al
jne 0x2fc2
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movb (%rdi), %dl
testb %dl, %dl
je 0x2ff6
leaq 0x1(%rdi), %rcx
xorl %eax, %eax
cmpb %sil, %dl
je 0x2feb
movb %dl, (%rdi,%rax)
incq %rax
movb (%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x2fe0
jmp 0x2ff8
xorl %eax, %eax
movb $0x0, (%rdi,%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
pushq %rax
movq %rdi, %r14
movl $0x14, %edi
callq 0x3868
movq %rax, %rbx
leaq 0x10e6(%rip), %rdx      # 0x4101
movl $0xe, %esi
movq %rax, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2050
movl %eax, %ebp
testl %eax, %eax
jne 0x3050
leaq 0x10cb(%rip), %rdi      # 0x4105
leaq 0x1300(%rip), %rsi      # 0x4341
movl $0x21e, %edx            # imm = 0x21E
movq %r14, %rcx
xorl %eax, %eax
callq 0x3790
movslq %ebp, %rax
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
movslq %ecx, %rcx
leaq (%rax,%rcx), %rdi
incq %rdi
callq 0x3868
movq %rax, %r14
xorl %r15d, %r15d
testl %ebp, %ebp
jle 0x30d3
movl %ebp, %eax
decq %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x1, %edx
movl $0xaaaaaaab, %esi       # imm = 0xAAAAAAAB
movb (%rbx,%rax), %r8b
movslq %r15d, %rdi
movb %r8b, (%r14,%rdi)
addq $-0x1, %rax
jae 0x30c5
movl %edx, %r8d
imulq %rsi, %r8
shrq $0x21, %r8
leal (%r8,%r8,2), %r8d
addl %ecx, %r8d
jne 0x30c5
movb $0x2c, 0x1(%r14,%rdi)
incq %rdi
movl %edi, %r15d
incl %r15d
decl %ecx
incl %edx
decl %ebp
jne 0x3094
movslq %r15d, %r15
movb $0x0, (%r14,%r15)
leaq 0x1262(%rip), %rsi      # 0x4341
movq %rbx, %rdi
movl $0x234, %edx            # imm = 0x234
callq 0x38bb
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3114
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3150
leaq 0xff4(%rip), %rdi       # 0x4131
leaq 0x11fd(%rip), %rsi      # 0x4341
movl $0x24b, %edx            # imm = 0x24B
xorl %eax, %eax
callq 0x3790
decq %r14
imulq %rbx, %r14
testq %r14, %r14
jle 0x319a
addq %r15, %r14
movq %rbx, %r13
negq %r13
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2290
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2290
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x2290
addq %rbx, %r15
addq %r13, %r14
cmpq %r14, %r15
jb 0x3165
movq %r12, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x22b0
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb (%rdi), %bpl
testb %bpl, %bpl
je 0x3200
callq 0x2180
leaq 0x1(%rbx), %rdx
xorl %ecx, %ecx
movq (%rax), %rsi
movzbl %bpl, %edi
testb $0x20, 0x1(%rsi,%rdi,2)
jne 0x31f3
movb %bpl, (%rbx,%rcx)
incq %rcx
movb (%rdx), %bpl
incq %rdx
testb %bpl, %bpl
jne 0x31de
jmp 0x3202
xorl %ecx, %ecx
movb $0x0, (%rbx,%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movb (%rdi), %bpl
testb %bpl, %bpl
je 0x3271
movq %rdi, %rbx
callq 0x2180
movq (%rax), %rax
xorl %r15d, %r15d
movzbl %bpl, %ecx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x3244
movb 0x1(%rbx,%r15), %bpl
incq %r15
testb %bpl, %bpl
jne 0x322a
jmp 0x3249
testq %r15, %r15
je 0x3271
leaq (%rbx,%r15), %r14
movq %rbx, %rdi
callq 0x2160
subq %r15, %rax
leaq 0x1(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21c0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
testq %rax, %rax
jle 0x32b7
movq %rax, %r14
callq 0x2180
incq %r14
movq (%rax), %rcx
movzbl -0x2(%rbx,%r14), %edx
testb $0x20, 0x1(%rcx,%rdx,2)
je 0x32b7
movb $0x0, -0x2(%rbx,%r14)
decq %r14
cmpq $0x1, %r14
ja 0x3298
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/gmcvicker[P]check_fastq/util.c
// Function: util_str_starts_with
int util_str_starts_with(const char *str, const char *start) {
  size_t i;

  i = 0;

  while(start[i] != '\0') {
    if(str[i] != start[i]) {
      return FALSE;
    }
    i++;
  }

  return TRUE;
}

// Assembly:
movb (%rsi), %cl
movl $0x1, %eax
testb %cl, %cl
je 0x32ee
xorl %edx, %edx
cmpb %cl, (%rdi,%rdx)
jne 0x32ef
movb 0x1(%rsi,%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x32de
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r14
movq %rdi, %rbx
callq 0x2160
movq %rax, %r15
movq %r14, %rdi
callq 0x2160
movq %rax, %rcx
xorl %eax, %eax
cmpq %r15, %rcx
ja 0x334a
movl $0x1, %eax
testq %rcx, %rcx
je 0x334a
leaq (%rcx,%r14), %rdx
decq %rdx
negq %rcx
leaq (%r15,%rbx), %rsi
decq %rsi
xorl %edi, %edi
movb (%rsi,%rdi), %r8b
cmpb (%rdx,%rdi), %r8b
jne 0x3348
decq %rdi
cmpq %rdi, %rcx
jne 0x3334
jmp 0x334a
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3387
leaq 0xddb(%rip), %rdi       # 0x414f
leaq 0xfc6(%rip), %rsi       # 0x4341
movl $0x2f5, %edx            # imm = 0x2F5
xorl %eax, %eax
callq 0x3790
leaq 0xded(%rip), %rsi       # 0x417b
leaq 0x8(%rsp), %rdi
callq 0x2240
movq %rax, (%r14)
xorl %r15d, %r15d
testq %rax, %rax
je 0x33d5
leaq 0xdd1(%rip), %r12       # 0x417b
leaq 0x8(%rsp), %r13
cmpb $0x0, (%rax)
je 0x33bc
incq %r15
cmpq %rbx, %r15
je 0x33d2
movq %r13, %rdi
movq %r12, %rsi
callq 0x2240
movq %rax, (%r14,%r15,8)
testq %rax, %rax
jne 0x33af
jmp 0x33d5
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_O3/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 0x342c
movq %rdx, %rbx
movq %rdi, %r14
movl $0x1, %edx
movq %rsi, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x21d0
cmpq $0x1, %rax
jne 0x3434
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x2170
testl %eax, %eax
je 0x3462
movl %eax, %edi
callq 0x21a0
leaq 0xd30(%rip), %rdi       # 0x417e
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3790
leaq 0xd32(%rip), %rdi       # 0x419b
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3790
// File: /workspace/github_c_makefile_star2_O3/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 0x21e0
movq %rax, %r12
movl $0x0, (%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2100
movq %rax, %r15
testq %rax, %rax
jne 0x34d5
movl (%r12), %edi
callq 0x21a0
leaq 0xd01(%rip), %rdi       # 0x41ba
leaq 0xe81(%rip), %rsi       # 0x4341
movl $0x331, %edx            # imm = 0x331
movq %r14, %rcx
movq %rbx, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x3790
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3533
cmpb $0x62, 0x1(%rbx)
jne 0x3533
cmpb $0x0, 0x2(%rbx)
jne 0x3533
leaq 0xb4e(%rip), %rsi       # 0x4058
movq %r14, %rdi
callq 0x32f2
testl %eax, %eax
jne 0x3533
leaq 0xccd(%rip), %rdi       # 0x41ea
leaq 0xe1d(%rip), %rsi       # 0x4341
movl $0x342, %edx            # imm = 0x342
movq %r14, %rcx
xorl %eax, %eax
callq 0x22ea
callq 0x21e0
movq %rax, %r12
movl $0x0, (%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2090
movq %rax, %r15
testq %rax, %rax
jne 0x35a6
movl (%r12), %edi
testl %edi, %edi
je 0x3586
callq 0x21a0
leaq 0xc52(%rip), %rdi       # 0x41ba
leaq 0xdd2(%rip), %rsi       # 0x4341
movl $0x34b, %edx            # imm = 0x34B
movq %r14, %rcx
movq %rbx, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x3790
jmp 0x35a6
leaq 0xca6(%rip), %rdi       # 0x4233
leaq 0xdad(%rip), %rsi       # 0x4341
movl $0x34e, %edx            # imm = 0x34E
movq %r14, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x3790
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x35dd
movq %rdx, %rbx
movq %rdi, %r14
movl $0x1, %edx
movq %rsi, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x2250
cmpq $0x1, %rax
jne 0x35e5
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x2170
testl %eax, %eax
je 0x3613
movl %eax, %edi
callq 0x21a0
leaq 0xc60(%rip), %rdi       # 0x425f
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3790
leaq 0xc62(%rip), %rdi       # 0x427c
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3790
// File: /workspace/github_c_makefile_star2_O3/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 0x21e0
movq %rax, %r15
movl $0x0, (%rax)
movq %rbx, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x21b0
movq %rax, %r14
testq %rax, %rax
jne 0x365e
cmpl $0x0, (%r15)
jne 0x3667
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0xc28(%rip), %rdi       # 0x4296
callq 0x2260
leaq 0xc23(%rip), %rdi       # 0x429d
leaq 0xcc0(%rip), %rsi       # 0x4341
movl $0x371, %edx            # imm = 0x371
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3790
jmp 0x365e
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movb (%rdi), %bpl
testb %bpl, %bpl
je 0x370e
callq 0x2180
movq (%rax), %r15
xorl %r14d, %r14d
cmpq $0x2, %r14
ja 0x36e8
movsbq %bpl, %r12
movzwl (%r15,%r12,2), %eax
andl $0x2000, %eax           # imm = 0x2000
jne 0x36e8
callq 0x2140
movq (%rax), %rax
movb (%rax,%r12,4), %al
movb %al, 0x4(%rsp,%r14)
movb 0x1(%rbx,%r14), %bpl
incq %r14
testb %bpl, %bpl
jne 0x36b4
movb $0x0, 0x4(%rsp,%r14)
cmpl $0x3, %r14d
jne 0x3713
movzwl 0x4(%rsp), %ecx
xorl $0x414e, %ecx           # imm = 0x414E
movzbl 0x6(%rsp), %edx
xorl $0x4e, %edx
xorl %eax, %eax
orw %cx, %dx
jmp 0x371c
movb $0x0, 0x4(%rsp)
xorl %eax, %eax
cmpw $0x414e, 0x4(%rsp)      # imm = 0x414E
setne %al
testl %eax, %eax
je 0x3778
callq 0x21e0
movq %rax, %r14
movl $0x0, (%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x22a0
cmpl $0x0, (%r14)
je 0x3780
leaq 0xb7d(%rip), %rdi       # 0x42c5
movsd %xmm0, 0x8(%rsp)
callq 0x2260
leaq 0xb72(%rip), %rdi       # 0x42cc
leaq 0xbe0(%rip), %rsi       # 0x4341
movl $0x39f, %edx            # imm = 0x39F
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3790
movsd 0x8(%rsp), %xmm0
jmp 0x3780
movsd 0x8d0(%rip), %xmm0      # 0x4050
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0x37f3
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 0x27c6(%rip), %r15      # 0x5fe0
movq (%r15), %rcx
leaq 0xad9(%rip), %rdi       # 0x42fd
movl $0x7, %esi
movl $0x1, %edx
callq 0x2250
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2130
movq %rbx, %rdi
callq 0x2160
testl %eax, %eax
jle 0x3855
decl %eax
cmpb $0xa, (%rbx,%rax)
je 0x3862
movq (%r15), %rsi
movl $0xa, %edi
callq 0x2150
callq 0x2070
// File: /workspace/github_c_makefile_star2_O3/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 0x3899
leaq 0xa8c(%rip), %rdi       # 0x430f
leaq 0xab4(%rip), %rsi       # 0x433e
movl $0x13, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x3790
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x38e4
movl %edx, %r8d
movq %rsi, %rcx
leaq 0xa77(%rip), %rdi       # 0x4348
leaq 0xa66(%rip), %rsi       # 0x433e
movl $0x2e, %edx
xorl %eax, %eax
callq 0x3790
movq %rbx, %rdi
popq %rbx
jmp 0x22b0
// File: /workspace/github_c_makefile_star2_O3/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
movq $0x0, (%rbx)
leaq 0x570a4(%rip), %rax     # 0x65a6c
movl $0x1, (%rax)
movq %rbx, %rdx
callq 0xf072
movq (%rbx), %rbx
testq %rbx, %rbx
je 0xea22
movq %rbx, %r14
movzwl (%r14), %eax
testb %al, %al
jle 0xea19
xorl %r15d, %r15d
movq 0x18(%r14,%r15,8), %rdi
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0xea01
testq %rdi, %rdi
je 0xea0a
callq 0xf3aa
movzwl (%r14), %eax
incq %r15
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r15
jl 0xe9ec
movq 0x10(%r14), %r14
cmpq %rbx, %r14
jne 0xe9e1
callq 0xe6d3
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x5b3c(%rip), %rsi      # 0x7602
movq %rsp, %rdi
xorl %eax, %eax
callq 0x1180
testq %rbx, %rbx
jle 0x1af4
addq $0x1f20c0, %r14         # imm = 0x1F20C0
leaq (,%rbx,4), %rdx
leaq 0xd0(%rsp), %rdi
movq %r14, %rsi
callq 0x1120
leaq 0x5a9d(%rip), %rsi      # 0x7598
movq %rsp, %r14
movq %r14, %rdi
callq 0x1160
movq %rax, %r15
leaq 0xd0(%rsp), %rdi
pushq $0x4
popq %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x11a0
movq %r15, %rdi
callq 0x1080
movq 0x84ca(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x5ada(%rip), %rsi      # 0x7612
movq %r14, %rdx
xorl %eax, %eax
callq 0x1100
addq $0xa6110, %rsp          # imm = 0xA6110
popq %rbx
popq %r14
popq %r15
retq