// File: biotomas[P]ipasir/sat/picosat961/picosat-961/picosat.c
// Function: mulflt
static Flt
mulflt (Flt a, Flt b)
{
  unsigned ma, mb;
  unsigned long long accu;
  int ea, eb;

  CMPSWAPFLT (a, b);
  if (!b)
    return ZEROFLT;

  UNPACKFLT (a, ma, ea);
  UNPACKFLT (b, mb, eb);

  ea += eb;
  ea += 24;
  if (ea > FLTMAXEXPONENT)
    return INFFLT;

  if (ea < FLTMINEXPONENT)
    return EPSFLT;

  accu = ma;
  accu *= mb;
  accu >>= 24;

  if (accu >= FLTCARRY)
    {
      if (ea == FLTMAXEXPONENT)
	return INFFLT;

      ea++;
      accu >>= 1;

      if (accu >= FLTCARRY)
	return INFFLT;
    }

  assert (accu < FLTCARRY);
  assert (accu & FLTMSB);

  ma = accu;
  ma &= ~FLTMSB;

  return packflt (ma, ea);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0x8(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0xe378
movl -0x8(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0xe37a
cmpl $0x0, -0xc(%rbp)
jne 0xe38c
movl $0x0, -0x4(%rbp)
jmp 0xe4ee
jmp 0xe38e
movl -0x8(%rbp), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x10(%rbp)
movl -0x8(%rbp), %eax
shrl $0x18, %eax
subl $0x80, %eax
movl %eax, -0x24(%rbp)
movl -0x10(%rbp), %eax
orl $0x1000000, %eax        # imm = 0x1000000
movl %eax, -0x10(%rbp)
jmp 0xe3b4
movl -0xc(%rbp), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x14(%rbp)
movl -0xc(%rbp), %eax
shrl $0x18, %eax
subl $0x80, %eax
movl %eax, -0x28(%rbp)
movl -0x14(%rbp), %eax
orl $0x1000000, %eax        # imm = 0x1000000
movl %eax, -0x14(%rbp)
movl -0x28(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addl $0x18, %eax
movl %eax, -0x24(%rbp)
cmpl $0x7f, -0x24(%rbp)
jle 0xe3fc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe4ee
cmpl $-0x80, -0x24(%rbp)
jge 0xe40e
movl $0x1, -0x4(%rbp)
jmp 0xe4ee
movl -0x10(%rbp), %eax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
imulq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
shrq $0x18, %rax
movq %rax, -0x20(%rbp)
cmpq $0x2000000, -0x20(%rbp) # imm = 0x2000000
jb 0xe472
cmpl $0x7f, -0x24(%rbp)
jne 0xe449
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe4ee
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
shrq %rax
movq %rax, -0x20(%rbp)
cmpq $0x2000000, -0x20(%rbp) # imm = 0x2000000
jb 0xe470
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe4ee
jmp 0xe472
cmpq $0x2000000, -0x20(%rbp) # imm = 0x2000000
jae 0xe47e
jmp 0xe49d
leaq 0xfbca(%rip), %rdi      # 0x1e04f
leaq 0xee18(%rip), %rsi      # 0x1d2a4
movl $0x340, %edx            # imm = 0x340
leaq 0xfbc7(%rip), %rcx      # 0x1e05f
callq 0x10b0
movq -0x20(%rbp), %rax
andq $0x1000000, %rax        # imm = 0x1000000
cmpq $0x0, %rax
je 0xe4af
jmp 0xe4ce
leaq 0xfbbe(%rip), %rdi      # 0x1e074
leaq 0xede7(%rip), %rsi      # 0x1d2a4
movl $0x341, %edx            # imm = 0x341
leaq 0xfb96(%rip), %rcx      # 0x1e05f
callq 0x10b0
movq -0x20(%rbp), %rax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
andl $0xfeffffff, %eax       # imm = 0xFEFFFFFF
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %edi
movl -0x24(%rbp), %esi
callq 0xe2a0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)