LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_strip_symbols_and_comments
unsigned
aiger_strip_symbols_and_comments (aiger * public)
{
  IMPORT_private_FROM (public);
  unsigned res;

  assert (!aiger_error (public));

  res = aiger_delete_comments (public);

  res += aiger_delete_symbols_aux (private,
				   public->inputs,
				   private->size_inputs);
  res += aiger_delete_symbols_aux (private,
				   public->latches,
				   private->size_latches);
  res += aiger_delete_symbols_aux (private,
				   public->outputs,
				   private->size_outputs);
  res += aiger_delete_symbols_aux (private,
				   public->bad, 
				   private->size_bad);
  res += aiger_delete_symbols_aux (private,
				   public->constraints,
				   private->size_constraints);
  res += aiger_delete_symbols_aux (private,
				   public->justice,
				   private->size_justice);
  res += aiger_delete_symbols_aux (private,
				   public->fairness,
				   private->size_fairness);
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpq $0x0, 0xd0(%rdi)
jne 0x46dc
movq %rdi, %rbx
callq 0x1d33
movl %eax, %r14d
movq 0x28(%rbx), %rsi
movl 0x8c(%rbx), %edx
movq %rbx, %rdi
callq 0x46fb
movl %eax, %r15d
addl %r14d, %r15d
movq 0x30(%rbx), %rsi
movl 0x90(%rbx), %edx
movq %rbx, %rdi
callq 0x46fb
movl %eax, %r12d
movq 0x38(%rbx), %rsi
movl 0x94(%rbx), %edx
movq %rbx, %rdi
callq 0x46fb
movl %eax, %r14d
addl %r12d, %r14d
addl %r15d, %r14d
movq 0x40(%rbx), %rsi
movl 0x9c(%rbx), %edx
movq %rbx, %rdi
callq 0x46fb
movl %eax, %r15d
movq 0x48(%rbx), %rsi
movl 0xa0(%rbx), %edx
movq %rbx, %rdi
callq 0x46fb
movl %eax, %r12d
addl %r15d, %r12d
movq 0x50(%rbx), %rsi
movl 0xa4(%rbx), %edx
movq %rbx, %rdi
callq 0x46fb
movl %eax, %r15d
addl %r12d, %r15d
addl %r14d, %r15d
movq 0x58(%rbx), %rsi
movl 0xa8(%rbx), %edx
movq %rbx, %rdi
callq 0x46fb
addl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3c5e(%rip), %rdi      # 0x8341
leaq 0x3c09(%rip), %rsi      # 0x82f3
leaq 0x3fca(%rip), %rcx      # 0x86bb
movl $0x6bb, %edx            # imm = 0x6BB
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_delete_symbols_aux
static unsigned
aiger_delete_symbols_aux (aiger_private * private,
			  aiger_symbol * symbols, unsigned size)
{
  unsigned i, res;

  res = 0;
  for (i = 0; i < size; i++)
    {
      aiger_symbol *s = symbols + i;
      if (!s->name)
	continue;

      aiger_delete_str (private, s->name);
      s->name = 0;
      res++;
    }

  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r12d
shlq $0x5, %r12
xorl %r13d, %r13d
xorl %r15d, %r15d
cmpq %r13, %r12
je 0x4742
movq 0x18(%rbx,%r13), %rsi
testq %rsi, %rsi
je 0x473c
movq %r14, %rdi
callq 0x1d80
andq $0x0, 0x18(%rbx,%r13)
incl %r15d
addq $0x20, %r13
jmp 0x471c
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_write_to_string
int
aiger_write_to_string (aiger * public, aiger_mode mode, char *str, size_t len)
{
  aiger_buffer buffer;
  int res;

  assert (!aiger_error (public));

  buffer.start = str;
  buffer.cursor = str;
  buffer.end = str + len;
  res = aiger_write_generic (public,
			     mode, &buffer, (aiger_put) aiger_string_put);

  if (!res)
    return 0;

  if (aiger_string_put (0, &buffer) == EOF)
    return 0;

  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
cmpq $0x0, 0xd0(%rdi)
jne 0x4bbe
leaq -0x18(%rbp), %rax
movq %rdx, (%rax)
movq %rdx, 0x8(%rax)
addq %rdx, %rcx
movq %rcx, 0x10(%rax)
leaq 0x45(%rip), %rcx        # 0x4bdd
movq %rax, %rdx
callq 0x4754
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x4bb8
movq -0x10(%rbp), %rcx
cmpq -0x8(%rbp), %rcx
je 0x4bb8
movb $0x0, (%rcx)
pushq $0x1
popq %rax
addq $0x20, %rsp
popq %rbp
retq
leaq 0x377c(%rip), %rdi      # 0x8341
leaq 0x3727(%rip), %rsi      # 0x82f3
leaq 0x3b97(%rip), %rcx      # 0x876a
movl $0x70b, %edx            # imm = 0x70B
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_open_and_write_to_file
int
aiger_open_and_write_to_file (aiger * public, const char *file_name)
{
  IMPORT_private_FROM (public);
  int res, pclose_file;
  char *cmd, size_cmd;
  aiger_mode mode;
  FILE *file;

  assert (!aiger_error (public));

  assert (file_name);

  if (aiger_has_suffix (file_name, ".gz"))
    {
      size_cmd = strlen (file_name) + strlen (GZIP);
      NEWN (cmd, size_cmd);
      sprintf (cmd, GZIP, file_name);
      file = popen (cmd, "w");
      DELETEN (cmd, size_cmd);
      pclose_file = 1;
    }
  else
    {
      file = fopen (file_name, "w");
      pclose_file = 0;
    }

  if (!file)
    return 0;

  if (aiger_has_suffix (file_name, ".aag") ||
      aiger_has_suffix (file_name, ".aag.gz"))
    mode = aiger_ascii_mode;
  else
    mode = aiger_binary_mode;

  res = aiger_write_to_file (public, mode, file);

  if (pclose_file)
    pclose (file);
  else
    fclose (file);

  if (!res)
    unlink (file_name);

  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0xd0(%rdi)
jne 0x4d3c
movq %rsi, %rbx
testq %rsi, %rsi
je 0x4d5b
movq %rdi, %r14
leaq 0x3bd9(%rip), %rsi      # 0x880d
movq %rbx, %rdi
callq 0x4d7a
movl %eax, -0x2c(%rbp)
testl %eax, %eax
je 0x4cae
movq %rbx, %rdi
callq 0x10b0
addb $0x18, %al
movsbq %al, %r12
movq 0xb8(%r14), %rdi
movq %r12, %rsi
callq *0xc0(%r14)
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x1100
leaq 0x3b72(%rip), %rsi      # 0x87eb
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1180
leaq 0x41c8(%rip), %rsi      # 0x8e55
movq %r15, %rdi
callq 0x1160
movq %rax, %r13
movq 0xb8(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0xc8(%r14)
jmp 0x4cc0
leaq 0x41a0(%rip), %rsi      # 0x8e55
movq %rbx, %rdi
callq 0x1170
movq %rax, %r13
xorl %r12d, %r12d
testq %r13, %r13
je 0x4d2a
leaq 0x3b35(%rip), %rsi      # 0x8804
movq %rbx, %rdi
callq 0x4d7a
testl %eax, %eax
je 0x4ce0
pushq $0x1
popq %rsi
jmp 0x4cf1
leaq 0x3b22(%rip), %rsi      # 0x8809
movq %rbx, %rdi
callq 0x4d7a
movl %eax, %esi
movq %r14, %rdi
movq %r13, %rdx
callq 0x4b34
movl %eax, %r14d
cmpl $0x0, -0x2c(%rbp)
je 0x4d0f
movq %r13, %rdi
callq 0x10e0
jmp 0x4d17
movq %r13, %rdi
callq 0x10a0
testl %r14d, %r14d
je 0x4d22
pushq $0x1
popq %r12
jmp 0x4d2a
movq %rbx, %rdi
callq 0x1060
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x35fe(%rip), %rdi      # 0x8341
leaq 0x35a9(%rip), %rsi      # 0x82f3
leaq 0x3a58(%rip), %rcx      # 0x87a9
movl $0x72e, %edx            # imm = 0x72E
callq 0x10f0
leaq 0x3a7f(%rip), %rdi      # 0x87e1
leaq 0x358a(%rip), %rsi      # 0x82f3
leaq 0x3a39(%rip), %rcx      # 0x87a9
movl $0x730, %edx            # imm = 0x730
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_open_and_read_from_file
const char *
aiger_open_and_read_from_file (aiger * public, const char *file_name)
{
  IMPORT_private_FROM (public);
  char *cmd, size_cmd;
  const char *res;
  int pclose_file;
  FILE *file;

  assert (!aiger_error (public));

  if (aiger_has_suffix (file_name, ".gz"))
    {
      size_cmd = strlen (file_name) + strlen (GUNZIP);
      NEWN (cmd, size_cmd);
      sprintf (cmd, GUNZIP, file_name);
      file = popen (cmd, "r");
      DELETEN (cmd, size_cmd);
      pclose_file = 1;
    }
  else
    {
      file = fopen (file_name, "rb");
      pclose_file = 0;
    }

  if (!file)
    return aiger_error_s (private, "can not read '%s'", file_name);

  res = aiger_read_from_file (public, file);

  if (pclose_file)
    pclose (file);
  else
    fclose (file);

  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0xd0(%rdi)
jne 0x6161
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x282a(%rip), %rsi      # 0x880d
movq %r14, %rdi
callq 0x4d7a
movl %eax, %r15d
testl %eax, %eax
je 0x6063
movq %r14, %rdi
callq 0x10b0
addb $0x18, %al
movsbq %al, %r12
movq 0xb8(%rbx), %rdi
movq %r12, %rsi
callq *0xc0(%rbx)
movl %r15d, -0x2c(%rbp)
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x1100
leaq 0x2894(%rip), %rsi      # 0x88bf
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1180
leaq 0x2dcd(%rip), %rsi      # 0x8e0c
movq %r15, %rdi
callq 0x1160
movq %rax, %r13
movq 0xb8(%rbx), %rdi
movq %r15, %rsi
movl -0x2c(%rbp), %r15d
movq %r12, %rdx
callq *0xc8(%rbx)
jmp 0x6075
leaq 0x286e(%rip), %rsi      # 0x88d8
movq %r14, %rdi
callq 0x1170
movq %rax, %r13
testq %r13, %r13
je 0x609e
movq %rbx, %rdi
movq %r13, %rsi
callq 0x5f77
movq %rax, %rbx
movq %r13, %rdi
testl %r15d, %r15d
je 0x614a
callq 0x10e0
jmp 0x614f
cmpq $0x0, 0xd0(%rbx)
jne 0x6180
movq %r14, %rdi
callq 0x10b0
leal 0x12(%rax), %r15d
movq 0xb8(%rbx), %rdi
movq %r15, %rsi
callq *0xc0(%rbx)
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1100
leaq 0x27fc(%rip), %rsi      # 0x88db
movq %r12, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1180
movq %r12, %rdi
callq 0x10b0
leal 0x1(%rax), %r14d
movq 0xb8(%rbx), %rdi
movq %r14, %rsi
callq *0xc0(%rbx)
movq %rax, 0xd0(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1100
movq 0xd0(%rbx), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1140
movq 0xb8(%rbx), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0xc8(%rbx)
movq 0xd0(%rbx), %rbx
jmp 0x614f
callq 0x10a0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x21d9(%rip), %rdi      # 0x8341
leaq 0x2184(%rip), %rsi      # 0x82f3
leaq 0x2708(%rip), %rcx      # 0x887e
movl $0xa1d, %edx            # imm = 0xA1D
callq 0x10f0
leaq 0x291c(%rip), %rdi      # 0x8aa3
leaq 0x2165(%rip), %rsi      # 0x82f3
leaq 0x348a(%rip), %rcx      # 0x961f
movl $0x22f, %edx            # imm = 0x22F
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_get_symbol
const char *
aiger_get_symbol (aiger * public, unsigned lit)
{
  IMPORT_private_FROM (public);
  aiger_symbol *symbol;
  aiger_type *type;
  unsigned var;

  assert (!aiger_error (public));

  assert (lit);
  assert (!aiger_sign (lit));

  var = aiger_lit2var (lit);
  assert (var <= public->maxvar);
  type = private->types + var;

  if (type->input)
    symbol = public->inputs;
  else if (type->latch)
    symbol = public->latches;
  else
    return 0;

  return symbol[type->idx].name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, 0xd0(%rdi)
jne 0x61f2
testl %esi, %esi
je 0x6211
testb $0x1, %sil
jne 0x6230
shrl %esi
cmpl (%rdi), %esi
ja 0x624f
movq 0x70(%rdi), %rax
movl %esi, %ecx
movb (%rax,%rcx,8), %dl
testb $0x1, %dl
jne 0x61d8
testb $0x2, %dl
jne 0x61dc
xorl %eax, %eax
jmp 0x61f0
pushq $0x28
jmp 0x61de
pushq $0x30
popq %rdx
movq (%rdi,%rdx), %rdx
movl 0x4(%rax,%rcx,8), %eax
shlq $0x5, %rax
movq 0x18(%rdx,%rax), %rax
popq %rbp
retq
leaq 0x2148(%rip), %rdi      # 0x8341
leaq 0x20f3(%rip), %rsi      # 0x82f3
leaq 0x26e6(%rip), %rcx      # 0x88ed
movl $0xa43, %edx            # imm = 0xA43
callq 0x10f0
leaq 0x220f(%rip), %rdi      # 0x8427
leaq 0x20d4(%rip), %rsi      # 0x82f3
leaq 0x26c7(%rip), %rcx      # 0x88ed
movl $0xa45, %edx            # imm = 0xA45
callq 0x10f0
leaq 0x215a(%rip), %rdi      # 0x8391
leaq 0x20b5(%rip), %rsi      # 0x82f3
leaq 0x26a8(%rip), %rcx      # 0x88ed
movl $0xa46, %edx            # imm = 0xA46
callq 0x10f0
leaq 0x26cb(%rip), %rdi      # 0x8921
leaq 0x2096(%rip), %rsi      # 0x82f3
leaq 0x2689(%rip), %rcx      # 0x88ed
movl $0xa49, %edx            # imm = 0xA49
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_lit2tag
int
aiger_lit2tag (aiger * public, unsigned lit) 
{
  aiger_type * type;
  lit = aiger_strip (lit);
  if (!lit) return 0;
  type = aiger_lit2type (public, lit);
  if (type->input) return 1;
  if (type->latch) return 2;
  return 3;
}

// Assembly:
andl $-0x2, %esi
je 0x6290
pushq %rbp
movq %rsp, %rbp
callq 0x6297
movb (%rax), %cl
testb $0x1, %cl
popq %rbp
jne 0x6293
andb $0x2, %cl
xorl %eax, %eax
cmpb $0x1, %cl
adcl $0x2, %eax
retq
xorl %eax, %eax
retq
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_lit2type
static aiger_type *
aiger_lit2type (aiger * public, unsigned lit)
{
  IMPORT_private_FROM (public);
  aiger_type *type;
  unsigned var;

  assert (!aiger_sign (lit));
  var = aiger_lit2var (lit);
  assert (var <= public->maxvar);
  type = private->types + var;

  return type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testb $0x1, %sil
jne 0x62b3
shrl %esi
cmpl (%rdi), %esi
ja 0x62d2
movl %esi, %eax
shlq $0x3, %rax
addq 0x70(%rdi), %rax
popq %rbp
retq
leaq 0x20d7(%rip), %rdi      # 0x8391
leaq 0x2032(%rip), %rsi      # 0x82f3
leaq 0x339e(%rip), %rcx      # 0x9666
movl $0xa5d, %edx            # imm = 0xA5D
callq 0x10f0
leaq 0x2648(%rip), %rdi      # 0x8921
leaq 0x2013(%rip), %rsi      # 0x82f3
leaq 0x337f(%rip), %rcx      # 0x9666
movl $0xa5f, %edx            # imm = 0xA5F
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_is_input
aiger_symbol *
aiger_is_input (aiger * public, unsigned lit)
{
  aiger_type *type;
  aiger_symbol *res;

  assert (!aiger_error (public));
  type = aiger_lit2type (public, lit);
  if (!type->input)
    return 0;

  res = public->inputs + type->idx;

  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq $0x0, 0xd0(%rdi)
jne 0x6324
movq %rdi, %rbx
callq 0x6297
testb $0x1, (%rax)
jne 0x6312
xorl %eax, %eax
jmp 0x631d
movl 0x4(%rax), %eax
shlq $0x5, %rax
addq 0x28(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x2016(%rip), %rdi      # 0x8341
leaq 0x1fc1(%rip), %rsi      # 0x82f3
leaq 0x25fe(%rip), %rcx      # 0x8937
movl $0xa77, %edx            # imm = 0xA77
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_is_latch
aiger_symbol *
aiger_is_latch (aiger * public, unsigned lit)
{
  aiger_symbol *res;
  aiger_type *type;

  assert (!aiger_error (public));
  type = aiger_lit2type (public, lit);
  if (!type->latch)
    return 0;

  res = public->latches + type->idx;

  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq $0x0, 0xd0(%rdi)
jne 0x6376
movq %rdi, %rbx
callq 0x6297
testb $0x2, (%rax)
jne 0x6364
xorl %eax, %eax
jmp 0x636f
movl 0x4(%rax), %eax
shlq $0x5, %rax
addq 0x30(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1fc4(%rip), %rdi      # 0x8341
leaq 0x1f6f(%rip), %rsi      # 0x82f3
leaq 0x25e0(%rip), %rcx      # 0x896b
movl $0xa87, %edx            # imm = 0xA87
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_is_and
aiger_and *
aiger_is_and (aiger * public, unsigned lit)
{
  aiger_type *type;
  aiger_and *res;

  assert (!aiger_error (public));
  type = aiger_lit2type (public, lit);
  if (!type->and)
    return 0;

  res = public->ands + type->idx;

  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq $0x0, 0xd0(%rdi)
jne 0x63c8
movq %rdi, %rbx
callq 0x6297
testb $0x4, (%rax)
jne 0x63b6
xorl %eax, %eax
jmp 0x63c1
movl 0x4(%rax), %eax
imulq $0xc, %rax, %rax
addq 0x60(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1f72(%rip), %rdi      # 0x8341
leaq 0x1f1d(%rip), %rsi      # 0x82f3
leaq 0x25c2(%rip), %rcx      # 0x899f
movl $0xa97, %edx            # imm = 0xA97
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_literal_defined
static int
aiger_literal_defined (aiger_private * private, unsigned lit)
{
  unsigned var = aiger_lit2var (lit);
#ifndef NDEBUG
  EXPORT_public_FROM (private);
#endif
  aiger_type *type;

  assert (var <= public->maxvar);
  if (!var)
    return 1;

  type = private->types + var;

  return type->and || type->input || type->latch;
}

// Assembly:
movl %esi, %eax
shrl %eax
cmpl (%rdi), %eax
ja 0x6408
cmpl $0x2, %esi
jae 0x63f8
pushq $0x1
popq %rax
retq
movq 0x70(%rdi), %rcx
movl %eax, %edx
xorl %eax, %eax
testb $0x7, (%rcx,%rdx,8)
setne %al
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x250e(%rip), %rdi      # 0x8921
leaq 0x1ed9(%rip), %rsi      # 0x82f3
leaq 0x2649(%rip), %rcx      # 0x8a6a
movl $0x27c, %edx            # imm = 0x27C
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_error_uu
static const char *
aiger_error_uu (aiger_private * private, const char *s, unsigned a,
		unsigned b)
{
  unsigned tmp_len, error_len;
  char *tmp;
  assert (!private->error);
  tmp_len = strlen (s) + sizeof (a) * 4 + sizeof (b) * 4 + 1;
  NEWN (tmp, tmp_len);
  sprintf (tmp, s, a, b);
  error_len = strlen (tmp) + 1;
  NEWN (private->error, error_len);
  memcpy (private->error, tmp, error_len);
  DELETEN (tmp, tmp_len);
  return private->error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, -0x2c(%rbp)
cmpq $0x0, 0xd0(%rdi)
jne 0x64fd
movl %edx, %r13d
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x10b0
leal 0x21(%rax), %r14d
movq 0xb8(%rbx), %rdi
movq %r14, %rsi
callq *0xc0(%rbx)
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1100
movq %r15, %rdi
movq %r12, %rsi
movl %r13d, %edx
movl -0x2c(%rbp), %ecx
xorl %eax, %eax
callq 0x1180
movq %r15, %rdi
callq 0x10b0
leal 0x1(%rax), %r12d
movq 0xb8(%rbx), %rdi
movq %r12, %rsi
callq *0xc0(%rbx)
movq %rax, 0xd0(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x1100
movq 0xd0(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1140
movq 0xb8(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq *0xc8(%rbx)
movq 0xd0(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x259f(%rip), %rdi      # 0x8aa3
leaq 0x1de8(%rip), %rsi      # 0x82f3
leaq 0x25a1(%rip), %rcx      # 0x8ab3
movl $0x250, %edx            # imm = 0x250
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_error_u
static const char *
aiger_error_u (aiger_private * private, const char *s, unsigned u)
{
  unsigned tmp_len, error_len;
  char *tmp;
  assert (!private->error);
  tmp_len = strlen (s) + sizeof (u) * 4 + 1;
  NEWN (tmp, tmp_len);
  sprintf (tmp, s, u);
  error_len = strlen (tmp) + 1;
  NEWN (private->error, error_len);
  memcpy (private->error, tmp, error_len);
  DELETEN (tmp, tmp_len);
  return private->error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0xd0(%rdi)
jne 0x65e8
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x10b0
leal 0x11(%rax), %r14d
movq 0xb8(%rbx), %rdi
movq %r14, %rsi
callq *0xc0(%rbx)
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1100
movq %r15, %rdi
movq %r13, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x1180
movq %r15, %rdi
callq 0x10b0
leal 0x1(%rax), %r12d
movq 0xb8(%rbx), %rdi
movq %r12, %rsi
callq *0xc0(%rbx)
movq %rax, 0xd0(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x1100
movq 0xd0(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1140
movq 0xb8(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq *0xc8(%rbx)
movq 0xd0(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24b4(%rip), %rdi      # 0x8aa3
leaq 0x1cfd(%rip), %rsi      # 0x82f3
leaq 0x2520(%rip), %rcx      # 0x8b1d
movl $0x23f, %edx            # imm = 0x23F
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_check_right_hand_side_defined
static void
aiger_check_right_hand_side_defined (aiger_private * private, aiger_and * and,
				     unsigned rhs)
{
  if (private->error)
    return;

  assert (and);
  if (!aiger_literal_defined (private, rhs))
    aiger_error_uu (private, "literal %u in AND %u undefined", rhs, and->lhs);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0xd0(%rdi)
jne 0x6633
movq %rsi, %r15
testq %rsi, %rsi
je 0x665c
movl %edx, %ebx
movq %rdi, %r14
movl %edx, %esi
callq 0x63e7
testl %eax, %eax
je 0x663e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl (%r15), %ecx
leaq 0x25c5(%rip), %rsi      # 0x8c0d
movq %r14, %rdi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x642b
leaq 0x1d61(%rip), %rdi      # 0x83c4
leaq 0x1c89(%rip), %rsi      # 0x82f3
leaq 0x2547(%rip), %rcx      # 0x8bb8
movl $0x2a6, %edx            # imm = 0x2A6
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_write_symbols_aux
static int
aiger_write_symbols_aux (aiger * public,
			 void *state, aiger_put put,
			 const char *type,
			 aiger_symbol * symbols, unsigned size)
{
  unsigned i;

  for (i = 0; i < size; i++)
    {
      if (!symbols[i].name)
	continue;

      assert (symbols[i].name[0]);

      if (aiger_put_s (state, put, type) == EOF ||
	  aiger_put_u (state, put, i) == EOF ||
	  put (' ', state) == EOF ||
	  aiger_put_s (state, put, symbols[i].name) == EOF ||
	  put ('\n', state) == EOF)
	return 0;
    }

  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, -0x30(%rbp)
movq %rsi, %r15
movq %rdi, %r12
movl %r8d, %eax
movq %rax, -0x38(%rbp)
addq $0x18, %rbx
xorl %r13d, %r13d
xorl %r14d, %r14d
cmpq %r13, -0x38(%rbp)
je 0x671c
movq (%rbx), %rax
testq %rax, %rax
je 0x6713
cmpb $0x0, (%rax)
je 0x6732
movq %r12, %rdi
movq %r15, %rsi
movq -0x30(%rbp), %rdx
callq 0x4ae8
cmpl $-0x1, %eax
je 0x6720
movq %r12, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x6751
cmpl $-0x1, %eax
je 0x6720
pushq $0x20
popq %rdi
movq %r12, %rsi
callq *%r15
cmpl $-0x1, %eax
je 0x6720
movq (%rbx), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x4ae8
cmpl $-0x1, %eax
je 0x6720
pushq $0xa
popq %rdi
movq %r12, %rsi
callq *%r15
cmpl $-0x1, %eax
je 0x6720
incq %r13
addq $0x20, %rbx
jmp 0x66aa
pushq $0x1
popq %r14
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x258f(%rip), %rdi      # 0x8cc8
leaq 0x1bb3(%rip), %rsi      # 0x82f3
leaq 0x2594(%rip), %rcx      # 0x8cdb
movl $0x498, %edx            # imm = 0x498
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_write_delta
static int
aiger_write_delta (void *state, aiger_put put, unsigned delta)
{
  unsigned char ch;
  unsigned tmp = delta;

  while (tmp & ~0x7f)
    {
      ch = tmp & 0x7f;
      ch |= 0x80;

      if (put (ch, state) == EOF)
	return 0;

      tmp >>= 7;
    }

  ch = tmp;
  return put (ch, state) != EOF;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x80, %r15d
jb 0x6dc6
movl %r15d, %eax
orb $-0x80, %al
movsbl %al, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x6ddb
shrl $0x7, %r15d
jmp 0x6da5
movsbl %r15b, %edi
movq %r14, %rsi
callq *%rbx
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
setne %al
jmp 0x6ddd
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_next_ch
static int
aiger_next_ch (aiger_reader * reader)
{
  int res;

  res = reader->get (reader->state);

  if (isspace (reader->ch) && !isspace (res))
    reader->lineno_at_last_token_start = reader->lineno;

  reader->ch = res;

  if (reader->done_with_reading_header && reader->looks_like_aag)
    {
      if (!isspace (res) && !isdigit (res) && res != EOF)
	reader->looks_like_aag = 0;
    }

  if (res == '\n')
    reader->lineno++;

  if (res != EOF)
    reader->charno++;

  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq *0x8(%rbx)
movl %eax, %r14d
callq 0x11b0
movq (%rax), %rax
movslq 0x10(%rbx), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
movslq %r14d, %rcx
je 0x6e4d
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x6e4d
movl 0x14(%rbx), %edx
movl %edx, 0x1c(%rbx)
movl %r14d, 0x10(%rbx)
cmpl $0x0, 0x20(%rbx)
je 0x6e80
cmpl $0x0, 0x24(%rbx)
je 0x6e80
movzwl (%rax,%rcx,2), %eax
btl $0xd, %eax
jb 0x6e80
btl $0xb, %eax
setae %al
cmpl $-0x1, %r14d
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x6e80
andl $0x0, 0x24(%rbx)
cmpl $-0x1, %r14d
je 0x6e92
cmpl $0xa, %r14d
jne 0x6e8f
incl 0x14(%rbx)
incl 0x18(%rbx)
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_already_defined
static const char *
aiger_already_defined (aiger * public, aiger_reader * reader, unsigned lit)
{
  IMPORT_private_FROM (public);
  aiger_type *type;
  unsigned var;

  assert (lit);
  assert (!aiger_sign (lit));

  var = aiger_lit2var (lit);

  if (public->maxvar < var)
    return 0;

  type = private->types + var;

  if (type->input)
    return aiger_error_uu (private,
			   "line %u: literal %u already defined as input",
			   reader->lineno_at_last_token_start, lit);

  if (type->latch)
    return aiger_error_uu (private,
			   "line %u: literal %u already defined as latch",
			   reader->lineno_at_last_token_start, lit);

  if (type->and)
    return aiger_error_uu (private,
			   "line %u: literal %u already defined as AND",
			   reader->lineno_at_last_token_start, lit);
  return 0;
}

// Assembly:
movl %edx, %ecx
testb $0x1, %cl
jne 0x7042
movl %ecx, %eax
shrl %eax
cmpl %eax, (%rdi)
jae 0x7009
xorl %eax, %eax
retq
movq 0x70(%rdi), %rdx
movl %eax, %eax
movb (%rdx,%rax,8), %al
testb $0x1, %al
jne 0x7027
testb $0x2, %al
jne 0x7030
testb $0x4, %al
je 0x7006
leaq 0x2335(%rip), %rax      # 0x935a
jmp 0x7037
leaq 0x22d2(%rip), %rax      # 0x9300
jmp 0x7037
leaq 0x22f6(%rip), %rax      # 0x932d
movl 0x1c(%rsi), %edx
movq %rax, %rsi
jmp 0x642b
pushq %rbp
movq %rsp, %rbp
leaq 0x1344(%rip), %rdi      # 0x8391
leaq 0x129f(%rip), %rsi      # 0x82f3
leaq 0x225c(%rip), %rcx      # 0x92b7
movl $0x7c4, %edx            # imm = 0x7C4
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_read_delta
static const char *
aiger_read_delta (aiger_private * private, aiger_reader * reader,
		  unsigned *res_ptr)
{
  unsigned res, i, charno;
  unsigned char ch;

  if (reader->ch == EOF)
  UNEXPECTED_EOF:
    return aiger_error_u (private,
			  "character %u: unexpected end of file",
			  reader->charno);
  i = 0;
  res = 0;
  ch = reader->ch;

  charno = reader->charno;

  while ((ch & 0x80))
    {
      assert (sizeof (unsigned) == 4);

      if (i == 5)
      INVALID_CODE:
	return aiger_error_u (private, "character %u: invalid code", charno);

      res |= (ch & 0x7f) << (7 * i++);
      aiger_next_ch (reader);
      if (reader->ch == EOF)
	goto UNEXPECTED_EOF;

      ch = reader->ch;
    }

  if (i == 5 && ch >= 8)
    goto INVALID_CODE;

  res |= ch << (7 * i);
  *res_ptr = res;

  aiger_next_ch (reader);

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, -0x38(%rbp)
movq %rsi, %rbx
movq %rdi, %r15
movl 0x10(%rsi), %r12d
cmpl $-0x1, %r12d
je 0x70c7
movl 0x18(%rbx), %eax
movl %eax, -0x2c(%rbp)
xorl %r13d, %r13d
xorl %r14d, %r14d
testb %r12b, %r12b
jns 0x70d6
cmpl $0x23, %r13d
je 0x70ec
movq %rbx, %rdi
callq 0x6e17
movl 0x10(%rbx), %eax
cmpl $-0x1, %eax
je 0x70c7
andl $0x7f, %r12d
movl %r13d, %ecx
shll %cl, %r12d
orl %r12d, %r14d
addl $0x7, %r13d
movl %eax, %r12d
jmp 0x7096
movl 0x18(%rbx), %edx
leaq 0x22fe(%rip), %rsi      # 0x93cf
movq %r15, %rdi
jmp 0x70f9
andl $0x7f, %r12d
cmpl $0x23, %r13d
sete %al
cmpl $0x8, %r12d
setae %cl
testb %cl, %al
je 0x710c
leaq 0x2301(%rip), %rsi      # 0x93f4
movq %r15, %rdi
movl -0x2c(%rbp), %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x651c
movl %r13d, %ecx
shll %cl, %r12d
orl %r14d, %r12d
movq -0x38(%rbp), %rax
movl %r12d, (%rax)
movq %rbx, %rdi
callq 0x6e17
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/diaxen[P]fft-garden/ct_dit_dr.c
// Function: ct_fft_dr
static inline void
ct_fft_dr(const complex double * restrict in,
           complex double * restrict out,
           int s, int log2_N)
{
  unsigned l = 1 << (log2_N - s - 1);
  unsigned stride = 1 << s;

  switch (l)
    {
    case 1:                     /* size 2 base case  */
      ct_dit_bf2_0(1, stride, out, in);
      break;

    default:
      ct_fft_dr(in, out, s + 1, log2_N);
      ct_fft_dr(in + stride, out + l, s + 1, log2_N);

      for (unsigned k = 0; k < l; k++)
        ct_dit_bf2(l, out + k, get_twiddle(k << s, log2_N));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movl %edx, %eax
pushq $0x1
popq %r15
movl %r15d, %r12d
movl %r14d, %ecx
shll %cl, %r12d
notl %eax
shlq $0x4, %r12
addq %rdi, %r12
addl %ebp, %eax
je 0x1af1
movl %eax, %ecx
shll %cl, %r15d
leal 0x1(%r14), %edx
movl %edx, 0x8(%rsp)
movq %rbx, %rsi
movl %ebp, %ecx
callq 0x19ae
movq %r15, %r13
shlq $0x4, %r13
leaq (%rbx,%r13), %rsi
movq %r12, %rdi
movl 0x8(%rsp), %edx
movl %ebp, %ecx
callq 0x19ae
xorl %r12d, %r12d
leaq 0x2662(%rip), %rbp      # 0x4080
cmpq %r12, %r15
je 0x1b10
movl %r12d, %eax
movl %r14d, %ecx
shll %cl, %eax
movq (%rbp), %rcx
shlq $0x4, %rax
movsd (%rbx), %xmm5
movsd 0x8(%rbx), %xmm6
movupd (%rcx,%rax), %xmm2
movupd (%rbx,%r13), %xmm4
movapd %xmm2, %xmm0
mulpd %xmm4, %xmm0
movapd %xmm2, %xmm3
shufpd $0x1, %xmm2, %xmm3      # xmm3 = xmm3[1],xmm2[0]
mulpd %xmm4, %xmm3
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
subsd %xmm1, %xmm0
movapd %xmm3, %xmm1
unpckhpd %xmm3, %xmm1            # xmm1 = xmm1[1],xmm3[1]
addsd %xmm3, %xmm1
ucomisd %xmm0, %xmm0
jp 0x1ab8
movapd %xmm5, %xmm2
addsd %xmm0, %xmm2
movapd %xmm6, %xmm3
addsd %xmm1, %xmm3
movsd %xmm2, (%rbx)
movsd %xmm3, 0x8(%rbx)
subsd %xmm0, %xmm5
subsd %xmm1, %xmm6
movsd %xmm5, (%rbx,%r13)
movsd %xmm6, 0x8(%rbx,%r13)
incq %r12
addq $0x10, %rbx
jmp 0x1a1e
ucomisd %xmm1, %xmm1
jnp 0x1a7e
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
movapd %xmm4, %xmm1
unpckhpd %xmm4, %xmm1            # xmm1 = xmm1[1],xmm4[1]
movapd %xmm4, %xmm0
movsd %xmm5, 0x8(%rsp)
movsd %xmm6, 0x10(%rsp)
callq 0x1b40
movsd 0x10(%rsp), %xmm6
movsd 0x8(%rsp), %xmm5
jmp 0x1a7e
movupd (%rdi), %xmm0
movupd (%r12), %xmm1
movapd %xmm0, %xmm2
addpd %xmm1, %xmm2
movupd %xmm2, (%rbx)
subpd %xmm1, %xmm0
movupd %xmm0, 0x10(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_13/tail.c
// Function: main
int main(int argc, char *argv[])
{
  if (!is_arg_list_valid(argc, argv))
  {
    puts("Error: invalid arguments.\n");
    return EXIT_FAILURE;
  }

  size_t nr_of_lines_to_print = DEFAULT_NR_OF_LINES_TO_PRINT;

  if (argc == 2)
  {
    nr_of_lines_to_print = atoi(argv[argc - 1] + 1);
  }

  size_t total_nr_of_lines;
  char *line_ptr[MAX_NR_OF_LINES];

  if ((total_nr_of_lines = read_lines(line_ptr, MAX_NR_OF_LINES)) != -1)
  {
    write_lines(line_ptr, nr_of_lines_to_print, total_nr_of_lines);
  }
  else
  {
    puts("Error: input too large.\n");
    return EXIT_FAILURE;
  }

  return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x9c48, %rsp           # imm = 0x9C48
movq %rsi, %rbx
movl %edi, %ebp
callq 0x1203
testl %eax, %eax
je 0x11b9
cmpl $0x2, %ebp
jne 0x11c2
movq 0x8(%rbx), %rdi
incq %rdi
callq 0x1060
movslq %eax, %rbx
jmp 0x11c5
leaq 0xe44(%rip), %rdi       # 0x2004
jmp 0x11f1
pushq $0xa
popq %rbx
movq %rsp, %rdi
movl $0x1388, %esi           # imm = 0x1388
callq 0x1229
cmpq $-0x1, %rax
je 0x11ea
movq %rsp, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x1308
xorl %eax, %eax
jmp 0x11f9
leaq 0xe2e(%rip), %rdi       # 0x201f
callq 0x1040
pushq $0x1
popq %rax
addq $0x9c48, %rsp           # imm = 0x9C48
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_13/tail.c
// Function: write_lines
void write_lines(char *line_ptr[], const size_t nr_of_lines_to_print, const size_t total_nr_of_lines)
{
  size_t start_pos = 0;

  if (total_nr_of_lines >= nr_of_lines_to_print)
  {
    start_pos = total_nr_of_lines - nr_of_lines_to_print;
  }

  for (size_t i = start_pos; i < total_nr_of_lines; ++i)
  {
    puts(line_ptr[i]);
    afree(line_ptr[i]);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq %rdx, %rax
subq %rsi, %rax
cmovaeq %rax, %r15
leaq 0x2d45(%rip), %r12      # 0x4070
leaq 0x2710(%r12), %r13
cmpq %rbx, %r15
jae 0x1364
movq (%r14,%r15,8), %rdi
callq 0x1040
movq (%r14,%r15,8), %rax
cmpq %r12, %rax
setae %cl
cmpq %r13, %rax
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x135f
movq %rax, 0x2cf9(%rip)      # 0x4058
incq %r15
jmp 0x1333
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/asford[P]tmalign/./basic_fun.h
// Function: get_xyz(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double*, double*, double*, char*, int*)
void get_xyz(string line, double *x, double *y, double *z, char *resname, int *no)
{
    char cstr[50];    
    
    strcpy(cstr, (line.substr(30, 8)).c_str());
    sscanf(cstr, "%lf", x);
    
    strcpy(cstr, (line.substr(38, 8)).c_str());
    sscanf(cstr, "%lf", y);  
    
    strcpy(cstr, (line.substr(46, 8)).c_str());
    sscanf(cstr, "%lf", z);
    
    strcpy(cstr, (line.substr(17, 3)).c_str());
    *resname=AAmap(cstr);

    strcpy(cstr, (line.substr(22, 4)).c_str());
    sscanf(cstr, "%d", no);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r9, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r15
leaq 0x20(%rsp), %r12
pushq $0x1e
popq %rdx
pushq $0x8
popq %rbp
movq %r12, %rdi
movq %r15, %rsi
movq %rbp, %rcx
callq 0x47d430
movq (%r12), %rsi
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x401080
movq %r12, %rdi
callq 0x47aa80
leaq 0x17e7e6(%rip), %r12    # 0x5831dc
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4d8980
leaq 0x20(%rsp), %r13
pushq $0x26
popq %rdx
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rcx
callq 0x47d430
movq (%r13), %rsi
movq %r14, %rdi
callq 0x401080
movq %r13, %rdi
callq 0x47aa80
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4d8980
leaq 0x20(%rsp), %rbx
pushq $0x2e
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rcx
callq 0x47d430
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x401080
movq %rbx, %rdi
callq 0x47aa80
movq %r14, %rdi
movq %r12, %rsi
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x4d8980
leaq 0x20(%rsp), %rbx
pushq $0x11
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x47d430
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x401080
movq %rbx, %rdi
callq 0x47aa80
leaq 0x40(%rsp), %rbx
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40aeca
movq %rbx, %rdi
callq 0x404728
movq 0x10(%rsp), %rcx
movb %al, (%rcx)
movq %rbx, %rdi
callq 0x47aa80
leaq 0x20(%rsp), %rbx
pushq $0x16
popq %rdx
pushq $0x4
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x47d430
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x401080
movq %rbx, %rdi
callq 0x47aa80
leaq 0x19f454(%rip), %rsi    # 0x5a3f54
movq %r14, %rdi
movq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0x4d8980
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/asford[P]tmalign/./basic_fun.h
// Function: output_align1(int*, int)
void output_align1(int *invmap0, int len)
{
	for(int i=0; i<len; i++)
	{
		if(invmap0[i]>=0)
		{
			cout << invmap0[i]+1 << " ";
		}			
		else
			cout << invmap0[i] << " ";

	}	
	cout << endl << endl;	
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %r13d, %r13d
testl %esi, %esi
cmovlel %r13d, %ebx
movq $0x605d20, %r15         # imm = 0x605D20
leaq 0x17eacc(%rip), %r12    # 0x5840b7
cmpq %r13, %rbx
je 0x405615
movl (%r14,%r13,4), %eax
movl %eax, %esi
notl %esi
shrl $0x1f, %esi
addl %eax, %esi
movq %r15, %rdi
callq 0x474a50
movq %rax, %rdi
movq %r12, %rsi
callq 0x4746b0
incq %r13
jmp 0x4055eb
movq $0x605d20, %rdi         # imm = 0x605D20
callq 0x473f90
movq %rax, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x473f90
// File: /workspace/github_c_makefile_star2_O2/asford[P]tmalign/./basic_fun.h
// Function: output_align(int*, int)
int output_align(int *invmap0, int len)
{
	int n_ali=0;
	for(int i=0; i<len; i++)
	{		
		cout <<  invmap0[i] << " ";
		n_ali++;		
	}	
	cout << endl << endl;	

	return n_ali;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %r13d, %r13d
testl %esi, %esi
cmovlel %r13d, %ebx
movq $0x605d20, %r15         # imm = 0x605D20
leaq 0x17ea60(%rip), %r12    # 0x5840b7
cmpq %r13, %rbx
je 0x405678
movl (%r14,%r13,4), %esi
movq %r15, %rdi
callq 0x474a50
movq %rax, %rdi
movq %r12, %rsi
callq 0x4746b0
incq %r13
jmp 0x405657
movq $0x605d20, %rdi         # imm = 0x605D20
callq 0x473f90
movq %rax, %rdi
callq 0x473f90
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/asford[P]tmalign/./TMalign.h
// Function: free_memory()
void free_memory()
{
	DeleteArray(&path, xlen+1);
	DeleteArray(&val, xlen+1);
	DeleteArray(&score, xlen+1);
	DeleteArray(&xa, xlen);
	DeleteArray(&xt, xlen);
	DeleteArray(&ya, ylen);
	DeleteArray(&r1, minlen);
	DeleteArray(&r2, minlen);
	DeleteArray(&xtm, minlen);
	DeleteArray(&ytm, minlen);
    
    
    delete [] seqx;
    delete [] seqy;
    delete [] secx;
    delete [] secy;
    delete [] xresno;
    delete [] yresno;
    
}

// Assembly:
pushq %rax
movl 0x1fb934(%rip), %esi    # 0x6025b0
incl %esi
leaq 0x1fb91b(%rip), %rdi    # 0x6025a0
callq 0x40afbd
movl 0x1fb920(%rip), %esi    # 0x6025b0
incl %esi
leaq 0x1fb90f(%rip), %rdi    # 0x6025a8
callq 0x40b013
movl 0x1fb90c(%rip), %esi    # 0x6025b0
incl %esi
leaq 0x1fb8eb(%rip), %rdi    # 0x602598
callq 0x40b013
movl 0x1fb8f8(%rip), %esi    # 0x6025b0
leaq 0x1fb901(%rip), %rdi    # 0x6025c0
callq 0x40b013
movl 0x1fb8e6(%rip), %esi    # 0x6025b0
leaq 0x1fb91f(%rip), %rdi    # 0x6025f0
callq 0x40b013
movl 0x1fb8d8(%rip), %esi    # 0x6025b4
leaq 0x1fb8e5(%rip), %rdi    # 0x6025c8
callq 0x40b013
movl 0x1fb8ca(%rip), %esi    # 0x6025b8
leaq 0x1fb923(%rip), %rdi    # 0x602618
callq 0x40b013
movl 0x1fb8b8(%rip), %esi    # 0x6025b8
leaq 0x1fb919(%rip), %rdi    # 0x602620
callq 0x40b013
movl 0x1fb8a6(%rip), %esi    # 0x6025b8
leaq 0x1fb8c7(%rip), %rdi    # 0x6025e0
callq 0x40b013
movl 0x1fb894(%rip), %esi    # 0x6025b8
leaq 0x1fb8bd(%rip), %rdi    # 0x6025e8
callq 0x40b013
movq 0x1fb8c1(%rip), %rdi    # 0x6025f8
testq %rdi, %rdi
je 0x406d41
callq 0x40b100
movq 0x1fb8b8(%rip), %rdi    # 0x602600
testq %rdi, %rdi
je 0x406d52
callq 0x40b100
movq 0x1fb8af(%rip), %rdi    # 0x602608
testq %rdi, %rdi
je 0x406d63
callq 0x40b100
movq 0x1fb8a6(%rip), %rdi    # 0x602610
testq %rdi, %rdi
je 0x406d74
callq 0x40b100
movq 0x1fb855(%rip), %rdi    # 0x6025d0
testq %rdi, %rdi
je 0x406d85
callq 0x40b100
movq 0x1fb84c(%rip), %rdi    # 0x6025d8
testq %rdi, %rdi
je 0x406d97
popq %rax
jmp 0x40b100
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/asford[P]tmalign/./TMalign.h
// Function: score_fun8(double**, double**, int, double, int*, double*, int)
int score_fun8( double **xa, 
                double **ya, 
                int n_ali,
                double d,
                int i_ali[], 
                double *score1,
                int score_sum_method
              )
{
    double score_sum=0, di;
    double d_tmp=d*d;
	double d02=d0*d0;
	double score_d8_cut = score_d8*score_d8;
    
    int i, n_cut, inc=0;

    while(1)
    {
		n_cut=0;
        score_sum=0;
        for(i=0; i<n_ali; i++)
        {
            di = dist(xa[i], ya[i]);
            if(di<d_tmp)
            {
                i_ali[n_cut]=i;
                n_cut++;
            }
            if(score_sum_method==8)
            {				
                if(di<=score_d8_cut)
                {					
                    score_sum += 1/(1+di/d02);
                }                
            }
            else
            {
				score_sum += 1/(1+di/d02);
            }
        }
        //there are not enough feasible pairs, reliefe the threshold 		
        if(n_cut<3 && n_ali>3)
        {
			inc++;
			double dinc=(d+inc*0.5);
			d_tmp = dinc * dinc;
        }
        else
        {
            break;
        }

    }  

    *score1=score_sum/Lnorm;

    return n_cut;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, 0x14(%rsp)
movq %r8, 0x28(%rsp)
movq %rcx, 0x40(%rsp)
movq %rsi, %r12
movq %rdi, %r13
movsd %xmm0, 0x30(%rsp)
mulsd %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x1fb7ac(%rip), %xmm0   # 0x602580
mulsd %xmm0, %xmm0
movsd 0x1fb798(%rip), %xmm1   # 0x602578
mulsd %xmm1, %xmm1
movsd %xmm1, 0x38(%rsp)
xorl %ebp, %ebp
testl %edx, %edx
movl $0x0, %r15d
movl %edx, 0x10(%rsp)
cmovgl %edx, %r15d
movsd 0x17c204(%rip), %xmm1   # 0x583008
divsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %r14d, %r14d
xorl %ebx, %ebx
cmpq %r14, %r15
je 0x406e80
movq (%r13,%r14,8), %rdi
movq (%r12,%r14,8), %rsi
callq 0x4054a5
ucomisd 0x20(%rsp), %xmm0
jae 0x406e46
movslq %ebx, %rbx
movq 0x40(%rsp), %rax
movl %r14d, (%rax,%rbx,4)
incl %ebx
cmpl $0x8, 0x14(%rsp)
jne 0x406e55
ucomisd 0x38(%rsp), %xmm0
ja 0x406e7b
mulsd 0x18(%rsp), %xmm0
movsd 0x17c1a5(%rip), %xmm1   # 0x583008
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
incq %r14
jmp 0x406e1d
cmpl $0x4, 0x10(%rsp)
jl 0x406eaf
cmpl $0x2, %ebx
jg 0x406eaf
incl %ebp
cvtsi2sd %ebp, %xmm0
mulsd 0x17c17e(%rip), %xmm0   # 0x583018
addsd 0x30(%rsp), %xmm0
mulsd %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
jmp 0x406e0e
movsd 0x8(%rsp), %xmm0
divsd 0x1fb6b3(%rip), %xmm0   # 0x602570
movq 0x28(%rsp), %rax
movsd %xmm0, (%rax)
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/asford[P]tmalign/./TMalign.h
// Function: detailed_search(double**, double**, int, int, int*, double*, double (*) [3], int, int)
double detailed_search( double **x,
                        double **y, 
                        int x_len, 
                        int y_len, 
                        int invmap0[],
                        double t[3],
                        double u[3][3],
                        int simplify_step,
                        int score_sum_method                        
                       )
{
    //x is model, y is template, try to superpose onto y
    int i, j, k;     
    double tmscore;
    double rmsd;



    k=0;
    for(i=0; i<y_len; i++) 
    {
        j=invmap0[i];
        if(j>=0) //aligned
        {
            xtm[k][0]=x[j][0];
            xtm[k][1]=x[j][1];
            xtm[k][2]=x[j][2];
                
            ytm[k][0]=y[i][0];
            ytm[k][1]=y[i][1];
            ytm[k][2]=y[i][2];
            k++;
        }
    }
    
    //detailed search 40-->1
    tmscore=TMscore8_search(xtm, ytm, k, t, u, simplify_step, score_sum_method, &rmsd);  
   
    return tmscore;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r9, %rax
movq %r8, %rbx
movl 0x50(%rsp), %r14d
movl 0x48(%rsp), %r9d
movq 0x40(%rsp), %r8
movq 0x1fb20f(%rip), %r10    # 0x6025e0
movq 0x1fb210(%rip), %r11    # 0x6025e8
xorl %r15d, %r15d
testl %ecx, %ecx
cmovlel %r15d, %ecx
xorl %edx, %edx
cmpq %r15, %rcx
je 0x407457
movslq (%rbx,%r15,4), %r12
testq %r12, %r12
js 0x407452
movq (%rdi,%r12,8), %r12
movsd (%r12), %xmm0
movslq %edx, %rdx
movq (%r10,%rdx,8), %r13
movsd %xmm0, (%r13)
movsd 0x8(%r12), %xmm0
movsd %xmm0, 0x8(%r13)
movsd 0x10(%r12), %xmm0
movsd %xmm0, 0x10(%r13)
movq (%rsi,%r15,8), %r12
movsd (%r12), %xmm0
movq (%r11,%rdx,8), %r13
movsd %xmm0, (%r13)
movsd 0x8(%r12), %xmm0
movsd %xmm0, 0x8(%r13)
movsd 0x10(%r12), %xmm0
movsd %xmm0, 0x10(%r13)
incl %edx
incq %r15
jmp 0x4073e3
leaq 0x8(%rsp), %rbx
movq %r10, %rdi
movq %r11, %rsi
movq %rax, %rcx
pushq %rbx
pushq %r14
callq 0x406ed7
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/asford[P]tmalign/./TMalign.h
// Function: get_initial(double**, double**, int, int, int*)
double get_initial( double **x, 
                    double **y, 
                    int x_len,
                    int y_len, 
                    int *y2x
                   )
{
    int min_len=getmin(x_len, y_len);
    if(min_len<=5) PrintErrorAndQuit("Sequence is too short <=5!\n");
    
    int min_ali= min_len/2;              //minimum size of considered fragment 
    if(min_ali<=5)  min_ali=5;    
    int n1, n2;
    n1 = -y_len+min_ali; 
    n2 = x_len-min_ali;

    int i, j, k, k_best;
    double tmscore, tmscore_max=-1;

    k_best=n1;
    for(k=n1; k<=n2; k++)
    {
        //get the map
        for(j=0; j<y_len; j++)
        {
            i=j+k;
            if(i>=0 && i<x_len)
            {
                y2x[j]=i;
            }
            else
            {
                y2x[j]=-1;
            }
        }
        
        //evaluate the map quickly in three iterations
		//this is not real tmscore, it is used to evaluate the goodness of the initial alignment
        tmscore=get_score_fast(x, y, x_len, y_len, y2x); 
        if(tmscore>=tmscore_max)
        {
            tmscore_max=tmscore;
            k_best=k;
        }
    }
    
    //extract the best map
    k=k_best;
    for(j=0; j<y_len; j++)
    {
        i=j+k;
        if(i>=0 && i<x_len)
        {
            y2x[j]=i;
        }
        else
        {
            y2x[j]=-1;
        }
    }    

    return tmscore_max;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
cmpl %ecx, %edx
movl %ecx, %eax
cmovll %edx, %eax
cmpl $0x5, %eax
jle 0x407a68
movq %r8, %rbx
movl %ecx, %r14d
movl %eax, %esi
shrl %esi
cmpl $0xc, %eax
pushq $0x5
popq %r15
cmovael %esi, %r15d
movslq %edx, %r13
subl %r15d, %edx
subl %ecx, %r15d
movslq %r15d, %r12
movslq %edx, %rax
movq %rax, 0x18(%rsp)
movsd 0x17b674(%rip), %xmm1   # 0x583030
pushq $-0x1
popq %rbp
movl %r15d, %eax
cmpq 0x18(%rsp), %r12
jg 0x407a2c
movl %eax, 0x4(%rsp)
xorl %eax, %eax
cmpq %rax, %r14
je 0x4079f3
leaq (%r12,%rax), %rcx
leal (%r15,%rax), %edx
cmpq %r13, %rcx
cmovgel %ebp, %edx
movq %r12, %rcx
addq %rax, %rcx
cmovsl %ebp, %edx
movl %edx, (%rbx,%rax,4)
incq %rax
jmp 0x4079cf
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl %r14d, %ecx
movq %rbx, %r8
movsd %xmm1, 0x20(%rsp)
callq 0x40747b
movsd 0x20(%rsp), %xmm1
ucomisd %xmm1, %xmm0
movl 0x4(%rsp), %eax
cmovael %r12d, %eax
maxsd %xmm0, %xmm1
incq %r12
incq %r15
jmp 0x4079c2
cltq
movl %eax, %ecx
xorl %edx, %edx
cmpq %rdx, %r14
je 0x407a55
leaq (%rax,%rdx), %rsi
leal (%rcx,%rdx), %edi
cmpq %r13, %rsi
cmovgel %ebp, %edi
movq %rax, %rsi
addq %rdx, %rsi
cmovsl %ebp, %edi
movl %edi, (%rbx,%rdx,4)
incq %rdx
jmp 0x407a32
movapd %xmm1, %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17b7b5(%rip), %rdi    # 0x583224
callq 0x404708