LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/csa_splice_form.c
// Function: gt_csa_splice_form_genomic_range
GtRange gt_csa_splice_form_genomic_range(const GtCSASpliceForm *splice_form)
{
  GtRange splice_form_range, tmp_range;
  GtUword i;
  gt_assert(splice_form);
  splice_form_range.start = ~0UL;
  splice_form_range.end = 0UL;
  for (i = 0; i < gt_array_size(splice_form->spliced_alignments); i++) {
    tmp_range = splice_form->get_genomic_range(*(void**)
                                               gt_array_get(splice_form
                                                         ->spliced_alignments,
                                                         i));
    if (tmp_range.start < splice_form_range.start)
      splice_form_range.start = tmp_range.start;
    if (tmp_range.end > splice_form_range.end)
      splice_form_range.end = tmp_range.end;
  }
  return splice_form_range;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0xc88b6
movq %rdi, %rbx
pushq $-0x1
popq %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%rbx), %rdi
callq 0x4b988
cmpq %rax, %r15
jae 0xc88a6
movq (%rbx), %rdi
movq 0x8(%rbx), %r13
movq %r15, %rsi
callq 0x4b48e
movq (%rax), %rdi
callq *%r13
cmpq %r14, %rax
cmovbq %rax, %r14
cmpq %r12, %rdx
cmovaq %rdx, %r12
incq %r15
jmp 0xc8871
movq %r14, %rax
movq %r12, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x656fb(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x179f(%rip), %rsi      # 0xca066
leaq 0x2cc68(%rip), %rdx     # 0xf5536
leaq 0x2ceea(%rip), %rcx     # 0xf57bf
leaq 0x2cdbf(%rip), %r8      # 0xf569b
pushq $0x57
popq %r9
xorl %eax, %eax
callq 0xb8c0
callq 0xb300
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/csa_variable_strands.c
// Function: store_splice_form
static void store_splice_form(GtArray *spliced_alignments_in_form,
                              const void *set_of_sas,
                              GT_UNUSED GtUword number_of_sas,
                              size_t size_of_sa, void *data)
{
  StoreSpliceFormInfo *info = data;
  GtCSASpliceForm *splice_form;
  GtUword i, sa;
  gt_assert(info);
  gt_assert(spliced_alignments_in_form &&
         gt_array_size(spliced_alignments_in_form));
  sa = *(GtUword*) gt_array_get(spliced_alignments_in_form, 0);
  splice_form = gt_csa_splice_form_new((char*) set_of_sas + sa * size_of_sa,
                                    info->get_genomic_range, info->get_strand);
  for (i = 1; i < gt_array_size(spliced_alignments_in_form); i++) {
    sa = *(GtUword*) gt_array_get(spliced_alignments_in_form, i);
    gt_csa_splice_form_add_sa(splice_form,
                              (char*) set_of_sas + sa * size_of_sa);
  }
  gt_array_add(info->splice_forms, splice_form);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %r8, %r8
je 0xc8cea
movq %rdi, %r12
testq %rdi, %rdi
je 0xc8cc0
movq %r8, %rbx
movq %rcx, %r14
movq %rsi, %r15
movq %r12, %rdi
callq 0x4b988
testq %rax, %rax
je 0xc8cc0
movq %r12, %rdi
xorl %esi, %esi
callq 0x4b48e
movq (%rax), %rdi
imulq %r14, %rdi
addq %r15, %rdi
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
callq 0xc85c4
movq %rax, %r13
movq %rax, (%rsp)
pushq $0x1
popq %rbp
movq %r12, %rdi
callq 0x4b988
cmpq %rax, %rbp
jae 0xc8ca3
movq %r12, %rdi
movq %rbp, %rsi
callq 0x4b48e
movq (%rax), %rsi
imulq %r14, %rsi
addq %r15, %rsi
movq %r13, %rdi
callq 0xc8684
incq %rbp
jmp 0xc8c74
movq (%rbx), %rdi
movq %rsp, %rsi
pushq $0x8
popq %rdx
callq 0x4b801
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x652f1(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x1395(%rip), %rsi      # 0xca066
leaq 0x2cbed(%rip), %rdx     # 0xf58c5
leaq 0x2cbd4(%rip), %rcx     # 0xf58b3
leaq 0x2cb7c(%rip), %r8      # 0xf5862
pushq $0x27
jmp 0xc8d12
movq 0x652c7(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x136b(%rip), %rsi      # 0xca066
leaq 0x8c67(%rip), %rdx      # 0xd1969
leaq 0x2cbaa(%rip), %rcx     # 0xf58b3
leaq 0x2cb52(%rip), %r8      # 0xf5862
pushq $0x25
popq %r9
xorl %eax, %eax
callq 0xb8c0
callq 0xb300
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/consensus_sa.c
// Function: extract_strand
static GtStrand extract_strand(const ConsensusSA *csa, GtUword sa)
{
  GtStrand strand;
  gt_assert(csa && csa->set_of_sas && sa < csa->number_of_sas);
  strand = csa->get_strand((char*) csa->set_of_sas + csa->size_of_sa * sa);
  /* XXX */
  gt_assert(strand == GT_STRAND_FORWARD || strand == GT_STRAND_REVERSE);
  return strand;
}

// Assembly:
pushq %rax
movq %rdi, %rax
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xc99a0
cmpq %rsi, 0x8(%rax)
jbe 0xc99a0
imulq 0x10(%rax), %rsi
addq %rsi, %rdi
callq *0x20(%rax)
cmpl $0x2, %eax
jae 0xc99ca
popq %rcx
retq
movq 0x64611(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x6b5(%rip), %rsi       # 0xca066
leaq 0x2c0b8(%rip), %rdx     # 0xf5a70
leaq 0x2c0f9(%rip), %rcx     # 0xf5ab8
leaq 0x2bf9f(%rip), %r8      # 0xf5965
pushq $0x51
jmp 0xc99f2
movq 0x645e7(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x68b(%rip), %rsi       # 0xca066
leaq 0x2c0e5(%rip), %rdx     # 0xf5ac7
leaq 0x2c0cf(%rip), %rcx     # 0xf5ab8
leaq 0x2bf75(%rip), %r8      # 0xf5965
pushq $0x54
popq %r9
xorl %eax, %eax
callq 0xb8c0
callq 0xb300
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/consensus_sa.c
// Function: extract_exons
static void extract_exons(const ConsensusSA *csa, GtArray *exon_ranges,
                          GtUword sa)
{
  gt_assert(csa && exon_ranges && csa->set_of_sas && sa < csa->number_of_sas);
  csa->get_exons(exon_ranges, (char*) csa->set_of_sas + csa->size_of_sa * sa);
  gt_assert(gt_array_size(exon_ranges));
  gt_assert(gt_ranges_are_sorted_and_do_not_overlap(exon_ranges));
}

// Assembly:
pushq %rbx
testq %rsi, %rsi
je 0xc9a43
movq %rsi, %rbx
movq %rdi, %rax
movq (%rdi), %rsi
testq %rsi, %rsi
je 0xc9a43
cmpq %rdx, 0x8(%rax)
jbe 0xc9a43
imulq 0x10(%rax), %rdx
addq %rdx, %rsi
movq %rbx, %rdi
callq *0x28(%rax)
movq %rbx, %rdi
callq 0x4b988
testq %rax, %rax
je 0xc9a6d
movq %rbx, %rdi
callq 0x5dd6d
testb %al, %al
je 0xc9a97
popq %rbx
retq
movq 0x6456e(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x612(%rip), %rsi       # 0xca066
leaq 0x2c0a7(%rip), %rdx     # 0xf5b02
leaq 0x2c0e1(%rip), %rcx     # 0xf5b43
leaq 0x2befc(%rip), %r8      # 0xf5965
pushq $0x5b
jmp 0xc9abf
movq 0x64544(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x5e8(%rip), %rsi       # 0xca066
leaq 0x2ac7e(%rip), %rdx     # 0xf4703
leaq 0x2c0b7(%rip), %rcx     # 0xf5b43
leaq 0x2bed2(%rip), %r8      # 0xf5965
pushq $0x5d
jmp 0xc9abf
movq 0x6451a(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x5be(%rip), %rsi       # 0xca066
leaq 0x2ac6f(%rip), %rdx     # 0xf471e
leaq 0x2c08d(%rip), %rcx     # 0xf5b43
leaq 0x2bea8(%rip), %r8      # 0xf5965
pushq $0x5e
popq %r9
xorl %eax, %eax
callq 0xb8c0
callq 0xb300
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/consensus_sa.c
// Function: compute_left_or_right
static void compute_left_or_right(GtBittab **left_or_right,
                                  const ConsensusSA *csa,
                                  bool (*cmp_func) (const ConsensusSA *csa,
                                                    GtUword sa_1,
                                                    GtUword sa_2))
{
  GtUword sa, sa_1;
  gt_assert(csa && left_or_right && *left_or_right);
  for (sa = 0; sa < csa->number_of_sas; sa++) {
    for (sa_1 = 0; sa_1 < csa->number_of_sas; sa_1++) {
      if (cmp_func(csa, sa, sa_1) && compatible(csa, sa, sa_1))
        gt_bittab_set_bit(left_or_right[sa], sa_1);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0xc9bf2
movq %rdi, %r15
cmpq $0x0, (%rdi)
je 0xc9bf2
movq %rdx, %rbx
movq %rsi, %r14
movq 0x8(%rsi), %rax
xorl %r12d, %r12d
cmpq %rax, %r12
jae 0xc9be8
xorl %r13d, %r13d
cmpq %rax, %r13
jae 0xc9be3
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *%rbx
testb %al, %al
je 0xc9bda
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xc96aa
testb %al, %al
je 0xc9bda
movq (%r15,%r12,8), %rdi
movq %r13, %rsi
callq 0x4d737
incq %r13
movq 0x8(%r14), %rax
jmp 0xc9ba8
incq %r12
jmp 0xc9ba0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x643bf(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x463(%rip), %rsi       # 0xca066
leaq 0x2bf83(%rip), %rdx     # 0xf5b8d
leaq 0x2bfa3(%rip), %rcx     # 0xf5bb4
leaq 0x2bd4d(%rip), %r8      # 0xf5965
movl $0x12e, %r9d            # imm = 0x12E
xorl %eax, %eax
callq 0xb8c0
callq 0xb300
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/consensus_sa.c
// Function: is_right_of
static bool is_right_of(const ConsensusSA *csa,
                        GtUword sa_1, GtUword sa_2)
{
  GtRange range_sa_1, range_sa_2;
  gt_assert(csa);
  range_sa_1 = extract_genomic_range(csa, sa_1);
  range_sa_2 = extract_genomic_range(csa, sa_2);
  if (range_sa_1.start  > range_sa_2.start && range_sa_1.end > range_sa_2.end)
    return true;
  return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xc9c6d
movq %rdx, %rbx
movq %rdi, %r14
callq 0xc9657
movq %rax, %r15
movq %rdx, %r12
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc9657
cmpq %rax, %r15
seta %cl
cmpq %rdx, %r12
seta %al
andb %cl, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x64344(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3e8(%rip), %rsi       # 0xca066
leaq 0x2a8f2(%rip), %rdx     # 0xf4577
leaq 0x2bf3e(%rip), %rcx     # 0xf5bca
leaq 0x2bcd2(%rip), %r8      # 0xf5965
movl $0x13b, %r9d            # imm = 0x13B
xorl %eax, %eax
callq 0xb8c0
callq 0xb300
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test-regidx.c
// Function: custom_parse
int custom_parse(const char *line, char **chr_beg, char **chr_end, hts_pos_t *beg, hts_pos_t *end, void *payload, void *usr)
{
    // Use the standard parser for CHROM,FROM,TO
    int i, ret = regidx_parse_tab(line,chr_beg,chr_end,beg,end,NULL,NULL);
    if ( ret!=0 ) return ret;

    // Skip the fields that were parsed above
    char *ss = (char*) line;
    while ( *ss && isspace_c(*ss) ) ss++;
    for (i=0; i<3; i++)
    {
        while ( *ss && !isspace_c(*ss) ) ss++;
        if ( !*ss ) return -2;  // wrong number of fields
        while ( *ss && isspace_c(*ss) ) ss++;
    }
    if ( !*ss ) return -2;

    // Parse the payload
    char *se = ss;
    while ( *se && !isspace_c(*se) ) se++;
    char **dat = (char**) payload;
    *dat = (char*) malloc(se-ss+1);
    memcpy(*dat,ss,se-ss+1);
    (*dat)[se-ss] = 0;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r9, %rbx
movq %rdi, %r14
andq $0x0, (%rsp)
xorl %r9d, %r9d
callq 0x860e
movl %eax, %ebp
testl %eax, %eax
je 0x5b00
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movsbl %r12b, %edi
callq 0x5b9a
testl %eax, %eax
je 0x5b08
incq %r14
movb (%r14), %r12b
testb %r12b, %r12b
jne 0x5af0
xorl %r15d, %r15d
pushq $-0x2
popq %rbp
cmpl $0x3, %r15d
je 0x5b4d
testb %r12b, %r12b
je 0x5ae1
movsbl %r12b, %edi
callq 0x5b9a
testl %eax, %eax
jne 0x5b36
movb 0x1(%r14), %r12b
incq %r14
jmp 0x5b14
movb 0x1(%r14), %r12b
incq %r14
testb %r12b, %r12b
je 0x5b48
movsbl %r12b, %edi
callq 0x5b9a
testl %eax, %eax
jne 0x5b2f
incl %r15d
jmp 0x5b0e
testb %r12b, %r12b
je 0x5ae1
pushq $0x1
popq %r15
testb %r12b, %r12b
je 0x5b71
movsbl %r12b, %edi
callq 0x5b9a
testl %eax, %eax
jne 0x5b71
movb (%r14,%r15), %r12b
incq %r15
jmp 0x5b56
movq %r15, %rdi
callq 0x4690
movq %rax, %r12
movq %rax, (%rbx)
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x43c0
movb $0x0, -0x1(%r12,%r15)
xorl %ebp, %ebp
jmp 0x5ae1
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/asm.c
// Function: asm_store_field
void asm_store_field(Address address, unsigned L, unsigned R, Cell cell)
{
    // assert(address < memory_size);
    if (VERBOSE) {
        char temp[16];
        unparse_cell(temp, cell, false);
        printf("%s(%u,%u): %s\n", address_to_string(address), L, R, temp);
    }
    memory_store(address, set_field(cell, make_field_spec(L, R), memory_fetch(address)));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r15d
movl %edi, %ebx
leaq 0xd898(%rip), %rax      # 0x10ce0
cmpl $0x0, (%rax)
je 0x347d
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x382d
movl %ebx, %edi
callq 0x3d81
leaq 0x5bef(%rip), %rdi      # 0x905a
movq %rax, %rsi
movl %r15d, %edx
movl %ebp, %ecx
movq %r12, %r8
xorl %eax, %eax
callq 0x3120
movl %r15d, %edi
movl %ebp, %esi
callq 0x3610
movl %eax, %ebp
movl %ebx, %edi
callq 0x688b
movq %r14, %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x3685
movl %ebx, %edi
movq %rax, %rsi
callq 0x6909
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/asm.c
// Function: assemble
void assemble(Cell cell)
{
    if (VERBOSE) {
        char temp[16];
        unparse_cell(temp, cell, true);
        printf("%s: %s  %s\n", address_to_string(here), temp, current_line);
    }
    // if (here < memory_size)
    //	memory[here] = cell;
    // else
	//  error("Address out of range");
	memory_store(here, cell);
    ++here;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0xd81b(%rip), %rax      # 0x10ce0
cmpl $0x0, (%rax)
je 0x3501
movq %rsp, %r14
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x382d
movl 0xc253(%rip), %edi      # 0xf734
callq 0x3d81
leaq 0x5b7c(%rip), %rdi      # 0x9069
leaq 0xc67c(%rip), %rcx      # 0xfb70
movq %rax, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3120
movl 0xc22d(%rip), %edi      # 0xf734
movq %rbx, %rsi
callq 0x6909
incl 0xc21f(%rip)            # 0xf734
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/cell.c
// Function: field
Cell field(Byte F, Cell cell)
{
    if (bad_field[F])
        error("Bad field spec: %02o", F);
    if (F < 8)      /* if F is of the form (0:R), retain the sign of -cell- */
        return ((cell & mask[F]) >> shift[F]) | sign_bit(cell);
    else
        return (cell & mask[F]) >> shift[F];
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
movl %edi, %r14d
leaq 0xc17a(%rip), %rax      # 0xf740
cmpl $0x0, (%rax,%r14,4)
je 0x35dd
leaq 0x5b4a(%rip), %rdi      # 0x911e
movl %ebp, %esi
xorl %eax, %eax
callq 0x5700
leaq 0xc25c(%rip), %rax      # 0xf840
movq (%rax,%r14,8), %rdx
andq %rbx, %rdx
leaq 0xc44e(%rip), %rax      # 0xfa40
movb (%rax,%r14,4), %cl
sarq %cl, %rdx
andl $0x40000000, %ebx       # imm = 0x40000000
xorl %eax, %eax
cmpl $0x8, %ebp
cmovbq %rbx, %rax
orq %rdx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/cell.c
// Function: set_field
Cell set_field(Cell value, Byte F, Cell into)
{
    long m = mask[F];
    if (bad_field[F])
        error("Bad field spec: %02o", F);
    if (F < 8)      /* if F is of the form (0:R), use the sign of -value- */
        return (into & ~m & ~the_sign_bit) | ((value << shift[F]) & m) | sign_bit(value);
    else
        return (into & ~m) | ((value << shift[F]) & m);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, %r12d
leaq 0xc1a1(%rip), %rax      # 0xf840
movq (%rax,%r12,8), %r15
leaq 0xc096(%rip), %rax      # 0xf740
cmpl $0x0, (%rax,%r12,4)
je 0x36c1
leaq 0x5a66(%rip), %rdi      # 0x911e
movl %ebp, %esi
xorl %eax, %eax
callq 0x5700
movq %r15, %rax
notq %rax
cmpl $0x7, %ebp
ja 0x36f5
andq %rax, %r14
andq $-0x40000001, %r14      # imm = 0xBFFFFFFF
leaq 0xc363(%rip), %rax      # 0xfa40
movb (%rax,%r12,4), %cl
movq %rbx, %rax
shlq %cl, %rax
andq %r15, %rax
andl $0x40000000, %ebx       # imm = 0x40000000
orq %r14, %rbx
jmp 0x3709
leaq 0xc344(%rip), %rcx      # 0xfa40
movb (%rcx,%r12,4), %cl
shlq %cl, %rbx
andq %r14, %rax
andq %r15, %rbx
orq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/cell.c
// Function: precompute_field_data
void precompute_field_data(void)
{
    unsigned L, R;
    for (L = 0; L < 8; ++L)
        for (R = 0; R < 8; ++R) {
            unsigned F = 8 * L + R;
            bad_field[F] = R < L || 5 < R;
            if (bad_field[F])
                shift[F] = 0, mask[F] = 0;
            else {
                unsigned width = R - (L == 0 ? 1 : L) + 1;
                shift[F] = 6 * (5 - R);
                mask[F] = ((1L << (6 * width)) - 1) << shift[F];
            } 
        }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
leaq 0xc31b(%rip), %rsi      # 0xfa40
leaq 0xc114(%rip), %rdi      # 0xf840
leaq 0xc00d(%rip), %r8       # 0xf740
xorl %r9d, %r9d
movabsq $0x6, %r10
movabsq $0x1e, %r11
movabsq $-0x1, %rbx
cmpq $0x1, %r9
movq %r9, %rax
adcq $0x0, %rax
cmpq $0x8, %r9
je 0x37da
imulq $0x6, %rax, %rcx
movq %r10, %rax
subq %rcx, %rax
movq %r11, %rdx
xorl %r14d, %r14d
cmpq $0x8, %r14
je 0x37c6
cmpq %r9, %r14
setb %cl
cmpq $0x6, %r14
setae %bpl
orb %cl, %bpl
movzbl %bpl, %ecx
movl %ecx, (%r8,%r14,4)
testb %cl, %cl
je 0x379f
xorl %ecx, %ecx
xorl %r15d, %r15d
jmp 0x37b1
movq %rbx, %r15
movl %eax, %ecx
shlq %cl, %r15
notq %r15
movl %edx, %ecx
shlq %cl, %r15
movl %edx, %ecx
movl %ecx, (%rsi,%r14,4)
movq %r15, (%rdi,%r14,8)
incq %r14
addq $0x6, %rax
addq $-0x6, %rdx
jmp 0x3775
incq %r9
addq $0x20, %rsi
addq $0x40, %rdi
addq $0x20, %r8
jmp 0x3754
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/cell.c
// Function: assert_valid_field
void assert_valid_field(Cell field_spec)
{
    if (is_negative(field_spec) 
        || 64 <= magnitude(field_spec)
        || bad_field[(unsigned)magnitude(field_spec)])
    {
        char buffer[16];
        unparse_cell(buffer, field_spec, false);
        error("Invalid field specifier: %s", buffer);
    }
}

// Assembly:
movq %rdi, %rsi
btl $0x1e, %esi
jb 0x3804
movl %esi, %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cmpq $0x3f, %rax
ja 0x3804
leaq 0xbf42(%rip), %rcx      # 0xf740
cmpl $0x0, (%rcx,%rax,4)
je 0x382c
pushq %rbx
subq $0x10, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x382d
leaq 0x5955(%rip), %rdi      # 0x9172
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5700
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/cell.c
// Function: unparse_cell
void unparse_cell(char *buffer, Cell cell, Flag disasm)
{
    Byte I, F, C;
    Cell A;

    if (disasm) {
        destructure_cell (cell, A, I, F, C);
        sprintf(buffer, "%s%04lo %02o %02o %02o",
                is_negative (A) ? "-" : "+", magnitude (A),
                I, F, C);
    } else
        sprintf(buffer, "%s%010lo",
                is_negative (cell) ? "-" : "+", magnitude (cell));
}

// Assembly:
movq %rsi, %rax
testl %edx, %edx
je 0x3884
pushq %rax
movl %eax, %esi
andl $0x3f, %esi
movl %eax, %r9d
shrl $0x6, %r9d
andl $0x3f, %r9d
movl %eax, %r8d
shrl $0xc, %r8d
andl $0x3f, %r8d
movl %eax, %ecx
shrl $0x12, %ecx
andl $0xfff, %ecx            # imm = 0xFFF
btl $0x1e, %eax
leaq 0x5966(%rip), %rax      # 0x91cc
leaq 0x5ae4(%rip), %rdx      # 0x9351
cmovaeq %rax, %rdx
movl %esi, (%rsp)
leaq 0x593a(%rip), %rsi      # 0x91b5
xorl %eax, %eax
callq 0x3280
popq %rax
retq
btl $0x1e, %eax
leaq 0x593d(%rip), %rcx      # 0x91cc
leaq 0x5abb(%rip), %rdx      # 0x9351
cmovaeq %rcx, %rdx
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
leaq 0x5928(%rip), %rsi      # 0x91ce
movq %rax, %rcx
xorl %eax, %eax
jmp 0x3280
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/cell.c
// Function: add
Cell add(Cell x, Cell y)
{   /* This is kinda clumsy. Should I combine code at the cost (?) of speed */
    /* and functional style? */
    if (sign_bit(x) == sign_bit(y)) {
        long sum = magnitude(x) + magnitude(y);
        long magnitude_of_sum = magnitude(sum);
        if (magnitude_of_sum != sum) overflow = true;
        return sign_bit(x) | magnitude_of_sum;
    } else {
        long diff = magnitude(x) - magnitude(y);
        return diff < 0 ? sign_bit (y) | -diff : sign_bit (x) | diff;
    }
}

// Assembly:
movl $0x40000000, %eax       # imm = 0x40000000
movq %rdi, %rcx
andq %rax, %rcx
andq %rsi, %rax
movl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
andq %rdx, %rdi
andq %rdx, %rsi
cmpq %rax, %rcx
jne 0x38ef
addq %rdi, %rsi
movl %esi, %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cmpq $0x40000000, %rsi       # imm = 0x40000000
jb 0x38eb
movl $0x1, 0xc255(%rip)      # 0xfb40
orq %rcx, %rax
retq
subq %rsi, %rdi
movq %rdi, %rdx
negq %rdx
orq %rdx, %rax
orq %rdi, %rcx
testq %rdi, %rdi
cmovsq %rax, %rcx
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/cell.c
// Function: multiply
void multiply(Cell x, Cell y, Cell *high_word, Cell *low_word)
{
    unsigned long sign = sign_bit(x) ^ sign_bit(y);

    /*
       x = x0 + x1 * 2 ^ 10 + x2 * 2 ^ 20
       y = y0 + y1 * 2 ^ 10 + y2 * 2 ^ 20
       x0, x1, x2, y0, y1, y2 are < 2 ^ 10
    */
    unsigned long x0 = (x & 0x000003FF);
    unsigned long x1 = (x & 0x000FFC00) >> 10;
    unsigned long x2 = (x & 0x3FF00000) >> 20;
    unsigned long y0 = (y & 0x000003FF);
    unsigned long y1 = (y & 0x000FFC00) >> 10;
    unsigned long y2 = (y & 0x3FF00000) >> 20;

    /*
       x * y = partial0 +
               partial1 * 2 ^ 10 +
               partial2 * 2 ^ 20 +
               partial3 * 2 ^ 30 +
               partial4 * 2 ^ 40
       partial0 and partial4 are <     2 ^ 20
       partial1 and partial3 are <     2 ^ 21
       partial2 is               < 3 * 2 ^ 20
    */
    unsigned long partial0 = x0 * y0;
    unsigned long partial1 = x0 * y1 + x1 * y0;
    unsigned long partial2 = x0 * y2 + x1 * y1 + x2 * y0;
    unsigned long partial3 = x1 * y2 + x2 * y1;
    unsigned long partial4 = x2 * y2;

    /*  sum1 has a place value of 1 and is < 2 ^ 32 */
    unsigned long sum1   = partial0 + (partial1 << 10);
    unsigned long carry1 = (sum1 & 0xFFF00000) >> 20;

    /* sum2 has a place value of 2 ^ 20 and is < 2 ^ 32 */
    unsigned long sum2   = partial2 + (partial3 << 10) + carry1;
    unsigned long carry2 = (sum2 & 0xFFF00000) >> 20;

    /* sum3 has a place value of 2 ^ 40 and is < 2 ^ 20 */
    unsigned long sum3   = partial4 + carry2;

    sum1 &= ~0xFFF00000;
    sum2 &= ~0xFFF00000;

    /*
       Now paste the three values back into two.
    */
    *low_word   = sum1 | ((sum2 & 0x000003FF) << 20);
    *low_word  |= sign;
    *high_word  = ((sum2 & 0x000FFC00) >> 10) | (sum3 << 10);
    *high_word |= sign;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %eax
xorl %edi, %eax
andl $0x40000000, %eax       # imm = 0x40000000
movl $0x3ff, %r9d            # imm = 0x3FF
movq %rdi, %r14
andq %r9, %r14
movl %edi, %ebx
shrl $0xa, %ebx
movl $0x3ff, %r8d            # imm = 0x3FF
andl %r8d, %ebx
shrl $0x14, %edi
andl %r8d, %edi
movq %rsi, %r10
andq %r9, %r10
movl %esi, %r9d
shrl $0xa, %r9d
andl %r8d, %r9d
movq %r9, %r15
imulq %rbx, %r15
shrl $0x14, %esi
andl %r8d, %esi
movq %r10, %r12
imulq %r14, %r12
movl %r14d, %ebp
imull %r9d, %ebp
movl %r10d, %r11d
imull %ebx, %r11d
addl %ebp, %r11d
imulq %rsi, %r14
imulq %rdi, %r10
addq %r15, %r10
addq %r14, %r10
movl %esi, %ebp
imull %ebx, %ebp
imull %edi, %r9d
addl %ebp, %r9d
imulq %rdi, %rsi
shll $0xa, %r11d
addq %r12, %r11
movl %r11d, %edi
shrl $0x14, %edi
shll $0xa, %r9d
addq %r10, %r9
addq %rdi, %r9
movq %r9, %rdi
shrq $0x14, %rdi
addq %rsi, %rdi
andl $0xfffff, %r11d         # imm = 0xFFFFF
movl %r9d, %esi
shll $0x14, %esi
andl $0x3ff00000, %esi       # imm = 0x3FF00000
orq %r11, %rsi
orq %rax, %rsi
movq %rsi, (%rcx)
shrl $0xa, %r9d
andl %r8d, %r9d
shlq $0xa, %rdi
orq %r9, %rdi
orq %rax, %rdi
movq %rdi, (%rdx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/cell.c
// Function: divide
void divide(Cell n1, Cell n0, Cell d, Cell *quotient, Cell *remainder)
{
    long magn1 = magnitude(n1);
    long magd = magnitude(d);
    if (magd == 0) {
        overflow = true;
        *quotient = *remainder = zero;  /* just so they have -some- valid value */
    } else if (magn1 == 0) {    /* special-cased for speed */
        *quotient = (sign_bit(n1) ^ sign_bit(d)) | (magnitude(n0) / magd);
        *remainder = sign_bit(n1) | (magnitude(n0) % magd);
    } else if (magd <= magn1) {
        overflow = true;
        *quotient = *remainder = zero;
    } else {
        long q = magnitude(n0);
        long r = magn1;
        unsigned i;
        for (i = 30; i != 0; --i) {
            r <<= 1;
            if (q & (1L << 29))
                ++r;
            q = (q << 1) & ((1L << 30) - 1);
            if (magd <= r)
                ++q, r -= magd;
        }
        *quotient = (sign_bit(n1) ^ sign_bit(d)) | q;
        *remainder = sign_bit(n1) | r;
    }
}

// Assembly:
movl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movq %rdx, %r10
andq %rax, %r10
je 0x3a7f
movq %rdx, %r9
andq %rdi, %rax
je 0x3a92
cmpl %eax, %r10d
jbe 0x3a7f
andl $0x3fffffff, %esi       # imm = 0x3FFFFFFF
pushq $-0x1e
popq %rdx
testl %edx, %edx
je 0x3abe
movl %esi, %r11d
shrl $0x1d, %r11d
andl $0x1, %r11d
leaq (%r11,%rax,2), %rax
andl $0x1fffffff, %esi       # imm = 0x1FFFFFFF
xorl %r11d, %r11d
cmpq %rax, %r10
setle %r11b
leaq (%r11,%rsi,2), %rsi
movl $0x0, %r11d
cmovleq %r10, %r11
subq %r11, %rax
incl %edx
jmp 0x3a47
movl $0x1, 0xc0b7(%rip)      # 0xfb40
andq $0x0, (%r8)
andq $0x0, (%rcx)
retq
andl $0x3fffffff, %esi       # imm = 0x3FFFFFFF
movl %esi, %eax
xorl %edx, %edx
divl %r10d
movl %edi, %esi
andl $0x40000000, %esi       # imm = 0x40000000
xorl %edi, %r9d
andl $0x40000000, %r9d       # imm = 0x40000000
orl %r9d, %eax
movq %rax, (%rcx)
orq %rsi, %rdx
movq %rdx, (%r8)
retq
movl %edi, %edx
andl $0x40000000, %edx       # imm = 0x40000000
xorl %edi, %r9d
andl $0x40000000, %r9d       # imm = 0x40000000
orq %r9, %rsi
movq %rsi, (%rcx)
orq %rdx, %rax
movq %rax, (%r8)
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/cell.c
// Function: shift_right
void shift_right(Cell A, Cell X, unsigned long count, Cell *pA, Cell *pX)
{
    *pX = sign_bit(X);
    *pA = sign_bit(A);
    if (count < 5) {
        *pA |= magnitude(A) >> (6 * count);
        *pX |= CELL_MAX & ((magnitude(X) >> (6 * count))
            | (A << (30 - 6 * count)));
    } else if (count < 10)
        *pX |= magnitude(A) >> (6 * count - 30);
    else
        ;
}

// Assembly:
movq %rcx, %rax
movl $0x40000000, %r9d       # imm = 0x40000000
movq %rsi, %rcx
andq %r9, %rcx
movq %rcx, (%r8)
andq %rdi, %r9
movq %r9, (%rax)
cmpq $0x4, %rdx
ja 0x3b89
movl $0x3fffffff, %r10d      # imm = 0x3FFFFFFF
movq %rdi, %r11
andq %r10, %r11
imull $0x6, %edx, %ecx
shrq %cl, %r11
andq %r10, %rsi
shrq %cl, %rsi
orq %r9, %r11
movq %r11, (%rax)
movb $0x1e, %al
subb %cl, %al
movl %eax, %ecx
shlq %cl, %rdi
andq %r10, %rdi
orq %rsi, %rdi
jmp 0x3b9e
cmpq $0x9, %rdx
ja 0x3ba4
andl $0x3fffffff, %edi       # imm = 0x3FFFFFFF
imull $0x6, %edx, %ecx
addb $-0x1e, %cl
shrq %cl, %rdi
orq (%r8), %rdi
movq %rdi, (%r8)
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/cell.c
// Function: shift_left
void shift_left(Cell A, Cell X, unsigned long count, Cell *pA, Cell *pX)
{
    *pX = sign_bit(X);
    *pA = sign_bit(A);
    if (count < 5) {
        *pX |= CELL_MAX & (X << (6 * count));
        *pA |= CELL_MAX & ((A << (6 * count))
            | (magnitude(X) >> (30 - 6 * count)));
    } else if (count < 10)
        *pA |= CELL_MAX & (X << (6 * count - 30));
    else
        ;
}

// Assembly:
movq %rcx, %rax
movl $0x40000000, %r9d       # imm = 0x40000000
movq %rsi, %rcx
andq %r9, %rcx
movq %rcx, (%r8)
andq %rdi, %r9
movq %r9, (%rax)
cmpq $0x4, %rdx
ja 0x3bf2
imull $0x6, %edx, %ecx
movq %rsi, %rdx
shlq %cl, %rdx
movl $0x3fffffff, %r9d       # imm = 0x3FFFFFFF
andq %r9, %rdx
orq %rdx, (%r8)
shlq %cl, %rdi
andq %r9, %rsi
movb $0x1e, %dl
subb %cl, %dl
movl %edx, %ecx
shrq %cl, %rsi
andq %r9, %rdi
orq %rsi, %rdi
orq (%rax), %rdi
jmp 0x3c0d
cmpq $0x9, %rdx
ja 0x3c10
imull $0x6, %edx, %ecx
addb $-0x1e, %cl
shlq %cl, %rsi
andl $0x3fffffff, %esi       # imm = 0x3FFFFFFF
orq %r9, %rsi
movq %rsi, %rdi
movq %rdi, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/cell.c
// Function: shift_right_binary
void shift_right_binary(Cell A, Cell X, unsigned long count, Cell *pA, Cell *pX)
{
    *pX = sign_bit(X);
    *pA = sign_bit(A);
    if (count < 30) {
        *pA |= magnitude(A) >> count;
        *pX |= CELL_MAX & ((magnitude(X) >> count)
            | (A << (30 - count)));
    } else if (count < 60)
        *pX |= magnitude(A) >> (count - 30);
    else
        ;
}

// Assembly:
movq %rcx, %rax
movq %rdx, %rcx
movl $0x40000000, %edx       # imm = 0x40000000
movq %rsi, %r9
andq %rdx, %r9
movq %r9, (%r8)
andq %rdi, %rdx
movq %rdx, (%rax)
cmpq $0x1d, %rcx
ja 0x3c5d
movl $0x3fffffff, %r9d       # imm = 0x3FFFFFFF
movq %rdi, %r10
andq %r9, %r10
shrq %cl, %r10
andq %r9, %rsi
shrq %cl, %rsi
orq %rdx, %r10
movq %r10, (%rax)
movb $0x1e, %al
subb %cl, %al
movl %eax, %ecx
shlq %cl, %rdi
andq %r9, %rdi
orq %rsi, %rdi
jmp 0x3c6f
cmpq $0x3b, %rcx
ja 0x3c75
andl $0x3fffffff, %edi       # imm = 0x3FFFFFFF
addb $-0x1e, %cl
shrq %cl, %rdi
orq (%r8), %rdi
movq %rdi, (%r8)
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/cell.c
// Function: shift_left_binary
void shift_left_binary(Cell A, Cell X, unsigned long count, Cell *pA, Cell *pX)
{
    *pX = sign_bit(X);
    *pA = sign_bit(A);
    if (count < 30) {
        *pX |= CELL_MAX & (X << count);
        *pA |= CELL_MAX & ((A << count)
            | (magnitude(X) >> (30 - count)));
    } else if (count < 60)
        *pA |= CELL_MAX & (X << (count - 30));
    else
        ;
}

// Assembly:
movq %rcx, %rax
movq %rdx, %rcx
movl $0x40000000, %edx       # imm = 0x40000000
movq %rsi, %r9
andq %rdx, %r9
movq %r9, (%r8)
andq %rdi, %rdx
movq %rdx, (%rax)
cmpq $0x1d, %rcx
ja 0x3cc2
movq %rsi, %rdx
shlq %cl, %rdx
movl $0x3fffffff, %r9d       # imm = 0x3FFFFFFF
andq %r9, %rdx
orq %rdx, (%r8)
shlq %cl, %rdi
andq %r9, %rsi
movb $0x1e, %dl
subb %cl, %dl
movl %edx, %ecx
shrq %cl, %rsi
andq %r9, %rdi
orq %rsi, %rdi
orq (%rax), %rdi
jmp 0x3cda
cmpq $0x3b, %rcx
ja 0x3cdd
addb $-0x1e, %cl
shlq %cl, %rsi
andl $0x3fffffff, %esi       # imm = 0x3FFFFFFF
orq %rdx, %rsi
movq %rsi, %rdi
movq %rdi, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/cell.c
// Function: shift_left_circular
void shift_left_circular(Cell A, Cell X, unsigned count, Cell *pA, Cell *pX)
{
    Cell A1 = count < 5 ? A : X;
    Cell X1 = count < 5 ? X : A;
    unsigned c = 6 * (count < 5 ? count : count - 5);
    *pX = sign_bit(X)
        | (CELL_MAX & ((X1 << c) | (magnitude(A1) >> (30 - c))));
    *pA = sign_bit(A)
        | (CELL_MAX & ((A1 << c) | (magnitude(X1) >> (30 - c))));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0x40000000, %r11d      # imm = 0x40000000
movq %rsi, %rbx
andq %r11, %rbx
movl %edx, %r9d
subl $0x5, %r9d
movq %rdi, %r10
cmovbq %rsi, %r10
cmovbq %rdi, %rsi
cmovbl %edx, %r9d
movq %rcx, %rax
imull $0x6, %r9d, %edx
movq %r10, %r14
movl %edx, %ecx
shlq %cl, %r14
movl $0x3fffffff, %r15d      # imm = 0x3FFFFFFF
movq %rsi, %r12
andq %r15, %r12
movb $0x1e, %r9b
subb %dl, %r9b
movl %r9d, %ecx
shrq %cl, %r12
orq %rbx, %r12
andq %r15, %r14
orq %r12, %r14
movq %r14, (%r8)
andq %r11, %rdi
movl %edx, %ecx
shlq %cl, %rsi
andq %r15, %r10
movl %r9d, %ecx
shrq %cl, %r10
orq %rdi, %r10
andq %r15, %rsi
orq %r10, %rsi
movq %rsi, (%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/cell.c
// Function: cell_to_address
Address cell_to_address(Cell cell)
{
    if ((sign_bit(cell) != 0 && magnitude(cell) != 0)
       || memory_size <= magnitude(cell))
    {
        char buffer[16];
        unparse_cell(buffer, cell, false);
        error("Value is not an address: %s", buffer);
        return 0;
    }
    return (Address) magnitude(cell);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rsi
movl %esi, %eax
shrl $0x1e, %eax
movq %rdi, %rbx
andq $0x3fffffff, %rbx       # imm = 0x3FFFFFFF
setne %cl
testb %cl, %al
jne 0x3e44
leaq 0xcf78(%rip), %rax      # 0x10db4
movslq (%rax), %rax
cmpq %rax, %rbx
jl 0x3e64
movq %rsp, %r14
xorl %ebx, %ebx
movq %r14, %rdi
xorl %edx, %edx
callq 0x382d
leaq 0x537d(%rip), %rdi      # 0x91d7
movq %r14, %rsi
xorl %eax, %eax
callq 0x5700
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/charset.c
// Function: mix_to_C_char
char mix_to_C_char(Byte mix_char)
{
    assert((unsigned)mix_char < num_chars);

    if (current_device_type == card_out) {
	/* --- Card punch cannot write characters 20, 21, 48, ... --- */
        if ((mix_char > 48) || (mix_char == 20) || (mix_char == 21))
            return ' ';
    }
    return mix_chars[(unsigned)mix_char];
}

// Assembly:
cmpl $0x40, %edi
jae 0x3f29
leaq 0xbdd0(%rip), %rax      # 0xfcd0
cmpl $0x4, (%rax)
jne 0x3f1c
cmpl $0x31, %edi
setae %al
movl %edi, %ecx
andl $0x3e, %ecx
cmpl $0x14, %ecx
sete %cl
orb %al, %cl
movb $0x20, %al
jne 0x3f28
movl %edi, %eax
leaq 0x534b(%rip), %rcx      # 0x9270
movb (%rax,%rcx), %al
retq
pushq %rax
leaq 0x52d7(%rip), %rdi      # 0x9208
leaq 0x52ef(%rip), %rsi      # 0x9227
leaq 0x52f2(%rip), %rcx      # 0x9231
pushq $0x12
popq %rdx
callq 0x3130
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/charset.c
// Function: C_char_to_mix
Byte C_char_to_mix(char c)
{
    Byte ret;
    const char *s;

    s = strchr(mix_chars, toupper(c));
    if (!s) return 63;
    ret = (Byte) (s - mix_chars);

    /* --- Card reader cannot read, characters 20, 21, 48, ... --- */
    if (current_device_type == card_in) {
        if ((ret > 48) || (ret == 20) || (ret == 21))
            ret = 0;
    }
    return ret;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
callq 0x3030
movq (%rax), %rax
movslq %ebx, %rcx
movl (%rax,%rcx,4), %esi
leaq 0x5311(%rip), %rdi      # 0x9270
pushq $0x41
popq %rdx
callq 0x3180
testq %rax, %rax
je 0x3f9a
leaq 0x52fd(%rip), %rcx      # 0x9270
subl %ecx, %eax
leaq 0xbd54(%rip), %rcx      # 0xfcd0
cmpl $0x3, (%rcx)
jne 0x3f9d
movl %eax, %ecx
andl $-0x2, %ecx
xorl %edx, %edx
cmpl $0x14, %ecx
movl %eax, %ecx
cmovel %edx, %ecx
cmpl $0x31, %eax
cmovael %edx, %ecx
movl %ecx, %eax
jmp 0x3f9d
pushq $0x3f
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/driver.c
// Function: eat_identifier
static void eat_identifier(char *buffer, const_char_ptr *s)
{
    const char *scan = buffer;
    size_t size, truncated_size;

    for (scan = *s; !isspace (*scan) && *scan != '\0'; ++scan)
        ;
    size = scan - *s;

    {				/* ensure it's a legal identifier */
	Flag alpha = false, non_alphanum = false;
	for (scan = *s; scan < *s + size; ++scan) {
	    if (isalpha(*scan))
	        alpha = true;
	    else if (!isalnum (*scan))
	        non_alphanum = true;
	}
	if ((!alpha && size != 0) || non_alphanum) {
	    error ("Ill-formed label or mnemonic: %*.*s", size, size, *s);
	    buffer[0] = '\0';
	    *s += size;
	    return;
	}
    }

    if (max_identifier_length < size) {
        warn ("Truncated long label or mnemonic: %*.*s", size, size, *s);
	    truncated_size = max_identifier_length;
    } else
        truncated_size = size;

    memcpy(buffer, *s, truncated_size);
    buffer[truncated_size] = '\0';
    *s += size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r15
callq 0x32d0
movq (%rax), %rax
leaq -0x1(%r15), %rcx
pushq $0x1
popq %r13
movsbq 0x1(%rcx), %rdx
incq %rcx
decq %r13
testq %rdx, %rdx
je 0x42a1
movzwl (%rax,%rdx,2), %edx
andl $0x2000, %edx           # imm = 0x2000
je 0x4285
xorl %esi, %esi
pushq $0x1
popq %rdi
movq %r15, %r8
xorl %edx, %edx
cmpq %rcx, %r8
jae 0x42cf
movsbq (%r8), %r9
movzwl (%rax,%r9,2), %r9d
btl $0xa, %r9d
cmovbl %edi, %esi
testw $0x408, %r9w            # imm = 0x408
cmovel %edi, %edx
incq %r8
jmp 0x42ab
movq %r13, %r12
negq %r12
testl %esi, %esi
sete %al
testq %r13, %r13
setne %cl
testb %al, %cl
jne 0x431f
testl %edx, %edx
jne 0x431f
cmpq $0x21, %r12
jb 0x430c
leaq 0x501a(%rip), %rdi      # 0x930f
movq %r12, %rsi
movq %r12, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x57c3
movq (%rbx), %r15
pushq $0x20
popq %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x31e0
addq %r12, %r14
jmp 0x4336
leaq 0x4fc5(%rip), %rdi      # 0x92eb
movq %r12, %rsi
movq %r12, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x5700
movb $0x0, (%r14)
subq %r13, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/driver.c
// Function: do_equ
static void do_equ(void)
{
    define_symbol(string_to_symbol(label), parse_W());
    if (VERBOSE) {
        Cell cell = symbol_value(string_to_symbol(label));
        printf("          %s%010lo  %s\n",
               is_negative(cell) ? "-" : "+", magnitude(cell),
               current_line);
    }
}

// Assembly:
pushq %rbx
leaq 0xb931(%rip), %rdi      # 0xfc80
callq 0x8104
movq %rax, %rbx
callq 0x621b
movq %rbx, %rdi
movq %rax, %rsi
callq 0x826d
leaq 0xc972(%rip), %rax      # 0x10ce0
cmpl $0x0, (%rax)
je 0x43bb
leaq 0xb906(%rip), %rdi      # 0xfc80
callq 0x8104
movq %rax, %rdi
callq 0x81fc
btl $0x1e, %eax
leaq 0x4e3a(%rip), %rcx      # 0x91cc
leaq 0x4fb8(%rip), %rsi      # 0x9351
cmovaeq %rcx, %rsi
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
leaq 0x50ba(%rip), %rdi      # 0x9463
leaq 0xb7c0(%rip), %rcx      # 0xfb70
movq %rax, %rdx
xorl %eax, %eax
popq %rbx
jmp 0x3120
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/driver.c
// Function: do_end
static void do_end(void)
{
    Address address;

    address = cell_to_address(parse_W());
    set_entry_point(address);
    if (VERBOSE) {
        printf("                %s  %s\n",
                address_to_string(address), current_line);
    }
}

// Assembly:
pushq %rbx
callq 0x621b
movq %rax, %rdi
callq 0x3e15
movl %eax, %ebx
movl %eax, %edi
callq 0x351d
leaq 0xc8b9(%rip), %rax      # 0x10ce0
cmpl $0x0, (%rax)
je 0x444c
movl %ebx, %edi
callq 0x3d81
leaq 0x5011(%rip), %rdi      # 0x944b
leaq 0xb72f(%rip), %rdx      # 0xfb70
movq %rax, %rsi
xorl %eax, %eax
popq %rbx
jmp 0x3120
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/driver.c
// Function: do_orig
static void do_orig(void)
{
    here = cell_to_address(parse_W());
    if (VERBOSE) {
        printf("                %s  %s\n",
                address_to_string(here), current_line);
    }
}

// Assembly:
pushq %rax
callq 0x621b
movq %rax, %rdi
callq 0x3e15
leaq 0xb2d1(%rip), %rcx      # 0xf734
movl %eax, (%rcx)
leaq 0xc874(%rip), %rcx      # 0x10ce0
cmpl $0x0, (%rcx)
je 0x4491
movl %eax, %edi
callq 0x3d81
leaq 0x4fcc(%rip), %rdi      # 0x944b
leaq 0xb6ea(%rip), %rdx      # 0xfb70
movq %rax, %rsi
xorl %eax, %eax
popq %rcx
jmp 0x3120
popq %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/io.c
// Function: do_scheduled_io
void do_scheduled_io(unsigned clocks)
{
    int i;
    Byte device;

    if (dbg > 3) {
        fflush(stdout);
        fprintf(stderr,"do_scheduled_io(%d)\n", clocks);
    }
    for (i = 0; i < clocks; i++) {
        next_scheduled_io = (unsigned) -1;
        for (device = 0; device < num_devices; device++) {
            if (devices[device].busy) {
                devices[device].busy--;
                if (0 == devices[device].busy)
                    do_io(device);
                else if (devices[device].busy < next_scheduled_io)
                    next_scheduled_io = devices[device].busy;
            }
        }
        if (next_scheduled_io == (unsigned) -1)
            next_scheduled_io = 0;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edi, %ebx
xorl %r15d, %r15d
leaq 0xa8cc(%rip), %r12      # 0xf1a8
cmpl %ebx, %r15d
je 0x493a
orl $-0x1, 0xb3d4(%rip)     # 0xfcbc
movq %r12, %r13
xorl %r14d, %r14d
cmpq $0x14, %r14
je 0x4925
movl (%r13), %eax
testl %eax, %eax
je 0x491c
decl %eax
movl %eax, (%r13)
je 0x4914
cmpl 0xb3b2(%rip), %eax      # 0xfcbc
jae 0x491c
movl %eax, 0xb3aa(%rip)      # 0xfcbc
jmp 0x491c
movl %r14d, %edi
callq 0x4944
incq %r14
addq $0x48, %r13
jmp 0x48ee
cmpl $-0x1, 0xb390(%rip)     # 0xfcbc
jne 0x4935
andl $0x0, 0xb387(%rip)      # 0xfcbc
incl %r15d
jmp 0x48dc
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/io.c
// Function: do_io
static void do_io(Byte device)
{
    Cell rX, offset;
    Address buffer;
    Operation operation;

    operation = devices[device].operation;
    rX        = devices[device].rX;
    offset    = devices[device].offset;
    buffer    = devices[device].buffer;

    if (dbg > 1) {
        fflush(stdout);
        fprintf(stderr,"do_io(%s, %d, %s, %s%lo, %ld, %d, @%ld)\n",
                address_to_string(devices[device].pc),
                device, operations[operation],
                is_negative(rX) ? "-" : "", magnitude(rX),
                offset, buffer,
                devices[device].position);
    }

    current_device_type = devices[device].type;
    switch (operation) {
    case control:
        attributes(device)->ioc_handler(device, rX, offset); break;
    case input:
        attributes(device)->in_handler(device, rX, buffer); break;
    case output:
        attributes(device)->out_handler(device, rX, buffer);
        if (current_device_type == printer)
            devices[device].position++;
    }
    
    if (operation != control)
        io_mark_incomplete(buffer,
                           attributes(device)->block_size, 
                           operation == input ? -WRITE : -READ);
        
    if (devices[device].int_request == true)
        devices[device].int_pending = true;

    devices[device].busy = 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %eax
imulq $0x48, %rax, %rcx
leaq 0xa83b(%rip), %r8       # 0xf190
leaq (%r8,%rcx), %r14
movl (%rcx,%r8), %eax
movl 0x20(%rcx,%r8), %ebp
movq 0x28(%rcx,%r8), %rsi
movq 0x30(%rcx,%r8), %rdx
movl 0x38(%rcx,%r8), %ebx
movl %eax, 0xb359(%rip)      # 0xfcd0
testl %ebp, %ebp
je 0x49dd
cmpl $0x2, %ebp
je 0x4998
cmpl $0x1, %ebp
jne 0x49b6
imulq $0x38, %rax, %rax
leaq 0x9c80(%rip), %rcx      # 0xe610
movl %ebx, %edx
callq *0x18(%rax,%rcx)
jmp 0x49b6
imulq $0x38, %rax, %rax
leaq 0x9c6d(%rip), %rcx      # 0xe610
movl %ebx, %edx
callq *0x20(%rax,%rcx)
cmpl $0x5, 0xb320(%rip)      # 0xfcd0
jne 0x49b6
incq 0x10(%r14)
movl (%r14), %eax
imulq $0x38, %rax, %rax
leaq 0x9c4c(%rip), %rcx      # 0xe610
movl 0x14(%rax,%rcx), %esi
cmpl $0x1, %ebp
pushq $0x15
popq %rax
pushq $0x1
popq %rdx
cmovel %eax, %edx
movl %ebx, %edi
callq 0x4e0d
jmp 0x49ec
imulq $0x38, %rax, %rax
leaq 0x9c28(%rip), %rcx      # 0xe610
callq *0x28(%rax,%rcx)
cmpl $0x1, 0x3c(%r14)
jne 0x49fb
movl $0x1, 0x40(%r14)
andl $0x0, 0x18(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/io.c
// Function: io_init
void io_init(void)
{
    Byte i;

    incomplete = malloc(sizeof(int) * memory_size);
    if (!incomplete)
        fatal_error("Out of heap space!");

    control_incomplete = malloc(sizeof(int) * memory_size);
    if (!control_incomplete)
        fatal_error("Out of heap space!");

    for (i = 0; i < num_devices; i++) {
        devices[i].busy = 0;
        devices[i].int_request = false;
        devices[i].int_pending = false;
        devices[i].rewound = devices[i].type == tape ? true : false;
    }
    for (i = 0; i < memory_size; i++) {
        incomplete[i] = -WRITE;
        control_incomplete[i] = -WRITE;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xc37f(%rip), %r14      # 0x10db4
movslq (%r14), %rbx
shlq $0x2, %rbx
movq %rbx, %rdi
callq 0x31f0
movq %rax, 0xb275(%rip)      # 0xfcc0
testq %rax, %rax
jne 0x4a65
leaq 0x4a4f(%rip), %rdi      # 0x94a6
xorl %eax, %eax
callq 0x560c
movslq (%r14), %rbx
shlq $0x2, %rbx
movq %rbx, %rdi
callq 0x31f0
movq %rax, 0xb254(%rip)      # 0xfcc8
testq %rax, %rax
jne 0x4a87
leaq 0x4a26(%rip), %rdi      # 0x94a6
xorl %eax, %eax
callq 0x560c
pushq $0x44
popq %rax
leaq 0xa6ff(%rip), %rcx      # 0xf190
cmpq $0x5e4, %rax            # imm = 0x5E4
je 0x4ab7
andl $0x0, -0x2c(%rax,%rcx)
andq $0x0, -0x8(%rax,%rcx)
xorl %edx, %edx
cmpl $0x2, -0x44(%rax,%rcx)
sete %dl
movl %edx, (%rax,%rcx)
addq $0x48, %rax
jmp 0x4a91
movq 0xb202(%rip), %rax      # 0xfcc0
movq 0xb203(%rip), %rcx      # 0xfcc8
xorl %edx, %edx
pushq $0x15
popq %rsi
movl (%r14), %edi
cmpq %rdi, %rdx
jae 0x4add
movl %esi, (%rax,%rdx,4)
movl %esi, (%rcx,%rdx,4)
incq %rdx
jmp 0x4aca
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/io.c
// Function: io_complete
unsigned io_complete(void)
{
    unsigned clocks = 0;

    while (next_scheduled_io) {
        do_scheduled_io(1);
        clocks++;
        idle_time++;
    }
    return clocks;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
xorl %ebx, %ebx
pushq $0x1
popq %rbp
cmpl $0x0, 0xb1c8(%rip)      # 0xfcbc
je 0x4b08
movl %ebp, %edi
callq 0x48c7
incl %ebx
incq 0xb1aa(%rip)            # 0xfcb0
jmp 0x4aed
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/io.c
// Function: io_shutdown
void io_shutdown(void)
{
    Byte device;

    for (device = 0; device < num_devices; device++) {
        if (devices[device].file) {
            fclose(devices[device].file);
            devices[device].file = NULL;
        }
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
pushq $0x8
popq %rbx
leaq 0xa671(%rip), %r14      # 0xf190
cmpq $0x5a8, %rbx            # imm = 0x5A8
je 0x4b41
movq (%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x4b3b
callq 0x30f0
andq $0x0, (%rbx,%r14)
addq $0x48, %rbx
jmp 0x4b1f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/io.c
// Function: io_incomplete
Flag io_incomplete(Address address, Access access)
{
    Flag ret = false;
    int count;
    
    if (memory_size <= magnitude(address))
        error("Address out of range -- io_incomplete");
        
    count = fetch_incomplete(address);
    if (count == -WRITE)                    /* it is free */
        ret = false;
    else if (access == write_access)        /* either written to, or read from , therefore not writable */
        ret = false;
    else if (access == read_access)         /* if read from, then readable */
        ret = count ? true : false;
    return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
leaq 0xc25d(%rip), %rax      # 0x10db4
movl %edi, %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
cmpl %ecx, (%rax)
jg 0x4b71
leaq 0x494f(%rip), %rdi      # 0x94b9
xorl %eax, %eax
callq 0x5700
movl %ebp, %eax
negl %eax
shlq $0x2, %rax
addq 0xb148(%rip), %rax      # 0xfcc8
movl %ebp, %ecx
shlq $0x2, %rcx
addq 0xb133(%rip), %rcx      # 0xfcc0
testl %ebp, %ebp
cmovsq %rax, %rcx
movl (%rcx), %eax
cmpl $0x15, %eax
setne %cl
testl %ebx, %ebx
sete %dl
testl %eax, %eax
setne %al
andb %cl, %al
andb %dl, %al
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq