LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/command_bonus/where.c
// Function: where
int		where(t_info_shell *shell)
{
  int		i;
  char		*path;

  if ((where_verif(shell)) != 0)
    return (84);
  while (1)
    {
      i = 0;
      if ((shell->tab = cut_my_tab(shell)) == NULL)
	break ;
      while (i < 10)
	{
	  if (my_strcmp(shell->tab[0], g_key[i].code) == 0)
	    my_printf("%s: shell built-in comand.\n", g_key[i].code);
	  i += 1;
	}
      if (my_strcmp(shell->tab[0], "echo") == 0)
	my_printf("echo is a shell built-in\n");
      if ((path = is_valid_command(shell)) != NULL)
	my_printf("%s\n%s\n", path, cut_string(path));
      else
	shell->exit_value = 1;
    }
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5650
movl %eax, %ecx
movl $0x54, %eax
testl %ecx, %ecx
jne 0x57fe
leaq 0x56a5(%rip), %r12      # 0xad50
leaq 0x1ca9(%rip), %r14      # 0x735b
leaq 0x1c7e(%rip), %r15      # 0x7337
movq 0x18(%rbx), %rdi
callq 0x47c2
cltq
leaq 0x1(,%rax,8), %rdi
callq 0x2140
testq %rax, %rax
je 0x5712
movq %rax, %rbp
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x5712
xorl %r13d, %r13d
callq 0x4dec
movq %rax, (%rbp,%r13,8)
movq 0x18(%rbx), %rax
movq 0x10(%rax,%r13,8), %rdi
incq %r13
testq %rdi, %rdi
jne 0x56e9
movl %r13d, %eax
movq $0x0, (%rbp,%rax,8)
jmp 0x5714
xorl %ebp, %ebp
movq %rbp, 0x18(%rbx)
testq %rbp, %rbp
je 0x57fc
xorl %r13d, %r13d
movq 0x18(%rbx), %rax
movq (%rax), %rdi
movq (%r13,%r12), %rbp
movq %rbp, %rsi
callq 0x478e
testl %eax, %eax
jne 0x5749
movq %r14, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x5bde
addq $0x10, %r13
cmpq $0xa0, %r13
jne 0x5724
movq 0x18(%rbx), %rax
movq (%rax), %rdi
movq %r15, %rsi
callq 0x478e
testl %eax, %eax
jne 0x5777
leaq 0x1c22(%rip), %rdi      # 0x7392
xorl %eax, %eax
callq 0x5bde
movq %rbx, %rdi
callq 0x3040
testq %rax, %rax
je 0x57cd
movq %rax, %rbp
movq %rax, %rdi
callq 0x4740
movslq %eax, %rdi
callq 0x2140
testq %rax, %rax
je 0x57d9
xorl %edx, %edx
cmpb $0x2f, 0x1(%rbp,%rdx)
leaq 0x1(%rdx), %rdx
jne 0x579e
movl %edx, %ecx
movb (%rbp,%rcx), %cl
testb %cl, %cl
je 0x57dd
leaq (%rdx,%rbp), %rsi
incq %rsi
xorl %edx, %edx
movb %cl, (%rax,%rdx)
movb (%rsi,%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x57bc
movl %edx, %ecx
jmp 0x57df
movl $0x1, 0x3c(%rbx)
jmp 0x56b9
xorl %eax, %eax
jmp 0x57e3
xorl %ecx, %ecx
movb $0x0, (%rax,%rcx)
leaq 0x1bc2(%rip), %rdi      # 0x73ac
movq %rbp, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5bde
jmp 0x56b9
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/src/my_clean_pipes.c
// Function: add_a_space
char	*add_a_space(char *str, int pos)
{
  char	*new_str;
  int	i;

  i = 0;
  if ((new_str = malloc(sizeof(char)
			* (my_strlen(str) + 2))) == NULL)
    return (NULL);
  while (i != pos)
    {
      new_str[i] = str[i];
      i++;
    }
  new_str[i] = ' ';
  while (str[i] != 0)
    {
      new_str[i + 1] = str[i];
      i++;
    }
  new_str[i + 1] = 0;
  free(str);
  return (new_str);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x4740
addl $0x2, %eax
movslq %eax, %rdi
callq 0x2140
movq %rax, %r14
xorl %eax, %eax
testq %r14, %r14
je 0x587b
testl %ebp, %ebp
je 0x5846
movl %ebp, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2120
movl %ebp, %eax
movl %eax, %eax
movb $0x20, (%r14,%rax)
movb (%rbx,%rax), %cl
testb %cl, %cl
je 0x586b
movq %rax, %rdx
leaq 0x1(%rdx), %rax
movb %cl, 0x1(%r14,%rdx)
movb 0x1(%rbx,%rdx), %cl
movq %rax, %rdx
testb %cl, %cl
jne 0x5857
movb $0x0, 0x1(%r14,%rax)
movq %rbx, %rdi
callq 0x2030
jmp 0x587e
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/src/my_clean_pipes.c
// Function: clean_pipes
char	*clean_pipes(char *str, char c)
{
  int	i;

  i = 0;
  while (str[i + 1] != 0)
    {
      if ((str[i] == c && str[i + 1] != c && str[i + 1] != ' '))
	if ((str = add_a_space(str, i + 1)) == NULL)
	  return (NULL);
      if ((i > 0 && str[i] == c && str[i - 1] != c && str[i - 1] != ' '))
	if ((str = add_a_space(str, i)) == NULL)
	  return (NULL);
      i++;
    }
  if ((str[i] == '|' && str[i + 1] == 0))
    if ((str = add_a_space(str, i)) == NULL)
      return (NULL);
  return (str);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rax
movb 0x1(%rdi), %cl
testb %cl, %cl
je 0x58f2
movl %esi, %ebp
xorl %ebx, %ebx
cmpb $0x20, %cl
je 0x58b7
cmpb %bpl, %cl
je 0x58b7
cmpb %bpl, (%rax,%rbx)
jne 0x58b7
leal 0x1(%rbx), %esi
movq %rax, %rdi
callq 0x5810
testq %rax, %rax
je 0x590c
testq %rbx, %rbx
je 0x58e5
cmpb %bpl, (%rax,%rbx)
jne 0x58e5
movb -0x1(%rax,%rbx), %cl
cmpb %bpl, %cl
sete %dl
cmpb $0x20, %cl
sete %cl
orb %dl, %cl
jne 0x58e5
movq %rax, %rdi
movl %ebx, %esi
callq 0x5810
testq %rax, %rax
je 0x590c
movb 0x2(%rax,%rbx), %cl
incq %rbx
testb %cl, %cl
jne 0x5897
jmp 0x58f4
xorl %ebx, %ebx
movl %ebx, %ecx
cmpb $0x7c, (%rax,%rcx)
jne 0x590e
movq %rax, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5810
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/src/my_magic_quote.c
// Function: special_strdup
char		*special_strdup(char *str)
{
  int		i;
  int		j;
  char		*new_str;

  if ((new_str = malloc(sizeof(char)
			* (my_strlen(str) - 2) + 1)) == NULL)
    return (NULL);
  i = 1;
  j = 0;
  while (str[i + 1] != '\0')
    {
      new_str[j] = str[i];
      i += 1;
      j += 1;
    }
  new_str[j] = '\0';
  return (new_str);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x4740
movslq %eax, %rdi
decq %rdi
callq 0x2140
testq %rax, %rax
je 0x596e
cmpb $0x0, 0x2(%rbx)
je 0x5972
xorl %ecx, %ecx
movb 0x1(%rbx,%rcx), %dl
movb %dl, (%rax,%rcx)
cmpb $0x0, 0x3(%rbx,%rcx)
leaq 0x1(%rcx), %rcx
jne 0x5958
movl %ecx, %ecx
jmp 0x5974
xorl %eax, %eax
jmp 0x5978
xorl %ecx, %ecx
movb $0x0, (%rax,%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/src/my_magic_quote.c
// Function: check_magic_quote
int		check_magic_quote(t_info_shell *shell, char *str)
{
  char		**tab;
  char		**save;

  if ((tab = malloc(sizeof(char *) * 2)) == NULL)
    return (84);
  if ((tab[0] = special_strdup(str)) == NULL)
    return (84);
  tab[1] = NULL;
  save = shell->tab;
  shell->tab = tab;
  if (is_valid_command(shell) == NULL)
    my_printf("%s: %s", tab[0], COMMAND_ERROR);
  shell->tab = save;
  free_all(NULL, tab);
  return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %rbx
movl $0x10, %edi
callq 0x2140
movl $0x54, %r15d
testq %rax, %rax
je 0x59f6
movq %rax, %r14
movq %r12, %rdi
callq 0x5937
movq %rax, (%r14)
testq %rax, %rax
je 0x59f6
movq $0x0, 0x8(%r14)
movq 0x18(%rbx), %r15
movq %r14, 0x18(%rbx)
movq %rbx, %rdi
callq 0x3040
testq %rax, %rax
jne 0x59e5
movq (%r14), %rsi
leaq 0x180d(%rip), %rdi      # 0x71e4
leaq 0x180d(%rip), %rdx      # 0x71eb
xorl %eax, %eax
callq 0x5bde
movq %r15, 0x18(%rbx)
xorl %r15d, %r15d
xorl %edi, %edi
movq %r14, %rsi
callq 0x4751
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/MaxenceEpitech[P]42sh/src/my_magic_quote.c
// Function: my_magic_quote
int		my_magic_quote(t_info_shell *shell)
{
  int		i;

  i = 0;
  while (shell->tab[i] != NULL)
    {
      if ((detect_magic_quote(shell->tab[i])) == 1)
	if ((check_magic_quote(shell, shell->tab[i])) == 84)
	  return (84);
      i += 1;
    }
  return (0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rax
movq (%rax), %rsi
testq %rsi, %rsi
je 0x5a50
movq %rdi, %rbx
xorl %r14d, %r14d
movq %rsi, %rax
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x5a1e
cmpb $0x60, (%rsi)
jne 0x5a3f
cmpb $0x60, -0x2(%rax)
jne 0x5a3f
movq %rbx, %rdi
callq 0x597a
cmpl $0x54, %eax
je 0x5a5a
movq 0x18(%rbx), %rax
movq 0x8(%rax,%r14,8), %rsi
incq %r14
testq %rsi, %rsi
jne 0x5a1b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x54, %eax
jmp 0x5a52
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/utils/free/test/test_free.c
// Function: main
int  main() {
    boolean pass = T;

    mp_init(16 * sizeof(int), &err);

    int *array_1 = (int *)mp_new(sizeof(int) * 8);
    for (int i = 0; i < 8; ++i) {
        array_1[i] = i;
    }

    int *array_2 = (int *)mp_new(sizeof(int) * 8);
    for (int i = 0; i < 8; ++i) {
        array_2[i] = 10 + i;
    }

    int *array_3 = (int *)mp_new(sizeof(int) * 8);
    if (array_3 != NULL) {
        pass = F;
        print_err("want error, but it seems works good.\n");
    }

    for (int i = 0; i < 8; ++i) {
        if (array_1[i] != i) {
            pass = F;
            print_err("array_1[%d] = %d, excepted %d\n", i, array_1[i], i);
        }
    }
    for (int i = 0; i < 8; ++i) {
        if (array_2[i] != 10 + i) {
            pass = F;
            print_err("array_2[%d] = %d, excepted %d\n", i, array_2[i], 10 + i);
        }
    }

    if (pass) {
        print_ok("All testcase passed\n");
        return 0;
    } else {
        print_err("Some error\n");
        return 1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x925(%rip), %rax       # 0x2004
movl (%rax), %r13d
leaq -0x1d(%rip), %rsi       # 0x16cc
movl $0x40, %edi
callq 0x13ef
movl $0x20, %edi
callq 0x1624
movq %rax, %r14
xorl %eax, %eax
movl %eax, (%r14,%rax,4)
incq %rax
cmpq $0x8, %rax
jne 0x1702
movl $0x20, %edi
callq 0x1624
movq %rax, %rbx
xorl %eax, %eax
leal 0xa(%rax), %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
cmpq $0x8, %rax
jne 0x171e
movl $0x20, %edi
callq 0x1624
testq %rax, %rax
je 0x1754
leaq 0x8c5(%rip), %rax       # 0x2008
movl (%rax), %r13d
leaq 0xa08(%rip), %rdi       # 0x2155
xorl %eax, %eax
callq 0x1090
leaq 0x8ad(%rip), %rax       # 0x2008
movl (%rax), %ebp
leaq 0xa17(%rip), %r15       # 0x217b
xorl %r12d, %r12d
movl (%r14,%r12,4), %edx
cmpq %rdx, %r12
je 0x1783
movq %r15, %rdi
movl %r12d, %esi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x1090
movl %ebp, %r13d
incq %r12
cmpq $0x8, %r12
jne 0x1767
leaq 0x875(%rip), %rax       # 0x2008
movl (%rax), %r12d
leaq 0x9fd(%rip), %r14       # 0x219a
xorl %r15d, %r15d
movl (%rbx,%r15,4), %edx
leaq 0xa(%r15), %rax
cmpq %rdx, %rax
je 0x17c1
leal 0xa(%r15), %ecx
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x1090
movl %r12d, %r13d
incq %r15
cmpq $0x8, %r15
jne 0x17a0
testl %r13d, %r13d
je 0x17e1
leaq 0x9e3(%rip), %rdi       # 0x21b9
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1321
jmp 0x17f4
leaq 0x9e6(%rip), %rdi       # 0x21ce
xorl %eax, %eax
callq 0x1090
movl $0x1, %ebx
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/vcfutils.c
// Function: bcf_remove_alleles
int bcf_remove_alleles(const bcf_hdr_t *header, bcf1_t *line, int rm_mask)
{
    int i;
    kbitset_t *rm_set = kbs_init(line->n_allele);
    for (i=1; i<line->n_allele; i++)
        if ( rm_mask & 1<<i ) kbs_insert(rm_set, i);

    bcf_remove_allele_set(header, line, rm_set);
    kbs_destroy(rm_set);

    return 0; // FIXME: check for errs in this function
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, 0x10(%rsp)
movq 0x18(%rsi), %r12
movq %r12, 0x8(%rsp)
shrq $0x10, %r12
movzwl %r12w, %ebx
addl $0x3f, %ebx
shrl $0x6, %ebx
leal (,%rbx,8), %r13d
leaq 0x18(%r13), %rdi
callq 0x14810
testq %rax, %rax
je 0x77e70
movq %rax, %r15
movq %rbx, 0x8(%rax)
movq %rbx, (%rax)
movq %rax, %rdi
addq $0x10, %rdi
movq %r14, (%rsp)
xorl %r14d, %r14d
xorl %esi, %esi
movq %r13, %rdx
callq 0x14240
andl $0x3f, %r12d
movq $-0x1, %rax
movl %r12d, %ecx
shlq %cl, %rax
notq %rax
cmpq $0x1, %r12
sbbq %r14, %r14
orq %rax, %r14
movq %r14, 0x10(%r15,%rbx,8)
movq (%rsp), %r14
jmp 0x77e73
xorl %r15d, %r15d
movq 0x8(%rsp), %rcx
cmpl $0x20000, %ecx          # imm = 0x20000
jb 0x77eb4
shrl $0x10, %ecx
cmpl $0x3, %ecx
movl $0x2, %eax
cmovael %ecx, %eax
movl $0x1, %ecx
btl %ecx, %ebp
jae 0x77eac
movl $0x1, %edx
shlq %cl, %rdx
movq %rcx, %rsi
shrq $0x6, %rsi
orq %rdx, 0x10(%r15,%rsi,8)
incq %rcx
cmpq %rcx, %rax
jne 0x77e93
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x16090
movq %r15, %rdi
callq 0x14dd0
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_external.c
// Function: cram_container_get_coords
void cram_container_get_coords(cram_container *c,
                               int *refid, hts_pos_t *start, hts_pos_t *span) {
    if (refid)
        *refid = c->ref_seq_id;
    if (start)
        *start = c->ref_seq_start;
    if (span)
        *span  = c->ref_seq_span;
}

// Assembly:
testq %rsi, %rsi
je 0x92d00
movl 0x4(%rdi), %eax
movl %eax, (%rsi)
testq %rdx, %rdx
je 0x92d0c
movq 0x8(%rdi), %rax
movq %rax, (%rdx)
testq %rcx, %rcx
je 0x92d18
movq 0x10(%rdi), %rax
movq %rax, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_external.c
// Function: cram_block_compression_hdr_decoder2encoder
int cram_block_compression_hdr_decoder2encoder(cram_fd *fd,
                                               cram_block_compression_hdr *ch) {
    int i;

    if (!ch)
        return -1;

    for (i = 0; i < DS_END; i++) {
        cram_codec *co = ch->codecs[i];
        if (!co)
            continue;

        if (-1 == cram_codec_decoder2encoder(fd, co))
            return -1;
    }

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rsi, %rsi
je 0x92dab
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
movq 0x280(%r14,%r12,8), %rsi
testq %rsi, %rsi
je 0x92d96
movq %r15, %rdi
callq 0x15280
xorl %ecx, %ecx
cmpl $-0x1, %eax
sete %cl
jmp 0x92d9b
movl $0x4, %ecx
testb $0x3, %cl
jne 0x92dab
incq %r12
cmpq $0x2f, %r12
jne 0x92d77
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_external.c
// Function: cram_cid2ds_free
void cram_cid2ds_free(cram_cid2ds_t *cid2ds) {
    if (cid2ds) {
        if (cid2ds->hash)
            kh_destroy(cid, cid2ds->hash);
        free(cid2ds->ds);
        free(cid2ds->ds_a);
        free(cid2ds);
    }
}

// Assembly:
testq %rdi, %rdi
je 0x92e11
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0x92df1
movq 0x18(%r14), %rdi
callq 0x14dd0
movq 0x10(%r14), %rdi
callq 0x14dd0
movq 0x20(%r14), %rdi
callq 0x14dd0
movq %r14, %rdi
callq 0x14dd0
movq (%rbx), %rdi
callq 0x14dd0
movq 0x18(%rbx), %rdi
callq 0x14dd0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x14dd0
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_external.c
// Function: cram_codec_iter_next
static cram_codec *cram_codec_iter_next(cram_codec_iter *iter,
                                        int *key) {
    cram_codec *cc = NULL;
    cram_block_compression_hdr *hdr = iter->hdr;

    if (!iter->is_tag) {
        // 1: Iterating through main data-series
        do {
            cc = hdr->codecs[iter->idx++];
        } while(!cc && iter->idx < DS_END);
        if (cc) {
            *key = cram_ds_to_key(iter->idx-1);
            return cc;
        }

        // Reset index for phase 2
        iter->idx = 0;
        iter->is_tag = 1;
    }

    do {
        if (!iter->curr_map)
            iter->curr_map = hdr->tag_encoding_map[iter->idx++];

        cc = iter->curr_map ? iter->curr_map->codec : NULL;
        if (cc) {
            *key = iter->curr_map->key;
            iter->curr_map = iter->curr_map->next;
            return cc;
        }
    } while (iter->idx < CRAM_MAP_HASH);

    // End of codecs
    return NULL;
}

// Assembly:
movq (%rdi), %rcx
cmpl $0x0, 0x14(%rdi)
je 0x93157
movq 0x8(%rdi), %rdx
testq %rdx, %rdx
jne 0x9312f
movslq 0x10(%rdi), %rax
leal 0x1(%rax), %edx
movl %edx, 0x10(%rdi)
movq 0x180(%rcx,%rax,8), %rdx
movq %rdx, 0x8(%rdi)
testq %rdx, %rdx
je 0x9313a
movq 0x10(%rdx), %rax
jmp 0x9313c
xorl %eax, %eax
testq %rax, %rax
jne 0x9314a
cmpl $0x20, 0x10(%rdi)
jl 0x93114
xorl %eax, %eax
retq
movl (%rdx), %ecx
movl %ecx, (%rsi)
movq 0x18(%rdx), %rcx
movq %rcx, 0x8(%rdi)
retq
movslq 0x10(%rdi), %rdx
movq %rdx, %r8
movq 0x280(%rcx,%rdx,8), %rax
incq %rdx
cmpq $0x2d, %r8
jg 0x93174
testq %rax, %rax
je 0x9315b
movl %edx, 0x10(%rdi)
testq %rax, %rax
je 0x93198
addl $-0xc, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x23, %edx
ja 0x93195
movl %edx, %ecx
leaq 0x43cfa(%rip), %rdx     # 0xd6e8c
movl (%rdx,%rcx,4), %ecx
movl %ecx, (%rsi)
retq
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x10(%rdi)
jmp 0x93110
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_external.c
// Function: cram_cid2ds_query
int *cram_cid2ds_query(cram_cid2ds_t *c2d, int content_id, int *n) {
    *n = 0;
    if (!c2d || !c2d->hash)
        return NULL;

    khiter_t k = kh_get(cid, c2d->hash, content_id);
    if (k == kh_end(c2d->hash))
        return NULL;

    if (!c2d->ds_a) {
        c2d->ds_a = malloc(c2d->ds_idx * sizeof(int));
        if (!c2d->ds_a)
            return NULL;
    }

    int dsi = kh_value(c2d->hash, k); // initial ds array index from hash
    int idx = 0;
    while (dsi >= 0) {
        c2d->ds_a[idx++] = c2d->ds[dsi].data_series;
        dsi = c2d->ds[dsi].next;      // iterate over list within ds array
    }

    *n = idx;
    return c2d->ds_a;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x0, (%rdx)
testq %rdi, %rdi
je 0x9325b
movq %rdi, %r14
movq 0x10(%rdi), %r12
xorl %r15d, %r15d
testq %r12, %r12
je 0x932b2
movq %rdx, %rbx
movl (%r12), %eax
testl %eax, %eax
je 0x93256
leal -0x1(%rax), %edx
movl %edx, %edi
andl %esi, %edi
movq 0x10(%r12), %r8
movl $0x1, %r9d
movl %edi, %r15d
movl %r15d, %ecx
shrl $0x4, %ecx
movl (%r8,%rcx,4), %r10d
leal (%r15,%r15), %ecx
andl $0x1e, %ecx
movl %r10d, %r11d
shrl %cl, %r11d
testb $0x2, %r11b
jne 0x9324b
testb $0x1, %r11b
jne 0x93238
movq 0x18(%r12), %r11
movl %r15d, %r13d
cmpl %esi, (%r11,%r13,4)
je 0x9324b
addl %r9d, %r15d
andl %edx, %r15d
incl %r9d
cmpl %edi, %r15d
jne 0x93207
movl %eax, %r15d
jmp 0x93256
shrl %cl, %r10d
testb $0x3, %r10b
cmovnel %eax, %r15d
cmpl %eax, %r15d
jne 0x93260
xorl %r15d, %r15d
jmp 0x932b2
cmpq $0x0, 0x18(%r14)
jne 0x9327d
movslq 0xc(%r14), %rdi
shlq $0x2, %rdi
callq 0x14810
movq %rax, 0x18(%r14)
testq %rax, %rax
je 0x9325b
movq 0x20(%r12), %rax
movl %r15d, %ecx
movl (%rax,%rcx,8), %esi
testl %esi, %esi
js 0x932aa
movq (%r14), %rcx
movq 0x18(%r14), %rdx
xorl %eax, %eax
movl %esi, %esi
movl (%rcx,%rsi,8), %edi
movl %edi, (%rdx,%rax,4)
incq %rax
movl 0x4(%rcx,%rsi,8), %esi
testl %esi, %esi
jns 0x93295
jmp 0x932ac
xorl %eax, %eax
movl %eax, (%rbx)
movq 0x18(%r14), %r15
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_external.c
// Function: cram_describe_encodings
int cram_describe_encodings(cram_block_compression_hdr *hdr, kstring_t *ks) {
    cram_codec_iter citer;
    cram_codec_iter_init(hdr, &citer);
    cram_codec *codec;
    int key, r = 0;

    while ((codec = cram_codec_iter_next(&citer, &key))) {
        char key_s[4] = {0};
        int key_i = 0;
        if (key>>16) key_s[key_i++] = key>>16;
        key_s[key_i++] = (key>>8)&0xff;
        key_s[key_i++] = key&0xff;
        r |= ksprintf(ks, "\t%s\t", key_s) < 0;
        r |= cram_codec_describe(codec, ks) < 0;
        r |= kputc('\n', ks) < 0;
    }

    return r ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
leaq 0x10(%rsp), %rax
movq %rdi, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
leaq 0xc(%rsp), %rsi
movq %rax, %rdi
callq 0x93107
testq %rax, %rax
je 0x9340a
movq %rax, %r14
leaq 0x43c1d(%rip), %r15     # 0xd6f1c
leaq 0x8(%rsp), %r13
xorl %r12d, %r12d
movl $0x0, 0x8(%rsp)
movl 0xc(%rsp), %eax
movl $0x0, %ecx
cmpl $0x10000, %eax          # imm = 0x10000
jb 0x9332d
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, 0x8(%rsp)
movl $0x1, %ecx
movl %ecx, %ecx
rolw $0x8, %ax
movw %ax, 0x8(%rsp,%rcx)
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x14370
movl %eax, %ebp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x15560
movl %eax, %r14d
movq (%rbx), %rax
addq $0x2, %rax
cmpq %rax, 0x8(%rbx)
jae 0x933a6
movq %r15, %r13
movq %rax, %rcx
shrq $0x3e, %rcx
movq %rax, %rdx
shrq %rdx
testq %rcx, %rcx
movl $0x0, %r15d
cmoveq %rdx, %r15
addq %rax, %r15
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0x162d0
testq %rax, %rax
je 0x933f2
movq %rax, 0x10(%rbx)
movq %r15, 0x8(%rbx)
movq %r13, %r15
leaq 0x8(%rsp), %r13
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movb $0xa, (%rcx,%rax)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movl $0xa, %eax
orl %ebp, %r14d
orl %eax, %r14d
shrl $0x1f, %r14d
orl %r14d, %r12d
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x93107
movq %rax, %r14
testq %rax, %rax
jne 0x93307
jmp 0x93401
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %r13, %r15
leaq 0x8(%rsp), %r13
jmp 0x933c8
xorl %eax, %eax
negl %r12d
sbbl %eax, %eax
jmp 0x9340c
xorl %eax, %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/cram/cram_external.c
// Function: cram_slice_hdr_get_coords
void cram_slice_hdr_get_coords(cram_block_slice_hdr *h,
                               int *refid, hts_pos_t *start, hts_pos_t *span) {
    if (refid)
        *refid = h->ref_seq_id;
    if (start)
        *start = h->ref_seq_start;
    if (span)
        *span  = h->ref_seq_span;
}

// Assembly:
testq %rsi, %rsi
je 0x9342d
movl 0x4(%rdi), %eax
movl %eax, (%rsi)
testq %rdx, %rdx
je 0x93439
movq 0x8(%rdi), %rax
movq %rax, (%rdx)
testq %rcx, %rcx
je 0x93445
movq 0x10(%rdi), %rax
movq %rax, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_external.c
// Function: cram_block_append
int cram_block_append(cram_block *b, const void *data, int size) {
    BLOCK_APPEND(b, data, size);
    return 0;

 block_err:
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movslq %edx, %r14
movq 0x30(%rdi), %r12
addq %r14, %r12
movq 0x28(%rdi), %rax
cmpq %r12, %rax
ja 0x934e6
leaq 0x320(%rax), %rcx
shrq $0x2, %rcx
addq %rcx, %rax
addq $0x320, %rax            # imm = 0x320
cmpq %r12, %rax
cmovaq %rax, %r12
movq 0x20(%rbx), %rdi
movq %r12, %rsi
callq 0x162d0
testq %rax, %rax
je 0x93506
movq %r12, 0x28(%rbx)
movq %rax, 0x20(%rbx)
xorl %r12d, %r12d
testl %ebp, %ebp
je 0x9350c
movq 0x20(%rbx), %rdi
addq 0x30(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x16540
addq %r14, 0x30(%rbx)
jmp 0x9350c
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_external.c
// Function: cram_copy_slice
int cram_copy_slice(cram_fd *in, cram_fd *out, int32_t num_slice) {
    int32_t i, j;

    for (i = 0; i < num_slice; i++) {
        cram_block *blk;
        cram_block_slice_hdr *hdr;

        if (!(blk = cram_read_block(in)))
            return -1;
        if (!(hdr = cram_decode_slice_header(in, blk))) {
            cram_free_block(blk);
            return -1;
        }

        if (cram_write_block(out, blk) != 0) {
            cram_free_block(blk);
            return -1;
        }
        cram_free_block(blk);

        int num_blocks = cram_slice_hdr_get_num_blocks(hdr);
        for (j = 0; j < num_blocks; j++) {
            blk = cram_read_block(in);
            if (!blk || cram_write_block(out, blk) != 0) {
                if (blk) cram_free_block(blk);
                return -1;
            }
            cram_free_block(blk);
        }
        cram_free_slice_header(hdr);
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x10(%rsp)
movl %edx, 0x8(%rsp)
testl %edx, %edx
jle 0x9383a
movq %rdi, %rbx
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x14900
movl $0xffffffff, 0x4(%rsp)  # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x9384c
movq %rax, %r13
movq %rbx, %rdi
movq %rax, %rsi
callq 0x16270
testq %rax, %rax
je 0x93844
movq %rax, %r14
movq %rbx, %r12
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x15790
movl %eax, %ebx
movq %r13, %rdi
callq 0x15090
testl %ebx, %ebx
jne 0x9384c
movl %ebp, 0xc(%rsp)
movq %r14, 0x18(%rsp)
movl 0x28(%r14), %r14d
testl %r14d, %r14d
setg %bpl
jle 0x93817
movl %r14d, %eax
negl %eax
movq %rax, 0x20(%rsp)
movl $0x1, %r15d
movq %r12, %rbx
movq %rbx, %rdi
callq 0x14900
testq %rax, %rax
je 0x93824
movq %rax, %r13
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x15790
movl %eax, %ebx
movq %r13, %rdi
callq 0x15090
testl %ebx, %ebx
movq %r12, %rbx
jne 0x93824
cmpl %r14d, %r15d
setl %bpl
movq 0x20(%rsp), %rax
addl %r15d, %eax
incl %eax
movl %r15d, %ecx
incl %ecx
movl %ecx, %r15d
cmpl $0x1, %eax
jne 0x937c9
jmp 0x9381a
movq %r12, %rbx
movq 0x18(%rsp), %rdi
callq 0x158a0
testb $0x1, %bpl
jne 0x9384c
movl 0xc(%rsp), %ebp
incl %ebp
cmpl 0x8(%rsp), %ebp
jne 0x9374b
movl $0x0, 0x4(%rsp)
jmp 0x9384c
movq %r13, %rdi
callq 0x15090
movl 0x4(%rsp), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: dump_stack
void dump_stack() {
  CELL i;
  if (sp == 0)
    return;
  printf("\nStack: ");
  for (i = 1; i <= sp; i++) {
    if (i == sp)
      printf("[ TOS: %lld ]", (long long)data[i]);
    else
      printf("%lld ", (long long)data[i]);
  }
  printf("\n");
}

// Assembly:
cmpl $0x0, 0x3f6d(%rip)      # 0x51c0
je 0x12d0
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x1db4(%rip), %rdi      # 0x3018
xorl %eax, %eax
callq 0x1080
movl 0x3f4f(%rip), %eax      # 0x51c0
testl %eax, %eax
jle 0x12bb
movl $0x1, %r14d
leaq 0x3f4e(%rip), %rbx      # 0x51d0
leaq 0x1d98(%rip), %r15      # 0x3021
leaq 0x1d9f(%rip), %r12      # 0x302f
movl %eax, %eax
movq %r15, %rdi
cmpq %rax, %r14
je 0x129d
movq %r12, %rdi
movslq (%rbx,%r14,4), %rsi
xorl %eax, %eax
callq 0x1080
leaq 0x1(%r14), %rcx
movslq 0x3f0d(%rip), %rax      # 0x51c0
cmpq %rax, %r14
movq %rcx, %r14
jl 0x1290
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: include_file
int include_file(char *fname) {
  FILE *fp;
  char source[2049];
  int inBlock = 0;
  int tokens = 0;
  fp = fopen(fname, "r");
  if (fp == NULL)
    return 0;
  while (!feof(fp))
  {
    read_token(fp, source, 0, 2048);
    if (strcmp(source, "~~~") == 0) {
      if (inBlock == 0)
        inBlock = 1;
      else
        inBlock = 0;
    } else {
      if (inBlock == 1) {
        evaluate(source);
        tokens++;
      }
    }
  }
  fclose(fp);
  return tokens;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x810, %rsp            # imm = 0x810
leaq 0x1dba(%rip), %rsi      # 0x30a1
callq 0x1110
testq %rax, %rax
je 0x1363
movq %rax, %rbx
movq %rax, %rdi
callq 0x10e0
xorl %ebp, %ebp
testl %eax, %eax
jne 0x1359
xorl %ebp, %ebp
movq %rsp, %r14
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl $0x800, %ecx            # imm = 0x800
callq 0x1377
cmpl $0x7e7e7e, (%rsp)       # imm = 0x7E7E7E
jne 0x1331
xorl %r15d, %r15d
testl %r12d, %r12d
sete %r15b
jmp 0x134a
xorl %r15d, %r15d
cmpl $0x1, %r12d
jne 0x134a
movq %r14, %rdi
callq 0x1438
incl %ebp
movl $0x1, %r15d
movq %rbx, %rdi
callq 0x10e0
movl %r15d, %r12d
testl %eax, %eax
je 0x130a
movq %rbx, %rdi
callq 0x1060
jmp 0x1365
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x810, %rsp            # imm = 0x810
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: read_token
void read_token(FILE *file, char *token_buffer, int echo, int max) {
  int ch, count;
  ch = getc(file);
  if (echo != 0)
    putchar(ch);
  count = 0;
  while (not_eol(ch))
  {
    if ((ch == 8 || ch == 127) && count > 0) {
      count--;
      if (echo != 0) {
        putchar(8);
        putchar(32);
        putchar(8);
      }
    } else {
      token_buffer[count++] = ch;
    }
    if (count == max) {
      break;
    }
    ch = getc(file);
    if (echo != 0)
      putchar(ch);
  }
  token_buffer[count] = '\0';
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
callq 0x1140
movl %eax, %r12d
xorl %r13d, %r13d
testl %r14d, %r14d
jne 0x1415
leal 0x1(%r12), %eax
cmpl $0x21, %eax
ja 0x13b7
movabsq $0x200004803, %rcx      # imm = 0x200004803
btq %rax, %rcx
jb 0x1422
cmpl $0x8, %r12d
setne %al
cmpl $0x7f, %r12d
setne %cl
andb %al, %cl
testl %r13d, %r13d
setle %al
orb %cl, %al
jne 0x13f9
decl %r13d
testl %r14d, %r14d
je 0x1403
movl $0x8, %edi
callq 0x1030
movl $0x20, %edi
callq 0x1030
movl $0x8, %edi
callq 0x1030
jmp 0x1403
movslq %r13d, %rax
incl %r13d
movb %r12b, (%rbx,%rax)
cmpl %ebp, %r13d
je 0x1422
movq %r15, %rdi
callq 0x1140
movl %eax, %r12d
jmp 0x1398
movl %r12d, %edi
callq 0x1030
jmp 0x139d
movslq %r13d, %rax
movb $0x0, (%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/crcx[P]retroforth/tools/retro-extend.c
// Function: evaluate
void evaluate(char *s) {
  if (strlen(s) == 0)
    return;
  string_inject(s, TIB);
  stack_push(TIB);
  execute(interpret);
}

// Assembly:
cmpb $0x0, (%rdi)
je 0x1477
pushq %rax
movl 0x41b8(%rip), %esi      # 0x55fc
callq 0x16a9
movl 0x41ad(%rip), %eax      # 0x55fc
movslq 0x3d6a(%rip), %rcx      # 0x51c0
leaq 0x1(%rcx), %rdx
movl %edx, 0x3d60(%rip)      # 0x51c0
leaq 0x3d69(%rip), %rdx      # 0x51d0
movl %eax, 0x4(%rdx,%rcx,4)
movl 0x20618b(%rip), %edi    # 0x2075fc
popq %rax
jmp 0x1882
retq
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: main
int main(int argc, char **argv) {
  int tokens, i;
  FILE *fp;
  ngaPrepare();
  max_sp = 0;
  max_rsp = 0;
  ngaLoadImage(argv[1]);
  update_rx();
  printf("Initial Image Size: %lld\n", (long long)Heap);
  for (i = 2; i < argc; i++) {
    tokens = include_file(argv[i]);
    printf("   + %lld tokens from %s\n", (long long)tokens, argv[i]);
  }
  update_rx();
  printf("New Image Size: %lld\n", (long long)Heap);
  printf("MAX SP: %lld, RP: %lld\n", (long long)max_sp, (long long)max_rsp);
  if ((fp = fopen(argv[1], "wb")) == NULL) {
    printf("Unable to save the ngaImage!\n");
    exit(2);
  }
  fwrite(&memory, sizeof(CELL), memory[3] + 1, fp);
  fclose(fp);
  if (sp != 0) {
    printf("Stack not empty!\n");
    dump_stack();
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
xorl %r14d, %r14d
movl %r14d, 0x206171(%rip)   # 0x207600
movl %r14d, 0x3d2a(%rip)     # 0x51c0
leaq 0x4143(%rip), %rdi      # 0x55e0
movl $0x200000, %edx         # imm = 0x200000
xorl %esi, %esi
callq 0x10a0
leaq 0x3d20(%rip), %rdi      # 0x51d0
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x10a0
leaq 0x20614d(%rip), %rdi    # 0x207610
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x10a0
movl $0x100, 0x20612b(%rip)  # imm = 0x100
movl %r14d, 0x40f0(%rip)     # 0x55d0
movl %r14d, 0x40ed(%rip)     # 0x55d4
movq 0x8(%rbx), %rdi
callq 0x15f0
callq 0x180c
movslq 0x40dc(%rip), %rsi      # 0x55d8
leaq 0x1b32(%rip), %rdi      # 0x3035
xorl %eax, %eax
callq 0x1080
cmpl $0x3, %ebp
jl 0x1541
movl %ebp, %r15d
movl $0x2, %r12d
leaq 0x1b30(%rip), %r14      # 0x304f
movq (%rbx,%r12,8), %rdi
callq 0x12d1
movslq %eax, %rsi
movq (%rbx,%r12,8), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1080
incq %r12
cmpq %r12, %r15
jne 0x151f
callq 0x180c
movslq 0x408b(%rip), %rsi      # 0x55d8
leaq 0x1b15(%rip), %rdi      # 0x3069
xorl %eax, %eax
callq 0x1080
movslq 0x406e(%rip), %rsi      # 0x55d0
movslq 0x406b(%rip), %rdx      # 0x55d4
leaq 0x1b0f(%rip), %rdi      # 0x307f
xorl %eax, %eax
callq 0x1080
movq 0x8(%rbx), %rdi
leaq 0x1b15(%rip), %rsi      # 0x3097
callq 0x1110
testq %rax, %rax
je 0x15da
movq %rax, %rbx
leaq 0x404a(%rip), %rdi      # 0x55e0
movslq 0x404f(%rip), %rdx      # 0x55ec
incq %rdx
movl $0x4, %esi
movq %rax, %rcx
callq 0x1130
movq %rbx, %rdi
callq 0x1060
cmpl $0x0, 0x3c04(%rip)      # 0x51c0
je 0x15cf
leaq 0x1b2a(%rip), %rdi      # 0x30ef
callq 0x1040
callq 0x124c
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b1f(%rip), %rdi      # 0x3100
callq 0x1040
movl $0x2, %edi
callq 0x1120
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: string_inject
int string_inject(char *str, int buffer) {
  int m = strlen(str);
  int i = 0;
  while (m > 0) {
    memory[buffer + i] = (CELL)str[i];
    memory[buffer + i + 1] = 0;
    m--; i++;
  }
  return buffer;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x1070
testl %eax, %eax
jle 0x16ec
movslq %ebx, %rcx
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq 0x3f16(%rip), %rdx      # 0x55e0
leaq (%rdx,%rcx,4), %rcx
addq $0x4, %rcx
xorl %edx, %edx
movsbl (%r14,%rdx), %esi
movl %esi, -0x4(%rcx,%rdx,4)
movl $0x0, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x16d4
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: string_extract
char *string_extract(CELL at) {
  CELL starting = at;
  CELL i = 0;
  while(memory[starting] && i < 8192)
    string_data[i++] = (char)memory[starting++];
  string_data[i] = 0;
  return (char *)string_data;
}

// Assembly:
movslq %edi, %rcx
leaq 0x3ee0(%rip), %rdx      # 0x55e0
movl (%rdx,%rcx,4), %eax
testl %eax, %eax
je 0x1734
leaq (%rdx,%rcx,4), %rcx
addq $0x4, %rcx
xorl %esi, %esi
leaq 0x203ed8(%rip), %rdi    # 0x2055f0
leaq 0x1(%rsi), %rdx
movb %al, (%rsi,%rdi)
movl (%rcx,%rsi,4), %eax
testl %eax, %eax
je 0x1736
cmpq $0x1fff, %rsi           # imm = 0x1FFF
movq %rdx, %rsi
jb 0x1718
jmp 0x1736
xorl %edx, %edx
leaq 0x203eb3(%rip), %rax    # 0x2055f0
movb $0x0, (%rdx,%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: d_lookup
int d_lookup(CELL Dictionary, char *name) {
  CELL dt = 0;
  CELL i = Dictionary;
  char *dname;
  while (memory[i] != 0 && i != 0) {
    dname = string_extract(d_name(i));
    if (strcmp(dname, name) == 0) {
      dt = i;
      i = 0;
    } else {
      i = memory[i];
    }
  }
  return dt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %r14d, %r14d
testl %edi, %edi
je 0x17c0
movslq %edi, %rax
leaq 0x3e73(%rip), %r12      # 0x55e0
cmpl $0x0, (%r12,%rax,4)
je 0x17c0
movq %rsi, %rbx
leaq (%r12,%rax,4), %r13
xorl %ebp, %ebp
leaq 0x203e6c(%rip), %r15    # 0x2055f0
movl %edi, %r14d
leal 0x9(%r14), %edi
callq 0x16f6
movq %r15, %rdi
movq %rbx, %rsi
callq 0x10b0
movl $0x0, %edi
testl %eax, %eax
je 0x17ab
movl (%r13), %edi
movl %ebp, %r14d
testl %edi, %edi
je 0x17c0
movslq %edi, %rax
leaq (%r12,%rax,4), %r13
cmpl $0x0, (%r13)
movl %r14d, %ebp
jne 0x1784
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: update_rx
void update_rx() {
  Dictionary = memory[2];
  Heap = memory[3];
  Compiler = d_xt_for("Compiler", Dictionary);
  notfound = d_xt_for("err:notfound", Dictionary);
  interpret = d_xt_for("interpret", Dictionary);
}

// Assembly:
pushq %rbx
leaq 0x3dcc(%rip), %rbx      # 0x55e0
movl 0x3dce(%rip), %edi      # 0x55e8
movl %edi, 0x205dd0(%rip)    # 0x2075f0
movl 0x3dc6(%rip), %eax      # 0x55ec
movl %eax, 0x3dac(%rip)      # 0x55d8
leaq 0x1867(%rip), %rsi      # 0x309a
callq 0x1751
cltq
movl 0x4(%rbx,%rax,4), %eax
movl %eax, 0x205db0(%rip)    # 0x2075f4
movl 0x205da6(%rip), %edi    # 0x2075f0
leaq 0x1852(%rip), %rsi      # 0x30a3
callq 0x1751
cltq
movl 0x4(%rbx,%rax,4), %eax
movl %eax, 0x205d96(%rip)    # 0x2075f8
movl 0x205d88(%rip), %edi    # 0x2075f0
leaq 0x1841(%rip), %rsi      # 0x30b0
callq 0x1751
cltq
movl 0x4(%rbx,%rax,4), %eax
movl %eax, 0x205d7c(%rip)    # 0x2075fc
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: execute
void execute(CELL cell) {
  CELL opcode, a, i;
  rp = 1;
  ip = cell;
  while (ip < IMAGE_SIZE) {
    opcode = memory[ip];
    if (ip == notfound) {
      printf("%s ?\n", string_extract(TIB));
    }
    if (ngaValidatePackedOpcodes(opcode) != 0) {
      ngaProcessPackedOpcodes(opcode);
    } else {
      printf("\nERROR: Invalid instruction!\n");
      printf("At %lld, opcode %lld\n", (long long)ip, (long long)opcode);
      printf("Instructions: ");
      a = opcode;
      for (i = 0; i < 4; i++) {
        printf("%lldd ", (long long)a & 0xFF);
        a = a >> 8;
      }
      printf("\n");
      exit(1);
    }
    ip++;
    if (sp > max_sp)  max_sp  = sp;
    if (rp > max_rsp) max_rsp = rp;
    if (rp == 0)
      ip = IMAGE_SIZE;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, 0x205d69(%rip)    # 0x207600
movl %edi, 0x205d67(%rip)    # 0x207604
cmpl $0x7ffff, %edi          # imm = 0x7FFFF
jg 0x1965
leaq 0x3d30(%rip), %r13      # 0x55e0
leaq 0x1803(%rip), %r14      # 0x30ba
leaq 0x203d32(%rip), %r15    # 0x2055f0
xorl %ebp, %ebp
movslq %edi, %rax
movl (%r13,%rax,4), %ebx
cmpl 0x205d2a(%rip), %eax    # 0x2075f8
jne 0x18e8
movl 0x3d26(%rip), %edi      # 0x55fc
callq 0x16f6
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x1080
movslq %ebx, %r12
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x4, %ecx
movl %ebx, %edx
movl %edx, %esi
andl $0xfe, %esi
cmpl $0x1e, %esi
cmovael %ebp, %eax
sarl $0x8, %edx
decl %ecx
jne 0x18f7
testl %eax, %eax
je 0x1974
movl %ebx, %edi
callq 0x19fc
incl 0x205ce7(%rip)          # 0x207604
movl 0x389d(%rip), %eax      # 0x51c0
cmpl 0x3ca7(%rip), %eax      # 0x55d0
jle 0x1931
movl %eax, 0x3c9f(%rip)      # 0x55d0
movl 0x205cc9(%rip), %eax    # 0x207600
cmpl 0x3c97(%rip), %eax      # 0x55d4
jle 0x1945
movl %eax, 0x3c8f(%rip)      # 0x55d4
testl %eax, %eax
jne 0x1953
movl $0x80000, 0x205cb1(%rip) # imm = 0x80000
movl 0x205cab(%rip), %edi    # 0x207604
cmpl $0x80000, %edi          # imm = 0x80000
jl 0x18c0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17bf(%rip), %rdi      # 0x313a
callq 0x1040
movslq 0x205c7d(%rip), %rsi    # 0x207604
leaq 0x1732(%rip), %rdi      # 0x30c0
movq %r12, %rdx
xorl %eax, %eax
callq 0x1080
leaq 0x1737(%rip), %rdi      # 0x30d6
xorl %eax, %eax
callq 0x1080
movl $0x4, %ebp
leaq 0x1733(%rip), %r14      # 0x30e5
movzbl %bl, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1080
sarl $0x8, %ebx
decl %ebp
jne 0x19b2
movl $0xa, %edi
callq 0x1030
movl $0x1, %edi
callq 0x1120
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: ngaProcessPackedOpcodes
void ngaProcessPackedOpcodes(CELL opcode) {
  if (INST(0))  instructions[opcode & 0xFF]();
  if (INST(8))  instructions[(opcode >> 8) & 0xFF]();
  if (INST(16)) instructions[(opcode >> 16) & 0xFF]();
  if (INST(24)) instructions[(opcode >> 24) & 0xFF]();
}

// Assembly:
pushq %rbx
movl %edi, %eax
andl $0xff, %eax
movq %rdi, %rbx
je 0x1a18
movl %eax, %eax
leaq 0x36ae(%rip), %rcx      # 0x50c0
callq *(%rcx,%rax,8)
movq %rbx, %rdi
movl %edi, %eax
shrl $0x8, %eax
andl $0xff, %eax
je 0x1a33
movl %eax, %eax
leaq 0x3693(%rip), %rcx      # 0x50c0
callq *(%rcx,%rax,8)
movq %rbx, %rdi
movl %edi, %eax
shrl $0x10, %eax
andl $0xff, %eax
je 0x1a4e
movl %eax, %eax
leaq 0x3678(%rip), %rcx      # 0x50c0
callq *(%rcx,%rax,8)
movq %rbx, %rdi
cmpl $0x1000000, %edi        # imm = 0x1000000
jae 0x1a58
popq %rbx
retq
shrl $0x18, %edi
leaq 0x365e(%rip), %rax      # 0x50c0
popq %rbx
jmpq *(%rax,%rdi,8)
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: ngaPrepare
void ngaPrepare() {
  ip = sp = rp = 0;
  for (ip = 0; ip < IMAGE_SIZE; ip++)
    memory[ip] = 0;  /* 0 is the opcode for "no", a no-operation instruction */
  for (ip = 0; ip < STACK_DEPTH; ip++)
    data[ip] = 0;
  for (ip = 0; ip < ADDRESSES; ip++)
    address[ip] = 0;
}

// Assembly:
pushq %rbx
xorl %eax, %eax
movl %eax, 0x205b6e(%rip)    # 0x207600
movl %eax, 0x3728(%rip)      # 0x51c0
leaq 0x3b41(%rip), %rdi      # 0x55e0
movl $0x200000, %edx         # imm = 0x200000
xorl %esi, %esi
callq 0x10a0
movl $0x80000, 0x205b4f(%rip) # imm = 0x80000
leaq 0x3714(%rip), %rdi      # 0x51d0
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x10a0
movl $0x100, %ebx            # imm = 0x100
movl %ebx, 0x205b31(%rip)    # 0x207604
leaq 0x205b36(%rip), %rdi    # 0x207610
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x10a0
movl %ebx, 0x205b18(%rip)    # 0x207604
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_call
void inst_call() {
  rp++;
  TORS = ip;
  ip = TOS - 1;
  inst_drop();
}

// Assembly:
movslq 0x2059c6(%rip), %rax    # 0x207600
leaq 0x1(%rax), %rcx
movl %ecx, 0x2059bc(%rip)    # 0x207600
movl 0x2059ba(%rip), %ecx    # 0x207604
leaq 0x2059bf(%rip), %rdx    # 0x207610
movl %ecx, 0x4(%rdx,%rax,4)
movslq 0x3564(%rip), %rax      # 0x51c0
leaq 0x356d(%rip), %rcx      # 0x51d0
movl (%rcx,%rax,4), %edx
decl %edx
leal -0x1(%rax), %esi
movl %edx, 0x205993(%rip)    # 0x207604
movl $0x0, (%rcx,%rax,4)
movl %esi, 0x3542(%rip)      # 0x51c0
testq %rax, %rax
jle 0x1c84
retq
movl $0x80000, 0x205976(%rip) # imm = 0x80000
retq
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_ccall
void inst_ccall() {
  CELL quote, flag;
  quote = stack_pop();
  flag = stack_pop();
  if (flag != 0) {
    rp++;
    TORS = ip;
    ip = quote - 1;
  }
}

// Assembly:
movslq 0x352a(%rip), %rcx      # 0x51c0
leaq 0x3533(%rip), %rdx      # 0x51d0
movl (%rdx,%rcx,4), %eax
leal -0x2(%rcx), %esi
movl %esi, 0x3517(%rip)      # 0x51c0
cmpl $0x0, -0x4(%rdx,%rcx,4)
je 0x1cda
movslq 0x205949(%rip), %rcx    # 0x207600
leaq 0x1(%rcx), %rdx
movl %edx, 0x20593f(%rip)    # 0x207600
movl 0x20593d(%rip), %edx    # 0x207604
leaq 0x205942(%rip), %rsi    # 0x207610
movl %edx, 0x4(%rsi,%rcx,4)
decl %eax
movl %eax, 0x20592a(%rip)    # 0x207604
retq
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_fetch
void inst_fetch() {
  switch (TOS) {
    case -1: TOS = sp - 1; break;
    case -2: TOS = rp; break;
    case -3: TOS = IMAGE_SIZE; break;
    case -4: TOS = CELL_MIN; break;
    case -5: TOS = CELL_MAX; break;
    default: TOS = memory[TOS]; break;
  }
}

// Assembly:
movslq 0x33b2(%rip), %rax      # 0x51c0
leaq 0x33bb(%rip), %rcx      # 0x51d0
movslq (%rcx,%rax,4), %rdx
leal 0x5(%rdx), %esi
cmpl $0x4, %esi
ja 0x1e53
leaq 0x11dc(%rip), %rdx      # 0x3004
movslq (%rdx,%rsi,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
movl $0x7ffffffe, %edx       # imm = 0x7FFFFFFE
jmp 0x1e5d
leal -0x1(%rax), %edx
jmp 0x1e5d
movl $0x80000, %edx          # imm = 0x80000
jmp 0x1e5d
movl 0x2057b6(%rip), %edx    # 0x207600
jmp 0x1e5d
movl $0x80000001, %edx       # imm = 0x80000001
jmp 0x1e5d
leaq 0x3786(%rip), %rsi      # 0x55e0
movl (%rsi,%rdx,4), %edx
movl %edx, (%rcx,%rax,4)
retq
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_store
void inst_store() {
  if (TOS <= IMAGE_SIZE && TOS >= 0) {
    memory[TOS] = NOS;
    inst_drop();
    inst_drop();
  } else {
    ip = IMAGE_SIZE;
  }
}

// Assembly:
movslq 0x3358(%rip), %rax      # 0x51c0
leaq 0x3361(%rip), %rcx      # 0x51d0
movl (%rcx,%rax,4), %edx
cmpq $0x80000, %rdx          # imm = 0x80000
ja 0x1ebf
leaq -0x1(%rax), %rsi
movl -0x4(%rcx,%rax,4), %edi
leaq 0x3756(%rip), %r8       # 0x55e0
movl %edi, (%r8,%rdx,4)
movl $0x0, (%rcx,%rax,4)
movl %esi, 0x3325(%rip)      # 0x51c0
testl %eax, %eax
jg 0x1ea9
movl $0x80000, 0x20575b(%rip) # imm = 0x80000
movl $0x0, -0x4(%rcx,%rax,4)
leal -0x2(%rax), %ecx
movl %ecx, 0x3306(%rip)      # 0x51c0
cmpl $0x1, %eax
jg 0x1ec9
movl $0x80000, 0x20573b(%rip) # imm = 0x80000
retq
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_divmod
void inst_divmod() {
  CELL a, b;
  a = TOS;
  b = NOS;
  TOS = b / a;
  NOS = b % a;
}

// Assembly:
movslq 0x3245(%rip), %rcx      # 0x51c0
leaq 0x324e(%rip), %rsi      # 0x51d0
movl -0x4(%rsi,%rcx,4), %eax
cltd
idivl (%rsi,%rcx,4)
movl %eax, (%rsi,%rcx,4)
movl %edx, -0x4(%rsi,%rcx,4)
retq
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_shift
void inst_shift() {
  CELL y = TOS;
  CELL x = NOS;
  if (TOS < 0)
    NOS = NOS << (TOS * -1);
  else {
    if (x < 0 && y > 0)
      NOS = x >> y | ~(~0U >> y);
    else
      NOS = x >> y;
  }
  inst_drop();
}

// Assembly:
movslq 0x3182(%rip), %rax      # 0x51c0
leaq 0x318b(%rip), %rdx      # 0x51d0
movl -0x4(%rdx,%rax,4), %edi
movl (%rdx,%rax,4), %ecx
leaq -0x1(%rax), %rsi
testl %ecx, %ecx
js 0x2078
testl %edi, %edi
setns %r8b
testl %ecx, %ecx
sete %r9b
sarl %cl, %edi
orb %r8b, %r9b
jne 0x207c
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
shrl %cl, %r8d
notl %r8d
orl %r8d, %edi
jmp 0x207c
negb %cl
shll %cl, %edi
movl %edi, -0x4(%rdx,%rax,4)
movl $0x0, (%rdx,%rax,4)
movl %esi, 0x3133(%rip)      # 0x51c0
testl %eax, %eax
jle 0x2092
retq
movl $0x80000, 0x205568(%rip) # imm = 0x80000
retq
// File: /workspace/github_c_makefile_star2_O1/crcx[P]retroforth/tools/retro-extend.c
// Function: inst_zret
void inst_zret() {
  if (TOS == 0) {
    inst_drop();
    ip = TORS;
    rp--;
  }
}

// Assembly:
movslq 0x311c(%rip), %rax      # 0x51c0
leaq 0x3125(%rip), %rcx      # 0x51d0
cmpl $0x0, (%rcx,%rax,4)
je 0x20b2
retq
movl $0x0, (%rcx,%rax,4)
leal -0x1(%rax), %ecx
movl %ecx, 0x30fe(%rip)      # 0x51c0
testl %eax, %eax
jg 0x20d0
movl $0x80000, 0x205534(%rip) # imm = 0x80000
movslq 0x205529(%rip), %rax    # 0x207600
leaq 0x205532(%rip), %rcx    # 0x207610
movl (%rcx,%rax,4), %ecx
movl %ecx, 0x20551d(%rip)    # 0x207604
decl %eax
movl %eax, 0x205511(%rip)    # 0x207600
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_06/atoi.c
// Function: atoi
int atoi(const char *s)
{
  int i = 0;

  while (*s != '\0' && *s > '0' && *s < '9')
  {
    i = i * 10 + *s - '0';
    ++s;
  }

  return i;
}

// Assembly:
movb (%rdi), %cl
leal -0x31(%rcx), %edx
xorl %eax, %eax
cmpb $0x7, %dl
ja 0x117e
incq %rdi
xorl %eax, %eax
movsbl %cl, %ecx
leal (%rax,%rax,4), %eax
leal (%rcx,%rax,2), %eax
addl $-0x30, %eax
movb (%rdi), %cl
leal -0x31(%rcx), %edx
incq %rdi
cmpb $0x8, %dl
jb 0x1165
retq