// File: /workspace/github_c_makefile_star2_O0/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_wstring_in
SOAP_FMAC1
wchar_t *
SOAP_FMAC2
soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen)
{ wchar_t *s;
  register int i, n = 0, f = 0;
  register long l = 0;
  register soap_wchar c;
  char *t = NULL;
  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n"));
  if (soap->peeked)
  { if (*soap->tag)
    {
#ifndef WITH_LEAN
      struct soap_attribute *tp;
      t = soap->tmpbuf;
      *t = '<';
      t[sizeof(soap->tmpbuf)-1] = '\0';
      strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 2);
      t += strlen(t);
      for (tp = soap->attributes; tp; tp = tp->next)
      { if (tp->visible)
        { if (t >= soap->tmpbuf + sizeof(soap->tmpbuf) - 2)
            break;
          *t++ = ' ';
          strcpy(t, tp->name);
          t += strlen(t);
          if (t >= soap->tmpbuf + sizeof(soap->tmpbuf) - 2)
            break;
          if (tp->value)
          { *t++ = '=';
            *t++ = '"';
            strcpy(t, tp->value);
            t += strlen(t);
            *t++ = '"';
          }
        }
      }
      if (!soap->body)
        *t++ = '/';
      *t++ = '>';
      *t = '\0';
      t = soap->tmpbuf;
#endif
      if (soap->body)
        n = 1;
      f = 1;
      soap->peeked = 0;
    }
  }
  if (soap_new_block(soap) == NULL)
    return NULL;
  for (;;)
  { if (!(s = (wchar_t*)soap_push_block(soap, NULL, sizeof(wchar_t)*SOAP_BLKLEN)))
      return NULL;
    for (i = 0; i < SOAP_BLKLEN; i++)
    { if (t)
      { *s++ = (wchar_t)*t++;
        if (!*t)
          t = NULL;
        continue;
      }
      c = soap_getutf8(soap);
      switch (c)
      {
      case SOAP_TT:
        if (n == 0)
          goto end;
        n--;
        *s++ = '<';
        soap_unget(soap, '/');
        break;
      case SOAP_LT:
        if (f && n == 0)
	  goto end;
        n++;
        *s++ = '<';
        break;
      case SOAP_GT:
        *s++ = '>';
        break;
      case SOAP_QT:
        *s++ = '"';
        break;
      case SOAP_AP:
        *s++ = '\'';
        break;
      case '/':
        if (n > 0)
        { c = soap_getutf8(soap);
          if (c == SOAP_GT)
            n--;
          soap_unget(soap, c);
        }
        *s++ = '/';
        break;
      case '<':
        if (flag)
          *s++ = (soap_wchar)'<';
        else
        { *s++ = (soap_wchar)'&';
          t = (char*)"lt;";
        }
        break;
      case '>':
        if (flag)
          *s++ = (soap_wchar)'>';
        else
        { *s++ = (soap_wchar)'&';
          t = (char*)"gt;";
        }
        break;
      case '"':
        if (flag)
          *s++ = (soap_wchar)'"';
        else
        { *s++ = (soap_wchar)'&';
          t = (char*)"quot;";
        }
        break;
      default:
        if ((int)c == EOF)
          goto end;
        *s++ = (wchar_t)c & 0x7FFFFFFF;
      }
      l++;
      if (maxlen >= 0 && l > maxlen)
      { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
        soap->error = SOAP_LENGTH;
        return NULL;
      }
    }
  }
end:
  soap_unget(soap, c);
  *s = '\0';
  soap_size_block(soap, NULL, sizeof(wchar_t) * (i + 1));
  if (l < minlen)
  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
    soap->error = SOAP_LENGTH;
    return NULL;
  }
  s = (wchar_t*)soap_save_block(soap, NULL, NULL, 0);
#ifdef WITH_DOM
  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
    soap->dom->wide = s;
#endif
  return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x10(%rbp), %rax
cmpw $0x0, 0x18594(%rax)
je 0x637d1
movq -0x10(%rbp), %rax
cmpb $0x0, 0x16938(%rax)
je 0x637cf
movq -0x10(%rbp), %rax
addq $0x16538, %rax          # imm = 0x16538
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movb $0x3c, (%rax)
movq -0x58(%rbp), %rax
movb $0x0, 0x3ff(%rax)
movq -0x58(%rbp), %rdi
addq $0x1, %rdi
movq -0x10(%rbp), %rsi
addq $0x16938, %rsi          # imm = 0x16938
movl $0x3fe, %edx            # imm = 0x3FE
callq 0x3070
movq -0x58(%rbp), %rdi
callq 0x3100
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x18580(%rax), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x6375f
movq -0x60(%rbp), %rax
cmpw $0x0, 0x20(%rax)
je 0x6374d
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rcx
addq $0x16538, %rcx          # imm = 0x16538
addq $0x400, %rcx            # imm = 0x400
addq $-0x2, %rcx
cmpq %rcx, %rax
jb 0x63693
jmp 0x6375f
movq -0x58(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rbp)
movb $0x20, (%rax)
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
addq $0x22, %rsi
callq 0x3090
movq -0x58(%rbp), %rdi
callq 0x3100
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rcx
addq $0x16538, %rcx          # imm = 0x16538
addq $0x400, %rcx            # imm = 0x400
addq $-0x2, %rcx
cmpq %rcx, %rax
jb 0x636e8
jmp 0x6375f
movq -0x60(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x6374b
movq -0x58(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rbp)
movb $0x3d, (%rax)
movq -0x58(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rbp)
movb $0x22, (%rax)
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3090
movq -0x58(%rbp), %rdi
callq 0x3100
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rbp)
movb $0x22, (%rax)
jmp 0x6374d
jmp 0x6374f
movq -0x60(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x63655
movq -0x10(%rbp), %rax
cmpw $0x0, 0x6106(%rax)
jne 0x6377f
movq -0x58(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rbp)
movb $0x2f, (%rax)
movq -0x58(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rbp)
movb $0x3e, (%rax)
movq -0x58(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
addq $0x16538, %rax          # imm = 0x16538
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
cmpw $0x0, 0x6106(%rax)
je 0x637bb
movl $0x1, -0x38(%rbp)
movl $0x1, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movw $0x0, 0x18594(%rax)
jmp 0x637d1
movq -0x10(%rbp), %rdi
callq 0x539b0
cmpq $0x0, %rax
jne 0x637ed
movq $0x0, -0x8(%rbp)
jmp 0x63b47
jmp 0x637ef
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x4f260
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x63818
movq $0x0, -0x8(%rbp)
jmp 0x63b47
movl $0x0, -0x34(%rbp)
cmpl $0x100, -0x34(%rbp)     # imm = 0x100
jge 0x63ad1
cmpq $0x0, -0x58(%rbp)
je 0x6386c
movq -0x58(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rbp)
movsbl (%rax), %ecx
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x30(%rbp)
movl %ecx, (%rax)
movq -0x58(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x63867
movq $0x0, -0x58(%rbp)
jmp 0x63ac3
movq -0x10(%rbp), %rdi
callq 0x51140
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
addl $0x6, %eax
movl %eax, %ecx
movq %rcx, -0x68(%rbp)
subl $0x44, %eax
ja 0x63a67
movq -0x68(%rbp), %rax
leaq 0x16a24(%rip), %rcx     # 0x7a2bc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, -0x38(%rbp)
jne 0x638ac
jmp 0x63ad6
movl -0x38(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x30(%rbp)
movl $0x3c, (%rax)
movq -0x10(%rbp), %rax
movl $0x2f, 0x6100(%rax)
jmp 0x63a89
cmpl $0x0, -0x3c(%rbp)
je 0x638ee
cmpl $0x0, -0x38(%rbp)
jne 0x638ee
jmp 0x63ad6
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x30(%rbp)
movl $0x3c, (%rax)
jmp 0x63a89
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x30(%rbp)
movl $0x3e, (%rax)
jmp 0x63a89
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x30(%rbp)
movl $0x22, (%rax)
jmp 0x63a89
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x30(%rbp)
movl $0x27, (%rax)
jmp 0x63a89
cmpl $0x0, -0x38(%rbp)
jle 0x6398d
movq -0x10(%rbp), %rdi
callq 0x51140
movl %eax, -0x4c(%rbp)
cmpl $-0x4, -0x4c(%rbp)
jne 0x63980
movl -0x38(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rbp)
movl -0x4c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x6100(%rax)
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x30(%rbp)
movl $0x2f, (%rax)
jmp 0x63a89
cmpl $0x0, -0x14(%rbp)
je 0x639c4
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x30(%rbp)
movl $0x3c, (%rax)
jmp 0x639e4
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x30(%rbp)
movl $0x26, (%rax)
leaq 0x170d4(%rip), %rax     # 0x7aab4
movq %rax, -0x58(%rbp)
jmp 0x63a89
cmpl $0x0, -0x14(%rbp)
je 0x63a06
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x30(%rbp)
movl $0x3e, (%rax)
jmp 0x63a26
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x30(%rbp)
movl $0x26, (%rax)
leaq 0x17097(%rip), %rax     # 0x7aab9
movq %rax, -0x58(%rbp)
jmp 0x63a89
cmpl $0x0, -0x14(%rbp)
je 0x63a45
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x30(%rbp)
movl $0x22, (%rax)
jmp 0x63a65
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x30(%rbp)
movl $0x26, (%rax)
leaq 0x1705d(%rip), %rax     # 0x7aabe
movq %rax, -0x58(%rbp)
jmp 0x63a89
cmpl $-0x1, -0x4c(%rbp)
jne 0x63a6f
jmp 0x63ad6
movl -0x4c(%rbp), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x30(%rbp)
movl %ecx, (%rax)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x28(%rbp)
jl 0x63ac1
movq -0x48(%rbp), %rax
cmpq -0x28(%rbp), %rax
jle 0x63ac1
movq -0x10(%rbp), %rax
movl $0x2d, 0x19214(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x63b47
jmp 0x63ac3
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x6381f
jmp 0x637ef
movl -0x4c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x6100(%rax)
movq -0x30(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdx
shlq $0x2, %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x53f70
movq -0x48(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x63b29
movq -0x10(%rbp), %rax
movl $0x2d, 0x19214(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x63b47
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
movq %rdx, %rsi
callq 0x54220
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)