// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_element_end_in
SOAP_FMAC2
soap_element_end_in(struct soap *soap, const char *tag)
{ register soap_wchar c;
  register char *s;
  register int n = 0;
  if (tag && *tag == '-')
    return SOAP_OK;
  if (soap->error == SOAP_NO_TAG)
    soap->error = SOAP_OK;
#ifdef WITH_DOM
  /* this whitespace or mixed content is significant for DOM */
  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
  { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1))
      return soap->error;
    if (soap->dom->prnt)
      soap->dom = soap->dom->prnt;
  }
#endif
  if (soap->peeked)
  { if (*soap->tag)
      n++;
    soap->peeked = 0;
  }
  do
  { while (((c = soap_get(soap)) != SOAP_TT))
    { if ((int)c == EOF)
        return soap->error = SOAP_EOF;
      if (c == SOAP_LT)
        n++;
      else if (c == '/')
      { c = soap_get(soap);
        if (c == SOAP_GT)
          n--;
        else
          soap_unget(soap, c);
      }
    }
  } while (n--);
  s = soap->tag;
  n = sizeof(soap->tag);
  while (soap_notblank(c = soap_get(soap)))
  { if (--n > 0)
      *s++ = (char)c;
  }
  *s = '\0';
  if ((int)c == EOF)
    return soap->error = SOAP_EOF;
  while (soap_blank(c))
    c = soap_get(soap);
  if (c != SOAP_GT)
    return soap->error = SOAP_SYNTAX_ERROR;
#ifndef WITH_LEAN
#ifdef WITH_DOM
  if (soap->feltendin)
  { soap->level--;
    return soap->error = soap->feltendin(soap, soap->tag, tag);
  }
#endif
  if (tag && (soap->mode & SOAP_XML_STRICT))
  { soap_pop_namespace(soap);
    if (soap_match_tag(soap, soap->tag, tag))
    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag '%s' does not match '%s'\n", soap->tag, tag?tag:SOAP_STR_EOS));
      return soap->error = SOAP_SYNTAX_ERROR;
    }
  }
#endif
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:SOAP_STR_EOS));
  soap->level--;
  return SOAP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x2c(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1b656
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1b656
movl $0x0, -0x4(%rbp)
jmp 0x1b863
movq -0x10(%rbp), %rax
cmpl $0x6, 0x1f274(%rax)
jne 0x1b671
movq -0x10(%rbp), %rax
movl $0x0, 0x1f274(%rax)
movq -0x10(%rbp), %rax
cmpw $0x0, 0x1e5f6(%rax)
je 0x1b6a2
movq -0x10(%rbp), %rax
cmpb $0x0, 0x1c998(%rax)
je 0x1b695
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movw $0x0, 0x1e5f6(%rax)
jmp 0x1b6a4
jmp 0x1b6a6
movq -0x10(%rbp), %rdi
callq 0x18260
movl %eax, -0x1c(%rbp)
cmpl $-0x3, %eax
je 0x1b71e
cmpl $-0x1, -0x1c(%rbp)
jne 0x1b6d7
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x1f274(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1b863
cmpl $-0x2, -0x1c(%rbp)
jne 0x1b6e8
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1b71c
cmpl $0x2f, -0x1c(%rbp)
jne 0x1b71a
movq -0x10(%rbp), %rdi
callq 0x18260
movl %eax, -0x1c(%rbp)
cmpl $-0x4, -0x1c(%rbp)
jne 0x1b70b
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1b718
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc160(%rax)
jmp 0x1b71a
jmp 0x1b71c
jmp 0x1b6a6
jmp 0x1b720
movl -0x2c(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x1b6a4
movq -0x10(%rbp), %rax
addq $0x1c998, %rax          # imm = 0x1C998
movq %rax, -0x28(%rbp)
movl $0x400, -0x2c(%rbp)     # imm = 0x400
movq -0x10(%rbp), %rdi
callq 0x18260
movl %eax, -0x1c(%rbp)
cmpl $0x20, %eax
jle 0x1b780
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jle 0x1b77e
movl -0x1c(%rbp), %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
jmp 0x1b749
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
cmpl $-0x1, -0x1c(%rbp)
jne 0x1b7a7
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x1f274(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1b863
jmp 0x1b7a9
xorl %eax, %eax
cmpl $0x0, -0x1c(%rbp)
movb %al, -0x2d(%rbp)
jl 0x1b7be
cmpl $0x20, -0x1c(%rbp)
setle %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
testb $0x1, %al
jne 0x1b7c7
jmp 0x1b7d5
movq -0x10(%rbp), %rdi
callq 0x18260
movl %eax, -0x1c(%rbp)
jmp 0x1b7a9
cmpl $-0x4, -0x1c(%rbp)
je 0x1b7f2
movq -0x10(%rbp), %rax
movl $0x5, 0x1f274(%rax)
movl $0x5, -0x4(%rbp)
jmp 0x1b863
cmpq $0x0, -0x18(%rbp)
je 0x1b849
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0x1b849
movq -0x10(%rbp), %rdi
callq 0x1d0d0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x1c998, %rsi          # imm = 0x1C998
movq -0x18(%rbp), %rdx
callq 0x1d4c0
cmpl $0x0, %eax
je 0x1b847
movq -0x10(%rbp), %rax
movl $0x5, 0x1f274(%rax)
movl $0x5, -0x4(%rbp)
jmp 0x1b863
jmp 0x1b849
movq -0x10(%rbp), %rax
movl 0xc168(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc168(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)