LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_code_list
SOAP_FMAC1
const char*
SOAP_FMAC2
soap_code_list(struct soap *soap, const struct soap_code_map *code_map, long code)
{ register char *t = soap->tmpbuf;
  if (code_map)
  { while (code_map->string)
    { if (code_map->code & code)
      { register const char *s = code_map->string;
        if (t != soap->tmpbuf)
          *t++ = ' ';
        while (*s && t < soap->tmpbuf + sizeof(soap->tmpbuf) - 1)
          *t++ = *s++;
        if (t == soap->tmpbuf + sizeof(soap->tmpbuf) - 1)
          break;
      }
      code_map++;
    }
  }
  *t = '\0';
  return soap->tmpbuf;
}

// Assembly:
leaq 0x16538(%rdi), %rax
movq %rax, %r9
testq %rsi, %rsi
je 0x382e0
leaq 0x16538(%rdi), %r9
movq 0x8(%rsi), %r8
testq %r8, %r8
je 0x382e0
movl $0x16538, %ecx          # imm = 0x16538
testq %rdx, (%rsi)
je 0x382cf
cmpq $0x16538, %rcx          # imm = 0x16538
je 0x38283
incq %rcx
movb $0x20, (%r9)
leaq (%rdi,%rcx), %r9
movb (%r8), %r10b
testb %r10b, %r10b
je 0x382c0
cmpq $0x16936, %rcx          # imm = 0x16936
jg 0x382c0
incq %r8
leaq 0x1(%rcx), %r11
movb %r10b, (%rdi,%rcx)
movb (%r8), %r10b
testb %r10b, %r10b
je 0x382ba
incq %r8
cmpq $0x16936, %rcx          # imm = 0x16936
movq %r11, %rcx
jl 0x3829b
leaq (%rdi,%r11), %r9
jmp 0x382c3
movq %rcx, %r11
movq %r11, %rcx
cmpq $0x16937, %r11          # imm = 0x16937
je 0x382e0
leaq (%rdi,%rcx), %r9
movq 0x18(%rsi), %r8
addq $0x10, %rsi
testq %r8, %r8
jne 0x3826e
movb $0x0, (%r9)
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_move
SOAP_FMAC2
soap_move(struct soap *soap, long n)
{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Moving %ld bytes forward\n", (long)n));
  for (; n > 0; n--)
    if ((int)soap_getchar(soap) == EOF)
      return SOAP_EOF;
  return SOAP_OK;
}

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

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x1(%rsi), %rax
cmpq $0x7e, %rax
ja 0x38a66
movb %sil, (%rsp)
movl $0x1, %edx
jmp 0x38b35
cmpq $0x80, %rsi
jb 0x38b2a
movl %esi, %ecx
cmpq $0x7ff, %rsi            # imm = 0x7FF
ja 0x38a8c
shrl $0x6, %ecx
orb $-0x40, %cl
movq %rsp, %rax
jmp 0x38b18
cmpq $0xffff, %rsi           # imm = 0xFFFF
ja 0x38aa5
shrl $0xc, %ecx
orb $-0x20, %cl
leaq 0x1(%rsp), %rax
movb %cl, -0x1(%rax)
jmp 0x38b0d
cmpq $0x1fffff, %rsi         # imm = 0x1FFFFF
ja 0x38ab9
shrl $0x12, %ecx
orb $-0x10, %cl
movq %rsp, %rax
jmp 0x38af9
cmpq $0x3ffffff, %rsi        # imm = 0x3FFFFFF
ja 0x38acf
shrl $0x18, %ecx
orb $-0x8, %cl
leaq 0x1(%rsp), %rax
jmp 0x38aeb
shrl $0x1e, %ecx
andb $0x1, %cl
orb $-0x4, %cl
leaq 0x2(%rsp), %rax
movb %cl, -0x2(%rax)
movl %esi, %ecx
shrl $0x18, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, -0x1(%rax)
movl %esi, %ecx
shrl $0x12, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, (%rax)
movl %esi, %ecx
shrl $0xc, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x1(%rax)
addq $0x2, %rax
movl %esi, %ecx
shrl $0x6, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, (%rax)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x1(%rax)
movb $0x0, 0x2(%rax)
movq %rsp, %rdi
callq 0x3110
movq %rax, %rdx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x376e8
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_puthex
SOAP_FMAC2
soap_puthex(struct soap *soap, const unsigned char *s, int n)
{ char d[2];
  register int i;
#ifdef WITH_DOM
  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
      return soap->error;
    return SOAP_OK;
  }
#endif
  for (i = 0; i < n; i++)
  { register int m = *s++;
    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
    m &= 0x0F;
    d[1] = (char)(m + (m > 9 ? '7' : '0'));
    if (soap_send_raw(soap, d, 2))
      return soap->error;
  }
  return SOAP_OK;
}

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

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x390c0
movq %rsi, %r14
movq %rdi, %rbx
testq %rdi, %rdi
je 0x390c9
movq 0x6038(%rbx), %rax
testq %rax, %rax
je 0x390d6
movq %rbx, %rdi
movq %r14, %rsi
callq *%rax
jmp 0x39121
leaq 0x1909a(%rip), %rax     # 0x52161
jmp 0x3912a
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3280
movl $0x6, %r15d
subl %r14d, %r15d
andl $0x7, %r15d
leaq (%r14,%r15), %rdi
addq $0x12, %rdi
callq 0x3280
testq %rax, %rax
je 0x39130
leaq (%r14,%r15), %rcx
addq $0x2, %rcx
movq %rax, %rdx
addq %rcx, %rdx
movw $0xc0de, -0x2(%rax,%rcx) # imm = 0xC0DE
movq 0xa0(%rbx), %rsi
movq %rsi, (%rax,%rcx)
movq %rcx, 0x8(%rax,%rcx)
movq %rdx, 0xa0(%rbx)
movw $0x1, 0x18592(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movl $0x14, 0x19214(%rbx)
xorl %eax, %eax
jmp 0x3912a
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_putbase64
SOAP_FMAC2
soap_putbase64(struct soap *soap, const unsigned char *s, int n)
{ register int i;
  register unsigned long m;
  char d[4];
  if (!s)
    return SOAP_OK;
#ifdef WITH_DOM
  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
  { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n)))
      return soap->error;
    return SOAP_OK;
  }
#endif
  for (; n > 2; n -= 3, s += 3)
  { m = s[0];
    m = (m << 8) | s[1];
    m = (m << 8) | s[2];
    for (i = 4; i > 0; m >>= 6)
      d[--i] = soap_base64o[m & 0x3F];
    if (soap_send_raw(soap, d, 4))
      return soap->error;
  }
  if (n > 0)
  { m = 0;
    for (i = 0; i < n; i++)
      m = (m << 8) | *s++;
    for (; i < 3; i++)
      m <<= 8;
    for (i++; i > 0; m >>= 6)
      d[--i] = soap_base64o[m & 0x3F];
    for (i = 3; i > n; i--)
      d[i] = '=';
    if (soap_send_raw(soap, d, 4))
      return soap->error;
  }
  return SOAP_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebp, %ebp
testq %rsi, %rsi
je 0x39266
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x3, %edx
jl 0x391d1
leaq 0x1ab87(%rip), %r13     # 0x53cf0
leaq 0x4(%rsp), %r12
movzbl (%r14), %eax
movzbl 0x1(%r14), %ecx
shll $0x10, %eax
shll $0x8, %ecx
orl %eax, %ecx
movzbl 0x2(%r14), %eax
orq %rcx, %rax
movl $0x5, %ecx
movl %eax, %edx
andl $0x3f, %edx
movb (%rdx,%r13), %dl
movb %dl, 0x2(%rsp,%rcx)
shrq $0x6, %rax
decq %rcx
cmpq $0x1, %rcx
ja 0x3918c
movl $0x4, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x376e8
testl %eax, %eax
jne 0x3925c
leal -0x3(%r15), %eax
addq $0x3, %r14
cmpl $0x5, %r15d
movl %eax, %r15d
jg 0x3916e
jmp 0x391d4
movl %r15d, %eax
testl %eax, %eax
jle 0x39266
movl %eax, %eax
xorl %edx, %edx
xorl %ecx, %ecx
movq %rcx, %rsi
shlq $0x8, %rsi
movzbl (%r14,%rdx), %ecx
orq %rsi, %rcx
incq %rdx
cmpl %edx, %eax
jne 0x391e2
cmpl $0x2, %eax
ja 0x39208
leal -0x3(%rax), %edx
shlq $0x8, %rcx
incl %edx
jne 0x39200
movl $0x5, %edx
leaq 0x1aadc(%rip), %rsi     # 0x53cf0
movl %ecx, %edi
andl $0x3f, %edi
movb (%rdi,%rsi), %dil
movb %dil, 0x2(%rsp,%rdx)
shrq $0x6, %rcx
decq %rdx
cmpq $0x1, %rdx
ja 0x39214
cmpl $0x2, %eax
jg 0x39246
movl $0x3, %ecx
movl %ecx, %edx
movb $0x3d, 0x4(%rsp,%rdx)
decl %ecx
cmpl %eax, %ecx
jg 0x39239
leaq 0x4(%rsp), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x376e8
testl %eax, %eax
je 0x39264
movl 0x19214(%rbx), %ebp
jmp 0x39266
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_xop_forward
SOAP_FMAC2
soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
{ /* Check MTOM xop:Include element (within hex/base64Binary) */
  /* TODO: this code to be obsoleted with new import/xop.h conventions */
  int body = soap->body; /* should save type too? */
  if (!soap_peek_element(soap))
  { if (!soap_element_begin_in(soap, "xop:Include", 0, NULL) && *soap->href)
    { if (soap_dime_forward(soap, ptr, size, id, type, options))
        return soap->error;
    }
    if (soap->body && soap_element_end_in(soap, NULL))
      return soap->error;
  }
  soap->body = body;
  return SOAP_OK;
}

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x395cf
testl %eax, %eax
je 0x3a284
testq %r15, %r15
je 0x3a31d
cmpl $0x6, 0x19214(%rbx)
jne 0x3a31d
cmpb $0x2d, (%r15)
jne 0x3a31d
movl $0x0, 0x19214(%rbx)
jmp 0x3a31d
cmpw $0x0, 0x18538(%rbx)
je 0x3a2a2
movl $0x3, 0x19214(%rbx)
movl $0x3, %eax
jmp 0x3a323
testq %r15, %r15
je 0x3a2af
xorl %eax, %eax
cmpb $0x2d, (%r15)
je 0x3a323
leaq 0x16938(%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x3b54d
movl %eax, 0x19214(%rbx)
testl %eax, %eax
jne 0x3a31d
movw $0x0, 0x18594(%rbx)
testq %r14, %r14
je 0x3a309
cmpb $0x0, 0x17538(%rbx)
je 0x3a309
leaq 0x17538(%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x3b54d
testl %eax, %eax
je 0x3a309
movl $0x4, 0x19214(%rbx)
movl $0x4, %eax
jmp 0x3a323
testl %ebp, %ebp
je 0x3a32e
cmpw $0x0, 0x6106(%rbx)
je 0x3a31d
incl 0x6108(%rbx)
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpw $0x0, 0x1858c(%rbx)
je 0x3a30d
testb $0x10, 0x5(%rbx)
je 0x3a30d
movl $0x17, 0x19214(%rbx)
movl $0x17, %eax
jmp 0x3a323
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_dime_forward
SOAP_FMAC2
soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
{ struct soap_xlist *xp;
  *ptr = NULL;
  *size = 0;
  *id = NULL;
  *type = NULL;
  *options = NULL;
  if (!*soap->href)
    return SOAP_OK;
  *id = soap_strdup(soap, soap->href);
  xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
  if (!xp)
    return soap->error = SOAP_EOM;
  xp->next = soap->xlist;
  xp->ptr = ptr;
  xp->size = size;
  xp->id = *id;
  xp->type = type;
  xp->options = options;
  soap->xlist = xp;
  return SOAP_OK;
}

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

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

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

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

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

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
jne 0x3a997
movq 0x90(%r14), %rbx
testq %rbx, %rbx
je 0x3a9d3
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x3a9b5
movq (%rdi), %r15
callq 0x3030
movq %r15, %rdi
testq %r15, %r15
jne 0x3a9a5
movq 0x90(%r14), %rax
cmpq %rbx, %rax
je 0x3a9d9
testq %rax, %rax
je 0x3a9e6
movq %rax, %r14
movq (%rax), %rax
cmpq %rbx, %rax
jne 0x3a9c1
jmp 0x3a9e0
popq %rbx
popq %r14
popq %r15
retq
addq $0x90, %r14
movq (%rbx), %rax
movq %rax, (%r14)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3030
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_putsizesoffsets
SOAP_FMAC1
char *
SOAP_FMAC2
soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
{ int i;
  if (!type)
    return NULL;
  if (soap->version == 2)
  { sprintf(soap->type, "%s[%d", type, size[0]);
    for (i = 1; i < dim; i++)
      sprintf(soap->type + strlen(soap->type), " %d", size[i]);
  }
  else
  { if (offset)
    { sprintf(soap->type, "%s[%d", type, size[0] + offset[0]);
      for (i = 1; i < dim; i++)
        sprintf(soap->type + strlen(soap->type), ",%d", size[i] + offset[i]);
    }
    else
    { sprintf(soap->type, "%s[%d", type, size[0]);
      for (i = 1; i < dim; i++)
        sprintf(soap->type + strlen(soap->type), ",%d", size[i]);
    }
    strcat(soap->type, "]");
  }
  return soap->type;
}

// Assembly:
testq %rsi, %rsi
je 0x3ac6c
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rdx, %r14
movq %rsi, %rdx
cmpw $0x2, 0x2(%rdi)
movq %rdi, (%rsp)
jne 0x3ac6f
leaq 0x17538(%rdi), %r15
movl (%r14), %ecx
leaq 0x17611(%rip), %rsi     # 0x52234
movq %r15, %rdi
xorl %eax, %eax
callq 0x3350
cmpl $0x2, %ebp
jl 0x3ad2e
movl %ebp, %r13d
movl $0x1, %ebx
leaq 0x1852b(%rip), %r12     # 0x53170
movq %r15, %rdi
callq 0x3110
leaq (%rax,%r15), %rdi
movl (%r14,%rbx,4), %edx
movq %r12, %rsi
xorl %eax, %eax
callq 0x3350
incq %rbx
cmpq %rbx, %r13
jne 0x3ac45
jmp 0x3ad2e
xorl %eax, %eax
retq
movq %rcx, %r12
leaq 0x17538(%rdi), %r15
movl (%r14), %ecx
testq %r12, %r12
je 0x3acd1
addl (%r12), %ecx
leaq 0x175a8(%rip), %rsi     # 0x52234
movq %r15, %rdi
xorl %eax, %eax
callq 0x3350
cmpl $0x2, %ebp
jl 0x3ad18
movl %ebp, %ebp
movl $0x1, %ebx
leaq 0x17591(%rip), %r13     # 0x5223a
movq %r15, %rdi
callq 0x3110
leaq (%rax,%r15), %rdi
movl (%r12,%rbx,4), %edx
addl (%r14,%rbx,4), %edx
movq %r13, %rsi
xorl %eax, %eax
callq 0x3350
incq %rbx
cmpq %rbx, %rbp
jne 0x3aca9
jmp 0x3ad18
leaq 0x1755c(%rip), %rsi     # 0x52234
movq %r15, %rdi
xorl %eax, %eax
callq 0x3350
cmpl $0x2, %ebp
jl 0x3ad18
movl %ebp, %r13d
movl $0x1, %ebx
leaq 0x17544(%rip), %r12     # 0x5223a
movq %r15, %rdi
callq 0x3110
leaq (%rax,%r15), %rdi
movl (%r14,%rbx,4), %edx
movq %r12, %rsi
xorl %eax, %eax
callq 0x3350
incq %rbx
cmpq %rbx, %r13
jne 0x3acf6
movq %r15, %rdi
callq 0x3110
movq (%rsp), %rcx
movw $0x5d, 0x17538(%rcx,%rax)
movq (%rsp), %rax
addq $0x17538, %rax          # imm = 0x17538
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1748e(%rip), %rsi     # 0x52236
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3350
cmpl $0x2, %ebp
jl 0x3ade9
movl %ebp, %r12d
movl $0x1, %r13d
leaq 0x17473(%rip), %r15     # 0x5223a
movq %rbx, %rdi
callq 0x3110
leaq (%rax,%rbx), %rdi
movl (%r14,%r13,4), %edx
movq %r15, %rsi
xorl %eax, %eax
callq 0x3350
incq %r13
cmpq %r13, %r12
jne 0x3adc7
movq %rbx, %rdi
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_O1/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
cmpl $0x2, %esi
jl 0x3ae23
movl %esi, %ecx
movl $0x1, %edx
imull (%rdi,%rdx,4), %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x3ae17
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
testl %ecx, %ecx
setg %dl
testq %rdi, %rdi
setne %al
andb %dl, %al
testq %r12, %r12
je 0x3aea6
testb %al, %al
je 0x3aefc
movl %ecx, %r13d
xorl %r15d, %r15d
movl $0x1, %ebp
cmpb $0x0, (%r14)
je 0x3aeff
incq %r14
imull -0x4(%rbx,%rbp,4), %r15d
movq %r14, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3220
movl %eax, -0x4(%r12,%rbp,4)
addl %eax, %r15d
movq %r14, %rdi
movl $0x2c, %esi
callq 0x3130
cmpq %r13, %rbp
jae 0x3aeff
movq %rax, %r14
incq %rbp
testq %rax, %rax
jne 0x3ae5d
jmp 0x3aeff
testb %al, %al
je 0x3aefc
movl %ecx, %r12d
xorl %r15d, %r15d
movl $0x1, %r13d
cmpb $0x0, (%r14)
je 0x3aeff
incq %r14
movl %r15d, %ebp
imull -0x4(%rbx,%r13,4), %ebp
movq %r14, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3220
movq %rax, %r15
addl %ebp, %r15d
movq %r14, %rdi
movl $0x2c, %esi
callq 0x3130
cmpq %r12, %r13
jae 0x3aeff
movq %rax, %r14
incq %r13
testq %rax, %rax
jne 0x3aeb6
jmp 0x3aeff
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_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
pushq %rax
movl $0x0, (%rdx)
movzbl (%rdi), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x3b008
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
cmpl $0x5b, %eax
jne 0x3af43
incq %r12
movq %rsp, %rsi
movq %r12, %rdi
movl $0xa, %edx
callq 0x3220
movq %rax, %rbx
cmpl $0xf4240, %ebx          # imm = 0xF4240
ja 0x3b008
movl %ebx, %r13d
movq (%rsp), %rbp
cmpq %r12, %rbp
je 0x3affc
movq %rbp, %rdi
movl $0x2c, %esi
callq 0x3130
movq %rax, %r12
testq %rax, %rax
jne 0x3af97
movq %rbp, %rdi
movl $0x20, %esi
callq 0x3130
movq %rax, %r12
testq %r15, %r15
je 0x3afc9
cmpb $0x0, (%r15)
je 0x3afcc
incq %r15
imull (%r14), %r13d
movl %r13d, (%r14)
movq %r15, %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x3220
addl %eax, (%r14)
testl %eax, %eax
js 0x3affc
movq (%rsp), %r15
jmp 0x3afcc
xorl %r15d, %r15d
testq %r12, %r12
je 0x3b003
incq %r12
movq %r12, %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x3220
movq %rax, %r13
testl %r13d, %r13d
js 0x3affc
imull %r13d, %ebx
cmpl $0xf4240, %ebx          # imm = 0xF4240
jle 0x3af65
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x3b008
subl (%r14), %ebx
movl %ebx, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_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 0x3b0dd
movl %edx, %ebp
movq %rdi, %r14
callq 0x3110
movq %rax, %rbx
movslq %ebp, %r12
movl $0x1, %ebp
movabsq $0x800000000001001, %rsi # imm = 0x800000000001001
movl %ebx, %eax
movl %ebx, %ecx
sarl $0x1f, %ecx
andl %ebx, %ecx
decl %ecx
decq %rax
movl %ebx, %r15d
testl %ebx, %ebx
jle 0x3b083
movl %eax, %edx
movzbl (%r14,%rdx), %edx
leal -0x1(%r15), %ebx
decq %rax
addl $-0x20, %edx
cmpl $0x3b, %edx
ja 0x3b05e
btq %rdx, %rsi
jae 0x3b05e
jmp 0x3b085
movl %ecx, %ebx
movslq %ebx, %r13
leaq (%r14,%r13), %rdi
incq %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3220
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,%r12,4)
testl %r15d, %r15d
jle 0x3b0e4
testb %cl, %cl
jne 0x3b0e4
addq %r14, %r13
decq %r12
cmpb $0x5b, (%r13)
movabsq $0x800000000001001, %rsi # imm = 0x800000000001001
jne 0x3b050
jmp 0x3b0ee
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x3b0ee
testb %cl, %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
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_O1/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 0x3b17d
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %ebp
xorl %r12d, %r12d
movslq %ebp, %r15
addq %r14, %r15
movq %r15, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3220
movq %rax, %rcx
leaq 0x1(%r12), %rax
movl %ecx, (%rbx,%r12,4)
movl %ebp, %ecx
movzbl (%r15), %edx
testl %edx, %edx
je 0x3b156
cmpl $0x2c, %edx
je 0x3b156
cmpl $0x5d, %edx
je 0x3b156
incl %ecx
incq %r15
jmp 0x3b13d
cmpq $0xf, %r12
je 0x3b183
xorl %ebp, %ebp
cmpb $0x2c, %dl
sete %bpl
addl %ecx, %ebp
movslq %ebp, %rcx
movzbl (%r14,%rcx), %ecx
cmpl $0x5d, %ecx
je 0x3b188
movq %rax, %r12
testl %ecx, %ecx
jne 0x3b11a
jmp 0x3b188
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
movl $0x10, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_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 0x3b35b
movl 0x8(%rdi), %eax
cmpl 0x6108(%rbx), %eax
jb 0x3b35b
movq (%rdi), %r14
callq 0x3030
movq %r14, %rdi
testq %r14, %r14
jne 0x3b33e
jmp 0x3b35e
movq %rdi, %r14
movq %r14, 0x88(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
movq 0x88(%rdi), %rbx
testq %rbx, %rbx
je 0x3b3b7
leaq 0x18(%rbx), %rbp
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3080
testl %eax, %eax
jne 0x3b3b2
cmpb $0x0, (%rbp,%r13)
je 0x3b415
movq (%rbx), %rbx
jmp 0x3b38f
testq %r13, %r13
je 0x3b40e
cmpq $0x3, %r13
jne 0x3b3f5
cmpq $0x3, %r15
jne 0x3b3f5
leaq 0x176d6(%rip), %rsi     # 0x52aa5
movl $0x3, %edx
movq %r12, %rdi
callq 0x3080
testl %eax, %eax
jne 0x3b3f5
movl $0x3, %edx
movq %r12, %rdi
movq (%rsp), %rsi
callq 0x3080
testl %eax, %eax
je 0x3b459
testb $0x40, 0x5(%r14)
jne 0x3b459
movl $0x5, 0x19214(%r14)
movl $0x5, %ebp
jmp 0x3b45b
movl $0x9, %ebp
jmp 0x3b45b
testb $0x40, 0x5(%r14)
jne 0x3b459
movswq 0xc(%rbx), %rax
movl $0x9, %ebp
testq %rax, %rax
js 0x3b45b
movq 0x80(%r14), %rcx
shlq $0x5, %rax
movq (%rcx,%rax), %r14
testq %r14, %r14
je 0x3b459
movq %r14, %rdi
movq (%rsp), %rsi
movq %r15, %rdx
callq 0x3080
testl %eax, %eax
jne 0x3b45b
cmpb $0x0, (%r14,%r15)
jne 0x3b45b
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_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 0x3b541
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1761a(%rip), %rsi     # 0x52aa5
movl $0x3, %edx
movq %r14, %rdi
callq 0x3080
testl %eax, %eax
je 0x3b541
movq 0x88(%rbx), %r13
movq %r14, %rdi
movl $0x3a, %esi
callq 0x3130
testq %rax, %rax
je 0x3b501
testq %r13, %r13
je 0x3b4ea
movq %rax, %r15
subq %r14, %r15
leaq 0x18(%r13), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3080
testl %eax, %eax
jne 0x3b4e1
cmpb $0x0, (%r12,%r15)
je 0x3b509
movq (%r13), %r13
testq %r13, %r13
jne 0x3b4c4
movl $0x9, 0x19214(%rbx)
jmp 0x3b506
cmpb $0x0, 0x18(%r13)
je 0x3b509
movq (%r13), %r13
testq %r13, %r13
jne 0x3b4f6
xorl %r13d, %r13d
testq %r13, %r13
je 0x3b541
movswq 0xc(%r13), %rax
testq %rax, %rax
js 0x3b527
movq 0x78(%rbx), %rcx
shlq $0x5, %rax
movq 0x8(%rcx,%rax), %rax
jmp 0x3b543
movq 0x10(%r13), %rsi
testq %rsi, %rsi
je 0x3b541
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3a567
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %ebp, %ebp
orb %al, %cl
jne 0x3b649
movq %rdx, %rbx
cmpb $0x0, (%rdx)
je 0x3b649
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
movl $0x3a, %esi
callq 0x3130
movq %rax, %r13
movq %rbx, %rdi
movl $0x3a, %esi
callq 0x3130
testq %rax, %rax
je 0x3b5f0
movq %rax, %r12
leaq 0x1(%rax), %rsi
testq %r13, %r13
je 0x3b5fd
cmpb $0x0, (%rsi)
je 0x3b5c9
leaq 0x1(%r13), %rdi
callq 0x3200
movl $0x3, %ebp
testl %eax, %eax
jne 0x3b649
subq %rbx, %r12
je 0x3b647
subq %r14, %r13
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %rcx
movq %r12, %r8
callq 0x3b36d
testl %eax, %eax
je 0x3b647
movl $0x3, %ebp
jmp 0x3b62a
testq %r13, %r13
je 0x3b633
incq %r13
movq %r13, %rdi
jmp 0x3b636
movq %r14, %rdi
callq 0x3200
movl $0x3, %ebp
testl %eax, %eax
jne 0x3b649
subq %rbx, %r12
je 0x3b647
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
movq %r12, %r8
callq 0x3b36d
testl %eax, %eax
je 0x3b647
cmpl $0x9, %eax
je 0x3b649
movl %eax, %ebp
jmp 0x3b649
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3200
movl $0x3, %ebp
testl %eax, %eax
jne 0x3b649
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_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 0x3b6b3
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x17938(%rdi), %r14
movq %r14, %rsi
callq 0x3b54d
testl %eax, %eax
je 0x3b6b3
leaq 0x16bb7(%rip), %rdx     # 0x5223e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3b54d
testl %eax, %eax
je 0x3b6b3
leaq 0x16bad(%rip), %rdx     # 0x5224a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3b54d
movl %eax, %ecx
movl $0x3, %eax
testl %ecx, %ecx
jne 0x3b6b5
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
movq 0x88(%rdi), %rdi
testq %rdi, %rdi
je 0x3b8e3
movq (%rdi), %r14
callq 0x3030
movq %r14, %rdi
testq %r14, %r14
jne 0x3b8d3
movq $0x0, 0x88(%rbx)
cmpq $0x0, 0x90(%rbx)
je 0x3b904
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3a980
jmp 0x3b8ee
movq 0x18580(%rbx), %r14
testq %r14, %r14
je 0x3b931
movq (%r14), %r15
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x3b921
callq 0x3030
movq %r14, %rdi
callq 0x3030
movq %r15, %r14
testq %r15, %r15
jne 0x3b910
movq $0x0, 0x18580(%rbx)
leaq 0x6120(%rbx), %r14
movq 0x6120(%rbx), %rdi
testq %rdi, %rdi
je 0x3b954
callq 0x3030
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movq 0x80(%rbx), %r14
testq %r14, %r14
je 0x3b9cf
cmpq $0x0, (%r14)
je 0x3b9b8
addq $0x20, %r14
leaq 0x167e1(%rip), %r15     # 0x52161
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x3b9a0
cmpq %rdi, 0x38(%rbx)
jne 0x3b993
movq %r15, 0x38(%rbx)
callq 0x3030
movq $0x0, -0x8(%r14)
movq 0x38(%rbx), %rax
cmpq -0x18(%r14), %rax
jne 0x3b9ae
movq %r15, 0x38(%rbx)
cmpq $0x0, (%r14)
leaq 0x20(%r14), %r14
jne 0x3b980
movq 0x80(%rbx), %rdi
callq 0x3030
movq $0x0, 0x80(%rbx)
movq 0x192b0(%rbx), %rdi
testq %rdi, %rdi
je 0x3b9f2
movq (%rdi), %r14
callq 0x3030
movq %r14, 0x192b0(%rbx)
movq %r14, %rdi
testq %r14, %r14
jne 0x3b9db
movq 0x5f20(%rbx), %rdi
testq %rdi, %rdi
je 0x3ba0e
movq (%rdi), %r14
callq 0x3030
movq %r14, %rdi
testq %r14, %r14
jne 0x3b9fe
leaq 0x3f20(%rbx), %rdi
movl $0x200a, %edx           # imm = 0x200A
xorl %esi, %esi
callq 0x3180
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x40fae
// File: /workspace/github_c_makefile_star2_O1/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 0x3ba75
movl $0xa0000001, %ecx       # imm = 0xA0000001
btl %eax, %ecx
jae 0x3ba75
movq 0x5ff8(%rbx), %rax
testq %rax, %rax
je 0x3ba6a
movq %rbx, %rdi
callq *%rax
movl %eax, 0x19214(%rbx)
testl %eax, %eax
jne 0x3ba89
movw $0x0, 0x191cc(%rbx)
jmp 0x3ba7f
cmpw $0x0, 0x191cc(%rbx)
je 0x3ba4f
movl %r14d, 0x19214(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3bac6
movq 0x8(%r14), %rdi
cmpq %r15, %rdi
je 0x3bac2
movq %r15, %rsi
callq 0x3200
testl %eax, %eax
jne 0x3baa5
movq 0x10(%r14), %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3bedd
movq %rdx, %r14
movq %rbx, %rdi
callq 0x4b6a9
testl %eax, %eax
je 0x3beb1
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
testq %r14, %r14
je 0x3bedd
leaq 0x16a5f(%rip), %rsi     # 0x5291c
movl $0x2, %edx
movq %rbx, %rdi
callq 0x376e8
testl %eax, %eax
jne 0x3bea3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4b6a9
testl %eax, %eax
jne 0x3bea3
leaq 0x1663e(%rip), %rsi     # 0x52522
movl $0x2, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x376e8