LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/soapC.c
// Function: soap_put_PointerTo_QName
SOAP_FMAC4 soap_put_PointerTo_QName(struct soap *soap, char **const*a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTo_QName);
	if (soap_out_PointerTo_QName(soap, tag?tag:"byte", id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
movl $0x10, %r9d
callq 0x17cd3
testq %r15, %r15
leaq 0x15c5f(%rip), %rsi     # 0x25543
cmovneq %r15, %rsi
movq %rbx, %rdi
movl %eax, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0xb356
testl %eax, %eax
je 0xf90e
movl 0x1f274(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x94fe
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/soapC.c
// Function: soap_put_PointerTowsa__ReferenceParametersType
SOAP_FMAC4 soap_put_PointerTowsa__ReferenceParametersType(struct soap *soap, struct wsa__ReferenceParametersType *const*a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTowsa__ReferenceParametersType);
	if (soap_out_PointerTowsa__ReferenceParametersType(soap, tag?tag:"wsa:ReferenceParametersType", id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
movl $0xf, %r9d
callq 0x17cd3
testq %r15, %r15
leaq 0x15d07(%rip), %rsi     # 0x2568e
cmovneq %r15, %rsi
movq %rbx, %rdi
movl %eax, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0xb3bb
testl %eax, %eax
je 0xf9b1
movl 0x1f274(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x94fe
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/soapC.c
// Function: soap_put_PointerTowsa__ReferencePropertiesType
SOAP_FMAC4 soap_put_PointerTowsa__ReferencePropertiesType(struct soap *soap, struct wsa__ReferencePropertiesType *const*a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTowsa__ReferencePropertiesType);
	if (soap_out_PointerTowsa__ReferencePropertiesType(soap, tag?tag:"wsa:ReferencePropertiesType", id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
movl $0xe, %r9d
callq 0x17cd3
testq %r15, %r15
leaq 0x15c80(%rip), %rsi     # 0x256aa
cmovneq %r15, %rsi
movq %rbx, %rdi
movl %eax, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0xb41a
testl %eax, %eax
je 0xfa54
movl 0x1f274(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x94fe
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/soapC.c
// Function: soap_put_string
SOAP_FMAC4 soap_put_string(struct soap *soap, char *const*a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_string);
	if (soap_out_string(soap, tag?tag:"byte", id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
movl $0x4, %r9d
callq 0x17cd3
testq %r15, %r15
leaq 0x159b9(%rip), %rsi     # 0x25543
cmovneq %r15, %rsi
movq %rbx, %rdi
movl %eax, %edx
movq %r12, %rcx
movq %r14, %r8
movl $0x4, %r9d
callq 0x20632
testl %eax, %eax
je 0xfbba
movl 0x1f274(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x94fe
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_send_raw
SOAP_FMAC2
soap_send_raw(struct soap *soap, const char *s, size_t n)
{ if (!n)
    return SOAP_OK;
#ifndef WITH_LEANER
  if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE && (soap->mode & SOAP_IO_LENGTH) && (soap->error = soap->fpreparesend(soap, s, n)))
    return soap->error;
  if (soap->ffiltersend && (soap->error = soap->ffiltersend(soap, &s, &n)))
    return soap->error;
#endif
  if (soap->mode & SOAP_IO_LENGTH)
    soap->count += n;
  else if (soap->mode & SOAP_IO)
  { register size_t i = SOAP_BUFLEN - soap->bufidx;
    while (n >= i)
    { memcpy(soap->buf + soap->bufidx, s, i);
      soap->bufidx = SOAP_BUFLEN;
      if (soap_flush(soap))
        return soap->error;
      s += i;
      n -= i;
      i = SOAP_BUFLEN;
    }
    memcpy(soap->buf + soap->bufidx, s, n);
    soap->bufidx += n;
  }
  else
    return soap_flush_raw(soap, s, n);
  return SOAP_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, 0x8(%rsp)
movq %rdx, (%rsp)
xorl %eax, %eax
testq %rdx, %rdx
je 0x1041d
movq %rdi, %rbx
movq 0xc098(%rdi), %rax
testq %rax, %rax
je 0x10304
movl 0x4(%rbx), %ecx
movl %ecx, %edi
andl $0x3, %edi
cmpl $0x2, %edi
sete %dil
testb $0x8, %cl
sete %cl
orb %dil, %cl
jne 0x10304
movq %rbx, %rdi
callq *%rax
movl %eax, 0x1f274(%rbx)
testl %eax, %eax
jne 0x1041d
movq 0xc0c0(%rbx), %rax
testq %rax, %rax
je 0x1032b
leaq 0x8(%rsp), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq *%rax
movl %eax, 0x1f274(%rbx)
testl %eax, %eax
jne 0x1041d
movl 0x4(%rbx), %eax
testb $0x8, %al
jne 0x1037b
testb $0x3, %al
je 0x1038b
movl $0x10000, %r14d         # imm = 0x10000
subq 0xc150(%rbx), %r14
movq (%rsp), %r15
cmpq %r14, %r15
setb %bpl
jae 0x1039e
movq 0xc150(%rbx), %rax
leaq (%rbx,%rax), %rdi
addq $0xc198, %rdi           # imm = 0xC198
movq 0x8(%rsp), %rsi
movq %r15, %rdx
callq 0x3220
addq %r15, 0xc150(%rbx)
jmp 0x10416
movq (%rsp), %rax
addq %rax, 0xc170(%rbx)
jmp 0x1041b
movq 0x8(%rsp), %rsi
movq (%rsp), %rdx
movq %rbx, %rdi
callq 0x104a4
jmp 0x1041d
leaq 0xc198(%rbx), %r12
movq 0xc150(%rbx), %rdi
addq %r12, %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x3220
movq $0x10000, 0xc150(%rbx) # imm = 0x10000
movq %rbx, %rdi
callq 0x1042a
testl %eax, %eax
jne 0x10410
addq %r14, 0x8(%rsp)
movq (%rsp), %r15
subq %r14, %r15
movq %r15, (%rsp)
cmpq $0x10000, %r15          # imm = 0x10000
setb %bpl
jb 0x10350
movq 0xc150(%rbx), %rdi
addq %r12, %rdi
movq 0x8(%rsp), %rsi
movl $0x10000, %r14d         # imm = 0x10000
movl $0x10000, %edx          # imm = 0x10000
jmp 0x103b7
movl 0x1f274(%rbx), %eax
testb %bpl, %bpl
je 0x1041d
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_flush
SOAP_FMAC2
soap_flush(struct soap *soap)
{ register size_t n = soap->bufidx;
  if (n)
  {
#ifndef WITH_LEANER
    if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
    { register int r;
      if (soap->fpreparesend && (r = soap->fpreparesend(soap, soap->buf, n)))
        return soap->error = r;
    }
#endif
    soap->bufidx = 0;
#ifdef WITH_ZLIB
    if (soap->mode & SOAP_ENC_ZLIB)
    { soap->d_stream->next_in = (Byte*)soap->buf;
      soap->d_stream->avail_in = (unsigned int)n;
#ifdef WITH_GZIP
      soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)n);
#endif
      do
      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating %u bytes\n", soap->d_stream->avail_in));
        if (deflate(soap->d_stream, Z_NO_FLUSH) != Z_OK)
        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unable to deflate: %s\n", soap->d_stream->msg?soap->d_stream->msg:SOAP_STR_EOS));
          return soap->error = SOAP_ZLIB_ERROR;
        }
        if (!soap->d_stream->avail_out)
        { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN))
            return soap->error;
          soap->d_stream->next_out = (Byte*)soap->z_buf;
          soap->d_stream->avail_out = SOAP_BUFLEN;
        }
      } while (soap->d_stream->avail_in);
    }
    else
#endif
      return soap_flush_raw(soap, soap->buf, n);
  }
  return SOAP_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0xc150(%rdi), %rbx
testq %rbx, %rbx
je 0x10475
movq %rdi, %r14
movl 0x4(%rdi), %eax
andl $0x3, %eax
cmpl $0x2, %eax
jne 0x1047e
movq 0xc098(%r14), %rax
movb $0x1, %bpl
testq %rax, %rax
je 0x10479
leaq 0xc198(%r14), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq *%rax
testl %eax, %eax
je 0x10479
movl %eax, 0x1f274(%r14)
xorl %ebp, %ebp
jmp 0x10479
xorl %eax, %eax
jmp 0x1049f
testb %bpl, %bpl
je 0x1049f
movq $0x0, 0xc150(%r14)
leaq 0xc198(%r14), %rsi
movq %r14, %rdi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x104a4
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_flush_raw
SOAP_FMAC2
soap_flush_raw(struct soap *soap, const char *s, size_t n)
{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
  { register char *t;
    if (!(t = (char*)soap_push_block(soap, NULL, n)))
      return soap->error = SOAP_EOM;
    memcpy(t, s, n);
    return SOAP_OK;
  }
#ifndef WITH_LEANER
  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
  { char t[16];
    sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n);
    DBGMSG(SENT, t, strlen(t));
    if ((soap->error = soap->fsend(soap, t, strlen(t))))
      return soap->error;
    soap->chunksize += n;
  }
  DBGMSG(SENT, s, n);
#endif
  return soap->error = soap->fsend(soap, s, n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl 0x4(%rdi), %eax
andl $0x3, %eax
cmpl $0x3, %eax
je 0x104f6
cmpl $0x2, %eax
jne 0x10563
xorl %r12d, %r12d
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x1058e
testq %rax, %rax
je 0x10549
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3220
jmp 0x1057d
xorl %eax, %eax
cmpq $0x0, 0x1e5f8(%r14)
sete %al
leaq 0x15b86(%rip), %rcx     # 0x26090
leaq (%rcx,%rax,2), %rsi
movq %rsp, %r12
movq %r12, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3300
movq 0xc028(%r14), %r13
movq %r12, %rdi
callq 0x3110
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq *%r13
movl %eax, 0x1f274(%r14)
testl %eax, %eax
je 0x1055c
movl %eax, %r12d
jmp 0x1057d
movl $0x14, 0x1f274(%r14)
movl $0x14, %r12d
jmp 0x1057d
addq %rbx, 0x1e5f8(%r14)
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq *0xc028(%r14)
movl %eax, %r12d
movl %eax, 0x1f274(%r14)
movl %r12d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_push_block
SOAP_FMAC1
void*
SOAP_FMAC2
soap_push_block(struct soap *soap, struct soap_blist *b, size_t n)
{ char *p;
  if (!b)
    b = soap->blist;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)b->size + (unsigned int)n));
  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t))))
  { soap->error = SOAP_EOM;
    return NULL;
  }
  *(char**)p = b->ptr;
  *(size_t*)(p + sizeof(char*)) = n;
  b->ptr = p;
  b->size += n;
  return p + sizeof(char*) + sizeof(size_t);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rsi, %rsi
jne 0x105a8
movq 0x90(%r15), %r14
leaq 0x10(%rbx), %rdi
callq 0x3240
testq %rax, %rax
je 0x105cf
movq 0x8(%r14), %rcx
movq %rcx, (%rax)
movq %rbx, 0x8(%rax)
movq %rax, 0x8(%r14)
addq %rbx, 0x10(%r14)
addq $0x10, %rax
jmp 0x105dc
movl $0x14, 0x1f274(%r15)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_send3
SOAP_FMAC2
soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3)
{ if (soap_send(soap, s1)
   || soap_send(soap, s2))
    return soap->error;
  return soap_send(soap, s3);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, %r14
callq 0x105e2
testl %eax, %eax
jne 0x1066b
movq %r14, %rdi
movq %r15, %rsi
callq 0x105e2
testl %eax, %eax
je 0x10678
movl 0x1f274(%r14), %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x105e2
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_getchunkchar
static soap_wchar
soap_getchunkchar(struct soap *soap)
{ if (soap->bufidx < soap->buflen)
    return soap->buf[soap->bufidx++];
  soap->bufidx = 0;
  soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket=%d/fd=%d\n", (unsigned int)soap->buflen, soap->socket, soap->recvfd));
  DBGMSG(RECV, soap->buf, soap->buflen);
  if (soap->buflen)
    return soap->buf[soap->bufidx++];
  return EOF;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xc150(%rdi), %rax
cmpq 0xc158(%rdi), %rax
jae 0x109de
leaq 0x1(%rax), %rcx
movq %rcx, 0xc150(%rbx)
leaq (%rbx,%rax), %r14
addq $0xc198, %r14           # imm = 0xC198
jmp 0x10a29
movq $0x0, 0xc150(%rbx)
leaq 0xc198(%rbx), %r14
movl $0x10000, %edx          # imm = 0x10000
movq %rbx, %rdi
movq %r14, %rsi
callq *0xc030(%rbx)
movq %rax, 0x1e600(%rbx)
movq %rax, 0xc158(%rbx)
testq %rax, %rax
je 0x10a35
movq 0xc150(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc150(%rbx)
addq %rax, %r14
movsbl (%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x10a2d
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_getchar
SOAP_FMAC2
soap_getchar(struct soap *soap)
{ register soap_wchar c;
  c = soap->ahead;
  if (c)
  { if (c != EOF)
      soap->ahead = 0;
    return c;
  }
  return soap_get1(soap);
}

// Assembly:
movl 0xc160(%rdi), %eax
cmpl $-0x1, %eax
je 0x10d0c
pushq %rbx
movq %rdi, %rbx
testl %eax, %eax
jne 0x10d01
movq 0xc150(%rbx), %rax
cmpq 0xc158(%rbx), %rax
jb 0x10ce5
movq %rbx, %rdi
callq 0x10a3c
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x10d0b
movq 0xc150(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc150(%rbx)
movzbl 0xc198(%rbx,%rax), %eax
jmp 0x10d0b
movl $0x0, 0xc160(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_code_int
SOAP_FMAC1
long
SOAP_FMAC2
soap_code_int(const struct soap_code_map *code_map, const char *str, long other)
{ if (code_map)
  { while (code_map->string)
    { if (!soap_tag_cmp(str, code_map->string)) /* case insensitive */
        return code_map->code;
      code_map++;
    }
  }
  return other;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
testq %rdi, %rdi
je 0x10d88
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rdi), %rsi
testq %rsi, %rsi
je 0x10d88
movq %r15, %rdi
callq 0x10d91
testl %eax, %eax
je 0x10d85
movq 0x18(%r14), %rsi
addq $0x10, %r14
jmp 0x10d6a
movq (%r14), %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_code_str
SOAP_FMAC1
const char*
SOAP_FMAC2
soap_code_str(const struct soap_code_map *code_map, long code)
{ if (!code_map)
    return NULL;
  while (code_map->code != code && code_map->string)
    code_map++;
  return code_map->string;
}

// Assembly:
testq %rdi, %rdi
je 0x10ebc
cmpq %rsi, (%rdi)
jne 0x10ea3
movq %rdi, %rax
jmp 0x10eb7
cmpq $0x0, 0x8(%rdi)
je 0x10e9e
leaq 0x10(%rdi), %rax
cmpq %rsi, 0x10(%rdi)
movq %rax, %rdi
jne 0x10ea3
movq 0x8(%rax), %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_code_bits
SOAP_FMAC1
long
SOAP_FMAC2
soap_code_bits(const struct soap_code_map *code_map, const char *str)
{ register long bits = 0;
  if (code_map)
  { while (str && *str)
    { const struct soap_code_map *p;
      for (p = code_map; p->string; p++)
      { register size_t n = strlen(p->string);
        if (!strncmp(p->string, str, n) && soap_blank((soap_wchar)str[n]))
        { bits |= p->code;
          str += n;
          while (*str > 0 && *str <= 32)
            str++;
          break;
        }
      }
      if (!p->string)
        return 0;
    }
  }
  return bits;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x10f56
movq %rsi, %rbx
xorl %r15d, %r15d
cmpb $0x0, (%rbx)
je 0x10f59
movq (%rsp), %r14
movq 0x8(%r14), %r12
testq %r12, %r12
sete %bpl
je 0x10f49
movq %r12, %rdi
callq 0x3110
movq %rax, %r13
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3070
movb $0x1, %cl
testl %eax, %eax
jne 0x10f3b
cmpb $0x20, (%rbx,%r13)
ja 0x10f3b
movq (%r14), %rax
addq %r13, %rbx
decq %rbx
movb 0x1(%rbx), %cl
incq %rbx
decb %cl
cmpb $0x20, %cl
jb 0x10f29
orq %rax, %r15
xorl %ecx, %ecx
testb %cl, %cl
je 0x10f49
movq 0x18(%r14), %r12
addq $0x10, %r14
jmp 0x10ef1
testb $0x1, %bpl
jne 0x10f56
testq %rbx, %rbx
jne 0x10ee4
jmp 0x10f59
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_code_list
SOAP_FMAC1
const char*
SOAP_FMAC2
soap_code_list(struct soap *soap, const struct soap_code_map *code_map, long code)
{ register char *t = soap->tmpbuf;
  if (code_map)
  { while (code_map->string)
    { if (code_map->code & code)
      { register const char *s = code_map->string;
        if (t != soap->tmpbuf)
          *t++ = ' ';
        while (*s && t < soap->tmpbuf + sizeof(soap->tmpbuf) - 1)
          *t++ = *s++;
        if (t == soap->tmpbuf + sizeof(soap->tmpbuf) - 1)
          break;
      }
      code_map++;
    }
  }
  *t = '\0';
  return soap->tmpbuf;
}

// Assembly:
leaq 0x1c598(%rdi), %rax
movq %rax, %r9
testq %rsi, %rsi
je 0x11005
leaq 0x1c598(%rdi), %r9
movq 0x8(%rsi), %r8
testq %r8, %r8
je 0x11005
movl $0x1c598, %ecx          # imm = 0x1C598
testq %rdx, (%rsi)
je 0x10ff4
cmpq $0x1c598, %rcx          # imm = 0x1C598
je 0x10fa8
incq %rcx
movb $0x20, (%r9)
leaq (%rdi,%rcx), %r9
movb (%r8), %r10b
testb %r10b, %r10b
je 0x10fe5
cmpq $0x1c996, %rcx          # imm = 0x1C996
jg 0x10fe5
incq %r8
leaq 0x1(%rcx), %r11
movb %r10b, (%rdi,%rcx)
movb (%r8), %r10b
testb %r10b, %r10b
je 0x10fdf
incq %r8
cmpq $0x1c996, %rcx          # imm = 0x1C996
movq %r11, %rcx
jl 0x10fc0
leaq (%rdi,%r11), %r9
jmp 0x10fe8
movq %rcx, %r11
movq %r11, %rcx
cmpq $0x1c997, %r11          # imm = 0x1C997
je 0x11005
leaq (%rdi,%rcx), %r9
movq 0x18(%rsi), %r8
addq $0x10, %rsi
testq %r8, %r8
jne 0x10f93
movb $0x0, (%r9)
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_puthex
SOAP_FMAC2
soap_puthex(struct soap *soap, const unsigned char *s, int n)
{ char d[2];
  register int i;
#ifdef WITH_DOM
  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
      return soap->error;
    return SOAP_OK;
  }
#endif
  for (i = 0; i < n; i++)
  { register int m = *s++;
    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
    m &= 0x0F;
    d[1] = (char)(m + (m > 9 ? '7' : '0'));
    if (soap_send_raw(soap, d, 2))
      return soap->error;
  }
  return SOAP_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %edx, %edx
jle 0x11b32
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r12d
xorl %r13d, %r13d
movl $0x37, %r15d
movb (%rbx,%r13), %al
movl %eax, %ecx
shrb $0x4, %cl
cmpb $-0x60, %al
movl $0x30, %edx
cmovael %r15d, %edx
addb %cl, %dl
movb %dl, 0x6(%rsp)
andb $0xf, %al
cmpb $0xa, %al
movl $0x30, %ecx
cmovael %r15d, %ecx
addb %al, %cl
movb %cl, 0x7(%rsp)
movl $0x2, %edx
movq %r14, %rdi
leaq 0x6(%rsp), %rsi
callq 0x102a8
testl %eax, %eax
je 0x11b26
movl 0x1f274(%r14), %ebp
testl %eax, %eax
jne 0x11b34
incq %r13
cmpl %r13d, %r12d
jne 0x11adc
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_element_begin_in
SOAP_FMAC2
soap_element_begin_in(struct soap *soap, const char *tag, int nillable, const char *type)
{ if (!soap_peek_element(soap))
  { if (soap->other)
      return soap->error = SOAP_TAG_MISMATCH;
    if (tag && *tag == '-')
      return SOAP_OK;
	//printf("soap_element_begin_in %s %s\r\n", soap->tag, tag);
    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
    { soap->peeked = 0;
      if (type && *soap->type && soap_match_tag(soap, soap->type, type))
        return soap->error = SOAP_TYPE;
      if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT))
        return soap->error = SOAP_NULL;
      if (soap->body)
        soap->level++;
      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:SOAP_STR_EOS ));
    }
	//else
	//	printf("soap_element_begin_in %s %s failed=%d\r\n", soap->tag, tag,soap->error);
  }
  else if (soap->error == SOAP_NO_TAG && tag && *tag == '-')
    soap->error = SOAP_OK;
  return soap->error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x122e8
testl %eax, %eax
je 0x13041
testq %r15, %r15
je 0x130da
cmpl $0x6, 0x1f274(%rbx)
jne 0x130da
cmpb $0x2d, (%r15)
jne 0x130da
movl $0x0, 0x1f274(%rbx)
jmp 0x130da
cmpw $0x0, 0x1e598(%rbx)
je 0x1305f
movl $0x3, 0x1f274(%rbx)
movl $0x3, %eax
jmp 0x130e0
testq %r15, %r15
je 0x1306c
xorl %eax, %eax
cmpb $0x2d, (%r15)
je 0x130e0
leaq 0x1c998(%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x1432a
movl %eax, 0x1f274(%rbx)
testl %eax, %eax
jne 0x130da
movw $0x0, 0x1e5f6(%rbx)
testq %r14, %r14
je 0x130c6
cmpb $0x0, 0x1d598(%rbx)
je 0x130c6
leaq 0x1d598(%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x1432a
testl %eax, %eax
je 0x130c6
movl $0x4, 0x1f274(%rbx)
movl $0x4, %eax
jmp 0x130e0
testl %ebp, %ebp
je 0x130eb
cmpw $0x0, 0xc166(%rbx)
je 0x130da
incl 0xc168(%rbx)
movl 0x1f274(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpw $0x0, 0x1e5ec(%rbx)
je 0x130ca
testb $0x10, 0x5(%rbx)
je 0x130ca
movl $0x17, 0x1f274(%rbx)
movl $0x17, %eax
jmp 0x130e0
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_dime_forward
SOAP_FMAC2
soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
{ struct soap_xlist *xp;
  *ptr = NULL;
  *size = 0;
  *id = NULL;
  *type = NULL;
  *options = NULL;
  if (!*soap->href)
    return SOAP_OK;
  *id = soap_strdup(soap, soap->href);
  xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
  if (!xp)
    return soap->error = SOAP_EOM;
  xp->next = soap->xlist;
  xp->ptr = ptr;
  xp->size = size;
  xp->id = *id;
  xp->type = type;
  xp->options = options;
  soap->xlist = xp;
  return SOAP_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %ebx, %ebx
movq %rbx, (%rsi)
movl $0x0, (%rdx)
movq %rbx, (%rcx)
movq %rbx, (%r8)
movq %rbx, (%r9)
cmpb $0x0, 0x1d198(%rdi)
je 0x131b2
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r12
movq %r8, 0x8(%rsp)
movq %r9, 0x10(%rsp)
leaq 0x1d198(%rdi), %rsi
callq 0x13324
movq %rax, %r15
movq %rax, (%r14)
movl $0x30, %edi
callq 0x3240
testq %rax, %rax
je 0x131a1
movq 0x1f310(%r12), %rcx
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
movq %r13, 0x10(%rax)
movq %r15, 0x18(%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq %rax, 0x1f310(%r12)
jmp 0x131b2
movl $0x14, 0x1f274(%r12)
movl $0x14, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_strdup
SOAP_FMAC1
char *
SOAP_FMAC2
soap_strdup(struct soap *soap, const char *s)
{ char *t = NULL;
  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
    strcpy(t, s);
  return t;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x1335e
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x3110
leaq 0x1(%rax), %rsi
movq %r14, %rdi
callq 0x11dba
testq %rax, %rax
je 0x1335e
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3080
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_wstrdup
SOAP_FMAC1
wchar_t *
SOAP_FMAC2
soap_wstrdup(struct soap *soap, const wchar_t *s)
{ wchar_t *t = NULL;
  if (s)
  { size_t n = 0;
    while (s[n])
      n++;
    if ((t = (wchar_t*)soap_malloc(soap, sizeof(wchar_t)*(n+1))))
      memcpy(t, s, sizeof(wchar_t)*(n+1));
  }
  return t;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x133a4
movq %rsi, %rbx
xorl %r14d, %r14d
cmpl $0x0, (%rbx,%r14)
leaq 0x4(%r14), %r14
jne 0x13377
movq %r14, %rsi
callq 0x11dba
testq %rax, %rax
je 0x133a6
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3220
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_pop_block
SOAP_FMAC2
soap_pop_block(struct soap *soap, struct soap_blist *b)
{ char *p;
  if (!b)
    b = soap->blist;
  if (!b->ptr)
    return;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
  p = b->ptr;
  b->size -= *(size_t*)(p + sizeof(char*));
  b->ptr = *(char**)p;
  SOAP_FREE(soap, p);
}

// Assembly:
testq %rsi, %rsi
jne 0x133f5
movq 0x90(%rdi), %rsi
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x13412
movq 0x8(%rdi), %rax
subq %rax, 0x10(%rsi)
movq (%rdi), %rax
movq %rax, 0x8(%rsi)
jmp 0x3030
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_size_block
SOAP_FMAC2
soap_size_block(struct soap *soap, struct soap_blist *b, size_t n)
{ if (!b)
    b = soap->blist;
  if (b->ptr)
  { b->size -= *(size_t*)(b->ptr + sizeof(char*)) - n;
    *(size_t*)(b->ptr + sizeof(char*)) = n;
  }
  return b->size;
}

// Assembly:
testq %rsi, %rsi
jne 0x136a0
movq 0x90(%rdi), %rsi
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x136b8
movq %rdx, %rcx
subq 0x8(%rax), %rcx
addq %rcx, 0x10(%rsi)
movq %rdx, 0x8(%rax)
movq 0x10(%rsi), %rax
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_next_block
SOAP_FMAC1
char*
SOAP_FMAC2
soap_next_block(struct soap *soap, struct soap_blist *b)
{ char *p;
  if (!b)
    b = soap->blist;
  p = b->ptr;
  if (p)
  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
    b->ptr = *(char**)p;
    SOAP_FREE(soap, p);
    if (b->ptr)
      return b->ptr + sizeof(char*) + sizeof(size_t);
  }
  return NULL;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
testq %rsi, %rsi
jne 0x136fe
movq 0x90(%rdi), %rbx
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x13724
movq (%rdi), %rax
movq %rax, 0x8(%rbx)
callq 0x3030
movq 0x8(%rbx), %rcx
leaq 0x10(%rcx), %rax
testq %rcx, %rcx
cmoveq %rcx, %rax
jmp 0x13726
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_putsizesoffsets
SOAP_FMAC1
char *
SOAP_FMAC2
soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
{ int i;
  if (!type)
    return NULL;
  if (soap->version == 2)
  { sprintf(soap->type, "%s[%d", type, size[0]);
    for (i = 1; i < dim; i++)
      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
  }
  else
  { if (offset)
    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
      for (i = 1; i < dim; i++)
        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
    }
    else
    { sprintf(soap->type, "%s[%d", type, size[0]);
      for (i = 1; i < dim; i++)
        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
    }
    strcat(soap->type, "]");
  }
  return soap->type;
}

// Assembly:
testq %rsi, %rsi
je 0x13a29
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rdx, %r14
movq %rsi, %rdx
cmpw $0x2, 0x2(%rdi)
movq %rdi, (%rsp)
jne 0x13a2c
leaq 0x1d598(%rdi), %r15
movl (%r14), %ecx
leaq 0x126c4(%rip), %rsi     # 0x260a4
movq %r15, %rdi
xorl %eax, %eax
callq 0x3300
cmpl $0x2, %ebp
jl 0x13aeb
movl %ebp, %r13d
movl $0x1, %ebx
leaq 0x1362d(%rip), %r12     # 0x2702f
movq %r15, %rdi
callq 0x3110
leaq (%rax,%r15), %rdi
movl (%r14,%rbx,4), %edx
movq %r12, %rsi
xorl %eax, %eax
callq 0x3300
incq %rbx
cmpq %rbx, %r13
jne 0x13a02
jmp 0x13aeb
xorl %eax, %eax
retq
movq %rcx, %r12
leaq 0x1d598(%rdi), %r15
movl (%r14), %ecx
testq %r12, %r12
je 0x13a8e
addl (%r12), %ecx
leaq 0x1265b(%rip), %rsi     # 0x260a4
movq %r15, %rdi
xorl %eax, %eax
callq 0x3300
cmpl $0x2, %ebp
jl 0x13ad5
movl %ebp, %ebp
movl $0x1, %ebx
leaq 0x12644(%rip), %r13     # 0x260aa
movq %r15, %rdi
callq 0x3110
leaq (%rax,%r15), %rdi
movl (%r12,%rbx,4), %edx
addl (%r14,%rbx,4), %edx
movq %r13, %rsi
xorl %eax, %eax
callq 0x3300
incq %rbx
cmpq %rbx, %rbp
jne 0x13a66
jmp 0x13ad5
leaq 0x1260f(%rip), %rsi     # 0x260a4
movq %r15, %rdi
xorl %eax, %eax
callq 0x3300
cmpl $0x2, %ebp
jl 0x13ad5
movl %ebp, %r13d
movl $0x1, %ebx
leaq 0x125f7(%rip), %r12     # 0x260aa
movq %r15, %rdi
callq 0x3110
leaq (%rax,%r15), %rdi
movl (%r14,%rbx,4), %edx
movq %r12, %rsi
xorl %eax, %eax
callq 0x3300
incq %rbx
cmpq %rbx, %r13
jne 0x13ab3
movq %r15, %rdi
callq 0x3110
movq (%rsp), %rcx
movw $0x5d, 0x1d598(%rcx,%rax)
movq (%rsp), %rax
addq $0x1d598, %rax          # imm = 0x1D598
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_putoffsets
SOAP_FMAC1
char *
SOAP_FMAC2
soap_putoffsets(struct soap *soap, const int *offset, int dim)
{ register int i;
  sprintf(soap->arrayOffset, "[%d", offset[0]);
  for (i = 1; i < dim; i++)
    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
  strcat(soap->arrayOffset, "]");
  return soap->arrayOffset;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x1e198, %rbx          # imm = 0x1E198
movl (%rsi), %edx
leaq 0x12541(%rip), %rsi     # 0x260a6
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3300
cmpl $0x2, %ebp
jl 0x13ba6
movl %ebp, %r12d
movl $0x1, %r13d
leaq 0x12526(%rip), %r15     # 0x260aa
movq %rbx, %rdi
callq 0x3110
leaq (%rax,%rbx), %rdi
movl (%r14,%r13,4), %edx
movq %r15, %rsi
xorl %eax, %eax
callq 0x3300
incq %r13
cmpq %r13, %r12
jne 0x13b84
movq %rbx, %rdi
callq 0x3110
movw $0x5d, (%rbx,%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_size
SOAP_FMAC2
soap_size(const int *size, int dim)
{ register int i, n = size[0];
  for (i = 1; i < dim; i++)
    n *= size[i];
  return n;
}

// Assembly:
movl (%rdi), %eax
cmpl $0x2, %esi
jl 0x13be0
movl %esi, %ecx
movl $0x1, %edx
imull (%rdi,%rdx,4), %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x13bd4
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_getoffsets
SOAP_FMAC2
soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
{ register int i, j = 0;
  if (offset)
    for (i = 0; i < dim && attr && *attr; i++)
    { attr++;
      j *= size[i];
      j += offset[i] = (int)soap_strtol(attr, NULL, 10);
      attr = strchr(attr, ',');
    }
  else
    for (i = 0; i < dim && attr && *attr; i++)
    { attr++;
      j *= size[i];
      j += (int)soap_strtol(attr, NULL, 10);
      attr = strchr(attr, ',');
    }
  return j;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
testl %ecx, %ecx
setg %dl
testq %rdi, %rdi
setne %al
andb %dl, %al
testq %r12, %r12
je 0x13c63
testb %al, %al
je 0x13cb9
movl %ecx, %r13d
xorl %r15d, %r15d
movl $0x1, %ebp
cmpb $0x0, (%r14)
je 0x13cbc
incq %r14
imull -0x4(%rbx,%rbp,4), %r15d
movq %r14, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3210
movl %eax, -0x4(%r12,%rbp,4)
addl %eax, %r15d
movq %r14, %rdi
movl $0x2c, %esi
callq 0x3130
cmpq %r13, %rbp
jae 0x13cbc
movq %rax, %r14
incq %rbp
testq %rax, %rax
jne 0x13c1a
jmp 0x13cbc
testb %al, %al
je 0x13cb9
movl %ecx, %r12d
xorl %r15d, %r15d
movl $0x1, %r13d
cmpb $0x0, (%r14)
je 0x13cbc
incq %r14
movl %r15d, %ebp
imull -0x4(%rbx,%r13,4), %ebp
movq %r14, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3210
movq %rax, %r15
addl %ebp, %r15d
movq %r14, %rdi
movl $0x2c, %esi
callq 0x3130
cmpq %r12, %r13
jae 0x13cbc
movq %rax, %r14
incq %r13
testq %rax, %rax
jne 0x13c73
jmp 0x13cbc
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_getsizes
SOAP_FMAC2
soap_getsizes(const char *attr, int *size, int dim)
{ register int i, k, n;
  if (!*attr)
    return -1;
  i = (int)strlen(attr);
  n = 1;
  do
  { for (i = i-1; i >= 0; i--)
      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
        break;
    k = (int)soap_strtol(attr + i + 1, NULL, 10);
    n *= size[--dim] = k;
    if (k < 0 || n > SOAP_MAXARRAYSIZE)
      return -1;
  } while (i >= 0 && attr[i] != '[');
  return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
cmpb $0x0, (%rdi)
je 0x13e9a
movl %edx, %ebp
movq %rdi, %r14
callq 0x3110
movq %rax, %rbx
movslq %ebp, %r12
movl $0x1, %ebp
movabsq $0x800000000001001, %rsi # imm = 0x800000000001001
movl %ebx, %eax
movl %ebx, %ecx
sarl $0x1f, %ecx
andl %ebx, %ecx
decl %ecx
decq %rax
movl %ebx, %r15d
testl %ebx, %ebx
jle 0x13e40
movl %eax, %edx
movzbl (%r14,%rdx), %edx
leal -0x1(%r15), %ebx
decq %rax
addl $-0x20, %edx
cmpl $0x3b, %edx
ja 0x13e1b
btq %rdx, %rsi
jae 0x13e1b
jmp 0x13e42
movl %ecx, %ebx
movslq %ebx, %r13
leaq (%r14,%r13), %rdi
incq %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3210
imull %eax, %ebp
testl %eax, %eax
sets %dl
cmpl $0xf4241, %ebp          # imm = 0xF4241
setge %cl
orb %dl, %cl
movq (%rsp), %rdx
movl %eax, -0x4(%rdx,%r12,4)
testl %r15d, %r15d
jle 0x13ea1
testb %cl, %cl
jne 0x13ea1
addq %r14, %r13
decq %r12
cmpb $0x5b, (%r13)
movabsq $0x800000000001001, %rsi # imm = 0x800000000001001
jne 0x13e0d
jmp 0x13eab
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x13eab
testb %cl, %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovnel %eax, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_getposition
SOAP_FMAC2
soap_getposition(const char *attr, int *pos)
{ register int i, n;
  if (!*attr)
    return -1;
  n = 0;
  i = 1;
  do
  { pos[n++] = (int)soap_strtol(attr + i, NULL, 10);
    while (attr[i] && attr[i] != ',' && attr[i] != ']')
      i++;
    if (attr[i] == ',')
      i++;
  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
  return n;
}

// Assembly:
cmpb $0x0, (%rdi)
je 0x13f3a
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %ebp
xorl %r12d, %r12d
movslq %ebp, %r15
addq %r14, %r15
movq %r15, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3210
movq %rax, %rcx
leaq 0x1(%r12), %rax
movl %ecx, (%rbx,%r12,4)
movl %ebp, %ecx
movzbl (%r15), %edx
testl %edx, %edx
je 0x13f13
cmpl $0x2c, %edx
je 0x13f13
cmpl $0x5d, %edx
je 0x13f13
incl %ecx
incq %r15
jmp 0x13efa
cmpq $0xf, %r12
je 0x13f40
xorl %ebp, %ebp
cmpb $0x2c, %dl
sete %bpl
addl %ecx, %ebp
movslq %ebp, %rcx
movzbl (%r14,%rcx), %ecx
cmpl $0x5d, %ecx
je 0x13f45
movq %rax, %r12
testl %ecx, %ecx
jne 0x13ed7
jmp 0x13f45
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
movl $0x10, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_match_namespace
SOAP_FMAC2
soap_match_namespace(struct soap *soap, const char *id1, const char *id2, size_t n1, size_t n2)
{ register struct soap_nlist *np = soap->nlist;
  const char *s;
  while (np && (strncmp(np->id, id1, n1) || np->id[n1]))
    np = np->next;
  if (np)
  { if (!(soap->mode & SOAP_XML_IGNORENS))
      if (np->index < 0
       || ((s = soap->local_namespaces[np->index].id) && (strncmp(s, id2, n2) || (s[n2] && s[n2] != '_'))))
        return SOAP_NAMESPACE;
    return SOAP_OK;
  }
  if (n1 == 0)
    return (soap->mode & SOAP_XML_IGNORENS) ? SOAP_OK : SOAP_NAMESPACE;
  if ((n1 == 3 && n1 == n2 && !strncmp(id1, "xml", 3) && !strncmp(id1, id2, 3))
   || (soap->mode & SOAP_XML_IGNORENS))
    return SOAP_OK;
  return soap->error = SOAP_SYNTAX_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r13
movq %rdx, (%rsp)
movq %rsi, %r12
movq %rdi, %rbx
movq 0x88(%rdi), %r14
testq %r14, %r14
je 0x14174
leaq 0x18(%r14), %rbp
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3070
testl %eax, %eax
jne 0x1416f
cmpb $0x0, (%rbp,%r13)
je 0x141de
movq (%r14), %r14
jmp 0x1414c
cmpq $0x3, %r13
je 0x14190
testq %r13, %r13
jne 0x141c3
xorl %eax, %eax
testb $0x40, 0x5(%rbx)
sete %al
leal (%rax,%rax,8), %eax
jmp 0x1423a
cmpq $0x3, %r15
jne 0x141c3
leaq 0x127b8(%rip), %rsi     # 0x26955
movl $0x3, %edx
movq %r12, %rdi
callq 0x3070
testl %eax, %eax
jne 0x141c3
movl $0x3, %edx
movq %r12, %rdi
movq (%rsp), %rsi
callq 0x3070
testl %eax, %eax
je 0x141da
testb $0x40, 0x5(%rbx)
jne 0x141da
movl $0x5, 0x1f274(%rbx)
movl $0x5, %eax
jmp 0x1423a
xorl %eax, %eax
jmp 0x1423a
xorl %eax, %eax
testb $0x40, 0x5(%rbx)
jne 0x1423a
movswq 0xc(%r14), %rcx
testq %rcx, %rcx
js 0x14235
movq 0x80(%rbx), %rdx
shlq $0x5, %rcx
movq (%rdx,%rcx), %rbx
testq %rbx, %rbx
je 0x1423a
movq %rbx, %rdi
movq (%rsp), %rsi
movq %r15, %rdx
callq 0x3070
movl %eax, %ecx
movl $0x9, %eax
testl %ecx, %ecx
jne 0x1423a
movb (%rbx,%r15), %al
xorl %ecx, %ecx
cmpb $0x5f, %al
setne %cl
xorl %edx, %edx
testb %al, %al
leal (%rcx,%rcx,8), %eax
cmovel %edx, %eax
jmp 0x1423a
movl $0x9, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: tcp_error
static const char*
tcp_error(struct soap *soap)
{ register const char *msg = NULL;
  switch (soap->errmode)
  { case 0:
      msg = soap_strerror(soap);
      break;
    case 1:
      msg = "WSAStartup failed";
      break;
    case 2:
    {
#ifndef WITH_LEAN
      msg = soap_code_str(h_error_codes, soap->errnum);
      if (!msg)
#endif
      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
        msg = soap->msgbuf;
      }
    }
  }
  return msg;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x1f278(%rdi), %eax
cmpl $0x2, %eax
je 0x148f6
cmpl $0x1, %eax
je 0x148ed
testl %eax, %eax
jne 0x1490c
movq %rbx, %rdi
popq %rbx
jmp 0x242ce
leaq 0x12a89(%rip), %rax     # 0x2737d
jmp 0x1495b
movslq 0x1f27c(%rbx), %rdx
cmpq $0x1, %rdx
jne 0x14910
leaq 0x1f206(%rip), %rsi     # 0x33b10
jmp 0x14937
xorl %eax, %eax
jmp 0x1495b
leaq 0x1f1f9(%rip), %rcx     # 0x33b10
leaq 0x1f242(%rip), %rax     # 0x33b60
cmpq $0x0, 0x8(%rcx)
je 0x14934
leaq 0x10(%rcx), %rsi
cmpq %rdx, 0x10(%rcx)
movq %rsi, %rcx
jne 0x1491e
jmp 0x14937
movq %rax, %rsi
movq 0x8(%rsi), %rax
testq %rax, %rax
jne 0x1495b
addq $0x1c198, %rbx          # imm = 0x1C198
leaq 0x12a41(%rip), %rsi     # 0x2738f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3300
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_closesock
SOAP_FMAC2
soap_closesock(struct soap *soap)
{ register int status = soap->error;
#ifndef WITH_LEANER
  if (status) /* close on error: attachment state is not to be trusted */
  { soap->mime.first = NULL;
    soap->mime.last = NULL;
    soap->dime.first = NULL;
    soap->dime.last = NULL;
  }
#endif
  if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap)))
    return soap->error;
  if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive)
  { if (soap->fclose && (soap->error = soap->fclose(soap)))
      return soap->error;
    soap->keep_alive = 0;
  }
#ifdef WITH_ZLIB
  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
    deflateEnd(soap->d_stream);
  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
    inflateEnd(soap->d_stream);
  soap->zlib_state = SOAP_ZLIB_NONE;
#endif
  return soap->error = status;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x1f274(%rdi), %ebx
testl %ebx, %ebx
je 0x14981
xorps %xmm0, %xmm0
movups %xmm0, 0x1f2d8(%r14)
movups %xmm0, 0x1f300(%r14)
movq 0xbff8(%r14), %rax
testq %rax, %rax
je 0x1499d
movq %r14, %rdi
callq *%rax
movl %eax, 0x1f274(%r14)
testl %eax, %eax
jne 0x149cb
leal 0x1(%rbx), %eax
cmpl $0x1f, %eax
ja 0x149db
movl $0xa0000001, %ecx       # imm = 0xA0000001
btl %eax, %ecx
jae 0x149db
movq 0xc020(%r14), %rax
testq %rax, %rax
je 0x149cf
movq %r14, %rdi
callq *%rax
movl %eax, 0x1f274(%r14)
testl %eax, %eax
je 0x149cf
movl %eax, %ebx
jmp 0x149ed
movw $0x0, 0x1f22c(%r14)
jmp 0x149e6
cmpw $0x0, 0x1f22c(%r14)
je 0x149af
movl %ebx, 0x1f274(%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_poll
SOAP_FMAC2
soap_poll(struct soap *soap)
{
#ifndef WITH_LEAN
  register int r;
  if (soap_valid_socket(soap->socket))
  { r = tcp_select(soap, soap->socket, SOAP_TCP_SELECT_ALL, 0);
    if (r > 0 && (r & SOAP_TCP_SELECT_ERR))
      r = -1;
  }
  else if (soap_valid_socket(soap->master))
    r = tcp_select(soap, soap->master, SOAP_TCP_SELECT_SND, 0);
  else
    return SOAP_OK; /* OK when no socket! */
  if (r > 0)
  {
#ifdef WITH_OPENSSL
    if (soap->imode & SOAP_ENC_SSL)
    {
      if (soap_valid_socket(soap->socket)
       && (r & SOAP_TCP_SELECT_SND)
       && (!(r & SOAP_TCP_SELECT_RCV)
        || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0))
        return SOAP_OK;
    }
    else
#endif
      if (soap_valid_socket(soap->socket)
       && (r & SOAP_TCP_SELECT_SND)
       && (!(r & SOAP_TCP_SELECT_RCV)
        || recv(soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0))
        return SOAP_OK;
  }
  else if (r < 0)
  { if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno(soap->master) != SOAP_EINTR)
    { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR);
      return soap->error = SOAP_TCP_ERROR;
    }
  }
  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r));
  return SOAP_EOF;
#else
  return SOAP_OK;
#endif
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xc134(%rdi), %esi
cmpl $-0x1, %esi
je 0x14a2a
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x7, %edx
xorl %ecx, %ecx
callq 0x14afd
testl %eax, %eax
jle 0x14a44
movl %eax, %ecx
andl $0x4, %ecx
negl %ecx
sbbl %ebp, %ebp
orl %ebp, %eax
jmp 0x14a44
movl 0xc130(%rbx), %esi
cmpl $-0x1, %esi
je 0x14aaf
movq %rbx, %rdi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x14afd
testl %eax, %eax
jle 0x14a83
movl 0xc134(%rbx), %edi
cmpl $-0x1, %edi
sete %cl
testb $0x2, %al
sete %dl
orb %cl, %dl
jne 0x14aa1
xorl %ebp, %ebp
testb $0x1, %al
je 0x14aa6
addq $0x1c598, %rbx          # imm = 0x1C598
movl $0x1, %edx
movq %rbx, %rsi
movl $0x2, %ecx
callq 0x3040
testq %rax, %rax
jg 0x14aa6
jmp 0x14aa1
jns 0x14aa1
cmpl $-0x1, 0xc130(%rbx)
jne 0x14a97
cmpl $-0x1, 0xc134(%rbx)
je 0x14aa1
callq 0x3050
cmpl $0x4, (%rax)
jne 0x14ab3
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x14aa6
movq %rbx, %rdi
callq 0x148cc
cmpw $0x2, 0x2(%rbx)
leaq 0x1257c(%rip), %rcx     # 0x27043
leaq 0x12565(%rip), %rsi     # 0x27033
cmoveq %rcx, %rsi
leaq 0x1173b(%rip), %r8      # 0x26214
movl $0x1c, %ebp
movq %rbx, %rdi
xorl %edx, %edx
movq %rax, %rcx
movl $0x1c, %r9d
callq 0x245f7
movl $0x1c, 0x1f274(%rbx)
jmp 0x14aa6
// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_free_temp
SOAP_FMAC2
soap_free_temp(struct soap *soap)
{ register struct soap_attribute *tp, *tq;
  register struct Namespace *ns;
  soap_free_ns(soap);
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n"));
  while (soap->blist)
    soap_end_block(soap, NULL);
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n"));
  for (tp = soap->attributes; tp; tp = tq)
  { tq = tp->next;
    if (tp->value)
      SOAP_FREE(soap, tp->value);
    SOAP_FREE(soap, tp);
  }
  soap->attributes = NULL;
#ifdef WITH_FAST
  if (soap->labbuf)
    SOAP_FREE(soap, soap->labbuf);
  soap->labbuf = NULL;
  soap->lablen = 0;
  soap->labidx = 0;
#endif
  ns = soap->local_namespaces;
  if (ns)
  { for (; ns->id; ns++)
    { if (ns->out)
      { if (soap->encodingStyle == ns->out)
          soap->encodingStyle = SOAP_STR_EOS;
        SOAP_FREE(soap, ns->out);
        ns->out = NULL;
      }
      if (soap->encodingStyle == ns->ns)
        soap->encodingStyle = SOAP_STR_EOS;
    }
    SOAP_FREE(soap, soap->local_namespaces);
    soap->local_namespaces = NULL;
  }
#ifndef WITH_LEANER
  while (soap->xlist)
  { struct soap_xlist *xp = soap->xlist->next;
    SOAP_FREE(soap, soap->xlist);
    soap->xlist = xp;
  }
#endif
#ifndef WITH_NOIDREF
  soap_free_pht(soap);
  soap_free_iht(soap);
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x88(%rdi), %rdi
testq %rdi, %rdi
je 0x154ff
movq (%rdi), %r14
callq 0x3030
movq %r14, %rdi
testq %r14, %r14
jne 0x154ef
movq $0x0, 0x88(%rbx)
cmpq $0x0, 0x90(%rbx)
je 0x15520
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1373d
jmp 0x1550a
movq 0x1e5e0(%rbx), %r14
testq %r14, %r14
je 0x1554d
movq (%r14), %r15
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x1553d
callq 0x3030
movq %r14, %rdi
callq 0x3030
movq %r15, %r14
testq %r15, %r15
jne 0x1552c
movq $0x0, 0x1e5e0(%rbx)
leaq 0xc180(%rbx), %r14
movq 0xc180(%rbx), %rdi
testq %rdi, %rdi
je 0x15570
callq 0x3030
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movq 0x80(%rbx), %r14
testq %r14, %r14
je 0x155eb
cmpq $0x0, (%r14)
je 0x155d4
addq $0x20, %r14
leaq 0x10a25(%rip), %r15     # 0x25fc1
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x155bc
cmpq %rdi, 0x38(%rbx)
jne 0x155af
movq %r15, 0x38(%rbx)
callq 0x3030
movq $0x0, -0x8(%r14)
movq 0x38(%rbx), %rax
cmpq -0x18(%r14), %rax
jne 0x155ca
movq %r15, 0x38(%rbx)
cmpq $0x0, (%r14)
leaq 0x20(%r14), %r14
jne 0x1559c
movq 0x80(%rbx), %rdi
callq 0x3030
movq $0x0, 0x80(%rbx)
movq 0x1f310(%rbx), %rdi
testq %rdi, %rdi
je 0x1560e
movq (%rdi), %r14
callq 0x3030
movq %r14, 0x1f310(%rbx)
movq %r14, %rdi
testq %r14, %r14
jne 0x155f7
movq 0xbf20(%rbx), %rdi
testq %rdi, %rdi
je 0x1562a
movq (%rdi), %r14
callq 0x3030
movq %r14, %rdi
testq %r14, %r14
jne 0x1561a
leaq 0x3f20(%rbx), %rdi
movl $0x800a, %edx           # imm = 0x800A
xorl %esi, %esi
callq 0x3180
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1a295