// File: /workspace/github_c_makefile_star2_O0/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_sprint_fault
SOAP_FMAC1
char*
SOAP_FMAC2
soap_sprint_fault(struct soap *soap, char *buf, size_t len)
{ if (soap_check_state(soap))
    strncpy(buf, "Error: soap struct not initialized", len);
  else if (soap->error)
  { const char *c, *v = NULL, *s, **d;
    d = soap_faultcode(soap);
    if (!*d)
      soap_set_fault(soap);
    c = *d;
    if (soap->version == 2)
      v = *soap_faultsubcode(soap);
    s = *soap_faultstring(soap);
    d = soap_faultdetail(soap);
#ifdef HAVE_SNPRINTF
# ifdef WIN32
    _snprintf
# else
    snprintf
# endif
      (buf, len, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]");
#else
    if (len > 40 + (v ? strlen(v) : 0) + (s ? strlen(s) : 0) + (d && *d ? strlen(*d) : 0))
      sprintf(buf, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c, v ? v : "no subcode", s ? s : "[no reason]", d && *d ? *d : "[no detail]");
    else if (len > 40)
      sprintf(buf, "%s%d fault: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, c);
    else
      buf[0] = '\0';
#endif
  }
  return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x6e4d6
movq -0x8(%rbp), %rax
movswl (%rax), %eax
cmpl $0x1, %eax
je 0x6e4ef
movq -0x8(%rbp), %rax
movswl (%rax), %eax
cmpl $0x2, %eax
je 0x6e4ef
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0xd0d9(%rip), %rsi      # 0x7b5be
callq 0x3070
jmp 0x6e697
movq -0x8(%rbp), %rax
cmpl $0x0, 0x19214(%rax)
je 0x6e695
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3dd0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x6e528
movq -0x8(%rbp), %rdi
callq 0x6ce90
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movswl 0x2(%rax), %eax
cmpl $0x2, %eax
jne 0x6e550
movq -0x8(%rbp), %rdi
callq 0x3e20
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3ed0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3f30
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movswl 0x2(%rax), %edx
leaq 0xd008(%rip), %rax      # 0x7b594
leaq 0xcff9(%rip), %rcx      # 0x7b58c
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movswl 0x2(%rax), %eax
cmpl $0x0, %eax
je 0x6e5b8
movq -0x8(%rbp), %rax
movswl 0x2(%rax), %eax
movl %eax, -0x54(%rbp)
jmp 0x6e5c5
movq -0x8(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x6e5e4
movq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x6e5f1
leaq 0xcfb0(%rip), %rax      # 0x7b59b
movq %rax, -0x70(%rbp)
jmp 0x6e5f1
movq -0x70(%rbp), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x6e60a
movq -0x30(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x6e617
leaq 0xcf95(%rip), %rax      # 0x7b5a6
movq %rax, -0x80(%rbp)
jmp 0x6e617
movq -0x80(%rbp), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x6e643
movq -0x38(%rbp), %rax
cmpq $0x0, (%rax)
je 0x6e643
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
jmp 0x6e653
leaq 0xcf68(%rip), %rax      # 0x7b5b2
movq %rax, -0x90(%rbp)
jmp 0x6e653
movq -0x88(%rbp), %r10
movq -0x78(%rbp), %r11
movq -0x60(%rbp), %r9
movl -0x64(%rbp), %r8d
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdi
movq -0x90(%rbp), %rax
leaq 0xcee7(%rip), %rdx      # 0x7b567
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x3150
jmp 0x6e697
movq -0x10(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)