// File: biotomas[P]ipasir/sat/picosat961/picosat-961/picosat.c
// Function: resize
static void *
resize (PS * ps, void *void_ptr, size_t old_size, size_t new_size)
{
  size_t old_bytes, new_bytes;
  Blk *b;

  b = PTR2BLK (void_ptr);

  assert (old_size <= ps->current_bytes);
  ps->current_bytes -= old_size;

  if ((old_bytes = old_size))
    {
      assert (old_size && b && b->header.size == old_size);
      old_bytes += SIZE_OF_BLK;
    }
  else
    assert (!b);

  if ((new_bytes = new_size))
    new_bytes += SIZE_OF_BLK;

  if (ps->eresize)
    b = ps->eresize (ps->emgr, b, old_bytes, new_bytes);
  else
    b = realloc (b, new_bytes);

  if (!new_size)
    {
      assert (!b);
      return 0;
    }

  ABORTIF (!b, "out of memory in 'resize'");
#ifndef NDEBUG
  b->header.size = new_size;
#endif

  ps->current_bytes += new_size;
  if (ps->current_bytes > ps->max_bytes)
    ps->max_bytes = ps->current_bytes;

  return b->data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x4f5d
movq -0x18(%rbp), %rax
addq $-0x10, %rax
movq %rax, -0x48(%rbp)
jmp 0x4f65
xorl %eax, %eax
movq %rax, -0x48(%rbp)
jmp 0x4f65
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x328(%rcx), %rax
ja 0x4f80
jmp 0x4f9f
leaq 0x192cc(%rip), %rdi     # 0x1e253
leaq 0x18316(%rip), %rsi     # 0x1d2a4
movl $0x3ec, %edx            # imm = 0x3EC
leaq 0x192d7(%rip), %rcx     # 0x1e271
callq 0x10b0
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x328(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x328(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x5010
cmpq $0x0, -0x20(%rbp)
je 0x4fe3
cmpq $0x0, -0x40(%rbp)
je 0x4fe3
movq -0x40(%rbp), %rax
movq (%rax), %rax
cmpq -0x20(%rbp), %rax
jne 0x4fe3
jmp 0x5002
leaq 0x192b2(%rip), %rdi     # 0x1e29c
leaq 0x182b3(%rip), %rsi     # 0x1d2a4
movl $0x3f1, %edx            # imm = 0x3F1
leaq 0x19274(%rip), %rcx     # 0x1e271
callq 0x10b0
movq -0x30(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x30(%rbp)
jmp 0x503a
cmpq $0x0, -0x40(%rbp)
jne 0x5019
jmp 0x5038
leaq 0x192a8(%rip), %rdi     # 0x1e2c8
leaq 0x1827d(%rip), %rsi     # 0x1d2a4
movl $0x3f5, %edx            # imm = 0x3F5
leaq 0x1923e(%rip), %rcx     # 0x1e271
callq 0x10b0
jmp 0x503a
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x5054
movq -0x38(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x4b0(%rax)
je 0x508c
movq -0x10(%rbp), %rax
movq 0x4b0(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x4a0(%rcx), %rdi
movq -0x40(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq *%rax
movq %rax, -0x40(%rbp)
jmp 0x509d
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x1170
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x50d9
cmpq $0x0, -0x40(%rbp)
jne 0x50ad
jmp 0x50cc
leaq 0x19214(%rip), %rdi     # 0x1e2c8
leaq 0x181e9(%rip), %rsi     # 0x1d2a4
movl $0x401, %edx            # imm = 0x401
leaq 0x191aa(%rip), %rcx     # 0x1e271
callq 0x10b0
movq $0x0, -0x8(%rbp)
jmp 0x515c
jmp 0x50db
cmpq $0x0, -0x40(%rbp)
je 0x50e4
jmp 0x5101
jmp 0x50e6
movq 0x1ef0b(%rip), %rax     # 0x23ff8
movq (%rax), %rsi
leaq 0x191d4(%rip), %rdi     # 0x1e2cb
callq 0x10c0
callq 0x1060
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x328(%rax), %rcx
movq %rcx, 0x328(%rax)
movq -0x10(%rbp), %rax
movq 0x328(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x330(%rcx), %rax
jbe 0x5150
movq -0x10(%rbp), %rax
movq 0x328(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x330(%rax)
movq -0x40(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)