// File: /workspace/github_c_makefile_star2_O2/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_s2QName
SOAP_FMAC2
soap_s2QName(struct soap *soap, const char *s, char **t, long minlen, long maxlen)
{ if (s)
  { long l = (long)strlen(s);
    if ((maxlen >= 0 && l > maxlen) || l < minlen)
      return soap->error = SOAP_LENGTH;
    soap->labidx = 0;
    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Normalized namespace(s) of QNames '%s'", s));
    /* convert (by prefix normalize prefix) all QNames in s */
    for (;;)
    { size_t n;
      struct soap_nlist *np;
      register const char *p;
      /* skip blanks */
      while (*s && soap_blank((soap_wchar)*s))
        s++;
      if (!*s)
        break;
      /* find next QName */
      n = 1;
      while (s[n] && !soap_blank(s[n]))
        n++;
      np = soap->nlist;
      /* if there is no namespace stack, or prefix is "xml" then copy string */
      if (!np || !strncmp(s, "xml:", 4))
      { soap_append_lab(soap, s, n);
      }
      else /* we normalize the QName by replacing its prefix */
      { const char *q;
        for (p = s; *p && p < s + n; p++)
          if (*p == ':')
            break;
        if (*p == ':')
        { size_t k = p - s;
          while (np && (strncmp(np->id, s, k) || np->id[k]))
            np = np->next;
          p++;
        }
        else
        { while (np && *np->id)
            np = np->next;
          p = s;
        }
        /* replace prefix */
        if (np)
        { if (np->index >= 0 && soap->local_namespaces && (q = soap->local_namespaces[np->index].id))
          { size_t k = strlen(q);
            if (q[k-1] != '_')
              soap_append_lab(soap, q, k);
            else
            { soap_append_lab(soap, "\"", 1);
              soap_append_lab(soap, soap->local_namespaces[np->index].ns, strlen(soap->local_namespaces[np->index].ns));
              soap_append_lab(soap, "\"", 1);
            }
          }
          else if (np->ns)
          { soap_append_lab(soap, "\"", 1);
            soap_append_lab(soap, np->ns, strlen(np->ns));
            soap_append_lab(soap, "\"", 1);
          }
          else
          { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "\nNamespace prefix of '%s' not defined (index=%d, URI=%s)\n", s, np->index, np->ns?np->ns:SOAP_STR_EOS));
            return soap->error = SOAP_NAMESPACE;
          }
        }
        else if (s[n]) /* no namespace, part of string */
        { soap_append_lab(soap, s, n);
        }
        else /* no namespace: assume "" namespace */
        { soap_append_lab(soap, "\"\"", 2);
        }
        soap_append_lab(soap, ":", 1);
        soap_append_lab(soap, p, n - (p-s));
      }
      /* 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);
    DBGLOG(TEST, SOAP_MESSAGE(fdebug, " into '%s'\n", *t));
  }
  return soap->error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r13
testq %rsi, %rsi
je 0x1b15b
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq %rsi, %rdi
callq 0x3110
testq %r15, %r15
setns %cl
cmpq %r15, %rax
setg %dl
andb %cl, %dl
cmpq %r14, %rax
setl %al
orb %dl, %al
cmpb $0x1, %al
jne 0x1aefa
movl $0x2d, 0x1f274(%r13)
pushq $0x2d
popq %rax
jmp 0x1b162
movq %rbx, 0x10(%rsp)
andq $0x0, 0xc190(%r13)
movq %r12, %r14
movq %r13, (%rsp)
movq %r14, %r15
movb (%r14), %r12b
leal -0x1(%r12), %eax
incq %r14
cmpb $0x20, %al
jb 0x1af0e
testb %r12b, %r12b
je 0x1b132
xorl %ebp, %ebp
movb 0x1(%r15,%rbp), %bl
incq %rbp
cmpb $0x20, %bl
ja 0x1af2b
leaq (%r15,%rbp), %r14
movq 0x88(%r13), %r13
testq %r13, %r13
je 0x1af89
movq %r15, %rdi
leaq 0x8745(%rip), %rsi      # 0x23697
pushq $0x4
popq %rdx
callq 0x3070
testl %eax, %eax
je 0x1af89
movq %r14, 0x8(%rsp)
xorl %r14d, %r14d
leaq (%r15,%r14), %rax
cmpq 0x8(%rsp), %rax
jae 0x1afa0
testb %r12b, %r12b
je 0x1afd0
movzbl %r12b, %eax
cmpl $0x3a, %eax
je 0x1afa6
movb 0x1(%r15,%r14), %r12b
incq %r14
jmp 0x1af66
movq (%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x10df6
jmp 0x1b101
cmpb $0x3a, %r12b
jne 0x1afd0
testq %r13, %r13
je 0x1afe1
leaq 0x18(%r13), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3070
testl %eax, %eax
jne 0x1afc6
cmpb $0x0, 0x18(%r13,%r14)
je 0x1b011
movq (%r13), %r13
jmp 0x1afa6
movq (%r13), %r13
testq %r13, %r13
je 0x1afe9
cmpb $0x0, 0x18(%r13)
jne 0x1afcc
movq %r15, %r14
jmp 0x1b017
addq %r15, %r14
incq %r14
jmp 0x1afec
movq %r15, %r14
testb %bl, %bl
movq (%rsp), %r13
movq %r13, %rdi
je 0x1b002
movq %r15, %rsi
movq %rbp, %rdx
jmp 0x1b0d1
leaq 0x8693(%rip), %rsi      # 0x2369c
pushq $0x2
popq %rdx
jmp 0x1b0d1
addq %r15, %r14
incq %r14
movswq 0xc(%r13), %rax
testq %rax, %rax
js 0x1b082
movq (%rsp), %rcx
movq 0x80(%rcx), %rcx
testq %rcx, %rcx
je 0x1b082
shlq $0x5, %rax
movq (%rcx,%rax), %rbx
testq %rbx, %rbx
je 0x1b082
movq %rbx, %rdi
callq 0x3110
cmpb $0x5f, -0x1(%rbx,%rax)
jne 0x1b123
movq (%rsp), %rbx
movq %rbx, %rdi
leaq 0x863e(%rip), %rsi      # 0x2369d
pushq $0x1
popq %r12
movq %r12, %rdx
callq 0x10df6
movq 0x80(%rbx), %rax
movswq 0xc(%r13), %rcx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %r13
jmp 0x1b0ab
cmpq $0x0, 0x10(%r13)
je 0x1b171
movq (%rsp), %rbx
movq %rbx, %rdi
leaq 0x8602(%rip), %rsi      # 0x2369d
pushq $0x1
popq %r12
movq %r12, %rdx
callq 0x10df6
movq 0x10(%r13), %r13
movq %r13, %rdi
callq 0x3110
movq %rbx, %rdi
movq %r13, %rsi
movq %rbx, %r13
movq %rax, %rdx
callq 0x10df6
movq %rbx, %rdi
leaq 0x85cf(%rip), %rsi      # 0x2369d
movq %r12, %rdx
callq 0x10df6
movq %r13, %rdi
leaq 0x76e5(%rip), %rsi      # 0x227c5
pushq $0x1
popq %rdx
callq 0x10df6
movq %r15, %rdx
subq %r14, %rdx
addq %rbp, %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0x10df6
movq 0x8(%rsp), %r14
cmpb $0x0, (%r15,%rbp)
je 0x1af0e
movq %r13, %rdi
leaq 0x86bb(%rip), %rsi      # 0x237d1
pushq $0x1
popq %rdx
callq 0x10df6
jmp 0x1af0e
movq (%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %rax, %rdx
jmp 0x1b0d1
leaq 0x7e88(%rip), %rsi      # 0x22fc1
pushq $0x1
popq %rdx
movq %r13, %rdi
callq 0x10df6
movq 0xc180(%r13), %rsi
movq %r13, %rdi
callq 0x122d8
movq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movl 0x1f274(%r13), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rax
movl $0x9, 0x1f274(%rax)
pushq $0x9
jmp 0x1aef4