// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_string_out
SOAP_FMAC2
soap_string_out(struct soap *soap, const char *s, int flag)
{ register const char *t;
  register soap_wchar c;
  register soap_wchar mask = (soap_wchar)0xFFFFFF80UL;
#ifdef WITH_DOM
  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
  { soap->dom->data = soap_strdup(soap, s);
    return SOAP_OK;
  }
#endif
  if (flag == 2 || soap->mode & SOAP_C_UTFSTRING)
    mask = 0;
  t = s;
  while ((c = *t++))
  { switch (c)
    {
    case 0x09:
      if (flag)
      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#x9;", 5))
          return soap->error;
        s = t;
      }
      break;
    case 0x0A:
      if (flag || !(soap->mode & SOAP_XML_CANONICAL))
      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xA;", 5))
          return soap->error;
        s = t;
      }
      break;
    case 0x0D:
      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&#xD;", 5))
        return soap->error;
      s = t;
      break;
    case '&':
      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&amp;", 5))
        return soap->error;
      s = t;
      break;
    case '<':
      if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&lt;", 4))
        return soap->error;
      s = t;
      break;
    case '>':
      if (!flag)
      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&gt;", 4))
          return soap->error;
        s = t;
      }
      break;
    case '"':
      if (flag)
      { if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&quot;", 6))
          return soap->error;
        s = t;
      }
      break;
    default:
#ifndef WITH_LEANER
#ifdef HAVE_MBTOWC
      if (soap->mode & SOAP_C_MBSTRING)
      { wchar_t wc;
        register int m = mbtowc(&wc, t - 1, MB_CUR_MAX);
        if (m > 0 && !((soap_wchar)wc == c && m == 1 && c < 0x80))
        { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, wc))
            return soap->error;
          s = t += m - 1;
          continue;
        }
      }
#endif
#endif
#ifndef WITH_NOSTRINGTOUTF8
      if ((c & mask) || !(c & 0xFFFFFFE0UL))
      { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned char)c))
          return soap->error;
        s = t;
      }
#endif
    }
  }
  return soap_send_raw(soap, s, t - s - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0xffffff80, -0x30(%rbp) # imm = 0xFFFFFF80
cmpl $0x2, -0x1c(%rbp)
je 0x2a031
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x200000, %eax         # imm = 0x200000
cmpl $0x0, %eax
je 0x2a038
movl $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movsbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0x2a39a
movl -0x2c(%rbp), %eax
addl $-0x9, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x35, %eax
ja 0x2a323
movq -0x38(%rbp), %rax
leaq 0xed8a(%rip), %rcx      # 0x38e08
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, -0x1c(%rbp)
je 0x2a0e2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x16bc0
cmpl $0x0, %eax
jne 0x2a0c8
movq -0x10(%rbp), %rdi
leaq 0xf92c(%rip), %rsi      # 0x399e5
movl $0x5, %edx
callq 0x16bc0
cmpl $0x0, %eax
je 0x2a0da
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2a3b9
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x2a395
cmpl $0x0, -0x1c(%rbp)
jne 0x2a0fe
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
jne 0x2a153
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x16bc0
cmpl $0x0, %eax
jne 0x2a139
movq -0x10(%rbp), %rdi
leaq 0xf8c1(%rip), %rsi      # 0x399eb
movl $0x5, %edx
callq 0x16bc0
cmpl $0x0, %eax
je 0x2a14b
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2a3b9
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x2a395
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x16bc0
cmpl $0x0, %eax
jne 0x2a193
movq -0x10(%rbp), %rdi
leaq 0xf86d(%rip), %rsi      # 0x399f1
movl $0x5, %edx
callq 0x16bc0
cmpl $0x0, %eax
je 0x2a1a5
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2a3b9
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x2a395
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x16bc0
cmpl $0x0, %eax
jne 0x2a1ed
movq -0x10(%rbp), %rdi
leaq 0xf819(%rip), %rsi      # 0x399f7
movl $0x5, %edx
callq 0x16bc0
cmpl $0x0, %eax
je 0x2a1ff
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2a3b9
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x2a395
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x16bc0
cmpl $0x0, %eax
jne 0x2a247
movq -0x10(%rbp), %rdi
leaq 0xf7c5(%rip), %rsi      # 0x399fd
movl $0x4, %edx
callq 0x16bc0
cmpl $0x0, %eax
je 0x2a259
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2a3b9
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x2a395
cmpl $0x0, -0x1c(%rbp)
jne 0x2a2c1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x16bc0
cmpl $0x0, %eax
jne 0x2a2a7
movq -0x10(%rbp), %rdi
leaq 0xf76a(%rip), %rsi      # 0x39a02
movl $0x4, %edx
callq 0x16bc0
cmpl $0x0, %eax
je 0x2a2b9
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2a3b9
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x2a395
cmpl $0x0, -0x1c(%rbp)
je 0x2a321
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x16bc0
cmpl $0x0, %eax
jne 0x2a307
movq -0x10(%rbp), %rdi
leaq 0xf70f(%rip), %rsi      # 0x39a07
movl $0x6, %edx
callq 0x16bc0
cmpl $0x0, %eax
je 0x2a319
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2a3b9
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x2a395
movl -0x2c(%rbp), %eax
andl -0x30(%rbp), %eax
cmpl $0x0, %eax
jne 0x2a345
movslq -0x2c(%rbp), %rax
movabsq $0xffffffe0, %rcx       # imm = 0xFFFFFFE0
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x2a393
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x16bc0
cmpl $0x0, %eax
jne 0x2a37c
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %eax
movzbl %al, %eax
movl %eax, %esi
callq 0x18dc0
cmpl $0x0, %eax
je 0x2a38b
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2a3b9
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x2a395
jmp 0x2a040
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x16bc0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)