// File: biotomas[P]ipasir/sat/picosat961/picosat-961/picomus.c
// Function: parse
static const char * parse (void) {
  int ch, n, lit, sign, i;
  Cls * c;
HEADER:
  ch = next ();
  if (ch == 'c') {
    while ((ch = next ()) != '\n')
      if (ch == EOF) return "EOF after 'c'";
    goto HEADER;
  }
  if (ch == '\r') goto HEADER;
  if (ch != 'p') return "expected 'c' or 'p'";
  if (fscanf (input_file, " cnf %d %d", &nvars, &nclauses) != 2)
    return "invalid header";
  msg (1, "p cnf %d %d", nvars, nclauses);
  clauses = calloc (nclauses, sizeof *clauses);
  lit = n = 0;
LIT:
  ch = next ();
  if (ch == ' ' || ch == '\n' || ch == '\t' || ch == '\r') goto LIT;
  if (ch == 'c') {
    while ((ch = next ()) != '\n')
      if (ch == EOF) return "EOF after 'c'";
    goto LIT;
  }
  if (ch == EOF) {
    if (lit) return "zero missing";
    if (n < nclauses) return "clauses missing";
    return 0;
  }
  if (n == nclauses) return "too many clauses";
  if (ch == '-') {
    sign = -1;
    ch = next ();
    if (!isdigit (ch)) return "expected digit after '-'";
  } else sign = 1;
  if (!isdigit (ch)) return "expected digit";
  lit = ch - '0';
  while (isdigit (ch = next ()))
    lit = 10 * lit + (ch - '0');
  if (lit > nvars) return "maximum variable index exceeded";
  if (lit) {
    lit *= sign;
    if (nlits == szlits) {
      szlits = szlits ? 2 * szlits : 1;
      lits = realloc (lits, szlits * sizeof *lits);
    }
    lits[nlits++] = lit;
  } else {
    c = clauses + n++;
    c->lits = malloc ((nlits + 1) * sizeof *c->lits);
    for (i = 0; i < nlits; i++)
      c->lits[i] = lits[i];
    c->lits[i] = 0;
    nlits = 0;
  }
  goto LIT;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
callq 0x29f0
movl %eax, -0xc(%rbp)
cmpl $0x63, -0xc(%rbp)
jne 0x245f
jmp 0x2438
callq 0x29f0
movl %eax, -0xc(%rbp)
cmpl $0xa, %eax
je 0x245d
cmpl $-0x1, -0xc(%rbp)
jne 0x245b
leaq 0x19436(%rip), %rax     # 0x1b888
movq %rax, -0x8(%rbp)
jmp 0x27a7
jmp 0x2438
jmp 0x2428
cmpl $0xd, -0xc(%rbp)
jne 0x2467
jmp 0x2428
cmpl $0x70, -0xc(%rbp)
je 0x247d
leaq 0x19422(%rip), %rax     # 0x1b896
movq %rax, -0x8(%rbp)
jmp 0x27a7
movq 0x1fcb4(%rip), %rdi     # 0x22138
leaq 0x1942f(%rip), %rsi     # 0x1b8ba
leaq 0x1fcce(%rip), %rdx     # 0x22160
leaq 0x1fcb7(%rip), %rcx     # 0x22150
movb $0x0, %al
callq 0x1070
cmpl $0x2, %eax
je 0x24b5
leaq 0x193fe(%rip), %rax     # 0x1b8aa
movq %rax, -0x8(%rbp)
jmp 0x27a7
movl 0x1fca5(%rip), %edx     # 0x22160
movl 0x1fc8f(%rip), %ecx     # 0x22150
movl $0x1, %edi
leaq 0x193ec(%rip), %rsi     # 0x1b8b9
movb $0x0, %al
callq 0x27c0
movslq 0x1fc75(%rip), %rdi     # 0x22150
movl $0x10, %esi
callq 0x1110
movq %rax, 0x1fc6c(%rip)     # 0x22158
movl $0x0, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
callq 0x29f0
movl %eax, -0xc(%rbp)
cmpl $0x20, -0xc(%rbp)
je 0x251a
cmpl $0xa, -0xc(%rbp)
je 0x251a
cmpl $0x9, -0xc(%rbp)
je 0x251a
cmpl $0xd, -0xc(%rbp)
jne 0x251c
jmp 0x24fa
cmpl $0x63, -0xc(%rbp)
jne 0x254b
jmp 0x2524
callq 0x29f0
movl %eax, -0xc(%rbp)
cmpl $0xa, %eax
je 0x2549
cmpl $-0x1, -0xc(%rbp)
jne 0x2547
leaq 0x1934a(%rip), %rax     # 0x1b888
movq %rax, -0x8(%rbp)
jmp 0x27a7
jmp 0x2524
jmp 0x24fa
cmpl $-0x1, -0xc(%rbp)
jne 0x258f
cmpl $0x0, -0x14(%rbp)
je 0x2567
leaq 0x19367(%rip), %rax     # 0x1b8c5
movq %rax, -0x8(%rbp)
jmp 0x27a7
movl -0x10(%rbp), %eax
cmpl 0x1fbe0(%rip), %eax     # 0x22150
jge 0x2582
leaq 0x19359(%rip), %rax     # 0x1b8d2
movq %rax, -0x8(%rbp)
jmp 0x27a7
movq $0x0, -0x8(%rbp)
jmp 0x27a7
movl -0x10(%rbp), %eax
cmpl 0x1fbb8(%rip), %eax     # 0x22150
jne 0x25aa
leaq 0x19341(%rip), %rax     # 0x1b8e2
movq %rax, -0x8(%rbp)
jmp 0x27a7
cmpl $0x2d, -0xc(%rbp)
jne 0x25eb
movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF
callq 0x29f0
movl %eax, -0xc(%rbp)
callq 0x11d0
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x25e9
leaq 0x19313(%rip), %rax     # 0x1b8f3
movq %rax, -0x8(%rbp)
jmp 0x27a7
jmp 0x25f2
movl $0x1, -0x18(%rbp)
callq 0x11d0
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x261c
leaq 0x192f9(%rip), %rax     # 0x1b90c
movq %rax, -0x8(%rbp)
jmp 0x27a7
movl -0xc(%rbp), %eax
subl $0x30, %eax
movl %eax, -0x14(%rbp)
callq 0x11d0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
callq 0x29f0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, -0xc(%rbp)
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x2661
imull $0xa, -0x14(%rbp), %eax
movl -0xc(%rbp), %ecx
subl $0x30, %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0x2625
movl -0x14(%rbp), %eax
cmpl 0x1faf6(%rip), %eax     # 0x22160
jle 0x267c
leaq 0x192a8(%rip), %rax     # 0x1b91b
movq %rax, -0x8(%rbp)
jmp 0x27a7
cmpl $0x0, -0x14(%rbp)
je 0x270b
movl -0x18(%rbp), %eax
imull -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl 0x1faee(%rip), %eax     # 0x22184
cmpl 0x1faec(%rip), %eax     # 0x22188
jne 0x26e5
cmpl $0x0, 0x1fae3(%rip)     # 0x22188
je 0x26b4
movl 0x1fadb(%rip), %eax     # 0x22188
shll %eax
movl %eax, -0x34(%rbp)
jmp 0x26be
movl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x26be
movl -0x34(%rbp), %eax
movl %eax, 0x1fac1(%rip)     # 0x22188
movq 0x1faaa(%rip), %rdi     # 0x22178
movslq 0x1fab3(%rip), %rsi     # 0x22188
shlq $0x2, %rsi
callq 0x1160
movq %rax, 0x1fa93(%rip)     # 0x22178
movl -0x14(%rbp), %edx
movq 0x1fa89(%rip), %rax     # 0x22178
movl 0x1fa8f(%rip), %ecx     # 0x22184
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x1fa84(%rip)     # 0x22184
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x27a2
movq 0x1fa46(%rip), %rax     # 0x22158
movl -0x10(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x10(%rbp)
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl 0x1fa53(%rip), %eax     # 0x22184
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1140
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x1fa29(%rip), %eax     # 0x22184
jge 0x2785
movq 0x1fa14(%rip), %rax     # 0x22178
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x2752
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl $0x0, 0x1f9e2(%rip)     # 0x22184
jmp 0x24fa
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)