// File: /workspace/github_c_makefile_star2_O0/loversmile[P]sugarcrm/sugar_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 (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 && wc != c)
        { 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
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x200000, %eax         # imm = 0x200000
cmpl $0x0, %eax
je 0x61152
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 0x614b4
movl -0x2c(%rbp), %eax
addl $-0x9, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x35, %eax
ja 0x6143d
movq -0x38(%rbp), %rax
leaq 0x18e7c(%rip), %rcx     # 0x7a014
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, -0x1c(%rbp)
je 0x611fc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x4eeb0
cmpl $0x0, %eax
jne 0x611e2
movq -0x10(%rbp), %rdi
leaq 0x198c8(%rip), %rsi     # 0x7aa9b
movl $0x5, %edx
callq 0x4eeb0
cmpl $0x0, %eax
je 0x611f4
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x614d3
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x614af
cmpl $0x0, -0x1c(%rbp)
jne 0x61218
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
jne 0x6126d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x4eeb0
cmpl $0x0, %eax
jne 0x61253
movq -0x10(%rbp), %rdi
leaq 0x1985d(%rip), %rsi     # 0x7aaa1
movl $0x5, %edx
callq 0x4eeb0
cmpl $0x0, %eax
je 0x61265
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x614d3
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x614af
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x4eeb0
cmpl $0x0, %eax
jne 0x612ad
movq -0x10(%rbp), %rdi
leaq 0x19809(%rip), %rsi     # 0x7aaa7
movl $0x5, %edx
callq 0x4eeb0
cmpl $0x0, %eax
je 0x612bf
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x614d3
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x614af
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x4eeb0
cmpl $0x0, %eax
jne 0x61307
movq -0x10(%rbp), %rdi
leaq 0x197b5(%rip), %rsi     # 0x7aaad
movl $0x5, %edx
callq 0x4eeb0
cmpl $0x0, %eax
je 0x61319
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x614d3
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x614af
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x4eeb0
cmpl $0x0, %eax
jne 0x61361
movq -0x10(%rbp), %rdi
leaq 0x19761(%rip), %rsi     # 0x7aab3
movl $0x4, %edx
callq 0x4eeb0
cmpl $0x0, %eax
je 0x61373
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x614d3
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x614af
cmpl $0x0, -0x1c(%rbp)
jne 0x613db
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x4eeb0
cmpl $0x0, %eax
jne 0x613c1
movq -0x10(%rbp), %rdi
leaq 0x19706(%rip), %rsi     # 0x7aab8
movl $0x4, %edx
callq 0x4eeb0
cmpl $0x0, %eax
je 0x613d3
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x614d3
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x614af
cmpl $0x0, -0x1c(%rbp)
je 0x6143b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x4eeb0
cmpl $0x0, %eax
jne 0x61421
movq -0x10(%rbp), %rdi
leaq 0x196ab(%rip), %rsi     # 0x7aabd
movl $0x6, %edx
callq 0x4eeb0
cmpl $0x0, %eax
je 0x61433
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x614d3
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x614af
movl -0x2c(%rbp), %eax
andl -0x30(%rbp), %eax
cmpl $0x0, %eax
jne 0x6145f
movslq -0x2c(%rbp), %rax
movabsq $0xffffffe0, %rcx       # imm = 0xFFFFFFE0
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x614ad
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x4eeb0
cmpl $0x0, %eax
jne 0x61496
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %eax
movzbl %al, %eax
movl %eax, %esi
callq 0x50f20
cmpl $0x0, %eax
je 0x614a5
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x614d3
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x614af
jmp 0x6115a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x4eeb0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)