// File: /workspace/github_c_makefile_star2_O0/reactive-systems[P]aiger-ltl-model-checker/aiger.c
// Function: aiger_add_latch
void
aiger_add_latch (aiger * public,
		 unsigned lit, unsigned next, const char *name)
{
  IMPORT_private_FROM (public);
  aiger_symbol symbol;
  aiger_type *type;

  assert (!aiger_error (public));

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

  type = aiger_import_literal (private, lit);

  assert (!type->input);
  assert (!type->latch);
  assert (!type->and);

  /* Warning: importing 'next' makes 'type' invalid.
   */
  type->latch = 1;
  type->idx = public->num_latches;

  aiger_import_literal (private, next);

  CLR (symbol);
  symbol.lit = lit;
  symbol.next = next;
  symbol.name = aiger_copy_str (private, name);

  PUSH (public->latches, public->num_latches, private->size_latches, symbol);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2a70
cmpq $0x0, %rax
jne 0x2cc2
jmp 0x2ce1
leaq 0x962e(%rip), %rdi      # 0xc2f7
leaq 0x95d9(%rip), %rsi      # 0xc2a9
movl $0x185, %edx            # imm = 0x185
leaq 0x96a2(%rip), %rcx      # 0xc37e
callq 0x10f0
cmpl $0x0, -0xc(%rbp)
je 0x2ce9
jmp 0x2d08
leaq 0x96ed(%rip), %rdi      # 0xc3dd
leaq 0x95b2(%rip), %rsi      # 0xc2a9
movl $0x187, %edx            # imm = 0x187
leaq 0x967b(%rip), %rcx      # 0xc37e
callq 0x10f0
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x2d15
jmp 0x2d34
leaq 0x962b(%rip), %rdi      # 0xc347
leaq 0x9586(%rip), %rsi      # 0xc2a9
movl $0x188, %edx            # imm = 0x188
leaq 0x964f(%rip), %rcx      # 0xc37e
callq 0x10f0
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x2a90
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x2d56
jmp 0x2d75
leaq 0x95fc(%rip), %rdi      # 0xc359
leaq 0x9545(%rip), %rsi      # 0xc2a9
movl $0x18c, %edx            # imm = 0x18C
leaq 0x960e(%rip), %rcx      # 0xc37e
callq 0x10f0
movq -0x48(%rbp), %rax
movb (%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x2d89
jmp 0x2da8
leaq 0x95d6(%rip), %rdi      # 0xc366
leaq 0x9512(%rip), %rsi      # 0xc2a9
movl $0x18d, %edx            # imm = 0x18D
leaq 0x95db(%rip), %rcx      # 0xc37e
callq 0x10f0
movq -0x48(%rbp), %rax
movb (%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x2dbd
jmp 0x2ddc
leaq 0x95af(%rip), %rdi      # 0xc373
leaq 0x94de(%rip), %rsi      # 0xc2a9
movl $0x18e, %edx            # imm = 0x18E
leaq 0x95a7(%rip), %rcx      # 0xc37e
callq 0x10f0
movq -0x48(%rbp), %rax
movb (%rax), %cl
andb $-0x3, %cl
orb $0x2, %cl
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x2a90
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x1100
movl -0xc(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2c00
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x90(%rcx), %eax
jne 0x2f5c
jmp 0x2e4a
movq -0x20(%rbp), %rax
movl 0x90(%rax), %eax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x2e6c
movq -0x50(%rbp), %rax
shlq %rax
movq %rax, -0x80(%rbp)
jmp 0x2e77
movl $0x1, %eax
movq %rax, -0x80(%rbp)
jmp 0x2e77
movq -0x80(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
shlq $0x5, %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
shlq $0x5, %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x68(%rbp), %rax
jae 0x2eae
movq -0x60(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x2eb9
movq -0x68(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rax
movq 0xc0(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0xb8(%rcx), %rdi
movq -0x68(%rbp), %rsi
callq *%rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rsi
movq -0x70(%rbp), %rdx
callq 0x1140
movq -0x68(%rbp), %rax
cmpq -0x60(%rbp), %rax
jbe 0x2f1a
movq -0x78(%rbp), %rdi
addq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rdx
subq -0x60(%rbp), %rdx
xorl %esi, %esi
callq 0x1100
movq -0x20(%rbp), %rax
movq 0xc8(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0xb8(%rcx), %rdi
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rsi
movq -0x60(%rbp), %rdx
callq *%rax
movq -0x78(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x58(%rbp), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x90(%rax)
jmp 0x2f5c
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x8(%rdx)
movl %ecx, %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x18(%rax)
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)