LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_put_PointerToselect_USCOREfields
SOAP_FMAC4 soap_put_PointerToselect_USCOREfields(struct soap *soap, struct select_USCOREfields *const*a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToselect_USCOREfields);
	if (soap_out_PointerToselect_USCOREfields(soap, tag?tag:"SOAP-ENC:Array", id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
pushq $0x1c
popq %r9
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x3acfe
testq %r15, %r15
leaq 0x1c3b8(%rip), %rsi     # 0x4c6c1
cmovneq %r15, %rsi
movq %rbx, %rdi
movl %eax, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0x23927
testl %eax, %eax
je 0x30333
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1ac67
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_put_PointerToname_USCOREvalue_USCORElists
SOAP_FMAC4 soap_put_PointerToname_USCOREvalue_USCORElists(struct soap *soap, struct name_USCOREvalue_USCORElists *const*a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToname_USCOREvalue_USCORElists);
	if (soap_out_PointerToname_USCOREvalue_USCORElists(soap, tag?tag:"SOAP-ENC:Array", id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
pushq $0x19
popq %r9
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x3acfe
testq %r15, %r15
leaq 0x1c317(%rip), %rsi     # 0x4c6c1
cmovneq %r15, %rsi
movq %rbx, %rdi
movl %eax, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0x23987
testl %eax, %eax
je 0x303d4
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1ac67
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_put_PointerTolink_USCOREfield_USCORElist
SOAP_FMAC4 soap_put_PointerTolink_USCOREfield_USCORElist(struct soap *soap, struct link_USCOREfield_USCORElist *const*a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTolink_USCOREfield_USCORElist);
	if (soap_out_PointerTolink_USCOREfield_USCORElist(soap, tag?tag:"SOAP-ENC:Array", id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
pushq $0x15
popq %r9
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x3acfe
testq %r15, %r15
leaq 0x1c276(%rip), %rsi     # 0x4c6c1
cmovneq %r15, %rsi
movq %rbx, %rdi
movl %eax, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0x239e7
testl %eax, %eax
je 0x30475
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1ac67
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_put_PointerTofield_USCORElist
SOAP_FMAC4 soap_put_PointerTofield_USCORElist(struct soap *soap, struct field_USCORElist *const*a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTofield_USCORElist);
	if (soap_out_PointerTofield_USCORElist(soap, tag?tag:"SOAP-ENC:Array", id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
pushq $0x13
popq %r9
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x3acfe
testq %r15, %r15
leaq 0x1c1d5(%rip), %rsi     # 0x4c6c1
cmovneq %r15, %rsi
movq %rbx, %rdi
movl %eax, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0x23a47
testl %eax, %eax
je 0x30516
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1ac67
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_put_PointerToname_USCOREvalue_USCORElist
SOAP_FMAC4 soap_put_PointerToname_USCOREvalue_USCORElist(struct soap *soap, struct name_USCOREvalue_USCORElist *const*a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToname_USCOREvalue_USCORElist);
	if (soap_out_PointerToname_USCOREvalue_USCORElist(soap, tag?tag:"SOAP-ENC:Array", id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
pushq $0xe
popq %r9
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x3acfe
testq %r15, %r15
leaq 0x1c134(%rip), %rsi     # 0x4c6c1
cmovneq %r15, %rsi
movq %rbx, %rdi
movl %eax, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0x23aa7
testl %eax, %eax
je 0x305b7
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1ac67
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_put_PointerTons1__new_USCOREnote_USCOREattachment
SOAP_FMAC4 soap_put_PointerTons1__new_USCOREnote_USCOREattachment(struct soap *soap, struct ns1__new_USCOREnote_USCOREattachment *const*a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTons1__new_USCOREnote_USCOREattachment);
	if (soap_out_PointerTons1__new_USCOREnote_USCOREattachment(soap, tag?tag:"ns1:new_note_attachment", id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
pushq $0xa
popq %r9
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x3acfe
testq %r15, %r15
leaq 0x1bde4(%rip), %rsi     # 0x4c412
cmovneq %r15, %rsi
movq %rbx, %rdi
movl %eax, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0x23b07
testl %eax, %eax
je 0x30658
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1ac67
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_put__QName
SOAP_FMAC4 soap_put__QName(struct soap *soap, char *const*a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE__QName);
	if (soap_out__QName(soap, tag?tag:"byte", id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
pushq $0x5
popq %r9
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x3acfe
testq %r15, %r15
leaq 0x1b4e4(%rip), %rsi     # 0x4bbb3
cmovneq %r15, %rsi
movq %rbx, %rdi
movl %eax, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0x268a6
testl %eax, %eax
je 0x306f9
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1ac67
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_soapC.c
// Function: soap_put_string
SOAP_FMAC4 soap_put_string(struct soap *soap, char *const*a, const char *tag, const char *type)
{
	register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_string);
	if (soap_out_string(soap, tag?tag:"byte", id, a, type))
		return soap->error;
	return soap_putindependent(soap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
pushq $0x4
popq %r9
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x3acfe
testq %r15, %r15
leaq 0x1b443(%rip), %rsi     # 0x4bbb3
cmovneq %r15, %rsi
movq %rbx, %rdi
movl %eax, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0x23b66
testl %eax, %eax
je 0x3079a
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1ac67
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_send_raw
SOAP_FMAC2
soap_send_raw(struct soap *soap, const char *s, size_t n)
{ if (!n)
    return SOAP_OK;
  if (soap->mode & SOAP_IO_LENGTH)
  { soap->count += n;
#ifndef WITH_LEANER
    if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE)
      return soap->error = soap->fpreparesend(soap, s, n);
#endif
    return SOAP_OK;
  }
  if (soap->mode & SOAP_IO)
  { register size_t i = SOAP_BUFLEN - soap->bufidx;
    while (n >= i)
    { memcpy(soap->buf + soap->bufidx, s, i);
      soap->bufidx = SOAP_BUFLEN;
      if (soap_flush(soap))
        return soap->error;
      s += i;
      n -= i;
      i = SOAP_BUFLEN;
    }
    memcpy(soap->buf + soap->bufidx, s, n);
    soap->bufidx += n;
    return SOAP_OK;
  }
  return soap_flush_raw(soap, s, n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %eax, %eax
testq %rdx, %rdx
je 0x348bd
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl 0x4(%rdi), %ecx
testb $0x8, %cl
jne 0x3484e
testb $0x3, %cl
je 0x34884
movl $0x10000, %r13d         # imm = 0x10000
subq 0x60f0(%r14), %r13
leaq 0x6138(%r14), %rbp
movq %rbx, %r12
movq 0x60f0(%r14), %rdi
addq %rbp, %rdi
subq %r13, %r12
jb 0x348a0
movq %r15, %rsi
movq %r13, %rdx
callq 0x3240
movq $0x10000, 0x60f0(%r14) # imm = 0x10000
movq %r14, %rdi
callq 0x348cc
testl %eax, %eax
jne 0x348b6
addq %r13, %r15
movl $0x10000, %r13d         # imm = 0x10000
movq %r12, %rbx
jmp 0x3480b
addq %rbx, 0x6110(%r14)
movq 0x6050(%r14), %r8
testq %r8, %r8
sete %dl
andl $0x3, %ecx
cmpl $0x2, %ecx
sete %cl
orb %dl, %cl
jne 0x348bd
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq *%r8
movl %eax, 0x19214(%r14)
jmp 0x348bd
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x348ef
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3240
addq %rbx, 0x60f0(%r14)
xorl %eax, %eax
jmp 0x348bd
movl 0x19214(%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_flush_raw
SOAP_FMAC2
soap_flush_raw(struct soap *soap, const char *s, size_t n)
{ if ((soap->mode & SOAP_IO) == SOAP_IO_STORE)
  { register char *t;
    if (!(t = (char*)soap_push_block(soap, NULL, n)))
      return soap->error = SOAP_EOM;
    memcpy(t, s, n);
#ifndef WITH_LEANER
    if (soap->fpreparesend)
      return soap->error = soap->fpreparesend(soap, s, n);
#endif
    return SOAP_OK;
  }
#ifndef WITH_LEANER
  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK)
  { char t[16];
    sprintf(t, "\r\n%lX\r\n" + (soap->chunksize ? 0 : 2), (unsigned long)n);
    DBGMSG(SENT, t, strlen(t));
    if ((soap->error = soap->fsend(soap, t, strlen(t))))
      return soap->error;
    soap->chunksize += n;
  }
  DBGMSG(SENT, s, n);
#endif
  return soap->error = soap->fsend(soap, s, n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x4(%rdi), %eax
andl $0x3, %eax
cmpl $0x3, %eax
je 0x34959
cmpl $0x2, %eax
jne 0x349c2
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x349eb
testq %rax, %rax
je 0x349ab
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3240
movq 0x6050(%rbx), %rax
testq %rax, %rax
je 0x349da
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq *%rax
jmp 0x349d1
xorl %eax, %eax
cmpq $0x0, 0x18598(%rbx)
sete %al
leaq 0x188b3(%rip), %rcx     # 0x4d220
leaq (%rcx,%rax,2), %rsi
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3370
movq 0x6000(%rbx), %r13
movq %r12, %rdi
callq 0x3110
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq *%r13
movl %eax, 0x19214(%rbx)
testl %eax, %eax
je 0x349bb
movl %eax, %r12d
jmp 0x349da
movl $0x14, 0x19214(%rbx)
pushq $0x14
popq %r12
jmp 0x349da
addq %r14, 0x18598(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq *0x6000(%rbx)
movl %eax, %r12d
movl %eax, 0x19214(%rbx)
movl %r12d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_push_block
SOAP_FMAC1
void*
SOAP_FMAC2
soap_push_block(struct soap *soap, struct soap_blist *b, size_t n)
{ char *p;
  if (!b)
    b = soap->blist;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)b->size + (unsigned int)n));
  if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t))))
  { soap->error = SOAP_EOM;
    return NULL;
  }
  *(char**)p = b->ptr;
  *(size_t*)(p + sizeof(char*)) = n;
  b->ptr = p;
  b->size += n;
  return p + sizeof(char*) + sizeof(size_t);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rsi, %rsi
jne 0x34a05
movq 0x90(%r15), %r14
leaq 0x10(%rbx), %rdi
callq 0x3290
testq %rax, %rax
je 0x34a2c
movq 0x8(%r14), %rcx
movq %rcx, (%rax)
movq %rbx, 0x8(%rax)
movq %rax, 0x8(%r14)
addq %rbx, 0x10(%r14)
addq $0x10, %rax
jmp 0x34a39
movl $0x14, 0x19214(%r15)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_send3
SOAP_FMAC2
soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3)
{ if (soap_send(soap, s1)
   || soap_send(soap, s2))
    return soap->error;
  return soap_send(soap, s3);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, %r14
callq 0x34a3f
testl %eax, %eax
jne 0x34ac8
movq %r14, %rdi
movq %r15, %rsi
callq 0x34a3f
testl %eax, %eax
je 0x34ad5
movl 0x19214(%r14), %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x34a3f
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_getchunkchar
static soap_wchar
soap_getchunkchar(struct soap *soap)
{ if (soap->bufidx < soap->buflen)
    return soap->buf[soap->bufidx++];
  soap->bufidx = 0;
  soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN);
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket %d\n", (unsigned int)soap->buflen, soap->socket));
  DBGMSG(RECV, soap->buf, soap->buflen);
  if (soap->buflen)
    return soap->buf[soap->bufidx++];
  return EOF;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x60f0(%rdi), %rax
cmpq 0x60f8(%rdi), %rax
jae 0x34d7c
leaq 0x1(%rax), %rcx
movq %rcx, 0x60f0(%rbx)
leaq (%rbx,%rax), %r14
addq $0x6138, %r14           # imm = 0x6138
jmp 0x34dc4
andq $0x0, 0x60f0(%rbx)
leaq 0x6138(%rbx), %r14
movl $0x10000, %edx          # imm = 0x10000
movq %rbx, %rdi
movq %r14, %rsi
callq *0x6008(%rbx)
movq %rax, 0x185a0(%rbx)
movq %rax, 0x60f8(%rbx)
testq %rax, %rax
je 0x34dd0
movq 0x60f0(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x60f0(%rbx)
addq %rax, %r14
movsbl (%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $-0x1
popq %rax
jmp 0x34dc8
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_getchar
SOAP_FMAC2
soap_getchar(struct soap *soap)
{ register soap_wchar c;
  c = soap->ahead;
  if (c)
  { if (c != EOF)
      soap->ahead = 0;
    return c;
  }
  return soap_get1(soap);
}

// Assembly:
movl 0x6100(%rdi), %eax
cmpl $-0x1, %eax
je 0x34ffe
pushq %rbx
movq %rdi, %rbx
testl %eax, %eax
jne 0x34fda
movq 0x60f0(%rbx), %rax
cmpq 0x60f8(%rbx), %rax
jb 0x34fea
movq %rbx, %rdi
callq 0x34dd5
testl %eax, %eax
je 0x34fe3
pushq $-0x1
popq %rax
jmp 0x34ffd
andl $0x0, 0x6100(%rbx)
jmp 0x34ffd
movq 0x60f0(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x60f0(%rbx)
movzbl 0x6138(%rbx,%rax), %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_code_int
SOAP_FMAC1
long
SOAP_FMAC2
soap_code_int(const struct soap_code_map *code_map, const char *str, long other)
{ if (code_map)
  { while (code_map->string)
    { if (!soap_tag_cmp(str, code_map->string)) /* case insensitive */
        return code_map->code;
      code_map++;
    }
  }
  return other;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
testq %rdi, %rdi
je 0x35076
movq %rsi, %r15
movq %rdi, %r14
addq $0x8, %r14
movq (%r14), %rsi
testq %rsi, %rsi
je 0x35076
movq %r15, %rdi
callq 0x3507f
testl %eax, %eax
je 0x35072
addq $0x10, %r14
jmp 0x35058
movq -0x8(%r14), %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_tag_cmp
SOAP_FMAC2
soap_tag_cmp(const char *s, const char *t)
{ for (;;)
  { register int c1 = *s;
    register int c2 = *t;
    if (!c1 || c1 == '"')
      break;
    if (c2 != '-')
    { if (c1 != c2)
      { if (c1 >= 'A' && c1 <= 'Z')
          c1 += 'a' - 'A';
        if (c2 >= 'A' && c2 <= 'Z')
          c2 += 'a' - 'A';
      }
      if (c1 != c2)
      { if (c2 != '*')
          return 1;
        c2 = *++t;
        if (!c2)
          return 0;
        if (c2 >= 'A' && c2 <= 'Z')
          c2 += 'a' - 'A';
        for (;;)
        { c1 = *s;
          if (!c1 || c1 == '"')
            break;
          if (c1 >= 'A' && c1 <= 'Z')
            c1 += 'a' - 'A';
          if (c1 == c2 && !soap_tag_cmp(s + 1, t + 1))
            return 0;
          s++;
        }
        break;
      }
    }
    s++;
    t++;
  }
  if (*t == '*' && !t[1])
    return 0;
  return *t;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
incq %r14
incq %rbx
movzbl -0x1(%r14), %eax
movb -0x1(%rbx), %r12b
testl %eax, %eax
je 0x35149
cmpl $0x22, %eax
je 0x35149
cmpb $0x2d, %r12b
je 0x35090
movsbl %al, %edx
movsbl %r12b, %ecx
cmpb %r12b, %dl
je 0x350e3
leal -0x41(%rdx), %esi
movl %edx, %edi
orl $0x20, %edi
cmpb $0x1a, %sil
cmovael %edx, %edi
addb $-0x41, %r12b
movl %ecx, %edx
orl $0x20, %edx
cmpb $0x1a, %r12b
cmovbl %edx, %ecx
movl %edi, %edx
cmpl %ecx, %edx
je 0x35090
cmpl $0x2a, %ecx
jne 0x35171
movsbl (%rbx), %r12d
xorl %ebp, %ebp
testl %r12d, %r12d
je 0x3515c
leal -0x41(%r12), %ecx
movl %r12d, %r13d
orl $0x20, %r13d
cmpb $0x1a, %cl
cmovael %r12d, %r13d
leaq 0x1(%rbx), %r15
testb %al, %al
je 0x3514c
movzbl %al, %ecx
cmpl $0x22, %ecx
je 0x3514c
movsbl %al, %ecx
addb $-0x41, %al
movl %ecx, %edx
orl $0x20, %edx
cmpb $0x1a, %al
cmovael %ecx, %edx
cmpl %r13d, %edx
jne 0x35141
movq %r14, %rdi
movq %r15, %rsi
callq 0x3507f
testl %eax, %eax
je 0x3515c
movb (%r14), %al
incq %r14
jmp 0x35112
decq %rbx
cmpb $0x2a, %r12b
jne 0x35158
cmpb $0x0, 0x1(%rbx)
je 0x3516d
movsbl %r12b, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x3515c
pushq $0x1
popq %rbp
jmp 0x3515c
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_code_bits
SOAP_FMAC1
long
SOAP_FMAC2
soap_code_bits(const struct soap_code_map *code_map, const char *str)
{ register long bits = 0;
  if (code_map)
  { while (str && *str)
    { const struct soap_code_map *p;
      for (p = code_map; p->string; p++)
      { register size_t n = strlen(p->string);
        if (!strncmp(p->string, str, n) && soap_blank(str[n]))
        { bits |= p->code;
          str += n;
          while (*str > 0 && *str <= 32)
            str++;
          break;
        }
      }
      if (!p->string)
        return 0;
    }
  }
  return bits;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x35213
movq %rsi, %rbx
movq %rdi, %r14
movb (%rsi), %al
addq $0x8, %r14
xorl %r15d, %r15d
testb %al, %al
je 0x35216
movq %r14, %rbp
movq (%rbp), %r13
testq %r13, %r13
je 0x35213
movq %r13, %rdi
callq 0x3110
movq %rax, %r12
movq %r13, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3080
testl %eax, %eax
jne 0x351f0
cmpb $0x20, (%rbx,%r12)
jbe 0x351f6
addq $0x10, %rbp
jmp 0x351c3
movq -0x8(%rbp), %rcx
addq %r12, %rbx
decq %rbx
movb 0x1(%rbx), %al
incq %rbx
leal -0x1(%rax), %edx
cmpb $0x20, %dl
jb 0x35200
orq %rcx, %r15
jmp 0x351bc
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_code_list
SOAP_FMAC1
const char*
SOAP_FMAC2
soap_code_list(struct soap *soap, const struct soap_code_map *code_map, long code)
{ register char *t = soap->tmpbuf;
  if (code_map)
  { while (code_map->string)
    { if (code_map->code & code)
      { register const char *s = code_map->string;
        if (t != soap->tmpbuf)
          *t++ = ' ';
        while (*s && t < soap->tmpbuf + sizeof(soap->tmpbuf) - 1)
          *t++ = *s++;
        if (t == soap->tmpbuf + sizeof(soap->tmpbuf) - 1)
          break;
      }
      code_map++;
    }
  }
  *t = '\0';
  return soap->tmpbuf;
}

// Assembly:
leaq 0x16538(%rdi), %rax
movq %rax, %r9
testq %rsi, %rsi
je 0x3529c
movl $0x16538, %ecx          # imm = 0x16538
leaq (%rdi,%rcx), %r9
movq 0x8(%rsi), %r8
testq %r8, %r8
je 0x3529c
testq %rdx, (%rsi)
je 0x35290
movl $0x16538, %r10d         # imm = 0x16538
cmpq $0x16538, %rcx          # imm = 0x16538
je 0x35267
incq %rcx
movb $0x20, (%r9)
movq %rcx, %r10
movq %r10, %rcx
movb (%r8), %r9b
testb %r9b, %r9b
je 0x35287
cmpq $0x16936, %rcx          # imm = 0x16936
jg 0x35287
incq %r8
movb %r9b, (%rdi,%rcx)
incq %rcx
jmp 0x3526a
cmpq $0x16937, %rcx          # imm = 0x16937
je 0x35296
addq $0x10, %rsi
jmp 0x3523c
addq %rcx, %rdi
movq %rdi, %r9
movb $0x0, (%r9)
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_move
SOAP_FMAC2
soap_move(struct soap *soap, long n)
{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n));
  for (; n > 0; n--)
    if ((int)soap_getchar(soap) == EOF)
      return SOAP_EOF;
  return SOAP_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
incq %r14
pushq $-0x1
popq %rbx
decq %r14
testq %r14, %r14
jle 0x35916
movq %r15, %rdi
callq 0x34fa6
cmpl $-0x1, %eax
jne 0x358ff
jmp 0x35918
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_pututf8
SOAP_FMAC2
soap_pututf8(struct soap *soap, register unsigned long c)
{ char tmp[16];
  if (c < 0x80 && c > 0)
  { *tmp = (char)c;
    return soap_send_raw(soap, tmp, 1);
  }
#ifndef WITH_LEAN
  if (c >= 0x80)
  { register char *t = tmp;
    if (c < 0x0800)
      *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));
    else
    { if (c < 0x010000)
        *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));
      else
      { if (c < 0x200000)
          *t++ = (char)(0xF0 | ((c >> 18) & 0x07));
        else
        { if (c < 0x04000000)
            *t++ = (char)(0xF8 | ((c >> 24) & 0x03));
          else
          { *t++ = (char)(0xFC | ((c >> 30) & 0x01));
            *t++ = (char)(0x80 | ((c >> 24) & 0x3F));
          }
          *t++ = (char)(0x80 | ((c >> 18) & 0x3F));
        }     
        *t++ = (char)(0x80 | ((c >> 12) & 0x3F));
      }
      *t++ = (char)(0x80 | ((c >> 6) & 0x3F));
    }
    *t++ = (char)(0x80 | (c & 0x3F));
    *t = '\0';
  }
#else
  sprintf(tmp, "&#%lu;", c);
#endif
  return soap_send(soap, tmp);
}

// Assembly:
subq $0x18, %rsp
leaq -0x1(%rsi), %rax
cmpq $0x7e, %rax
ja 0x35965
movq %rsp, %rax
movb %sil, (%rax)
pushq $0x1
popq %rdx
movq %rax, %rsi
callq 0x347c4
jmp 0x35a31
cmpq $0x80, %rsi
jb 0x35a29
movl %esi, %ecx
cmpq $0x7ff, %rsi            # imm = 0x7FF
ja 0x3598b
shrl $0x6, %ecx
orb $-0x40, %cl
movq %rsp, %rax
jmp 0x35a17
cmpq $0xffff, %rsi           # imm = 0xFFFF
ja 0x359a4
shrl $0xc, %ecx
orb $-0x20, %cl
leaq 0x1(%rsp), %rax
movb %cl, -0x1(%rax)
jmp 0x35a0c
cmpq $0x1fffff, %rsi         # imm = 0x1FFFFF
ja 0x359b8
shrl $0x12, %ecx
orb $-0x10, %cl
movq %rsp, %rax
jmp 0x359f8
cmpq $0x3ffffff, %rsi        # imm = 0x3FFFFFF
ja 0x359ce
shrl $0x18, %ecx
orb $-0x8, %cl
leaq 0x1(%rsp), %rax
jmp 0x359ea
shrl $0x1e, %ecx
andb $0x1, %cl
orb $-0x4, %cl
movl %esi, %edx
shrl $0x18, %edx
andb $0x3f, %dl
orb $-0x80, %dl
leaq 0x2(%rsp), %rax
movb %dl, -0x1(%rax)
movb %cl, (%rsp)
movl %esi, %ecx
shrl $0x12, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, (%rax)
movl %esi, %ecx
shrl $0xc, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x1(%rax)
addq $0x2, %rax
movl %esi, %ecx
shrl $0x6, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, (%rax)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x1(%rax)
movb $0x0, 0x2(%rax)
movq %rsp, %rsi
callq 0x34a3f
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_puthex
SOAP_FMAC2
soap_puthex(struct soap *soap, const unsigned char *s, int n)
{ char d[2];
  register int i;
#ifdef WITH_DOM
  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
      return soap->error;
    return SOAP_OK;
  }
#endif
  for (i = 0; i < n; i++)
  { register int m = *s++;
    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
    m &= 0x0F;
    d[1] = (char)(m + (m > 9 ? '7' : '0'));
    if (soap_send_raw(soap, d, 2))
      return soap->error;
  }
  return SOAP_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r12
movq %rdi, %r15
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %r14d
pushq $0x37
popq %rbx
pushq $0x30
popq %r13
xorl %ebp, %ebp
cmpl %ebp, %r14d
je 0x35cdc
movb (%r12,%rbp), %al
movl %eax, %ecx
shrb $0x4, %cl
cmpb $-0x60, %al
movl %r13d, %edx
cmovael %ebx, %edx
addb %cl, %dl
movb %dl, 0x6(%rsp)
andb $0xf, %al
cmpb $0xa, %al
movl %r13d, %ecx
cmovael %ebx, %ecx
addb %al, %cl
movb %cl, 0x7(%rsp)
movq %r15, %rdi
leaq 0x6(%rsp), %rsi
pushq $0x2
popq %rdx
callq 0x347c4
testl %eax, %eax
jne 0x35ce0
incq %rbp
jmp 0x35c97
xorl %eax, %eax
jmp 0x35ce7
movl 0x19214(%r15), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_append_lab
SOAP_FMAC2
soap_append_lab(struct soap *soap, const char *s, size_t n)
{ if (soap->labidx + n >= soap->lablen)
  { register char *t = soap->labbuf;
    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, old size=%lu", (unsigned long)soap->lablen));
    if (soap->lablen == 0)
      soap->lablen = SOAP_LABLEN;
    while (soap->labidx + n >= soap->lablen)
      soap->lablen <<= 1;
    DBGLOG(TEST, SOAP_MESSAGE(fdebug, ", new size=%lu\n", (unsigned long)soap->lablen));
    soap->labbuf = (char*)SOAP_MALLOC(soap, soap->lablen);
    if (!soap->labbuf)
    { if (t)
        SOAP_FREE(soap, t);
      return soap->error = SOAP_EOM;
    }
    if (t)
    { memcpy(soap->labbuf, t, soap->labidx);
      SOAP_FREE(soap, t);
    }
  }
  if (s)
  { memcpy(soap->labbuf + soap->labidx, s, n);
    soap->labidx += n;
  }
  return SOAP_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x6128(%rdi), %rdi
movq 0x6130(%rbx), %r13
leaq (%rdx,%r13), %rax
cmpq %rdi, %rax
jb 0x35ec8
movq 0x6120(%rbx), %r12
testq %rdi, %rdi
jne 0x35e92
movl $0x100, %edi            # imm = 0x100
movq %rdi, 0x6128(%rbx)
cmpq %rdi, %rax
jb 0x35e9c
addq %rdi, %rdi
jmp 0x35e8b
callq 0x3290
movq %rax, 0x6120(%rbx)
testq %rax, %rax
je 0x35ef1
testq %r12, %r12
je 0x35ec8
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3240
movq %r12, %rdi
callq 0x3030
xorl %ebp, %ebp
testq %r15, %r15
je 0x35f06
movq 0x6120(%rbx), %rdi
addq 0x6130(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3240
addq %r14, 0x6130(%rbx)
jmp 0x35f06
movq %r12, %rdi
callq 0x3030
movl $0x14, 0x19214(%rbx)
pushq $0x14
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_malloc
SOAP_FMAC1
void*
SOAP_FMAC2
soap_malloc(struct soap *soap, size_t n)
{ register char *p;
  if (!n)
    return (void*)SOAP_NON_NULL;
  if (!soap)
    return SOAP_MALLOC(soap, n);
  if (soap->fmalloc)
    p = (char*)soap->fmalloc(soap, n);
  else
  { n += sizeof(short);
    n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */
    if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t))))
    { soap->error = SOAP_EOM;
      return NULL;
    }
    /* set the canary to detect corruption */
    *(unsigned short*)(p + n - sizeof(unsigned short)) = (unsigned short)SOAP_CANARY;
    /* keep chain of alloced cells for destruction */
    *(void**)(p + n) = soap->alist;
    *(size_t*)(p + n + sizeof(void*)) = n;
    soap->alist = p + n;
  }
  soap->alloced = 1;
  return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x35f42
movq %rsi, %r14
movq %rdi, %rbx
testq %rdi, %rdi
je 0x35f4b
movq 0x6038(%rbx), %rax
testq %rax, %rax
je 0x35f58
movq %rbx, %rdi
movq %r14, %rsi
callq *%rax
jmp 0x35fa1
leaq 0x17218(%rip), %rax     # 0x4d161
jmp 0x35faa
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3290
pushq $0x6
popq %r15
subl %r14d, %r15d
andl $0x7, %r15d
leaq (%r14,%r15), %rdi
addq $0x12, %rdi
callq 0x3290
testq %rax, %rax
je 0x35fb0
leaq (%r14,%r15), %rcx
addq $0x2, %rcx
movq %rax, %rdx
addq %rcx, %rdx
movw $0xc0de, -0x2(%rax,%rcx) # imm = 0xC0DE
movq 0xa0(%rbx), %rsi
movq %rsi, (%rax,%rcx)
movq %rcx, 0x8(%rax,%rcx)
movq %rdx, 0xa0(%rbx)
movw $0x1, 0x18592(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movl $0x14, 0x19214(%rbx)
xorl %eax, %eax
jmp 0x35faa
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_putbase64
SOAP_FMAC2
soap_putbase64(struct soap *soap, const unsigned char *s, int n)
{ register int i;
  register unsigned long m;
  char d[4];
  if (!s)
    return SOAP_OK;
#ifdef WITH_DOM
  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
  { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n)))
      return soap->error;
    return SOAP_OK;
  }
#endif
  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)
      d[--i] = soap_base64o[m & 0x3F];
    if (soap_send_raw(soap, d, 4))
      return soap->error;
  }
  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)
      d[--i] = soap_base64o[m & 0x3F];
    for (i = 3; i > n; i--)
      d[i] = '=';
    if (soap_send_raw(soap, d, 4))
      return soap->error;
  }
  return SOAP_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
testq %rsi, %rsi
je 0x360ed
movq %rsi, %rbx
xorl %r12d, %r12d
pushq $0x4
popq %r15
leaq 0x18d05(%rip), %rbp     # 0x4ecf0
movq %rsi, %r14
movl %edx, 0x14(%rsp)
movl %edx, %r13d
cmpl $0x3, %r13d
jl 0x3605f
movzbl (%r14), %eax
movzbl 0x1(%r14), %ecx
shll $0x10, %eax
shll $0x8, %ecx
orl %eax, %ecx
movzbl 0x2(%r14), %eax
orq %rcx, %rax
movq %r15, %rdx
movq %r15, %rcx
subq $0x1, %rcx
jb 0x36037
movl %eax, %esi
andl $0x3f, %esi
movb (%rsi,%rbp), %sil
movb %sil, 0x3(%rsp,%rdx)
shrq $0x6, %rax
movq %rcx, %rdx
jmp 0x3601a
movq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rsi
movq %r15, %rdx
callq 0x347c4
testl %eax, %eax
jne 0x360e0
addl $-0x3, %r13d
addq $0x3, %r14
addq $0x3, %r12
jmp 0x35ff5
testl %r13d, %r13d
jle 0x360ed
movl 0x14(%rsp), %ecx
xorl %eax, %eax
cmpl %r12d, %ecx
je 0x36084
shlq $0x8, %rax
movzbl (%rbx,%r12), %edx
orq %rdx, %rax
incq %r12
jmp 0x3606e
movl %r13d, %ecx
cmpl $0x3, %ecx
jae 0x36094
shlq $0x8, %rax
incl %ecx
jmp 0x36087
pushq $0x4
popq %rdx
movq %rdx, %rcx
subq $0x1, %rcx
jb 0x360b7
movl %eax, %esi
andl $0x3f, %esi
movb (%rsi,%rbp), %sil
movb %sil, 0x3(%rsp,%rdx)
shrq $0x6, %rax
movq %rcx, %rdx
jmp 0x3609a
pushq $0x3
popq %rax
cmpl %r13d, %eax
jle 0x360ca
movl %eax, %ecx
movb $0x3d, 0x4(%rsp,%rcx)
decl %eax
jmp 0x360ba
leaq 0x4(%rsp), %rsi
pushq $0x4
popq %rdx
movq 0x8(%rsp), %rdi
callq 0x347c4
testl %eax, %eax
je 0x360ed
movq 0x8(%rsp), %rax
movl 0x19214(%rax), %eax
jmp 0x360ef
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_xop_forward
SOAP_FMAC2
soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
{ /* Check MTOM xop:Include element (within hex/base64Binary) */
  /* TODO: this code to be obsoleted with new import/xop.h conventions */
  int body = soap->body; /* should save type too? */
  if (!soap_peek_element(soap))
  { if (!soap_element_begin_in(soap, "xop:Include", 0, NULL) && *soap->href)
    { if (soap_dime_forward(soap, ptr, size, id, type, options))
        return soap->error;
    }
    if (soap->body && soap_element_end_in(soap, NULL))
      return soap->error;
  }
  soap->body = body;
  return SOAP_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %r15
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6106(%rdi), %eax
movw %ax, 0xe(%rsp)
callq 0x363a8
testl %eax, %eax
je 0x36325
movzwl 0xe(%rsp), %eax
movw %ax, 0x6106(%rbx)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, 0x10(%rsp)
movq %rbp, 0x18(%rsp)
movq %r13, 0x20(%rsp)
movq %r12, 0x28(%rsp)
movq %r15, 0x30(%rsp)
leaq 0x16ee3(%rip), %rsi     # 0x4d228
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x36f8a
testl %eax, %eax
je 0x3636f
cmpw $0x0, 0x6106(%rbx)
je 0x36308
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3713c
testl %eax, %eax
jne 0x3639d
jmp 0x36308
cmpb $0x0, 0x17138(%rbx)
je 0x36355
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0x30(%rsp), %r9
callq 0x37093
testl %eax, %eax
je 0x36355
movl 0x19214(%rbx), %eax
jmp 0x36316
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_element_begin_in
SOAP_FMAC2
soap_element_begin_in(struct soap *soap, const char *tag, int nillable, const char *type)
{ if (!soap_peek_element(soap))
  { if (soap->other)
      return soap->error = SOAP_TAG_MISMATCH;
    if (tag && *tag == '-')
      return SOAP_OK;
    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
    { soap->peeked = 0;
      if (type && *soap->type && soap_match_tag(soap, soap->type, type))
        return soap->error = SOAP_TYPE;
      if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT))
        return soap->error = SOAP_NULL;
      if (soap->body)
        soap->level++;
      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:SOAP_STR_EOS ));
    }
  }
  else if (soap->error == SOAP_NO_TAG && tag && *tag == '-')
    soap->error = SOAP_OK;
  return soap->error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x363a8
testl %eax, %eax
je 0x36fd1
testq %r15, %r15
je 0x37061
cmpl $0x6, 0x19214(%rbx)
jne 0x37061
cmpb $0x2d, (%r15)
jne 0x37061
andl $0x0, 0x19214(%rbx)
jmp 0x37061
cmpw $0x0, 0x18538(%rbx)
je 0x36fea
movl $0x3, 0x19214(%rbx)
pushq $0x3
popq %rax
jmp 0x37067
testq %r15, %r15
je 0x36ff7
xorl %eax, %eax
cmpb $0x2d, (%r15)
je 0x37067
leaq 0x16938(%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x380f0
movl %eax, 0x19214(%rbx)
testl %eax, %eax
jne 0x37061
andw $0x0, 0x18594(%rbx)
testq %r14, %r14
je 0x3704d
cmpb $0x0, 0x17538(%rbx)
je 0x3704d
leaq 0x17538(%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x380f0
testl %eax, %eax
je 0x3704d
movl $0x4, 0x19214(%rbx)
pushq $0x4
jmp 0x36fe7
testl %ebp, %ebp
je 0x37072
cmpw $0x0, 0x6106(%rbx)
je 0x37061
incl 0x6108(%rbx)
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpw $0x0, 0x1858c(%rbx)
je 0x37051
testb $0x10, 0x5(%rbx)
je 0x37051
movl $0x17, 0x19214(%rbx)
pushq $0x17
jmp 0x36fe7
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_dime_forward
SOAP_FMAC2
soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
{ struct soap_xlist *xp;
  *ptr = NULL;
  *size = 0;
  *id = NULL;
  *type = NULL;
  *options = NULL;
  if (!*soap->href)
    return SOAP_OK;
  *id = soap_strdup(soap, soap->href);
  xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
  if (!xp)
    return soap->error = SOAP_EOM;
  xp->next = soap->xlist;
  xp->ptr = ptr;
  xp->size = size;
  xp->id = *id;
  xp->type = type;
  xp->options = options;
  soap->xlist = xp;
  return SOAP_OK;
}

// Assembly:
andq $0x0, (%rsi)
andl $0x0, (%rdx)
andq $0x0, (%rcx)
andq $0x0, (%r8)
andq $0x0, (%r9)
xorl %eax, %eax
cmpb $0x0, 0x17138(%rdi)
je 0x3713b
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rcx, %rbx
movq %r8, %r12
movq %r9, %rbp
movq %rdi, %r13
movq %rsi, (%rsp)
leaq 0x17138(%rdi), %rsi
callq 0x37284
movq %rax, %r14
movq %rax, (%rbx)
pushq $0x30
popq %rdi
callq 0x3290
testq %rax, %rax
je 0x3711f
movq 0x192b0(%r13), %rcx
movq %rcx, (%rax)
movq (%rsp), %rcx
movq %rcx, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
movq %r12, 0x20(%rax)
movq %rbp, 0x28(%rax)
movq %rax, 0x192b0(%r13)
xorl %eax, %eax
jmp 0x3712d
movl $0x14, 0x19214(%r13)
pushq $0x14
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_strdup
SOAP_FMAC1
char *
SOAP_FMAC2
soap_strdup(struct soap *soap, const char *s)
{ char *t = NULL;
  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
    strcpy(t, s);
  return t;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x372be
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x3110
leaq 0x1(%rax), %rsi
movq %r14, %rdi
callq 0x35f17
testq %rax, %rax
je 0x372be
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3090
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_wstrdup
SOAP_FMAC1
wchar_t *
SOAP_FMAC2
soap_wstrdup(struct soap *soap, const wchar_t *s)
{ wchar_t *t = NULL;
  if (s)
  { size_t n = 0;
    while (s[n])
      n++;
    if ((t = (wchar_t*)soap_malloc(soap, sizeof(wchar_t)*(n+1))))
      memcpy(t, s, sizeof(wchar_t)*(n+1));
  }
  return t;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x37304
movq %rsi, %rbx
xorl %r14d, %r14d
cmpl $0x0, (%rbx,%r14)
leaq 0x4(%r14), %r14
jne 0x372d7
movq %r14, %rsi
callq 0x35f17
testq %rax, %rax
je 0x37304
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3240
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_pop_block
SOAP_FMAC2
soap_pop_block(struct soap *soap, struct soap_blist *b)
{ char *p;
  if (!b)
    b = soap->blist;
  if (!b->ptr)
    return;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
  p = b->ptr;
  b->size -= *(size_t*)(p + sizeof(char*));
  b->ptr = *(char**)p;
  SOAP_FREE(soap, p);
}

// Assembly:
testq %rsi, %rsi
jne 0x37351
movq 0x90(%rdi), %rsi
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x3736e
movq 0x8(%rdi), %rax
subq %rax, 0x10(%rsi)
movq (%rdi), %rax
movq %rax, 0x8(%rsi)
jmp 0x3030
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_size_block
SOAP_FMAC2
soap_size_block(struct soap *soap, struct soap_blist *b, size_t n)
{ if (!b)
    b = soap->blist;
  if (b->ptr)
  { b->size -= *(size_t*)(b->ptr + sizeof(char*)) - n;
    *(size_t*)(b->ptr + sizeof(char*)) = n;
  }
  return b->size;
}

// Assembly:
testq %rsi, %rsi
jne 0x375a3
movq 0x90(%rdi), %rsi
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x375bb
movq %rdx, %rcx
subq 0x8(%rax), %rcx
addq %rcx, 0x10(%rsi)
movq %rdx, 0x8(%rax)
movq 0x10(%rsi), %rax
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_next_block
SOAP_FMAC1
char*
SOAP_FMAC2
soap_next_block(struct soap *soap, struct soap_blist *b)
{ char *p;
  if (!b)
    b = soap->blist;
  p = b->ptr;
  if (p)
  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
    b->ptr = *(char**)p;
    SOAP_FREE(soap, p);
    if (b->ptr)
      return b->ptr + sizeof(char*) + sizeof(size_t);
  }
  return NULL;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
testq %rsi, %rsi
jne 0x37601
movq 0x90(%rdi), %rbx
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x37627
movq (%rdi), %rax
movq %rax, 0x8(%rbx)
callq 0x3030
movq 0x8(%rbx), %rcx
leaq 0x10(%rcx), %rax
testq %rcx, %rcx
cmoveq %rcx, %rax
jmp 0x37629
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_end_block
SOAP_FMAC2
soap_end_block(struct soap *soap, struct soap_blist *b)
{ char *p, *q;
  if (!b)
    b = soap->blist;
  if (b)
  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n"));
    for (p = b->ptr; p; p = q)
    { q = *(char**)p;
      SOAP_FREE(soap, p);
    }
    if (soap->blist == b)
      soap->blist = b->next;
    else
    { struct soap_blist *bp;
      for (bp = soap->blist; bp; bp = bp->next)
      { if (bp->next == b)
        { bp->next = b->next;
	  break;
        }
      }
    }
    SOAP_FREE(soap, b);
  }
  DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n"));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
jne 0x3765c
movq 0x90(%r14), %rbx
testq %rbx, %rbx
je 0x376aa
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x37672
movq (%rdi), %r15
callq 0x3030
movq %r15, %rdi
jmp 0x37660
movq 0x90(%r14), %rax
cmpq %rbx, %rax
je 0x37690
testq %rax, %rax
je 0x3769d
movq %rax, %r14
movq (%rax), %rax
cmpq %rbx, %rax
jne 0x3767e
jmp 0x37697
addq $0x90, %r14
movq (%rbx), %rax
movq %rax, (%r14)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3030
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_save_block
SOAP_FMAC1
char*
SOAP_FMAC2
soap_save_block(struct soap *soap, struct soap_blist *b, char *p, int flag)
{ register size_t n;
  register char *q, *s;
  if (!b)
    b = soap->blist;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)b->size, b->ptr, p));
  if (b->size)
  { if (!p)
      p = (char*)soap_malloc(soap, b->size);
    if (p)
    { for (s = p, q = soap_first_block(soap, b); q; q = soap_next_block(soap, b))
      { n = soap_block_size(soap, b);
#ifndef WITH_NOIDREF
        if (flag)
          soap_update_ptrs(soap, q, q + n, s, q);
#endif
        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s));
        memcpy(s, q, n);
        s += n;
      }
    }
    else
      soap->error = SOAP_EOM;
  }
  soap_end_block(soap, b);
  return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
jne 0x376d5
movq 0x90(%r14), %rbx
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x37836
testq %r12, %r12
jne 0x376fb
movq %r14, %rdi
callq 0x35f17
movq %rax, %r12
testq %rax, %rax
je 0x37853
movq %r14, %rdi
movq %rbx, %rsi
callq 0x375c0
leaq 0xa8(%r14), %r15
leaq 0x192b0(%r14), %rcx
movq %rcx, 0x10(%rsp)
movq %r12, 0x8(%rsp)
testq %rax, %rax
je 0x37831
movq 0x8(%rbx), %rcx
movq 0x8(%rcx), %r13
testl %ebp, %ebp
je 0x37810
leaq (%rax,%r13), %rcx
movq %r12, %rdx
subq %rax, %rdx
xorl %esi, %esi
cmpq $0x7cf, %rsi            # imm = 0x7CF
je 0x377e0
leaq (%r15,%rsi,8), %rdi
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x377d8
movq 0x30(%rdi), %r8
cmpq %rcx, %r8
jae 0x37771
cmpq %rax, %r8
jb 0x37771
addq %rdx, %r8
movq %r8, 0x30(%rdi)
leaq 0x18(%rdi), %r8
testq %r8, %r8
je 0x37793
movq %r8, %r9
movq (%r8), %r8
cmpq %rcx, %r8
jae 0x37775
cmpq %rax, %r8
jb 0x37775
leaq (%r8,%rdx), %r10
movq %r10, (%r9)
jmp 0x37775
leaq 0x20(%rdi), %r8
testq %r8, %r8
je 0x377b5
movq %r8, %r9
movq (%r8), %r8
cmpq %rcx, %r8
jae 0x37797
cmpq %rax, %r8
jb 0x37797
leaq (%r8,%rdx), %r10
movq %r10, (%r9)
jmp 0x37797
leaq 0x28(%rdi), %r8
movq (%r8), %r8
testq %r8, %r8
je 0x37754
movq 0x10(%r8), %r9
cmpq %rax, %r9
jb 0x377b9
cmpq %rcx, %r9
jae 0x377b9
addq %rdx, %r9
movq %r9, 0x10(%r8)
jmp 0x377b9
incq %rsi
jmp 0x37743
movq 0x10(%rsp), %rsi
movq (%rsi), %rsi
testq %rsi, %rsi
je 0x37810
movq 0x8(%rsi), %rdi
cmpq %rcx, %rdi
jae 0x377e5
cmpq %rax, %rdi
jb 0x377e5
addq %rdx, %rdi
movq %rdi, 0x8(%rsi)
addq %rdx, 0x10(%rsi)
addq %rdx, 0x20(%rsi)
addq %rdx, 0x28(%rsi)
jmp 0x377e5
movq %r12, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x3240
addq %r13, %r12
movq %r14, %rdi
movq %rbx, %rsi
callq 0x375f1
jmp 0x3771e
movq 0x8(%rsp), %r12
movq %r14, %rdi
movq %rbx, %rsi
callq 0x37640
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x14, 0x19214(%r14)
xorl %r12d, %r12d
jmp 0x37836
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_putsizesoffsets
SOAP_FMAC1
char *
SOAP_FMAC2
soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
{ int i;
  if (!type)
    return NULL;
  if (soap->version == 2)
  { sprintf(soap->type, "%s[%d", type, size[0]);
    for (i = 1; i < dim; i++)
      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
  }
  else
  { if (offset)
    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
      for (i = 1; i < dim; i++)
        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
    }
    else
    { sprintf(soap->type, "%s[%d", type, size[0]);
      for (i = 1; i < dim; i++)
        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
    }
    strcat(soap->type, "]");
  }
  return soap->type;
}

// Assembly:
testq %rsi, %rsi
je 0x378f7
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rdx, %r14
movq %rsi, %rdx
cmpw $0x2, 0x2(%rdi)
movq %rdi, (%rsp)
jne 0x378fa
leaq 0x17538(%rdi), %r15
movl (%r14), %ecx
leaq 0x1597d(%rip), %rsi     # 0x4d234
movq %r15, %rdi
xorl %eax, %eax
callq 0x3370
movslq %ebp, %rbx
pushq $0x1
popq %r13
leaq 0x168a1(%rip), %r12     # 0x4e170
cmpq %rbx, %r13
jge 0x379af
movq %r15, %rdi
callq 0x3110
leaq (%rax,%r15), %rdi
movl (%r14,%r13,4), %edx
movq %r12, %rsi
xorl %eax, %eax
callq 0x3370
incq %r13
jmp 0x378cf
xorl %eax, %eax
retq
movq %rcx, %r12
leaq 0x17538(%rdi), %r15
movl (%r14), %ecx
testq %r12, %r12
je 0x37956
addl (%r12), %ecx
leaq 0x1591d(%rip), %rsi     # 0x4d234
movq %r15, %rdi
xorl %eax, %eax
callq 0x3370
movslq %ebp, %rbp
pushq $0x1
popq %rbx
leaq 0x1590c(%rip), %r13     # 0x4d23a
cmpq %rbp, %rbx
jge 0x37999
movq %r15, %rdi
callq 0x3110
leaq (%rax,%r15), %rdi
movl (%r12,%rbx,4), %edx
addl (%r14,%rbx,4), %edx
movq %r13, %rsi
xorl %eax, %eax
callq 0x3370
incq %rbx
jmp 0x3792e
leaq 0x158d7(%rip), %rsi     # 0x4d234
movq %r15, %rdi
xorl %eax, %eax
callq 0x3370
movslq %ebp, %rbx
pushq $0x1
popq %r13
leaq 0x158c5(%rip), %r12     # 0x4d23a
cmpq %rbx, %r13
jge 0x37999
movq %r15, %rdi
callq 0x3110
leaq (%rax,%r15), %rdi
movl (%r14,%r13,4), %edx
movq %r12, %rsi
xorl %eax, %eax
callq 0x3370
incq %r13
jmp 0x37975
movq %r15, %rdi
callq 0x3110
movq (%rsp), %rcx
movw $0x5d, 0x17538(%rcx,%rax)
movq (%rsp), %rax
addq $0x17538, %rax          # imm = 0x17538
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq