// File: /workspace/github_c_makefile_star2_O0/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_write_header
static int
aiger_write_header (aiger * public,
		    const char *format_string,
		    int compact_inputs_and_latches,
		    void *state, aiger_put put)
{
  unsigned i, j;

  if (aiger_put_s (state, put, format_string) == EOF) return 0;
  if (put (' ', state) == EOF) return 0;
  if (aiger_put_u (state, put, public->maxvar) == EOF) return 0;
  if (put (' ', state) == EOF) return 0;
  if (aiger_put_u (state, put, public->num_inputs) == EOF) return 0;
  if (put (' ', state) == EOF) return 0;
  if (aiger_put_u (state, put, public->num_latches) == EOF) return 0;
  if (put (' ', state) == EOF) return 0;
  if (aiger_put_u (state, put, public->num_outputs) == EOF) return 0;
  if (put (' ', state) == EOF) return 0;
  if (aiger_put_u (state, put, public->num_ands) == EOF) return 0;

  if (public->num_bad ||
      public->num_constraints ||
      public->num_justice ||
      public->num_fairness)
    {
      if (put (' ', state) == EOF) return 0;
      if (aiger_put_u (state, put, public->num_bad) == EOF) return 0;
    }

  if (public->num_constraints ||
      public->num_justice ||
      public->num_fairness)
    {
      if (put (' ', state) == EOF) return 0;
      if (aiger_put_u (state, put, public->num_constraints) == EOF) return 0;
    }

  if (public->num_justice ||
      public->num_fairness)
    {
      if (put (' ', state) == EOF) return 0;
      if (aiger_put_u (state, put, public->num_justice) == EOF) return 0;
    }

  if (public->num_fairness)
    {
      if (put (' ', state) == EOF) return 0;
      if (aiger_put_u (state, put, public->num_fairness) == EOF) return 0;
    }

  if (put ('\n', state) == EOF) return 0;

  if (!compact_inputs_and_latches && public->num_inputs)
    {
      for (i = 0; i < public->num_inputs; i++)
	if (aiger_put_u (state, put, public->inputs[i].lit) == EOF ||
	    put ('\n', state) == EOF)
	  return 0;
    }

  if (public->num_latches)
    {
      for (i = 0; i < public->num_latches; i++)
	{
	  if (!compact_inputs_and_latches)
	    {
	      if (aiger_put_u (state, put, public->latches[i].lit) == EOF)
	        return 0;
	      if (put (' ', state) == EOF) return 0;
	    }

	  if (aiger_put_u (state, put, public->latches[i].next) == EOF)
	     return 0;

	  if (public->latches[i].reset) 
	    {
	      if (put (' ', state) == EOF) return 0;
	      if (aiger_put_u (state, put, public->latches[i].reset) == EOF)
		return 0;
	    }
	  if (put ('\n', state) == EOF) return 0;
	}
    }

  if (public->num_outputs)
    {
      for (i = 0; i < public->num_outputs; i++)
	if (aiger_put_u (state, put, public->outputs[i].lit) == EOF ||
	    put ('\n', state) == EOF)
	  return 0;
    }

  if (public->num_bad)
    {
      for (i = 0; i < public->num_bad; i++)
	if (aiger_put_u (state, put, public->bad[i].lit) == EOF ||
	    put ('\n', state) == EOF)
	  return 0;
    }

  if (public->num_constraints)
    {
      for (i = 0; i < public->num_constraints; i++)
	if (aiger_put_u (state, put, public->constraints[i].lit) == EOF ||
	    put ('\n', state) == EOF)
	  return 0;
    }

  if (public->num_justice)
    {
      for (i = 0; i < public->num_justice; i++)
	{
	  if (aiger_put_u (state, put, public->justice[i].size) == EOF)
	    return 0;
	  if (put ('\n', state) == EOF) return 0;
	}

      for (i = 0; i < public->num_justice; i++)
	{
	  for (j = 0; j < public->justice[i].size; j++)
	    {
	      if (aiger_put_u (state, put, public->justice[i].lits[j]) == EOF)
	        return 0;
	      if (put ('\n', state) == EOF) return 0;
	    }
	}
    }

  if (public->num_fairness)
    {
      for (i = 0; i < public->num_fairness; i++)
	if (aiger_put_u (state, put, public->fairness[i].lit) == EOF ||
	    put ('\n', state) == EOF)
	  return 0;
    }

  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x7380
cmpl $-0x1, %eax
jne 0xa56d
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0x20, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xa58d
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movl (%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
jne 0xa5b1
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0x20, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xa5d1
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
jne 0xa5f6
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0x20, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xa616
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
jne 0xa63b
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0x20, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xa65b
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
jne 0xa680
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0x20, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xa6a0
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
jne 0xa6c5
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0xa6ed
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0xa6ed
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
jne 0xa6ed
movq -0x10(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0xa734
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0x20, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xa70d
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
jne 0xa732
movl $0x0, -0x4(%rbp)
jmp 0xad2f
jmp 0xa734
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0xa752
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
jne 0xa752
movq -0x10(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0xa799
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0x20, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xa772
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
jne 0xa797
movl $0x0, -0x4(%rbp)
jmp 0xad2f
jmp 0xa799
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
jne 0xa7ad
movq -0x10(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0xa7f4
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0x20, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xa7cd
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
jne 0xa7f2
movl $0x0, -0x4(%rbp)
jmp 0xad2f
jmp 0xa7f4
movq -0x10(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0xa845
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0x20, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xa81e
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
jne 0xa843
movl $0x0, -0x4(%rbp)
jmp 0xad2f
jmp 0xa845
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0xa, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xa865
movl $0x0, -0x4(%rbp)
jmp 0xad2f
cmpl $0x0, -0x1c(%rbp)
jne 0xa8dd
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xa8dd
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0xa8db
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
je 0xa8c2
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0xa, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xa8ce
movl $0x0, -0x4(%rbp)
jmp 0xad2f
jmp 0xa8d0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xa87c
jmp 0xa8dd
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0xaa2e
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0xaa2c
cmpl $0x0, -0x1c(%rbp)
jne 0xa95c
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
jne 0xa93a
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0x20, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xa95a
movl $0x0, -0x4(%rbp)
jmp 0xad2f
jmp 0xa95c
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
jne 0xa98f
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
je 0xa9fc
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0x20, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xa9c7
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
jne 0xa9fa
movl $0x0, -0x4(%rbp)
jmp 0xad2f
jmp 0xa9fc
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0xa, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xaa1c
movl $0x0, -0x4(%rbp)
jmp 0xad2f
jmp 0xaa1e
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xa8f2
jmp 0xaa2e
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
je 0xaaa0
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0xaa9e
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
je 0xaa85
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0xa, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xaa91
movl $0x0, -0x4(%rbp)
jmp 0xad2f
jmp 0xaa93
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xaa3f
jmp 0xaaa0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0xab12
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jae 0xab10
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
je 0xaaf7
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0xa, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xab03
movl $0x0, -0x4(%rbp)
jmp 0xad2f
jmp 0xab05
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xaab1
jmp 0xab12
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0xab84
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0xab82
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
je 0xab69
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0xa, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xab75
movl $0x0, -0x4(%rbp)
jmp 0xad2f
jmp 0xab77
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xab23
jmp 0xab84
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
je 0xacb9
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jae 0xac05
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0xc(%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
jne 0xabd8
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0xa, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xabf8
movl $0x0, -0x4(%rbp)
jmp 0xad2f
jmp 0xabfa
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xab99
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jae 0xacb7
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rcx
movl -0x34(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jae 0xaca7
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x38(%rbp), %ecx
movl (%rax,%rcx,4), %edx
callq 0xa460
cmpl $-0x1, %eax
jne 0xac77
movl $0x0, -0x4(%rbp)
jmp 0xad2f
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0xa, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xac97
movl $0x0, -0x4(%rbp)
jmp 0xad2f
jmp 0xac99
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0xac23
jmp 0xaca9
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xac0c
jmp 0xacb9
movq -0x10(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0xad28
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jae 0xad26
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %edx
callq 0xa460
cmpl $-0x1, %eax
je 0xad10
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movl $0xa, %edi
callq *%rax
cmpl $-0x1, %eax
jne 0xad19
movl $0x0, -0x4(%rbp)
jmp 0xad2f
jmp 0xad1b
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xacca
jmp 0xad28
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)