LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_poll
SOAP_FMAC2
soap_poll(struct soap *soap)
{ 
#ifndef WITH_LEAN
  register int r;
  if (soap_valid_socket(soap->socket))
  { r = tcp_select(soap, soap->socket, SOAP_TCP_SELECT_ALL, 0);
    if (r > 0 && (r & SOAP_TCP_SELECT_ERR))
      r = -1;
  }
  else if (soap_valid_socket(soap->master))
    r = tcp_select(soap, soap->master, SOAP_TCP_SELECT_SND, 0);
  else
    return SOAP_OK;
  if (r > 0)
  {
#ifdef WITH_OPENSSL
    if (soap->imode & SOAP_ENC_SSL)
    {
      if (soap_valid_socket(soap->socket)
       && (r & SOAP_TCP_SELECT_SND)
       && (!(r & SOAP_TCP_SELECT_RCV)
        || SSL_peek(soap->ssl, soap->tmpbuf, 1) > 0))
        return SOAP_OK;
    }
    else
#endif
      if (soap_valid_socket(soap->socket)
       && (r & SOAP_TCP_SELECT_SND)
       && (!(r & SOAP_TCP_SELECT_RCV)
        || recv(soap->socket, soap->tmpbuf, 1, MSG_PEEK) > 0))
        return SOAP_OK;
  }
  else if (r < 0)
  { if ((soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) && soap_socket_errno(soap->master) != SOAP_EINTR)
    { soap_set_receiver_error(soap, tcp_error(soap), "select failed in soap_poll()", SOAP_TCP_ERROR);
      return soap->error = SOAP_TCP_ERROR;
    }
  }
  DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r));
  return SOAP_EOF;
#else
  return SOAP_OK;
#endif
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x60d4(%rdi), %esi
cmpl $-0x1, %esi
je 0x3da28
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x7, %edx
xorl %ecx, %ecx
callq 0x3dfc3
testl %eax, %eax
jle 0x3da42
movl %eax, %ecx
andl $0x4, %ecx
negl %ecx
sbbl %ebp, %ebp
orl %ebp, %eax
jmp 0x3da42
movl 0x60d0(%rbx), %esi
cmpl $-0x1, %esi
je 0x3daad
movq %rbx, %rdi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x3dfc3
testl %eax, %eax
jle 0x3da81
movl 0x60d4(%rbx), %edi
cmpl $-0x1, %edi
sete %cl
testb $0x2, %al
sete %dl
orb %cl, %dl
jne 0x3da9f
xorl %ebp, %ebp
testb $0x1, %al
je 0x3daa4
addq $0x16538, %rbx          # imm = 0x16538
movl $0x1, %edx
movq %rbx, %rsi
movl $0x2, %ecx
callq 0x3040
testq %rax, %rax
jg 0x3daa4
jmp 0x3da9f
jns 0x3da9f
cmpl $-0x1, 0x60d0(%rbx)
jne 0x3da95
cmpl $-0x1, 0x60d4(%rbx)
je 0x3da9f
callq 0x3060
cmpl $0x4, (%rax)
jne 0x3dab1
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x3daa4
movq %rbx, %rdi
callq 0x3df32
cmpw $0x2, 0x2(%rbx)
leaq 0x156bf(%rip), %rcx     # 0x53184
leaq 0x156a8(%rip), %rsi     # 0x53174
cmoveq %rcx, %rsi
leaq 0x148cd(%rip), %r8      # 0x523a4
movl $0x1c, %ebp
movq %rbx, %rdi
xorl %edx, %edx
movq %rax, %rcx
movl $0x1c, %r9d
callq 0x4b05a
movl $0x1c, 0x19214(%rbx)
jmp 0x3daa4
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: tcp_error
static const char*
tcp_error(struct soap *soap)
{ register const char *msg = NULL;
  switch (soap->errmode)
  { case 0:
      msg = soap_strerror(soap);
      break;
    case 1:
      msg = "WSAStartup failed";
      break;
    case 2:
    {
#ifndef WITH_LEAN
      msg = soap_code_str(h_error_codes, soap->errnum);
      if (!msg)
#endif
      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
        msg = soap->msgbuf;
      }
    }
  }
  return msg;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x19218(%rdi), %eax
cmpl $0x2, %eax
je 0x3df5c
cmpl $0x1, %eax
je 0x3df53
testl %eax, %eax
jne 0x3df72
movq %rbx, %rdi
popq %rbx
jmp 0x4ab25
leaq 0x15803(%rip), %rax     # 0x5375d
jmp 0x3dfc1
movslq 0x1921c(%rbx), %rdx
cmpq $0x1, %rdx
jne 0x3df76
leaq 0x33bb0(%rip), %rsi     # 0x71b20
jmp 0x3df9d
xorl %eax, %eax
jmp 0x3dfc1
leaq 0x33ba3(%rip), %rcx     # 0x71b20
leaq 0x33bec(%rip), %rax     # 0x71b70
cmpq $0x0, 0x8(%rcx)
je 0x3df9a
leaq 0x10(%rcx), %rsi
cmpq %rdx, 0x10(%rcx)
movq %rsi, %rcx
jne 0x3df84
jmp 0x3df9d
movq %rax, %rsi
movq 0x8(%rsi), %rax
testq %rax, %rax
jne 0x3dfc1
addq $0x16138, %rbx          # imm = 0x16138
leaq 0x157bb(%rip), %rsi     # 0x5376f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3350
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_hash
SOAP_FMAC2
soap_hash(register const char *s)
{ register size_t h = 0;
  while (*s)
    h = 65599*h + *s++;
  return h % SOAP_IDHASH;
}

// Assembly:
movb (%rdi), %al
testb %al, %al
je 0x3e78e
incq %rdi
xorl %ecx, %ecx
imulq $0x1003f, %rcx, %rdx    # imm = 0x1003F
movsbq %al, %rcx
addq %rdx, %rcx
movb (%rdi), %al
incq %rdi
testb %al, %al
jne 0x3e74b
movabsq $0x6466f6a6bd4754f, %rdx # imm = 0x6466F6A6BD4754F
movq %rcx, %rax
mulq %rdx
movq %rcx, %rax
subq %rdx, %rax
shrq %rax
addq %rdx, %rax
shrq $0xa, %rax
imulq $0x7cf, %rax, %rax      # imm = 0x7CF
subq %rax, %rcx
jmp 0x3e790
xorl %ecx, %ecx
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_embed
SOAP_FMAC2
soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type)
{ register int i;
  struct soap_plist *pp;
  if (soap->version == 2)
    soap->encoding = 1;
  if (a)
    i = soap_array_pointer_lookup(soap, p, a, n, type, &pp);
  else
    i = soap_pointer_lookup(soap, p, type, &pp);
  if (i)
  { if (soap_is_embedded(soap, pp)
     || soap_is_single(soap, pp))
      return 0;
    soap_set_embedded(soap, pp);
  }
  return i;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpw $0x2, 0x2(%rdi)
jne 0x3e82d
movw $0x1, 0x18588(%rbx)
testq %rdx, %rdx
je 0x3e898
leaq 0x8(%rsp), %rax
movq %rbx, %rdi
movl %r9d, %r8d
movq %rax, %r9
callq 0x3e8ea
movl %eax, %ebp
testl %ebp, %ebp
je 0x3e8df
movq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3e9a3
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x3e8e1
cmpw $0x3, 0x18590(%rbx)
je 0x3e8e1
testq %r14, %r14
je 0x3e8df
movb 0x4(%rbx), %cl
andb $0x8, %cl
cmpb $0x1, %cl
movq %r14, %rcx
adcq $0x20, %rcx
cmpb $0x0, (%rcx)
je 0x3e8e1
testb $0x8, 0x4(%rbx)
jne 0x3e8da
movb $0x1, 0x21(%r14)
jmp 0x3e8df
movq $0x0, 0x8(%rsp)
xorl %ebp, %ebp
testq %rsi, %rsi
je 0x3e847
movl %esi, %eax
andl $0x1ff8, %eax           # imm = 0x1FF8
movq 0x3f20(%rbx,%rax), %rax
testq %rax, %rax
je 0x3e847
cmpq %rsi, 0x8(%rax)
jne 0x3e8c8
cmpl %r9d, 0x18(%rax)
je 0x3e8cd
movq (%rax), %rax
jmp 0x3e8b7
movq %rax, 0x8(%rsp)
movl 0x1c(%rax), %ebp
jmp 0x3e847
movb $0x1, 0x20(%r14)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_array_pointer_lookup
SOAP_FMAC2
soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
{ register struct soap_plist *pp;
  *ppp = NULL;
  if (!p || !a->__ptr)
    return 0;
  for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next)
  { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr)
    { register int i;
      for (i = 0; i < n; i++)
        if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i])
          break;
      if (i == n)
      { *ppp = pp;
        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id));
        return pp->id;
      }
    }
  }
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type));
  return 0;
}

// Assembly:
movq $0x0, (%r9)
xorl %eax, %eax
testq %rsi, %rsi
je 0x3e966
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x3e966
andl $0x1ff8, %esi           # imm = 0x1FF8
movq 0x3f20(%rdi,%rsi), %rsi
testq %rsi, %rsi
je 0x3e966
pushq %rbx
movl %ecx, %edi
cmpl %r8d, 0x18(%rsi)
jne 0x3e95b
movq 0x10(%rsi), %r11
testq %r11, %r11
je 0x3e95b
movq (%r11), %r10
cmpq (%rdx), %r10
jne 0x3e95b
xorl %r10d, %r10d
testl %ecx, %ecx
jle 0x3e94b
movl 0x8(%r11,%r10,4), %ebx
cmpl 0x8(%rdx,%r10,4), %ebx
jne 0x3e94b
incq %r10
cmpq %r10, %rdi
jne 0x3e934
movl %edi, %r10d
cmpl %ecx, %r10d
jne 0x3e956
movq %rsi, (%r9)
movl 0x1c(%rsi), %eax
cmpl %ecx, %r10d
je 0x3e965
movq (%rsi), %rsi
testq %rsi, %rsi
jne 0x3e916
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_pointer_lookup
SOAP_FMAC2
soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
{ register struct soap_plist *pp;
  *ppp = NULL;
  if (p)
  { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next)
    { if (pp->ptr == p && pp->type == type)
      { *ppp = pp;
        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d id=%d\n", p, type, pp->id));
        return pp->id;
      }
    }
  }
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup location=%p type=%d: not found\n", p, type));
  return 0;
}

// Assembly:
movq $0x0, (%rcx)
xorl %eax, %eax
testq %rsi, %rsi
je 0x3e9a2
movl %esi, %r8d
andl $0x1ff8, %r8d           # imm = 0x1FF8
movq 0x3f20(%rdi,%r8), %rdi
testq %rdi, %rdi
je 0x3e9a2
cmpq %rsi, 0x8(%rdi)
jne 0x3e997
cmpl %edx, 0x18(%rdi)
je 0x3e99c
movq (%rdi), %rdi
jmp 0x3e987
movq %rdi, (%rcx)
movl 0x1c(%rdi), %eax
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_is_embedded
SOAP_FMAC2
soap_is_embedded(struct soap *soap, struct soap_plist *pp)
{ if (!pp)
    return 0;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Is embedded? %d %d\n", (int)pp->mark1, (int)pp->mark2));
  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
  { if (soap->mode & SOAP_IO_LENGTH)
      return pp->mark1 != 0;
    return pp->mark2 != 0;
  }
  if (soap->mode & SOAP_IO_LENGTH)
    return pp->mark1 == 1;
  return pp->mark2 == 1;
}

// Assembly:
testq %rsi, %rsi
je 0x3e9d5
cmpw $0x1, 0x2(%rdi)
jne 0x3e9c9
cmpq $0x0, 0x38(%rdi)
je 0x3e9c9
movl 0x4(%rdi), %eax
btl $0x12, %eax
jb 0x3e9c9
cmpw $0x3, 0x18590(%rdi)
jne 0x3e9e4
testb $0x8, 0x4(%rdi)
jne 0x3e9d9
cmpb $0x1, 0x21(%rsi)
jmp 0x3e9dd
xorl %eax, %eax
jmp 0x3e9e0
cmpb $0x1, 0x20(%rsi)
sete %al
movzbl %al, %eax
retq
testb $0x8, %al
jne 0x3e9ee
cmpb $0x0, 0x21(%rsi)
jmp 0x3e9f2
cmpb $0x0, 0x20(%rsi)
setne %al
jmp 0x3e9e0
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_is_single
SOAP_FMAC2
soap_is_single(struct soap *soap, struct soap_plist *pp)
{ if (soap->part == SOAP_IN_HEADER)
    return 1;
  if (!pp)
    return 0;
  if (soap->mode & SOAP_IO_LENGTH)
    return pp->mark1 == 0;
  return pp->mark2 == 0;
}

// Assembly:
movb $0x1, %al
cmpw $0x3, 0x18590(%rdi)
je 0x3ea1f
testq %rsi, %rsi
je 0x3ea14
testb $0x8, 0x4(%rdi)
jne 0x3ea18
cmpb $0x0, 0x21(%rsi)
jmp 0x3ea1c
xorl %eax, %eax
jmp 0x3ea1f
cmpb $0x0, 0x20(%rsi)
sete %al
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_set_embedded
SOAP_FMAC2
soap_set_embedded(struct soap *soap, struct soap_plist *pp)
{ if (!pp)
    return;
  if (soap->mode & SOAP_IO_LENGTH)
    pp->mark1 = 1;
  else
    pp->mark2 = 1;
}

// Assembly:
testq %rsi, %rsi
je 0x3ea32
testb $0x8, 0x4(%rdi)
jne 0x3ea33
movb $0x1, 0x21(%rsi)
retq
movb $0x1, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_pointer_enter
SOAP_FMAC2
soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
{ register size_t h;
  register struct soap_plist *pp;
  if (!soap->pblk || soap->pidx >= SOAP_PTRBLK)
  { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk));
    if (!pb)
    { soap->error = SOAP_EOM;
      return 0;
    }
    pb->next = soap->pblk;
    soap->pblk = pb;
    soap->pidx = 0;
  }
  *ppp = pp = &soap->pblk->plist[soap->pidx++];
  if (a)
    h = soap_hash_ptr(a->__ptr);
  else
    h = soap_hash_ptr(p);
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a?a->__ptr:NULL, a?a->__size:0, n, type, soap->idnum+1));
  pp->next = soap->pht[h];
  pp->type = type;
  pp->mark1 = 0;
  pp->mark2 = 0;
  pp->ptr = p;
  pp->array = a;
  soap->pht[h] = pp;
  pp->id = ++soap->idnum;
  return pp->id;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r12
movl %r8d, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x5f20(%rdi), %r13
testq %r13, %r13
je 0x3ea68
cmpw $0x20, 0x5f28(%rbx)
jl 0x3ea9b
movl $0x508, %edi            # imm = 0x508
callq 0x3280
testq %rax, %rax
je 0x3ea8c
movq %r13, (%rax)
movq %rax, 0x5f20(%rbx)
movw $0x0, 0x5f28(%rbx)
jmp 0x3ea96
movl $0x14, 0x19214(%rbx)
testq %rax, %rax
je 0x3eb0b
movq 0x5f20(%rbx), %rax
movswq 0x5f28(%rbx), %rcx
leal 0x1(%rcx), %edx
movw %dx, 0x5f28(%rbx)
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %rcx
addq $0x8, %rcx
movq %rcx, (%r12)
movq %r15, %rax
testq %r14, %r14
je 0x3eacf
movq (%r14), %rax
andl $0x1ff8, %eax           # imm = 0x1FF8
movq 0x3f20(%rbx,%rax), %rdx
movq %rdx, (%rcx)
movl %ebp, 0x18(%rcx)
movw $0x0, 0x20(%rcx)
movq %r15, 0x8(%rcx)
movq %r14, 0x10(%rcx)
movq %rcx, 0x3f20(%rbx,%rax)
movl 0x5f40(%rbx), %eax
incl %eax
movl %eax, 0x5f40(%rbx)
movl %eax, 0x1c(%rcx)
jmp 0x3eb0d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_select_mime_boundary
static void
soap_select_mime_boundary(struct soap *soap)
{ while (!soap->mime.boundary || soap_valid_mime_boundary(soap))
  { register char *s = soap->mime.boundary;
    register size_t n = 0;
    if (s)
      n = strlen(s);
    if (n < 16)
    { n = 64;
      s = soap->mime.boundary = (char*)soap_malloc(soap, n + 1);
      if (!s)
        return;
    }
    strcpy(s, "==");
    s += 2;
    n -= 4;
    while (n)
    { *s++ = soap_base64o[soap_random & 0x3F];
      n--;
    }
    strcpy(s, "==");
  }
  if (!soap->mime.start)
    soap->mime.start = "<SOAP-ENV:Envelope>";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1506d(%rip), %r13     # 0x53cf0
movq %rdi, (%rsp)
movq 0x19288(%rbx), %r14
testq %r14, %r14
je 0x3ed09
cmpq $0x0, 0x60c0(%rbx)
jne 0x3ed79
movq %r14, %rdi
callq 0x3110
movq %rax, %r15
movq (%rsp), %rax
movq 0x192a0(%rax), %rbp
testq %rbp, %rbp
je 0x3ed79
movq 0x8(%rbp), %r12
testq %r12, %r12
je 0x3ecf1
movq 0x10(%rbp), %rbx
cmpq %r15, %rbx
jb 0x3ecf1
je 0x3ecf1
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3080
testl %eax, %eax
je 0x3ecf7
incq %r12
decq %rbx
cmpq %rbx, %r15
jne 0x3ecd4
movq (%rbp), %rbp
jmp 0x3ecb7
testq %r14, %r14
je 0x3ed0e
movq %r14, %rdi
callq 0x3110
movq %rax, %r15
jmp 0x3ed11
xorl %r15d, %r15d
jmp 0x3ed15
xorl %r15d, %r15d
movq (%rsp), %rbx
cmpq $0xf, %r15
ja 0x3ed3d
movl $0x41, %esi
movq %rbx, %rdi
callq 0x39095
movq %rax, 0x19288(%rbx)
testq %rax, %rax
je 0x3ed95
movq %rax, %r14
movl $0x40, %r15d
movb $0x0, 0x2(%r14)
movw $0x3d3d, (%r14)         # imm = 0x3D3D
addq $0x2, %r14
addq $-0x4, %r15
je 0x3ed69
callq 0x33e0
andl $0x3f, %eax
movb (%rax,%r13), %al
movb %al, (%r14)
incq %r14
decq %r15
jne 0x3ed52
movb $0x0, 0x2(%r14)
movw $0x3d3d, (%r14)         # imm = 0x3D3D
jmp 0x3ec87
movq (%rsp), %rcx
cmpq $0x0, 0x19290(%rcx)
jne 0x3ed95
leaq 0x14a84(%rip), %rax     # 0x53812
movq %rax, 0x19290(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_clr_attr
SOAP_FMAC2
soap_clr_attr(struct soap *soap)
{ register struct soap_attribute *tp;
#ifndef WITH_LEAN
  if ((soap->mode & SOAP_XML_CANONICAL))
  { while (soap->attributes)
    { tp = soap->attributes->next;
      if (soap->attributes->value)
        SOAP_FREE(soap, soap->attributes->value);
      SOAP_FREE(soap, soap->attributes);
      soap->attributes = tp;
    }
  }
  else
#endif
  { for (tp = soap->attributes; tp; tp = tp->next)
      tp->visible = 0;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testb $0x1, 0x6(%rdi)
movq 0x18580(%rdi), %r14
jne 0x3edc6
testq %r14, %r14
je 0x3edf7
movw $0x0, 0x20(%r14)
movq (%r14), %r14
jmp 0x3edb5
testq %r14, %r14
je 0x3edf7
movq %rdi, %rbx
movq 0x8(%r14), %rdi
movq (%r14), %r14
testq %rdi, %rdi
je 0x3eddf
callq 0x3030
movq 0x18580(%rbx), %rdi
callq 0x3030
movq %r14, 0x18580(%rbx)
testq %r14, %r14
jne 0x3edce
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_set_local_namespaces
SOAP_FMAC2
soap_set_local_namespaces(struct soap *soap)
{ if (soap->namespaces && !soap->local_namespaces)
  { register const struct Namespace *ns1;
    register struct Namespace *ns2;
    register size_t n = 1;
    for (ns1 = soap->namespaces; ns1->id; ns1++)
      n++;
    n *= sizeof(struct Namespace);
    ns2 = (struct Namespace*)SOAP_MALLOC(soap, n);
    if (ns2)
    { memcpy(ns2, soap->namespaces, n);
      if (ns2[0].ns)
      { if (!strcmp(ns2[0].ns, soap_env1))
          soap->version = 1;
        else
          soap->version = 2;
      }
      soap->local_namespaces = ns2;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x78(%rdi), %r14
testq %r14, %r14
je 0x3ee87
movq %rdi, %rbx
cmpq $0x0, 0x80(%rdi)
jne 0x3ee87
cmpq $0x0, (%r14)
je 0x3ee38
movl $0x20, %eax
leaq 0x20(%rax), %r12
cmpq $0x0, (%r14,%rax)
movq %r12, %rax
jne 0x3ee28
jmp 0x3ee3e
movl $0x20, %r12d
movq %r12, %rdi
callq 0x3280
testq %rax, %rax
je 0x3ee87
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3230
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x3ee80
leaq 0x13304(%rip), %rsi     # 0x52170
callq 0x3200
cmpl $0x1, %eax
movw $0x2, %ax
sbbw $0x0, %ax
movw %ax, 0x2(%rbx)
movq %r15, 0x80(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_embedded
SOAP_FMAC2
soap_embedded(struct soap *soap, const void *p, int t)
{ struct soap_plist *pp;
  if (soap_pointer_lookup(soap, p, t, &pp))
  { pp->mark1 = 1;
    pp->mark2 = 1;
    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t));
  }
}

// Assembly:
movb $0x1, %al
testq %rsi, %rsi
je 0x3f0aa
movl %esi, %ecx
andl $0x1ff8, %ecx           # imm = 0x1FF8
movq 0x3f20(%rdi,%rcx), %rcx
testq %rcx, %rcx
je 0x3f0aa
cmpq %rsi, 0x8(%rcx)
jne 0x3f0a5
cmpl %edx, 0x18(%rcx)
je 0x3f0b7
movq (%rcx), %rcx
jmp 0x3f095
xorl %ecx, %ecx
testb %al, %al
jne 0x3f0b6
movw $0x101, 0x20(%rcx)      # imm = 0x101
retq
cmpl $0x0, 0x1c(%rcx)
sete %al
jmp 0x3f0ac
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_reference
SOAP_FMAC2
soap_reference(struct soap *soap, const void *p, int t)
{ struct soap_plist *pp;
  if (!p || (soap->mode & SOAP_XML_TREE))
    return 1;
  if (soap_pointer_lookup(soap, p, t, &pp))
  { if (pp->mark1 == 0)
    { pp->mark1 = 2;
      pp->mark2 = 2;
    }
  }
  else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp))
  { pp->mark1 = 0;
    pp->mark2 = 0;
  }
  else
    return 1;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2));
  return pp->mark1;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl $0x1, %ebx
testq %rsi, %rsi
je 0x3f14b
testb $0x2, 0x6(%rdi)
jne 0x3f14b
movl %edx, %r8d
movq $0x0, 0x8(%rsp)
movl %esi, %eax
andl $0x1ff8, %eax           # imm = 0x1FF8
movq 0x3f20(%rdi,%rax), %rax
testq %rax, %rax
je 0x3f124
cmpq %rsi, 0x8(%rax)
jne 0x3f101
cmpl %r8d, 0x18(%rax)
je 0x3f106
movq (%rax), %rax
jmp 0x3f0f0
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x1c(%rax)
je 0x3f124
movq 0x8(%rsp), %rax
cmpb $0x0, 0x20(%rax)
jne 0x3f142
movb $0x2, 0x20(%rax)
movb $0x2, %cl
jmp 0x3f13f
leaq 0x8(%rsp), %r9
xorl %edx, %edx
callq 0x3ea38
testl %eax, %eax
je 0x3f14b
movq 0x8(%rsp), %rax
movb $0x0, 0x20(%rax)
xorl %ecx, %ecx
movb %cl, 0x21(%rax)
movq 0x8(%rsp), %rax
movsbl 0x20(%rax), %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_array_reference
SOAP_FMAC2
soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t)
{ register int i;
  struct soap_plist *pp;
  if (!p || !a->__ptr)
    return 1;
  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
  if (i)
  { if (pp->mark1 == 0)
    { pp->mark1 = 2;
      pp->mark2 = 2;
    }
  }
  else if (!soap_pointer_enter(soap, p, a, n, t, &pp))
    return 1;
  else
  { pp->mark1 = 0;
    pp->mark2 = 0;
  }
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2));
  return pp->mark1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl $0x1, %ebx
testq %rsi, %rsi
je 0x3f1d0
movq %rdx, %r14
cmpq $0x0, (%rdx)
je 0x3f1d0
movl %r8d, %ebp
movq %rsi, %r15
movq %rdi, %r12
leaq 0x8(%rsp), %r9
movq %r14, %rdx
callq 0x3e8ea
testl %eax, %eax
je 0x3f19f
movq 0x8(%rsp), %rax
cmpb $0x0, 0x20(%rax)
jne 0x3f1c7
movb $0x2, 0x20(%rax)
movb $0x2, %cl
jmp 0x3f1c4
leaq 0x8(%rsp), %r9
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %r8d
callq 0x3ea38
testl %eax, %eax
je 0x3f1d0
movq 0x8(%rsp), %rax
movb $0x0, 0x20(%rax)
xorl %ecx, %ecx
movb %cl, 0x21(%rax)
movq 0x8(%rsp), %rax
movsbl 0x20(%rax), %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_embedded_id
SOAP_FMAC2
soap_embedded_id(struct soap *soap, int id, const void *p, int t)
{ struct soap_plist *pp = NULL;
  if (soap->mode & SOAP_XML_TREE)
    return id;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id));
  if (soap->version == 1 && soap->encodingStyle && !(soap->mode & SOAP_XML_GRAPH) && soap->part != SOAP_IN_HEADER)
  { if (id < 0)
    { id = soap_pointer_lookup(soap, p, t, &pp);
      if (id)
      { if (soap->mode & SOAP_IO_LENGTH)
          pp->mark1 = 2;
        else
          pp->mark2 = 2;
        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id multiref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
      }
      return -1;
    }
    return id;
  }
  if (id < 0)
    id = soap_pointer_lookup(soap, p, t, &pp);
  else if (id && !soap_pointer_lookup(soap, p, t, &pp))
    return 0;
  if (id && pp)
  { if (soap->mode & SOAP_IO_LENGTH)
      pp->mark1 = 1;
    else
      pp->mark2 = 1;
    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2));
  }
  return id;
}

// Assembly:
movl 0x4(%rdi), %r8d
btl $0x11, %r8d
jb 0x3f29f
cmpw $0x1, 0x2(%rdi)
jne 0x3f211
btl $0x12, %r8d
jb 0x3f211
cmpq $0x0, 0x38(%rdi)
je 0x3f211
cmpw $0x3, 0x18590(%rdi)
jne 0x3f2a2
testl %esi, %esi
js 0x3f24c
je 0x3f279
movb $0x1, %r9b
xorl %eax, %eax
testq %rdx, %rdx
je 0x3f27f
movl %edx, %r10d
andl $0x1ff8, %r10d          # imm = 0x1FF8
movq 0x3f20(%rdi,%r10), %rdi
testq %rdi, %rdi
je 0x3f27f
cmpq %rdx, 0x8(%rdi)
jne 0x3f247
cmpl %ecx, 0x18(%rdi)
je 0x3f2eb
movq (%rdi), %rdi
jmp 0x3f233
testq %rdx, %rdx
je 0x3f279
movl %edx, %eax
andl $0x1ff8, %eax           # imm = 0x1FF8
movq 0x3f20(%rdi,%rax), %rdi
testq %rdi, %rdi
je 0x3f279
cmpq %rdx, 0x8(%rdi)
jne 0x3f274
cmpl %ecx, 0x18(%rdi)
je 0x3f2f5
movq (%rdi), %rdi
jmp 0x3f260
xorl %edi, %edi
xorl %esi, %esi
jmp 0x3f286
xorl %edi, %edi
testb %r9b, %r9b
jne 0x3f2a1
testq %rdi, %rdi
je 0x3f29f
testl %esi, %esi
je 0x3f29f
testb $0x8, %r8b
jne 0x3f29b
movb $0x1, 0x21(%rdi)
jmp 0x3f29f
movb $0x1, 0x20(%rdi)
movl %esi, %eax
retq
movl %esi, %eax
testl %esi, %esi
jns 0x3f2a1
movb $0x1, %sil
testq %rdx, %rdx
je 0x3f2d4
movl %edx, %eax
andl $0x1ff8, %eax           # imm = 0x1FF8
movq 0x3f20(%rdi,%rax), %rdi
testq %rdi, %rdi
je 0x3f2d4
cmpq %rdx, 0x8(%rdi)
jne 0x3f2cf
cmpl %ecx, 0x18(%rdi)
je 0x3f2ff
movq (%rdi), %rdi
jmp 0x3f2bf
xorl %edi, %edi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %sil, %sil
jne 0x3f2a1
testb $0x8, %r8b
jne 0x3f2fa
movb $0x2, 0x21(%rdi)
retq
cmpl $0x0, 0x1c(%rdi)
sete %r9b
jmp 0x3f281
movl 0x1c(%rdi), %esi
jmp 0x3f286
movb $0x2, 0x20(%rdi)
retq
cmpl $0x0, 0x1c(%rdi)
sete %sil
jmp 0x3f2d6
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_element_id
SOAP_FMAC2
soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) 
{ if (!p)
  { soap_element_null(soap, tag, id, type);
    return -1;
  }
#ifndef WITH_NOIDREF
  if (soap->mode & SOAP_XML_TREE)
    return 0;
  if (id < 0)
  { struct soap_plist *pp;
    if (a)
      id = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
    else
      id = soap_pointer_lookup(soap, p, t, &pp);
    if (id)
    { if (soap_is_embedded(soap, pp))
      { soap_element_ref(soap, tag, 0, id);
        return -1;
      }
      if (soap_is_single(soap, pp))
        return 0;
      soap_set_embedded(soap, pp);
    }
  }
  return id;
#else
  return 0;
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
testq %rcx, %rcx
je 0x3f677
movl 0x4(%r14), %r12d
xorl %eax, %eax
btl $0x11, %r12d
jb 0x3f68c
movl %edx, %eax
testl %edx, %edx
jns 0x3f68c
movq %r8, %r10
movl 0x48(%rsp), %r8d
testq %r10, %r10
je 0x3f699
leaq 0x8(%rsp), %rax
movq %r14, %rdi
movq %rcx, %rsi
movq %r10, %rdx
movl %r9d, %ecx
movq %rax, %r9
callq 0x3e8ea
movl %eax, %ebp
testl %ebp, %ebp
je 0x3f713
movq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3e9a3
testl %eax, %eax
je 0x3f6cd
xorl %r12d, %r12d
cmpw $0x2, 0x2(%r14)
sete %r12b
leaq 0x12ffb(%rip), %rax     # 0x52633
leaq 0x12ed4(%rip), %r15     # 0x52513
cmoveq %rax, %r15
leaq 0x17138(%r14), %rdi
leaq 0x12fef(%rip), %rsi     # 0x52640
movl %ebp, %edx
xorl %eax, %eax
callq 0x3350
leaq (%r14,%r12), %r8
addq $0x17138, %r8           # imm = 0x17138
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x3f741
jmp 0x3f687
movq 0x40(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42c0f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq $0x0, 0x8(%rsp)
movl %ecx, %eax
andl $0x1ff8, %eax           # imm = 0x1FF8
movq 0x3f20(%r14,%rax), %rax
xorl %ebp, %ebp
testq %rax, %rax
je 0x3f604
cmpq %rcx, 0x8(%rax)
jne 0x3f6c8
cmpl %r8d, 0x18(%rax)
je 0x3f701
movq (%rax), %rax
jmp 0x3f6b3
xorl %eax, %eax
cmpw $0x3, 0x18590(%r14)
je 0x3f68c
testq %r15, %r15
je 0x3f713
movl %r12d, %ecx
andl $0x8, %ecx
cmpl $0x1, %ecx
movq %r15, %rcx
adcq $0x20, %rcx
cmpb $0x0, (%rcx)
je 0x3f68c
testb $0x8, %r12b
jne 0x3f70e
movb $0x1, 0x21(%r15)
jmp 0x3f713
movq %rax, 0x8(%rsp)
movl 0x1c(%rax), %ebp
jmp 0x3f604
movb $0x1, 0x20(%r15)
movl %ebp, %eax
jmp 0x3f68c
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_element_begin_out
SOAP_FMAC2
soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type)
{ if (*tag == '-')
    return SOAP_OK;
  if (soap_element(soap, tag, id, type))
    return soap->error;
  return soap_element_start_end_out(soap, NULL);
}

// Assembly:
pushq %rbx
xorl %eax, %eax
cmpb $0x2d, (%rsi)
je 0x3f734
movq %rdi, %rbx
callq 0x4193c
testl %eax, %eax
je 0x3f736
movl 0x19214(%rbx), %eax
popq %rbx
retq
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x421b7
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_element_href
SOAP_FMAC2
soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val)
{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val));
  if (soap_element(soap, tag, id, NULL)
   || soap_attribute(soap, ref, val)
   || soap_element_start_end_out(soap, tag))
    return soap->error;
  return SOAP_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r12
movq %rsi, %r14
movq %rdi, %rbx
xorl %ecx, %ecx
callq 0x4193c
testl %eax, %eax
jne 0x3f781
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x4203b
testl %eax, %eax
jne 0x3f781
movq %rbx, %rdi
movq %r14, %rsi
callq 0x421b7
testl %eax, %eax
je 0x3f793
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %eax, %eax
jmp 0x3f787
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_element_end_out
SOAP_FMAC2
soap_element_end_out(struct soap *soap, const char *tag)
{ const char *s;
  if (*tag == '-')
    return SOAP_OK;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag));
#ifdef WITH_DOM
  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
  { if (soap->dom->prnt)
      soap->dom = soap->dom->prnt;
    return SOAP_OK;
  }
#endif
#ifndef WITH_LEAN
  if (soap->mode & SOAP_XML_CANONICAL)
    soap_pop_namespace(soap);
  if (soap->mode & SOAP_XML_INDENT)
  { if (!soap->body)
    { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
        return soap->error;
    }
    soap->body = 0;
  }
  if ((soap->mode & SOAP_XML_DEFAULTNS) && (s = strchr(tag, ':')))
  { soap_pop_namespace(soap);
    tag = s + 1;
  }
#endif
  if (soap_send_raw(soap, "</", 2)
   || soap_send(soap, tag))
    return soap->error;
  soap->level--;	/* decrement level just before > */
  return soap_send_raw(soap, ">", 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %eax, %eax
cmpb $0x2d, (%rsi)
je 0x3f880
movq %rsi, %r14
movq %rdi, %rbx
testb $0x1, 0x6(%rdi)
je 0x3f7bb
movq %rbx, %rdi
callq 0x3b32b
testb $0x20, 0x5(%rbx)
je 0x3f7d8
cmpw $0x0, 0x6106(%rbx)
je 0x3f852
movw $0x0, 0x6106(%rbx)
testb $-0x80, 0x5(%rbx)
je 0x3f801
movq %r14, %rdi
movl $0x3a, %esi
callq 0x3130
testq %rax, %rax
je 0x3f801
movq %rax, %r15
movq %rbx, %rdi
callq 0x3b32b
incq %r15
movq %r15, %r14
leaq 0x12e28(%rip), %rsi     # 0x52630
movl $0x2, %edx
movq %rbx, %rdi
callq 0x376e8
testl %eax, %eax
jne 0x3f87a
movq %r14, %rdi
callq 0x3110
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x376e8
testl %eax, %eax
jne 0x3f87a
decl 0x6108(%rbx)
leaq 0x12dee(%rip), %rsi     # 0x5262e
movl $0x1, %edx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x376e8
movl 0x6108(%rbx), %eax
cmpl $0xa, %eax
movl $0xa, %edx
cmovbl %eax, %edx
leaq 0x12930(%rip), %rsi     # 0x5219a
movq %rbx, %rdi
callq 0x376e8
testl %eax, %eax
je 0x3f7cf
movl 0x19214(%rbx), %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_new_multipart
static struct soap_multipart*
soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size)
{ struct soap_multipart *content;
  content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart));
  if (content)
  { content->next = NULL;
    content->ptr = ptr;
    content->size = size;
    content->id = NULL;
    content->type = NULL;
    content->options = NULL;
    content->encoding = SOAP_MIME_NONE;
    content->location = NULL;
    content->description = NULL;
    if (!*first)
      *first = content;
    if (*last)
      (*last)->next = content;
    *last = content;
  }
  return content;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movl $0x48, %esi
callq 0x39095
testq %rax, %rax
je 0x3f8de
movq $0x0, (%rax)
movq %r12, 0x8(%rax)
movq %r15, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x24(%rax)
movups %xmm0, 0x38(%rax)
cmpq $0x0, (%r14)
jne 0x3f8d0
movq %rax, (%r14)
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x3f8db
movq %rax, (%rcx)
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_delete
SOAP_FMAC2
soap_delete(struct soap *soap, void *p)
{ register struct soap_clist **cp;
  if (soap_check_state(soap))
    return;
  cp = &soap->clist;
  if (p)
  { while (*cp)
    { if (p == (*cp)->ptr)
      { register struct soap_clist *q = *cp;
        *cp = q->next;
        if (q->fdelete(q))
        { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: deletion callback failed for object type %d\n", q->ptr, q->type));
#ifdef SOAP_MEM_DEBUG
          fprintf(stderr, "new(object type = %d) = %p not freed: deletion callback failed\n", q->type, q->ptr);
#endif
        }
        SOAP_FREE(soap, q);
        return;
      }
      cp = &(*cp)->next;
    }
    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: address not in list\n", p));
  }
  else
  { while (*cp)
    { register struct soap_clist *q = *cp;
      *cp = q->next;
      if (q->fdelete(q))
      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: deletion callback failed for object type %d\n", q->ptr, q->type));
#ifdef SOAP_MEM_DEBUG
        fprintf(stderr, "new(object type = %d) = %p not freed: deletion callback failed\n", q->type, q->ptr);
#endif
      }
      SOAP_FREE(soap, q);
    }
  }
  soap->fault = NULL; /* this was possibly deallocated */
  soap->header = NULL; /* this was possibly deallocated */
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x3fb6d
movq %rdi, %rbx
movl (%rdi), %eax
decl %eax
cmpw $0x1, %ax
ja 0x3fb6d
leaq 0x98(%rbx), %r14
testq %rsi, %rsi
je 0x3fb5b
movq %r14, %rax
movq (%r14), %r14
testq %r14, %r14
je 0x3fb63
cmpq %rsi, 0x8(%r14)
jne 0x3fb1b
movq (%r14), %rcx
movq %rcx, (%rax)
movq %r14, %rdi
callq *0x18(%r14)
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3030
movq (%r15), %rax
movq %rax, (%r14)
movq %r15, %rdi
callq *0x18(%r15)
movq %r15, %rdi
callq 0x3030
movq (%r14), %r15
testq %r15, %r15
jne 0x3fb46
xorps %xmm0, %xmm0
movups %xmm0, 0x5f30(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_unlink
SOAP_FMAC2
soap_unlink(struct soap *soap, const void *p)
{ register char **q;
  register struct soap_clist **cp;
  if (!soap || !p)
    return;
  for (q = (char**)&soap->alist; *q; q = *(char***)q)
  { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*))))
    { *q = **(char***)q;
      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p));
#ifdef SOAP_MEM_DEBUG
      soap_track_unlink(soap, p);
#endif
      return;
    }
  }
  for (cp = &soap->clist; *cp; cp = &(*cp)->next)
  { if (p == (*cp)->ptr)
    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked class instance %p\n", p));
      q = (char**)*cp;
      *cp = (*cp)->next;
      SOAP_FREE(soap, q);
      return;
    }
  }
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x3fc84
leaq 0xa0(%rdi), %rax
movq %rax, %rcx
movq (%rax), %rax
testq %rax, %rax
je 0x3fc85
movq %rax, %rdx
subq 0x8(%rax), %rdx
cmpq %rsi, %rdx
jne 0x3fc67
movq (%rax), %rax
movq %rax, (%rcx)
retq
addq $0x98, %rdi
movq %rdi, %rax
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3fc84
cmpq %rsi, 0x8(%rdi)
jne 0x3fc8c
movq (%rdi), %rcx
movq %rcx, (%rax)
jmp 0x3030
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_lookup_type
SOAP_FMAC2
soap_lookup_type(struct soap *soap, const char *id)
{ register struct soap_ilist *ip;
  if (id && *id)
  { ip = soap_lookup(soap, id);
    if (ip)
    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup id='%s' type=%d\n", id, ip->type));
      return ip->type;
    }
  }
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "lookup type id='%s' NOT FOUND! Need to get it from xsi:type\n", id));
  return 0;
}

// Assembly:
pushq %rbx
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x3fcc2
cmpb $0x0, (%rsi)
je 0x3fcc2
callq 0x3f8ea
testq %rax, %rax
je 0x3fcc2
movl 0x8(%rax), %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_resolve_attachment
static void
soap_resolve_attachment(struct soap *soap, struct soap_multipart *content)
{ if (content->id)
  { register struct soap_xlist **xp = &soap->xlist;
    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id=%s\n", content->id));
    while (*xp)
    { register struct soap_xlist *xq = *xp;
      if (!soap_match_cid(soap, xq->id, content->id))
      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment %s for content id=%s\n", xq->id, content->id));
        *xp = xq->next;
        *xq->ptr = (unsigned char*)content->ptr;
        *xq->size = (int)content->size;
        *xq->type = (char*)content->type;
        if (content->options)
          *xq->options = (char*)content->options;
        else
          *xq->options = (char*)content->description;
        SOAP_FREE(soap, xq);
      }
      else
        xp = &(*xp)->next;
    }
  }
}

// Assembly:
cmpq $0x0, 0x18(%rsi)
je 0x40fad
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x192b0(%rdi), %r15
testq %r15, %r15
je 0x40fa2
movq %rsi, %rbx
leaq 0x192b0(%r14), %r12
movq 0x18(%r15), %rsi
movq 0x18(%rbx), %rdx
movq %r14, %rdi
callq 0x489d3
testl %eax, %eax
je 0x40f57
movq (%r12), %r12
jmp 0x40f99
movq (%r15), %rax
movq %rax, (%r12)
movq 0x8(%rbx), %rax
movq 0x8(%r15), %rcx
movq %rax, (%rcx)
movl 0x10(%rbx), %eax
movq 0x10(%r15), %rcx
movl %eax, (%rcx)
movq 0x20(%rbx), %rax
movq 0x20(%r15), %rcx
movq %rax, (%rcx)
movq 0x28(%rbx), %rax
testq %rax, %rax
jne 0x40f8a
movq 0x40(%rbx), %rax
movq 0x28(%r15), %rcx
movq %rax, (%rcx)
movq %r15, %rdi
callq 0x3030
movq (%r12), %r15
testq %r15, %r15
jne 0x40f3d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_free_iht
static void
soap_free_iht(struct soap *soap)
{ register int i;
  register struct soap_ilist *ip = NULL, *p = NULL;
  register struct soap_flist *fp = NULL, *fq = NULL;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n"));
  for (i = 0; i < SOAP_IDHASH; i++)
  { for (ip = soap->iht[i]; ip; ip = p)
    { for (fp = ip->flist; fp; fp = fq)
      { fq = fp->next;
        SOAP_FREE(soap, fp);
      }
      p = ip->next;
      SOAP_FREE(soap, ip);
    }
    soap->iht[i] = NULL;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
movq 0xa8(%rbx,%r15,8), %r14
testq %r14, %r14
je 0x40ff5
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0x40fe2
movq (%rdi), %r12
callq 0x3030
movq %r12, %rdi
testq %r12, %r12
jne 0x40fd2
movq (%r14), %r12
movq %r14, %rdi
callq 0x3030
movq %r12, %r14
testq %r12, %r12
jne 0x40fc9
movq $0x0, 0xa8(%rbx,%r15,8)
incq %r15
cmpq $0x7cf, %r15            # imm = 0x7CF
jne 0x40fbc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_end
SOAP_FMAC2
soap_end(struct soap *soap)
{ if (soap_check_state(soap))
    return;
  soap_free_temp(soap);
  soap_dealloc(soap, NULL);
  while (soap->clist)
  { register struct soap_clist *cp = soap->clist->next;
    SOAP_FREE(soap, soap->clist);
    soap->clist = cp;
  }
  soap_closesock(soap);
#ifdef SOAP_DEBUG
  soap_close_logfiles(soap);
#endif
#ifdef PALM
  palmNetLibClose();
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x41737
movq %rdi, %rbx
movl (%rdi), %eax
decl %eax
cmpw $0x1, %ax
ja 0x41737
movq %rbx, %rdi
callq 0x3b8bf
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3fa21
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x41728
movq (%rdi), %r14
callq 0x3030
movq %r14, 0x98(%rbx)
movq %r14, %rdi
testq %r14, %r14
jne 0x41711
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3ba2e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_set_namespaces
SOAP_FMAC2
soap_set_namespaces(struct soap *soap, const struct Namespace *p)
{ register struct Namespace *ns = soap->local_namespaces;
  register struct soap_nlist *np, *nq, *nr;
  register unsigned int level = soap->level;
  soap->namespaces = p;
  soap->local_namespaces = NULL;
  soap_set_local_namespaces(soap);
  /* reverse the namespace list */
  np = soap->nlist;
  soap->nlist = NULL;
  if (np)
  { nq = np->next;
    np->next = NULL;
    while (nq)
    { nr = nq->next;
      nq->next = np;
      np = nq;
      nq = nr;
    }
  }
  /* then push on new stack */
  while (np)
  { register const char *s;
    soap->level = np->level; /* preserve element nesting level */
    s = np->ns;
    if (!s && np->index >= 0 && ns)
    { s = ns[np->index].out;
      if (!s)
        s = ns[np->index].ns;
    }
    if (s && soap_push_namespace(soap, np->id, s) == NULL)
      return soap->error;
    nq = np;
    np = np->next;
    SOAP_FREE(soap, nq);
  }
  if (ns)
  { register int i;
    for (i = 0; ns[i].id; i++)
    { if (ns[i].out)
      { SOAP_FREE(soap, ns[i].out);
        ns[i].out = NULL;
      }
    }
    SOAP_FREE(soap, ns);
  }
  soap->level = level; /* restore level */
  return SOAP_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x80(%rdi), %r14
movl 0x6108(%rdi), %r12d
movq %rsi, 0x78(%rdi)
xorl %r15d, %r15d
movq %r15, 0x80(%rdi)
callq 0x3edff
movq 0x88(%rbx), %rax
movq %r15, 0x88(%rbx)
testq %rax, %rax
je 0x417a6
movq (%rax), %rcx
movq $0x0, (%rax)
testq %rcx, %rcx
je 0x417a3
movq %rcx, %r15
movq (%rcx), %rcx
movq %rax, (%r15)
movq %r15, %rax
testq %rcx, %rcx
jne 0x41790
jmp 0x417a6
movq %rax, %r15
testq %r15, %r15
je 0x41825
movl 0x8(%r15), %eax
movl %eax, 0x6108(%rbx)
movq 0x10(%r15), %rdx
testq %rdx, %rdx
jne 0x417ef
testq %r14, %r14
setne %cl
movswq 0xc(%r15), %rax
testq %rax, %rax
setns %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x417ed
shlq $0x5, %rax
movq 0x18(%r14,%rax), %rdx
testq %rdx, %rdx
jne 0x417ef
addq %r14, %rax
movq 0x8(%rax), %rdx
jmp 0x417ef
xorl %edx, %edx
testq %rdx, %rdx
je 0x41805
leaq 0x18(%r15), %rsi
movq %rbx, %rdi
callq 0x3b191
testq %rax, %rax
je 0x41817
movq (%r15), %r13
movq %r15, %rdi
callq 0x3030
movb $0x1, %al
movq %r13, %r15
jmp 0x4181f
movl 0x19214(%rbx), %ebp
xorl %eax, %eax
testb %al, %al
jne 0x417a6
jmp 0x41864
testq %r14, %r14
je 0x4185b
cmpq $0x0, (%r14)
je 0x41853
leaq 0x18(%r14), %r15
movq (%r15), %rdi
testq %rdi, %rdi
je 0x41848
callq 0x3030
movq $0x0, (%r15)
cmpq $0x0, 0x8(%r15)
leaq 0x20(%r15), %r15
jne 0x41834
movq %r14, %rdi
callq 0x3030
movl %r12d, 0x6108(%rbx)
xorl %ebp, %ebp
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_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_strsearch
SOAP_FMAC1
const char *
SOAP_FMAC2
soap_strsearch(const char *big, const char *little)
{ if (little)
  { register size_t n = strlen(little);
    register const char *s = big;
    while (s) 
    { if (!strncmp(s, little, n) && (s[n] == '\0' || s[n] == ' '))
        return s;
      s = strchr(s, ' ');
      if (s)
        s++;
    }
  }
  return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x418dc
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x3110
testq %rbx, %rbx
sete %bpl
je 0x418dc
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3080
testl %eax, %eax
jne 0x418b6
movzbl (%rbx,%r15), %eax
testb $-0x21, %al
je 0x418d6
movq %rbx, %rdi
movl $0x20, %esi
callq 0x3130
leaq 0x1(%rax), %rbx
testq %rax, %rax
sete %bpl
cmoveq %rax, %rbx
jne 0x4189b
jmp 0x418dc
testb $0x1, %bpl
je 0x418de
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_push_ns
static struct soap_nlist *
soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized)
{ register struct soap_nlist *np;
  size_t n, k;
  if (soap_strsearch(soap->c14nexclude, id))
    return NULL;
  if (!utilized)
  { for (np = soap->nlist; np; np = np->next)
    { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns)))
        break;
    }
    if (np)
    { if ((np->level < soap->level || !np->ns) && np->index == 1)
        utilized = 1;
      else
        return NULL;
    }
  }
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Adding namespace binding (level=%u) '%s' '%s' utilized=%d\n", soap->level, id, ns?ns:"(null)", utilized));
  n = strlen(id);
  if (ns)
    k = strlen(ns);
  else
    k = 0;
  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1);
  if (!np)
  { soap->error = SOAP_EOM;
    return NULL;
  }
  np->next = soap->nlist;
  soap->nlist = np;
  strcpy(np->id, id);
  if (ns)
    np->ns = strcpy(np->id + n + 1, ns);
  else
    np->ns = NULL;
  np->level = soap->level;
  np->index = utilized;
  return np;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x1b2f0(%rdi), %rdi
callq 0x41875
testq %rax, %rax
jne 0x4200d
testw %bp, %bp
je 0x41f24
movw $0x1, %ax
movl %eax, 0x4(%rsp)
jmp 0x41f79
movq 0x88(%rbx), %r13
testq %r13, %r13
je 0x41f71
movw $0x1, %ax
movl %eax, 0x4(%rsp)
leaq 0x18(%r13), %rdi
movq %r15, %rsi
callq 0x3200
testl %eax, %eax
jne 0x41f68
movq 0x10(%r13), %r12
testq %r12, %r12
je 0x4201c
movq %r12, %rdi
movq %r14, %rsi
callq 0x3200
testl %eax, %eax
je 0x4201c
movq (%r13), %r13
testq %r13, %r13
jne 0x41f38
movl $0x0, 0x4(%rsp)
movq %r15, %rdi
callq 0x3110
movq %rax, %r12
testq %r14, %r14
je 0x41f93
movq %r14, %rdi
callq 0x3110
jmp 0x41f95
xorl %eax, %eax
leaq (%r12,%rax), %rdi
addq $0x21, %rdi
callq 0x3280
testq %rax, %rax
je 0x41fe7
movq %rax, %r13
movq 0x88(%rbx), %rax
movq %rax, (%r13)
movq %r13, 0x88(%rbx)
movq %r13, %rbp
addq $0x18, %rbp
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3090
testq %r14, %r14
je 0x41ff3
leaq (%r12,%rbp), %r15
incq %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3090
jmp 0x41ff6
movl $0x14, 0x19214(%rbx)
jmp 0x4200d
xorl %r15d, %r15d
movq %r15, 0x10(%r13)
movl 0x6108(%rbx), %eax
movl %eax, 0x8(%r13)
movl 0x4(%rsp), %eax
movw %ax, 0xc(%r13)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %r12, %r12
je 0x4202d
movl 0x6108(%rbx), %eax
cmpl %eax, 0x8(%r13)
jae 0x4200d
cmpw $0x1, 0xc(%r13)
je 0x41f79
jmp 0x4200d