LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_putoffsets
SOAP_FMAC1
char *
SOAP_FMAC2
soap_putoffsets(struct soap *soap, const int *offset, int dim)
{ register int i;
  sprintf(soap->arrayOffset, "[%d", offset[0]);
  for (i = 1; i < dim; i++)
    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
  strcat(soap->arrayOffset, "]");
  return soap->arrayOffset;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x18138, %rbx          # imm = 0x18138
movl (%rsi), %edx
leaq 0x15836(%rip), %rsi     # 0x4d236
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3370
movslq %ebp, %r12
pushq $0x1
popq %r13
leaq 0x15822(%rip), %r15     # 0x4d23a
movq %rbx, %rdi
cmpq %r12, %r13
jge 0x37a3c
callq 0x3110
leaq (%rax,%rbx), %rdi
movl (%r14,%r13,4), %edx
movq %r15, %rsi
xorl %eax, %eax
callq 0x3370
incq %r13
jmp 0x37a18
callq 0x3110
movw $0x5d, (%rbx,%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_size
SOAP_FMAC2
soap_size(const int *size, int dim)
{ register int i, n = size[0];
  for (i = 1; i < dim; i++)
    n *= size[i];
  return n;
}

// Assembly:
movl (%rdi), %eax
movslq %esi, %rcx
pushq $0x1
popq %rdx
cmpq %rcx, %rdx
jge 0x37a6f
imull (%rdi,%rdx,4), %eax
incq %rdx
jmp 0x37a61
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_getoffsets
SOAP_FMAC2
soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
{ register int i, j = 0;
  if (offset)
    for (i = 0; i < dim && attr && *attr; i++)
    { attr++;
      j *= size[i];
      j += offset[i] = (int)soap_strtol(attr, NULL, 10);
      attr = strchr(attr, ',');
    }
  else
    for (i = 0; i < dim && attr && *attr; i++)
    { attr++;
      j *= size[i];
      j += (int)soap_strtol(attr, NULL, 10);
      attr = strchr(attr, ',');
    }
  return j;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movslq %ecx, %r12
testq %rdx, %rdx
je 0x37acf
movq %rdx, %r15
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpq %r12, %r13
jge 0x37b15
testq %r14, %r14
je 0x37b15
cmpb $0x0, (%r14)
je 0x37b15
incq %r14
imull (%rbx,%r13,4), %ebp
movq %r14, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x3230
movl %eax, (%r15,%r13,4)
addl %eax, %ebp
movq %r14, %rdi
pushq $0x2c
popq %rsi
callq 0x3130
movq %rax, %r14
incq %r13
jmp 0x37a91
xorl %r15d, %r15d
xorl %ebp, %ebp
cmpq %r12, %r15
jge 0x37b15
testq %r14, %r14
je 0x37b15
cmpb $0x0, (%r14)
je 0x37b15
incq %r14
imull (%rbx,%r15,4), %ebp
movq %r14, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x3230
movq %rax, %r13
addl %ebp, %r13d
movq %r14, %rdi
pushq $0x2c
popq %rsi
callq 0x3130
movq %rax, %r14
incq %r15
movl %r13d, %ebp
jmp 0x37ad4
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_getsize
SOAP_FMAC2
soap_getsize(const char *attr1, const char *attr2, int *j)
{ register int n, k;
  char *s;
  *j = 0;
  if (!*attr1)
    return -1;
  if (*attr1 == '[')
    attr1++;
  n = 1;
  for (;;)
  { k = (int)soap_strtol(attr1, &s, 10);
    n *= k;
    if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1)
      return -1;
    attr1 = strchr(s, ',');
    if (!attr1)
      attr1 = strchr(s, ' ');
    if (attr2 && *attr2)
    { attr2++;
      *j *= k;
      k = (int)soap_strtol(attr2, &s, 10);
      *j += k;
      if (k < 0)
        return -1;
      attr2 = s;
    }
    if (!attr1)
      break;
    attr1++;
  }
  return n - *j;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
andl $0x0, (%rdx)
movzbl (%rdi), %eax
pushq $-0x1
popq %r14
testl %eax, %eax
je 0x37c07
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x5b, %eax
jne 0x37b59
incq %rbx
pushq $0x1
popq %r14
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x3230
movq %rax, %r13
testl %r13d, %r13d
js 0x37c03
imull %r13d, %r14d
cmpl $0xf4240, %r14d         # imm = 0xF4240
jg 0x37c03
movq 0x8(%rsp), %rbp
cmpq %rbx, %rbp
je 0x37c03
movq %rbp, %rdi
pushq $0x2c
popq %rsi
callq 0x3130
movq %rax, %r12
testq %rax, %rax
jne 0x37bb1
movq %rbp, %rdi
pushq $0x20
popq %rsi
callq 0x3130
movq %rax, %r12
testq %r15, %r15
je 0x37be8
cmpb $0x0, (%r15)
je 0x37beb
incq %r15
movq 0x10(%rsp), %rbx
imull (%rbx), %r13d
movl %r13d, (%rbx)
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x3230
addl %eax, (%rbx)
testl %eax, %eax
js 0x37c03
movq 0x8(%rsp), %r15
jmp 0x37beb
xorl %r15d, %r15d
leaq 0x1(%r12), %rbx
testq %r12, %r12
jne 0x37b5d
movq 0x10(%rsp), %rax
subl (%rax), %r14d
jmp 0x37c07
pushq $-0x1
popq %r14
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_getsizes
SOAP_FMAC2
soap_getsizes(const char *attr, int *size, int dim)
{ register int i, k, n;
  if (!*attr)
    return -1;
  i = (int)strlen(attr);
  n = 1;
  do
  { for (i = i-1; i >= 0; i--)
      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
        break;
    k = (int)soap_strtol(attr + i + 1, NULL, 10);
    n *= size[--dim] = k;
    if (k < 0 || n > SOAP_MAXARRAYSIZE)
      return -1;
  } while (i >= 0 && attr[i] != '[');
  return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
cmpb $0x0, (%rdi)
je 0x37cd9
movl %edx, %ebp
movq %rdi, %r14
callq 0x3110
movq %rax, %rbx
movslq %ebp, %r13
pushq $0x1
popq %rbp
movabsq $0x800000000001001, %rsi # imm = 0x800000000001001
movl %ebx, %eax
movl %ebx, %ecx
sarl $0x1f, %ecx
andl %ebx, %ecx
decl %ecx
decq %rax
movl %ebx, %r12d
testl %ebx, %ebx
jle 0x37c82
movl %eax, %edx
movzbl (%r14,%rdx), %edx
leal -0x1(%r12), %ebx
decq %rax
addl $-0x20, %edx
cmpl $0x3b, %edx
ja 0x37c5c
btq %rdx, %rsi
jae 0x37c5c
jmp 0x37c84
movl %ecx, %ebx
movslq %ebx, %r15
leaq (%r14,%r15), %rdi
incq %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x3230
imull %eax, %ebp
testl %eax, %eax
sets %dl
cmpl $0xf4241, %ebp          # imm = 0xF4241
setge %cl
orb %dl, %cl
movq (%rsp), %rdx
movl %eax, -0x4(%rdx,%r13,4)
testl %r12d, %r12d
jle 0x37cde
testb %cl, %cl
jne 0x37cde
addq %r14, %r15
decq %r13
cmpb $0x5b, (%r15)
movabsq $0x800000000001001, %rsi # imm = 0x800000000001001
jne 0x37c4e
jmp 0x37ce6
pushq $-0x1
popq %rbp
jmp 0x37ce6
testb %cl, %cl
pushq $-0x1
popq %rax
cmovnel %eax, %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_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_getposition
SOAP_FMAC2
soap_getposition(const char *attr, int *pos)
{ register int i, n;
  if (!*attr)
    return -1;
  n = 0;
  i = 1;
  do
  { pos[n++] = (int)soap_strtol(attr + i, NULL, 10);
    while (attr[i] && attr[i] != ',' && attr[i] != ']')
      i++;
    if (attr[i] == ',')
      i++;
  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
  return n;
}

// Assembly:
cmpb $0x0, (%rdi)
je 0x37d77
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %rbp
xorl %r13d, %r13d
pushq $0xa
popq %r15
movslq %ebp, %r12
addq %r14, %r12
movq %r12, %rdi
xorl %esi, %esi
movl %r15d, %edx
callq 0x3230
leaq 0x1(%r13), %rcx
movl %eax, (%rbx,%r13,4)
movl %ebp, %eax
movzbl (%r12), %edx
testl %edx, %edx
je 0x37d4e
cmpl $0x2c, %edx
je 0x37d4e
cmpl $0x5d, %edx
je 0x37d4e
incl %eax
incq %r12
jmp 0x37d34
cmpq $0xf, %r13
je 0x37d7b
xorl %ebp, %ebp
cmpb $0x2c, %dl
sete %bpl
addl %eax, %ebp
movslq %ebp, %rax
movzbl (%r14,%rax), %eax
cmpl $0x5d, %eax
je 0x37d73
movq %rcx, %r13
testl %eax, %eax
jne 0x37d17
movl %ecx, %eax
jmp 0x37d7e
pushq $-0x1
popq %rax
retq
pushq $0x10
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_pop_namespace
SOAP_FMAC2
soap_pop_namespace(struct soap *soap)
{ register struct soap_nlist *np, *nq;
  for (np = soap->nlist; np && np->level >= soap->level; np = nq)
  { nq = np->next;
    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop namespace binding (level=%u) '%s'\n", soap->level, np->id));
    SOAP_FREE(soap, np);
  }
  soap->nlist = np;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x88(%rdi), %rdi
testq %rdi, %rdi
je 0x37f1b
movl 0x8(%rdi), %eax
cmpl 0x6108(%rbx), %eax
jb 0x37f1b
movq (%rdi), %r14
callq 0x3030
movq %r14, %rdi
jmp 0x37efe
movq %rdi, 0x88(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_match_namespace
SOAP_FMAC2
soap_match_namespace(struct soap *soap, const char *id1, const char *id2, size_t n1, size_t n2) 
{ register struct soap_nlist *np = soap->nlist;
  while (np && (strncmp(np->id, id1, n1) || np->id[n1]))
    np = np->next;
  if (np)
  { if (!(soap->mode & SOAP_XML_IGNORENS))
      if (np->index < 0
       || (soap->local_namespaces[np->index].id
        && (strncmp(soap->local_namespaces[np->index].id, id2, n2)
         || soap->local_namespaces[np->index].id[n2])))
        return SOAP_NAMESPACE;
    return SOAP_OK;
  }
  if (n1 == 0)
    return SOAP_NAMESPACE;
  if ((n1 == 3 && n1 == n2 && !strncmp(id1, "xml", 3) && !strncmp(id1, id2, 3))
   || (soap->mode & SOAP_XML_IGNORENS))
    return SOAP_OK;
  return soap->error = SOAP_SYNTAX_ERROR; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r13
movq %rdx, (%rsp)
movq %rsi, %r12
movq %rdi, %r14
leaq 0x88(%rdi), %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x37fbe
leaq 0x18(%rbx), %rbp
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3080
testl %eax, %eax
jne 0x37f4c
cmpb $0x0, (%rbp,%r13)
jne 0x37f4c
testb $0x40, 0x5(%r14)
jne 0x3800f
movswq 0xc(%rbx), %rax
pushq $0x9
popq %rbp
testq %rax, %rax
js 0x38016
movq 0x80(%r14), %rcx
shlq $0x5, %rax
movq (%rcx,%rax), %r14
testq %r14, %r14
je 0x3800f
movq %r14, %rdi
movq (%rsp), %rsi
movq %r15, %rdx
callq 0x3080
testl %eax, %eax
jne 0x38016
cmpb $0x0, (%r14,%r15)
jne 0x38016
jmp 0x3800f
testq %r13, %r13
je 0x38013
cmpq $0x3, %r13
jne 0x37ff9
cmpq $0x3, %r15
jne 0x37ff9
cmpb $0x78, (%r12)
jne 0x37ff9
cmpb $0x6d, 0x1(%r12)
jne 0x37ff9
cmpb $0x6c, 0x2(%r12)
jne 0x37ff9
pushq $0x3
popq %rdx
movq %r12, %rdi
movq (%rsp), %rsi
callq 0x3080
testl %eax, %eax
je 0x3800f
testb $0x40, 0x5(%r14)
jne 0x3800f
movl $0x5, 0x19214(%r14)
pushq $0x5
jmp 0x38015
xorl %ebp, %ebp
jmp 0x38016
pushq $0x9
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_current_namespace
SOAP_FMAC1
const char*
SOAP_FMAC2
soap_current_namespace(struct soap *soap, const char *tag)
{ register struct soap_nlist *np;
  register const char *s;
  if (!tag || !strncmp(tag, "xml", 3))
    return NULL;
  np = soap->nlist;
  if (!(s = strchr(tag, ':')))
  { while (np && *np->id) /* find default namespace, if present */
      np = np->next;
  }
  else
  { while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag]))
      np = np->next;
    if (!np)
      soap->error = SOAP_NAMESPACE;
  }
  if (np)
  { if (np->index >= 0)
      return soap->namespaces[np->index].ns;
    if (np->ns)
      return soap_strdup(soap, np->ns);
  }
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x3809d
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x78, (%rsi)
jne 0x3804e
cmpb $0x6d, 0x1(%r14)
jne 0x3804e
cmpb $0x6c, 0x2(%r14)
je 0x3809d
movq 0x88(%rbx), %r13
pushq $0x3a
popq %rsi
movq %r14, %rdi
callq 0x3130
testq %rax, %rax
je 0x380a9
movq %rax, %r15
subq %r14, %r15
testq %r13, %r13
je 0x38093
leaq 0x18(%r13), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3080
testl %eax, %eax
jne 0x3808d
cmpb $0x0, (%r12,%r15)
je 0x380bd
movq (%r13), %r13
jmp 0x3806b
movl $0x9, 0x19214(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
xorl %eax, %eax
testq %r13, %r13
je 0x3809f
cmpb $0x0, 0x18(%r13)
je 0x380bd
movq (%r13), %r13
jmp 0x380ab
movswq 0xc(%r13), %rax
testq %rax, %rax
js 0x380d6
movq 0x78(%rbx), %rcx
shlq $0x5, %rax
movq 0x8(%rcx,%rax), %rax
jmp 0x3809f
movq 0x10(%r13), %rsi
testq %rsi, %rsi
je 0x3809d
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x37284
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_match_tag
SOAP_FMAC2
soap_match_tag(struct soap *soap, const char *tag1, const char *tag2)
{ register const char *s, *t;
  register int err;
  if (!tag1 || !tag2 || !*tag2)
    return SOAP_OK;
  s = strchr(tag1, ':');
  t = strchr(tag2, ':');
  if (t)
  { if (s)
    { if (t[1] && SOAP_STRCMP(s + 1, t + 1))
        return SOAP_TAG_MISMATCH;
      if (t != tag2 && (err = soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2)))
      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
        if (err == SOAP_NAMESPACE)
          return SOAP_TAG_MISMATCH;
        return err;
      }
    } 
    else if (SOAP_STRCMP(tag1, t + 1))
    { return SOAP_TAG_MISMATCH;
    }
    else if (t != tag2 && (err = soap_match_namespace(soap, tag1, tag2, 0, t - tag2)))
    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2));
      if (err == SOAP_NAMESPACE)
        return SOAP_TAG_MISMATCH;
      return err;
    }
    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2));
    return SOAP_OK;
  }
  if (s)
  { if (SOAP_STRCMP(s + 1, tag2))
      return SOAP_TAG_MISMATCH;
  }
  else if (SOAP_STRCMP(tag1, tag2))
    return SOAP_TAG_MISMATCH;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2));
  return SOAP_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
sete %cl
xorl %ebx, %ebx
orb %al, %cl
jne 0x381ba
movq %rdx, %r14
cmpb $0x0, (%rdx)
je 0x381ba
movq %rsi, %r15
movq %rdi, %r12
pushq $0x3a
popq %r13
movq %rsi, %rdi
movl %r13d, %esi
callq 0x3130
movq %rax, %rbp
movq %r14, %rdi
movl %r13d, %esi
callq 0x3130
testq %rax, %rax
je 0x38188
movq %rax, %r13
leaq 0x1(%rax), %rsi
testq %rbp, %rbp
je 0x38195
cmpb $0x0, (%rsi)
je 0x38163
leaq 0x1(%rbp), %rdi
callq 0x3210
testl %eax, %eax
jne 0x381b7
subq %r14, %r13
je 0x381ba
subq %r15, %rbp
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbp, %rcx
movq %r13, %r8
callq 0x37f2a
testl %eax, %eax
je 0x381ba
pushq $0x3
popq %rbx
jmp 0x381e9
testq %rbp, %rbp
je 0x381a8
incq %rbp
movq %rbp, %rdi
jmp 0x381ab
movq %r15, %rdi
callq 0x3210
pushq $0x3
popq %rbp
testl %eax, %eax
je 0x381cb
movl %ebp, %ebx
jmp 0x381ba
movq %r15, %rdi
movq %r14, %rsi
callq 0x3210
testl %eax, %eax
je 0x381ba
pushq $0x3
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subq %r14, %r13
je 0x381ba
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movq %r13, %r8
callq 0x37f2a
testl %eax, %eax
je 0x381ba
movl %ebp, %ebx
cmpl $0x9, %eax
je 0x381ba
movl %eax, %ebx
jmp 0x381ba
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_match_array
SOAP_FMAC2
soap_match_array(struct soap *soap, const char *type)
{ if (*soap->arrayType)
    if (soap_match_tag(soap, soap->arrayType, type)
     && soap_match_tag(soap, soap->arrayType, "xsd:anyType")
     && soap_match_tag(soap, soap->arrayType, "xsd:ur-type")
    )
    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array type mismatch: '%s' '%s'\n", soap->arrayType, type));
      return SOAP_TAG_MISMATCH;
    }
  return SOAP_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, 0x17938(%rdi)
je 0x38249
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x17938(%rdi), %r14
movq %r14, %rsi
callq 0x380f0
testl %eax, %eax
je 0x38249
leaq 0x1501f(%rip), %rdx     # 0x4d23e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x380f0
testl %eax, %eax
je 0x38249
leaq 0x15015(%rip), %rdx     # 0x4d24a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x380f0
testl %eax, %eax
je 0x38249
pushq $0x3
popq %rax
jmp 0x3824b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_free_temp
SOAP_FMAC2
soap_free_temp(struct soap *soap)
{ register struct soap_attribute *tp, *tq;
  register struct Namespace *ns;
  soap_free_ns(soap);
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n"));
  while (soap->blist)
    soap_end_block(soap, NULL);
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute storage\n"));
  for (tp = soap->attributes; tp; tp = tq)
  { tq = tp->next;
    if (tp->value)
      SOAP_FREE(soap, tp->value);
    SOAP_FREE(soap, tp);
  }
  soap->attributes = NULL;
#ifdef WITH_FAST
  if (soap->labbuf)
    SOAP_FREE(soap, soap->labbuf);
  soap->labbuf = NULL;
  soap->lablen = 0;
  soap->labidx = 0;
#endif
  ns = soap->local_namespaces;
  if (ns)
  { for (; ns->id; ns++)
    { if (ns->out)
      { if (soap->encodingStyle == ns->out)
          soap->encodingStyle = SOAP_STR_EOS;
        SOAP_FREE(soap, ns->out);
        ns->out = NULL;
      }
      if (soap->encodingStyle == ns->ns)
        soap->encodingStyle = SOAP_STR_EOS;
    }
    SOAP_FREE(soap, soap->local_namespaces);
    soap->local_namespaces = NULL;
  }
#ifndef WITH_LEANER
  while (soap->xlist)
  { struct soap_xlist *xp = soap->xlist->next;
    SOAP_FREE(soap, soap->xlist);
    soap->xlist = xp;
  }
#endif
#ifndef WITH_NOIDREF
  soap_free_pht(soap);
  soap_free_iht(soap);
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x3b0b1
cmpq $0x0, 0x90(%rbx)
je 0x38473
movq %rbx, %rdi
xorl %esi, %esi
callq 0x37640
jmp 0x3845d
movq 0x18580(%rbx), %r14
testq %r14, %r14
je 0x38498
movq (%r14), %r15
movq 0x8(%r14), %rdi
callq 0x3030
movq %r14, %rdi
callq 0x3030
movq %r15, %r14
jmp 0x3847a
andq $0x0, 0x18580(%rbx)
movq 0x6120(%rbx), %rdi
callq 0x3030
andq $0x0, 0x6130(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x6120(%rbx)
movq 0x80(%rbx), %r14
testq %r14, %r14
je 0x38522
addq $0x18, %r14
leaq 0x14c8c(%rip), %r15     # 0x4d161
cmpq $0x0, -0x18(%r14)
je 0x3850e
movq (%r14), %rdi
movq 0x38(%rbx), %rax
testq %rdi, %rdi
je 0x384fe
cmpq %rdi, %rax
jne 0x384f1
movq %r15, 0x38(%rbx)
callq 0x3030
andq $0x0, (%r14)
movq 0x38(%rbx), %rax
cmpq -0x10(%r14), %rax
jne 0x38508
movq %r15, 0x38(%rbx)
addq $0x20, %r14
jmp 0x384d5
movq 0x80(%rbx), %rdi
callq 0x3030
andq $0x0, 0x80(%rbx)
movq 0x192b0(%rbx), %rdi
testq %rdi, %rdi
je 0x38542
movq (%rdi), %r14
callq 0x3030
movq %r14, 0x192b0(%rbx)
movq %r14, %rdi
jmp 0x38529
movq 0x5f20(%rbx), %rdi
testq %rdi, %rdi
je 0x3855b
movq (%rdi), %r14
callq 0x3030
movq %r14, %rdi
jmp 0x38549
andq $0x0, 0x5f20(%rbx)
andw $0x0, 0x5f28(%rbx)
movl $0x7e4, %eax            # imm = 0x7E4
cmpq $0xbe4, %rax            # imm = 0xBE4
je 0x38582
andq $0x0, (%rbx,%rax,8)
incq %rax
jmp 0x38570
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3ce31
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_closesock
SOAP_FMAC2
soap_closesock(struct soap *soap)
{ register int status = soap->error;
  if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive)
  { if (soap->fclose && (soap->error = soap->fclose(soap)))
      return soap->error;
    soap->keep_alive = 0;
  }
#ifdef WITH_ZLIB
  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
    deflateEnd(soap->d_stream);
  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
    inflateEnd(soap->d_stream);
  soap->zlib_state = SOAP_ZLIB_NONE;
#endif
  return soap->error = status;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x19214(%rdi), %r14d
leal 0x1(%r14), %eax
cmpl $0x1f, %eax
ja 0x385d5
movl $0xa0000001, %ecx       # imm = 0xA0000001
btl %eax, %ecx
jae 0x385d5
movq 0x5ff8(%rbx), %rax
testq %rax, %rax
je 0x385cb
movq %rbx, %rdi
callq *%rax
movl %eax, 0x19214(%rbx)
testl %eax, %eax
jne 0x385e9
andw $0x0, 0x191cc(%rbx)
jmp 0x385df
cmpw $0x0, 0x191cc(%rbx)
je 0x385b0
movl %r14d, 0x19214(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: fplugin
static void *
fplugin(struct soap *soap, const char *id)
{ register struct soap_plugin *p;
  for (p = soap->plugins; p; p = p->next)
    if (p->id == id || !strcmp(p->id, id))
      return p->data;
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
addq $0x5f50, %r14           # imm = 0x5F50
xorl %ebx, %ebx
movq (%r14), %r14
testq %r14, %r14
je 0x38626
movq 0x8(%r14), %rdi
cmpq %r15, %rdi
je 0x38622
movq %r15, %rsi
callq 0x3210
testl %eax, %eax
jne 0x38605
movq 0x10(%r14), %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: http_post_header
static int
http_post_header(struct soap *soap, const char *key, const char *val)
{ if (key)
  { if (http_send_header(soap, key))
      return soap->error;
    if (val && (soap_send_raw(soap, ": ", 2) || http_send_header(soap, val)))
      return soap->error;
  }
  return soap_send_raw(soap, "\r\n", 2);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x38a31
movq %rdx, %r14
movq %rbx, %rdi
callq 0x464cc
testl %eax, %eax
je 0x38a07
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
testq %r14, %r14
je 0x38a31
leaq 0x14f09(%rip), %rsi     # 0x4d91c
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x347c4
testl %eax, %eax
jne 0x389f9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x464cc
testl %eax, %eax
jne 0x389f9
leaq 0x14aea(%rip), %rsi     # 0x4d522
pushq $0x2
popq %rdx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x347c4
// File: /workspace/github_c_makefile_star2_O2/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 0x3a215
pushq $0x7
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x3a65e
testl %eax, %eax
jle 0x3a265
testb $0x4, %al
je 0x3a231
jmp 0x3a269
movl 0x60d0(%rbx), %esi
cmpl $-0x1, %esi
je 0x3a291
pushq $0x2
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x3a65e
testl %eax, %eax
jle 0x3a265
movl 0x60d4(%rbx), %edi
cmpl $-0x1, %edi
je 0x3a285
movl %eax, %ecx
andl $0x2, %ecx
je 0x3a285
xorl %ebp, %ebp
testb $0x1, %al
je 0x3a288
addq $0x16538, %rbx          # imm = 0x16538
pushq $0x1
popq %rdx
pushq $0x2
popq %rcx
movq %rbx, %rsi
callq 0x3040
testq %rax, %rax
jg 0x3a288
jmp 0x3a285
testl %eax, %eax
jns 0x3a285
cmpl $-0x1, 0x60d0(%rbx)
jne 0x3a27b
cmpl $-0x1, 0x60d4(%rbx)
je 0x3a285
callq 0x3060
cmpl $0x4, (%rax)
jne 0x3a295
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x3a288
movq %rbx, %rdi
callq 0x3a5eb
leaq 0x13100(%rip), %rdx     # 0x4d3a4
pushq $0x1c
popq %rbp
movq %rbx, %rdi
movq %rax, %rsi
movl %ebp, %ecx
callq 0x3a5c4
movl $0x1c, 0x19214(%rbx)
jmp 0x3a288
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x19218(%rdi), %eax
cmpl $0x2, %eax
je 0x3a61c
cmpl $0x1, %eax
je 0x3a613
testl %eax, %eax
jne 0x3a655
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x45afd
leaq 0x14143(%rip), %rax     # 0x4e75d
jmp 0x3a657
movl 0x1921c(%rbx), %ebp
movslq %ebp, %rsi
leaq 0x354f4(%rip), %rdi     # 0x6fb20
callq 0x35176
testq %rax, %rax
jne 0x3a657
addq $0x16138, %rbx          # imm = 0x16138
leaq 0x1412b(%rip), %rsi     # 0x4e76f
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x3370
movq %rbx, %rax
jmp 0x3a657
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
xorl %eax, %eax
movsbq (%rdi), %rcx
testq %rcx, %rcx
je 0x3ac7a
imulq $0x1003f, %rax, %rax    # imm = 0x1003F
incq %rdi
addq %rcx, %rax
jmp 0x3ac62
movl $0x7cf, %ecx            # imm = 0x7CF
xorl %edx, %edx
divq %rcx
movq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpw $0x2, 0x2(%rdi)
jne 0x3ad18
movw $0x1, 0x18588(%rbx)
testq %rdx, %rdx
je 0x3ad30
movq %rsp, %rax
movq %rbx, %rdi
movl %r9d, %r8d
movq %rax, %r9
callq 0x3ad91
jmp 0x3ad3e
movq %rsp, %rcx
movq %rbx, %rdi
movl %r9d, %edx
callq 0x3ae08
movl %eax, %ebp
xorl %r14d, %r14d
testl %eax, %eax
je 0x3ad83
movq (%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3ae41
testl %eax, %eax
jne 0x3ad83
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3ae95
testl %eax, %eax
jne 0x3ad83
testq %r15, %r15
je 0x3ad80
testb $0x8, 0x4(%rbx)
jne 0x3ad7b
movb $0x1, 0x21(%r15)
jmp 0x3ad80
movb $0x1, 0x20(%r15)
movl %ebp, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
andq $0x0, (%r9)
xorl %eax, %eax
testq %rsi, %rsi
je 0x3ae07
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x3ae07
pushq %rbp
pushq %rbx
movl %esi, %eax
andl $0x1ff8, %eax           # imm = 0x1FF8
addq %rax, %rdi
addq $0x3f20, %rdi           # imm = 0x3F20
xorl %eax, %eax
testl %ecx, %ecx
movl $0x0, %r10d
cmovgl %ecx, %r10d
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3ae05
cmpl %r8d, 0x18(%rdi)
jne 0x3adc5
movq 0x10(%rdi), %r11
testq %r11, %r11
je 0x3adc5
cmpq %rsi, (%r11)
jne 0x3adc5
xorl %ebx, %ebx
cmpq %rbx, %r10
je 0x3adf8
movl 0x8(%r11,%rbx,4), %ebp
cmpl 0x8(%rdx,%rbx,4), %ebp
jne 0x3adfb
incq %rbx
jmp 0x3ade3
movl %r10d, %ebx
cmpl %ecx, %ebx
jne 0x3adc5
movq %rdi, (%r9)
movl 0x1c(%rdi), %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
andq $0x0, (%rcx)
xorl %eax, %eax
testq %rsi, %rsi
je 0x3ae40
movl %esi, %r8d
andl $0x1ff8, %r8d           # imm = 0x1FF8
addq %r8, %rdi
addq $0x3f20, %rdi           # imm = 0x3F20
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3ae40
cmpq %rsi, 0x8(%rdi)
jne 0x3ae27
cmpl %edx, 0x18(%rdi)
jne 0x3ae27
movq %rdi, (%rcx)
movl 0x1c(%rdi), %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3ae73
cmpw $0x1, 0x2(%rdi)
jne 0x3ae67
cmpq $0x0, 0x38(%rdi)
je 0x3ae67
movl 0x4(%rdi), %eax
btl $0x12, %eax
jb 0x3ae67
cmpw $0x3, 0x18590(%rdi)
jne 0x3ae82
testb $0x8, 0x4(%rdi)
jne 0x3ae77
cmpb $0x1, 0x21(%rsi)
jmp 0x3ae7b
xorl %eax, %eax
jmp 0x3ae7e
cmpb $0x1, 0x20(%rsi)
sete %al
movzbl %al, %eax
retq
testb $0x8, %al
jne 0x3ae8c
cmpb $0x0, 0x21(%rsi)
jmp 0x3ae90
cmpb $0x0, 0x20(%rsi)
setne %al
jmp 0x3ae7e
// File: /workspace/github_c_makefile_star2_O2/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 0x3aebd
testq %rsi, %rsi
je 0x3aeb2
testb $0x8, 0x4(%rdi)
jne 0x3aeb6
cmpb $0x0, 0x21(%rsi)
jmp 0x3aeba
xorl %eax, %eax
jmp 0x3aebd
cmpb $0x0, 0x20(%rsi)
sete %al
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3aed0
testb $0x8, 0x4(%rdi)
jne 0x3aed1
movb $0x1, 0x21(%rsi)
retq
movb $0x1, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3af09
movzwl 0x5f28(%rbx), %ecx
cmpw $0x20, %cx
jl 0x3af27
movl $0x508, %edi            # imm = 0x508
callq 0x3290
testq %rax, %rax
je 0x3af8b
movq %r13, (%rax)
movq %rax, 0x5f20(%rbx)
xorl %ecx, %ecx
movq %rax, %r13
leal 0x1(%rcx), %eax
movw %ax, 0x5f28(%rbx)
movswq %cx, %rax
imulq $0x28, %rax, %rax
leaq (%rax,%r13), %rcx
addq $0x8, %rcx
movq %rcx, (%r12)
movq %r15, %rax
testq %r14, %r14
je 0x3af50
movq (%r14), %rax
andl $0x1ff8, %eax           # imm = 0x1FF8
movq 0x3f20(%rbx,%rax), %rdx
movq %rdx, (%rcx)
movl %ebp, 0x18(%rcx)
andw $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 0x3af97
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_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_free_ns
static void
soap_free_ns(struct soap *soap)
{ register struct soap_nlist *np, *nq;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n"));
  for (np = soap->nlist; np; np = nq)
  { nq = np->next;
    SOAP_FREE(soap, np);
  }
  soap->nlist = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x88(%rdi), %rdi
testq %rdi, %rdi
je 0x3b0d1
movq (%rdi), %r14
callq 0x3030
movq %r14, %rdi
jmp 0x3b0bf
andq $0x0, 0x88(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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
subq $0x18, %rsp
movq %rdi, %r13
leaq 0x192a0(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x13beb(%rip), %r14     # 0x4ecf0
movq %rdi, 0x8(%rsp)
movq 0x19288(%r13), %r15
testq %r15, %r15
je 0x3b185
cmpq $0x0, 0x60c0(%r13)
jne 0x3b1e9
movq %r15, %rdi
callq 0x3110
movq %rax, %r12
movq 0x10(%rsp), %rbp
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x3b1e9
movq 0x8(%rbp), %r13
testq %r13, %r13
je 0x3b134
movq 0x10(%rbp), %rbx
cmpq %r12, %rbx
jb 0x3b134
cmpq %rbx, %r12
je 0x3b134
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3080
testl %eax, %eax
je 0x3b172
incq %r13
decq %rbx
jmp 0x3b153
movq %r15, %rdi
callq 0x3110
cmpq $0xf, %rax
movq 0x8(%rsp), %r13
ja 0x3b1a5
movq %r13, %rdi
pushq $0x41
popq %rsi
callq 0x35f17
movq %rax, 0x19288(%r13)
testq %rax, %rax
je 0x3b206
movq %rax, %r15
pushq $0x40
popq %r12
jmp 0x3b1a8
movq %rax, %r12
movb $0x0, 0x2(%r15)
movw $0x3d3d, (%r15)         # imm = 0x3D3D
addq $0x2, %r15
addq $-0x4, %r12
xorl %ebx, %ebx
cmpq %rbx, %r12
je 0x3b1d7
callq 0x3400
andl $0x3f, %eax
movb (%rax,%r14), %al
movb %al, (%r15,%rbx)
incq %rbx
jmp 0x3b1bd
movb $0x0, 0x2(%r15,%rbx)
movw $0x3d3d, (%r15,%rbx)    # imm = 0x3D3D
jmp 0x3b10a
movq 0x8(%rsp), %rcx
cmpq $0x0, 0x19290(%rcx)
jne 0x3b206
leaq 0x13613(%rip), %rax     # 0x4e812
movq %rax, 0x19290(%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_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
leaq 0x18580(%rdi), %rbx
testb $0x1, 0x6(%rdi)
jne 0x3b235
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x3b259
andw $0x0, 0x20(%rbx)
jmp 0x3b226
movq (%rbx), %rax
testq %rax, %rax
je 0x3b259
movq (%rax), %r14
movq 0x8(%rax), %rdi
callq 0x3030
movq (%rbx), %rdi
callq 0x3030
movq %r14, (%rbx)
movq %r14, %rax
jmp 0x3b238
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3b2da
movq %rdi, %rbx
cmpq $0x0, 0x80(%rdi)
jne 0x3b2da
pushq $0x20
popq %r12
cmpq $0x0, -0x20(%r14,%r12)
je 0x3b291
addq $0x20, %r12
jmp 0x3b283
movq %r12, %rdi
callq 0x3290
testq %rax, %rax
je 0x3b2da
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3240
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x3b2d3
leaq 0x11eb1(%rip), %rsi     # 0x4d170
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_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
pushq $0x1
popq %rbx
testq %rsi, %rsi
je 0x3b4f5
movq %rdi, %r15
testb $0x2, 0x6(%rdi)
jne 0x3b4f5
movl %edx, %ebp
movq %rsi, %r14
movq %rsp, %rcx
movq %r15, %rdi
callq 0x3ae08
testl %eax, %eax
je 0x3b4ce
movq (%rsp), %rax
movb 0x20(%rax), %cl
testb %cl, %cl
jne 0x3b4f2
movb $0x2, 0x20(%rax)
movb $0x2, %cl
jmp 0x3b4ef
movq %rsp, %r9
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl %ebp, %r8d
callq 0x3aed6
testl %eax, %eax
je 0x3b4f5
movq (%rsp), %rax
movb $0x0, 0x20(%rax)
xorl %ecx, %ecx
movb %cl, 0x21(%rax)
movsbl %cl, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rbx
testq %rsi, %rsi
je 0x3b578
movq %rdx, %r14
cmpq $0x0, (%rdx)
je 0x3b578
movl %r8d, %ebp
movq %rsi, %r15
movq %rdi, %r12
leaq 0x8(%rsp), %r9
movq %r14, %rdx
callq 0x3ad91
testl %eax, %eax
je 0x3b54d
movq 0x8(%rsp), %rax
movb 0x20(%rax), %cl
testb %cl, %cl
jne 0x3b575
movb $0x2, 0x20(%rax)
movb $0x2, %cl
jmp 0x3b572
leaq 0x8(%rsp), %r9
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %r8d
callq 0x3aed6
testl %eax, %eax
je 0x3b578
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_O2/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:
pushq %r14
pushq %rbx
pushq %rax
andq $0x0, (%rsp)
movl %esi, %ebx
movl 0x4(%rdi), %eax
btl $0x11, %eax
jb 0x3b628
movq %rdi, %r14
cmpw $0x1, 0x2(%rdi)
jne 0x3b5c1
btl $0x12, %eax
jb 0x3b5c1
cmpq $0x0, 0x38(%r14)
je 0x3b5c1
cmpw $0x3, 0x18590(%r14)
jne 0x3b624
testl %ebx, %ebx
js 0x3b5e2
je 0x3b5f9
movq %rsp, %rax
movq %r14, %rdi
movq %rdx, %rsi
movl %ecx, %edx
movq %rax, %rcx
callq 0x3ae08
testl %eax, %eax
jne 0x3b5fb
xorl %ebx, %ebx
jmp 0x3b628
movq %rsp, %rax
movq %r14, %rdi
movq %rdx, %rsi
movl %ecx, %edx
movq %rax, %rcx
callq 0x3ae08
movl %eax, %ebx
jmp 0x3b5fb
xorl %ebx, %ebx
testl %ebx, %ebx
setne %cl
movq (%rsp), %rax
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x3b628
testb $0x8, 0x4(%r14)
jne 0x3b61e
movb $0x1, 0x21(%rax)
jmp 0x3b628
movb $0x1, 0x20(%rax)
jmp 0x3b628
testl %ebx, %ebx
js 0x3b632
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rsp, %rax
movq %r14, %rdi
movq %rdx, %rsi
movl %ecx, %edx
movq %rax, %rcx
callq 0x3ae08
pushq $-0x1
popq %rbx
testl %eax, %eax
je 0x3b628
testb $0x8, 0x4(%r14)
movq (%rsp), %rax
jne 0x3b65d
movb $0x2, 0x21(%rax)
jmp 0x3b628
movb $0x2, 0x20(%rax)
jmp 0x3b628
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testq %rcx, %rcx
je 0x3b93b
xorl %ebp, %ebp
testb $0x2, 0x6(%rbx)
jne 0x3b94e
movl %edx, %ebp
testl %edx, %edx
jns 0x3b94e
movl 0x38(%rsp), %eax
testq %r8, %r8
je 0x3b95b
movq %rsp, %r10
movq %rbx, %rdi
movq %rcx, %rsi
movq %r8, %rdx
movl %r9d, %ecx
movl %eax, %r8d
movq %r10, %r9
callq 0x3ad91
jmp 0x3b96e
movq 0x30(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3e8c0
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %r8
movq %rbx, %rdi
movq %rcx, %rsi
movl %eax, %edx
movq %r8, %rcx
callq 0x3ae08
movl %eax, %ebp
testl %eax, %eax
je 0x3b94e
movq (%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3ae41
testl %eax, %eax
je 0x3b99b
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x3e856
pushq $-0x1
popq %rcx
jmp 0x3b9ac
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3ae95
xorl %ecx, %ecx
testl %eax, %eax
je 0x3b9b0
movl %ecx, %ebp
jmp 0x3b94e
testq %r15, %r15
je 0x3b94e
testb $0x8, 0x4(%rbx)
jne 0x3b9c2
movb $0x1, 0x21(%r15)
jmp 0x3b94e
movb $0x1, 0x20(%r15)
jmp 0x3b94e
// File: /workspace/github_c_makefile_star2_O2/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 0x3b9e3
movq %rdi, %rbx
callq 0x3d76d
testl %eax, %eax
je 0x3b9e5
movl 0x19214(%rbx), %eax
popq %rbx
retq
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x3df2b
// File: /workspace/github_c_makefile_star2_O2/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 0x3d76d
testl %eax, %eax
jne 0x3ba30
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3ddbf
testl %eax, %eax
jne 0x3ba30
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3df2b
testl %eax, %eax
je 0x3ba42
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %eax, %eax
jmp 0x3ba36