// File: /workspace/github_c_makefile_star2_O1/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_set_fault
SOAP_FMAC2
soap_set_fault(struct soap *soap)
{ const char **c = soap_faultcode(soap);
  const char **s = soap_faultstring(soap);
  if (soap->fseterror)
    soap->fseterror(soap, c, s);
  if (!*c)
  { if (soap->version == 2)
      *c = "SOAP-ENV:Sender";
    else
      *c = "SOAP-ENV:Client";
  }
  if (*s)
    return;
  switch (soap->error)
  {
#ifndef WITH_LEAN
    case SOAP_CLI_FAULT:
      *s = "Client fault";
      break;
    case SOAP_SVR_FAULT:
      *s = "Server fault";
      break;
    case SOAP_TAG_MISMATCH:
      *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL);
      break;
    case SOAP_TYPE:
      *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type);
      break;
    case SOAP_SYNTAX_ERROR:
      *s = "Well-formedness violation";
      break;
    case SOAP_NO_TAG:
      *s = "No XML root element";
      break;
    case SOAP_MUSTUNDERSTAND:
      *c = "SOAP-ENV:MustUnderstand";
      sprintf(soap->msgbuf, "The data in element '%s' must be understood but cannot be handled", soap->tag);
      *s = soap->msgbuf;
      break;
    case SOAP_VERSIONMISMATCH:
      *c = "SOAP-ENV:VersionMismatch";
      *s = "Invalid SOAP message or SOAP version mismatch";
      break;
    case SOAP_DATAENCODINGUNKNOWN:
      *c = "SOAP-ENV:DataEncodingUnknown";
      *s = "Unsupported SOAP data encoding";
      break;
    case SOAP_NAMESPACE:
      *s = soap_set_validation_fault(soap, "namespace error", NULL);
      break;
    case SOAP_USER_ERROR:
      *s = "User data error";
      break;
    case SOAP_FATAL_ERROR:
      *s = "Fatal error";
      break;
    case SOAP_NO_METHOD:
      sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag);
      *s = soap->msgbuf;
      break;
    case SOAP_NO_DATA:
      *s = "Data required for operation";
      break;
    case SOAP_GET_METHOD:
      *s = "HTTP GET method not implemented";
      break;
    case SOAP_PUT_METHOD:
      *s = "HTTP PUT method not implemented";
      break;
    case SOAP_HTTP_METHOD:
      *s = "HTTP method not implemented";
      break;
    case SOAP_EOM:
      *s = "Out of memory";
      break;
    case SOAP_MOE:
      *s = "Memory overflow or memory corruption error";
      break;
    case SOAP_HDR:
      *s = "Header line too long";
      break;
    case SOAP_IOB:
      *s = "Array index out of bounds";
      break;
    case SOAP_NULL:
      *s = soap_set_validation_fault(soap, "nil not allowed", NULL);
      break;
    case SOAP_DUPLICATE_ID:
      *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id);
      if (soap->version == 2)
        *soap_faultsubcode(soap) = "SOAP-ENC:DuplicateID";
      break;
    case SOAP_MISSING_ID:
      *s = soap_set_validation_fault(soap, "missing id for ref ", soap->id);
      if (soap->version == 2)
        *soap_faultsubcode(soap) = "SOAP-ENC:MissingID";
      break;
    case SOAP_HREF:
      *s = soap_set_validation_fault(soap, "incompatible object type ref/id pair ", soap->id);
      break;
    case SOAP_FAULT:
      break;
#ifndef WITH_NOIO
    case SOAP_UDP_ERROR:
      *s = "Message too large for UDP packet";
      break;
    case SOAP_TCP_ERROR:
      *s = tcp_error(soap);
      break;
#endif
    case SOAP_HTTP_ERROR:
      *s = "An HTTP processing error occurred";
      break;
    case SOAP_SSL_ERROR:
#ifdef WITH_OPENSSL
      *s = "SSL/TLS error";
#else
      *s = "OpenSSL not installed: recompile with -DWITH_OPENSSL";
#endif
      break;
    case SOAP_PLUGIN_ERROR:
      *s = "Plugin registry error";
      break;
    case SOAP_DIME_ERROR:
      *s = "DIME format error";
      break;
    case SOAP_DIME_HREF:
      *s = "DIME href to missing attachment";
      break;
    case SOAP_DIME_MISMATCH:
      *s = "DIME version/transmission error";
      break;
    case SOAP_DIME_END:
      *s = "End of DIME error";
      break;
    case SOAP_MIME_ERROR:
      *s = "MIME format error";
      break;
    case SOAP_MIME_HREF:
      *s = "MIME href to missing attachment";
      break;
    case SOAP_MIME_END:
      *s = "End of MIME error";
      break;
    case SOAP_ZLIB_ERROR:
#ifdef WITH_ZLIB
      sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream->msg?soap->d_stream->msg:SOAP_STR_EOS);
      *s = soap->msgbuf;
#else
      *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP";
#endif
      break;
    case SOAP_REQUIRED:
      *s = soap_set_validation_fault(soap, "missing required attribute", NULL);
      break;
    case SOAP_PROHIBITED:
      *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL);
      break;
    case SOAP_OCCURS:
      *s = soap_set_validation_fault(soap, "occurrence violation", NULL);
      break;
    case SOAP_LENGTH:
      *s = soap_set_validation_fault(soap, "content range or length violation", NULL);
      break;
    case SOAP_FD_EXCEEDED:
      *s = "Maximum number of open connections was reached (no define HAVE_POLL): increase FD_SETSIZE";
      break;
    case SOAP_UTF_ERROR:
      *s = "UTF content encoding error";
      break;
    case SOAP_STOP:
      *s = "Stopped: no response to be sent or received (informative)";
      break;
#endif
    case SOAP_EOF:
#ifndef WITH_NOIO
      strcpy(soap->msgbuf, soap_strerror(soap));
#ifndef WITH_LEAN
      if (strlen(soap->msgbuf) + 25 < sizeof(soap->msgbuf))
      { memmove(soap->msgbuf + 25, soap->msgbuf, strlen(soap->msgbuf) + 1);
        memcpy(soap->msgbuf, "End of file or no input: ", 25);
      }
#endif
      *s = soap->msgbuf;
      break;
#else
      *s = "End of file or no input";
      break;
#endif
    default:
#ifndef WITH_NOHTTP
#ifndef WITH_LEAN
      if (soap->error > 200 && soap->error < 600)
      { sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error));
        *s = soap->msgbuf;
      }
      else
#endif
#endif
      { sprintf(soap->msgbuf, "Error %d", soap->error);
        *s = soap->msgbuf;
      }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x4044
movq %rax, %r15
movq %r14, %rdi
callq 0x40c7
movq %rax, %rbx
movq 0xc040(%r14), %rax
testq %rax, %rax
je 0x23e8a
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq *%rax
cmpq $0x0, (%r15)
jne 0x23eab
cmpw $0x2, 0x2(%r14)
leaq 0x2b6e(%rip), %rax      # 0x26a0b
leaq 0x2b77(%rip), %rcx      # 0x26a1b
cmoveq %rax, %rcx
movq %rcx, (%r15)
cmpq $0x0, (%rbx)
jne 0x24190
movl 0x1f274(%r14), %edx
leal 0x1(%rdx), %eax
cmpl $0x30, %eax
ja 0x23f3b
leaq 0x1f89(%rip), %rcx      # 0x25e54
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1c198(%r14), %r15
movq %r14, %rdi
callq 0x242ce
movq %r15, %rdi
movq %rax, %rsi
callq 0x3080
movq %r15, %rdi
callq 0x3110
leaq 0x19(%rax), %rcx
cmpq $0x3ff, %rcx            # imm = 0x3FF
ja 0x241ed
addq $0x1c1b1, %r14          # imm = 0x1C1B1
incq %rax
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x32b0
movups 0x30d8(%rip), %xmm0     # 0x26ffe
movups %xmm0, (%r15)
movups 0x30d6(%rip), %xmm0     # 0x27007
movups %xmm0, 0x9(%r15)
jmp 0x241ed
cmpl $0x3e8, %edx            # imm = 0x3E8
jne 0x23f4f
leaq 0x307a(%rip), %rax      # 0x26fc4
jmp 0x2418d
leal -0xc9(%rdx), %eax
addq $0x1c198, %r14          # imm = 0x1C198
cmpl $0x18e, %eax            # imm = 0x18E
ja 0x24235
leaq 0xfc02(%rip), %rcx      # 0x33b70
leaq 0xfe5b(%rip), %rax      # 0x33dd0
cmpq $0x0, 0x8(%rcx)
je 0x24248
leaq 0x10(%rcx), %rsi
cmpq %rdx, 0x10(%rcx)
movq %rsi, %rcx
jne 0x23f75
jmp 0x2424b
leaq 0x2f94(%rip), %rsi      # 0x26f2d
jmp 0x24183
leaq 0x2faa(%rip), %rax      # 0x26f4f
jmp 0x2418d
leaq 0x2f4a(%rip), %rsi      # 0x26efb
jmp 0x24183
leaq 0x2e65(%rip), %rax      # 0x26e22
jmp 0x2418d
leaq 0x2e79(%rip), %rax      # 0x26e42
jmp 0x2418d
leaq 0x2e05(%rip), %rax      # 0x26dda
jmp 0x2418d
leaq 0x2f37(%rip), %rsi      # 0x26f18
jmp 0x24183
leaq 0x2d75(%rip), %rax      # 0x26d62
jmp 0x2418d
leaq 0x2ee7(%rip), %rsi      # 0x26ee0
jmp 0x24183
leaq 0x1cd98(%r14), %rdx
leaq 0x2d30(%rip), %rsi      # 0x26d3c
jmp 0x2410a
leaq 0x2ae8(%rip), %rax      # 0x26b00
movq %rax, (%r15)
leaq 0x2af7(%rip), %rax      # 0x26b19
jmp 0x2418d
leaq 0x2f7b(%rip), %rax      # 0x26fa9
jmp 0x2418d
leaq 0x2bba(%rip), %rax      # 0x26bf4
jmp 0x2418d
leaq 0x2d5f(%rip), %rax      # 0x26da5
jmp 0x2418d
leaq 0x2c53(%rip), %rax      # 0x26ca5
jmp 0x2418d
leaq 0x2d25(%rip), %rax      # 0x26d83
jmp 0x2418d
leaq 0x2c02(%rip), %rax      # 0x26c6c
jmp 0x2418d
leaq 0x2d7a(%rip), %rax      # 0x26df0
jmp 0x2418d
leaq 0x2b8e(%rip), %rax      # 0x26c10
jmp 0x2418d
leaq 0x1cd98(%r14), %rdx
leaq 0x2c80(%rip), %rsi      # 0x26d15
movq %r14, %rdi
callq 0x24276
movq %rax, (%rbx)
cmpw $0x2, 0x2(%r14)
jne 0x24190
movq %r14, %rdi
callq 0x4067
leaq 0x2c6e(%rip), %rcx      # 0x26d29
jmp 0x241c6
leaq 0x29df(%rip), %rax      # 0x26aa6
movq %rax, (%r15)
leaq 0x1c198(%r14), %r15
addq $0x1c998, %r14          # imm = 0x1C998
leaq 0x29df(%rip), %rsi      # 0x26abe
jmp 0x241e0
leaq 0x2aa8(%rip), %rax      # 0x26b93
jmp 0x2418d
leaq 0x2934(%rip), %rax      # 0x26a2b
jmp 0x2418d
leaq 0x1d598(%r14), %rdx
leaq 0x295a(%rip), %rsi      # 0x26a64
movq %r14, %rdi
jmp 0x24188
leaq 0x2922(%rip), %rax      # 0x26a38
jmp 0x2418d
leaq 0x2a84(%rip), %rax      # 0x26ba3
jmp 0x2418d
leaq 0x291d(%rip), %rsi      # 0x26a45
jmp 0x24183
leaq 0x2961(%rip), %rax      # 0x26a92
jmp 0x2418d
leaq 0x2d5e(%rip), %rax      # 0x26e98
jmp 0x2418d
leaq 0x2a04(%rip), %rax      # 0x26b47
movq %rax, (%r15)
leaq 0x2a17(%rip), %rax      # 0x26b64
jmp 0x2418d
leaq 0x2cac(%rip), %rax      # 0x26e02
jmp 0x2418d
leaq 0x2b75(%rip), %rsi      # 0x26cd4
jmp 0x24183
leaq 0x2910(%rip), %rax      # 0x26a78
jmp 0x2418d
leaq 0x2b49(%rip), %rax      # 0x26cba
jmp 0x2418d
leaq 0x2cec(%rip), %rax      # 0x26e66
jmp 0x2418d
leaq 0x2a00(%rip), %rsi      # 0x26b83
movq %r14, %rdi
xorl %edx, %edx
callq 0x24276
movq %rax, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1cd98(%r14), %rdx
leaq 0x2b40(%rip), %rsi      # 0x26ce4
movq %r14, %rdi
callq 0x24276
movq %rax, (%rbx)
cmpw $0x2, 0x2(%r14)
jne 0x24190
movq %r14, %rdi
callq 0x4067
leaq 0x2b3a(%rip), %rcx      # 0x26d00
movq %rcx, (%rax)
jmp 0x24190
leaq 0x1c198(%r14), %r15
addq $0x1c998, %r14          # imm = 0x1C998
leaq 0x29cf(%rip), %rsi      # 0x26baf
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3300
movq %r15, (%rbx)
jmp 0x24190
leaq 0x2a81(%rip), %rax      # 0x26c7a
jmp 0x2418d
leaq 0x2a2e(%rip), %rax      # 0x26c30
jmp 0x2418d
movq %r14, %rdi
callq 0x148cc
jmp 0x2418d
leaq 0x2a38(%rip), %rax      # 0x26c50
jmp 0x2418d
leaq 0x2c62(%rip), %rax      # 0x26e86
jmp 0x2418d
leaq 0x2c24(%rip), %rax      # 0x26e54
jmp 0x2418d
leaq 0x2dee(%rip), %rsi      # 0x2702a
movq %r14, %rdi
xorl %eax, %eax
callq 0x3300
jmp 0x2426e
movq %rax, %rsi
movq 0x8(%rsi), %rax
testq %rax, %rax
leaq 0x1d68(%rip), %rcx      # 0x25fc1
cmovneq %rax, %rcx
leaq 0x2db4(%rip), %rsi      # 0x27018
movq %r14, %rdi
xorl %eax, %eax
callq 0x3300
movq %r14, (%rbx)
jmp 0x24190