LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x3e902
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x3e902
movl %esi, %r10d
andl $0x1ff8, %r10d          # imm = 0x1FF8
movq 0x3f20(%rdi,%r10), %rdi
testq %rdi, %rdi
je 0x3e902
pushq %rbx
movl %ecx, %eax
cmpl %r8d, 0x18(%rdi)
jne 0x3e8ef
movq 0x10(%rdi), %r10
testq %r10, %r10
je 0x3e8ef
cmpq %rsi, (%r10)
jne 0x3e8ef
xorl %r11d, %r11d
testl %ecx, %ecx
jle 0x3e8ea
movl 0x8(%r10,%r11,4), %ebx
cmpl 0x8(%rdx,%r11,4), %ebx
jne 0x3e8ea
incq %r11
cmpq %r11, %rax
jne 0x3e8d4
jmp 0x3e8fb
cmpl %ecx, %r11d
je 0x3e8fb
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x3e8b9
xorl %eax, %eax
jmp 0x3e901
movq %rdi, (%r9)
movl 0x1c(%rdi), %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3e93e
movl %esi, %r8d
andl $0x1ff8, %r8d           # imm = 0x1FF8
movq 0x3f20(%rdi,%r8), %rdi
testq %rdi, %rdi
je 0x3e93e
cmpq %rsi, 0x8(%rdi)
jne 0x3e933
cmpl %edx, 0x18(%rdi)
je 0x3e938
movq (%rdi), %rdi
jmp 0x3e923
movq %rdi, (%rcx)
movl 0x1c(%rdi), %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3e971
cmpw $0x1, 0x2(%rdi)
jne 0x3e965
cmpq $0x0, 0x38(%rdi)
je 0x3e965
movl 0x4(%rdi), %eax
btl $0x12, %eax
jb 0x3e965
cmpw $0x3, 0x18590(%rdi)
jne 0x3e980
testb $0x8, 0x4(%rdi)
jne 0x3e975
cmpb $0x1, 0x21(%rsi)
jmp 0x3e979
xorl %eax, %eax
jmp 0x3e97c
cmpb $0x1, 0x20(%rsi)
sete %al
movzbl %al, %eax
retq
testb $0x8, %al
jne 0x3e98a
cmpb $0x0, 0x21(%rsi)
jmp 0x3e98e
cmpb $0x0, 0x20(%rsi)
setne %al
jmp 0x3e97c
// File: /workspace/github_c_makefile_star2_O3/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 0x3e9bb
testq %rsi, %rsi
je 0x3e9b0
testb $0x8, 0x4(%rdi)
jne 0x3e9b4
cmpb $0x0, 0x21(%rsi)
jmp 0x3e9b8
xorl %eax, %eax
jmp 0x3e9bb
cmpb $0x0, 0x20(%rsi)
sete %al
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3e9ce
testb $0x8, 0x4(%rdi)
jne 0x3e9cf
movb $0x1, 0x21(%rsi)
retq
movb $0x1, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3ea07
movzwl 0x5f28(%rbx), %ecx
cmpw $0x20, %cx
jl 0x3ea25
movl $0x508, %edi            # imm = 0x508
callq 0x3290
testq %rax, %rax
je 0x3ea8d
movq %r13, (%rax)
movq %rax, 0x5f20(%rbx)
xorl %ecx, %ecx
movq %rax, %r13
leal 0x1(%rcx), %eax
movw %ax, 0x5f28(%rbx)
movswq %cx, %rax
leaq (%rax,%rax,4), %rax
leaq 0x8(,%rax,8), %rcx
addq %r13, %rcx
movq %rcx, (%r12)
movq %r15, %rax
testq %r14, %r14
je 0x3ea51
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 0x3ea99
movl $0x14, 0x19214(%rbx)
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_O3/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, %r12
leaq 0x150f4(%rip), %r13     # 0x53cf0
movq %rdi, (%rsp)
movq 0x19288(%r12), %r14
testq %r14, %r14
je 0x3ec84
cmpq $0x0, 0x60c0(%r12)
jne 0x3ecf4
movq %r14, %rdi
callq 0x3110
movq %rax, %r15
movq (%rsp), %rax
movq 0x192a0(%rax), %rbp
testq %rbp, %rbp
je 0x3ecf4
movq 0x8(%rbp), %r12
testq %r12, %r12
je 0x3ec6c
movq 0x10(%rbp), %rbx
cmpq %r15, %rbx
jb 0x3ec6c
je 0x3ec6c
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3080
testl %eax, %eax
je 0x3ec72
incq %r12
decq %rbx
cmpq %rbx, %r15
jne 0x3ec4f
movq (%rbp), %rbp
jmp 0x3ec32
movq %r14, %rdi
callq 0x3110
cmpq $0xf, %rax
movq (%rsp), %r12
ja 0x3ecb2
movl $0x41, %esi
movq %r12, %rdi
callq 0x39272
movq %rax, 0x19288(%r12)
testq %rax, %rax
je 0x3ed10
movq %rax, %r14
movb $0x0, 0x2(%rax)
movw $0x3d3d, (%rax)         # imm = 0x3D3D
movl $0x3c, %r15d
jmp 0x3ecc4
movq %rax, %r15
movb $0x0, 0x2(%r14)
movw $0x3d3d, (%r14)         # imm = 0x3D3D
addq $-0x4, %r15
addq $0x2, %r14
xorl %ebx, %ebx
callq 0x33f0
andl $0x3f, %eax
movb (%rax,%r13), %al
movb %al, (%r14,%rbx)
incq %rbx
cmpq %rbx, %r15
jne 0x3ecca
movb $0x0, 0x2(%r14,%rbx)
movw $0x3d3d, (%r14,%rbx)    # imm = 0x3D3D
jmp 0x3ec00
movq (%rsp), %rcx
cmpq $0x0, 0x19290(%rcx)
jne 0x3ed10
leaq 0x14b09(%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_O3/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 0x3ed41
testq %r14, %r14
je 0x3ed78
movw $0x0, 0x20(%r14)
movq (%r14), %r14
jmp 0x3ed30
testq %r14, %r14
je 0x3ed78
movq %rdi, %rbx
movq %r14, %rdi
movq (%r14), %r14
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x3ed67
movq %rax, %rdi
callq 0x3030
movq 0x18580(%rbx), %rdi
callq 0x3030
movq %r14, 0x18580(%rbx)
testq %r14, %r14
jne 0x3ed49
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3ee08
movq %rdi, %rbx
cmpq $0x0, 0x80(%rdi)
jne 0x3ee08
cmpq $0x0, (%r14)
je 0x3edb9
movl $0x20, %eax
leaq 0x20(%rax), %r12
cmpq $0x0, (%r14,%rax)
movq %r12, %rax
jne 0x3eda9
jmp 0x3edbf
movl $0x20, %r12d
movq %r12, %rdi
callq 0x3290
testq %rax, %rax
je 0x3ee08
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3240
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x3ee01
leaq 0x13383(%rip), %rsi     # 0x52170
callq 0x3210
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_O3/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 0x3f0ba
testb $0x2, 0x6(%rdi)
jne 0x3f0ba
movl %edx, %r8d
movq $0x0, 0x8(%rsp)
movl %esi, %eax
andl $0x1ff8, %eax           # imm = 0x1FF8
movq 0x3f20(%rdi,%rax), %rax
testq %rax, %rax
je 0x3f099
cmpq %rsi, 0x8(%rax)
jne 0x3f07a
cmpl %r8d, 0x18(%rax)
je 0x3f07f
movq (%rax), %rax
jmp 0x3f069
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x1c(%rax)
je 0x3f099
movb 0x20(%rax), %cl
testb %cl, %cl
jne 0x3f0b7
movb $0x2, 0x20(%rax)
movb $0x2, %cl
jmp 0x3f0b4
leaq 0x8(%rsp), %r9
xorl %edx, %edx
callq 0x3e9d4
testl %eax, %eax
je 0x3f0ba
movq 0x8(%rsp), %rax
movb $0x0, 0x20(%rax)
xorl %ecx, %ecx
movb %cl, 0x21(%rax)
movsbl %cl, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3f13a
movq %rdx, %r14
cmpq $0x0, (%rdx)
je 0x3f13a
movl %r8d, %ebp
movq %rsi, %r15
movq %rdi, %r12
leaq 0x8(%rsp), %r9
movq %r14, %rdx
callq 0x3e889
testl %eax, %eax
je 0x3f10f
movq 0x8(%rsp), %rax
movb 0x20(%rax), %cl
testb %cl, %cl
jne 0x3f137
movb $0x2, 0x20(%rax)
movb $0x2, %cl
jmp 0x3f134
leaq 0x8(%rsp), %r9
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %r8d
callq 0x3e9d4
testl %eax, %eax
je 0x3f13a
movq 0x8(%rsp), %rax
movb $0x0, 0x20(%rax)
xorl %ecx, %ecx
movb %cl, 0x21(%rax)
movsbl %cl, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_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 %esi, %eax
movl 0x4(%rdi), %esi
btl $0x11, %esi
jb 0x3f24b
cmpw $0x1, 0x2(%rdi)
jne 0x3f176
btl $0x12, %esi
jb 0x3f176
cmpq $0x0, 0x38(%rdi)
je 0x3f176
cmpw $0x3, 0x18590(%rdi)
jne 0x3f1ea
testl %eax, %eax
js 0x3f18d
sete %r8b
testq %rdx, %rdx
sete %r9b
orb %r8b, %r9b
je 0x3f1c3
xorl %eax, %eax
retq
xorl %eax, %eax
testq %rdx, %rdx
je 0x3f24b
movl %edx, %r8d
andl $0x1ff8, %r8d           # imm = 0x1FF8
movq 0x3f20(%rdi,%r8), %rdi
testq %rdi, %rdi
je 0x3f24b
cmpq %rdx, 0x8(%rdi)
jne 0x3f1be
cmpl %ecx, 0x18(%rdi)
je 0x3f22e
movq (%rdi), %rdi
jmp 0x3f1aa
movl %edx, %r8d
andl $0x1ff8, %r8d           # imm = 0x1FF8
movq 0x3f20(%rdi,%r8), %rdi
testq %rdi, %rdi
je 0x3f18a
cmpq %rdx, 0x8(%rdi)
jne 0x3f1e5
cmpl %ecx, 0x18(%rdi)
je 0x3f21f
movq (%rdi), %rdi
jmp 0x3f1d5
testl %eax, %eax
jns 0x3f24b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rdx, %rdx
je 0x3f24b
movl %edx, %r8d
andl $0x1ff8, %r8d           # imm = 0x1FF8
movq 0x3f20(%rdi,%r8), %rdi
testq %rdi, %rdi
je 0x3f24b
cmpq %rdx, 0x8(%rdi)
jne 0x3f21a
cmpl %ecx, 0x18(%rdi)
je 0x3f24c
movq (%rdi), %rdi
jmp 0x3f20a
cmpl $0x0, 0x1c(%rdi)
movl %eax, %ecx
movl $0x0, %eax
jne 0x3f231
jmp 0x3f24b
movl 0x1c(%rdi), %ecx
testl %ecx, %ecx
je 0x3f18a
testb $0x8, %sil
jne 0x3f245
movb $0x1, 0x21(%rdi)
jmp 0x3f249
movb $0x1, 0x20(%rdi)
movl %ecx, %eax
retq
cmpl $0x0, 0x1c(%rdi)
je 0x3f24b
testb $0x8, %sil
jne 0x3f25d
movb $0x2, 0x21(%rdi)
retq
movb $0x2, 0x20(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
testq %rcx, %rcx
je 0x3f5d0
movl 0x4(%r15), %ebp
xorl %ebx, %ebx
btl $0x11, %ebp
jb 0x3f5e5
movl %edx, %ebx
testl %edx, %edx
jns 0x3f5e5
movq %r8, %rax
movl 0x48(%rsp), %r8d
testq %rax, %rax
je 0x3f5f6
movq %rsp, %r10
movq %r15, %rdi
movq %rcx, %rsi
movq %rax, %rdx
movl %r9d, %ecx
movq %r10, %r9
callq 0x3e889
movl %eax, %ebx
testl %ebx, %ebx
je 0x3f61d
movq (%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3e93f
testl %eax, %eax
je 0x3f621
xorl %r13d, %r13d
cmpw $0x2, 0x2(%r15)
sete %r13b
leaq 0x130a7(%rip), %rax     # 0x52633
leaq 0x12f80(%rip), %r12     # 0x52513
cmoveq %rax, %r12
leaq 0x17138(%r15), %rdi
leaq 0x1309b(%rip), %rsi     # 0x52640
movl %ebx, %edx
xorl %eax, %eax
callq 0x3360
leaq (%r15,%r13), %r8
addq $0x17138, %r8           # imm = 0x17138
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x3f697
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3f62e
movq 0x40(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x428e3
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ecx, %eax
andl $0x1ff8, %eax           # imm = 0x1FF8
movq 0x3f20(%r15,%rax), %rax
xorl %ebx, %ebx
testq %rax, %rax
je 0x3f5e5
cmpq %rcx, 0x8(%rax)
jne 0x3f618
cmpl %r8d, 0x18(%rax)
je 0x3f659
movq (%rax), %rax
jmp 0x3f607
xorl %ebx, %ebx
jmp 0x3f5e5
xorl %eax, %eax
cmpw $0x3, 0x18590(%r15)
jne 0x3f632
movl %eax, %ebx
jmp 0x3f5e5
testq %r12, %r12
je 0x3f5e5
movl %ebp, %ecx
andl $0x8, %ecx
cmpl $0x1, %ecx
movq %r12, %rcx
adcq $0x20, %rcx
cmpb $0x0, (%rcx)
je 0x3f62e
testb $0x8, %bpl
jne 0x3f665
movb $0x1, 0x21(%r12)
jmp 0x3f5e5
movq %rax, (%rsp)
movl 0x1c(%rax), %ebx
jmp 0x3f559
movb $0x1, 0x20(%r12)
jmp 0x3f5e5
// File: /workspace/github_c_makefile_star2_O3/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 0x3f68a
movq %rdi, %rbx
callq 0x41688
testl %eax, %eax
je 0x3f68c
movl 0x19214(%rbx), %eax
popq %rbx
retq
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x41eb7
// File: /workspace/github_c_makefile_star2_O3/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 0x41688
testl %eax, %eax
jne 0x3f6d7
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x41d3f
testl %eax, %eax
jne 0x3f6d7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x41eb7
testl %eax, %eax
je 0x3f6e9
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %eax, %eax
jmp 0x3f6dd
// File: /workspace/github_c_makefile_star2_O3/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 0x3f7d7
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rdi), %eax
btl $0x10, %eax
jae 0x3f717
movq %rbx, %rdi
callq 0x3b3ee
movl 0x4(%rbx), %eax
btl $0xd, %eax
jae 0x3f734
cmpw $0x0, 0x6106(%rbx)
je 0x3f7ad
movw $0x0, 0x6106(%rbx)
testw %ax, %ax
jns 0x3f75c
movq %r14, %rdi
movl $0x3a, %esi
callq 0x3130
testq %rax, %rax
je 0x3f75c
movq %rax, %r15
movq %rbx, %rdi
callq 0x3b3ee
incq %r15
movq %r15, %r14
leaq 0x12ecd(%rip), %rsi     # 0x52630
movl $0x2, %edx
movq %rbx, %rdi
callq 0x379c8
testl %eax, %eax
jne 0x3f7d1
movq %r14, %rdi
callq 0x3110
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x379c8
testl %eax, %eax
jne 0x3f7d1
decl 0x6108(%rbx)
leaq 0x12e93(%rip), %rsi     # 0x5262e
movl $0x1, %edx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x379c8
movl 0x6108(%rbx), %eax
cmpl $0xa, %eax
movl $0xa, %edx
cmovbl %eax, %edx
leaq 0x129d5(%rip), %rsi     # 0x5219a
movq %rbx, %rdi
callq 0x379c8
testl %eax, %eax
je 0x3f7dd
movl 0x19214(%rbx), %eax
popq %rbx
popq %r14
popq %r15
retq
movl 0x4(%rbx), %eax
jmp 0x3f72b
// File: /workspace/github_c_makefile_star2_O3/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 0x39272
testq %rax, %rax
je 0x3f83d
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 0x3f82f
movq %rax, (%r14)
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x3f83a
movq %rax, (%rcx)
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_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 0x3fac7
movq %rdi, %rbx
movl (%rdi), %eax
decl %eax
cmpw $0x1, %ax
ja 0x3fac7
leaq 0x98(%rbx), %r14
testq %rsi, %rsi
je 0x3fab5
movq %r14, %rax
movq (%r14), %r14
testq %r14, %r14
je 0x3fabd
cmpq %rsi, 0x8(%r14)
jne 0x3fa75
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 0x3faa0
xorps %xmm0, %xmm0
movups %xmm0, 0x5f30(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3fbde
leaq 0xa0(%rdi), %rax
movq %rax, %rcx
movq (%rax), %rax
testq %rax, %rax
je 0x3fbdf
movq %rax, %rdx
subq 0x8(%rax), %rdx
cmpq %rsi, %rdx
jne 0x3fbc1
movq (%rax), %rax
movq %rax, (%rcx)
retq
addq $0x98, %rdi
movq %rdi, %rax
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3fbde
cmpq %rsi, 0x8(%rdi)
jne 0x3fbe6
movq (%rdi), %rcx
movq %rcx, (%rax)
jmp 0x3030
// File: /workspace/github_c_makefile_star2_O3/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 0x3fc1c
cmpb $0x0, (%rsi)
je 0x3fc1c
callq 0x3f849
testq %rax, %rax
je 0x3fc1c
movl 0x8(%rax), %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x40d78
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x192b0(%rdi), %r15
testq %r15, %r15
je 0x40d6d
movq %rsi, %rbx
leaq 0x192b0(%r14), %r12
movq 0x18(%r15), %rsi
movq 0x18(%rbx), %rdx
movq %r14, %rdi
callq 0x482fe
testl %eax, %eax
je 0x40d22
movq (%r12), %r12
jmp 0x40d64
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 0x40d55
movq 0x40(%rbx), %rax
movq 0x28(%r15), %rcx
movq %rax, (%rcx)
movq %r15, %rdi
callq 0x3030
movq (%r12), %r15
testq %r15, %r15
jne 0x40d08
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_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 0x40dc0
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0x40dad
movq (%rdi), %r12
callq 0x3030
movq %r12, %rdi
testq %r12, %r12
jne 0x40d9d
movq (%r14), %r12
movq %r14, %rdi
callq 0x3030
movq %r12, %r14
testq %r12, %r12
jne 0x40d94
movq $0x0, 0xa8(%rbx,%r15,8)
incq %r15
cmpq $0x7cf, %r15            # imm = 0x7CF
jne 0x40d87
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_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 0x414b1
movq %rdi, %rbx
movl (%rdi), %eax
decl %eax
cmpw $0x1, %ax
ja 0x414b1
movq %rbx, %rdi
callq 0x3b97d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3f97b
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x414a2
movq (%rdi), %r14
callq 0x3030
movq %r14, 0x98(%rbx)
movq %r14, %rdi
testq %r14, %r14
jne 0x4148b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3baf5
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
movq %rdi, %rbx
movq 0x80(%rdi), %r14
movl 0x6108(%rdi), %ebp
movq %rsi, 0x78(%rdi)
xorl %r15d, %r15d
movq %r15, 0x80(%rdi)
callq 0x3ed80
movq 0x88(%rbx), %rax
movq %r15, 0x88(%rbx)
testq %rax, %rax
je 0x4158d
movq (%rax), %rcx
movq $0x0, (%rax)
testq %rcx, %rcx
je 0x4151d
movq %rcx, %r15
movq (%rcx), %rcx
movq %rax, (%r15)
movq %r15, %rax
testq %rcx, %rcx
jne 0x4150a
jmp 0x41556
movq %rax, %r15
jmp 0x41556
testq %r14, %r14
setne %cl
movswq 0xc(%r15), %rax
testq %rax, %rax
setns %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x4157a
shlq $0x5, %rax
movq 0x18(%r14,%rax), %rdx
testq %rdx, %rdx
jne 0x41569
addq %r14, %rax
movq 0x8(%rax), %rdx
testq %rdx, %rdx
jne 0x41569
jmp 0x4157a
movl 0x8(%r15), %eax
movl %eax, 0x6108(%rbx)
movq 0x10(%r15), %rdx
testq %rdx, %rdx
je 0x41522
leaq 0x18(%r15), %rsi
movq %rbx, %rdi
callq 0x3b27c
testq %rax, %rax
je 0x415cd
movq (%r15), %r12
movq %r15, %rdi
callq 0x3030
movq %r12, %r15
testq %r12, %r12
jne 0x41556
testq %r14, %r14
je 0x415c3
cmpq $0x0, (%r14)
je 0x415bb
leaq 0x18(%r14), %r15
movq (%r15), %rdi
testq %rdi, %rdi
je 0x415b0
callq 0x3030
movq $0x0, (%r15)
cmpq $0x0, 0x8(%r15)
leaq 0x20(%r15), %r15
jne 0x4159c
movq %r14, %rdi
callq 0x3030
movl %ebp, 0x6108(%rbx)
xorl %eax, %eax
jmp 0x415d3
movl 0x19214(%rbx), %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_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 %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x4162d
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x3110
testq %rbx, %rbx
je 0x4162d
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3080
testl %eax, %eax
jne 0x41617
movzbl (%rbx,%r15), %eax
testb $-0x21, %al
je 0x4162f
movq %rbx, %rdi
movl $0x20, %esi
callq 0x3130
leaq 0x1(%rax), %rbx
testq %rax, %rax
jne 0x415fc
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x415dc
testq %rax, %rax
jne 0x41d14
movw $0x1, %r13w
testw %bp, %bp
jne 0x41c7b
movq 0x88(%rbx), %r12
testq %r12, %r12
je 0x41c78
leaq 0x18(%r12), %rdi
movq %r15, %rsi
callq 0x3210
testl %eax, %eax
jne 0x41c72
movq 0x10(%r12), %rdi
testq %rdi, %rdi
je 0x41d30
movq %r14, %rsi
callq 0x3210
testl %eax, %eax
je 0x41d23
movq (%r12), %r12
jmp 0x41c3e
xorl %r13d, %r13d
movq %r15, %rdi
callq 0x3110
movq %rax, %r12
testq %r14, %r14
movl %r13d, 0x4(%rsp)
je 0x41c9a
movq %r14, %rdi
callq 0x3110
jmp 0x41c9c
xorl %eax, %eax
leaq (%r12,%rax), %rdi
addq $0x21, %rdi
callq 0x3290
testq %rax, %rax
je 0x41cee
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 0x41cfa
leaq (%r12,%rbp), %r15
incq %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3090
jmp 0x41cfd
movl $0x14, 0x19214(%rbx)
jmp 0x41d14
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
movl 0x8(%r12), %eax
cmpl 0x6108(%rbx), %eax
jae 0x41d14
cmpw $0x1, 0xc(%r12)
je 0x41c7b
jmp 0x41d14
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_attribute
SOAP_FMAC2
soap_attribute(struct soap *soap, const char *name, const char *value)
{ 
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attribute '%s'='%s'\n", name, value));
#ifdef WITH_DOM
  if ((soap->mode & SOAP_XML_DOM) && !(soap->mode & SOAP_XML_CANONICAL) && soap->dom)
  { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute));
    if (!a)
      return soap->error;
    a->next = soap->dom->atts;
    a->nstr = NULL;
    a->name = soap_strdup(soap, name);
    a->data = soap_strdup(soap, value);
    a->wide = NULL;
    a->soap = soap;
    soap->dom->atts = a;
    return SOAP_OK;
  }
#endif
#ifndef WITH_LEAN
  if (soap->mode & SOAP_XML_CANONICAL)
  { /* TODO: consider using this code to handle default namespace bindings
    if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0'))
    { if (name[5] == ':')
        soap_push_ns(soap, name + 6, value, 0);
      else
        soap_push_ns(soap, "", value, 0);
    }
    */
    if (!strncmp(name, "xmlns:", 6))
      soap_push_ns(soap, name + 6, value, 0);
    else if (soap_set_attr(soap, name, value))
      return soap->error;
  }
  else
#endif
  { if (soap_send(soap, " ") || soap_send(soap, name))
      return soap->error;
    if (value)
      if (soap_send_raw(soap, "=\"", 2)
       || soap_string_out(soap, value, 1)
       || soap_send_raw(soap, "\"", 1))
        return soap->error;
  }
  return SOAP_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
testb $0x1, 0x6(%rdi)
jne 0x41dd1
leaq 0x10bc1(%rip), %rsi     # 0x5291d
movl $0x1, %edx
movq %rbx, %rdi
callq 0x379c8
testl %eax, %eax
jne 0x41dfb
movq %rbx, %rdi
movq %r15, %rsi
callq 0x37c6e
testl %eax, %eax
jne 0x41dfb
xorl %ebp, %ebp
testq %r14, %r14
je 0x41e1d
leaq 0x10d69(%rip), %rsi     # 0x52afb
movl $0x2, %edx
movq %rbx, %rdi
callq 0x379c8
testl %eax, %eax
jne 0x41dfb
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x42642
testl %eax, %eax
jne 0x41dfb
leaq 0x10a30(%rip), %rsi     # 0x527ee
movl $0x1, %edx
movq %rbx, %rdi
callq 0x379c8
testl %eax, %eax
jne 0x41dfb
jmp 0x41e1d
leaq 0x10894(%rip), %rsi     # 0x5266c
movl $0x6, %edx
movq %r15, %rdi
callq 0x3080
testl %eax, %eax
je 0x41e03
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4228b
testl %eax, %eax
je 0x41e1b
movl 0x19214(%rbx), %ebp
jmp 0x41e1d
addq $0x6, %r15
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x41c02
jmp 0x41e1d
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_utilize_ns
static void
soap_utilize_ns(struct soap *soap, const char *tag, size_t n)
{ register struct soap_nlist *np = soap_lookup_ns(soap, tag, n);
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Utilizing namespace of '%s'\n", tag));
  if (np)
  { if (np->index == 0)
      soap_push_ns(soap, np->id, np->ns, 1);
  }
  else if (strncmp(tag, "xml", 3))
  { strncpy(soap->tmpbuf, tag, n);
    soap->tmpbuf[n] = '\0';
    soap_push_ns(soap, soap->tmpbuf, NULL, 1);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x41638
testq %rax, %rax
je 0x41e58
cmpw $0x0, 0xc(%rax)
je 0x41e94
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
cmpb $0x78, (%r15)
jne 0x41e6c
cmpb $0x6d, 0x1(%r15)
jne 0x41e6c
cmpb $0x6c, 0x2(%r15)
je 0x41e4c
leaq 0x16538(%rbx), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3070
movb $0x0, 0x16538(%rbx,%r14)
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
jmp 0x41ea2
movq %rax, %rsi
addq $0x18, %rsi
movq 0x10(%rax), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x41c02
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_array_begin_out
SOAP_FMAC2
soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset)
{ if (!type || !*type)
    return soap_element_begin_out(soap, tag, id, NULL);
  if (soap_element(soap, tag, id, "SOAP-ENC:Array"))
    return soap->error;
  if (soap->version == 2)
  { const char *s;
    s = soap_strrchr(type, '[');
    if ((size_t)(s - type) < sizeof(soap->tmpbuf))
    { strncpy(soap->tmpbuf, type, s - type);
      soap->tmpbuf[s - type] = '\0';
      if (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf))
        return soap->error;
      if (s && (soap_attribute(soap, "SOAP-ENC:arraySize", s + 1)))
        return soap->error;
    }
  }
  else
  { if (offset && soap_attribute(soap, "SOAP-ENC:offset", offset))
      return soap->error;
    if (soap_attribute(soap, "SOAP-ENC:arrayType", type))
      return soap->error;
  }
#ifndef WITH_LEAN
  if ((soap->mode & SOAP_XML_CANONICAL))
  { const char *s = strchr(type, ':');
    if (s)
      soap_utilize_ns(soap, type, s - type);
  }
#endif
  return soap_element_start_end_out(soap, NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
testq %rcx, %rcx
je 0x4218a
movq %rcx, %r14
cmpb $0x0, (%rcx)
je 0x4218a
movq %r8, %r15
leaq 0xf553(%rip), %rcx      # 0x516c1
movq %rbx, %rdi
callq 0x41688
testl %eax, %eax
je 0x4219d
movl 0x19214(%rbx), %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rbx, %rdi
xorl %ecx, %ecx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3f670
cmpw $0x2, 0x2(%rbx)
jne 0x42216
movq %r14, %rdi
movl $0x5b, %esi
callq 0x3160
movq %rax, %r12
subq %r14, %r12
cmpq $0x3ff, %r12            # imm = 0x3FF
ja 0x4224f
movq %rax, %r15
leaq 0x16538(%rbx), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3070
movb $0x0, 0x16538(%rbx,%r12)
leaq 0x103f9(%rip), %rsi     # 0x525e5
movq %rbx, %rdi
movq %r13, %rdx
callq 0x41d3f
testl %eax, %eax
jne 0x4217a
testq %r15, %r15
je 0x4224f
incq %r15
leaq 0x103e9(%rip), %rsi     # 0x525f7
movq %rbx, %rdi
movq %r15, %rdx
jmp 0x42242
testq %r15, %r15
je 0x42235
leaq 0x103e8(%rip), %rsi     # 0x5260a
movq %rbx, %rdi
movq %r15, %rdx
callq 0x41d3f
testl %eax, %eax
jne 0x4217a
leaq 0x103de(%rip), %rsi     # 0x5261a
movq %rbx, %rdi
movq %r14, %rdx
callq 0x41d3f
testl %eax, %eax
jne 0x4217a
testb $0x1, 0x6(%rbx)
je 0x42278
movq %r14, %rdi
movl $0x3a, %esi
callq 0x3130
testq %rax, %rax
je 0x42278
subq %r14, %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x41e2a
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x41eb7
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_element_ref
SOAP_FMAC2
soap_element_ref(struct soap *soap, const char *tag, int id, int href)
{ register int n = 0;
  const char *s = "href";
  if (soap->version == 2)
  { s = "SOAP-ENC:ref";
    n = 1;
  }
  sprintf(soap->href, "#_%d", href);
  return soap_element_href(soap, tag, id, s, soap->href + n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
cmpw $0x2, 0x2(%rdi)
sete %r13b
leaq 0xfd96(%rip), %rax      # 0x52633
leaq 0xfc6f(%rip), %r12      # 0x52513
cmoveq %rax, %r12
addq $0x17138, %rdi          # imm = 0x17138
leaq 0xfd8a(%rip), %rsi      # 0x52640
movl %ecx, %edx
xorl %eax, %eax
callq 0x3360
leaq (%r15,%r13), %r8
addq $0x17138, %r8           # imm = 0x17138
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movq %r12, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3f697
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_element_null
SOAP_FMAC2
soap_element_null(struct soap *soap, const char *tag, int id, const char *type)
{ struct soap_attribute *tp;
  for (tp = soap->attributes; tp; tp = tp->next)
    if (tp->visible)
      break;
  if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL))
  { if (soap_element(soap, tag, id, type))
      return soap->error;
    if (!tp && soap_attribute(soap, "xsi:nil", "true"))
      return soap->error;
    return soap_element_start_end_out(soap, tag);
  }
  soap->null = 1;
  soap->position = 0;
  soap->mustUnderstand = 0;
  return SOAP_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18580(%rdi), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x42910
cmpw $0x0, 0x20(%rax)
je 0x428f4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x41688
jmp 0x4296d
cmpw $0x2, 0x2(%rbx)
jne 0x42927
testl %edx, %edx
jg 0x42948
cmpw $0x0, 0x1853a(%rbx)
jle 0x4292b
jmp 0x42948
testl %edx, %edx
jg 0x42948
testb $0x8, 0x6(%rbx)
jne 0x42948
movw $0x0, 0x1853a(%rbx)
movl $0x10000, 0x1858a(%rbx) # imm = 0x10000
xorl %eax, %eax
jmp 0x42977
movq %rbx, %rdi
movq %r14, %rsi
callq 0x41688
testl %eax, %eax
jne 0x42971
leaq 0xfce7(%rip), %rsi      # 0x52645
leaq 0xef02(%rip), %rdx      # 0x51867
movq %rbx, %rdi
callq 0x41d3f
testl %eax, %eax
je 0x4297f
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x41eb7