// File: /workspace/github_c_makefile_star2_O3/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 $0x28, %rsp
movq %rdi, %r12
testq %rsi, %rsi
je 0x1cdf4
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r13
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 0x1cb61
movl $0x2d, 0x1f274(%r12)
movl $0x2d, %eax
jmp 0x1cdfc
movq %rbx, 0x20(%rsp)
movq $0x0, 0xc190(%r12)
movq %r12, 0x8(%rsp)
movq %r13, %rcx
movq %rcx, %r15
movb (%rcx), %bl
leal -0x1(%rbx), %eax
incq %rcx
cmpb $0x20, %al
jb 0x1cb7a
testb %bl, %bl
je 0x1cdc8
xorl %r14d, %r14d
movb 0x1(%r15,%r14), %r13b
incq %r14
cmpb $0x20, %r13b
ja 0x1cb94
leaq (%r15,%r14), %rax
movq %rax, 0x18(%rsp)
movq 0x88(%r12), %rbp
testq %rbp, %rbp
je 0x1cc6b
movl $0x4, %edx
movq %r15, %rdi
leaq 0x9acc(%rip), %rsi      # 0x26697
callq 0x3070
testl %eax, %eax
je 0x1cc6b
movq %r15, %rdx
testq %r14, %r14
movq 0x18(%rsp), %rcx
jle 0x1cbfc
testb %bl, %bl
je 0x1cc41
movzbl %bl, %eax
cmpl $0x3a, %eax
je 0x1cc01
movb 0x1(%rdx), %bl
incq %rdx
cmpq %rcx, %rdx
jb 0x1cbe5
cmpb $0x3a, %bl
jne 0x1cc41
movq %rdx, 0x10(%rsp)
movq %rdx, %r12
subq %r15, %r12
leaq 0x18(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3070
testl %eax, %eax
jne 0x1cc29
cmpb $0x0, (%rbx,%r12)
je 0x1cc92
movq (%rbp), %rbp
testq %rbp, %rbp
jne 0x1cc0c
movq 0x10(%rsp), %rax
incq %rax
movq 0x8(%rsp), %r12
jmp 0x1cc53
cmpb $0x0, 0x18(%rbp)
je 0x1cc79
movq (%rbp), %rbp
testq %rbp, %rbp
jne 0x1cc41
movq %r15, %rax
movq %rax, 0x10(%rsp)
testb %r13b, %r13b
je 0x1cc7e
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
jmp 0x1cd5b
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
jmp 0x1cd85
movq %r15, %rdx
jmp 0x1cc9a
movl $0x2, %edx
movq %r12, %rdi
leaq 0x9a0f(%rip), %rsi      # 0x2669c
jmp 0x1cd5b
movq 0x10(%rsp), %rdx
incq %rdx
movswq 0xc(%rbp), %rax
testq %rax, %rax
movq %rdx, 0x10(%rsp)
js 0x1cd0f
movq 0x8(%rsp), %rcx
movq 0x80(%rcx), %rcx
testq %rcx, %rcx
je 0x1cd0f
shlq $0x5, %rax
movq (%rcx,%rax), %r12
testq %r12, %r12
je 0x1cd0f
movq %r12, %rdi
callq 0x3110
cmpb $0x5f, -0x1(%r12,%rax)
jne 0x1cdb8
movl $0x1, %edx
movq 0x8(%rsp), %r12
movq %r12, %rdi
leaq 0x99ae(%rip), %r13      # 0x2669d
movq %r13, %rsi
callq 0x11bb5
movq 0x80(%r12), %rax
movswq 0xc(%rbp), %rcx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %rbx
jmp 0x1cd3a
cmpq $0x0, 0x10(%rbp)
je 0x1ce0b
movl $0x1, %edx
movq 0x8(%rsp), %r12
movq %r12, %rdi
leaq 0x996f(%rip), %r13      # 0x2669d
movq %r13, %rsi
callq 0x11bb5
movq 0x10(%rbp), %rbx
movq %rbx, %rdi
callq 0x3110
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x11bb5
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x11bb5
movl $0x1, %edx
movq %r12, %rdi
leaq 0x8a56(%rip), %rsi      # 0x257c5
callq 0x11bb5
movq %r15, %rdx
movq 0x10(%rsp), %rsi
subq %rsi, %rdx
addq %r14, %rdx
movq %r12, %rdi
callq 0x11bb5
cmpb $0x0, (%r15,%r14)
movq 0x18(%rsp), %rcx
je 0x1cb7a
movl $0x1, %edx
movq %r12, %rdi
leaq 0x9a28(%rip), %rsi      # 0x267d1
callq 0x11bb5
movq 0x18(%rsp), %rcx
jmp 0x1cb7a
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %rdi, %r12
movq %rax, %rdx
jmp 0x1cd5b
leaq 0x91f2(%rip), %rsi      # 0x25fc1
movl $0x1, %edx
movq %r12, %rdi
callq 0x11bb5
movq 0xc180(%r12), %rsi
movq %r12, %rdi
callq 0x13199
movq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movl 0x1f274(%r12), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rax
movl $0x9, 0x1f274(%rax)
movl $0x9, %eax
jmp 0x1cdfc