// File: /workspace/github_c_makefile_star2_O0/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_update_ptrs
static void
soap_update_ptrs(struct soap *soap, char *start, char *end, char *p1, char *p2)
{ int i;
  register struct soap_ilist *ip = NULL;
  register struct soap_flist *fp = NULL;
#ifndef WITH_LEANER
  register struct soap_xlist *xp = NULL;
#endif
  register void *p, **q;
  for (i = 0; i < SOAP_IDHASH; i++)
  { for (ip = soap->iht[i]; ip; ip = ip->next)
    { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end)
      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2)));
        ip->ptr = (char*)ip->ptr + (p1-p2);
      }
      for (q = &ip->link; q; q = (void**)p)
      { p = *q;
        if (p && (char*)p >= start && (char*)p < end)
        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p));
          *q = (char*)p + (p1-p2);
        }
      }
      for (q = &ip->copy; q; q = (void**)p)
      { p = *q;
        if (p && (char*)p >= start && (char*)p < end)
        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p));
          *q = (char*)p + (p1-p2);
        }
      }
      for (fp = ip->flist; fp; fp = fp->next)
      { if ((char*)fp->ptr >= start && (char*)fp->ptr < end)
        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp));
          fp->ptr = (char*)fp->ptr + (p1-p2);
        }
      }
    }
  }
#ifndef WITH_LEANER
  for (xp = soap->xlist; xp; xp = xp->next)
  { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end)
    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id?xp->id:SOAP_STR_EOS, xp->ptr, (char*)xp->ptr + (p1-p2)));
      xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2));
      xp->size = (int*)((char*)xp->size + (p1-p2));
      xp->type = (char**)((char*)xp->type + (p1-p2));
      xp->options = (char**)((char*)xp->options + (p1-p2));
    }
  }
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x7cf, -0x2c(%rbp)     # imm = 0x7CF
jge 0x54512
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq 0xa8(%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x54502
movq -0x38(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x543d8
movq -0x38(%rbp), %rax
movq 0x30(%rax), %rax
cmpq -0x10(%rbp), %rax
jb 0x543d8
movq -0x38(%rbp), %rax
movq 0x30(%rax), %rax
cmpq -0x18(%rbp), %rax
jae 0x543d8
movq -0x38(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdx
subq %rdx, %rax
addq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x38(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x54436
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x5442a
movq -0x50(%rbp), %rax
cmpq -0x10(%rbp), %rax
jb 0x5442a
movq -0x50(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x5442a
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdx
subq %rdx, %rax
addq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, (%rax)
jmp 0x5442c
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x543e4
movq -0x38(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x54494
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x54488
movq -0x50(%rbp), %rax
cmpq -0x10(%rbp), %rax
jb 0x54488
movq -0x50(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x54488
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdx
subq %rdx, %rax
addq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, (%rax)
jmp 0x5448a
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x54442
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x544f0
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x10(%rbp), %rax
jb 0x544e1
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x18(%rbp), %rax
jae 0x544e1
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdx
subq %rdx, %rax
addq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x544e3
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x544a0
jmp 0x544f2
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x54388
jmp 0x54504
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x54367
movq -0x8(%rbp), %rax
movq 0x192b0(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x545e5
movq -0x48(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x545d3
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jb 0x545d3
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
jae 0x545d3
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdx
subq %rdx, %rax
addq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdx
subq %rdx, %rax
addq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdx
subq %rdx, %rax
addq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdx
subq %rdx, %rax
addq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x545d5
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x54521
popq %rbp
retq
nopw (%rax,%rax)