// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %r13d
movq %rsi, %r15
movq %rdi, -0x38(%rbp)
movb (%rsi), %al
movq %rsi, %r12
testb %al, %al
je 0x6e55
movq %r15, %r12
movsbl %al, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73c8
movb 0x1(%r12), %al
incq %r12
testb %al, %al
jne 0x6e38
subl %r15d, %r12d
xorl %r15d, %r15d
cmpl $-0x1, %r12d
je 0x73cb
movl $0x20, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73cb
movq -0x38(%rbp), %r12
movl (%r12), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
cmpl $-0x1, %eax
je 0x73cb
movl $0x20, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73cb
movl 0x4(%r12), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
cmpl $-0x1, %eax
je 0x73cb
movl $0x20, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73cb
movl 0x8(%r12), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
cmpl $-0x1, %eax
je 0x73cb
movl $0x20, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73cb
movl 0xc(%r12), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
cmpl $-0x1, %eax
je 0x73cb
movl $0x20, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73cb
movl 0x10(%r12), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
cmpl $-0x1, %eax
je 0x73cb
cmpl $0x0, 0x14(%r12)
jne 0x6f64
cmpl $0x0, 0x18(%r12)
jne 0x6f64
cmpl $0x0, 0x1c(%r12)
jne 0x6f64
cmpl $0x0, 0x20(%r12)
je 0x6f90
movl $0x20, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73cb
movl 0x14(%r12), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
cmpl $-0x1, %eax
je 0x73cb
cmpl $0x0, 0x18(%r12)
jne 0x6fa8
cmpl $0x0, 0x1c(%r12)
jne 0x6fa8
cmpl $0x0, 0x20(%r12)
je 0x6fd4
movl $0x20, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73cb
movl 0x18(%r12), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
cmpl $-0x1, %eax
je 0x73cb
cmpl $0x0, 0x1c(%r12)
jne 0x6fe4
cmpl $0x0, 0x20(%r12)
je 0x7010
movl $0x20, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73cb
movl 0x1c(%r12), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
cmpl $-0x1, %eax
je 0x73cb
cmpl $0x0, 0x20(%r12)
je 0x7044
movl $0x20, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73cb
movl 0x20(%r12), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
cmpl $-0x1, %eax
je 0x73cb
movl $0xa, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73cb
testl %r13d, %r13d
je 0x73dd
cmpl $0x0, 0x8(%r12)
je 0x7153
cmpl $0x0, 0x8(%r12)
je 0x7153
xorl %ecx, %ecx
xorl %edx, %edx
testl %r13d, %r13d
movq %rcx, -0x30(%rbp)
movq %rdx, -0x40(%rbp)
jne 0x70bf
movq 0x30(%r12), %rax
movl (%rax,%rcx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
xorl %r15d, %r15d
cmpl $-0x1, %eax
je 0x73cb
movl $0x20, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
movq -0x30(%rbp), %rcx
je 0x73cb
movq 0x30(%r12), %rax
movl 0x4(%rax,%rcx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
xorl %r15d, %r15d
cmpl $-0x1, %eax
je 0x73cb
movq 0x30(%r12), %rax
movq -0x30(%rbp), %rcx
cmpl $0x0, 0x8(%rax,%rcx)
je 0x7123
movl $0x20, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73cb
movq 0x30(%r12), %rax
movq -0x30(%rbp), %rcx
movl 0x8(%rax,%rcx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
cmpl $-0x1, %eax
je 0x73cb
movl $0xa, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %rdx
je 0x73cb
incq %rdx
movl 0x8(%r12), %eax
addq $0x20, %rcx
cmpq %rax, %rdx
jb 0x707c
cmpl $0x0, 0xc(%r12)
je 0x71b3
cmpl $0x0, 0xc(%r12)
je 0x71b3
xorl %r15d, %r15d
xorl %ecx, %ecx
xorl %r13d, %r13d
movq 0x38(%r12), %rax
movq %rcx, -0x30(%rbp)
movl (%rax,%rcx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
cmpl $-0x1, %eax
je 0x73cb
movl $0xa, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73cb
incq %r13
movl 0xc(%r12), %eax
movq -0x30(%rbp), %rcx
addq $0x20, %rcx
cmpq %rax, %r13
jb 0x716b
cmpl $0x0, 0x14(%r12)
je 0x7213
cmpl $0x0, 0x14(%r12)
je 0x7213
xorl %r15d, %r15d
xorl %ecx, %ecx
xorl %r13d, %r13d
movq 0x40(%r12), %rax
movq %rcx, -0x30(%rbp)
movl (%rax,%rcx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
cmpl $-0x1, %eax
je 0x73cb
movl $0xa, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73cb
incq %r13
movl 0x14(%r12), %eax
movq -0x30(%rbp), %rcx
addq $0x20, %rcx
cmpq %rax, %r13
jb 0x71cb
cmpl $0x0, 0x18(%r12)
je 0x7273
cmpl $0x0, 0x18(%r12)
je 0x7273
xorl %r15d, %r15d
xorl %ecx, %ecx
xorl %r13d, %r13d
movq 0x48(%r12), %rax
movq %rcx, -0x30(%rbp)
movl (%rax,%rcx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
cmpl $-0x1, %eax
je 0x73cb
movl $0xa, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73cb
incq %r13
movl 0x18(%r12), %eax
movq -0x30(%rbp), %rcx
addq $0x20, %rcx
cmpq %rax, %r13
jb 0x722b
cmpl $0x0, 0x1c(%r12)
je 0x7368
movq -0x38(%rbp), %rcx
cmpl $0x0, 0x1c(%rcx)
je 0x72d7
movl $0xc, %r12d
xorl %r15d, %r15d
xorl %r13d, %r13d
movq 0x50(%rcx), %rax
movl (%rax,%r12), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
cmpl $-0x1, %eax
je 0x73cb
movl $0xa, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73cb
incq %r13
movq -0x38(%rbp), %rcx
movl 0x1c(%rcx), %eax
addq $0x20, %r12
cmpq %rax, %r13
jb 0x7295
cmpl $0x0, 0x1c(%rcx)
je 0x7368
movq $0x0, -0x30(%rbp)
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x30(%rbp), %rdx
shlq $0x5, %rdx
cmpl $0x0, 0xc(%rax,%rdx)
je 0x7351
xorl %r13d, %r13d
movq %rdx, %r12
movq 0x10(%rax,%rdx), %rax
movl (%rax,%r13,4), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
xorl %r15d, %r15d
cmpl $-0x1, %eax
je 0x73cb
movl $0xa, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
movq -0x38(%rbp), %rax
je 0x73cb
incq %r13
movq 0x50(%rax), %rax
movq %r12, %rdx
movl 0xc(%rax,%r12), %ecx
cmpq %rcx, %r13
jb 0x7303
movq -0x30(%rbp), %rdx
incq %rdx
movq -0x38(%rbp), %rax
movl 0x1c(%rax), %eax
movq %rdx, -0x30(%rbp)
cmpq %rax, %rdx
jb 0x72e9
movl $0x1, %r15d
movq -0x38(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x73cb
movq -0x38(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x73cb
xorl %r12d, %r12d
xorl %r13d, %r13d
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movl (%rax,%r12), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
cmpl $-0x1, %eax
je 0x73c8
movl $0xa, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
je 0x73c8
incq %r13
movq -0x38(%rbp), %rax
movl 0x20(%rax), %eax
addq $0x20, %r12
cmpq %rax, %r13
jb 0x7388
jmp 0x73cb
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x4(%r12)
je 0x7060
cmpl $0x0, 0x4(%r12)
je 0x7060
xorl %r15d, %r15d
xorl %ecx, %ecx
xorl %edx, %edx
movq %rdx, -0x30(%rbp)
movq 0x28(%r12), %rax
movq %rcx, -0x40(%rbp)
movl (%rax,%rcx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dad
cmpl $-0x1, %eax
je 0x73cb
movl $0xa, %edi
movq %r14, %rsi
callq *%rbx
cmpl $-0x1, %eax
movq -0x30(%rbp), %rdx
je 0x73cb
incq %rdx
movl 0x4(%r12), %eax
movq -0x40(%rbp), %rcx
addq $0x20, %rcx
cmpq %rax, %rdx
jb 0x73fc
jmp 0x7060