LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/openshmem-org[P]openshmem-examples/c/fcollect.c
// Function: main
int
main(void)
{
    int npes;
    int me;
    int *dst;
    int i;

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

    dst = (int *) shmem_malloc(64);

    for (i = 0; i < 4; i++) {
        dst[i] = 10101;
    }
    src = me + 100;

    printf("%8s: dst[%d/%d] = %d, %d, %d, %d\n",
           "BEFORE", me, npes, dst[0], dst[1], dst[2], dst[3]);

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

    shmem_fcollect32(dst, &src, 1, 0, 0, npes, pSync);

    shmem_barrier_all();

    /*
     * end state of "dst" = 100, 101, 102, ...
     */

    printf("%8s: dst[%d/%d] = %d, %d, %d, %d\n",
           "AFTER", me, npes, dst[0], dst[1], dst[2], dst[3]);

    shmem_free(dst);

    shmem_finalize();

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x10a0
callq 0x1040
movl %eax, %ebp
callq 0x1070
movl %eax, %r14d
movl $0x40, %edi
callq 0x1080
movq %rax, %rbx
movdqa 0xe20(%rip), %xmm0      # 0x2010
movdqu %xmm0, (%rax)
leal 0x64(%r14), %eax
movl %eax, 0x2e82(%rip)      # 0x4080
leaq 0x2e7b(%rip), %r12      # 0x4080
movl (%rbx), %r8d
movl 0x4(%rbx), %r9d
movl 0x8(%rbx), %r10d
movl 0xc(%rbx), %r11d
leaq 0xe05(%rip), %r15       # 0x2020
leaq 0xe20(%rip), %rsi       # 0x2042
movq %r15, %rdi
movl %r14d, %edx
movl %ebp, %ecx
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x1030
addq $0x10, %rsp
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0x2e4b(%rip)     # 0x4090
leaq 0x2e44(%rip), %r13      # 0x4090
callq 0x1090
subq $0x8, %rsp
movl $0x1, %edx
movq %rbx, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
movl %ebp, %r9d
pushq %r13
callq 0x1050
addq $0x10, %rsp
callq 0x1090
movl (%rbx), %r8d
movl 0x4(%rbx), %r9d
movl 0x8(%rbx), %r10d
movl 0xc(%rbx), %r11d
leaq 0xdbb(%rip), %rsi       # 0x2049
movq %r15, %rdi
movl %r14d, %edx
movl %ebp, %ecx
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x1030
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x10b0
callq 0x1060
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/USArmyResearchLab[P]ARL_OpenSHMEM/src/autogen/shmem_int_atomic_compare_swap.c
// Function: shmem_int_atomic_compare_swap
int shmem_int_atomic_compare_swap( int* ptr, int cond, int val, int pe)
{
	int* remote_ptr = (int*)shmem_ptr((void*)ptr, pe ); 
	long* x = (long*)shmem_ptr((void*)&__shmem.lock_atomic_int, pe);
	__set_spin_lock(x);
	int r = *remote_ptr;
	if (r == cond) *remote_ptr = val;
	__clear_spin_lock(x);
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %ebx
movl %esi, %r12d
movl %ecx, %esi
callq 0x1bfc
movq %rax, %r14
leaq 0x3298(%rip), %rdi      # 0x61f0
addq $0x10, %rdi
movl %ebp, %esi
callq 0x1bfc
movq %rax, %r15
movq %rax, %rdi
callq 0x3207
movl (%r14), %ebp
cmpl %r12d, %ebp
jne 0x2f79
movl %ebx, (%r14)
movq %r15, %rdi
callq 0x31f8
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mohamedamjad[P]UBLOXlib/src/main.c
// Function: getCompleteChecksum
short int getCompleteChecksum(ubx_message ptr_ubx){
  // Algorithme de Fletcher: voir page 86 de u-blox6 receiver description protocol

  unsigned char a, b;
  unsigned short int length = (ptr_ubx.message_length[1]<<8)|ptr_ubx.message_length[0];
  a = 0x00;
  b = 0x00;
  a = b + ptr_ubx.message_class;
  b = b + a;
  a = a + ptr_ubx.message_id;
  b = b + a;
  a = a + ptr_ubx.message_length[0];
  b = b + a;
  a = a + ptr_ubx.message_length[1];
  b = b + a;
  for(int i=0; i<length; i++){
    a = a + ptr_ubx.payload[i];
    b = b + a;
  }
  if(a == ptr_ubx.checksum_A && b == ptr_ubx.checksum_B){
    return 0;

  }else{
    return 1;
  }
  //checksum(ptr_ubx.id[0], ptr_ubx->checksum_A, ptr_ubx->checksum_B);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x10(%rbp), %rax
movzbl 0x5(%rax), %esi
movzbl 0x4(%rax), %edi
movb 0x2(%rax), %cl
movb 0x3(%rax), %dl
addb %cl, %dl
addb %dl, %cl
addb %dil, %dl
addb %dl, %cl
addb %sil, %dl
shll $0x8, %esi
addb %dl, %cl
orl %edi, %esi
je 0x14b9
movl %esi, %esi
xorl %edi, %edi
addb 0x6(%rax,%rdi), %dl
addb %dl, %cl
incq %rdi
cmpq %rdi, %rsi
jne 0x14ab
xorb 0x3ee(%rax), %dl
xorb 0x3ef(%rax), %cl
xorl %eax, %eax
orb %dl, %cl
setne %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mohamedamjad[P]UBLOXlib/src/main.c
// Function: displayHelp
void displayHelp(){
  printf("\nuBlox Lib Version 0.0.1\n\n");
  
  printf("Arguments :\n");
  printf("-h : display this help (optional)\n");
  printf("-i : set input file (mandatory)\n");
  printf("-m : parse a specific message (optional)\n");
  printf("-o : set output file (mandatory)\n");
  printf("-p : plot charts\n");
  printf("-r : generate a report after parsing the ubx file(optional)\n");
  printf("-v : get program version\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1d92(%rip), %rdi      # 0x326b
callq 0x1080
leaq 0x1da0(%rip), %rdi      # 0x3285
callq 0x1080
leaq 0x1da0(%rip), %rdi      # 0x3291
callq 0x1080
leaq 0x1db6(%rip), %rdi      # 0x32b3
callq 0x1080
leaq 0x1dca(%rip), %rdi      # 0x32d3
callq 0x1080
leaq 0x1de7(%rip), %rdi      # 0x32fc
callq 0x1080
leaq 0x1dfc(%rip), %rdi      # 0x331d
callq 0x1080
leaq 0x1e01(%rip), %rdi      # 0x332e
callq 0x1080
leaq 0x1e31(%rip), %rdi      # 0x336a
popq %rbp
jmp 0x1080
// File: /workspace/github_c_makefile_star2_O1/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_init
gnuplot_ctrl * gnuplot_init(void)
{
    gnuplot_ctrl *  handle ;
    int i;

#ifndef WIN32
    if (getenv("DISPLAY") == NULL) {
        fprintf(stderr, "cannot find DISPLAY variable: is it set?\n") ;
    }
#endif // #ifndef WIN32


    /*
     * Structure initialization:
     */
    handle = (gnuplot_ctrl*)malloc(sizeof(gnuplot_ctrl)) ;
    handle->nplots = 0 ;
    gnuplot_setstyle(handle, "points") ;
    handle->ntmp = 0 ;

    handle->gnucmd = popen("gnuplot", "w") ;
    if (handle->gnucmd == NULL) {
        fprintf(stderr, "error starting gnuplot, is gnuplot or gnuplot.exe in your path?\n") ;
        free(handle) ;
        return NULL ;
    }

    for (i=0;i<GP_MAX_TMP_FILES; i++)
    {
        handle->tmp_filename_tbl[i] = NULL;
    }
    return handle;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x158b(%rip), %rdi      # 0x3411
callq 0x1030
testq %rax, %rax
je 0x1ef0
movl $0x238, %edi            # imm = 0x238
callq 0x1160
movq %rax, %rbx
xorl %r14d, %r14d
movl %r14d, 0x8(%rax)
leaq 0x1612(%rip), %rsi      # 0x34bd
movq %rax, %rdi
callq 0x1f03
movl %r14d, 0x230(%rbx)
leaq 0x1582(%rip), %rdi      # 0x3443
leaq 0x1583(%rip), %rsi      # 0x344b
callq 0x11a0
movq %rax, (%rbx)
testq %rax, %rax
je 0x1ef7
movq %rbx, %rdi
addq $0x30, %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x1100
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
callq 0x123f
jmp 0x1e90
movq %rbx, %rdi
callq 0x126e
xorl %ebx, %ebx
jmp 0x1ee8
// File: /workspace/github_c_makefile_star2_O1/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_setstyle
void gnuplot_setstyle(gnuplot_ctrl * h, char * plot_style)
{
    if (strcmp(plot_style, "lines") &&
        strcmp(plot_style, "points") &&
        strcmp(plot_style, "linespoints") &&
        strcmp(plot_style, "impulses") &&
        strcmp(plot_style, "dots") &&
        strcmp(plot_style, "steps") &&
        strcmp(plot_style, "errorbars") &&
        strcmp(plot_style, "boxes") &&
        strcmp(plot_style, "boxerrorbars")) {
        fprintf(stderr, "warning: unknown requested style: using points\n") ;
        strcpy(h->pstyle, "points") ;
    } else {
        strcpy(h->pstyle, plot_style) ;
    }
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x12e5(%rip), %rsi      # 0x31fc
movq %r14, %rdi
callq 0x1120
testl %eax, %eax
je 0x1fc3
leaq 0x158f(%rip), %rsi      # 0x34bd
movq %r14, %rdi
callq 0x1120
testl %eax, %eax
je 0x1fc3
leaq 0x1573(%rip), %rsi      # 0x34b8
movq %r14, %rdi
callq 0x1120
testl %eax, %eax
je 0x1fc3
leaq 0x156c(%rip), %rsi      # 0x34c4
movq %r14, %rdi
callq 0x1120
testl %eax, %eax
je 0x1fc3
leaq 0x1562(%rip), %rsi      # 0x34cd
movq %r14, %rdi
callq 0x1120
testl %eax, %eax
je 0x1fc3
leaq 0x1554(%rip), %rsi      # 0x34d2
movq %r14, %rdi
callq 0x1120
testl %eax, %eax
je 0x1fc3
leaq 0x1550(%rip), %rsi      # 0x34e1
movq %r14, %rdi
callq 0x1120
testl %eax, %eax
je 0x1fc3
leaq 0x1534(%rip), %rsi      # 0x34d8
movq %r14, %rdi
callq 0x1120
testl %eax, %eax
je 0x1fc3
leaq 0x1527(%rip), %rsi      # 0x34de
movq %r14, %rdi
callq 0x1120
testl %eax, %eax
jne 0x1fd6
addq $0xc, %rbx
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1070
movq %rbx, %rdi
callq 0x12a1
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_close
void gnuplot_close(gnuplot_ctrl * handle)
{
    int     i ;

    if (pclose(handle->gnucmd) == -1) {
        fprintf(stderr, "problem closing communication to gnuplot\n") ;
        return ;
    }
    if (handle->ntmp) {
        for (i=0 ; i<handle->ntmp ; i++) {
            remove(handle->tmp_filename_tbl[i]) ;
            free(handle->tmp_filename_tbl[i]);
            handle->tmp_filename_tbl[i] = NULL;

        }
    }
    free(handle) ;
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x10d0
cmpl $-0x1, %eax
je 0x2047
cmpl $0x0, 0x230(%rbx)
je 0x203b
cmpl $0x0, 0x230(%rbx)
jle 0x203b
xorl %r14d, %r14d
movq 0x30(%rbx,%r14,8), %rdi
callq 0x1060
movq 0x30(%rbx,%r14,8), %rdi
callq 0x1040
movq $0x0, 0x30(%rbx,%r14,8)
incq %r14
movslq 0x230(%rbx), %rax
cmpq %rax, %r14
jl 0x200f
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1040
callq 0x12db
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_cmd
void gnuplot_cmd(gnuplot_ctrl *  handle, char const *  cmd, ...)
{
    va_list ap ;

    va_start(ap, cmd);
    vfprintf(handle->gnucmd, cmd, ap);
    va_end(ap);

    fputs("\n", handle->gnucmd) ;
    fflush(handle->gnucmd) ;
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq -0xd0(%rbp), %rdi
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x20a1
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
leaq -0x20(%rbp), %rdx
movq %rdi, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq (%rbx), %rdi
callq 0x11d0
movq (%rbx), %rsi
leaq 0x11b3(%rip), %rdi      # 0x3283
callq 0x10f0
movq (%rbx), %rdi
callq 0x1170
addq $0xc8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_resetplot
void gnuplot_resetplot(gnuplot_ctrl * h)
{
    int     i ;
    if (h->ntmp) {
        for (i=0 ; i<h->ntmp ; i++) {
            remove(h->tmp_filename_tbl[i]) ;
            free(h->tmp_filename_tbl[i]);
            h->tmp_filename_tbl[i] = NULL;

        }
    }
    h->ntmp = 0 ;
    h->nplots = 0 ;
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x230(%rdi)
je 0x215e
cmpl $0x0, 0x230(%rbx)
jle 0x215e
xorl %r14d, %r14d
movq 0x30(%rbx,%r14,8), %rdi
callq 0x1060
movq 0x30(%rbx,%r14,8), %rdi
callq 0x1040
movq $0x0, 0x30(%rbx,%r14,8)
incq %r14
movslq 0x230(%rbx), %rax
cmpq %rax, %r14
jl 0x2132
xorl %eax, %eax
movl %eax, 0x230(%rbx)
movl %eax, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_plot_x
void gnuplot_plot_x(
    gnuplot_ctrl    *   handle,
    double          *   d,
    int                 n,
    char            *   title
)
{
    int     i ;
    FILE*   tmpfd ;
    char const * tmpfname;

    if (handle==NULL || d==NULL || (n<1)) return ;

    /* Open temporary file for output   */
    tmpfname = gnuplot_tmpfile(handle);
    tmpfd = fopen(tmpfname, "w");

    if (tmpfd == NULL) {
        fprintf(stderr,"cannot create temporary file: exiting plot") ;
        return ;
    }

    /* Write data to this file  */
    for (i=0 ; i<n ; i++) {
      fprintf(tmpfd, "%.18e\n", d[i]);
    }
    fclose(tmpfd) ;

    gnuplot_plot_atmpfile(handle,tmpfname,title);
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testl %edx, %edx
setle %al
orb %cl, %al
jne 0x224e
movl %edx, %r13d
movq %rsi, %r12
movq %rdi, %rbx
callq 0x2264
leaq 0x1299(%rip), %rsi      # 0x344b
movq %rax, -0x40(%rbp)
movq %rax, %rdi
callq 0x11b0
testq %rax, %rax
je 0x225d
movq %rax, %r15
movq %r14, -0x30(%rbp)
movq %rbx, -0x38(%rbp)
testl %r13d, %r13d
jle 0x21fe
movl %r13d, %r14d
xorl %ebx, %ebx
leaq 0x13e2(%rip), %r13      # 0x35c5
movsd (%r12,%rbx,8), %xmm0
movq %r15, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x1140
incq %rbx
cmpq %rbx, %r14
jne 0x21e3
movq %r15, %rdi
callq 0x10a0
movq -0x38(%rbp), %rbx
cmpl $0x0, 0x8(%rbx)
leaq 0x1042(%rip), %rax      # 0x3257
leaq 0x1345(%rip), %rdx      # 0x3561
cmovgq %rax, %rdx
movq -0x30(%rbp), %rax
testq %rax, %rax
leaq 0x1345(%rip), %r8       # 0x3573
cmovneq %rax, %r8
leaq 0xc(%rbx), %r9
leaq 0x1469(%rip), %rsi      # 0x36a6
movq %rbx, %rdi
movq -0x40(%rbp), %rcx
xorl %eax, %eax
callq 0x2051
incl 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x130a
jmp 0x224e
// File: /workspace/github_c_makefile_star2_O1/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_plot_atmpfile
void gnuplot_plot_atmpfile(gnuplot_ctrl * handle, char const* tmp_filename, char const* title)
{
    char const *    cmd    = (handle->nplots > 0) ? "replot" : "plot";
    title                  = (title == NULL)      ? "(none)" : title;
    gnuplot_cmd(handle, "%s \"%s\" title \"%s\" with %s", cmd, tmp_filename,
                  title, handle->pstyle) ;
    handle->nplots++ ;
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rcx
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
leaq 0xf45(%rip), %rsi       # 0x3257
leaq 0x1248(%rip), %rax      # 0x3561
cmovgq %rsi, %rax
testq %rdx, %rdx
leaq 0x124c(%rip), %r8       # 0x3573
cmovneq %rdx, %r8
leaq 0xc(%rdi), %r9
leaq 0x1370(%rip), %rsi      # 0x36a6
movq %rax, %rdx
xorl %eax, %eax
callq 0x2051
incl 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_plot_xy
void gnuplot_plot_xy(
    gnuplot_ctrl    *   handle,
    double          *   x,
    double          *   y,
    int                 n,
    char            *   title
)
{
    int     i ;
    FILE*   tmpfd ;
    char const * tmpfname;

    if (handle==NULL || x==NULL || y==NULL || (n<1)) return ;

    /* Open temporary file for output   */
    tmpfname = gnuplot_tmpfile(handle);
    tmpfd = fopen(tmpfname, "w");

    if (tmpfd == NULL) {
        fprintf(stderr,"cannot create temporary file: exiting plot") ;
        return ;
    }

    /* Write data to this file  */
    for (i=0 ; i<n; i++) {
        fprintf(tmpfd, "%.18e %.18e\n", x[i], y[i]) ;
    }
    fclose(tmpfd) ;

    gnuplot_plot_atmpfile(handle,tmpfname,title);
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r13d
movq %rdx, %r15
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testq %rdx, %rdx
sete %al
testl %r13d, %r13d
setle %dl
orb %al, %dl
orb %cl, %dl
jne 0x2437
movq %rsi, %r12
movq %rdi, %rbx
movq %r8, -0x40(%rbp)
callq 0x2264
leaq 0x10b0(%rip), %rsi      # 0x344b
movq %rax, -0x38(%rbp)
movq %rax, %rdi
callq 0x11b0
testq %rax, %rax
je 0x2446
movq %rax, %r14
movq %rbx, -0x30(%rbp)
testl %r13d, %r13d
jle 0x23e7
movl %r13d, %ebx
xorl %r13d, %r13d
movsd (%r12,%r13,8), %xmm0
movsd (%r15,%r13,8), %xmm1
movq %r14, %rdi
leaq 0x118e(%rip), %rsi      # 0x3566
movb $0x2, %al
callq 0x1140
incq %r13
cmpq %r13, %rbx
jne 0x23c2
movq %r14, %rdi
callq 0x10a0
movq -0x30(%rbp), %rbx
cmpl $0x0, 0x8(%rbx)
leaq 0xe59(%rip), %rax       # 0x3257
leaq 0x115c(%rip), %rdx      # 0x3561
cmovgq %rax, %rdx
movq -0x40(%rbp), %rax
testq %rax, %rax
leaq 0x115c(%rip), %r8       # 0x3573
cmovneq %rax, %r8
leaq 0xc(%rbx), %r9
leaq 0x1280(%rip), %rsi      # 0x36a6
movq %rbx, %rdi
movq -0x38(%rbp), %rcx
xorl %eax, %eax
callq 0x2051
incl 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x135b
jmp 0x2437
// File: /workspace/github_c_makefile_star2_O1/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_plot_once
void gnuplot_plot_once(
  char    *   title,
  char    *   style,
  char    *   label_x,
  char    *   label_y,
  double  *   x,
  double  *   y,
  int         n
)
{
  gnuplot_ctrl    *   handle ;

  if (x==NULL || n<1) return ;

  if ((handle = gnuplot_init()) == NULL) return ;
  if (style!=NULL) {
      gnuplot_setstyle(handle, style);
  } else {
      gnuplot_setstyle(handle, "lines");
  }
  if (label_x!=NULL) {
      gnuplot_set_xlabel(handle, label_x);
  } else {
      gnuplot_set_xlabel(handle, "X");
  }
  if (label_y!=NULL) {
      gnuplot_set_ylabel(handle, label_y);
  } else {
      gnuplot_set_ylabel(handle, "Y");
  }
  if (y==NULL) {
      gnuplot_plot_x(handle, x, n, title);
  } else {
      gnuplot_plot_xy(handle, x, y, n, title);
  }
  printf("press ENTER to continue\n");
  while (getchar()!='\n') {}
  gnuplot_close(handle);
  return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, -0x40(%rbp)
movq %rcx, -0x38(%rbp)
movq %rdi, -0x30(%rbp)
movl 0x10(%rbp), %r13d
testq %r8, %r8
sete %al
testl %r13d, %r13d
setle %cl
orb %al, %cl
jne 0x250d
movq %r8, %r15
movq %rdx, %r12
movq %rsi, %r14
callq 0x1e78
testq %rax, %rax
je 0x250d
movq %rax, %rbx
testq %r14, %r14
leaq 0xd5a(%rip), %rsi       # 0x31fc
cmovneq %r14, %rsi
movq %rax, %rdi
callq 0x1f03
testq %r12, %r12
leaq 0x1145(%rip), %rdx      # 0x35fd
cmovneq %r12, %rdx
leaq 0x1058(%rip), %rsi      # 0x351b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2051
movq -0x38(%rbp), %rax
testq %rax, %rax
leaq 0xf3c(%rip), %rdx       # 0x3417
cmovneq %rax, %rdx
leaq 0x1045(%rip), %rsi      # 0x352b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2051
movq -0x40(%rbp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
testq %rdx, %rdx
je 0x251c
movl %r13d, %ecx
movq -0x30(%rbp), %r8
callq 0x234a
jmp 0x2528
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r13d, %edx
movq -0x30(%rbp), %rcx
callq 0x216e
leaq 0x1192(%rip), %rdi      # 0x36c1
callq 0x1080
callq 0x1130
cmpl $0xa, %eax
jne 0x2534
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1fe3
// File: /workspace/github_c_makefile_star2_O1/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_plot_slope
void gnuplot_plot_slope(
    gnuplot_ctrl    *   handle,
    double              a,
    double              b,
    char            *   title
)
{
    char const *    cmd    = (handle->nplots > 0) ? "replot" : "plot";
    title                  = (title == NULL)      ? "(none)" : title;

    gnuplot_cmd(handle, "%s %.18e * x + %.18e title \"%s\" with %s",
                  cmd, a, b, title, handle->pstyle) ;

    handle->nplots++ ;
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
leaq 0xcef(%rip), %rax       # 0x3257
leaq 0xff2(%rip), %rdx       # 0x3561
cmovgq %rax, %rdx
testq %rsi, %rsi
leaq 0xff6(%rip), %rcx       # 0x3573
cmovneq %rsi, %rcx
leaq 0xc(%rdi), %r8
leaq 0xfee(%rip), %rsi       # 0x357a
movb $0x2, %al
callq 0x2051
incl 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_plot_equation
void gnuplot_plot_equation(
    gnuplot_ctrl    *   h,
    char            *   equation,
    char            *   title
)
{
    char const *    cmd    = (h->nplots > 0) ? "replot" : "plot";
    title                  = (title == NULL)      ? "(none)" : title;

    gnuplot_cmd(h, "%s %s title \"%s\" with %s",
                  cmd, equation, title, h->pstyle) ;
    h->nplots++ ;
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rcx
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
leaq 0xca3(%rip), %rsi       # 0x3257
leaq 0xfa6(%rip), %rax       # 0x3561
cmovgq %rsi, %rax
testq %rdx, %rdx
leaq 0xfaa(%rip), %r8        # 0x3573
cmovneq %rdx, %r8
leaq 0xc(%rdi), %r9
leaq 0xfca(%rip), %rsi       # 0x35a2
movq %rax, %rdx
xorl %eax, %eax
callq 0x2051
incl 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_write_x_csv
int gnuplot_write_x_csv(
    char const * fileName,
    double const * d,
    int n,
    char const * title)
{
    int     i;
    FILE*   fileHandle;

    if (fileName==NULL || d==NULL || (n<1))
    {
        return -1;
    }

    fileHandle = fopen(fileName, "w");

    if (fileHandle == NULL)
    {
        return -1;
    }

    // Write Comment.
    if (title != NULL)
    {
        fprintf(fileHandle, "# %s\n", title) ;
    }

    /* Write data to this file  */
    for (i=0 ; i<n; i++)
    {
        fprintf(fileHandle, "%d, %.18e\n", i, d[i]) ;
    }

    fclose(fileHandle) ;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testl %edx, %edx
setle %al
orb %cl, %al
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jne 0x2688
movl %edx, %r15d
movq %rsi, %rbx
leaq 0xe24(%rip), %rsi       # 0x344b
callq 0x11b0
testq %rax, %rax
je 0x2688
movq %rax, %r14
testq %r12, %r12
je 0x264d
leaq 0xf7b(%rip), %rsi       # 0x35bb
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1140
testl %r15d, %r15d
jle 0x267d
movl %r15d, %r13d
xorl %r15d, %r15d
leaq 0xf62(%rip), %r12       # 0x35c1
movsd (%rbx,%r15,8), %xmm0
movq %r14, %rdi
movq %r12, %rsi
movl %r15d, %edx
movb $0x1, %al
callq 0x1140
incq %r15
cmpq %r15, %r13
jne 0x265f
movq %r14, %rdi
callq 0x10a0
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_write_xy_csv
int gnuplot_write_xy_csv(
    char const *        fileName,
    double const    *   x,
    double const    *   y,
    int                 n,
    char const      *   title)
{
    int     i ;
    FILE*   fileHandle;

    if (fileName==NULL || x==NULL || y==NULL || (n<1))
    {
        return -1;
    }

    fileHandle = fopen(fileName, "w");

    if (fileHandle == NULL)
    {
        return -1;
    }

    // Write Comment.
    if (title != NULL)
    {
        fprintf(fileHandle, "# %s\n", title) ;
    }

    /* Write data to this file  */
    for (i=0 ; i<n; i++)
    {
        fprintf(fileHandle, "%.18e, %.18e\n", x[i], y[i]) ;
    }

    fclose(fileHandle) ;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r12d
movq %rdx, %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testq %rdx, %rdx
sete %al
testl %r12d, %r12d
setle %dl
orb %al, %dl
orb %cl, %dl
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jne 0x2744
movq %rsi, %r14
movq %r8, -0x30(%rbp)
leaq 0xd69(%rip), %rsi       # 0x344b
callq 0x11b0
testq %rax, %rax
je 0x2744
movq %rax, %r15
movq -0x30(%rbp), %rdx
testq %rdx, %rdx
je 0x2709
leaq 0xebc(%rip), %rsi       # 0x35bb
movq %r15, %rdi
xorl %eax, %eax
callq 0x1140
testl %r12d, %r12d
jle 0x2739
movl %r12d, %r13d
xorl %r12d, %r12d
movsd (%r14,%r12,8), %xmm0
movsd (%rbx,%r12,8), %xmm1
movq %r15, %rdi
leaq 0xea2(%rip), %rsi       # 0x35cc
movb $0x2, %al
callq 0x1140
incq %r12
cmpq %r12, %r13
jne 0x2714
movq %r15, %rdi
callq 0x10a0
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_write_multi_csv
int gnuplot_write_multi_csv(
    char const *        fileName,
    double const    **  xListPtr,
    int                 n,
    int                 numColumns,
    char const      *   title)
{
    int     i;
    int     j;
    FILE*   fileHandle;

    if (fileName==NULL || xListPtr==NULL || (n<1) || numColumns <1)
    {
        return -1;
    }

    for (j=0;j<numColumns;j++)
    {
        if (xListPtr[j] == NULL)
        {
            return -1;
        }
    }

    fileHandle = fopen(fileName, "w");

    if (fileHandle == NULL)
    {
        return -1;
    }

    // Write Comment.
    if (title != NULL)
    {
        fprintf(fileHandle, "# %s\n", title) ;
    }

    /* Write data to this file  */
    for (i=0 ; i<n; i++)
    {
        fprintf(fileHandle, "%d, %.18e", i, xListPtr[0][i]) ;
        for (j=1;j<numColumns;j++)
        {
            fprintf(fileHandle, ", %.18e", xListPtr[j][i]) ;
        }
        fprintf(fileHandle, "\n");
    }

    fclose(fileHandle) ;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movq %rsi, %r12
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %sil
orb %al, %sil
testl %edx, %edx
setle %al
testl %ecx, %ecx
setle %dl
orb %al, %dl
orb %sil, %dl
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jne 0x2880
movl %ecx, %r14d
xorl %eax, %eax
cmpq $0x0, (%r12,%rax,8)
je 0x2880
incq %rax
cmpq %rax, %r14
jne 0x279c
movq %r8, -0x30(%rbp)
movl %ecx, -0x34(%rbp)
leaq 0xc8e(%rip), %rsi       # 0x344b
callq 0x11b0
testq %rax, %rax
je 0x2880
movq %rax, %r15
movq %r14, -0x48(%rbp)
movq -0x30(%rbp), %rdx
testq %rdx, %rdx
je 0x27ec
leaq 0xdd9(%rip), %rsi       # 0x35bb
movq %r15, %rdi
xorl %eax, %eax
callq 0x1140
testl %ebx, %ebx
jle 0x2875
movl %ebx, %eax
movq %rax, -0x30(%rbp)
xorl %ebx, %ebx
movq %r12, -0x40(%rbp)
movq (%r12), %rax
movsd (%rax,%rbx,8), %xmm0
movq %r15, %rdi
leaq 0xdc7(%rip), %rsi       # 0x35da
movl %ebx, %edx
movb $0x1, %al
callq 0x1140
cmpl $0x2, -0x34(%rbp)
leaq 0xdb5(%rip), %r12       # 0x35dc
movq %r15, %r14
movq -0x48(%rbp), %r15
jl 0x2858
movl $0x1, %r13d
movq -0x40(%rbp), %rax
movq (%rax,%r13,8), %rax
movsd (%rax,%rbx,8), %xmm0
movq %r14, %rdi
movq %r12, %rsi
movb $0x1, %al
callq 0x1140
incq %r13
cmpq %r13, %r15
jne 0x2836
movl $0xa, %edi
movq %r14, %rsi
callq 0x1110
incq %rbx
cmpq -0x30(%rbp), %rbx
movq -0x40(%rbp), %r12
movq %r14, %r15
jne 0x2800
movq %r15, %rdi
callq 0x10a0
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/vcf.c
// Function: bcf_hdr_parse_sample_line
int HTS_RESULT_USED bcf_hdr_parse_sample_line(bcf_hdr_t *hdr, const char *str)
{
    const char *mandatory = "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO";
    if ( strncmp(str,mandatory,strlen(mandatory)) )
    {
        hts_log_error("Could not parse the \"#CHROM..\" line, either the fields are incorrect or spaces are present instead of tabs:\n\t%s",str);
        return -1;
    }

    const char *beg = str + strlen(mandatory), *end;
    if ( !*beg || *beg=='\n' ) return 0;
    if ( strncmp(beg,"\tFORMAT\t",8) )
    {
        hts_log_error("Could not parse the \"#CHROM..\" line, either FORMAT is missing or spaces are present instead of tabs:\n\t%s",str);
        return -1;
    }
    beg += 8;

    int ret = 0;
    while ( *beg )
    {
        end = beg;
        while ( *end && *end!='\t' && *end!='\n' ) end++;
        if ( bcf_hdr_add_sample_len(hdr, beg, end-beg) < 0 ) ret = -1;
        if ( !*end || *end=='\n' || ret<0 ) break;
        beg = end + 1;
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x82933(%rip), %rsi     # 0xae4a0
movl $0x26, %edx
movq %rbx, %rdi
callq 0x4200
testl %eax, %eax
je 0x2bbab
leaq 0x8295c(%rip), %rdx     # 0xae4e1
leaq 0x8293b(%rip), %rsi     # 0xae4c7
movl $0x1, %edi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x9774
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movzbl 0x26(%rbx), %eax
xorl %ebp, %ebp
testl %eax, %eax
je 0x2bba0
cmpl $0xa, %eax
je 0x2bba0
leaq 0x26(%rbx), %rdi
leaq 0x8298c(%rip), %rsi     # 0xae551
movl $0x8, %edx
callq 0x4200
testl %eax, %eax
je 0x2bbdc
leaq 0x82980(%rip), %rdx     # 0xae55a
jmp 0x2bb85
cmpb $0x0, 0x2e(%rbx)
je 0x2bba0
addq $0x2e, %rbx
movl $0x601, %r15d           # imm = 0x601
xorl %ebp, %ebp
leaq 0x1(%rbx), %r12
xorl %edx, %edx
movzbl -0x1(%r12), %eax
cmpl $0xa, %eax
ja 0x2bc05
btl %eax, %r15d
jb 0x2bc0d
incq %r12
incq %rdx
jmp 0x2bbf4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b9b8
testl %eax, %eax
js 0x2bb9b
movzbl -0x1(%r12), %eax
testl %eax, %eax
je 0x2bba0
cmpl $0xa, %eax
je 0x2bba0
cmpb $0x0, (%r12)
movq %r12, %rbx
jne 0x2bbee
jmp 0x2bba0
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/vcf.c
// Function: bcf_hdr_sync
int bcf_hdr_sync(bcf_hdr_t *h)
{
    int i;
    for (i = 0; i < 3; i++)
    {
        vdict_t *d = (vdict_t*)h->dict[i];
        khint_t k;
        if ( h->n[i] < kh_size(d) )
        {
            bcf_idpair_t *new_idpair;
            // this should be true only for i=2, BCF_DT_SAMPLE
            new_idpair = (bcf_idpair_t*) realloc(h->id[i], kh_size(d)*sizeof(bcf_idpair_t));
            if (!new_idpair) return -1;
            h->n[i] = kh_size(d);
            h->id[i] = new_idpair;
        }
        for (k=kh_begin(d); k<kh_end(d); k++)
        {
            if (!kh_exist(d,k)) continue;
            h->id[i][kh_val(d,k).id].key = kh_key(d,k);
            h->id[i][kh_val(d,k).id].val = &kh_val(d,k);
        }
    }

    // Invalidate key length cache
    bcf_hdr_aux_t *aux = get_hdr_aux(h);
    if (aux && aux->key_len) {
        free(aux->key_len);
        aux->key_len = NULL;
    }

    h->dirty = 0;
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x28(%rbx,%r14,8), %r15
movl 0x4(%r15), %esi
cmpl %esi, (%rbx,%r14,4)
jae 0x2bc84
movq 0x10(%rbx,%r14,8), %rdi
shlq $0x4, %rsi
callq 0x4860
testq %rax, %rax
je 0x2bd2e
movl 0x4(%r15), %ecx
movl %ecx, (%rbx,%r14,4)
movq %rax, 0x10(%rbx,%r14,8)
movl (%r15), %eax
testq %rax, %rax
je 0x2bcf7
movq 0x10(%r15), %rdx
movl $0x30, %esi
xorl %edi, %edi
xorl %r8d, %r8d
movl %r8d, %ecx
shrl $0x4, %ecx
movl (%rdx,%rcx,4), %r9d
movl %edi, %ecx
andb $0x1e, %cl
shrl %cl, %r9d
testb $0x3, %r9b
jne 0x2bce8
movq 0x18(%r15), %rcx
movq 0x20(%r15), %r9
movq (%rcx,%r8,8), %rcx
movq 0x10(%rbx,%r14,8), %r10
addq %rsi, %r9
addq $-0x30, %r9
movslq 0x30(%r9), %r11
shlq $0x4, %r11
movq %rcx, (%r10,%r11)
movq 0x10(%rbx,%r14,8), %rcx
movslq 0x30(%r9), %r10
shlq $0x4, %r10
movq %r9, 0x8(%rcx,%r10)
incq %r8
addq $0x38, %rsi
addl $0x2, %edi
cmpq %r8, %rax
jne 0x2bc9a
incq %r14
cmpq $0x3, %r14
jne 0x2bc51
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0x2bd23
movq 0x30(%r14), %rdi
testq %rdi, %rdi
je 0x2bd23
callq 0x45c0
movq $0x0, 0x30(%r14)
movl $0x0, 0x54(%rbx)
xorl %eax, %eax
jmp 0x2bd33
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/vcf.c
// Function: bcf_hrec_destroy
void bcf_hrec_destroy(bcf_hrec_t *hrec)
{
    if (!hrec) return;
    free(hrec->key);
    if ( hrec->value ) free(hrec->value);
    int i;
    for (i=0; i<hrec->nkeys; i++)
    {
        free(hrec->keys[i]);
        free(hrec->vals[i]);
    }
    free(hrec->keys);
    free(hrec->vals);
    free(hrec);
}

// Assembly:
testq %rdi, %rdi
je 0x2bdac
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x45c0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x2bd5c
callq 0x45c0
cmpl $0x0, 0x18(%rbx)
jle 0x2bd8b
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x45c0
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x45c0
incq %r14
movslq 0x18(%rbx), %rax
cmpq %rax, %r14
jl 0x2bd65
movq 0x20(%rbx), %rdi
callq 0x45c0
movq 0x28(%rbx), %rdi
callq 0x45c0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x45c0
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/vcf.c
// Function: bcf_hrec_dup
bcf_hrec_t *bcf_hrec_dup(bcf_hrec_t *hrec)
{
    int save_errno;
    bcf_hrec_t *out = (bcf_hrec_t*) calloc(1,sizeof(bcf_hrec_t));
    if (!out) return NULL;

    out->type = hrec->type;
    if ( hrec->key ) {
        out->key = strdup(hrec->key);
        if (!out->key) goto fail;
    }
    if ( hrec->value ) {
        out->value = strdup(hrec->value);
        if (!out->value) goto fail;
    }
    out->nkeys = hrec->nkeys;
    out->keys = (char**) malloc(sizeof(char*)*hrec->nkeys);
    if (!out->keys) goto fail;
    out->vals = (char**) malloc(sizeof(char*)*hrec->nkeys);
    if (!out->vals) goto fail;
    int i, j = 0;
    for (i=0; i<hrec->nkeys; i++)
    {
        if ( hrec->keys[i] && !strcmp("IDX",hrec->keys[i]) ) continue;
        if ( hrec->keys[i] ) {
            out->keys[j] = strdup(hrec->keys[i]);
            if (!out->keys[j]) goto fail;
        }
        if ( hrec->vals[i] ) {
            out->vals[j] = strdup(hrec->vals[i]);
            if (!out->vals[j]) goto fail;
        }
        j++;
    }
    if ( i!=j ) out->nkeys -= i-j;   // IDX was omitted
    return out;

 fail:
    save_errno = errno;
    hts_log_error("%s", strerror(errno));
    bcf_hrec_destroy(out);
    errno = save_errno;
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %edi
movl $0x30, %esi
callq 0x42f0
testq %rax, %rax
je 0x2bf15
movq %rax, %rbx
movl (%r14), %eax
movl %eax, (%rbx)
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x2bdf6
callq 0x4930
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x2bedc
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x2be11
callq 0x4930
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x2bedc
movslq 0x18(%r14), %r13
movl %r13d, 0x18(%rbx)
leaq (,%r13,8), %r15
movq %r15, %rdi
callq 0x46a0
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x2bedc
movq %r15, %rdi
callq 0x46a0
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x2bedc
xorl %ebp, %ebp
xorl %r15d, %r15d
testl %r13d, %r13d
jle 0x2becb
movq 0x20(%r14), %rax
movq (%rax,%rbp,8), %r12
testq %r12, %r12
je 0x2be98
leaq 0x7ebba(%rip), %rdi     # 0xaaa23
movq %r12, %rsi
callq 0x46e0
testl %eax, %eax
je 0x2bec3
testq %r12, %r12
je 0x2be98
movq %r12, %rdi
callq 0x4930
movq 0x20(%rbx), %rcx
movslq %r15d, %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x20(%rbx), %rax
cmpq $0x0, (%rax,%rdx,8)
je 0x2bedc
movq 0x28(%r14), %rax
movq (%rax,%rbp,8), %rdi
testq %rdi, %rdi
je 0x2bec0
callq 0x4930
movq 0x28(%rbx), %rcx
movslq %r15d, %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x28(%rbx), %rax
cmpq $0x0, (%rax,%rdx,8)
je 0x2bedc
incl %r15d
incq %rbp
cmpq %rbp, %r13
jne 0x2be55
cmpl %r15d, %ebp
je 0x2bf17
subl %ebp, %r13d
addl %r15d, %r13d
movl %r13d, 0x18(%rbx)
jmp 0x2bf17
callq 0x4050
movq %rax, %r14
movl (%rax), %ebp
movl %ebp, %edi
callq 0x4140
leaq 0x826cf(%rip), %rsi     # 0xae5c3
leaq 0x826c5(%rip), %rdx     # 0xae5c0
movl $0x1, %edi
movq %rax, %rcx
xorl %eax, %eax
callq 0x9774
movq %rbx, %rdi
callq 0x2bd39
movl %ebp, (%r14)
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/vcf.c
// Function: bcf_hrec_debug
void bcf_hrec_debug(FILE *fp, bcf_hrec_t *hrec)
{
    fprintf(fp, "key=[%s] value=[%s]", hrec->key, hrec->value?hrec->value:"");
    int i;
    for (i=0; i<hrec->nkeys; i++)
        fprintf(fp, "\t[%s]=[%s]", hrec->keys[i],hrec->vals[i]);
    fprintf(fp, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rdx
movq 0x10(%rsi), %rax
testq %rax, %rax
leaq 0x7ea44(%rip), %rcx     # 0xaa98d
cmovneq %rax, %rcx
leaq 0x8267c(%rip), %rsi     # 0xae5d0
xorl %eax, %eax
callq 0x4720
cmpl $0x0, 0x18(%r14)
jle 0x2bf95
leaq 0x8267b(%rip), %r15     # 0xae5e4
xorl %r12d, %r12d
movq 0x20(%r14), %rax
movq 0x28(%r14), %rcx
movq (%rax,%r12,8), %rdx
movq (%rcx,%r12,8), %rcx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x4720
incq %r12
movslq 0x18(%r14), %rax
cmpq %rax, %r12
jl 0x2bf6c
movl $0xa, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4650
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/vcf.c
// Function: bcf_header_debug
void bcf_header_debug(bcf_hdr_t *hdr)
{
    int i, j;
    for (i=0; i<hdr->nhrec; i++)
    {
        if ( !hdr->hrec[i]->value )
        {
            fprintf(stderr, "##%s=<", hdr->hrec[i]->key);
            fprintf(stderr,"%s=%s", hdr->hrec[i]->keys[0], hdr->hrec[i]->vals[0]);
            for (j=1; j<hdr->hrec[i]->nkeys; j++)
                fprintf(stderr,",%s=%s", hdr->hrec[i]->keys[j], hdr->hrec[i]->vals[j]);
            fprintf(stderr,">\n");
        }
        else
            fprintf(stderr,"##%s=%s\n", hdr->hrec[i]->key,hdr->hrec[i]->value);
    }
}

// Assembly:
cmpl $0x0, 0x50(%rdi)
jle 0x2c01b
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x48(%rdi), %r14
movq 0xa3016(%rip), %r13     # 0xcefe0
leaq 0x8262f(%rip), %r15     # 0xae600
xorl %r12d, %r12d
movq (%r14), %rax
movq (%rax,%r12,8), %rax
movq 0x8(%rax), %rdx
movq 0x10(%rax), %rcx
movq (%r13), %rdi
testq %rcx, %rcx
jne 0x2bffc
movq %rdx, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x4a69
jmp 0x2c006
movq %r15, %rsi
xorl %eax, %eax
callq 0x4720
incq %r12
movslq 0x50(%rbx), %rax
cmpq %rax, %r12
jl 0x2bfd4
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/vcf.c
// Function: bcf_hrec_add_key
int bcf_hrec_add_key(bcf_hrec_t *hrec, const char *str, size_t len)
{
    char **tmp;
    size_t n = hrec->nkeys + 1;
    assert(len > 0 && len < SIZE_MAX);
    tmp = realloc(hrec->keys, sizeof(char*)*n);
    if (!tmp) return -1;
    hrec->keys = tmp;
    tmp = realloc(hrec->vals, sizeof(char*)*n);
    if (!tmp) return -1;
    hrec->vals = tmp;

    hrec->keys[hrec->nkeys] = (char*) malloc((len+1)*sizeof(char));
    if (!hrec->keys[hrec->nkeys]) return -1;
    memcpy(hrec->keys[hrec->nkeys],str,len);
    hrec->keys[hrec->nkeys][len] = 0;
    hrec->vals[hrec->nkeys] = NULL;
    hrec->nkeys = n;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq -0x1(%rdx), %rax
cmpq $-0x2, %rax
jae 0x2c0e1
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movslq 0x18(%rdi), %r13
incq %r13
movq 0x20(%rdi), %rdi
leaq (,%r13,8), %r12
movq %r12, %rsi
callq 0x4860
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x2c0d0
movq %rax, 0x20(%rbx)
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x4860
testq %rax, %rax
je 0x2c0d0
movq %rax, 0x28(%rbx)
leaq 0x1(%r14), %rdi
callq 0x46a0
movq 0x20(%rbx), %rcx
movslq 0x18(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x20(%rbx), %rax
movq (%rax,%rdx,8), %rdi
testq %rdi, %rdi
je 0x2c0d0
movq %r15, %rsi
movq %r14, %rdx
callq 0x43c0
movq 0x20(%rbx), %rax
movslq 0x18(%rbx), %rcx
movq (%rax,%rcx,8), %rax
movb $0x0, (%rax,%r14)
movq 0x28(%rbx), %rax
movslq 0x18(%rbx), %rcx
movq $0x0, (%rax,%rcx,8)
movl %r13d, 0x18(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x82521(%rip), %rdi     # 0xae609
leaq 0x82534(%rip), %rsi     # 0xae623
leaq 0x82533(%rip), %rcx     # 0xae629
movl $0x1a2, %edx            # imm = 0x1A2
callq 0x42e0
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/vcf.c
// Function: bcf_hrec_set_val
int bcf_hrec_set_val(bcf_hrec_t *hrec, int i, const char *str, size_t len, int is_quoted)
{
    if ( hrec->vals[i] ) {
        free(hrec->vals[i]);
        hrec->vals[i] = NULL;
    }
    if ( !str ) return 0;
    if ( is_quoted )
    {
        if (len >= SIZE_MAX - 3) {
            errno = ENOMEM;
            return -1;
        }
        hrec->vals[i] = (char*) malloc((len+3)*sizeof(char));
        if (!hrec->vals[i]) return -1;
        hrec->vals[i][0] = '"';
        memcpy(&hrec->vals[i][1],str,len);
        hrec->vals[i][len+1] = '"';
        hrec->vals[i][len+2] = 0;
    }
    else
    {
        if (len == SIZE_MAX) {
            errno = ENOMEM;
            return -1;
        }
        hrec->vals[i] = (char*) malloc((len+1)*sizeof(char));
        if (!hrec->vals[i]) return -1;
        memcpy(hrec->vals[i],str,len);
        hrec->vals[i][len] = 0;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r12
movq %rdi, %r15
movq 0x28(%rdi), %rax
movslq %esi, %r13
movq (%rax,%r13,8), %rdi
testq %rdi, %rdi
je 0x2c138
callq 0x45c0
movq 0x28(%r15), %rax
movq $0x0, (%rax,%r13,8)
xorl %ebx, %ebx
testq %r12, %r12
je 0x2c1fa
testl %ebp, %ebp
je 0x2c1ac
cmpq $-0x4, %r14
jae 0x2c1ea
leaq 0x3(%r14), %rdi
callq 0x46a0
movq 0x28(%r15), %rcx
movq %rax, (%rcx,%r13,8)
movq 0x28(%r15), %rax
movq (%rax,%r13,8), %rax
testq %rax, %rax
je 0x2c1f5
movb $0x22, %bpl
movb %bpl, (%rax)
movq 0x28(%r15), %rax
movq (%rax,%r13,8), %rdi
incq %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x43c0
movq 0x28(%r15), %rax
movq (%rax,%r13,8), %rax
movb %bpl, 0x1(%rax,%r14)
movq 0x28(%r15), %rax
movq (%rax,%r13,8), %rax
movb $0x0, 0x2(%rax,%r14)
jmp 0x2c1fa
cmpq $-0x1, %r14
je 0x2c1ea
leaq 0x1(%r14), %rdi
callq 0x46a0
movq 0x28(%r15), %rcx
movq %rax, (%rcx,%r13,8)
movq 0x28(%r15), %rax
movq (%rax,%r13,8), %rdi
testq %rdi, %rdi
je 0x2c1f5
movq %r12, %rsi
movq %r14, %rdx
callq 0x43c0
movq 0x28(%r15), %rax
movq (%rax,%r13,8), %rax
movb $0x0, (%rax,%r14)
jmp 0x2c1fa
callq 0x4050
movl $0xc, (%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/vcf.c
// Function: bcf_get_version
static int bcf_get_version(const bcf_hdr_t *hdr, const char *verstr)
{
    const char *version = NULL, vcf[] = "VCFv";
    char *major = NULL, *minor = NULL;
    int ver = -1;
    long tmp = 0;
    bcf_hdr_aux_t *aux = NULL;

    if (!hdr && !verstr) {  //invalid input
        goto fail;
    }

    if (hdr) {
        if ((aux = get_hdr_aux(hdr)) && aux->version != 0) {    //use cached version
            return aux->version;
        }
        //get from header
        version = bcf_hdr_get_version(hdr);
    } else {
        //get from version string
        version = verstr;
    }
    if (!(major = strstr(version, vcf))) {  //bad format
        goto fail;
    }
    major += sizeof(vcf) - 1;
    if (!(minor = strchr(major, '.'))) {    //bad format
        goto fail;
    }
    tmp = strtol(major, NULL, 10);
    if ((!tmp && errno == EINVAL) ||
        ((tmp == LONG_MIN || tmp == LONG_MAX) && errno == ERANGE)) {    //failed
        goto fail;
    }
    ver = tmp * 100 * 10000;
    tmp = strtol(++minor, NULL, 10);
    if ((!tmp && errno == EINVAL) ||
        ((tmp == LONG_MIN || tmp == LONG_MAX) && errno == ERANGE)) {    //failed
        goto fail;
    }
    ver += tmp * 1000;
    return ver;

fail:
    hts_log_warning("Couldn't get VCF version, considering as %d.%d",
        VCF_MAJOR_VER(VCF_DEF), VCF_MINOR_VER(VCF_DEF));
    return VCF_DEF;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rax
orq %rsi, %rax
je 0x2cdf2
testq %rdi, %rdi
je 0x2cd45
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x2cd3d
movl 0x38(%rax), %ebx
testl %ebx, %ebx
jne 0x2ce1c
callq 0x2f013
movq %rax, %rsi
leaq 0x827b0(%rip), %rax     # 0xaf4fc
movq %rsi, %rdi
movq %rax, %rsi
callq 0x40d0
testq %rax, %rax
je 0x2cdf2
movq %rax, %rbx
addq $0x4, %rbx
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x4180
testq %rax, %rax
je 0x2cdf2
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x46f0
movq %rax, %rbx
testq %rax, %rax
jne 0x2cd9d
callq 0x4050
cmpl $0x16, (%rax)
je 0x2cdf2
movabsq $-0x7fffffffffffffff, %r15 # imm = 0x8000000000000001
leaq (%rbx,%r15), %rax
cmpq $0x1, %rax
ja 0x2cdbb
callq 0x4050
cmpl $0x22, (%rax)
je 0x2cdf2
incq %r14
movq %r14, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x46f0
movq %rax, %r14
testq %rax, %rax
jne 0x2cddf
callq 0x4050
cmpl $0x16, (%rax)
je 0x2cdf2
addq %r14, %r15
cmpq $0x1, %r15
ja 0x2ce24
callq 0x4050
cmpl $0x22, (%rax)
jne 0x2ce24
leaq 0x82708(%rip), %rsi     # 0xaf501
leaq 0x82711(%rip), %rdx     # 0xaf511
movl $0x3, %edi
movl $0x4, %ecx
movl $0x2, %r8d
xorl %eax, %eax
callq 0x9774
movl $0x3d10d0, %ebx         # imm = 0x3D10D0
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
imull $0x3e8, %r14d, %eax     # imm = 0x3E8
movabsq $0xf424000000000, %rcx  # imm = 0xF424000000000
imulq %rcx, %rbx
shrq $0x20, %rbx
addl %eax, %ebx
jmp 0x2ce1c
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/vcf.c
// Function: bcf_hdr_unregister_hrec
static void bcf_hdr_unregister_hrec(bcf_hdr_t *hdr, bcf_hrec_t *hrec)
{
    if (hrec->type == BCF_HL_FLT ||
        hrec->type == BCF_HL_INFO ||
        hrec->type == BCF_HL_FMT ||
        hrec->type == BCF_HL_CTG) {
        int id = bcf_hrec_find_key(hrec, "ID");
        if (id < 0 || !hrec->vals[id])
            return;
        vdict_t *dict = (hrec->type == BCF_HL_CTG
                         ? (vdict_t*)hdr->dict[BCF_DT_CTG]
                         : (vdict_t*)hdr->dict[BCF_DT_ID]);
        khint_t k = kh_get(vdict, dict, hrec->vals[id]);
        if (k != kh_end(dict))
            kh_val(dict, k).hrec[hrec->type==BCF_HL_CTG ? 0 : hrec->type] = NULL;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl (%rsi), %ebp
cmpl $0x3, %ebp
ja 0x2dfe1
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x7eeaa(%rip), %rsi     # 0xacd57
movq %rbx, %rdi
callq 0x2c40b
testl %eax, %eax
js 0x2dfe1
movq 0x28(%rbx), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rbx
testq %rbx, %rbx
je 0x2dfe1
xorl %eax, %eax
cmpl $0x3, %ebp
sete %al
movq 0x28(%r14,%rax,8), %rax
movq %rax, 0x8(%rsp)
movl (%rax), %eax
testl %eax, %eax
je 0x2df1c
movq %rax, 0x18(%rsp)
leal -0x1(%rax), %edx
movb (%rbx), %cl
testb %cl, %cl
movl %ebp, 0x4(%rsp)
je 0x2df24
leaq 0x1(%rbx), %rax
movl $0x811c9dc5, %r12d      # imm = 0x811C9DC5
movzbl %cl, %ecx
xorl %r12d, %ecx
imull $0x1000193, %ecx, %r12d # imm = 0x1000193
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x2df04
jmp 0x2df2a
xorl %r14d, %r14d
jmp 0x2dfbb
movl $0x811c9dc5, %r12d      # imm = 0x811C9DC5
andl %edx, %r12d
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rsi
movl $0x1, %r15d
movl %r12d, %r14d
movl %edx, 0x14(%rsp)
movq %rsi, 0x20(%rsp)
movl %r14d, %eax
shrl $0x4, %eax
movl (%rsi,%rax,4), %r13d
leal (%r14,%r14), %ebp
andl $0x1e, %ebp
movl %r13d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x2dfa5
testb $0x1, %al
jne 0x2df8d
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl %r14d, %ecx
movq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x46e0
movq 0x20(%rsp), %rsi
movl 0x14(%rsp), %edx
testl %eax, %eax
je 0x2dfa5
addl %r15d, %r14d
andl %edx, %r14d
incl %r15d
cmpl %r12d, %r14d
jne 0x2df48
movq 0x18(%rsp), %rax
movl %eax, %r14d
jmp 0x2dfb7
movl %ebp, %ecx
shrl %cl, %r13d
testb $0x3, %r13b
movq 0x18(%rsp), %rax
cmovnel %eax, %r14d
movl 0x4(%rsp), %ebp
cmpl %eax, %r14d
je 0x2dfe1
xorl %eax, %eax
cmpl $0x3, %ebp
movl %r14d, %ecx
cmovnel %ebp, %eax
imulq $0x38, %rcx, %rcx
movq 0x8(%rsp), %rdx
addq 0x20(%rdx), %rcx
movq $0x0, 0x18(%rcx,%rax,8)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq