// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_QName2s
SOAP_FMAC1
const char*
SOAP_FMAC2
soap_QName2s(struct soap *soap, const char *s)
{ const char *t = NULL;
  if (s)
  { soap->labidx = 0;
    for (;;)
    { size_t n;
      /* skip blanks */
      while (*s && soap_blank(*s))
        s++;
      if (!*s)
        break;
      /* find next QName */
      n = 1;
      while (s[n] && !soap_blank(s[n]))
        n++;
      /* normal prefix: pass string as is */
      if (*s != '"')
      { soap_append_lab(soap, s, n);
#ifndef WITH_LEAN
        if ((soap->mode & SOAP_XML_CANONICAL))
        { const char *r = strchr(s, ':');
          if (r)
            soap_utilize_ns(soap, s, r - s);
        }
#endif
      }
      else /* URL-based string prefix */
      { const char *q;
        s++;
        q = strchr(s, '"');
        if (q)
        { struct Namespace *p = soap->local_namespaces;
          if (p)
          { for (; p->id; p++)
            { if (p->ns)
                if (!soap_tag_cmp(s, p->ns))
                  break;
              if (p->in)
                if (!soap_tag_cmp(s, p->in))
                  break;
            }
          }
          /* URL is in the namespace table? */
          if (p && p->id)
          { soap_append_lab(soap, p->id, strlen(p->id));
          }
          else /* not in namespace table: create xmlns binding */
          { char *r = soap_strdup(soap, s);
            r[q-s] = '\0';
            sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++);
            soap_set_attr(soap, soap->tmpbuf, r);
            soap_append_lab(soap, soap->tmpbuf + 6, strlen(soap->tmpbuf + 6));
          }
          soap_append_lab(soap, q + 1, n - (q-s) - 1);
        }
      }
      /* advance to next and add spacing */
      s += n;
      if (*s)
        soap_append_lab(soap, " ", 1);
    }
    soap_append_lab(soap, SOAP_STR_EOS, 1);
    t = soap_strdup(soap, soap->labbuf);
  }
  return t;
}

// Assembly:
testq %rsi, %rsi
je 0x465fb
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbp
movq %rdi, %rbx
movq $0x0, 0x6130(%rdi)
leaq 0x16538(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x1653e(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0xc4d6(%rip), %r14      # 0x5291d
movq %rbp, %r13
movb (%rbp), %al
leal -0x1(%rax), %ecx
incq %rbp
cmpb $0x20, %cl
jb 0x46447
testb %al, %al
je 0x465ca
xorl %r12d, %r12d
cmpb $0x20, 0x1(%r13,%r12)
leaq 0x1(%r12), %r12
ja 0x46463
cmpb $0x22, %al
jne 0x4656a
movq %rbp, %rdi
movl $0x22, %esi
callq 0x3130
testq %rax, %rax
je 0x465a4
movq %rax, %r13
movq 0x80(%rbx), %r15
testq %r15, %r15
je 0x464df
movq (%r15), %r14
testq %r14, %r14
je 0x464df
addq $0x20, %r15
movq -0x18(%r15), %rsi
testq %rsi, %rsi
je 0x464be
movq %rbp, %rdi
callq 0x382f9
testl %eax, %eax
je 0x46530
movq -0x10(%r15), %rsi
testq %rsi, %rsi
je 0x464d3
movq %rbp, %rdi
callq 0x382f9
testl %eax, %eax
je 0x46530
movq (%r15), %r14
addq $0x20, %r15
testq %r14, %r14
jne 0x464a9
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3a6c4
movq %rax, %r14
movq %r13, %rax
subq %rbp, %rax
movb $0x0, (%r14,%rax)
movl 0x5f40(%rbx), %edx
leal 0x1(%rdx), %eax
movl %eax, 0x5f40(%rbx)
movq 0x10(%rsp), %r15
movq %r15, %rdi
leaq 0xc2da(%rip), %rsi      # 0x527f0
xorl %eax, %eax
callq 0x3360
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4228b
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x3110
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x39195
movq %rbp, %rax
subq %r13, %rax
incq %r13
leaq (%rax,%r12), %rdx
decq %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x39195
leaq 0xc3b5(%rip), %r14      # 0x5291d
jmp 0x465a4
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x39195
testb $0x1, 0x6(%rbx)
je 0x465a1
movq %r13, %rdi
movl $0x3a, %esi
callq 0x3130
testq %rax, %rax
je 0x465a1
subq %r13, %rax
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x41e2a
movq %r13, %rbp
cmpb $0x0, (%rbp,%r12)
leaq (%rbp,%r12), %rbp
je 0x46447
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x39195
jmp 0x46447
leaq 0xbb90(%rip), %rsi      # 0x52161
movl $0x1, %edx
movq %rbx, %rdi
callq 0x39195
movq 0x6120(%rbx), %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3a6c4
xorl %eax, %eax
retq