LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_set_dime_attachment
SOAP_FMAC2
soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option)
{ struct soap_multipart *content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, ptr, size);
  if (!content)
    return SOAP_EOM;
  content->id = soap_strdup(soap, id);
  content->type = soap_strdup(soap, type);
  content->options = soap_dime_option(soap, optype, option);
  return SOAP_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movq %r8, %r13
movq %rcx, %r15
movq %rdx, %r8
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x19278(%rdi), %rsi
leaq 0x19280(%rdi), %rdx
callq 0x3f7e5
testq %rax, %rax
je 0x48702
movq %rax, %r12
movq 0x40(%rsp), %rbp
movq %r14, %rdi
movq %r13, %rsi
callq 0x3a6c4
movq %rax, 0x18(%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3a6c4
movq %rax, 0x20(%r12)
movzwl %bx, %esi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x476c1
movq %rax, 0x28(%r12)
xorl %eax, %eax
jmp 0x48707
movl $0x14, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_envelope_begin_out
SOAP_FMAC2
soap_envelope_begin_out(struct soap *soap)
{
#ifndef WITH_LEANER
  size_t n = 0;
  if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start && strlen(soap->mime.boundary) + strlen(soap->mime.start) < sizeof(soap->tmpbuf) - 80 )
  { const char *s;
    if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
      s = "application/dime";
    else if (soap->version == 2)
    { if (soap->mode & SOAP_ENC_MTOM)
        s = "application/xop+xml; charset=utf-8; type=\"application/soap+xml\"";
      else
        s = "application/soap+xml; charset=utf-8";
    }
    else if (soap->mode & SOAP_ENC_MTOM)
      s = "application/xop+xml; charset=utf-8; type=\"text/xml\"";
    else
      s = "text/xml; charset=utf-8";
    sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start);
    n = strlen(soap->tmpbuf);
    if (soap_send_raw(soap, soap->tmpbuf, n))
      return soap->error;
  }
  if (soap->mode & SOAP_IO_LENGTH)
    soap->dime.size = soap->count;	/* DIME in MIME correction */
  if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME))
  { if (soap_putdimehdr(soap))
      return soap->error;
  }
#endif
  soap->part = SOAP_IN_ENVELOPE;
  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x4(%rdi), %ebp
btl $0x8, %ebp
jae 0x48cbd
movq 0x19288(%rbx), %r14
testq %r14, %r14
je 0x48cbd
movq 0x19290(%rbx), %r15
testq %r15, %r15
je 0x48cbd
movq %r14, %rdi
callq 0x3110
movq %rax, %r12
movq %r15, %rdi
callq 0x3110
addq %r12, %rax
cmpq $0x3af, %rax            # imm = 0x3AF
ja 0x48cbd
movl %ebp, %eax
andl $0x280, %eax            # imm = 0x280
cmpl $0x80, %eax
jne 0x48c51
leaq 0x9cf9(%rip), %rcx      # 0x52948
jmp 0x48c82
cmpw $0x2, 0x2(%rbx)
jne 0x48c6c
btl $0x9, %ebp
leaq 0x9d3a(%rip), %rax      # 0x5299d
leaq 0x9cf3(%rip), %rcx      # 0x5295d
jmp 0x48c7e
btl $0x9, %ebp
leaq 0x9d7e(%rip), %rax      # 0x529f5
leaq 0x9d43(%rip), %rcx      # 0x529c1
cmovaeq %rax, %rcx
leaq 0x16538(%rbx), %r12
leaq 0x9d7d(%rip), %rsi      # 0x52a0d
movq %r12, %rdi
movq %r14, %rdx
movq %r15, %r8
xorl %eax, %eax
callq 0x3360
movq %r12, %rdi
callq 0x3110
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x379c8
testl %eax, %eax
jne 0x48cd4
movl 0x4(%rbx), %ebp
testb $0x8, %bpl
jne 0x48ce3
testb %bpl, %bpl
jns 0x48cf1
movq %rbx, %rdi
callq 0x47727
testl %eax, %eax
je 0x48cf1
movl 0x19214(%rbx), %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x6110(%rbx), %rax
movq %rax, 0x19230(%rbx)
movw $0x2, 0x18590(%rbx)
leaq 0x9d5a(%rip), %rsi      # 0x52a5b
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3f670
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_envelope_end_out
SOAP_FMAC2
soap_envelope_end_out(struct soap *soap)
{ if (soap_element_end_out(soap, "SOAP-ENV:Envelope") || ((soap->mode & SOAP_XML_INDENT) && soap_send_raw(soap, "\r\n", 2)))
    return soap->error;
#ifndef WITH_LEANER
  if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
  { soap->dime.size = soap->count - soap->dime.size;	/* DIME in MIME correction */
    sprintf(soap->id, soap->dime_id_format, 0);
    soap->dime.id = soap->id;
    if (soap->local_namespaces)
    { if (soap->local_namespaces[0].out)
        soap->dime.type = (char*)soap->local_namespaces[0].out;
      else
        soap->dime.type = (char*)soap->local_namespaces[0].ns;
    }
    soap->dime.options = NULL;
    soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
    if (!soap->dime.first)
      soap->dime.flags |= SOAP_DIME_ME;
    soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + (soap->dime.type ? ((strlen(soap->dime.type)+3)&(~3)) : 0);
  }
  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
#endif
  soap->part = SOAP_END_ENVELOPE;
  return SOAP_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x9d37(%rip), %rsi      # 0x52a5b
callq 0x3f6ed
testl %eax, %eax
je 0x48d39
movl 0x19214(%rbx), %eax
popq %rbx
popq %r14
popq %r15
retq
movl 0x4(%rbx), %eax
btl $0xd, %eax
jae 0x48d5d
leaq 0x97d9(%rip), %rsi      # 0x52522
movl $0x2, %edx
movq %rbx, %rdi
callq 0x379c8
testl %eax, %eax
jne 0x48d2d
movl 0x4(%rbx), %eax
movl %eax, %ecx
andl $0x288, %ecx            # imm = 0x288
cmpl $0x88, %ecx
jne 0x48e2a
movq 0x6110(%rbx), %rax
subq 0x19230(%rbx), %rax
movq %rax, 0x19230(%rbx)
leaq 0x16d38(%rbx), %r14
movq 0x20(%rbx), %rsi
movq %r14, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x3360
movq %r14, 0x19258(%rbx)
movq 0x80(%rbx), %rax
testq %rax, %rax
je 0x48dc6
movq 0x18(%rax), %r15
testq %r15, %r15
jne 0x48dbd
movq 0x8(%rax), %r15
movq %r15, 0x19260(%rbx)
jmp 0x48dcd
movq 0x19260(%rbx), %r15
movq $0x0, 0x19268(%rbx)
cmpq $0x0, 0x19278(%rbx)
sete %al
addb %al, %al
orb $0x24, %al
movb %al, 0x19248(%rbx)
movq %r14, %rdi
callq 0x3110
movq %rax, %r14
addq $0x3, %r14
andq $-0x4, %r14
addq $0xc, %r14
testq %r15, %r15
je 0x48e1b
movq %r15, %rdi
callq 0x3110
addq $0x3, %rax
andq $-0x4, %rax
jmp 0x48e1d
xorl %eax, %eax
addq %rax, %r14
addq %r14, 0x6110(%rbx)
movl 0x4(%rbx), %eax
andl $0x280, %eax            # imm = 0x280
cmpl $0x80, %eax
jne 0x48e55
xorl %edx, %edx
subl 0x19230(%rbx), %edx
andl $0x3, %edx
leaq 0x9319(%rip), %rsi      # 0x52161
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x379c8
movw $0x8, 0x18590(%rbx)
xorl %eax, %eax
jmp 0x48d33
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_envelope_begin_in
SOAP_FMAC2
soap_envelope_begin_in(struct soap *soap)
{ register struct Namespace *p;
  soap->part = SOAP_IN_ENVELOPE;
  if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0, NULL))
  { if (soap->error == SOAP_TAG_MISMATCH
     && !soap_element_begin_in(soap, "Envelope", 0, NULL))
      soap->error = SOAP_VERSIONMISMATCH;
    else if (soap->status)
      soap->error = soap->status;
    return soap->error;
  }
  p = soap->local_namespaces;
  if (p)
  { const char *ns = p[0].out;
    if (!ns)
      ns = p[0].ns;
    if (!strcmp(ns, soap_env1))
    { soap->version = 1; /* make sure we use SOAP 1.1 */
      if (p[1].out)
        SOAP_FREE(soap, p[1].out);
      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1))))
        strcpy(p[1].out, soap_enc1);
    }
    else if (!strcmp(ns, soap_env2))
    { soap->version = 2; /* make sure we use SOAP 1.2 */
      if (p[1].out)
        SOAP_FREE(soap, p[1].out);
      if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2))))
        strcpy(p[1].out, soap_enc2);
    }
  }
  return SOAP_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movw $0x2, 0x18590(%rdi)
leaq 0x9bdb(%rip), %rsi      # 0x52a5b
xorl %ebx, %ebx
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3a388
testl %eax, %eax
je 0x48ecf
cmpl $0x3, 0x19214(%r14)
jne 0x48eb4
leaq 0x9bc4(%rip), %rsi      # 0x52a64
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3a388
testl %eax, %eax
je 0x48f78
movl 0x19210(%r14), %ebx
testl %ebx, %ebx
je 0x48f6f
movl %ebx, 0x19214(%r14)
jmp 0x48fd4
movq 0x80(%r14), %r12
testq %r12, %r12
je 0x48fd4
movq 0x18(%r12), %r15
testq %r15, %r15
jne 0x48eee
movq 0x8(%r12), %r15
leaq 0x927b(%rip), %rsi      # 0x52170
movq %r15, %rdi
callq 0x3210
testl %eax, %eax
je 0x48f8a
leaq 0x92d4(%rip), %rsi      # 0x521e0
movq %r15, %rdi
callq 0x3210
testl %eax, %eax
jne 0x48fd4
movw $0x2, 0x2(%r14)
movq 0x38(%r12), %rdi
testq %rdi, %rdi
je 0x48f32
callq 0x3030
movl $0x28, %edi
callq 0x3290
movq %rax, 0x38(%r12)
testq %rax, %rax
je 0x48fd4
movaps 0xae2f(%rip), %xmm0     # 0x53d80
movups %xmm0, 0x10(%rax)
movaps 0xae14(%rip), %xmm0     # 0x53d70
movups %xmm0, (%rax)
movabsq $0x676e69646f636e, %rcx # imm = 0x676E69646F636E
movq %rcx, 0x20(%rax)
jmp 0x48fd4
movl 0x19214(%r14), %ebx
jmp 0x48fd4
movl $0x27, 0x19214(%r14)
movl $0x27, %ebx
jmp 0x48fd4
movw $0x1, 0x2(%r14)
movq 0x38(%r12), %rdi
testq %rdi, %rdi
je 0x48fa0
callq 0x3030
movl $0x2a, %edi
callq 0x3290
movq %rax, 0x38(%r12)
testq %rax, %rax
je 0x48fd4
movups 0xad9f(%rip), %xmm0     # 0x53d5a
movups %xmm0, 0x1a(%rax)
movaps 0xad8a(%rip), %xmm0     # 0x53d50
movups %xmm0, 0x10(%rax)
movaps 0xad6f(%rip), %xmm0     # 0x53d40
movups %xmm0, (%rax)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_body_begin_out
SOAP_FMAC2
soap_body_begin_out(struct soap *soap)
{ soap->part = SOAP_IN_BODY;
  if (soap->version == 1)
    soap->encoding = 1;
#ifndef WITH_LEAN
  if ((soap->mode & SOAP_XML_SEC) && soap_set_attr(soap, "wsu:Id", "Body"))
    return soap->error;
#endif
  if (soap_element(soap, "SOAP-ENV:Body", 0, NULL))
    return soap->error;
  return soap_element_start_end_out(soap, NULL);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movw $0x6, 0x18590(%rdi)
cmpw $0x1, 0x2(%rdi)
jne 0x49014
movw $0x1, 0x18588(%rbx)
cmpl $0x0, 0x4(%rbx)
js 0x4903c
leaq 0x9a4c(%rip), %rsi      # 0x52a6d
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x41688
testl %eax, %eax
jne 0x49056
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x41eb7
leaq 0x9630(%rip), %rsi      # 0x52673
leaq 0x9a2c(%rip), %rdx      # 0x52a76
movq %rbx, %rdi
callq 0x4228b
testl %eax, %eax
je 0x4901a
movl 0x19214(%rbx), %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_body_begin_in
SOAP_FMAC2
soap_body_begin_in(struct soap *soap)
{ soap->part = SOAP_IN_BODY;
  if (soap_element_begin_in(soap, "SOAP-ENV:Body", 0, NULL))
    return soap->error;
  if (!soap->body)
    soap->part = SOAP_NO_BODY;
  return SOAP_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movw $0x6, 0x18590(%rdi)
leaq 0x99cf(%rip), %rsi      # 0x52a6d
xorl %ebx, %ebx
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3a388
testl %eax, %eax
je 0x490b6
movl 0x19214(%r14), %ebx
jmp 0x490cb
cmpw $0x0, 0x6106(%r14)
jne 0x490cb
movw $0x5, 0x18590(%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_body_end_in
SOAP_FMAC2
soap_body_end_in(struct soap *soap)
{ if (soap->part == SOAP_NO_BODY)
    return soap->error = SOAP_OK;
  soap->part = SOAP_END_BODY;
  return soap_element_end_in(soap, "SOAP-ENV:Body");
}

// Assembly:
cmpw $0x5, 0x18590(%rdi)
jne 0x490ec
movl $0x0, 0x19214(%rdi)
xorl %eax, %eax
retq
movw $0x7, 0x18590(%rdi)
leaq 0x9971(%rip), %rsi      # 0x52a6d
jmp 0x3a563
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_recv_header
SOAP_FMAC2
soap_recv_header(struct soap *soap)
{ if (soap_getheader(soap) && soap->error == SOAP_TAG_MISMATCH)
    soap->error = SOAP_OK;
  if (soap->error == SOAP_OK && soap->fheader)
    soap->error = soap->fheader(soap);
  return soap->error;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x35c0
testl %eax, %eax
setne %cl
movl 0x19214(%rbx), %eax
cmpl $0x3, %eax
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x4912e
movl $0x0, 0x19214(%rbx)
jmp 0x49132
testl %eax, %eax
jne 0x4914d
movq 0x5fb8(%rbx), %rax
testq %rax, %rax
je 0x4914b
movq %rbx, %rdi
callq *%rax
movl %eax, 0x19214(%rbx)
jmp 0x4914d
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_set_endpoint
SOAP_FMAC2
soap_set_endpoint(struct soap *soap, const char *endpoint)
{ register const char *s;
  register size_t i, n;
  soap->endpoint[0] = '\0';
  soap->host[0] = '\0';
  soap->path[0] = '/';
  soap->path[1] = '\0';
  soap->port = 80;
  if (!endpoint || !*endpoint)
    return;
#ifdef WITH_OPENSSL
  if (!soap_tag_cmp(endpoint, "https:*"))
    soap->port = 443;
#endif
  strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1);
  soap->endpoint[sizeof(soap->endpoint) - 1] = '\0';
  s = strchr(endpoint, ':');
  if (s && s[1] == '/' && s[2] == '/')
    s += 3;
  else
    s = endpoint;
  n = strlen(s);
  if (n >= sizeof(soap->host))
    n = sizeof(soap->host) - 1;
#ifdef WITH_IPV6
  if (s[0] == '[')
  { s++;
    for (i = 0; i < n; i++)
    { if (s[i] == ']')
      { s++;
        --n;
        break; 
      }
      soap->host[i] = s[i];
    }
  }
  else
  { for (i = 0; i < n; i++)
    { soap->host[i] = s[i];
      if (s[i] == '/' || s[i] == ':')
        break; 
    }
  }
#else
  for (i = 0; i < n; i++)
  { soap->host[i] = s[i];
    if (s[i] == '/' || s[i] == ':')
      break; 
  }
#endif
  soap->host[i] = '\0';
  if (s[i] == ':')
  { soap->port = (int)soap_strtol(s + i + 1, NULL, 10);
    for (i++; i < n; i++)
      if (s[i] == '/')
        break;
  }
  if (i < n && s[i])
  { strncpy(soap->path, s + i, sizeof(soap->path));
    soap->path[sizeof(soap->path) - 1] = '\0';
  }
}

// Assembly:
xorl %eax, %eax
movb %al, 0x185a8(%rdi)
movb %al, 0x18da8(%rdi)
movw $0x2f, 0x189a8(%rdi)
movl $0x50, 0x191c8(%rdi)
testq %rsi, %rsi
je 0x49289
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
cmpb $0x0, (%rsi)
je 0x4927e
movq %rdi, %rbx
addq $0x185a8, %rdi          # imm = 0x185A8
movl $0x3ff, %r15d           # imm = 0x3FF
movl $0x3ff, %edx            # imm = 0x3FF
movq %r14, %rsi
callq 0x3070
movb $0x0, 0x189a7(%rbx)
movq %r14, %rdi
movl $0x3a, %esi
callq 0x3130
testq %rax, %rax
je 0x491d8
cmpb $0x2f, 0x1(%rax)
jne 0x491d8
movq %rax, %rcx
addq $0x3, %rcx
cmpb $0x2f, 0x2(%rax)
cmoveq %rcx, %r14
movq %r14, %rdi
callq 0x3110
cmpq %r15, %rax
cmovbq %rax, %r15
xorl %r12d, %r12d
testq %rax, %rax
je 0x49211
movzbl (%r14,%r12), %eax
movb %al, 0x18da8(%rbx,%r12)
cmpl $0x2f, %eax
je 0x49211
cmpl $0x3a, %eax
je 0x49211
incq %r12
cmpq %r12, %r15
jne 0x491ef
movq %r15, %r12
movb $0x0, 0x18da8(%rbx,%r12)
cmpb $0x3a, (%r14,%r12)
jne 0x49251
leaq (%r14,%r12), %rdi
incq %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3230
movl %eax, 0x191c8(%rbx)
leaq 0x1(%r12), %rax
cmpq %r15, %rax
jae 0x4927e
cmpb $0x2f, 0x1(%r14,%r12)
movq %rax, %r12
jne 0x4923a
jmp 0x49254
movq %r12, %rax
cmpq %r15, %rax
jae 0x4927e
cmpb $0x0, (%r14,%rax)
je 0x4927e
leaq 0x189a8(%rbx), %rdi
addq %rax, %r14
movl $0x400, %edx            # imm = 0x400
movq %r14, %rsi
callq 0x3070
movb $0x0, 0x18da7(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_connect_command
SOAP_FMAC2
soap_connect_command(struct soap *soap, int http_command, const char *endpoints, const char *action)
{ char *endpoint;
  const char *s;
  if (endpoints && (s = strchr(endpoints, ' ')))
  { endpoint = (char*)SOAP_MALLOC(soap, strlen(endpoints) + 1);
    for (;;)
    { strncpy(endpoint, endpoints, s - endpoints);
      endpoint[s - endpoints] = '\0';
      if (soap_try_connect_command(soap, http_command, endpoint, action) != SOAP_TCP_ERROR)
        break;
      if (!*s)
        break;
      soap->error = SOAP_OK;
      while (*s == ' ')
        s++;
      endpoints = s;
      s = strchr(endpoints, ' ');
      if (!s)
        s = endpoints + strlen(endpoints);
    }
    SOAP_FREE(soap, endpoint);
  }
  else
    soap_try_connect_command(soap, http_command, endpoints, action);
  return soap->error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movl %esi, %ebx
movq %rdi, %r14
testq %rdx, %rdx
je 0x493c0
movq %rdx, %r13
movq %rdx, %rdi
movl $0x20, %esi
callq 0x3130
testq %rax, %rax
je 0x493c9
movq %rax, %rbp
movq %r13, %rdi
callq 0x3110
leaq 0x1(%rax), %rdi
callq 0x3290
movq %rax, %r15
movq %r14, 0x10(%rsp)
movq %rbp, %r14
subq %r13, %r14
movq %rax, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x3070
movb $0x0, (%r15,%r14)
movq 0x10(%rsp), %r14
movq %r14, %rdi
movl %ebx, 0xc(%rsp)
movl %ebx, %esi
movq %r15, %rdx
movq %r12, %rcx
callq 0x493ef
cmpl $0x1c, %eax
jne 0x493b6
cmpb $0x0, (%rbp)
je 0x493b6
movq %r12, %rbx
movl $0x0, 0x19214(%r14)
movq %r15, %r14
subq %rbp, %r14
movq %rbp, %r13
decq %r13
movq %rbp, %r12
decq %r14
incq %r12
cmpb $0x20, 0x1(%r13)
leaq 0x1(%r13), %r13
je 0x49350
movq %r13, %rdi
movl $0x20, %esi
callq 0x3130
movq %rax, %rbp
testq %rax, %rax
jne 0x49384
movq %r13, %rdi
callq 0x3110
movq %rax, %rbp
addq %r13, %rbp
leaq 0x1(%rbp), %rdx
subq %r12, %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x3070
movb $0x0, 0x1(%r14,%rbp)
movq 0x10(%rsp), %r14
movq %r14, %rdi
movl 0xc(%rsp), %esi
movq %r15, %rdx
movq %rbx, %r12
movq %rbx, %rcx
jmp 0x4931b
movq %r15, %rdi
callq 0x3030
jmp 0x493d9
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
jmp 0x493d1
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
movq %r12, %rcx
callq 0x493ef
movl 0x19214(%r14), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_s2base64
SOAP_FMAC1
char*
SOAP_FMAC2
soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n)
{ register int i;
  register unsigned long m;
  register char *p;
  if (!t)
    t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1);
  if (!t)
    return NULL;
  p = t;
  t[0] = '\0';
  if (!s)
    return p;
  for (; n > 2; n -= 3, s += 3)
  { m = s[0];
    m = (m << 8) | s[1];
    m = (m << 8) | s[2];
    for (i = 4; i > 0; m >>= 6)
      t[--i] = soap_base64o[m & 0x3F];
    t += 4;
  }
  t[0] = '\0';
  if (n > 0)
  { m = 0;
    for (i = 0; i < n; i++)
      m = (m << 8) | *s++;
    for (; i < 3; i++)
      m <<= 8;
    for (i++; i > 0; m >>= 6)
      t[--i] = soap_base64o[m & 0x3F];
    for (i = 3; i > n; i--)
      t[i] = '=';
    t[4] = '\0';
  }
  return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdx, %rax
movq %rsi, %rbx
testq %rdx, %rdx
jne 0x4969b
leal 0x2(%r14), %eax
cltq
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
leal 0x1(,%rax,4), %eax
movslq %eax, %rsi
callq 0x39272
testq %rax, %rax
je 0x4977f
movb $0x0, (%rax)
testq %rbx, %rbx
je 0x49781
leaq 0xa642(%rip), %rdx      # 0x53cf0
movq %rax, %rcx
cmpl $0x3, %r14d
jl 0x49706
movzbl (%rbx), %esi
movzbl 0x1(%rbx), %edi
shll $0x10, %esi
shll $0x8, %edi
orl %esi, %edi
movzbl 0x2(%rbx), %esi
orq %rdi, %rsi
movl $0x5, %edi
movl %esi, %r8d
andl $0x3f, %r8d
movb (%r8,%rdx), %r8b
movb %r8b, -0x2(%rcx,%rdi)
shrq $0x6, %rsi
decq %rdi
cmpq $0x1, %rdi
ja 0x496d2
addq $0x4, %rcx
leal -0x3(%r14), %esi
addq $0x3, %rbx
cmpl $0x5, %r14d
movl %esi, %r14d
jg 0x496b7
jmp 0x49709
movl %r14d, %esi
movb $0x0, (%rcx)
testl %esi, %esi
jle 0x49781
movl %esi, %esi
xorl %r8d, %r8d
xorl %edi, %edi
movq %rdi, %r9
shlq $0x8, %r9
movzbl (%rbx,%r8), %edi
orq %r9, %rdi
incq %r8
cmpl %r8d, %esi
jne 0x49717
cmpl $0x2, %esi
ja 0x49740
leal -0x3(%rsi), %r8d
shlq $0x8, %rdi
incl %r8d
jne 0x49737
movl $0x5, %r8d
movl %edi, %r9d
andl $0x3f, %r9d
movb (%r9,%rdx), %r9b
movb %r9b, -0x2(%rcx,%r8)
shrq $0x6, %rdi
decq %r8
cmpq $0x1, %r8
ja 0x49746
cmpl $0x2, %esi
jg 0x49779
movl $0x3, %edx
movl %edx, %edi
movb $0x3d, (%rcx,%rdi)
decl %edx
cmpl %esi, %edx
jg 0x4976d
movb $0x0, 0x4(%rcx)
jmp 0x49781
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_s2hex
SOAP_FMAC1
char*
SOAP_FMAC2
soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n)
{ register char *p;
  if (!t)
    t = (char*)soap_malloc(soap, 2 * n + 1);
  if (!t)
    return NULL;
  p = t;
  t[0] = '\0';
  if (s)
  { for (; n > 0; n--)
    { register int m = *s++;
      *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0'));
      m &= 0x0F;
      *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0'));
    }
  }
  *t++ = '\0';
  return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %rax
movq %rsi, %r14
testq %rdx, %rdx
jne 0x4993e
leal 0x1(,%rbx,2), %eax
movslq %eax, %rsi
callq 0x39272
testq %rax, %rax
je 0x499a9
movb $0x0, (%rax)
testq %r14, %r14
sete %cl
testl %ebx, %ebx
setle %dl
orb %cl, %dl
movq %rax, %rcx
jne 0x4999e
incl %ebx
movq %rax, %rcx
movb (%r14), %dl
movl $0x57, %esi
movl $0x57, %edi
cmpb $-0x60, %dl
jae 0x4996f
movl $0x30, %edi
movl %edx, %r8d
shrb $0x4, %r8b
addb %r8b, %dil
movb %dil, (%rcx)
andb $0xf, %dl
cmpb $0xa, %dl
jae 0x49989
movl $0x30, %esi
incq %r14
addb %dl, %sil
movb %sil, 0x1(%rcx)
addq $0x2, %rcx
decl %ebx
cmpl $0x1, %ebx
ja 0x49958
movb $0x0, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
jmp 0x499a1
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_hex2s
SOAP_FMAC1
const char*
SOAP_FMAC2
soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n)
{ register const char *p;
  if (!s || !*s)
  { if (n)
      *n = 0;
    if (soap->error)
      return NULL;
    return SOAP_NON_NULL;
  }
  if (!t)
  { l = strlen(s) / 2;
    t = (char*)soap_malloc(soap, l);
  }
  if (!t)
    return NULL;
  p = t;
  while (l)
  { register int d1, d2;
    d1 = *s++;
    if (!d1)
      break;
    d2 = *s++;
    if (!d2)
      break;
    *t++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
    l--;
  }
  if (n)
    *n = (int)(t - p);
  return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rdi, %r12
testq %rsi, %rsi
je 0x49a7c
movq %rsi, %r14
cmpb $0x0, (%rsi)
je 0x49a7c
movq %rcx, %r15
movq %rdx, %rax
testq %rdx, %rdx
jne 0x499fd
movq %r14, %rdi
callq 0x3110
movq %rax, %r15
shrq %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x39272
testq %rax, %rax
je 0x49aa9
movq %rax, %rcx
testq %r15, %r15
je 0x49a71
xorl %edx, %edx
movq %rax, %rcx
movb (%r14,%rdx,2), %dil
testb %dil, %dil
je 0x49a6b
movb 0x1(%r14,%rdx,2), %sil
testb %sil, %sil
je 0x49a71
movl %edi, %r8d
andb $0x7, %r8b
addb $0x9, %r8b
cmpb $0x41, %dil
movzbl %dil, %edi
movzbl %r8b, %r8d
cmovll %edi, %r8d
shlb $0x4, %r8b
movl %esi, %edi
andb $0x7, %dil
addb $0x9, %dil
leal -0x30(%rsi), %r9d
cmpb $0x41, %sil
movzbl %r9b, %esi
movzbl %dil, %edi
cmovll %esi, %edi
addb %r8b, %dil
incq %rcx
movb %dil, (%rax,%rdx)
incq %rdx
cmpq %rdx, %r15
jne 0x49a0a
addq %rax, %rdx
movq %rdx, %rcx
testq %rbx, %rbx
je 0x49a9d
subl %eax, %ecx
movl %ecx, (%rbx)
jmp 0x49a9d
testq %rbx, %rbx
je 0x49a87
movl $0x0, (%rbx)
xorl %eax, %eax
cmpl $0x0, 0x19214(%r12)
leaq 0x86c8(%rip), %rcx      # 0x52161
cmoveq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %eax, %eax
jmp 0x49a9d
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_response
SOAP_FMAC2
soap_response(struct soap *soap, int status)
{ register size_t count;
  if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */))
   && (status == SOAP_HTML || status == SOAP_FILE))
    soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
  soap->status = status;
  count = soap_count_attachments(soap);
  if (soap_begin_send(soap))
    return soap->error;
#ifndef WITH_NOHTTP
  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML))
  { register int n = soap->mode;
    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);
    if ((n & SOAP_IO) != SOAP_IO_FLUSH)
      soap->mode |= SOAP_IO_BUFFER;
    if ((soap->error = soap->fresponse(soap, status, count)))
      return soap->error;
#ifndef WITH_LEANER
    if ((n & SOAP_IO) == SOAP_IO_CHUNK)
    { if (soap_flush(soap))
        return soap->error;
    }
#endif
    soap->mode = n;
  }
#endif
  return SOAP_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movl 0xc(%rdi), %eax
movl %eax, %ecx
andl $0x42, %ecx
movl %esi, %edx
andl $-0x2, %edx
xorl $0x3ea, %edx            # imm = 0x3EA
orl %ecx, %edx
jne 0x49d92
andl $-0x44, %eax
orl $0x2, %eax
movl %eax, 0xc(%rbx)
movl %ebp, 0x19210(%rbx)
movq %rbx, %rdi
callq 0x49e4b
movq %rax, %r14
movq %rbx, %rdi
callq 0x3ee31
testl %eax, %eax
je 0x49dba
movl 0x19214(%rbx), %eax
jmp 0x49e42
movl 0x4(%rbx), %r15d
movl %r15d, %r12d
andl $0x3, %r12d
cmpl $0x2, %r12d
sete %cl
movl %r15d, %edx
andl $0x40, %edx
shrl $0x6, %edx
xorl %eax, %eax
orb %cl, %dl
jne 0x49e42
movl %r15d, %eax
andl $0xfffffbbc, %eax       # imm = 0xFFFFFBBC
xorl %ecx, %ecx
testl %r12d, %r12d
setne %cl
orl %eax, %ecx
movl %ecx, 0x4(%rbx)
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq *0x5fa0(%rbx)
movl %eax, 0x19214(%rbx)
testl %eax, %eax
jne 0x49e42
cmpl $0x3, %r12d
jne 0x49e3c
movq 0x60f0(%rbx), %rdx
testq %rdx, %rdx
je 0x49e3c
movq $0x0, 0x60f0(%rbx)
leaq 0x6138(%rbx), %rsi
movq %rbx, %rdi
callq 0x37b1c
testl %eax, %eax
jne 0x49daf
movl %r15d, 0x4(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_set_validation_fault
static const char*
soap_set_validation_fault(struct soap *soap, const char *s, const char *t)
{ if (*soap->tag)
    sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element '%s'", s, t?t:SOAP_STR_EOS, soap->tag);
  else
    sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t?t:SOAP_STR_EOS);
  return soap->msgbuf;
}

// Assembly:
pushq %rbx
movq %rdx, %rax
movq %rsi, %rdx
leaq 0x16138(%rdi), %rbx
testq %rax, %rax
leaq 0x7d47(%rip), %rcx      # 0x52161
cmovneq %rax, %rcx
cmpb $0x0, 0x16938(%rdi)
je 0x4a444
movq %rdi, %r8
addq $0x16938, %r8           # imm = 0x16938
leaq 0x95e5(%rip), %rsi      # 0x53a1d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3360
jmp 0x4a455
leaq 0x9608(%rip), %rsi      # 0x53a53
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3360
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_strerror
static const char*
soap_strerror(struct soap *soap)
{ register int err = soap->errnum;
  if (err)
  {
#ifndef WIN32
    return strerror(err);
#else
#ifndef UNDER_CE
    DWORD len;
    *soap->msgbuf = '\0';
    len = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)soap->msgbuf, (DWORD)sizeof(soap->msgbuf), NULL);
#else
    DWORD i, len;
    *soap->msgbuf = '\0';
    len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, (LPTSTR)soap->msgbuf, (DWORD)(sizeof(soap->msgbuf)/sizeof(TCHAR)), NULL);
    for (i = 0; i <= len; i++)
    { if (((TCHAR*)soap->msgbuf)[i] < 0x80)
        soap->msgbuf[i] = (char)((TCHAR*)soap->msgbuf)[i];
      else
        soap->msgbuf[i] = '?';
    }
#endif
#endif
  }
  else
  { char *s = soap->msgbuf;
#ifndef WITH_LEAN
    int rt = soap->recv_timeout, st = soap->send_timeout;
    int ru = ' ', su = ' ';
#endif
    strcpy(s, "Operation interrupted or timed out");
#ifndef WITH_LEAN
    if (rt < 0)
    { rt = -rt;
      ru = 'u';
    }
    if (st < 0)
    { st = -st;
      su = 'u';
    }
    if (rt)
      sprintf(s + strlen(s), " (%d%cs receive delay)", rt, ru);
    if (st)
      sprintf(s + strlen(s), " (%d%cs send delay)", st, su);
#endif
  }
  return soap->msgbuf;
}

// Assembly:
movl 0x1921c(%rdi), %eax
testl %eax, %eax
je 0x4a46b
movl %eax, %edi
jmp 0x33a0
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x16138(%rdi), %rbx
movl 0x50(%rdi), %eax
movl 0x54(%rdi), %r13d
movups 0x9814(%rip), %xmm0     # 0x53c9f
movups %xmm0, 0x16138(%rdi)
movups 0x9816(%rip), %xmm0     # 0x53caf
movups %xmm0, 0x16148(%rdi)
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
movl $0x74756f, 0x16157(%rdi) # imm = 0x74756F
testl %r13d, %r13d
movl $0x75, %ecx
movl $0x20, %r15d
movl $0x20, %r14d
cmovsl %ecx, %r14d
testl %eax, %eax
je 0x4a4ff
movl %eax, %r12d
negl %r12d
cmovsl %eax, %r12d
testl %eax, %eax
cmovsl %ecx, %r15d
movq %rbx, %rdi
callq 0x3110
leaq (%rax,%rbx), %rdi
leaq 0x97d0(%rip), %rsi      # 0x53cc2
movl %r12d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x3360
testl %r13d, %r13d
je 0x4a523
movq %rbx, %rdi
callq 0x3110
leaq (%rax,%rbx), %rdi
leaq 0x97c2(%rip), %rsi      # 0x53cd9
movl %ebp, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x3360
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_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_send_empty_response
SOAP_FMAC2
soap_send_empty_response(struct soap *soap, int httpstatuscode)
{ register soap_mode m = soap->omode;
  soap->count = 0;
  if ((m & SOAP_IO) == SOAP_IO_CHUNK)
    soap->omode = (m & ~SOAP_IO) | SOAP_IO_BUFFER;
  if (soap_response(soap, httpstatuscode) || soap_end_send(soap))
  { soap->omode = m;
    return soap_closesock(soap);
  }
  soap->omode = m;
  return soap->error = SOAP_STOP; /* stops the server's response */
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xc(%rdi), %ebp
movq $0x0, 0x6110(%rdi)
movl %ebp, %eax
notl %eax
testb $0x3, %al
jne 0x4a919
movl %ebp, %eax
andl $-0x3, %eax
movl %eax, 0xc(%rbx)
movq %rbx, %rdi
callq 0x49d65
testl %eax, %eax
jne 0x4a931
movq %rbx, %rdi
callq 0x4007f
testl %eax, %eax
je 0x4a942
movl %ebp, 0xc(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3baf5
movl %ebp, 0xc(%rbx)
movl $0x3e8, 0x19214(%rbx)   # imm = 0x3E8
movl $0x3e8, %eax            # imm = 0x3E8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_recv_empty_response
SOAP_FMAC2
soap_recv_empty_response(struct soap *soap)
{ if (!soap_begin_recv(soap))
    soap_end_recv(soap);
  else if (soap->error == SOAP_NO_DATA || soap->error == 202)
    soap->error = SOAP_OK;
  return soap_closesock(soap);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x48722
testl %eax, %eax
je 0x4a986
movl 0x19214(%rbx), %eax
cmpl $0xca, %eax
je 0x4a97a
cmpl $0xe, %eax
jne 0x4a98e
movl $0x0, 0x19214(%rbx)
jmp 0x4a98e
movq %rbx, %rdi
callq 0x406e7
movq %rbx, %rdi
popq %rbx
jmp 0x3baf5
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_set_error
static int
soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcodeQName, const char *faultstring, const char *faultdetailXML, int soaperror)
{ *soap_faultcode(soap) = faultcode;
  if (faultsubcodeQName)
    *soap_faultsubcode(soap) = faultsubcodeQName;
  *soap_faultstring(soap) = faultstring;
  if (faultdetailXML && *faultdetailXML)
  { register const char **s = soap_faultdetail(soap);
    if (s)
      *s = faultdetailXML;
  }
  return soap->error = soaperror;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r15
callq 0x397c
movq %rbp, (%rax)
testq %r13, %r13
je 0x4a9cc
movq %r15, %rdi
callq 0x399f
movq %r13, (%rax)
movq %r15, %rdi
callq 0x39fa
movq %r12, (%rax)
testq %r14, %r14
je 0x4a9f2
cmpb $0x0, (%r14)
je 0x4a9f2
movq %r15, %rdi
callq 0x3a1d
testq %rax, %rax
je 0x4a9f2
movq %r14, (%rax)
movl %ebx, 0x19214(%r15)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_copy_fault
static int
soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcodeQName, const char *faultstring, const char *faultdetailXML)
{ char *r = NULL, *s = NULL, *t = NULL;
  if (faultsubcodeQName)
    r = soap_strdup(soap, faultsubcodeQName);
  if (faultstring)
    s = soap_strdup(soap, faultstring);
  if (faultdetailXML)
    t = soap_strdup(soap, faultdetailXML);
  return soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r12
movq %rcx, %r13
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x4aa77
movq %r14, %rdi
movq %rdx, %rsi
callq 0x3a6c4
movq %rax, %r15
jmp 0x4aa7a
xorl %r15d, %r15d
testq %r13, %r13
je 0x4aa8f
movq %r14, %rdi
movq %r13, %rsi
callq 0x3a6c4
movq %rax, %r13
jmp 0x4aa92
xorl %r13d, %r13d
testq %r12, %r12
je 0x4aaa7
movq %r14, %rdi
movq %r12, %rsi
callq 0x3a6c4
movq %rax, %r8
jmp 0x4aaaa
xorl %r8d, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
movl $0xc, %r9d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4a997
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_print_fault
SOAP_FMAC2
soap_print_fault(struct soap *soap, FILE *fd)
{ if (soap_check_state(soap))
    fprintf(fd, "Error: soap struct state not initialized\n");
  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);
    fprintf(fd, "%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]");
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
testq %rdi, %rdi
je 0x4ab73
movq %rdi, %r15
movl (%rdi), %eax
decl %eax
cmpw $0x2, %ax
jae 0x4ab73
cmpl $0x0, 0x19214(%r15)
je 0x4ac24
movq %r15, %rdi
callq 0x397c
movq (%rax), %r14
testq %r14, %r14
jne 0x4ab5e
movq %rax, %r12
movq %r15, %rdi
callq 0x49fec
movq (%r12), %r14
cmpw $0x2, 0x2(%r15)
jne 0x4ab95
movq %r15, %rdi
callq 0x399f
movq (%rax), %r12
jmp 0x4ab98
leaq 0x861c(%rip), %rdi      # 0x53196
movl $0x29, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3380
xorl %r12d, %r12d
movq %r15, %rdi
callq 0x39fa
movq (%rax), %r13
movq %r15, %rdi
callq 0x3a1d
movswl 0x2(%r15), %ecx
leaq 0x8636(%rip), %rsi      # 0x531ed
leaq 0x8627(%rip), %rdx      # 0x531e5
testl %ecx, %ecx
cmoveq %rsi, %rdx
jne 0x4abcd
movl 0x19214(%r15), %ecx
testq %r12, %r12
leaq 0x861d(%rip), %r9       # 0x531f4
cmovneq %r12, %r9
testq %r13, %r13
leaq 0x861a(%rip), %r10      # 0x531ff
cmovneq %r13, %r10
testq %rax, %rax
je 0x4ac01
movq (%rax), %rax
testq %rax, %rax
leaq 0x8610(%rip), %r11      # 0x5320b
cmovneq %rax, %r11
jmp 0x4ac08
leaq 0x8603(%rip), %r11      # 0x5320b
leaq 0x85b1(%rip), %rsi      # 0x531c0
movq %rbx, %rdi
movq %r14, %r8
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x3220
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
testq %rdi, %rdi
je 0x4ac95
movq %rdi, %r12
movl (%rdi), %eax
decl %eax
cmpw $0x2, %ax
jae 0x4ac95
cmpl $0x0, 0x19214(%r12)
je 0x4ad50
movq %r12, %rdi
callq 0x397c
movq (%rax), %r15
testq %r15, %r15
jne 0x4ac7f
movq %rax, %r13
movq %r12, %rdi
callq 0x49fec
movq (%r13), %r15
cmpw $0x2, 0x2(%r12)
jne 0x4acb5
movq %r12, %rdi
callq 0x399f
movq (%rax), %r13
jmp 0x4acb8
leaq 0x857b(%rip), %rsi      # 0x53217
movq %rbx, %rdi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3070
xorl %r13d, %r13d
movq %r12, %rdi
callq 0x39fa
movq (%rax), %rbp
movq %r12, %rdi
callq 0x3a1d
movswl 0x2(%r12), %r8d
leaq 0x8515(%rip), %rdx      # 0x531ed
leaq 0x8506(%rip), %rcx      # 0x531e5
testl %r8d, %r8d
cmoveq %rdx, %rcx
jne 0x4acf0
movl 0x19214(%r12), %r8d
testq %r13, %r13
leaq 0x84fa(%rip), %r10      # 0x531f4
cmovneq %r13, %r10
testq %rbp, %rbp
leaq 0x84f7(%rip), %r11      # 0x531ff
cmovneq %rbp, %r11
testq %rax, %rax
je 0x4ad24
movq (%rax), %rax
testq %rax, %rax
leaq 0x84ed(%rip), %r12      # 0x5320b
cmovneq %rax, %r12
jmp 0x4ad2b
leaq 0x84e0(%rip), %r12      # 0x5320b
subq $0x8, %rsp
leaq 0x848a(%rip), %rdx      # 0x531c0
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %r9
xorl %eax, %eax
pushq %r12
pushq %r11
pushq %r10
callq 0x3150
addq $0x20, %rsp
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_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_print_fault_location
SOAP_FMAC2
soap_print_fault_location(struct soap *soap, FILE *fd)
{ 
#ifndef WITH_LEAN
  int i, j, c1, c2;
  if (soap->error && soap->error != SOAP_STOP && soap->bufidx <= soap->buflen && soap->buflen > 0 && soap->buflen <= SOAP_BUFLEN)
  { i = (int)soap->bufidx - 1;
    if (i <= 0)
      i = 0;
    c1 = soap->buf[i];
    soap->buf[i] = '\0';
    if ((int)soap->buflen >= i + 1024)
      j = i + 1023;
    else
      j = (int)soap->buflen - 1;
    c2 = soap->buf[j];
    soap->buf[j] = '\0';
    fprintf(fd, "%s%c\n<!-- ** HERE ** -->\n", soap->buf, c1);
    if (soap->bufidx < soap->buflen)
      fprintf(fd, "%s\n", soap->buf + soap->bufidx);
    soap->buf[i] = c1;
    soap->buf[j] = c2;
  }
#endif
}

// Assembly:
movl 0x19214(%rdi), %eax
testl %eax, %eax
je 0x4ae66
cmpl $0x3e8, %eax            # imm = 0x3E8
je 0x4ae66
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x60f0(%rdi), %rax
movq 0x60f8(%rdi), %rcx
cmpq %rcx, %rax
seta %dl
decq %rcx
cmpq $0x10000, %rcx          # imm = 0x10000
setae %cl
orb %dl, %cl
jne 0x4ae58
movq %rsi, %rbx
leal -0x1(%rax), %ecx
xorl %edx, %edx
cmpl $0x2, %eax
cmovll %edx, %ecx
leaq 0x6138(%r14), %r15
movslq %ecx, %r12
movb 0x6138(%r14,%r12), %bpl
movb %dl, 0x6138(%r14,%r12)
movl 0x60f8(%r14), %eax
leal 0x400(%r12), %ecx
leal 0x3ff(%r12), %esi
leal -0x1(%rax), %edi
cmpl %eax, %ecx
cmovlel %esi, %edi
movsbl %bpl, %ecx
movslq %edi, %r13
movb 0x6138(%r14,%r13), %al
movb %al, 0x7(%rsp)
movb %dl, 0x6138(%r14,%r13)
leaq 0x841f(%rip), %rsi      # 0x5323a
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3220
movq 0x60f0(%r14), %rdx
cmpq 0x60f8(%r14), %rdx
jae 0x4ae4c
addq %r15, %rdx
leaq 0x839f(%rip), %rsi      # 0x531e1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3220
movb %bpl, (%r15,%r12)
movb 0x7(%rsp), %al
movb %al, (%r15,%r13)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_register_plugin_arg
SOAP_FMAC2
soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg)
{ register struct soap_plugin *p;
  register int r;
  if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin))))
    return soap->error = SOAP_EOM;
  p->id = NULL;
  p->data = NULL;
  p->fcopy = NULL;
  p->fdelete = NULL;
  r = fcreate(soap, p, arg);
  if (!r && p->fdelete)
  { p->next = soap->plugins;
    soap->plugins = p;
    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id));
    return SOAP_OK;
  }
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r));
  SOAP_FREE(soap, p);
  return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movl $0x28, %edi
callq 0x3290
testq %rax, %rax
je 0x4aeb1
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x8(%rax)
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq *%r15
movl %eax, %ebp
testl %eax, %eax
je 0x4aec2
movq %r14, %rdi
callq 0x3030
jmp 0x4aedc
movl $0x14, 0x19214(%rbx)
movl $0x14, %ebp
jmp 0x4aedc
cmpq $0x0, 0x20(%r14)
je 0x4aea7
movq 0x5f50(%rbx), %rax
movq %rax, (%r14)
movq %r14, 0x5f50(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_get_http_body
static char*
soap_get_http_body(struct soap *soap)
{
#ifndef WITH_LEAN
  register size_t l = 0, n = 0;
  register char *s;
  /* get HTML body of HTTP error content */
  if (!(soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) != SOAP_IO_CHUNK)
  { n = soap->length;
    if (!n)
      return NULL;
  }
#ifdef WITH_FAST
  soap->labidx = 0;			/* use look-aside buffer */
#else
  if (soap_new_block(soap) == NULL)
    return NULL;
#endif
  for (;;)
  { 
#ifdef WITH_FAST
    register size_t i, k;
    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
      return NULL;
    s = soap->labbuf + soap->labidx;	/* space to populate */
    k = soap->lablen - soap->labidx;	/* number of bytes available */
    soap->labidx = soap->lablen;	/* claim this space */
#else
    register size_t i, k = SOAP_BLKLEN;
    if (!(s = (char*)soap_push_block(soap, NULL, k)))
      return NULL;
#endif
    for (i = 0; i < k; i++)
    { register soap_wchar c = soap_getchar(soap);
      if ((int)c == EOF)
        goto end;
      *s++ = (char)(c & 0xFF);
      l++;
      if (n > 0 && l >= n)
        goto end;
    }
  }
end:
  *s = '\0';
#ifdef WITH_FAST
  s = soap_strdup(soap, soap->labbuf);
#else
  soap_size_block(soap, NULL, i+1);
  s = soap_save_block(soap, NULL, 0);
#endif
  return s;
#else
  return NULL;
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %eax
movl %eax, %ecx
shrl $0xa, %ecx
andl $0x1, %ecx
notl %eax
testb $0x3, %al
sete %al
orb %cl, %al
je 0x4af19
xorl %r14d, %r14d
jmp 0x4af25
movq 0x6118(%rbx), %r14
testq %r14, %r14
je 0x4af40
movq $0x0, 0x6130(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x39195
testl %eax, %eax
je 0x4af51
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
decq %r14
xorl %r15d, %r15d
movq 0x6120(%rbx), %r12
movq 0x6128(%rbx), %r13
movq 0x6130(%rbx), %rax
movq %r13, %rbp
movq %r13, 0x6130(%rbx)
subq %rax, %rbp
je 0x4afab
addq %rax, %r12
addq %r15, %r13
subq %rax, %r13
incq %r15
movq %rbx, %rdi
callq 0x38217
cmpl $-0x1, %eax
je 0x4afbd
movb %al, (%r12)
incq %r12
cmpq %r15, %r14
jb 0x4afbd
incq %r15
decq %rbp
jne 0x4af87
movq %r13, %r15
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x39195
testl %eax, %eax
je 0x4af57
jmp 0x4af40
movb $0x0, (%r12)
movq 0x6120(%rbx), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3a6c4
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: http_send_header
static int
http_send_header(struct soap *soap, const char *s)
{ register const char *t;
  do
  { t = strchr(s, '\n'); /* disallow \n in HTTP headers */
    if (!t)
      t = s + strlen(s);
    if (soap_send_raw(soap, s, t - s))
      return soap->error;
    s = t + 1;
  } while (*t);
  return SOAP_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %r14, %rdi
movl $0xa, %esi
callq 0x3130
movq %rax, %r15
testq %rax, %rax
jne 0x4b00d
movq %r14, %rdi
callq 0x3110
movq %rax, %r15
addq %r14, %r15
movq %r15, %rdx
subq %r14, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x379c8
testl %eax, %eax
jne 0x4b030
leaq 0x1(%r15), %r14
cmpb $0x0, (%r15)
jne 0x4afea
xorl %eax, %eax
jmp 0x4b036
movl 0x19214(%rbx), %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/md5.c
// Function: MD5Update
void MD5Update(MD5_CTX *context,unsigned char *input,unsigned int inputlen)
{
    unsigned int i = 0,index = 0,partlen = 0;
    index = (context->count[0] >> 3) & 0x3F;
    partlen = 64 - index;
    context->count[0] += inputlen << 3;
    if(context->count[0] < (inputlen << 3))
        context->count[1]++;
    context->count[1] += inputlen >> 29;

    if(inputlen >= partlen)
    {
        memcpy(&context->buffer[index],input,partlen);
        MD5Transform(context->state,context->buffer);
        for(i = partlen;i+64 <= inputlen;i+=64)
            MD5Transform(context->state,&input[i]);
        index = 0;
    }
    else
    {
        i = 0;
    }
    memcpy(&context->buffer[index],&input[i],inputlen-i);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
movl (%rdi), %eax
movl %eax, %r13d
shrl $0x3, %r13d
andl $0x3f, %r13d
movl $0x40, %ebp
subl %r13d, %ebp
leal (,%rbx,8), %ecx
shrl $0x1d, %edx
addl %eax, %ecx
movl %ecx, (%rdi)
adcl %edx, 0x4(%rdi)
movq %rsi, %r15
cmpl %ebx, %ebp
jbe 0x4b099
movl %r13d, %eax
xorl %ebp, %ebp
jmp 0x4b0ee
leaq 0x18(%r14), %rax
movq %rax, (%rsp)
leaq (%r14,%r13), %rdi
addq $0x18, %rdi
movl %ebp, %edx
movq %r15, %rsi
callq 0x3240
leaq 0x8(%r14), %r12
movq %r12, %rdi
movq (%rsp), %rsi
callq 0x4b116
movl $0x80, %eax
subl %r13d, %eax
cmpl %ebx, %eax
ja 0x4b0ec
movl %ebp, %r13d
movl %ebp, %esi
addq %r15, %rsi
movq %r12, %rdi
callq 0x4b116
leal 0x40(%r13), %ebp
subl $-0x80, %r13d
cmpl %ebx, %r13d
jbe 0x4b0cf
xorl %eax, %eax
leaq (%r14,%rax), %rdi
addq $0x18, %rdi
movl %ebp, %eax
addq %rax, %r15
subl %ebp, %ebx
movq %r15, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3240