LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_print_fault_location
SOAP_FMAC2
soap_print_fault_location(struct soap *soap, FILE *fd)
{ 
#ifndef WITH_LEAN
  int i, j, c1, c2;
  if (soap->error && soap->error != SOAP_STOP && soap->bufidx <= soap->buflen && soap->buflen > 0 && soap->buflen <= SOAP_BUFLEN)
  { i = (int)soap->bufidx - 1;
    if (i <= 0)
      i = 0;
    c1 = soap->buf[i];
    soap->buf[i] = '\0';
    if ((int)soap->buflen >= i + 1024)
      j = i + 1023;
    else
      j = (int)soap->buflen - 1;
    c2 = soap->buf[j];
    soap->buf[j] = '\0';
    fprintf(fd, "%s%c\n<!-- ** HERE ** -->\n", soap->buf, c1);
    if (soap->bufidx < soap->buflen)
      fprintf(fd, "%s\n", soap->buf + soap->bufidx);
    soap->buf[i] = c1;
    soap->buf[j] = c2;
  }
#endif
}

// Assembly:
movl 0x19214(%rdi), %eax
testl %eax, %eax
je 0x4b523
cmpl $0x3e8, %eax            # imm = 0x3E8
je 0x4b523
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x60f0(%rdi), %rax
movq 0x60f8(%rdi), %rcx
cmpq %rcx, %rax
seta %dl
decq %rcx
cmpq $0x10000, %rcx          # imm = 0x10000
setae %cl
orb %dl, %cl
jne 0x4b515
movq %rsi, %rbx
leal -0x1(%rax), %ecx
xorl %edx, %edx
cmpl $0x2, %eax
cmovll %edx, %ecx
leaq 0x6138(%r14), %r15
movslq %ecx, %r12
movb 0x6138(%r14,%r12), %bpl
movb %dl, 0x6138(%r14,%r12)
movl 0x60f8(%r14), %eax
leal 0x400(%r12), %ecx
leal 0x3ff(%r12), %esi
leal -0x1(%rax), %edi
cmpl %eax, %ecx
cmovlel %esi, %edi
movsbl %bpl, %ecx
movslq %edi, %r13
movb 0x6138(%r14,%r13), %al
movb %al, 0x7(%rsp)
movb %dl, 0x6138(%r14,%r13)
leaq 0x7d62(%rip), %rsi      # 0x5323a
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3210
movq 0x60f0(%r14), %rdx
cmpq 0x60f8(%r14), %rdx
jae 0x4b509
addq %r15, %rdx
leaq 0x7ce2(%rip), %rsi      # 0x531e1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3210
movb %bpl, (%r15,%r12)
movb 0x7(%rsp), %al
movb %al, (%r15,%r13)
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_register_plugin_arg
SOAP_FMAC2
soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg)
{ register struct soap_plugin *p;
  register int r;
  if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin))))
    return soap->error = SOAP_EOM;
  p->id = NULL;
  p->data = NULL;
  p->fcopy = NULL;
  p->fdelete = NULL;
  r = fcreate(soap, p, arg);
  if (!r && p->fdelete)
  { p->next = soap->plugins;
    soap->plugins = p;
    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Registered '%s' plugin\n", p->id));
    return SOAP_OK;
  }
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not register plugin '%s': plugin returned error %d (or fdelete callback not set)\n", p->id?p->id:"?", r));
  SOAP_FREE(soap, p);
  return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movl $0x28, %edi
callq 0x3280
testq %rax, %rax
je 0x4b56e
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x8(%rax)
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq *%r15
movl %eax, %ebp
testl %eax, %eax
je 0x4b57f
movq %r14, %rdi
callq 0x3030
jmp 0x4b599
movl $0x14, 0x19214(%rbx)
movl $0x14, %ebp
jmp 0x4b599
cmpq $0x0, 0x20(%r14)
je 0x4b564
movq 0x5f50(%rbx), %rax
movq %rax, (%r14)
movq %r14, 0x5f50(%rbx)
xorl %ebp, %ebp
movl %ebp, %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_get_http_body
static char*
soap_get_http_body(struct soap *soap)
{
#ifndef WITH_LEAN
  register size_t l = 0, n = 0;
  register char *s;
  /* get HTML body of HTTP error content */
  if (!(soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) != SOAP_IO_CHUNK)
  { n = soap->length;
    if (!n)
      return NULL;
  }
#ifdef WITH_FAST
  soap->labidx = 0;			/* use look-aside buffer */
#else
  if (soap_new_block(soap) == NULL)
    return NULL;
#endif
  for (;;)
  { 
#ifdef WITH_FAST
    register size_t i, k;
    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
      return NULL;
    s = soap->labbuf + soap->labidx;	/* space to populate */
    k = soap->lablen - soap->labidx;	/* number of bytes available */
    soap->labidx = soap->lablen;	/* claim this space */
#else
    register size_t i, k = SOAP_BLKLEN;
    if (!(s = (char*)soap_push_block(soap, NULL, k)))
      return NULL;
#endif
    for (i = 0; i < k; i++)
    { register soap_wchar c = soap_getchar(soap);
      if ((int)c == EOF)
        goto end;
      *s++ = (char)(c & 0xFF);
      l++;
      if (n > 0 && l >= n)
        goto end;
    }
  }
end:
  *s = '\0';
#ifdef WITH_FAST
  s = soap_strdup(soap, soap->labbuf);
#else
  soap_size_block(soap, NULL, i+1);
  s = soap_save_block(soap, NULL, 0);
#endif
  return s;
#else
  return NULL;
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %eax
movl %eax, %ecx
shrl $0xa, %ecx
andl $0x1, %ecx
notl %eax
testb $0x3, %al
sete %al
xorl %r14d, %r14d
orb %cl, %al
je 0x4b5d9
xorl %r15d, %r15d
jmp 0x4b5e9
movq 0x6118(%rbx), %r15
testq %r15, %r15
je 0x4b698
movq $0x0, 0x6130(%rbx)
decq %r15
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x38fa7
movl $0x1, %ecx
testl %eax, %eax
jne 0x4b66d
movq 0x6128(%rbx), %rbp
movq 0x6130(%rbx), %rax
movq 0x6120(%rbx), %r12
addq %rax, %r12
movq %rbp, 0x6130(%rbx)
subq %rax, %rbp
je 0x4b66b
movq %rbx, %rdi
callq 0x37f8a
cmpl $-0x1, %eax
je 0x4b65b
movb %al, (%r12)
incq %r12
incq %r13
cmpq %r13, %r15
setae %al
movl $0x7, %ecx
cmovael %r14d, %ecx
jmp 0x4b662
movl $0x7, %ecx
xorl %eax, %eax
testb %al, %al
je 0x4b66d
decq %rbp
jne 0x4b633
xorl %ecx, %ecx
testl %ecx, %ecx
je 0x4b5fa
cmpl $0x7, %ecx
jne 0x4b698
movb $0x0, (%r12)
movq 0x6120(%rbx), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3a567
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: http_send_header
static int
http_send_header(struct soap *soap, const char *s)
{ register const char *t;
  do
  { t = strchr(s, '\n'); /* disallow \n in HTTP headers */
    if (!t)
      t = s + strlen(s);
    if (soap_send_raw(soap, s, t - s))
      return soap->error;
    s = t + 1;
  } while (*t);
  return SOAP_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %r14, %rdi
movl $0xa, %esi
callq 0x3130
movq %rax, %r15
testq %rax, %rax
jne 0x4b6d7
movq %r14, %rdi
callq 0x3110
movq %rax, %r15
addq %r14, %r15
movq %r15, %rdx
subq %r14, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x376e8
testl %eax, %eax
jne 0x4b6fa
leaq 0x1(%r15), %r14
cmpb $0x0, (%r15)
jne 0x4b6b4
xorl %eax, %eax
jmp 0x4b700
movl 0x19214(%rbx), %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/md5.c
// Function: MD5Update
void MD5Update(MD5_CTX *context,unsigned char *input,unsigned int inputlen)
{
    unsigned int i = 0,index = 0,partlen = 0;
    index = (context->count[0] >> 3) & 0x3F;
    partlen = 64 - index;
    context->count[0] += inputlen << 3;
    if(context->count[0] < (inputlen << 3))
        context->count[1]++;
    context->count[1] += inputlen >> 29;

    if(inputlen >= partlen)
    {
        memcpy(&context->buffer[index],input,partlen);
        MD5Transform(context->state,context->buffer);
        for(i = partlen;i+64 <= inputlen;i+=64)
            MD5Transform(context->state,&input[i]);
        index = 0;
    }
    else
    {
        i = 0;
    }
    memcpy(&context->buffer[index],&input[i],inputlen-i);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl (%rdi), %eax
movl %eax, %r13d
shrl $0x3, %r13d
andl $0x3f, %r13d
movl $0x40, %ebp
subl %r13d, %ebp
leal (,%rbx,8), %ecx
addl %eax, %ecx
movl %ecx, (%rdi)
jae 0x4b75a
incl 0x4(%r15)
movl %ebx, %eax
shrl $0x1d, %eax
addl %eax, 0x4(%r15)
cmpl %ebx, %ebp
jbe 0x4b76e
movl %r13d, %eax
xorl %ebp, %ebp
jmp 0x4b7c3
leaq 0x18(%r15), %rax
movq %rax, (%rsp)
leaq (%r15,%r13), %rdi
addq $0x18, %rdi
movl %ebp, %edx
movq %r14, %rsi
callq 0x3230
leaq 0x8(%r15), %r12
movq %r12, %rdi
movq (%rsp), %rsi
callq 0x4b7eb
movl $0x80, %eax
subl %r13d, %eax
cmpl %ebx, %eax
ja 0x4b7c1
movl %ebp, %r13d
movl %ebp, %esi
addq %r14, %rsi
movq %r12, %rdi
callq 0x4b7eb
leal 0x40(%r13), %ebp
subl $-0x80, %r13d
cmpl %ebx, %r13d
jbe 0x4b7a4
xorl %eax, %eax
leaq (%r15,%rax), %rdi
addq $0x18, %rdi
movl %ebp, %eax
addq %rax, %r14
subl %ebp, %ebx
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3230
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/md5.c
// Function: MD5Final
void MD5Final(MD5_CTX *context,unsigned char digest[16])
{
    unsigned int index = 0,padlen = 0;
    unsigned char bits[8];
    index = (context->count[0] >> 3) & 0x3F;
    padlen = (index < 56)?(56-index):(120-index);
    MD5Encode(bits,context->count,8);
    MD5Update(context,PADDING,padlen);
    MD5Update(context,bits,8);
    MD5Encode(digest,context->state,16);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %eax
shrl $0x3, %eax
andl $0x3f, %eax
xorl %edx, %edx
cmpl $0x38, %eax
setae %dl
shll $0x6, %edx
orl $0x38, %edx
xorl %ecx, %ecx
movl (%r14,%rcx,4), %esi
movl %esi, (%rsp,%rcx,4)
incq %rcx
cmpq $0x2, %rcx
jne 0x4bfbc
subl %eax, %edx
leaq 0x2624b(%rip), %rsi     # 0x72220
movq %r14, %rdi
callq 0x4b721
movq %rsp, %rsi
movq %r14, %rdi
movl $0x8, %edx
callq 0x4b721
xorl %eax, %eax
movb 0x8(%r14,%rax,4), %cl
movb %cl, (%rbx,%rax,4)
movb 0x9(%r14,%rax,4), %cl
movb %cl, 0x1(%rbx,%rax,4)
movb 0xa(%r14,%rax,4), %cl
movb %cl, 0x2(%rbx,%rax,4)
movb 0xb(%r14,%rax,4), %cl
movb %cl, 0x3(%rbx,%rax,4)
incq %rax
cmpq $0x4, %rax
jne 0x4bfef
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/md5.c
// Function: MD5Encode
void MD5Encode(unsigned char *output,unsigned int *input,unsigned int len)
{
    unsigned int i = 0,j = 0;
    while(j < len)
    {
            output[j] = input[i] & 0xFF;
            output[j+1] = (input[i] >> 8) & 0xFF;
            output[j+2] = (input[i] >> 16) & 0xFF;
            output[j+3] = (input[i] >> 24) & 0xFF;
            i++;
            j+=4;
        }
}

// Assembly:
testl %edx, %edx
je 0x4c056
decl %edx
shrl $0x2, %edx
incl %edx
xorl %eax, %eax
movb (%rsi,%rax,4), %cl
movb %cl, (%rdi,%rax,4)
movb 0x1(%rsi,%rax,4), %cl
movb %cl, 0x1(%rdi,%rax,4)
movb 0x2(%rsi,%rax,4), %cl
movb %cl, 0x2(%rdi,%rax,4)
movb 0x3(%rsi,%rax,4), %cl
movb %cl, 0x3(%rdi,%rax,4)
incq %rax
cmpq %rax, %rdx
jne 0x4c030
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/md5.c
// Function: MD5Decode
void MD5Decode(unsigned int *output,unsigned char *input,unsigned int len)
{
    unsigned int i = 0,j = 0;
    while(j < len)
    {
            output[i] = (input[j]) |
                (input[j+1] << 8) |
                (input[j+2] << 16) |
                (input[j+3] << 24);
            i++;
            j+=4;
        }
}

// Assembly:
testl %edx, %edx
je 0x4c072
decl %edx
shrl $0x2, %edx
incl %edx
xorl %eax, %eax
movl (%rsi,%rax,4), %ecx
movl %ecx, (%rdi,%rax,4)
incq %rax
cmpq %rax, %rdx
jne 0x4c064
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/md5.c
// Function: MD_5
char *MD_5(unsigned char *input)
{                   
    MD5_CTX md5;    
    MD5Init(&md5);  
    int i;          
    unsigned char decrypt[16];
    MD5Update(&md5,input,strlen((char *)input));
    MD5Final(&md5,decrypt);
    char buf[40] = {0};
    for (i = 0; i < 16; i++)
    {               
        snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%02x", decrypt[i]);
    }               
    return strdup(buf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
movaps 0x7d17(%rip), %xmm0     # 0x53da0
leaq 0x38(%rsp), %r14
movups %xmm0, (%r14)
movabsq $0x1032547698badcfe, %rax # imm = 0x1032547698BADCFE
movq %rax, 0x10(%r14)
callq 0x3110
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x4b721
movq %rsp, %rsi
movq %r14, %rdi
callq 0x4bf9a
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movq $0x0, 0x20(%rbx)
leaq 0x7cd5(%rip), %r14      # 0x53db0
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x3110
leaq (%rsp,%rax), %rdi
addq $0x10, %rdi
movl $0x28, %esi
subq %rax, %rsi
movzbl (%rsp,%r15), %ecx
movq %r14, %rdx
xorl %eax, %eax
callq 0x3150
incq %r15
cmpq $0x10, %r15
jne 0x4c0de
leaq 0x10(%rsp), %rdi
callq 0x3380
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_client.c
// Function: monitorTaskAll
int monitorTaskAll()
{
	/* a function need to build calls */
	printf("nonitorajdfkl ajsdlk fjadsf \n");
    SGCRMTask *crm_task = NULL;
    crm_task = initSGCRMTask(crm_task);
    crm_task->search_string = strdup("(586) 4-4536");
    addSGCRMTask(crm_task);
}

// Assembly:
pushq %rbx
leaq 0x7cc7(%rip), %rdi      # 0x53e29
callq 0x30a0
xorl %edi, %edi
callq 0x4c76e
movq %rax, %rbx
leaq 0x7c4a(%rip), %rdi      # 0x53dc2
callq 0x3380
movq %rax, (%rbx)
leaq 0x261a1(%rip), %rdi     # 0x72328
movq %rbx, %rsi
callq 0x4c564
leaq 0x7c1f(%rip), %rdi      # 0x53db5
movl %eax, %esi
xorl %eax, %eax
popq %rbx
jmp 0x3140
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_client.c
// Function: executeRequest
int executeRequest(SGCRMInfoTask *info_task, SGCRMTask *crm_task)
{
	
	if (crm_task->search_result == NULL)
	{
		crm_task->search_result = initSGSearchResult(crm_task->search_result);
	}
	int res = searchAccounts(info_task->server_info, info_task->login_return->session_id, crm_task->search_string, crm_task->search_result);
	if (res == SOAP_OK)
	{
		if (crm_task->search_result->id == NULL)
		{
			printf("Not search ,continue need add\n");
			/* choose added to Account,Contacts,Leads */
			//continue;
		}
		printf("id = %s\nmodule = %s\n", crm_task->search_result->id, crm_task->search_result->module);
	}
	/*
    execute();
    search();
    cdr();
    addCall();
    callLinkUser();
    callLinkContact();*/
    return res;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x10(%rsi)
jne 0x4c1bc
xorl %edi, %edi
callq 0x4c918
movq %rax, 0x10(%rbx)
movq (%r14), %rax
movq 0x8(%r14), %rdi
movq (%rax), %rsi
movq (%rbx), %rdx
movq 0x10(%rbx), %rcx
callq 0x4f6d7
movl %eax, %ebp
testl %eax, %eax
jne 0x4c207
movq 0x10(%rbx), %rax
cmpq $0x0, (%rax)
jne 0x4c1ee
leaq 0x7c5d(%rip), %rdi      # 0x53e46
callq 0x30a0
movq 0x10(%rbx), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x7bcf(%rip), %rdi      # 0x53dcf
xorl %eax, %eax
callq 0x3140
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_client.c
// Function: crmClientStart
void crmClientStart()
{
    g_crm_task = 1;
    pthread_t crm_client_phread;
    pthread_attr_t crm_request_attr;
    pthread_attr_init(&crm_request_attr);
    pthread_attr_setstacksize((&crm_request_attr), CRM_STACK_SIZE);
    pthread_attr_setdetachstate((&crm_request_attr), PTHREAD_CREATE_DETACHED); //PTHREAD_CREATE_DETACHED
    //connectConfigDB(DB_CONF_CCRM);
    //connectConfigDB(DB_CDR_CCRM);
    //connectConfigDB(DB_STATUS_CCRM);
    pthread_create(&crm_client_phread, &crm_request_attr, (void *)crmClient, NULL);

}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movl $0x1, 0x25fb9(%rip)     # 0x72390
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x31d0
movl $0x100000, %esi         # imm = 0x100000
movq %rbx, %rdi
callq 0x3400
movq %rbx, %rdi
movl $0x1, %esi
callq 0x3260
leaq -0x1f7(%rip), %rdx      # 0x4c20e
movq %rsp, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x32e0
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: leave_number
char *leave_number(char *dest, char *src)
{
    if(src == NULL){
        return NULL;
    }
    char *p = dest;
    while(*src) {
        if (*src > '9' || *src <  '0') {
            src++;
        } else {
            *dest = *src;
            dest++;
            src++;
        }
    }
    *dest = '\0';
    return p;
}

// Assembly:
testq %rsi, %rsi
je 0x4c45e
movq %rdi, %rax
movb (%rsi), %dl
movq %rdi, %rcx
testb %dl, %dl
je 0x4c45a
incq %rsi
movq %rax, %rcx
leal -0x3a(%rdx), %edi
cmpb $-0xa, %dil
jb 0x4c451
movb %dl, (%rcx)
incq %rcx
movb (%rsi), %dl
incq %rsi
testb %dl, %dl
jne 0x4c443
movb $0x0, (%rcx)
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: addPercent
char *addPercent(char *dest, char *src)
{
    if (src == NULL) {
        return NULL;
    }
    char *p = dest;
    while(*src) {
        *dest++ = '%';
        *dest++ = *src++;
    }
    *dest = '\0';
    return p;
}

// Assembly:
testq %rsi, %rsi
je 0x4c491
movq %rdi, %rax
cmpb $0x0, (%rsi)
movq %rdi, %rcx
je 0x4c48d
incq %rsi
movq %rax, %rcx
movb $0x25, (%rcx)
movb -0x1(%rsi), %dl
movb %dl, 0x1(%rcx)
addq $0x2, %rcx
cmpb $0x0, (%rsi)
leaq 0x1(%rsi), %rsi
jne 0x4c477
movb $0x0, (%rcx)
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: queueInitialize
void queueInitialize(Queue *queue)
{
    QueueNode *q_head_node = malloc(sizeof(QueueNode));
    if (q_head_node)
    {
        q_head_node->value = NULL;
        q_head_node->next = NULL;
    }

    queue->head = queue->end = q_head_node;
    queue->not_empty = 0;

    pthread_mutex_init(&queue->q_h_lock, NULL);
    pthread_mutex_init(&queue->q_t_lock, NULL);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x10, %edi
callq 0x3280
testq %rax, %rax
je 0x4c4ad
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rax, 0x8(%rbx)
movq %rax, (%rbx)
movl $0x0, 0x60(%rbx)
leaq 0x10(%rbx), %rdi
xorl %esi, %esi
callq 0x33b0
addq $0x38, %rbx
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x33b0
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: cleanQueue
void cleanQueue(Queue *queue)
{
    QueueNode *free_q_head_node = NULL;

    if (queue)
    {
        while(queue->head != NULL)
        {
            free_q_head_node = queue->head->next;
            if (queue->head->value != NULL)
            {
                cleanSGCRMTask(queue->head->value);
                queue->head->value = NULL;
            }

            free(queue->head);
            queue->head = free_q_head_node;
        }
    }
}

// Assembly:
testq %rdi, %rdi
je 0x4c518
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x4c511
movq (%r14), %rdi
movq 0x8(%r14), %r14
testq %rdi, %rdi
je 0x4c504
callq 0x4c519
movq (%rbx), %rax
movq $0x0, (%rax)
movq (%rbx), %rdi
callq 0x3030
movq %r14, (%rbx)
jmp 0x4c4e4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: cleanSGCRMTask
void cleanSGCRMTask(struct __sg_crm_task *crm_task)
{
    if (crm_task)
    {
        cleanSGSearchResult(crm_task->search_result);
        cleanSGCallItem(crm_task->call_item);
        cleanSGLinkReturn(crm_task->link_return);
    }
    SAFE_FREE(crm_task);
}

// Assembly:
testq %rdi, %rdi
je 0x4c563
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x4c78a
movq 0x18(%rbx), %rdi
callq 0x4c811
movq 0x20(%rbx), %r14
leaq 0x7d18(%rip), %rdi      # 0x5425a
callq 0x30a0
testq %r14, %r14
je 0x4c554
movq %r14, %rdi
callq 0x3030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3030
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: enqueueTask
ENQUEUE_RESULT enqueueTask(Queue *q, SGCRMTask *task)
{
    QueueNode* node = malloc(sizeof(QueueNode));
    if (node != NULL)
    {
        node->value = task;
        node->next = NULL;
    }

    pthread_mutex_lock(&q->q_t_lock);
    if (q->end != NULL)
    {
        q->end->next = node;
        q->end = node;
    }
    else
    {
        q->not_empty = 0;
        pthread_mutex_unlock(&q->q_t_lock);
        return ENQUEUE_FAILED_USER_DELETE;
    }
    q->not_empty = 1;
    pthread_mutex_unlock(&q->q_t_lock);

    return ENQUEUE_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0x10, %edi
callq 0x3280
movq %rax, %r15
testq %rax, %rax
je 0x4c58e
movq %r14, (%r15)
movq $0x0, 0x8(%r15)
leaq 0x38(%rbx), %r14
movq %r14, %rdi
callq 0x33d0
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x4c5b4
movq %r15, 0x8(%rax)
movq %r15, 0x8(%rbx)
xorl %ebp, %ebp
movl $0x1, %eax
jmp 0x4c5bb
movl $0x1, %ebp
xorl %eax, %eax
movl %eax, 0x60(%rbx)
movq %r14, %rdi
callq 0x3270
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: dequeueTask
DEQUEUE_RESULT dequeueTask(Queue *q, SGCRMTask **pvalue)
{
    DEQUEUE_RESULT ret;
    QueueNode *next_node = NULL;

    pthread_mutex_lock(&q->q_h_lock);
    if (0 == q->not_empty)
    {
        pthread_mutex_unlock(&q->q_h_lock);
        return DEQUEUE_FAILED_EMPTY;
    }

    if(q->head != NULL)
    {
        next_node = q->head->next ;
    }

    if (next_node != NULL)
    {
        if (next_node == q->end)
        {
            pthread_mutex_lock(&q->q_t_lock);
            q->end = q->head;
            *pvalue = next_node->value;

            q->not_empty = 0;
			q->head->next = NULL;
            ret = DEQUEUE_SUCCESS_AND_EMPTY;
            pthread_mutex_unlock(&q->q_t_lock);
        }
        else
        {
            *pvalue = next_node->value;
            q->head->next = next_node->next ;
            ret = DEQUEUE_SUCCESS_AND_CONTINUE;
        }

        pthread_mutex_unlock(&q->q_h_lock);
        free(next_node);
    }
    else
    {
        pthread_mutex_unlock(&q->q_h_lock);
        ret = DEQUEUE_FAILED_EMPTY;
    }

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %r15
leaq 0x10(%rdi), %rbx
movq %rbx, %rdi
callq 0x33d0
cmpl $0x0, 0x60(%r15)
je 0x4c629
movq (%r15), %rax
testq %rax, %rax
je 0x4c605
movq 0x8(%rax), %r14
jmp 0x4c608
xorl %r14d, %r14d
testq %r14, %r14
je 0x4c629
cmpq 0x8(%r15), %r14
je 0x4c638
movq (%r14), %rax
movq %rax, (%r12)
movq 0x8(%r14), %rax
movq (%r15), %rcx
movq %rax, 0x8(%rcx)
xorl %ebp, %ebp
jmp 0x4c672
movq %rbx, %rdi
callq 0x3270
movl $0x2, %ebp
jmp 0x4c682
leaq 0x38(%r15), %r13
movq %r13, %rdi
callq 0x33d0
movq (%r15), %rax
movq %rax, 0x8(%r15)
movq (%r14), %rax
movq %rax, (%r12)
movl $0x0, 0x60(%r15)
movq (%r15), %rax
movq $0x0, 0x8(%rax)
movq %r13, %rdi
callq 0x3270
movl $0x1, %ebp
movq %rbx, %rdi
callq 0x3270
movq %r14, %rdi
callq 0x3030
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_function.c
// Function: initSGCRMInfoTask
struct __sg_crm_info_task *initSGCRMInfoTask(struct __sg_crm_info_task *crm_info_task)
{
    crm_info_task = (struct __sg_crm_info_task *)malloc(sizeof(struct __sg_crm_info_task));
    crm_info_task->login_return = initSGLoginReturn(crm_info_task->login_return);
    crm_info_task->server_info = initSGServerInfo(crm_info_task->server_info);
    return crm_info_task;
}

// Assembly:
pushq %rbx
movl $0x10, %edi
callq 0x3280
movq %rax, %rbx
movl $0x10, %edi
callq 0x3280
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rax, (%rbx)
movl $0x10, %edi
callq 0x3280
movq %rax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: cleanSGCRMInfoTask
void cleanSGCRMInfoTask(struct __sg_crm_info_task *crm_info_task)
{
    if (crm_info_task)
    {
        cleanSGLoginReturn(crm_info_task->login_return);
        cleanSGServerInfo(crm_info_task->server_info);
    }
    SAFE_FREE(crm_info_task);
}

// Assembly:
testq %rdi, %rdi
je 0x4c707
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x4c708
movq 0x8(%rbx), %rdi
callq 0x4c745
movq %rbx, %rdi
popq %rbx
jmp 0x3030
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: cleanSGLoginReturn
void cleanSGLoginReturn(struct __sg_login_return *login_return)
{
    if (login_return) {
        SAFE_FREE(login_return->session_id);
        SAFE_FREE(login_return->user_id);
    }
    SAFE_FREE(login_return);
}

// Assembly:
testq %rdi, %rdi
je 0x4c744
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x4c725
callq 0x3030
movq $0x0, (%rbx)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4c73b
callq 0x3030
movq $0x0, 0x8(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x3030
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: cleanSGSearchResult
void cleanSGSearchResult(struct __sg_search_result *search_result)
{
    printf("cleanSearchResult\n");
    if (search_result) {
		printf("youyou\n");
		if (search_result->id)
			printf("asdjfsadfasd\n");
		else
			printf("no nulllllll]n\n");
        SAFE_FREE(search_result->id);
        SAFE_FREE(search_result->module);
		printf("ono\n");
    }
    SAFE_FREE(search_result);
	printf("cleanSearchResult end\n");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x7a68(%rip), %rdi      # 0x541fd
callq 0x30a0
testq %rbx, %rbx
je 0x4c804
leaq 0x7a69(%rip), %rdi      # 0x5420f
callq 0x30a0
cmpq $0x0, (%rbx)
leaq 0x7a60(%rip), %rax      # 0x54216
leaq 0x7a68(%rip), %rdi      # 0x54225
cmoveq %rax, %rdi
callq 0x30a0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4c7da
callq 0x3030
movq $0x0, (%rbx)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4c7f0
callq 0x3030
movq $0x0, 0x8(%rbx)
leaq 0x7a3b(%rip), %rdi      # 0x54232
callq 0x30a0
movq %rbx, %rdi
callq 0x3030
leaq 0x7a2b(%rip), %rdi      # 0x54236
popq %rbx
jmp 0x30a0
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: cleanSGCallItem
void cleanSGCallItem(struct __sg_call_item* call_item)
{
    if (call_item) {
		printf("cleanCallItem\n");
        SAFE_FREE(call_item->name);
        SAFE_FREE(call_item->parent_type);
        SAFE_FREE(call_item->parent_id);
        SAFE_FREE(call_item->direction);
        SAFE_FREE(call_item->description);
        SAFE_FREE(call_item->duration_hours);
        SAFE_FREE(call_item->duration_minutes);
        SAFE_FREE(call_item->date_start);
        SAFE_FREE(call_item->assigned_user_id);
    }
    SAFE_FREE(call_item);
}

// Assembly:
testq %rdi, %rdi
je 0x4c8f7
pushq %rbx
movq %rdi, %rbx
leaq 0x7a27(%rip), %rdi      # 0x5424c
callq 0x30a0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4c83e
callq 0x3030
movq $0x0, (%rbx)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4c854
callq 0x3030
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4c86a
callq 0x3030
movq $0x0, 0x10(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x4c880
callq 0x3030
movq $0x0, 0x18(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x4c896
callq 0x3030
movq $0x0, 0x20(%rbx)
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x4c8ac
callq 0x3030
movq $0x0, 0x30(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x4c8c2
callq 0x3030
movq $0x0, 0x28(%rbx)
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x4c8d8
callq 0x3030
movq $0x0, 0x38(%rbx)
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x4c8ee
callq 0x3030
movq $0x0, 0x40(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x3030
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: cleanSGContactItem
void cleanSGContactItem(struct __sg_contact_item *contact_item)
{
    if (contact_item) {
        SAFE_FREE(contact_item->title);
        SAFE_FREE(contact_item->first_name);
        SAFE_FREE(contact_item->last_name);
        SAFE_FREE(contact_item->phone_home);
        SAFE_FREE(contact_item->phone_work);
        SAFE_FREE(contact_item->phone_mobile);
        SAFE_FREE(contact_item->phone_other);
        SAFE_FREE(contact_item->phone_fax);
		SAFE_FREE(contact_item->description);
    }
    SAFE_FREE(contact_item);
}

// Assembly:
testq %rdi, %rdi
je 0x4ca2e
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x4c975
callq 0x3030
movq $0x0, (%rbx)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4c98b
callq 0x3030
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4c9a1
callq 0x3030
movq $0x0, 0x10(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x4c9b7
callq 0x3030
movq $0x0, 0x18(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x4c9cd
callq 0x3030
movq $0x0, 0x28(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x4c9e3
callq 0x3030
movq $0x0, 0x20(%rbx)
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x4c9f9
callq 0x3030
movq $0x0, 0x30(%rbx)
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x4ca0f
callq 0x3030
movq $0x0, 0x38(%rbx)
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x4ca25
callq 0x3030
movq $0x0, 0x40(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x3030
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: cleanSGAccountItem
void cleanSGAccountItem(struct __sg_account_item *account_item)
{
	if (account_item) {
        SAFE_FREE(account_item->name);
        SAFE_FREE(account_item->phone_office);
        SAFE_FREE(account_item->phone_alternate);
        SAFE_FREE(account_item->phone_fax);
		SAFE_FREE(account_item->description);
    }
    SAFE_FREE(account_item);
}

// Assembly:
testq %rdi, %rdi
je 0x4cacc
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x4ca6b
callq 0x3030
movq $0x0, (%rbx)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4ca81
callq 0x3030
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4ca97
callq 0x3030
movq $0x0, 0x10(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x4caad
callq 0x3030
movq $0x0, 0x18(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x4cac3
callq 0x3030
movq $0x0, 0x20(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x3030
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: cleanSGLeadItem
void cleanSGLeadItem(struct __sg_lead_item *lead_item)
{
	if (lead_item) {
        SAFE_FREE(lead_item->title);
        SAFE_FREE(lead_item->first_name);
        SAFE_FREE(lead_item->last_name);
        SAFE_FREE(lead_item->phone_home);
        SAFE_FREE(lead_item->phone_work);
        SAFE_FREE(lead_item->phone_mobile);
        SAFE_FREE(lead_item->phone_other);
        SAFE_FREE(lead_item->phone_fax);
		SAFE_FREE(lead_item->description);
    }
    SAFE_FREE(lead_item);
}

// Assembly:
testq %rdi, %rdi
je 0x4cbce
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x4cb15
callq 0x3030
movq $0x0, (%rbx)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4cb2b
callq 0x3030
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4cb41
callq 0x3030
movq $0x0, 0x10(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x4cb57
callq 0x3030
movq $0x0, 0x18(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x4cb6d
callq 0x3030
movq $0x0, 0x28(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x4cb83
callq 0x3030
movq $0x0, 0x20(%rbx)
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x4cb99
callq 0x3030
movq $0x0, 0x30(%rbx)
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x4cbaf
callq 0x3030
movq $0x0, 0x38(%rbx)
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x4cbc5
callq 0x3030
movq $0x0, 0x40(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x3030
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: initSGCallsItem
struct __sg_calls_item *initSGCallsItem(struct __sg_calls_item *calls_item)
{
	calls_item = (struct __sg_calls_item *)malloc(sizeof(struct __sg_calls_item));
	calls_item->call_id = NULL;
	calls_item->call_item = initSGCallItem(calls_item->call_item);
	calls_item->next = NULL;
	return calls_item;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x18, %edi
callq 0x3280
movq %rax, %rbx
xorl %r14d, %r14d
movq %r14, (%rax)
movl $0x48, %edi
callq 0x3280
movq %rax, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: sugarLogin
int sugarLogin(struct soap *soap, const char *soap_endpoint, char *login_name, char *login_pwd, struct ns1__loginResponse *_param_1)
{
    char soap_action[128] = {0};

    memset(soap_action, 0, sizeof(soap_action));
    snprintf(soap_action, sizeof(soap_action), "%s/login", soap_endpoint);
    struct ns1__user_USCOREauth *user_auth = NULL;
    struct name_USCOREvalue_USCORElist *name_value_list = NULL;
    user_auth = (struct ns1__user_USCOREauth*)malloc(sizeof(struct ns1__user_USCOREauth));
    
    char *username = (char*)malloc(256);
    char *password = (char*)malloc(512);
    
    snprintf(username, 256, "%s", login_name);
    char *md_res = MD_5(login_pwd);
    snprintf(password, 512, "%s", md_res);
    //printf("%s\n", password);
    if (md_res) {
        free(md_res);
        md_res = NULL;
    }

    user_auth->user_USCOREname = username;
    user_auth->password = password;
    char *application_name = "UCM6XXX";
    
    int ret = soap_call_ns1__login(soap, soap_endpoint, soap_action, user_auth, application_name, name_value_list, _param_1);

    //SAFE_FREE(username);
    //SAFE_FREE(password);
	if (user_auth)
	{
		SAFE_FREE(user_auth->user_USCOREname);
		SAFE_FREE(user_auth->password);
		free(user_auth);
	}
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r8, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, 0x18(%rsp)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rdi
movaps %xmm0, 0x70(%rdi)
movaps %xmm0, 0x60(%rdi)
movaps %xmm0, 0x50(%rdi)
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
leaq 0x721e(%rip), %rdx      # 0x53fb1
movl $0x80, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x3150
movl $0x10, %edi
callq 0x3280
movq %rax, %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x3280
movq %rax, %r15
movl $0x200, %edi            # imm = 0x200
callq 0x3280
movq %rax, %r12
leaq 0x6398(%rip), %rbp      # 0x53168
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
movq %rbp, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x3150
movq 0x8(%rsp), %rdi
callq 0x4c073
movq %rax, %r13
movl $0x200, %esi            # imm = 0x200
movq %r12, %rdi
movq %rbp, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x3150
testq %r13, %r13
je 0x4ce14
movq %r13, %rdi
callq 0x3030
movq %r15, (%rbx)
movq %r12, 0x8(%rbx)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0x718f(%rip), %r8       # 0x53fba
leaq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rcx
xorl %r9d, %r9d
callq 0x336cc
movl %eax, %ebp
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4ce59
callq 0x3030
movq $0x0, (%rbx)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4ce6f
callq 0x3030
movq $0x0, 0x8(%rbx)
movq %rbx, %rdi
callq 0x3030
movl %ebp, %eax
addq $0xa8, %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_function.c
// Function: SGCRMLogin
int SGCRMLogin(SGServerInfo *server_info, char *username, char *password, SGLoginReturn *login_return)
{
    int ret = -1;
    struct ns1__loginResponse *_param_1;
    _param_1 = (struct ns1__loginResponse*)soap_malloc(server_info->soap, sizeof(struct ns1__entry_USCOREvalue));
    ret = sugarLogin(server_info->soap, server_info->soap_endpoint, username, password, _param_1);
    if (ret == SOAP_OK) {
        printf("CRMLogin Success!\n");
        if (login_return) {
            login_return->session_id = strdup(_param_1->return_->id);
        }

        int value_size = _param_1->return_->name_USCOREvalue_USCORElist->__size;
        int i = 0;
        for (i = 0; i < value_size; i++){
            if (!strcmp(_param_1->return_->name_USCOREvalue_USCORElist->__ptr[i]->name, "user_id") && login_return) {
                login_return->user_id = strdup(_param_1->return_->name_USCOREvalue_USCORElist->__ptr[i]->value);
            }
        }
    } else {
        soap_print_fault(server_info->soap, stderr);
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
movq (%rdi), %rdi
movl $0x18, %esi
callq 0x39095
movq %rax, %r14
movq (%r15), %rdi
movq 0x8(%r15), %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %rax, %r8
callq 0x4cd3f
movl %eax, 0x4(%rsp)
testl %eax, %eax
je 0x4f524
movq (%r15), %rdi
movq 0x22ade(%rip), %rax     # 0x71ff8
movq (%rax), %rsi
callq 0x4b1d6
jmp 0x4f58e
leaq 0x4dfd(%rip), %rdi      # 0x54328
callq 0x30a0
testq %rbx, %rbx
je 0x4f543
movq (%r14), %rax
movq (%rax), %rdi
callq 0x3380
movq %rax, (%rbx)
movq (%r14), %rax
movq 0x10(%rax), %rax
movslq 0x8(%rax), %r15
testq %r15, %r15
jle 0x4f58e
movq (%rax), %r12
xorl %r13d, %r13d
leaq 0x204c(%rip), %r14      # 0x515ac
movq (%r12,%r13,8), %rbp
movq (%rbp), %rdi
movq %r14, %rsi
callq 0x3200
testq %rbx, %rbx
je 0x4f586
testl %eax, %eax
jne 0x4f586
movq 0x8(%rbp), %rdi
callq 0x3380
movq %rax, 0x8(%rbx)
incq %r13
cmpq %r13, %r15
jne 0x4f560
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/reference/KeccakP-1600-reference.c
// Function: KeccakP1600_AddBytes
void KeccakP1600_AddBytes(void *state, const unsigned char *data, unsigned int offset, unsigned int length)
{
    unsigned int i;

    assert(offset < 200);
    assert(offset+length <= 200);
    for(i=0; i<length; i++)
        ((unsigned char *)state)[offset+i] ^= data[i];
}

// Assembly:
pushq %rax
cmpl $0xc8, %edx
jae 0x5884
leal (%rcx,%rdx), %eax
cmpl $0xc8, %eax
ja 0x58a3
testl %ecx, %ecx
je 0x5882
movl %ecx, %eax
movl %edx, %ecx
xorl %edx, %edx
movb (%rsi,%rdx), %r8b
leal (%rcx,%rdx), %r9d
xorb %r8b, (%rdi,%r9)
incq %rdx
cmpq %rdx, %rax
jne 0x586e
popq %rax
retq
leaq 0x97dd(%rip), %rdi      # 0xf068
leaq 0x97e3(%rip), %rsi      # 0xf075
leaq 0x9856(%rip), %rcx      # 0xf0ef
movl $0x9a, %edx
callq 0x5180
leaq 0x989a(%rip), %rdi      # 0xf144
leaq 0x97c4(%rip), %rsi      # 0xf075
leaq 0x9837(%rip), %rcx      # 0xf0ef
movl $0x9b, %edx
callq 0x5180
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/reference/KeccakP-1600-reference.c
// Function: KeccakP1600_ExtractAndAddBytes
void KeccakP1600_ExtractAndAddBytes(const void *state, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length)
{
    unsigned int i;

    assert(offset < 200);
    assert(offset+length <= 200);
    for(i=0; i<length; i++)
        output[i] = input[i] ^ ((unsigned char *)state)[offset+i];
}

// Assembly:
pushq %rax
cmpl $0xc8, %ecx
jae 0x5e2b
leal (%r8,%rcx), %eax
cmpl $0xc8, %eax
ja 0x5e4a
testl %r8d, %r8d
je 0x5e29
movl %r8d, %eax
movl %ecx, %ecx
xorl %r8d, %r8d
leal (%rcx,%r8), %r9d
movb (%rdi,%r9), %r9b
xorb (%rsi,%r8), %r9b
movb %r9b, (%rdx,%r8)
incq %r8
cmpq %r8, %rax
jne 0x5e11
popq %rax
retq
leaq 0x9236(%rip), %rdi      # 0xf068
leaq 0x923c(%rip), %rsi      # 0xf075
leaq 0x9419(%rip), %rcx      # 0xf259
movl $0x16e, %edx            # imm = 0x16E
callq 0x5180
leaq 0x92f3(%rip), %rdi      # 0xf144
leaq 0x921d(%rip), %rsi      # 0xf075
leaq 0x93fa(%rip), %rcx      # 0xf259
movl $0x16f, %edx            # imm = 0x16F
callq 0x5180
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/reference/KeccakP-1600-reference.c
// Function: KeccakP1600_DisplayRoundConstants
void KeccakP1600_DisplayRoundConstants(FILE *f)
{
    unsigned int i;

    for(i=0; i<maxNrRounds; i++) {
        fprintf(f, "RC[%02i][0][0] = ", i);
        fprintf(f, "%08X", (unsigned int)(KeccakRoundConstants[i] >> 32));
        fprintf(f, "%08X", (unsigned int)(KeccakRoundConstants[i] & 0xFFFFFFFFULL));
        fprintf(f, "\n");
    }
    fprintf(f, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x9482(%rip), %rbp      # 0xf300
leaq 0x944a(%rip), %r14      # 0xf2cf
leaq 0xa05c(%rip), %r15      # 0xfee8
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x5690
movq (%rbp), %r13
movq %r13, %rdx
shrq $0x20, %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x5690
movq %rbx, %rdi
movq %r15, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x5690
movl $0xa, %edi
movq %rbx, %rsi
callq 0x5340
incq %r12
addq $0x8, %rbp
cmpq $0x18, %r12
jne 0x5e8f
movl $0xa, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5340
// File: /workspace/github_c_makefile_star2_O1/mflatt[P]gc-demo/gc/mark_and_sweep.c
// Function: allocate
struct node *allocate()
{
  struct gc_node *nh;
  
  if (!free_list) {
    collect_garbage();
    if (!free_list)
      get_more_memory();
  }

  nh = free_list;
  free_list = free_list->next_free;

  return &nh->n;
}

// Assembly:
pushq %rbx
cmpq $0x0, 0x2cf7(%rip)      # 0x4060
jne 0x13e6
xorl %eax, %eax
callq 0x1358
cmpq $0x0, 0x2ce6(%rip)      # 0x4060
jne 0x13e6
movl $0x18, %edi
callq 0x1320
movq %rax, %rbx
movq 0x2ce0(%rip), %rax      # 0x4070
movq %rax, (%rbx)
movq %rbx, 0x2cd6(%rip)      # 0x4070
incl 0x30e0(%rip)            # 0x4480
movl $0xc0000, %edi          # imm = 0xC0000
callq 0x1320
movq %rax, 0x8(%rbx)
xorl %eax, %eax
movq 0x8(%rbx), %rcx
movq 0x2ca5(%rip), %rdx      # 0x4060
movq %rdx, (%rcx,%rax)
addq %rax, %rcx
movq %rcx, 0x2c97(%rip)      # 0x4060
addq $0x18, %rax
cmpq $0xc0000, %rax          # imm = 0xC0000
jne 0x13b0
movl $0x8000, %eax           # imm = 0x8000
addl %eax, 0x30a4(%rip)      # 0x4484
addl %eax, 0x30a2(%rip)      # 0x4488
movq 0x2c73(%rip), %rax      # 0x4060
movq (%rax), %rcx
movq %rcx, 0x2c69(%rip)      # 0x4060
addq $0x8, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_1/exercise_1_17/line_80.c
// Function: main
int main(void)
{
  int len;
  char line[MAXLINE];

  while ((len = get_line(line, MAXLINE)) > 0)
  {
    if (len > LIMIT)
    {
      printf("%s", line);
    }
  }

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x3e8, %rsp            # imm = 0x3E8
movq %rsp, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x11a1
testl %eax, %eax
jle 0x1194
leaq 0xe96(%rip), %rbx       # 0x2004
movq %rsp, %r14
cmpl $0x51, %eax
jb 0x1183
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1030
movq %r14, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x11a1
testl %eax, %eax
jg 0x1171
xorl %eax, %eax
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_1/exercise_1_17/line_80.c
// Function: get_line
int get_line(char line[], int max_line_len)
{
  int c, i;

  for (i = 0; i < max_line_len - 1 && (c = getchar()) != EOF && c != '\n'; ++i)
  {
    line[i] = c;
  }

  if (c == '\n')
  {
    line[i] = c;
    ++i;
  }

  line[i] = '\0';

  return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x2, %esi
jl 0x11d7
movl %esi, %ebp
decl %ebp
movl %ebp, %r15d
xorl %r14d, %r14d
callq 0x1040
cmpl $-0x1, %eax
je 0x11db
cmpl $0xa, %eax
je 0x11db
movb %al, (%rbx,%r14)
incq %r14
cmpq %r14, %r15
jne 0x11ba
jmp 0x11de
xorl %ebp, %ebp
jmp 0x11e4
movl %r14d, %ebp
cmpl $0xa, %eax
sete %al
testb $0x1, %al
je 0x11f0
movl %ebp, %eax
movb $0xa, (%rbx,%rax)
incl %ebp
movslq %ebp, %rax
movb $0x0, (%rbx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/fm4dd[P]learn-ssl/set_asn1_time.c
// Function: main
int main() {

  const char timestr[] = "20121018162433Z";
  BIO          *outbio = NULL;
  ASN1_TIME *str_asn1time, *now_asn1time;

  /* ---------------------------------------------------------- *
   * Create the Input/Output BIO's.                             *
   * ---------------------------------------------------------- */
  outbio  = BIO_new(BIO_s_file());
  outbio  = BIO_new_fp(stdout, BIO_NOCLOSE);

  /* ---------------------------------------------------------- *
   * Set the ASN1 date & time structure                         *
   * ---------------------------------------------------------- */
  str_asn1time = ASN1_TIME_new();
  now_asn1time = ASN1_TIME_new();

  if (! ASN1_TIME_set_string(str_asn1time, timestr))
        BIO_printf(outbio, "Error date is invalid, should be YYYYMMDDHHMMSSZ");

  ASN1_TIME_set(now_asn1time, time(NULL));

  /* ---------------------------------------------------------- *
   * Print the ASN1 date and time here                          *
   * ---------------------------------------------------------- */
  BIO_printf(outbio, "Set ASN1 date & time from String: ");
  if (!ASN1_TIME_print(outbio, str_asn1time))
    BIO_printf(outbio, "Error printing ASN1 time");
  else
    BIO_printf(outbio, "\n");

  BIO_printf(outbio, "Set ASN1 date & time from time(): ");
  if (!ASN1_TIME_print(outbio, now_asn1time))
    BIO_printf(outbio, "Error printing ASN1 time");
  else
    BIO_printf(outbio, "\n");

  /* ---------------------------------------------------------- *
   * Free up all structures                                     *
   * ---------------------------------------------------------- */
  ASN1_TIME_free(str_asn1time);
  ASN1_TIME_free(now_asn1time);
  BIO_free_all(outbio);
  exit(0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movaps 0xe10(%rip), %xmm0      # 0x2010
movq %rsp, %r12
movaps %xmm0, (%r12)
callq 0x1030
movq %rax, %rdi
callq 0x10c0
movq 0x2db4(%rip), %rax      # 0x3fd0
movq (%rax), %rdi
xorl %esi, %esi
callq 0x1060
movq %rax, %rbx
callq 0x1080
movq %rax, %r14
callq 0x1080
movq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
callq 0x1040
testl %eax, %eax
jne 0x1259
leaq 0xdd1(%rip), %rsi       # 0x2020
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10e0
xorl %edi, %edi
callq 0x1070
movq %r15, %rdi
movq %rax, %rsi
callq 0x10a0
leaq 0xddf(%rip), %rsi       # 0x2051
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10d0
testl %eax, %eax
leaq 0xde4(%rip), %r13       # 0x2074
leaq 0xdf6(%rip), %r12       # 0x208d
movq %r12, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10e0
leaq 0xde0(%rip), %rsi       # 0x208f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10e0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10d0
testl %eax, %eax
cmoveq %r13, %r12
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x10e0
movq %r14, %rdi
callq 0x10b0
movq %r15, %rdi
callq 0x10b0
movq %rbx, %rdi
callq 0x1050
xorl %edi, %edi
callq 0x1090