LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/libft/ft_dlstpop_front.c
// Function: ft_dlstpop_front
void	ft_dlstpop_front(t_dlist **head, void (*del)(void*))
{
	t_dlist *new_head;

	if (!head || !del || !*head)
		return ;
	new_head = (*head)->next;
	ft_dlstdelone(*head, del);
	*head = NULL;
	*head = new_head;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0xad5a
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xad53
movq 0x8(%rdi), %r14
callq 0xad08
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/libft/ft_dlstpop_back.c
// Function: ft_dlstpop_back
void	ft_dlstpop_back(t_dlist **head, void (*del)(void*))
{
	t_dlist **current;
	t_dlist *then;

	if (!head || !del || !*head)
		return ;
	current = head;
	while (*current)
	{
		then = (*current)->next;
		if (!then)
		{
			ft_dlstdelone(*current, del);
			*current = NULL;
			return ;
		}
		current = &(*current)->next;
	}
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0xad99
cmpq $0x0, (%rdi)
je 0xad99
pushq %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0xad98
movq %rdi, %rbx
leaq 0x8(%rax), %rdi
cmpq $0x0, 0x8(%rax)
jne 0xad73
movq %rax, %rdi
callq 0xad08
movq $0x0, (%rbx)
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/libft/ft_dlstclearback_addr.c
// Function: ft_dlstclearback_addr
void	ft_dlstclearback_addr(t_dlist **lst, void (*del)(void **))
{
	t_dlist	*then;

	if (!lst || !*lst)
		return ;
	while ((*lst)->next)
		(*lst) = (*lst)->next;
	while (*lst)
	{
		then = (*lst)->previous;
		if (del)
			del(&(*lst)->content);
		ft_free((void **)lst);
		(*lst) = then;
	}
}

// Assembly:
testq %rdi, %rdi
je 0xadee
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
cmpq $0x0, (%rdi)
je 0xade9
movq %rsi, %rbx
movq (%r14), %rax
movq 0x8(%rax), %rax
testq %rax, %rax
je 0xadc3
movq %rax, (%r14)
jmp 0xadb5
movq (%r14), %rdi
testq %rdi, %rdi
je 0xade9
movq 0x10(%rdi), %r15
testq %rbx, %rbx
je 0xadd6
callq *%rbx
movq %r14, %rdi
callq 0xaa9c
movq %r15, (%r14)
movq %r15, %rdi
testq %r15, %r15
jne 0xadcb
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/libft/ft_lstremove_if.c
// Function: ft_lstremove_if
void	ft_lstremove_if(t_list **begin_list, void *data_ref, int (*cmp)(),
		void (*free_fct)(void *))
{
	t_list	*current;
	t_list	*to_delete;

	while (*begin_list && !((*cmp)((*begin_list)->content, data_ref)))
	{
		to_delete = *begin_list;
		*begin_list = to_delete->next;
		ft_lstdelone(to_delete, free_fct);
	}
	current = *begin_list;
	while (current != NULL)
	{
		if (current->next && !((*cmp)(current->next->content, data_ref)))
		{
			to_delete = current->next;
			current->next = current->next->next;
			ft_lstdelone(to_delete, free_fct);
		}
		else
			current = current->next;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%rdi), %rax
testq %rax, %rax
je 0xae35
movq (%rax), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq *%r14
testl %eax, %eax
jne 0xae35
movq (%r12), %rdi
movq 0x8(%rdi), %rax
movq %rax, (%r12)
movq %rbx, %rsi
callq 0xa85c
movq (%r12), %rax
jmp 0xae07
movq (%r12), %r12
testq %r12, %r12
je 0xae76
movq 0x8(%r12), %rax
testq %rax, %rax
je 0xae57
movq (%rax), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq *%r14
testl %eax, %eax
je 0xae5e
movq 0x8(%r12), %r12
jmp 0xae39
movq 0x8(%r12), %rdi
movq 0x8(%rdi), %rax
movq %rax, 0x8(%r12)
movq %rbx, %rsi
callq 0xa85c
jmp 0xae39
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/libft/btree_depth.c
// Function: btree_depth
int		btree_depth(t_btree *root)
{
	int	max[3];

	if (!root)
		return (0);
	max[0] = btree_depth(root->left);
	max[1] = btree_depth(root->right);
	max[2] = (max[0] > max[1] ? max[0] : max[1]);
	return (max[2] + 1);
}

// Assembly:
testq %rdi, %rdi
je 0xaeb0
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0xae84
movl %eax, %ebp
movq 0x8(%rbx), %rdi
callq 0xae84
cmpl %eax, %ebp
cmovgl %ebp, %eax
incl %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/libft/btree_clear.c
// Function: btree_clear
void	btree_clear(t_btree **node, void (*del)(void *))
{
	if (!*node)
		return ;
	btree_clear(&(*node)->left, del);
	btree_clear(&(*node)->right, del);
	btree_delone(node, del);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xaf10
movq %rsi, %rbx
callq 0xaed8
movq (%r14), %rdi
addq $0x8, %rdi
movq %rbx, %rsi
callq 0xaed8
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xaf18
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/libft/btree_delone.c
// Function: btree_delone
void	btree_delone(t_btree **node, void (*del)(void *))
{
	if (!*node)
		return ;
	if (del)
		del((*node)->item);
	ft_free((void **)node);
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0xaf38
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0xaf2f
movq 0x10(%rax), %rdi
callq *%rsi
movq %rbx, %rdi
popq %rbx
jmp 0xaa9c
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/dubeyalok7[P]crypto-algo/sha/sha256.c
// Function: sha256Input
int sha256Input(SHA256Context *ctx, const uint8_t *msg, unsigned int len)
{
    if(!ctx)
        return SHA_NULL;
    if(!len)
        return SHA_SUCCESS;
    if(!msg)
        return SHA_NULL;

    if(ctx->Computed) return ctx->Corrupted = SHA_ERR;
    if(ctx->Corrupted) return ctx->Corrupted;

    while(len--){
        ctx->msg_block[ctx->msg_block_idx++] = *msg;
        if((SHA256_add_len(ctx, 8) == SHA_SUCCESS) && (ctx->msg_block_idx == SHA256_Message_Block_Size))
            sha256Process(ctx);
        ++msg;
    }
    return SHA_SUCCESS;
}

// Assembly:
movl $0x1, %eax
testq %rdi, %rdi
je 0x12a1
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
testl %edx, %edx
je 0x129a
movq %rsi, %r15
testq %rsi, %rsi
je 0x129c
movq %rdi, %r14
cmpl $0x0, 0x6c(%rdi)
je 0x123a
movl $0x3, 0x70(%r14)
movl $0x3, %eax
jmp 0x129c
movl 0x70(%r14), %eax
testl %eax, %eax
jne 0x129c
decl %ebx
movb (%r15), %al
movswq 0x28(%r14), %rcx
leal 0x1(%rcx), %edx
movw %dx, 0x28(%r14)
movb %al, 0x2a(%r14,%rcx)
movl 0x24(%r14), %eax
movzbl %al, %ecx
cmpl %ecx, %ebx
adcl $0x0, %eax
movl %eax, 0x24(%r14)
je 0x1276
movl $0x2, %eax
incl 0x20(%r14)
je 0x127a
movl 0x70(%r14), %eax
movl %eax, 0x70(%r14)
testl %eax, %eax
jne 0x1292
cmpw $0x40, 0x28(%r14)
jne 0x1292
movq %r14, %rdi
callq 0x12a2
incq %r15
addl $-0x1, %ebx
jb 0x1244
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/dubeyalok7[P]crypto-algo/sha/sha256.c
// Function: sha256FinalizeBits
int sha256FinalizeBits(SHA256Context *ctx, uint8_t msg_bits, unsigned int len)
{
    static uint8_t mask[8] = {
        /* 0 0b00000000 */ 0x00, /* 1 0b10000000 */ 0x80,
        /* 2 0b11000000 */ 0xC0, /* 3 0b11100000 */ 0xE0,
        /* 4 0b11110000 */ 0xF0, /* 5 0b11111000 */ 0xF8,
        /* 6 0b11111100 */ 0xFC, /* 7 0b11111110 */ 0xFE
    };
    static uint8_t markbit[8] = {
        /* 0 0b10000000 */ 0x80, /* 1 0b01000000 */ 0x40,
        /* 2 0b00100000 */ 0x20, /* 3 0b00010000 */ 0x10,
        /* 4 0b00001000 */ 0x08, /* 5 0b00000100 */ 0x04,
        /* 6 0b00000010 */ 0x02, /* 7 0b00000001 */ 0x01
    };

    if(!ctx) return SHA_NULL;
    if(!len) return SHA_SUCCESS;
    if(ctx->Corrupted) return ctx->Corrupted;
    if(ctx->Computed) return SHA_ERR;
    if(len >= 8) return ctx->Corrupted = SHA_BAD_PARAM;

    SHA256_add_len(ctx, len);
    sha256Finalize(ctx, (uint8_t)((msg_bits & mask[len])| markbit[len]));

    return ctx->Corrupted;
}

// Assembly:
testq %rdi, %rdi
je 0x147d
testl %edx, %edx
je 0x1483
pushq %rbx
movq %rdi, %rbx
movl 0x70(%rdi), %ecx
testl %ecx, %ecx
je 0x1486
movl %ecx, %eax
jmp 0x14f2
movl $0x1, %eax
retq
xorl %eax, %eax
retq
movl $0x3, %eax
cmpl $0x0, 0x6c(%rbx)
jne 0x14f2
cmpl $0x8, %edx
jb 0x14a4
movl $0x4, 0x70(%rbx)
movl $0x4, %eax
jmp 0x14f2
movl 0x24(%rbx), %eax
movzbl %al, %edi
xorl %r8d, %r8d
cmpl %edx, %edi
seta %r8b
addl %eax, %r8d
movl %r8d, 0x24(%rbx)
je 0x14c6
movl $0x2, %eax
incl 0x20(%rbx)
je 0x14c8
movl %ecx, %eax
movl %eax, 0x70(%rbx)
movl %edx, %eax
leaq 0xb5c(%rip), %rcx       # 0x2030
andb (%rax,%rcx), %sil
leaq 0xb59(%rip), %rcx       # 0x2038
orb (%rax,%rcx), %sil
movzbl %sil, %esi
movq %rbx, %rdi
callq 0x14f4
movl 0x70(%rbx), %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/dubeyalok7[P]crypto-algo/sha/sha256.c
// Function: sha256Finalize
static void sha256Finalize(SHA256Context *ctx, uint8_t pad_byte)
{
    sha256PadMsg(ctx, pad_byte);
    for(int i=0; i< SHA256_Message_Block_Size; ++i){
        ctx->msg_block[i] = 0;
    }
    ctx->ll = ctx->hl = 0;
    ctx->Computed = 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movswq 0x28(%rdi), %rcx
leal 0x1(%rcx), %eax
movw %ax, 0x28(%rdi)
cmpq $0x38, %rcx
jl 0x1539
movb %sil, 0x2a(%rbx,%rcx)
cmpw $0x3f, %ax
jg 0x152f
leal 0x1(%rax), %ecx
movw %cx, 0x28(%rbx)
movswq %ax, %rax
movb $0x0, 0x2a(%rbx,%rax)
movzwl 0x28(%rbx), %eax
cmpw $0x40, %ax
jl 0x1515
movq %rbx, %rdi
callq 0x12a2
jmp 0x153e
movb $0x0, 0x2a(%rbx,%rcx)
movl 0x20(%rbx), %eax
movl 0x24(%rbx), %ecx
bswapl %eax
movl %eax, 0x62(%rbx)
bswapl %ecx
movl %ecx, 0x66(%rbx)
movq %rbx, %rdi
callq 0x12a2
xorps %xmm0, %xmm0
movups %xmm0, 0x5a(%rbx)
movups %xmm0, 0x4a(%rbx)
movups %xmm0, 0x3a(%rbx)
movups %xmm0, 0x2a(%rbx)
movq $0x0, 0x20(%rbx)
movl $0x1, 0x6c(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/dubeyalok7[P]crypto-algo/sha/sha256.c
// Function: sha256Result
extern int sha256Result(SHA256Context *ctx, uint8_t msgDigest[SHA256_Hash_Size])
{
    if(!ctx) return SHA_NULL;
    if(!msgDigest) return SHA_NULL;
    if(ctx->Corrupted) return ctx->Corrupted;
    if(!ctx->Computed)
        sha256Finalize(ctx, 0x80);

    for(int i = 0; i < SHA256_Hash_Size; ++i)
        msgDigest[i] = (uint8_t) (ctx->h[i>>2]>> 8*(3-(i&0x03)));

    return SHA_SUCCESS;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
movl $0x1, %eax
jne 0x15e3
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x70(%rdi), %eax
testl %eax, %eax
jne 0x15dc
movq %rsi, %rbx
cmpl $0x0, 0x6c(%r14)
jne 0x15b4
movq %r14, %rdi
movl $0x80, %esi
callq 0x14f4
xorl %eax, %eax
xorl %edx, %edx
xorl %esi, %esi
movl %esi, %ecx
andl $-0x4, %ecx
movl (%r14,%rcx), %edi
movl %edx, %ecx
notb %cl
andb $0x18, %cl
shrl %cl, %edi
movb %dil, (%rbx,%rsi)
incq %rsi
addl $0x8, %edx
cmpq $0x20, %rsi
jne 0x15ba
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/dubeyalok7[P]crypto-algo/sha/main.c
// Function: help
void help()
{
  printf("\t\t\t...HELP...\t\t\t\n");
  printf("usage: ./sha -i <filename> -h <hashing_val>\n");
  printf("\t-i  input file\n");
  printf("\t-h  256/512 hashing value\n");
}

// Assembly:
pushq %rax
leaq 0xb65(%rip), %rdi       # 0x2151
callq 0x1050
leaq 0xb6a(%rip), %rdi       # 0x2162
callq 0x1050
leaq 0xb8a(%rip), %rdi       # 0x218e
callq 0x1050
leaq 0xb8e(%rip), %rdi       # 0x219e
popq %rax
jmp 0x1050
// File: /workspace/github_c_makefile_star2_O1/dubeyalok7[P]crypto-algo/sha/main.c
// Function: init_sha_256
void init_sha_256(char *infile)
{
  SHA256Context ctx;
  char msg[1000];
  uint8_t msgDigest[SHA256_Hash_Size];
  FILE *fp = fopen(infile, "r+");
  if(NULL == fp){
    printf("error: file doesn't exist.\n");
    return;
  }
  sha256Init(&ctx);
  while(!feof(fp)){
    fscanf(fp, "%s", msg);
    sha256Input(&ctx, (uint8_t *)msg, strlen(msg));
  }
  sha256FinalizeBits(&ctx, 0x80, 3);
  sha256Result(&ctx, msgDigest);
    
  for(int i = 0; i < SHA256_Hash_Size; ++i){
    printf("%.2x ", msgDigest[i]);
  }
  printf("\n");
  fclose(fp);  
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x488, %rsp            # imm = 0x488
leaq 0xb15(%rip), %rsi       # 0x2140
callq 0x10a0
testq %rax, %rax
je 0x16fc
movq %rax, %rbx
leaq 0x2c(%rsp), %rdi
callq 0x11cc
movq %rbx, %rdi
callq 0x1090
testl %eax, %eax
jne 0x1697
leaq 0xaea(%rip), %r14       # 0x2143
leaq 0xa0(%rsp), %r15
leaq 0x2c(%rsp), %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1040
movq %r15, %rdi
callq 0x1070
movq %r12, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x11fd
movq %rbx, %rdi
callq 0x1090
testl %eax, %eax
je 0x1666
leaq 0x2c(%rsp), %r14
movq %r14, %rdi
movl $0x80, %esi
movl $0x3, %edx
callq 0x1465
movq %rsp, %rsi
movq %r14, %rdi
callq 0x157a
leaq 0xa86(%rip), %r14       # 0x2146
xorl %r15d, %r15d
movzbl (%rsp,%r15), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1080
incq %r15
cmpq $0x20, %r15
jne 0x16c3
movl $0xa, %edi
callq 0x1030
movq %rbx, %rdi
callq 0x1060
addq $0x488, %rsp            # imm = 0x488
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0xab6(%rip), %rdi       # 0x21b9
addq $0x488, %rsp            # imm = 0x488
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1050
// File: /workspace/github_c_makefile_star2_O1/dubeyalok7[P]crypto-algo/sha/main.c
// Function: main
int main(int argc, char *argv[])
{
  int opt, hash_val = 0;
  extern char *optarg;
  char *infile;
  if(argc<5){
    help();
    return 0;
  }
  while((opt = getopt(argc, argv, "i:h:")) != -1){
    switch (opt)
    {
      case 'i':
        infile = optarg;
        break;
      case 'h':
        hash_val = atoi(optarg);      
        break;
    }
  }
  if(256 == hash_val){
    init_sha_256(infile);
  } else if(512 == hash_val){
    init_sha_512(infile);
  }  
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x5, %edi
jge 0x172e
callq 0x15e4
jmp 0x1785
movq %rsi, %rbx
movl %edi, %ebp
xorl %r12d, %r12d
leaq 0xa0f(%rip), %r15       # 0x214c
movq 0x289c(%rip), %r13      # 0x3fe0
movl %ebp, %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x10b0
cmpl $-0x1, %eax
je 0x1774
cmpl $0x68, %eax
je 0x1766
cmpl $0x69, %eax
jne 0x1744
movq (%r13), %r14
jmp 0x1744
movq (%r13), %rdi
callq 0x10c0
movl %eax, %r12d
jmp 0x1744
cmpl $0x100, %r12d           # imm = 0x100
jne 0x1785
movq %r14, %rdi
callq 0x1616
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/xiaowenhuyuehu[P]remote_access/src/connectivity/rd_net.c
// Function: rd_net_read
int rd_net_read(pNetwork_t pNetwork, void *connect, char *buffer, int len, int timeout_ms)
{
    if (RD_NET_WEBSOCKET == pNetwork->type) {
        if (NULL != connect) {
            return ws_nopoll_read(connect, buffer, len, timeout_ms);
        } else {
            return ws_nopoll_read(pNetwork->handle, buffer, len, timeout_ms);
        }
    } else {
        log_debug("unsupport connect type: %d ", pNetwork->type);
        return -1;
    }
}

// Assembly:
movl (%rdi), %r9d
testl %r9d, %r9d
je 0x282f
pushq %rax
leaq 0x67f8(%rip), %rsi      # 0x9004
leaq 0x67f7(%rip), %rdx      # 0x900a
leaq 0x680a(%rip), %r8       # 0x9024
xorl %edi, %edi
movl $0xe, %ecx
xorl %eax, %eax
callq 0x4371
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rcx
retq
testq %rsi, %rsi
je 0x2839
movq %rsi, %rdi
jmp 0x283d
movq 0x38(%rdi), %rdi
movq %rdx, %rsi
movl %ecx, %edx
movl %r8d, %ecx
jmp 0x2afc
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/connectivity/rd_net.c
// Function: rd_net_write
int rd_net_write(pNetwork_t pNetwork, void *connect, const char *buffer, int len, int timeout_ms)
{
    if (RD_NET_WEBSOCKET == pNetwork->type) {
        if (NULL != connect) {
            return ws_nopoll_write(connect, buffer, len, timeout_ms);
        } else {
            return ws_nopoll_write(pNetwork->handle, buffer, len, timeout_ms);
        }
    } else {
        log_debug("unsupport connect type: %d ", pNetwork->type);
        return -1;
    }
}

// Assembly:
movl (%rdi), %r9d
testl %r9d, %r9d
je 0x287d
pushq %rax
leaq 0x67aa(%rip), %rsi      # 0x9004
leaq 0x67a9(%rip), %rdx      # 0x900a
leaq 0x67bc(%rip), %r8       # 0x9024
xorl %edi, %edi
movl $0x1c, %ecx
xorl %eax, %eax
callq 0x4371
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rcx
retq
testq %rsi, %rsi
je 0x2887
movq %rsi, %rdi
jmp 0x288b
movq 0x38(%rdi), %rdi
movq %rdx, %rsi
movl %ecx, %edx
movl %r8d, %ecx
jmp 0x2b09
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/connectivity/rd_net.c
// Function: rd_net_connect
int rd_net_connect(pNetwork_t pNetwork)
{
    if (RD_NET_WEBSOCKET == pNetwork->type) {
        pNetwork->handle = (void *)ws_nopoll_connect(pNetwork->debug_on, pNetwork->host, pNetwork->port, 
                                pNetwork->get_url, pNetwork->tls_on, pNetwork->ca_crt);
        if (NULL != pNetwork->handle) {
            return 0;
        }
        return -1;
    } else {
        log_debug("unsupport connect type: %d ", pNetwork->type);
        return -1;
    }
}

// Assembly:
pushq %rbx
movl (%rdi), %r9d
testl %r9d, %r9d
je 0x2907
leaq 0x6720(%rip), %rsi      # 0x9004
leaq 0x671f(%rip), %rdx      # 0x900a
leaq 0x6732(%rip), %r8       # 0x9024
xorl %edi, %edi
movl $0x35, %ecx
xorl %eax, %eax
callq 0x4371
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2935
movq %rdi, %rbx
movl 0x34(%rdi), %edi
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rcx
movl 0x30(%rbx), %r8d
movq 0x20(%rbx), %r9
callq 0x2c4e
movq %rax, %rcx
movq %rax, 0x38(%rbx)
xorl %eax, %eax
cmpq $0x1, %rcx
sbbl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/connectivity/rd_net.c
// Function: rd_net_listener
int rd_net_listener(pNetwork_t pNetwork)
{
    if (RD_NET_WEBSOCKET == pNetwork->type) {
        pNetwork->handle = (void *)ws_nopoll_listener(pNetwork->debug_on, pNetwork->host, pNetwork->port, 
                                pNetwork->tls_on, pNetwork->ca_crt, pNetwork->pri_key);
        if (NULL != pNetwork->handle) {
            return 0;
        }
        return -1;
    } else {
        log_debug("unsupport connect type: %d ", pNetwork->type);
        return -1;
    }
}

// Assembly:
pushq %rbx
movl (%rdi), %r9d
testl %r9d, %r9d
je 0x296a
leaq 0x66bd(%rip), %rsi      # 0x9004
leaq 0x66bc(%rip), %rdx      # 0x900a
leaq 0x66cf(%rip), %r8       # 0x9024
xorl %edi, %edi
movl $0x44, %ecx
xorl %eax, %eax
callq 0x4371
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2997
movq %rdi, %rbx
movl 0x34(%rdi), %edi
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movl 0x30(%rbx), %ecx
movq 0x20(%rbx), %r8
movq 0x28(%rbx), %r9
callq 0x2eb0
movq %rax, %rcx
movq %rax, 0x38(%rbx)
xorl %eax, %eax
cmpq $0x1, %rcx
sbbl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/connectivity/rd_net.c
// Function: rd_net_get_conn_info
int rd_net_get_conn_info (pNetwork_t pNetwork, void *connect, ConnectInfo_t *connInfo)
{
    if (RD_NET_WEBSOCKET == pNetwork->type) {
        if (NULL != connect) {
            return ws_nopoll_get_conn_info(connect, connInfo);
        } else {
            return ws_nopoll_get_conn_info(pNetwork->handle, connInfo);
        }
    } else {
        log_debug("unsupport connect type: %d ", pNetwork->type);
        return -1;
    }
}

// Assembly:
movl (%rdi), %r9d
testl %r9d, %r9d
je 0x2a7d
pushq %rax
leaq 0x65aa(%rip), %rsi      # 0x9004
leaq 0x65a9(%rip), %rdx      # 0x900a
leaq 0x65bc(%rip), %r8       # 0x9024
xorl %edi, %edi
movl $0x70, %ecx
xorl %eax, %eax
callq 0x4371
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rcx
retq
testq %rsi, %rsi
je 0x2a87
movq %rsi, %rdi
jmp 0x2a8b
movq 0x38(%rdi), %rdi
movq %rdx, %rsi
jmp 0x3252
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/connectivity/ws_nopoll.c
// Function: ws_nopoll_write
int ws_nopoll_write(void *handle, const char *buffer, int len, int timeout_ms)
{
    noPollConn *conn = (noPollConn *)handle;
    int tries = 0;
    int bytes_written = 0;

    if ((NULL != buffer) && (len > 0)) {
        bytes_written = nopoll_conn_send_binary (conn, buffer, len);
        if (bytes_written == len) {
            //log_debug ("send all. ");
            return bytes_written;
        }

        while (tries < 5 && errno == NOPOLL_EWOULDBLOCK 
          && nopoll_conn_pending_write_bytes (conn) > 0) {
            nopoll_sleep (10000); 
            if (0 == nopoll_conn_complete_pending_write (conn)) {
                log_debug ("send complete. ");
                return len;
            }
            tries++;
        }
        log_debug ("send len: %d, try: %d. ", bytes_written, tries);
        return  bytes_written;
    } else {
        log_debug ("ERROR: content is NULL or len <= 0 ");
    }
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
testq %rsi, %rsi
sete %al
testl %edx, %edx
setle %cl
orb %al, %cl
jne 0x2bac
movl %edx, %ebp
movq %rdi, %r14
movl %edx, %edx
callq 0x2460
movl %eax, %ebx
cmpl %ebp, %eax
je 0x2bd4
xorl %r12d, %r12d
callq 0x2400
movq %rax, %r15
cmpl $0xb, (%r15)
jne 0x2b80
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
jle 0x2b80
movl $0x2710, %edi           # imm = 0x2710
callq 0x25a0
movq %r14, %rdi
callq 0x2240
testl %eax, %eax
je 0x2be3
incl %r12d
cmpl $0x5, %r12d
jne 0x2b49
movl $0x5, %r12d
movl %r12d, (%rsp)
leaq 0x6479(%rip), %rsi      # 0x9004
leaq 0x64ae(%rip), %rdx      # 0x9040
leaq 0x64d4(%rip), %r8       # 0x906d
xorl %edi, %edi
movl $0x35, %ecx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x4371
jmp 0x2bd4
leaq 0x6451(%rip), %rsi      # 0x9004
leaq 0x6486(%rip), %rdx      # 0x9040
leaq 0x64c4(%rip), %r8       # 0x9085
xorl %edi, %edi
movl $0x38, %ecx
xorl %eax, %eax
callq 0x4371
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x641a(%rip), %rsi      # 0x9004
leaq 0x644f(%rip), %rdx      # 0x9040
leaq 0x6465(%rip), %r8       # 0x905d
xorl %edi, %edi
movl $0x30, %ecx
xorl %eax, %eax
callq 0x4371
movl %ebp, %ebx
jmp 0x2bd4
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/connectivity/ws_nopoll.c
// Function: ws_nopoll_destroy
int ws_nopoll_destroy(void *handle)
{
    noPollConn *conn = (noPollConn *)handle;
    noPollCtx *ctx = NULL;

	/* finish connection */
	if (NULL != conn) {
        ctx = nopoll_conn_ctx(conn);
    	nopoll_conn_close(conn);
	}
	
	/* finish */
	if (NULL != ctx) {
    	nopoll_loop_stop(ctx);
        nopoll_ctx_unref(ctx);
	}

	/* call to cleanup */
	nopoll_cleanup_library ();

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2c28
movq %rdi, %r14
callq 0x2040
movq %rax, %rbx
movq %r14, %rdi
callq 0x2060
jmp 0x2c2a
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x2c3f
movq %rbx, %rdi
callq 0x2540
movq %rbx, %rdi
callq 0x25d0
callq 0x2200
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/connectivity/ws_nopoll.c
// Function: ws_nopoll_loop_wait
int ws_nopoll_loop_wait(void *handle)
{
    noPollConn *conn = (noPollConn *)handle;
    noPollCtx *ctx = NULL;

    if (NULL == conn) {
        log_debug("ERROR: conn is NULL ");
        return -1;
    }

    ctx = nopoll_conn_ctx(conn);
    if (NULL == ctx) {
        log_debug("ERROR: ctx is NULL ");
        return -1;
    }

    nopoll_loop_wait(ctx, 0);
	return 0;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x3073
callq 0x2040
testq %rax, %rax
je 0x3091
xorl %ebx, %ebx
movq %rax, %rdi
xorl %esi, %esi
callq 0x22b0
jmp 0x30b9
leaq 0x5f8a(%rip), %rsi      # 0x9004
leaq 0x5fbf(%rip), %rdx      # 0x9040
leaq 0x6248(%rip), %r8       # 0x92d0
xorl %edi, %edi
movl $0xd8, %ecx
jmp 0x30ad
leaq 0x5f6c(%rip), %rsi      # 0x9004
leaq 0x5fa1(%rip), %rdx      # 0x9040
leaq 0x623f(%rip), %r8       # 0x92e5
xorl %edi, %edi
movl $0xde, %ecx
xorl %eax, %eax
callq 0x4371
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/connectivity/ws_nopoll.c
// Function: ws_nopoll_set_on_ready
int ws_nopoll_set_on_ready(void *handle, noPollActionHandler on_ready)
{
    noPollConn *conn = (noPollConn *)handle;
    noPollCtx *ctx = NULL;

    if (NULL == conn) {
        log_debug("ERROR: conn is NULL ");
        return -1;
    }

    ctx = nopoll_conn_ctx(conn);
    if (NULL == ctx) {
        log_debug("ERROR: ctx is NULL ");
        return -1;
    }

    /* set on connect ready */
	if (NULL != on_ready) {
    	nopoll_ctx_set_on_ready (ctx, on_ready, NULL);
	}

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x30ea
movq %rsi, %rbx
callq 0x2040
testq %rax, %rax
je 0x3108
xorl %r14d, %r14d
testq %rbx, %rbx
je 0x3131
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2070
jmp 0x3131
leaq 0x5f13(%rip), %rsi      # 0x9004
leaq 0x5f48(%rip), %rdx      # 0x9040
leaq 0x61d1(%rip), %r8       # 0x92d0
xorl %edi, %edi
movl $0xec, %ecx
jmp 0x3124
leaq 0x5ef5(%rip), %rsi      # 0x9004
leaq 0x5f2a(%rip), %rdx      # 0x9040
leaq 0x61c8(%rip), %r8       # 0x92e5
xorl %edi, %edi
movl $0xf2, %ecx
xorl %eax, %eax
callq 0x4371
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/connectivity/ws_nopoll.c
// Function: ws_nopoll_set_on_msg
int ws_nopoll_set_on_msg(void *handle, noPollOnMessageHandler on_message)
{
    noPollConn *conn = (noPollConn *)handle;
    noPollCtx *ctx = NULL;

    if (NULL == conn) {
        log_debug("ERROR: conn is NULL ");
        return -1;
    }

    ctx = nopoll_conn_ctx(conn);
    if (NULL == ctx) {
        log_debug("ERROR: ctx is NULL ");
        return -1;
    }

	/* set on message received */
	if (NULL != on_message) {
    	nopoll_ctx_set_on_msg (ctx, on_message, NULL);
	}

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3169
movq %rsi, %rbx
callq 0x2040
testq %rax, %rax
je 0x3187
xorl %r14d, %r14d
testq %rbx, %rbx
je 0x31b0
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2490
jmp 0x31b0
leaq 0x5e94(%rip), %rsi      # 0x9004
leaq 0x5ec9(%rip), %rdx      # 0x9040
leaq 0x6152(%rip), %r8       # 0x92d0
xorl %edi, %edi
movl $0x104, %ecx            # imm = 0x104
jmp 0x31a3
leaq 0x5e76(%rip), %rsi      # 0x9004
leaq 0x5eab(%rip), %rdx      # 0x9040
leaq 0x6149(%rip), %r8       # 0x92e5
xorl %edi, %edi
movl $0x10a, %ecx            # imm = 0x10A
xorl %eax, %eax
callq 0x4371
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/connectivity/ws_nopoll.c
// Function: ws_nopoll_accept
noPollConn *ws_nopoll_accept(void *handle)
{
    noPollConn *master = (noPollConn *)handle;
    noPollConn *conn = NULL;
    noPollCtx *ctx = NULL;

    if (NULL == master) {
        log_debug("ERROR: master conn is NULL ");
        return NULL;
    }

    ctx = nopoll_conn_ctx(master);
    if (NULL == ctx) {
        log_debug("ERROR: ctx is NULL ");
        return NULL;
    }

    conn = nopoll_conn_accept(ctx, master);
	if (!nopoll_conn_is_ok (conn)) {
		log_debug("ERROR: expected to find proper listener status (connection accepted), but found failure.. ");
		return NULL;
	}

	return conn;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x3208
movq %rdi, %rbx
callq 0x2040
testq %rax, %rax
je 0x3228
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2280
movq %rax, %rbx
movq %rax, %rdi
callq 0x2320
testl %eax, %eax
jne 0x324d
leaq 0x5e15(%rip), %rsi      # 0x9004
leaq 0x5e4a(%rip), %rdx      # 0x9040
leaq 0x6118(%rip), %r8       # 0x9315
xorl %ebx, %ebx
xorl %edi, %edi
movl $0x129, %ecx            # imm = 0x129
jmp 0x3246
leaq 0x5df5(%rip), %rsi      # 0x9004
leaq 0x5e2a(%rip), %rdx      # 0x9040
leaq 0x60dc(%rip), %r8       # 0x92f9
xorl %ebx, %ebx
xorl %edi, %edi
movl $0x11d, %ecx            # imm = 0x11D
jmp 0x3246
leaq 0x5dd5(%rip), %rsi      # 0x9004
leaq 0x5e0a(%rip), %rdx      # 0x9040
leaq 0x60a8(%rip), %r8       # 0x92e5
xorl %ebx, %ebx
xorl %edi, %edi
movl $0x123, %ecx            # imm = 0x123
xorl %eax, %eax
callq 0x4371
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/connectivity/ws_nopoll.c
// Function: ws_nopoll_get_conn_info
int ws_nopoll_get_conn_info(void *handle, ConnectInfo_t *connInfo)
{
    if (NULL == connInfo) {
        log_debug("ERROR: connInfo is NULL ");
        return -1;
    }

    noPollConn *conn = (noPollConn *)handle;
    if (NULL != conn) {
        connInfo->sockfd = (int) nopoll_conn_socket(conn);
        connInfo->host = nopoll_conn_host(conn);
        connInfo->port = nopoll_conn_port(conn);
        connInfo->origin = nopoll_conn_get_origin(conn);
        //printf("----> origin:  %s\n", connInfo->origin);
        connInfo->get_url = nopoll_conn_get_requested_url(conn);
    }

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x32a6
movq %rdi, %r15
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x32ce
movq %rsi, %r14
movq %r15, %rdi
callq 0x2430
movl %eax, (%r14)
movq %r15, %rdi
callq 0x2290
movq %rax, 0x8(%r14)
movq %r15, %rdi
callq 0x2210
movq %rax, 0x10(%r14)
movq %r15, %rdi
callq 0x2030
movq %rax, 0x18(%r14)
movq %r15, %rdi
callq 0x22c0
movq %rax, 0x20(%r14)
jmp 0x32ce
leaq 0x5d57(%rip), %rsi      # 0x9004
leaq 0x5d8c(%rip), %rdx      # 0x9040
leaq 0x60b5(%rip), %r8       # 0x9370
xorl %edi, %edi
movl $0x133, %ecx            # imm = 0x133
xorl %eax, %eax
callq 0x4371
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/utility/json/json_parser.c
// Function: json_get_object
char* json_get_object(int type, char* str) {
    char* pos = 0;
    char ch = (type == JOBJECT) ? '{' : '[';
    while (str != 0 && *str != 0) {
        if (*str == ' ') {
            str++;
            continue;
        }
        pos = (*str == ch) ? str : 0;
        break;
    }
    return pos;
}

// Assembly:
testq %rsi, %rsi
jne 0x32e2
jmp 0x32ee
incq %rsi
movzbl (%rsi), %eax
cmpl $0x20, %eax
je 0x32df
testl %eax, %eax
jne 0x32f1
xorl %eax, %eax
retq
movsbl %al, %ecx
xorl %edx, %edx
cmpl $0x1, %edi
sete %dl
shll $0x5, %edx
orl $0x5b, %edx
xorl %eax, %eax
cmpl %ecx, %edx
cmoveq %rsi, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/utility/json/json_parser.c
// Function: json_parse_name_value
int json_parse_name_value(char *p_cJsonStr, int iStrLen, json_parse_cb pfnCB, void *p_CBData)
{
    char *pos=0, *key=0, *val=0;
    int klen=0, vlen=0, vtype=0;
    char last_char=0;
    int ret = JSON_RESULT_ERR;

    if (p_cJsonStr==NULL || iStrLen==0 || pfnCB==NULL)
        return ret;

    backup_json_str_last_char(p_cJsonStr, iStrLen, last_char);

    json_object_for_each_kv(p_cJsonStr, pos, key, klen, val, vlen, vtype) {
        if (key && klen && val && vlen) {
            ret = JSON_RESULT_OK;
            if (JSON_PARSE_FINISH == pfnCB(key, klen, val, vlen, vtype, p_CBData)) {	//catch the ball
                break;
            }
        }
    }

    restore_json_str_last_char(p_cJsonStr, iStrLen, last_char);
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x30(%rsp)
xorl %eax, %eax
movq %rax, 0x20(%rsp)
movq %rax, 0x18(%rsp)
movl %eax, 0x14(%rsp)
movl %eax, 0x10(%rsp)
movl %eax, 0xc(%rsp)
testq %rdi, %rdi
sete %al
testl %esi, %esi
sete %cl
orb %al, %cl
testq %rdx, %rdx
sete %al
orb %cl, %al
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jne 0x38a5
movq %rdx, %r15
movq %rdi, %rbx
movslq %esi, %rax
movb (%rdi,%rax), %cl
movb %cl, 0xb(%rsp)
movq %rax, 0x28(%rsp)
movb $0x0, (%rdi,%rax)
movq %rdi, %rax
movzbl (%rax), %ecx
cmpl $0x20, %ecx
jne 0x37e2
incq %rax
jmp 0x37d5
xorl %r12d, %r12d
testl %ecx, %ecx
je 0x37f0
cmpb $0x7b, %cl
cmoveq %rax, %r12
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %r12, %r12
je 0x3899
cmpb $0x0, (%r12)
je 0x3899
leaq 0x18(%rsp), %r13
leaq 0x10(%rsp), %r14
leaq 0xc(%rsp), %rax
movq %rax, (%rsp)
movl $0x1, %edi
movq %r12, %rsi
leaq 0x20(%rsp), %rdx
leaq 0x14(%rsp), %rcx
movq %r13, %r8
movq %r14, %r9
callq 0x330b
testq %rax, %rax
je 0x3899
movq %rax, %r12
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
setne %al
movl 0x14(%rsp), %esi
testl %esi, %esi
setne %r8b
andb %al, %r8b
movq 0x18(%rsp), %rdx
testq %rdx, %rdx
setne %al
movl 0x10(%rsp), %ecx
testl %ecx, %ecx
setne %r9b
andb %al, %r9b
andb %r8b, %r9b
cmpb $0x1, %r9b
jne 0x388e
movl 0xc(%rsp), %r8d
movq 0x30(%rsp), %r9
callq *%r15
xorl %ebp, %ebp
cmpl $0x2, %eax
je 0x3899
cmpb $0x0, (%r12)
jne 0x3813
movq 0x28(%rsp), %rax
movb 0xb(%rsp), %cl
movb %cl, (%rbx,%rax)
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/utility/json/json_parser.c
// Function: json_get_value_by_name
char *json_get_value_by_name(char *p_cJsonStr, int iStrLen, char *p_cName, int *p_iValueLen, int *p_iValueType)
{
    JSON_NV stNV = { 0, 0, 0, 0 };
    stNV.pN = p_cName;
    stNV.nLen = strlen(p_cName);
    if (JSON_RESULT_OK == json_parse_name_value(p_cJsonStr, iStrLen, json_get_value_by_name_cb, (void *)&stNV)) {
        if (p_iValueLen)
            *p_iValueLen = stNV.vLen;
        if (p_iValueType)
            *p_iValueType = stNV.vType;
    }
    return stNV.pV;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %rbx
movq %rcx, %r14
movl %esi, %ebp
movq %rdi, %r15
xorps %xmm0, %xmm0
movq %rsp, %r12
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movq %rdx, 0x10(%r12)
movq %rdx, %rdi
callq 0x2270
movl %eax, (%r12)
leaq -0x85(%rip), %rdx       # 0x38b6
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rcx
callq 0x376e
testl %eax, %eax
jne 0x3963
testq %r14, %r14
je 0x3958
movl 0x4(%rsp), %eax
movl %eax, (%r14)
testq %rbx, %rbx
je 0x3963
movl 0x8(%rsp), %eax
movl %eax, (%rbx)
movq 0x18(%rsp), %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/utility/json/json_parser.c
// Function: json_get_array_size
int json_get_array_size(char *json_str, int str_len)
{
    char *pos, *entry;

    char last_char = 0;
    backup_json_str_last_char(json_str, str_len, last_char);

    int len, type, size = 0;
    json_array_for_each_entry(json_str, pos, entry, len, type){
        size++;
    }
    restore_json_str_last_char(json_str, str_len, last_char);

    return size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movslq %esi, %r13
movb (%rdi,%r13), %al
movb %al, 0x17(%rsp)
movb $0x0, (%rdi,%r13)
xorl %r14d, %r14d
testq %rdi, %rdi
je 0x39b2
movq %rbx, %rcx
movzbl (%rcx), %edx
cmpl $0x20, %edx
jne 0x39ae
incq %rcx
jmp 0x39a1
testl %edx, %edx
jne 0x39b6
xorl %eax, %eax
jmp 0x39bf
xorl %eax, %eax
cmpb $0x5b, %dl
cmoveq %rcx, %rax
testq %rax, %rax
je 0x3a06
cmpb $0x0, (%rax)
je 0x3a06
xorl %r14d, %r14d
leaq 0x18(%rsp), %rbp
leaq 0x20(%rsp), %r15
leaq 0x1c(%rsp), %r12
incq %rax
movq %rbp, (%rsp)
movl $0x2, %edi
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
movq %r12, %r9
callq 0x330b
testq %rax, %rax
je 0x3a06
incl %r14d
cmpb $0x0, (%rax)
jne 0x39db
movb 0x17(%rsp), %al
movb %al, (%rbx,%r13)
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/utility/misc/misc.c
// Function: dump_hex
void dump_hex(char *p , int len)
{
    int i = 0;

    for(i = 0; i < len; i++){
        printf("0x%x ",(unsigned char)p[i]) ; 
        if(i != 0 && i % 10 == 0)
            printf("\n");
    }
    printf("\n");
}

// Assembly:
testl %esi, %esi
jle 0x3a89
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl %esi, %r15d
movl $0xcccccccd, %r12d      # imm = 0xCCCCCCCD
leaq 0x5969(%rip), %r14      # 0x93a9
xorl %r13d, %r13d
movzbl (%rbx,%r13), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x2080
testq %r13, %r13
je 0x3a78
movl %r13d, %eax
imulq %r12, %rax
shrq $0x23, %rax
addl %eax, %eax
leal (%rax,%rax,4), %eax
movl %r13d, %ecx
subl %eax, %ecx
jne 0x3a78
movl $0xa, %edi
callq 0x2120
incq %r13
cmpq %r13, %r15
jne 0x3a43
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
movl $0xa, %edi
jmp 0x2120
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/utility/misc/misc.c
// Function: get_dev_ip
int get_dev_ip(char *buf, int size)
{
    FILE *fp = NULL;
    char bufTmp[256];
    int len = 0, j = 0, i = 0;

    if (NULL == buf || size < 256) {
        return 0;
    }
    
    fp = popen(SHELL_GET_IP, "r");
    if(fp == NULL)
        return 0;

    memset(buf, 0x0, size);
    memset(bufTmp, 0x0, sizeof(bufTmp));
    fgets(bufTmp, sizeof(bufTmp), fp);

    for(i = 0; i < strlen(bufTmp); i++) {
        if (bufTmp[i] != '[' && bufTmp[i] != ']') {
            buf[j] = bufTmp[i];
            j++;
        }
    }
    len = strlen(buf);
    if(len > 0) {
        if (buf[len - 1] == '\n' || buf[len - 1] == '\r') {
            buf[len - 1] = '\0';
        }
    }

    pclose(fp);

    return len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
testq %rdi, %rdi
sete %al
cmpl $0x100, %esi            # imm = 0x100
setl %cl
xorl %r15d, %r15d
orb %al, %cl
jne 0x3b6f
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x58e7(%rip), %rdi      # 0x93af
leaq 0x5e03(%rip), %rsi      # 0x98d2
callq 0x2550
testq %rax, %rax
je 0x3b6f
movq %rax, %r14
movl %ebp, %edx
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2090
movq %rsp, %r15
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
xorl %esi, %esi
callq 0x2090
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x21e0
movq %r15, %rdi
callq 0x2270
testq %rax, %rax
je 0x3b40
xorl %ecx, %ecx
movzbl (%rsp,%rcx), %edx
cmpl $0x5b, %edx
je 0x3b38
cmpl $0x5d, %edx
je 0x3b38
movslq %r12d, %r12
movb %dl, (%rbx,%r12)
incl %r12d
incq %rcx
cmpq %rcx, %rax
jne 0x3b20
movq %rbx, %rdi
callq 0x2270
movq %rax, %r15
testl %r15d, %r15d
jle 0x3b67
movl %r15d, %eax
decl %eax
movzbl (%rbx,%rax), %ecx
cmpl $0xd, %ecx
je 0x3b63
cmpl $0xa, %ecx
jne 0x3b67
movb $0x0, (%rbx,%rax)
movq %r14, %rdi
callq 0x22a0
movl %r15d, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/utility/misc/misc.c
// Function: rand_string_alloc
char* rand_string_alloc(size_t size)
{
    char *s = malloc(size + 1);
    if (s) {
        _rand_string(s, size);
    }
    return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
incq %rdi
callq 0x2150
movq %rax, %r14
testq %rax, %rax
je 0x3ba4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3baf
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/utility/misc/misc.c
// Function: rand_string
static char *_rand_string(char *str, size_t size)
{
    const char charset[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    if (size) {
        --size;
        size_t n = 0;
        for (n = 0; n < size; n++) {
            int key = rand() % (int) (sizeof charset - 1);
            str[n] = charset[key];
        }
        str[size] = '\0';
    }
    return str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x3c12
movq %rsi, %r14
decq %r14
je 0x3c0d
xorl %r15d, %r15d
leaq 0x580f(%rip), %r12      # 0x93e0
callq 0x2510
cltq
imulq $-0x7bdef7bd, %rax, %rcx # imm = 0x84210843
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x5, %ecx
addl %edx, %ecx
movl %ecx, %edx
shll $0x6, %edx
addl %ecx, %ecx
subl %edx, %ecx
addl %eax, %ecx
movslq %ecx, %rax
movb (%rax,%r12), %al
movb %al, (%rbx,%r15)
incq %r15
cmpq %r15, %r14
jne 0x3bd1
movb $0x0, (%rbx,%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/utility/hash_table/hash_table.c
// Function: ht_init
void *ht_init(int max_cnt)
{
    ht_t *p = NULL;
    int len = max_cnt * sizeof(ht_item_t);

    if (max_cnt <= 0) {
        return NULL;
    }

    p = malloc(sizeof(ht_t));
    if (NULL == p) {
        return NULL;
    }
    memset(p, 0, sizeof(ht_t));

    p->item = malloc(len);
    if (NULL == p->item) {
        free(p);
        return NULL;
    }
    memset(p->item, 0, len);
    pthread_mutex_init(&p->locker , NULL);

    p->cnt = max_cnt;
    return p;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testl %edi, %edi
jle 0x3d0a
movl %edi, %ebp
movl $0x38, %edi
callq 0x2150
testq %rax, %rax
je 0x3d0a
movq %rax, %rbx
movl %ebp, %eax
shll $0x5, %eax
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq $0x0, 0x30(%rbx)
movslq %eax, %r14
movq %r14, %rdi
callq 0x2150
movq %rax, 0x30(%rbx)
testq %rax, %rax
je 0x3d02
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x2090
movq %rbx, %rdi
addq $0x8, %rdi
xorl %esi, %esi
callq 0x21d0
movl %ebp, (%rbx)
jmp 0x3d0c
movq %rbx, %rdi
callq 0x2250
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/utility/hash_table/hash_table.c
// Function: ht_find_lockless
void *ht_find_lockless(void *ht, const void *key, unsigned int key_len, void *val, int *size_val)
{
    ht_item_t *p = _ht_find_lockless(ht, key, key_len);
    void *ret = NULL;

    while (p) {
        if (p->key && !memcmp(p->key, key, key_len)) {
            ret = p->val;
            break;
        }
        p = p->next;
    }

    if (ret && val && size_val) {
        memcpy(val, ret, p->size_val > *size_val ? *size_val : p->size_val);
        *size_val = p->size_val;
    }

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r13
callq 0x3dc5
movq %rax, %r15
testq %rax, %rax
je 0x3d7c
movl %ebp, %ebp
xorl %r12d, %r12d
movq (%r15), %rdi
testq %rdi, %rdi
je 0x3d71
movq %r13, %rsi
movq %rbp, %rdx
callq 0x2350
testl %eax, %eax
je 0x3d81
movq 0x18(%r15), %r15
testq %r15, %r15
jne 0x3d5a
jmp 0x3d85
xorl %r12d, %r12d
jmp 0x3d85
movq 0x8(%r15), %r12
testq %rbx, %rbx
je 0x3db3
testq %r14, %r14
je 0x3db3
testq %r12, %r12
je 0x3db3
movl 0x10(%r15), %eax
movl (%rbx), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movslq %ecx, %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x2570
movl 0x10(%r15), %eax
movl %eax, (%rbx)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/utility/hash_table/hash_table.c
// Function: ht_find_lockless
static ht_item_t *_ht_find_lockless(void *ht, const void *key, unsigned int key_len)
{
    unsigned int pos = 0;
    ht_t *pt = (ht_t *)ht;

    if (!ht || !key || key_len <= 0) {
        return NULL;
    }

    pos = _hash_func((const unsigned char *)key, key_len) % pt->cnt;

    return (pt->item + pos);//users should check the pointer to get all the values.
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testl %edx, %edx
sete %r8b
xorl %eax, %eax
orb %cl, %r8b
jne 0x3e26
movl %edx, %ecx
xorl %edx, %edx
movzbl (%rsi,%rdx), %r8d
incq %rdx
addl %eax, %r8d
movl %r8d, %r9d
shll $0xa, %r9d
addl %r8d, %r9d
movl %r9d, %eax
shrl $0x6, %eax
xorl %r9d, %eax
cmpq %rdx, %rcx
jne 0x3de4
leal (%rax,%rax,8), %eax
movl %eax, %ecx
shrl $0xb, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xf, %eax
addl %ecx, %eax
xorl %edx, %edx
divl (%rdi)
movl %edx, %eax
shlq $0x5, %rax
addq 0x30(%rdi), %rax
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/utility/hash_table/hash_table.c
// Function: ht_find
void *ht_find(void *ht, const void *key, unsigned int key_len, void *val, int *size_val)
{
    void *ret = NULL;

    ht_lock(ht);
    ret = ht_find_lockless(ht, key, key_len, val, size_val);
    ht_unlock(ht);
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %r14
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %rbx
testq %rdi, %rdi
je 0x3e4b
leaq 0x8(%rbx), %rdi
callq 0x2500
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %r15, %rcx
movq %r14, %r8
callq 0x3d32
movq %rax, %r14
testq %rbx, %rbx
je 0x3e72
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x2560
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/utility/hash_table/hash_table.c
// Function: ht_add
int ht_add(void *ht, const void *key, unsigned int len_key, const void *val, unsigned int size_val)
{
    int ret = 0;
    ht_lock(ht);
    ret = ht_add_lockless(ht, key, len_key, val, size_val);
    ht_unlock(ht);

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebp
movq %rcx, %r14
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
testq %rdi, %rdi
je 0x407a
leaq 0x8(%rbx), %rdi
callq 0x2500
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
movq %r14, %rcx
movl %ebp, %r8d
callq 0x3e7e
movl %eax, %ebp
testq %rbx, %rbx
je 0x40a1
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x2560
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/utility/hash_table/hash_table.c
// Function: ht_del_node
static int _ht_del_node(void *ht_item, const void *key, unsigned int len_key)
{
    ht_item_t *p_tmp = NULL;
    ht_item_t *next = NULL;
    ht_item_t *parent = NULL; // the root node or previous node
    int flag = 0;
    int ret = -1;

    if (!ht_item) {
        return ret;
    }

    parent = (ht_item_t *)ht_item;
    while (parent) {
        if (parent->key && parent->val &&
                (!key || !memcmp(parent->key, key, len_key))) {
            next = parent->next;//store its next item befroe free.

            free(parent->key);
            parent->key = NULL;
            free(parent->val);
            parent->val = NULL;
            ret = 0;
            if (1 == flag) {//just free the added item not the root item.
                free(parent);
                p_tmp->next = next;
            } else {
                p_tmp = parent;
            }

            if (key) {
                break;
            }
            parent = next;
        } else {
            p_tmp = parent;
            parent = parent->next;
        }
        flag = 1;
    }

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x8(%rsp)
testq %rdi, %rdi
je 0x417d
movq %rdi, %r15
movl %edx, %eax
movq %rax, 0x10(%rsp)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
xorl %r13d, %r13d
movq (%r15), %r12
testq %r12, %r12
je 0x4129
cmpq $0x0, 0x8(%r15)
je 0x4129
cmpq $0x0, 0x8(%rsp)
je 0x412f
movq %r12, %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x2350
testl %eax, %eax
je 0x412f
movq 0x18(%r15), %rbx
jmp 0x416d
movq 0x18(%r15), %rbx
movq %r12, %rdi
callq 0x2250
xorl %r12d, %r12d
movq %r12, (%r15)
movq 0x8(%r15), %rdi
callq 0x2250
movq %r12, 0x8(%r15)
testb $0x1, %r14b
je 0x4163
movq %r15, %rdi
callq 0x2250
movq %rbx, 0x18(%r13)
movq %r13, %r15
xorl %ebp, %ebp
cmpq $0x0, 0x8(%rsp)
jne 0x4182
movq %r15, %r13
movb $0x1, %r14b
movq %rbx, %r15
testq %rbx, %rbx
jne 0x40fc
jmp 0x4182
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiaowenhuyuehu[P]remote_access/src/utility/hash_table/hash_table.c
// Function: ht_del
int ht_del(void *ht, const void *key, unsigned int len_key)
{
    int ret = 0;
    ht_lock(ht);
    ret = ht_del_lockless(ht, key, len_key);
    ht_unlock(ht);

    return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
testq %rdi, %rdi
je 0x41ad
leaq 0x8(%rbx), %rdi
callq 0x2500
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x3dc5
movq %rax, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x40cb
movl %eax, %ebp
testq %rbx, %rbx
je 0x41da
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x2560
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq