LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x39443
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x3, %edx
jl 0x393ae
leaq 0x1a9aa(%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 0x39369
movl $0x4, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x379c8
testl %eax, %eax
jne 0x39439
leal -0x3(%r15), %eax
addq $0x3, %r14
cmpl $0x5, %r15d
movl %eax, %r15d
jg 0x3934b
jmp 0x393b1
movl %r15d, %eax
testl %eax, %eax
jle 0x39443
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 0x393bf
cmpl $0x2, %eax
ja 0x393e5
leal -0x3(%rax), %edx
shlq $0x8, %rcx
incl %edx
jne 0x393dd
movl $0x5, %edx
leaq 0x1a8ff(%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 0x393f1
cmpl $0x2, %eax
jg 0x39423
movl $0x3, %ecx
movl %ecx, %edx
movb $0x3d, 0x4(%rsp,%rdx)
decl %ecx
cmpl %eax, %ecx
jg 0x39416
leaq 0x4(%rsp), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x379c8
testl %eax, %eax
je 0x39441
movl 0x19214(%rbx), %ebp
jmp 0x39443
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_O3/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 0x39738
testl %eax, %eax
je 0x396b5
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 0x18b53(%rip), %rsi     # 0x52228
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3a388
testl %eax, %eax
je 0x396ff
cmpw $0x0, 0x6106(%rbx)
je 0x39698
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3a563
testl %eax, %eax
jne 0x3972d
jmp 0x39698
cmpb $0x0, 0x17138(%rbx)
je 0x396e5
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0x30(%rsp), %r9
callq 0x3a4ac
testl %eax, %eax
je 0x396e5
movl 0x19214(%rbx), %eax
jmp 0x396a6
// File: /workspace/github_c_makefile_star2_O3/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 0x39738
testl %eax, %eax
je 0x3a3c9
testq %r15, %r15
je 0x3a3c1
cmpl $0x6, 0x19214(%rbx)
jne 0x3a3c1
cmpb $0x2d, (%r15)
jne 0x3a3c1
movl $0x0, 0x19214(%rbx)
movl 0x19214(%rbx), %eax
jmp 0x3a3e2
cmpw $0x0, 0x18538(%rbx)
je 0x3a3ed
movl $0x3, 0x19214(%rbx)
movl $0x3, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testq %r15, %r15
je 0x3a41f
xorl %eax, %eax
cmpb $0x2d, (%r15)
je 0x3a3e2
leaq 0x16938(%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x3b608
movl %eax, 0x19214(%rbx)
testl %eax, %eax
jne 0x3a3c1
leaq 0x19214(%rbx), %r15
jmp 0x3a430
leaq 0x19214(%rbx), %r15
movl $0x0, 0x19214(%rbx)
movw $0x0, 0x18594(%rbx)
testq %r14, %r14
je 0x3a46e
cmpb $0x0, 0x17538(%rbx)
je 0x3a46e
leaq 0x17538(%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x3b608
testl %eax, %eax
je 0x3a46e
movl $0x4, (%r15)
movl $0x4, %eax
jmp 0x3a3e2
testl %ebp, %ebp
je 0x3a48b
cmpw $0x0, 0x6106(%rbx)
je 0x3a3c1
incl 0x6108(%rbx)
jmp 0x3a3c1
cmpw $0x0, 0x1858c(%rbx)
je 0x3a472
testb $0x10, 0x5(%rbx)
je 0x3a472
movl $0x17, (%r15)
movl $0x17, %eax
jmp 0x3a3e2
// File: /workspace/github_c_makefile_star2_O3/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 0x3a552
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 0x3a6c4
movq %rax, %r15
movq %rax, (%r14)
movl $0x30, %edi
callq 0x3290
testq %rax, %rax
je 0x3a541
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 0x3a552
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_O3/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 0x3a6fe
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x3110
leaq 0x1(%rax), %rsi
movq %r14, %rdi
callq 0x39272
testq %rax, %rax
je 0x3a6fe
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_O3/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 0x3a744
movq %rsi, %rbx
xorl %r14d, %r14d
cmpl $0x0, (%rbx,%r14)
leaq 0x4(%r14), %r14
jne 0x3a717
movq %r14, %rsi
callq 0x39272
testq %rax, %rax
je 0x3a744
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3240
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3a793
movq 0x90(%rdi), %rsi
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x3a7b0
movq 0x8(%rdi), %rax
subq %rax, 0x10(%rsi)
movq (%rdi), %rax
movq %rax, 0x8(%rsi)
jmp 0x3030
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3a9f1
movq 0x90(%rdi), %rsi
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x3aa09
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_O3/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 0x3aa4f
movq 0x90(%rdi), %rbx
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x3aa75
movq (%rdi), %rax
movq %rax, 0x8(%rbx)
callq 0x3030
movq 0x8(%rbx), %rcx
leaq 0x10(%rcx), %rax
testq %rcx, %rcx
cmoveq %rcx, %rax
jmp 0x3aa77
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3aaaa
movq 0x90(%r14), %rbx
testq %rbx, %rbx
je 0x3aafb
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x3aac3
movq (%rdi), %r15
callq 0x3030
movq %r15, %rdi
testq %r15, %r15
jne 0x3aab3
movq 0x90(%r14), %rax
cmpq %rbx, %rax
je 0x3aae1
testq %rax, %rax
je 0x3aaee
movq %rax, %r14
movq (%rax), %rax
cmpq %rbx, %rax
jne 0x3aacf
jmp 0x3aae8
addq $0x90, %r14
movq (%rbx), %rax
movq %rax, (%r14)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3030
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_save_block
SOAP_FMAC1
char*
SOAP_FMAC2
soap_save_block(struct soap *soap, struct soap_blist *b, char *p, int flag)
{ register size_t n;
  register char *q, *s;
  if (!b)
    b = soap->blist;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)b->size, b->ptr, p));
  if (b->size)
  { if (!p)
      p = (char*)soap_malloc(soap, b->size);
    if (p)
    { for (s = p, q = soap_first_block(soap, b); q; q = soap_next_block(soap, b))
      { n = soap_block_size(soap, b);
#ifndef WITH_NOIDREF
        if (flag)
          soap_update_ptrs(soap, q, q + n, s, q);
#endif
        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s));
        memcpy(s, q, n);
        s += n;
      }
    }
    else
      soap->error = SOAP_EOM;
  }
  soap_end_block(soap, b);
  return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
jne 0x3ab23
movq 0x90(%r14), %rbx
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x3ac98
testq %r15, %r15
jne 0x3ab49
movq %r14, %rdi
callq 0x39272
movq %rax, %r15
testq %rax, %rax
je 0x3ac8a
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x3ac98
xorl %eax, %eax
movq %rax, %rdx
movq %rcx, %rax
movq (%rcx), %rcx
movq %rdx, (%rax)
testq %rcx, %rcx
jne 0x3ab58
movq %rax, 0x8(%rbx)
addq $0x10, %rax
movq %r15, %r12
movq 0x8(%rbx), %rcx
movq 0x8(%rcx), %r13
testl %ebp, %ebp
je 0x3ac63
leaq (%rax,%r13), %rcx
movq %r12, %rdx
subq %rax, %rdx
xorl %esi, %esi
movq 0xa8(%r14,%rsi,8), %rdi
testq %rdi, %rdi
je 0x3ac21
movq 0x30(%rdi), %r8
cmpq %rcx, %r8
jae 0x3abb6
cmpq %rax, %r8
jb 0x3abb6
addq %rdx, %r8
movq %r8, 0x30(%rdi)
leaq 0x18(%rdi), %r8
movq %r8, %r9
movq (%r8), %r8
cmpq %rcx, %r8
jae 0x3abd1
cmpq %rax, %r8
jb 0x3abd1
leaq (%r8,%rdx), %r10
movq %r10, (%r9)
testq %r8, %r8
jne 0x3abba
leaq 0x20(%rdi), %r8
movq %r8, %r9
movq (%r8), %r8
cmpq %rcx, %r8
jae 0x3abf1
cmpq %rax, %r8
jb 0x3abf1
leaq (%r8,%rdx), %r10
movq %r10, (%r9)
testq %r8, %r8
jne 0x3abda
movq 0x28(%rdi), %r8
testq %r8, %r8
je 0x3ac19
movq 0x10(%r8), %r9
cmpq %rax, %r9
jb 0x3ac14
cmpq %rcx, %r9
jae 0x3ac14
addq %rdx, %r9
movq %r9, 0x10(%r8)
movq (%r8), %r8
jmp 0x3abfa
movq (%rdi), %rdi
jmp 0x3ab98
incq %rsi
cmpq $0x7cf, %rsi            # imm = 0x7CF
jne 0x3ab90
movq 0x192b0(%r14), %rsi
testq %rsi, %rsi
je 0x3ac63
movq 0x8(%rsi), %rdi
cmpq %rcx, %rdi
jae 0x3ac5e
cmpq %rax, %rdi
jb 0x3ac5e
addq %rdx, %rdi
movq %rdi, 0x8(%rsi)
addq %rdx, 0x10(%rsi)
addq %rdx, 0x20(%rsi)
addq %rdx, 0x28(%rsi)
movq (%rsi), %rsi
jmp 0x3ac38
movq %r12, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x3240
addq %r13, %r12
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3aa3f
testq %rax, %rax
jne 0x3ab74
jmp 0x3ac98
movl $0x14, 0x19214(%r14)
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3aa8e
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3ad57
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 0x3ad5a
leaq 0x17538(%rdi), %r15
movl (%r14), %ecx
leaq 0x17526(%rip), %rsi     # 0x52234
movq %r15, %rdi
xorl %eax, %eax
callq 0x3360
cmpl $0x2, %ebp
jl 0x3ae19
movl %ebp, %r13d
movl $0x1, %ebx
leaq 0x18440(%rip), %r12     # 0x53170
movq %r15, %rdi
callq 0x3110
leaq (%rax,%r15), %rdi
movl (%r14,%rbx,4), %edx
movq %r12, %rsi
xorl %eax, %eax
callq 0x3360
incq %rbx
cmpq %rbx, %r13
jne 0x3ad30
jmp 0x3ae19
xorl %eax, %eax
retq
movq %rcx, %r12
leaq 0x17538(%rdi), %r15
movl (%r14), %ecx
testq %r12, %r12
je 0x3adbc
addl (%r12), %ecx
leaq 0x174bd(%rip), %rsi     # 0x52234
movq %r15, %rdi
xorl %eax, %eax
callq 0x3360
cmpl $0x2, %ebp
jl 0x3ae03
movl %ebp, %ebp
movl $0x1, %ebx
leaq 0x174a6(%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 0x3360
incq %rbx
cmpq %rbx, %rbp
jne 0x3ad94
jmp 0x3ae03
leaq 0x17471(%rip), %rsi     # 0x52234
movq %r15, %rdi
xorl %eax, %eax
callq 0x3360
cmpl $0x2, %ebp
jl 0x3ae03
movl %ebp, %r13d
movl $0x1, %ebx
leaq 0x17459(%rip), %r12     # 0x5223a
movq %r15, %rdi
callq 0x3110
leaq (%rax,%r15), %rdi
movl (%r14,%rbx,4), %edx
movq %r12, %rsi
xorl %eax, %eax
callq 0x3360
incq %rbx
cmpq %rbx, %r13
jne 0x3ade1
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_O3/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 0x173a3(%rip), %rsi     # 0x52236
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3360
cmpl $0x2, %ebp
jl 0x3aed4
movl %ebp, %r12d
movl $0x1, %r13d
leaq 0x17388(%rip), %r15     # 0x5223a
movq %rbx, %rdi
callq 0x3110
leaq (%rax,%rbx), %rdi
movl (%r14,%r13,4), %edx
movq %r15, %rsi
xorl %eax, %eax
callq 0x3360
incq %r13
cmpq %r13, %r12
jne 0x3aeb2
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_O3/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 0x3af0e
movl %esi, %ecx
movl $0x1, %edx
imull (%rdi,%rdx,4), %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x3af02
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3af91
testb %al, %al
je 0x3afe7
movl %ecx, %r13d
xorl %r15d, %r15d
movl $0x1, %ebp
cmpb $0x0, (%r14)
je 0x3afea
incq %r14
imull -0x4(%rbx,%rbp,4), %r15d
movq %r14, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3230
movl %eax, -0x4(%r12,%rbp,4)
addl %eax, %r15d
movq %r14, %rdi
movl $0x2c, %esi
callq 0x3130
cmpq %r13, %rbp
jae 0x3afea
movq %rax, %r14
incq %rbp
testq %rax, %rax
jne 0x3af48
jmp 0x3afea
testb %al, %al
je 0x3afe7
movl %ecx, %r12d
xorl %r15d, %r15d
movl $0x1, %r13d
cmpb $0x0, (%r14)
je 0x3afea
incq %r14
movl %r15d, %ebp
imull -0x4(%rbx,%r13,4), %ebp
movq %r14, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3230
movq %rax, %r15
addl %ebp, %r15d
movq %r14, %rdi
movl $0x2c, %esi
callq 0x3130
cmpq %r12, %r13
jae 0x3afea
movq %rax, %r14
incq %r13
testq %rax, %rax
jne 0x3afa1
jmp 0x3afea
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_O3/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 0x3b0f3
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
cmpl $0x5b, %eax
jne 0x3b02e
incq %r12
movq %rsp, %rsi
movq %r12, %rdi
movl $0xa, %edx
callq 0x3230
movq %rax, %rbx
cmpl $0xf4240, %ebx          # imm = 0xF4240
ja 0x3b0f3
movl %ebx, %r13d
movq (%rsp), %rbp
cmpq %r12, %rbp
je 0x3b0e7
movq %rbp, %rdi
movl $0x2c, %esi
callq 0x3130
movq %rax, %r12
testq %rax, %rax
jne 0x3b082
movq %rbp, %rdi
movl $0x20, %esi
callq 0x3130
movq %rax, %r12
testq %r15, %r15
je 0x3b0b4
cmpb $0x0, (%r15)
je 0x3b0b7
incq %r15
imull (%r14), %r13d
movl %r13d, (%r14)
movq %r15, %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x3230
addl %eax, (%r14)
testl %eax, %eax
js 0x3b0e7
movq (%rsp), %r15
jmp 0x3b0b7
xorl %r15d, %r15d
testq %r12, %r12
je 0x3b0ee
incq %r12
movq %r12, %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x3230
movq %rax, %r13
testl %r13d, %r13d
js 0x3b0e7
imull %r13d, %ebx
cmpl $0xf4240, %ebx          # imm = 0xF4240
jle 0x3b050
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x3b0f3
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_O3/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 0x3b1c8
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 0x3b16e
movl %eax, %edx
movzbl (%r14,%rdx), %edx
leal -0x1(%r15), %ebx
decq %rax
addl $-0x20, %edx
cmpl $0x3b, %edx
ja 0x3b149
btq %rdx, %rsi
jae 0x3b149
jmp 0x3b170
movl %ecx, %ebx
movslq %ebx, %r13
leaq (%r14,%r13), %rdi
incq %rdi
xorl %esi, %esi
movl $0xa, %edx
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,%r12,4)
testl %r15d, %r15d
jle 0x3b1cf
testb %cl, %cl
jne 0x3b1cf
addq %r14, %r13
decq %r12
cmpb $0x5b, (%r13)
movabsq $0x800000000001001, %rsi # imm = 0x800000000001001
jne 0x3b13b
jmp 0x3b1d9
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x3b1d9
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_O3/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 0x3b268
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 0x3230
movq %rax, %rcx
leaq 0x1(%r12), %rax
movl %ecx, (%rbx,%r12,4)
movl %ebp, %ecx
movzbl (%r15), %edx
testl %edx, %edx
je 0x3b241
cmpl $0x2c, %edx
je 0x3b241
cmpl $0x5d, %edx
je 0x3b241
incl %ecx
incq %r15
jmp 0x3b228
cmpq $0xf, %r12
je 0x3b26e
xorl %ebp, %ebp
cmpb $0x2c, %dl
sete %bpl
addl %ecx, %ebp
movslq %ebp, %rcx
movzbl (%r14,%rcx), %ecx
cmpl $0x5d, %ecx
je 0x3b273
movq %rax, %r12
testl %ecx, %ecx
jne 0x3b205
jmp 0x3b273
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_O3/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 0x3b41c
movl 0x8(%rdi), %eax
cmpl 0x6108(%rbx), %eax
jb 0x3b41e
movq (%rdi), %r14
callq 0x3030
movq %r14, %rdi
testq %r14, %r14
jne 0x3b401
xorl %edi, %edi
movq %rdi, 0x88(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3b477
leaq 0x18(%rbx), %rbp
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3080
testl %eax, %eax
jne 0x3b472
cmpb $0x0, (%rbp,%r13)
je 0x3b4d4
movq (%rbx), %rbx
jmp 0x3b44f
testq %r13, %r13
je 0x3b4cd
cmpq $0x3, %r13
jne 0x3b4b4
cmpq $0x3, %r15
jne 0x3b4b4
cmpb $0x78, (%r12)
jne 0x3b4b4
cmpb $0x6d, 0x1(%r12)
jne 0x3b4b4
cmpb $0x6c, 0x2(%r12)
jne 0x3b4b4
movl $0x3, %edx
movq %r12, %rdi
movq (%rsp), %rsi
callq 0x3080
testl %eax, %eax
je 0x3b518
testb $0x40, 0x5(%r14)
jne 0x3b518
movl $0x5, 0x19214(%r14)
movl $0x5, %ebp
jmp 0x3b51a
movl $0x9, %ebp
jmp 0x3b51a
testb $0x40, 0x5(%r14)
jne 0x3b518
movswq 0xc(%rbx), %rax
movl $0x9, %ebp
testq %rax, %rax
js 0x3b51a
movq 0x80(%r14), %rcx
shlq $0x5, %rax
movq (%rcx,%rax), %r14
testq %r14, %r14
je 0x3b518
movq %r14, %rdi
movq (%rsp), %rsi
movq %r15, %rdx
callq 0x3080
testl %eax, %eax
jne 0x3b51a
cmpb $0x0, (%r14,%r15)
jne 0x3b51a
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_O3/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 0x3b5fc
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x78, (%rsi)
jne 0x3b55a
cmpb $0x6d, 0x1(%r14)
jne 0x3b55a
cmpb $0x6c, 0x2(%r14)
je 0x3b5fc
movq 0x88(%rbx), %r13
movq %r14, %rdi
movl $0x3a, %esi
callq 0x3130
testq %rax, %rax
je 0x3b5b0
testq %r13, %r13
je 0x3b5a4
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 0x3b59b
cmpb $0x0, (%r12,%r15)
je 0x3b5c9
movq (%r13), %r13
testq %r13, %r13
jne 0x3b57e
movl $0x9, 0x19214(%rbx)
jmp 0x3b5fc
testq %r13, %r13
je 0x3b5fc
xorl %eax, %eax
cmpb $0x0, 0x18(%r13)
je 0x3b5c9
movq (%r13), %r13
testq %r13, %r13
jne 0x3b5b7
jmp 0x3b5fe
movswq 0xc(%r13), %rax
testq %rax, %rax
js 0x3b5e2
movq 0x78(%rbx), %rcx
shlq $0x5, %rax
movq 0x8(%rcx,%rax), %rax
jmp 0x3b5fe
movq 0x10(%r13), %rsi
testq %rsi, %rsi
je 0x3b5fc
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3a6c4
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3b704
movq %rdx, %rbx
cmpb $0x0, (%rdx)
je 0x3b704
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 0x3b6ab
movq %rax, %r12
leaq 0x1(%rax), %rsi
testq %r13, %r13
je 0x3b6b8
cmpb $0x0, (%rsi)
je 0x3b684
leaq 0x1(%r13), %rdi
callq 0x3210
movl $0x3, %ebp
testl %eax, %eax
jne 0x3b704
subq %rbx, %r12
je 0x3b702
subq %r14, %r13
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %rcx
movq %r12, %r8
callq 0x3b42d
testl %eax, %eax
je 0x3b702
movl $0x3, %ebp
jmp 0x3b6e5
testq %r13, %r13
je 0x3b6ee
incq %r13
movq %r13, %rdi
jmp 0x3b6f1
movq %r14, %rdi
callq 0x3210
movl $0x3, %ebp
testl %eax, %eax
jne 0x3b704
subq %rbx, %r12
je 0x3b702
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
movq %r12, %r8
callq 0x3b42d
testl %eax, %eax
je 0x3b702
cmpl $0x9, %eax
je 0x3b704
movl %eax, %ebp
jmp 0x3b704
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3210
movl $0x3, %ebp
testl %eax, %eax
jne 0x3b704
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_O3/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 0x3b76e
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x17938(%rdi), %r14
movq %r14, %rsi
callq 0x3b608
testl %eax, %eax
je 0x3b76e
leaq 0x16afc(%rip), %rdx     # 0x5223e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3b608
testl %eax, %eax
je 0x3b76e
leaq 0x16af2(%rip), %rdx     # 0x5224a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3b608
movl %eax, %ecx
movl $0x3, %eax
testl %ecx, %ecx
jne 0x3b770
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3b9a1
movq (%rdi), %r14
callq 0x3030
movq %r14, %rdi
testq %r14, %r14
jne 0x3b991
movq $0x0, 0x88(%rbx)
cmpq $0x0, 0x90(%rbx)
je 0x3b9c2
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3aa8e
jmp 0x3b9ac
movq 0x18580(%rbx), %r14
testq %r14, %r14
je 0x3b9ef
movq (%r14), %r15
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x3b9df
callq 0x3030
movq %r14, %rdi
callq 0x3030
movq %r15, %r14
testq %r15, %r15
jne 0x3b9ce
movq $0x0, 0x18580(%rbx)
leaq 0x6120(%rbx), %r14
movq 0x6120(%rbx), %rdi
testq %rdi, %rdi
je 0x3ba12
callq 0x3030
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movq 0x80(%rbx), %r14
testq %r14, %r14
je 0x3ba96
cmpq $0x0, (%r14)
je 0x3ba83
movq 0x38(%rbx), %rax
addq $0x20, %r14
leaq 0x1671f(%rip), %r15     # 0x52161
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x3ba65
cmpq %rdi, %rax
jne 0x3ba54
movq %r15, 0x38(%rbx)
callq 0x3030
movq $0x0, -0x8(%r14)
movq 0x38(%rbx), %rax
cmpq -0x18(%r14), %rax
jne 0x3ba72
movq %r15, 0x38(%rbx)
movq %r15, %rax
cmpq $0x0, (%r14)
leaq 0x20(%r14), %r14
jne 0x3ba42
movq 0x80(%rbx), %r14
movq %r14, %rdi
callq 0x3030
movq $0x0, 0x80(%rbx)
movq 0x192b0(%rbx), %rdi
testq %rdi, %rdi
je 0x3bab9
movq (%rdi), %r14
callq 0x3030
movq %r14, 0x192b0(%rbx)
movq %r14, %rdi
testq %r14, %r14
jne 0x3baa2
movq 0x5f20(%rbx), %rdi
testq %rdi, %rdi
je 0x3bad5
movq (%rdi), %r14
callq 0x3030
movq %r14, %rdi
testq %r14, %r14
jne 0x3bac5
leaq 0x3f20(%rbx), %rdi
movl $0x200a, %edx           # imm = 0x200A
xorl %esi, %esi
callq 0x3180
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x40d79
// File: /workspace/github_c_makefile_star2_O3/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 0x3bb3c
movl $0xa0000001, %ecx       # imm = 0xA0000001
btl %eax, %ecx
jae 0x3bb3c
movq 0x5ff8(%rbx), %rax
testq %rax, %rax
je 0x3bb31
movq %rbx, %rdi
callq *%rax
movl %eax, 0x19214(%rbx)
testl %eax, %eax
jne 0x3bb50
movw $0x0, 0x191cc(%rbx)
jmp 0x3bb46
cmpw $0x0, 0x191cc(%rbx)
je 0x3bb16
movl %r14d, 0x19214(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3bb8d
movq 0x8(%r14), %rdi
cmpq %r15, %rdi
je 0x3bb89
movq %r15, %rsi
callq 0x3210
testl %eax, %eax
jne 0x3bb6c
movq 0x10(%r14), %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3bfa0
movq %rdx, %r14
movq %rbx, %rdi
callq 0x4afdf
testl %eax, %eax
je 0x3bf74
movl 0x19214(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
testq %r14, %r14
je 0x3bfa0
leaq 0x1699c(%rip), %rsi     # 0x5291c
movl $0x2, %edx
movq %rbx, %rdi
callq 0x379c8
testl %eax, %eax
jne 0x3bf66
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4afdf
testl %eax, %eax
jne 0x3bf66
leaq 0x1657b(%rip), %rsi     # 0x52522
movl $0x2, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x379c8
// File: /workspace/github_c_makefile_star2_O3/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 0x3d9ae
movq %rbx, %rdi
movl $0x7, %edx
xorl %ecx, %ecx
callq 0x3df48
testl %eax, %eax
jle 0x3da04
testb $0x4, %al
je 0x3d9cc
jmp 0x3da08
movl 0x60d0(%rbx), %esi
cmpl $-0x1, %esi
je 0x3da32
movq %rbx, %rdi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x3df48
testl %eax, %eax
jle 0x3da04
movl 0x60d4(%rbx), %edi
cmpl $-0x1, %edi
je 0x3da24
movl %eax, %ecx
andl $0x2, %ecx
je 0x3da24
xorl %ebp, %ebp
testb $0x1, %al
je 0x3da29
addq $0x16538, %rbx          # imm = 0x16538
movl $0x1, %edx
movq %rbx, %rsi
movl $0x2, %ecx
callq 0x3040
testq %rax, %rax
jg 0x3da29
jmp 0x3da24
testl %eax, %eax
jns 0x3da24
cmpl $-0x1, 0x60d0(%rbx)
jne 0x3da1a
cmpl $-0x1, 0x60d4(%rbx)
je 0x3da24
callq 0x3060
cmpl $0x4, (%rax)
jne 0x3da36
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x3da29
movq %rbx, %rdi
callq 0x3deb7
cmpw $0x2, 0x2(%rbx)
leaq 0x1573a(%rip), %rcx     # 0x53184
leaq 0x15723(%rip), %rsi     # 0x53174
cmoveq %rcx, %rsi
leaq 0x14948(%rip), %r8      # 0x523a4
movl $0x1c, %ebp
movq %rbx, %rdi
xorl %edx, %edx
movq %rax, %rcx
movl $0x1c, %r9d
callq 0x4a997
movl $0x1c, 0x19214(%rbx)
jmp 0x3da29
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: tcp_error
static const char*
tcp_error(struct soap *soap)
{ register const char *msg = NULL;
  switch (soap->errmode)
  { case 0:
      msg = soap_strerror(soap);
      break;
    case 1:
      msg = "WSAStartup failed";
      break;
    case 2:
    {
#ifndef WITH_LEAN
      msg = soap_code_str(h_error_codes, soap->errnum);
      if (!msg)
#endif
      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
        msg = soap->msgbuf;
      }
    }
  }
  return msg;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x19218(%rdi), %eax
cmpl $0x2, %eax
je 0x3dee1
cmpl $0x1, %eax
je 0x3ded8
testl %eax, %eax
jne 0x3def7
movq %rbx, %rdi
popq %rbx
jmp 0x4a45a
leaq 0x1587e(%rip), %rax     # 0x5375d
jmp 0x3df46
movslq 0x1921c(%rbx), %rdx
cmpq $0x1, %rdx
jne 0x3defb
leaq 0x33c2b(%rip), %rsi     # 0x71b20
jmp 0x3df22
xorl %eax, %eax
jmp 0x3df46
leaq 0x33c1e(%rip), %rcx     # 0x71b20
leaq 0x33c67(%rip), %rax     # 0x71b70
cmpq $0x0, 0x8(%rcx)
je 0x3df1f
leaq 0x10(%rcx), %rsi
cmpq %rdx, 0x10(%rcx)
movq %rsi, %rcx
jne 0x3df09
jmp 0x3df22
movq %rax, %rsi
movq 0x8(%rsi), %rax
testq %rax, %rax
jne 0x3df46
addq $0x16138, %rbx          # imm = 0x16138
leaq 0x15836(%rip), %rsi     # 0x5376f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3360
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_hash
SOAP_FMAC2
soap_hash(register const char *s)
{ register size_t h = 0;
  while (*s)
    h = 65599*h + *s++;
  return h % SOAP_IDHASH;
}

// Assembly:
movb (%rdi), %al
testb %al, %al
je 0x3e736
incq %rdi
xorl %ecx, %ecx
imulq $0x1003f, %rcx, %rdx    # imm = 0x1003F
movsbq %al, %rcx
addq %rdx, %rcx
movb (%rdi), %al
incq %rdi
testb %al, %al
jne 0x3e6f3
movabsq $0x6466f6a6bd4754f, %rdx # imm = 0x6466F6A6BD4754F
movq %rcx, %rax
mulq %rdx
movq %rcx, %rax
subq %rdx, %rax
shrq %rax
addq %rdx, %rax
shrq $0xa, %rax
imulq $0x7cf, %rax, %rax      # imm = 0x7CF
subq %rax, %rcx
jmp 0x3e738
xorl %ecx, %ecx
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r14
cmpw $0x2, 0x2(%rdi)
jne 0x3e7d5
movw $0x1, 0x18588(%r14)
testq %rdx, %rdx
je 0x3e83d
movq %rsp, %rax
movq %r14, %rdi
movl %r9d, %r8d
movq %rax, %r9
callq 0x3e889
movl %eax, %ebp
xorl %ebx, %ebx
testl %ebp, %ebp
je 0x3e87c
movq (%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3e93f
testl %eax, %eax
jne 0x3e87c
cmpw $0x3, 0x18590(%r14)
je 0x3e87c
testq %r15, %r15
je 0x3e87a
movl 0x4(%r14), %eax
movl %eax, %ecx
andl $0x8, %ecx
cmpl $0x1, %ecx
movq %r15, %rcx
adcq $0x20, %rcx
cmpb $0x0, (%rcx)
je 0x3e87c
testb $0x8, %al
jne 0x3e875
movb $0x1, 0x21(%r15)
jmp 0x3e87a
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x3e87c
movl %esi, %eax
andl $0x1ff8, %eax           # imm = 0x1FF8
movq 0x3f20(%r14,%rax), %rax
testq %rax, %rax
je 0x3e87c
cmpq %rsi, 0x8(%rax)
jne 0x3e864
cmpl %r9d, 0x18(%rax)
je 0x3e869
movq (%rax), %rax
jmp 0x3e853
movq %rax, (%rsp)
movl 0x1c(%rax), %ebp
jmp 0x3e7ed
movb $0x1, 0x20(%r15)
movl %ebp, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq