// File: biotomas[P]ipasir/sat/picosat961/picosat-961/picosat.c
// Function: relemhead
static void
relemhead (PS * ps, const char * name, int fp, double val)
{
  int x, y, len, size;
  const char *fmt;
  unsigned tmp, e;

  if (ps->reports < 0)
    {
      x = ps->RCOUNT & 1;
      y = (ps->RCOUNT / 2) * 12 + x * 6;

      if (ps->RCOUNT == 1)
	sprintf (ps->rline[1], "%6s", "");

      len = strlen (name);
      while (ps->szrline <= len + y + 1)
	{
	  size = ps->szrline ? 2 * ps->szrline : 128;
	  ps->rline[0] = resize (ps, ps->rline[0], ps->szrline, size);
	  ps->rline[1] = resize (ps, ps->rline[1], ps->szrline, size);
	  ps->szrline = size;
	}

      fmt = (len <= 6) ? "%6s%10s" : "%-10s%4s";
      sprintf (ps->rline[x] + y, fmt, name, "");
    }
  else if (val < 0)
    {
      assert (fp);

      if (val > -100 && (tmp = val * 10.0 - 0.5) > -1000.0)
	{
	   fprintf (ps->out, "-%4.1f ", -tmp / 10.0);
	}
      else
	{
	  tmp = -val / 10.0 + 0.5;
	  e = 1;
	  while (tmp >= 100)
	    {
	      tmp /= 10;
	      e++;
	    }

	   fprintf (ps->out, "-%2ue%u ", tmp, e);
	}
    }
  else
    {
      if (fp && val < 1000 && (tmp = val * 10.0 + 0.5) < 10000)
	{
	   fprintf (ps->out, "%5.1f ", tmp / 10.0);
	}
      else if (!fp && (tmp = val) < 100000)
	{
	   fprintf (ps->out, "%5u ", tmp);
	}
      else
	{
	  tmp = val / 10.0 + 0.5;
	  e = 1;

	  while (tmp >= 1000)
	    {
	      tmp /= 10;
	      e++;
	    }

	   fprintf (ps->out, "%3ue%u ", tmp, e);
	}
    }

  ps->RCOUNT++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x384(%rax)
jge 0x1adcb
movq -0x8(%rbp), %rax
movl 0x374(%rax), %eax
andl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x374(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
imull $0xc, %eax, %eax
imull $0x6, -0x24(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x374(%rax)
jne 0x1acb4
movq -0x8(%rbp), %rax
movq 0x368(%rax), %rdi
leaq 0x4a9a(%rip), %rsi      # 0x1f740
leaq 0x2fe3(%rip), %rdx      # 0x1dc90
movb $0x0, %al
callq 0x11d0
movq -0x10(%rbp), %rdi
callq 0x1090
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movl 0x370(%rax), %eax
movl -0x2c(%rbp), %ecx
addl -0x28(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jg 0x1ad7d
movq -0x8(%rbp), %rax
cmpl $0x0, 0x370(%rax)
je 0x1acf9
movq -0x8(%rbp), %rax
movl 0x370(%rax), %eax
shll %eax
movl %eax, -0x44(%rbp)
jmp 0x1ad03
movl $0x80, %eax
movl %eax, -0x44(%rbp)
jmp 0x1ad03
movl -0x44(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x360(%rax), %rsi
movq -0x8(%rbp), %rax
movslq 0x370(%rax), %rdx
movslq -0x30(%rbp), %rcx
callq 0x4f30
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x360(%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x368(%rax), %rsi
movq -0x8(%rbp), %rax
movslq 0x370(%rax), %rdx
movslq -0x30(%rbp), %rcx
callq 0x4f30
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x368(%rax)
movl -0x30(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x370(%rax)
jmp 0x1acc0
movl -0x2c(%rbp), %edx
leaq 0x49c5(%rip), %rax      # 0x1f74c
leaq 0x49b6(%rip), %rcx      # 0x1f744
cmpl $0x6, %edx
cmovleq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq 0x360(%rax,%rcx,8), %rdi
movslq -0x28(%rbp), %rax
addq %rax, %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0x2ed1(%rip), %rcx      # 0x1dc90
movb $0x0, %al
callq 0x11d0
jmp 0x1affa
xorps %xmm0, %xmm0
ucomisd -0x20(%rbp), %xmm0
jbe 0x1aee8
cmpl $0x0, -0x14(%rbp)
je 0x1ade1
jmp 0x1ae00
leaq 0x496d(%rip), %rdi      # 0x1f755
leaq 0x24b5(%rip), %rsi      # 0x1d2a4
movl $0xcbc, %edx            # imm = 0xCBC
leaq 0x495d(%rip), %rcx      # 0x1f758
callq 0x10b0
movsd -0x20(%rbp), %xmm0
movsd 0x2323(%rip), %xmm1     # 0x1d130
ucomisd %xmm1, %xmm0
jbe 0x1ae7b
movsd -0x20(%rbp), %xmm0
movsd 0x22c8(%rip), %xmm1     # 0x1d0e8
mulsd %xmm1, %xmm0
movsd 0x2314(%rip), %xmm1     # 0x1d140
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, -0x3c(%rbp)
movl %eax, %eax
cvtsi2sd %rax, %xmm0
movsd 0x22f1(%rip), %xmm1     # 0x1d138
ucomisd %xmm1, %xmm0
jbe 0x1ae7b
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x3c(%rbp), %eax
negl %eax
cvtsi2sd %rax, %xmm0
movsd 0x2281(%rip), %xmm1     # 0x1d0e8
divsd %xmm1, %xmm0
leaq 0x4916(%rip), %rsi      # 0x1f788
movb $0x1, %al
callq 0x1130
jmp 0x1aee3
movsd -0x20(%rbp), %xmm0
movsd 0x22c0(%rip), %xmm1     # 0x1d148
divsd %xmm1, %xmm0
movsd 0x2294(%rip), %xmm1     # 0x1d128
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, -0x3c(%rbp)
movl $0x1, -0x40(%rbp)
cmpl $0x64, -0x3c(%rbp)
jb 0x1aec7
movl -0x3c(%rbp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x3c(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x1aea7
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x3c(%rbp), %edx
movl -0x40(%rbp), %ecx
leaq 0x48b4(%rip), %rsi      # 0x1f790
movb $0x0, %al
callq 0x1130
jmp 0x1aff8
cmpl $0x0, -0x14(%rbp)
je 0x1af58
movsd 0x222a(%rip), %xmm0     # 0x1d120
ucomisd -0x20(%rbp), %xmm0
jbe 0x1af58
movsd -0x20(%rbp), %xmm0
movsd 0x21de(%rip), %xmm1     # 0x1d0e8
mulsd %xmm1, %xmm0
movsd 0x2212(%rip), %xmm1     # 0x1d128
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, -0x3c(%rbp)
cmpl $0x2710, %eax           # imm = 0x2710
jae 0x1af58
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x3c(%rbp), %eax
cvtsi2sd %rax, %xmm0
movsd 0x21a7(%rip), %xmm1     # 0x1d0e8
divsd %xmm1, %xmm0
leaq 0x484d(%rip), %rsi      # 0x1f799
movb $0x1, %al
callq 0x1130
jmp 0x1aff6
cmpl $0x0, -0x14(%rbp)
jne 0x1af89
cvttsd2si -0x20(%rbp), %rax
movl %eax, -0x3c(%rbp)
cmpl $0x186a0, %eax          # imm = 0x186A0
jae 0x1af89
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x3c(%rbp), %edx
leaq 0x4820(%rip), %rsi      # 0x1f7a0
movb $0x0, %al
callq 0x1130
jmp 0x1aff4
movsd -0x20(%rbp), %xmm0
movsd 0x2152(%rip), %xmm1     # 0x1d0e8
divsd %xmm1, %xmm0
movsd 0x2186(%rip), %xmm1     # 0x1d128
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, -0x3c(%rbp)
movl $0x1, -0x40(%rbp)
cmpl $0x3e8, -0x3c(%rbp)     # imm = 0x3E8
jb 0x1afd8
movl -0x3c(%rbp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x3c(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x1afb5
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x3c(%rbp), %edx
movl -0x40(%rbp), %ecx
leaq 0x47b8(%rip), %rsi      # 0x1f7a5
movb $0x0, %al
callq 0x1130
jmp 0x1aff6
jmp 0x1aff8
jmp 0x1affa
movq -0x8(%rbp), %rax
movl 0x374(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x374(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)