// File: /workspace/github_c_makefile_star2_O1/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, 0x18(%rsp)
testq %rsi, %rsi
je 0x1d6f7
movq %r8, %r12
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r14
movq %rsi, %rdi
callq 0x3110
testq %r12, %r12
setns %cl
cmpq %r12, %rax
setg %dl
andb %cl, %dl
cmpq %r15, %rax
setl %al
orb %dl, %al
cmpb $0x1, %al
jne 0x1d432
movq 0x18(%rsp), %rax
movl $0x2d, 0x1f274(%rax)
movl $0x2d, %eax
xorl %ebx, %ebx
jmp 0x1d6f3
movq %rbx, 0x20(%rsp)
movq 0x18(%rsp), %r12
movq $0x0, 0xc190(%r12)
movq %r14, %r13
movb (%r14), %al
leal -0x1(%rax), %ecx
incq %r14
cmpb $0x20, %cl
jb 0x1d448
testb %al, %al
je 0x1d5a8
xorl %ebp, %ebp
movb 0x1(%r13,%rbp), %r15b
incq %rbp
cmpb $0x20, %r15b
ja 0x1d463
movq %r13, %r14
addq %rbp, %r14
movq 0x88(%r12), %rbx
testq %rbx, %rbx
je 0x1d59a
movl $0x4, %edx
movq %r13, %rdi
leaq 0x9200(%rip), %rsi      # 0x26697
callq 0x3070
testl %eax, %eax
je 0x1d59a
movb (%r13), %al
movq %r13, %rcx
testq %rbp, %rbp
movq %r14, 0x10(%rsp)
jle 0x1d4cc
testb %al, %al
je 0x1d514
movzbl %al, %eax
cmpl $0x3a, %eax
je 0x1d4d0
movb 0x1(%rcx), %al
incq %rcx
cmpq %r14, %rcx
jb 0x1d4b5
cmpb $0x3a, %al
jne 0x1d514
movq %rcx, 0x8(%rsp)
movq %rcx, %r14
subq %r13, %r14
leaq 0x18(%rbx), %r12
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x3070
testl %eax, %eax
jne 0x1d4f8
cmpb $0x0, (%r12,%r14)
je 0x1d500
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x1d4db
movq 0x8(%rsp), %rdx
incq %rdx
movq 0x18(%rsp), %r12
movq 0x10(%rsp), %r14
jmp 0x1d525
cmpb $0x0, 0x18(%rbx)
je 0x1d522
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x1d514
movq %r13, %rdx
testq %rbx, %rbx
je 0x1d609
movswq 0xc(%rbx), %rax
testq %rax, %rax
js 0x1d5b5
movq 0x80(%r12), %rcx
testq %rcx, %rcx
je 0x1d5b5
shlq $0x5, %rax
movq (%rcx,%rax), %r14
testq %r14, %r14
je 0x1d5b5
movq %rdx, 0x8(%rsp)
movq %r14, %rdi
callq 0x3110
cmpb $0x5f, -0x1(%r14,%rax)
jne 0x1d6a5
movl $0x1, %edx
movq %r12, %rdi
leaq 0x9123(%rip), %r15      # 0x2669d
movq %r15, %rsi
callq 0x11ccc
movq 0x80(%r12), %rax
movswq 0xc(%rbx), %rcx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %r14
jmp 0x1d5dc
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
jmp 0x1d66e
movl $0x2, %r15d
xorl %ebx, %ebx
jmp 0x1d697
cmpq $0x0, 0x10(%rbx)
je 0x1d61e
movq %rdx, 0x8(%rsp)
movl $0x1, %edx
movq %r12, %rdi
leaq 0x90cd(%rip), %r15      # 0x2669d
movq %r15, %rsi
callq 0x11ccc
movq 0x10(%rbx), %r14
movq %r14, %rdi
callq 0x3110
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x11ccc
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x11ccc
movq 0x10(%rsp), %r14
jmp 0x1d649
movq %rdx, 0x8(%rsp)
testb %r15b, %r15b
je 0x1d635
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
jmp 0x1d644
movl $0x9, 0x1f274(%r12)
movl $0x1, %r15d
jmp 0x1d5ae
movl $0x2, %edx
movq %r12, %rdi
leaq 0x9058(%rip), %rsi      # 0x2669c
callq 0x11ccc
movl $0x1, %edx
movq %r12, %rdi
leaq 0x816d(%rip), %rsi      # 0x257c5
callq 0x11ccc
movq %r13, %rdx
movq 0x8(%rsp), %rsi
subq %rsi, %rdx
addq %rbp, %rdx
movq %r12, %rdi
callq 0x11ccc
xorl %r15d, %r15d
movb $0x1, %bl
cmpb $0x0, (%r13,%rbp)
je 0x1d694
movl $0x1, %edx
movq %r12, %rdi
leaq 0x9142(%rip), %rsi      # 0x267d1
callq 0x11ccc
movq %r14, %r13
movq %r13, %r14
testl %r15d, %r15d
je 0x1d448
jmp 0x1d6b3
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
jmp 0x1d5fd
cmpl $0x2, %r15d
jne 0x1d6ee
leaq 0x8901(%rip), %rsi      # 0x25fc1
movl $0x1, %edx
movq %r12, %rdi
callq 0x11ccc
movq 0xc180(%r12), %rsi
movq %r12, %rdi
callq 0x13324
movq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movl $0x9, %eax
movb $0x1, %bl
jmp 0x1d6f3
movl $0x9, %eax
testb %bl, %bl
je 0x1d702
movq 0x18(%rsp), %rax
movl 0x1f274(%rax), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq