// File: /workspace/github_c_makefile_star2_O1/loversmile[P]sugarcrm/sugar_function.c
// Function: searchModule
int searchModule(struct soap *soap, const char *soap_endpoint, char *session, enum module_name module_name, char *search_string,
                enum search_type search_type, SGSearchResult *search_result)
{
    struct select_USCOREfields *modules = NULL;
    int offset = 0;
    int max_results = 20;
    char *assigned_user_id = "";//NULL;
    struct select_USCOREfields *select_fields = NULL;
    struct ns1__search_USCOREby_USCOREmoduleResponse *_param_17 = NULL;
    modules = (struct select_USCOREfields *)malloc(sizeof(struct select_USCOREfields ));
    select_fields = (struct select_USCOREfields *)malloc(sizeof(struct select_USCOREfields));
    _param_17 = (struct ns1__search_USCOREby_USCOREmoduleResponse *)malloc(sizeof(struct ns1__search_USCOREby_USCOREmoduleResponse));
    int ret = -1;
    
    char soap_action[128] = {0};
    memset(soap_action, 0, sizeof(soap_action));
    snprintf(soap_action, sizeof(soap_action), "%s/search_by_module", soap_endpoint);
    int item = 0;
	char rel_string[64] = {0};
	char string_number[64] = {0};
    if (CRM_TYPE_PHONE == search_type) 
	{
        //addPercent(rel_string, search_string);
		leave_number(string_number, search_string);
		addPercent(rel_string, string_number);
        printf("rel = %s\n",  rel_string);
		printf("leave = %s\n",  string_number);
    }
	else
	{
		strcpy(rel_string, search_string);
	}
    switch(module_name){
        case CRM_MODULE_ACCOUNTS:
            modules->__ptr = (char**)malloc(sizeof(char*));
            modules->__ptr[0] = strdup("Accounts");
            modules->__size = 1;
            select_fields->__ptr = (char**)malloc(PTR_SIZE);
            select_fields->__ptr[item++] = strdup("id");
            select_fields->__ptr[item++] = strdup("name");
            select_fields->__ptr[item++] = strdup("account_type");
            select_fields->__ptr[item++] = strdup("phone_office");
            select_fields->__ptr[item++] = strdup("assigned_user_name");     
            select_fields->__ptr[item++] = strdup("billing_address_city");
            select_fields->__size = item;

            ret = soap_call_ns1__search_USCOREby_USCOREmodule(soap, soap_endpoint, soap_action, session, rel_string, modules, offset, max_results, "",
                            select_fields, 0, 0, _param_17); 
            break;
        case CRM_MODULE_CONTACTS:
            modules->__ptr = (char**)malloc(sizeof(char*));
            modules->__ptr[0] = strdup("Contacts");
            modules->__size = 1;
            
            select_fields->__ptr = (char**)malloc(PTR_SIZE);
            select_fields->__ptr[item++] = strdup("id");
            select_fields->__ptr[item++] = strdup("name");
            select_fields->__ptr[item++] = strdup("phone_home");
            select_fields->__ptr[item++] = strdup("phone_work");
            select_fields->__ptr[item++] = strdup("phone_mobile");
            select_fields->__ptr[item++] = strdup("assigned_user_name");
            select_fields->__size = item;
            ret = soap_call_ns1__search_USCOREby_USCOREmodule(soap, soap_endpoint, soap_action, session, search_string, modules, offset, max_results, "",
                            select_fields, 0, 0, _param_17); 
            break;
        case CRM_MODULE_LEADS:
            modules->__ptr = (char**)malloc(sizeof(char*));
            modules->__ptr[0] = strdup("Leads");
            modules->__size = 1;
            select_fields->__ptr = (char**)malloc(PTR_SIZE);
            select_fields->__ptr[item++] = strdup("id");
            select_fields->__ptr[item++] = strdup("name");
            select_fields->__ptr[item++] = strdup("phone_home");
            select_fields->__ptr[item++] = strdup("phone_work");
            select_fields->__ptr[item++] = strdup("phone_mobile");
            select_fields->__ptr[item++] = strdup("assigned_user_name");
            select_fields->__size = item;
            ret = soap_call_ns1__search_USCOREby_USCOREmodule(soap, soap_endpoint, soap_action, session, search_string, modules, offset, max_results, "",
                            select_fields, 0, 0, _param_17); 
            break;
        case CRM_MODULE_CALLS:
            modules->__ptr = (char**)malloc(sizeof(char*));
            modules->__ptr[0] = strdup("Calls");
            modules->__size = 1;
            select_fields->__ptr = (char**)malloc(PTR_SIZE);
            select_fields->__ptr[item++] = strdup("id");
            select_fields->__ptr[item++] = strdup("name");
            select_fields->__ptr[item++] = strdup("date_start");
            select_fields->__ptr[item++] = strdup("date_end");
            select_fields->__size = item;
            ret = soap_call_ns1__search_USCOREby_USCOREmodule(soap, soap_endpoint, soap_action, session, search_string, modules, offset, max_results, "",
                            select_fields, 0, 0, _param_17); 
            break;
        default:
            return 0;
            break;
    }

	int f = 0;
	for (f = 0; f < modules->__size; f++) {
		SAFE_FREE(modules->__ptr[f]);
	}
	SAFE_FREE(modules->__ptr);
	SAFE_FREE(modules);
	
		//modules->__ptr[f] = NULL;
	for (f = 0; f < select_fields->__size; f++) {
		SAFE_FREE(select_fields->__ptr[f]);
	}
	SAFE_FREE(select_fields->__ptr);
	SAFE_FREE(select_fields);

    
    if (ret == SOAP_OK) {
        printf("Search Success!\n");
        printf("%d\n", _param_17->return_->entry_USCORElist->__size);
        int value_size = _param_17->return_->entry_USCORElist->__size;
        int i = 0;
        for (i = 0; i < value_size; i++){
            printf("name  = %s\n", _param_17->return_->entry_USCORElist->__ptr[i]->name);
            if (search_result != NULL)
                search_result->module = strdup(_param_17->return_->entry_USCORElist->__ptr[i]->name);
            printf("size = %d\n", _param_17->return_->entry_USCORElist->__ptr[i]->records->__size);
            int records_size = _param_17->return_->entry_USCORElist->__ptr[i]->records->__size;
            for (int j = 0; j < records_size; j++) {
                printf("record[%d] -------------I\n", j);
				char return_id[64] = {0};
				char return_phone_office[64] = {0};
				char return_phone_home[64] = {0};
				char return_phone_work[64] = {0};
				char return_phone_mobile[64] = {0};
                for(int k = 0; k < _param_17->return_->entry_USCORElist->__ptr[i]->records->__ptr[0]->__size; k++) {
                    printf("    name   = %s\n", _param_17->return_->entry_USCORElist->__ptr[i]->records->__ptr[j]->__ptr[k]->name);
                    printf("    value  = %s\n", _param_17->return_->entry_USCORElist->__ptr[i]->records->__ptr[j]->__ptr[k]->value);
                    if (!strcasecmp("id", _param_17->return_->entry_USCORElist->__ptr[i]->records->__ptr[j]->__ptr[k]->name)) {
                        if (search_result != NULL) {
                        	//*result_char = strdup(_param_17->return_->entry_USCORElist->__ptr[i]->records->__ptr[j]->__ptr[k]->value);
                        	strcpy(return_id, _param_17->return_->entry_USCORElist->__ptr[i]->records->__ptr[j]->__ptr[k]->value);
                            //search_result->id = strdup(_param_17->return_->entry_USCORElist->__ptr[i]->records->__ptr[j]->__ptr[k]->value);
                        }
                    }
					if (!strcasecmp("phone_office", _param_17->return_->entry_USCORElist->__ptr[i]->records->__ptr[j]->__ptr[k]->name)) 
					{
						if (search_result != NULL) {
                        	leave_number(return_phone_office, _param_17->return_->entry_USCORElist->__ptr[i]->records->__ptr[j]->__ptr[k]->value);
                        }
					}
					if (!strcasecmp("phone_home", _param_17->return_->entry_USCORElist->__ptr[i]->records->__ptr[j]->__ptr[k]->name)) 
					{
						if (search_result != NULL) {
                        	leave_number(return_phone_home, _param_17->return_->entry_USCORElist->__ptr[i]->records->__ptr[j]->__ptr[k]->value);
                        }
					}
					if (!strcasecmp("phone_work", _param_17->return_->entry_USCORElist->__ptr[i]->records->__ptr[j]->__ptr[k]->name)) 
					{
						if (search_result != NULL) {
                        	leave_number(return_phone_work, _param_17->return_->entry_USCORElist->__ptr[i]->records->__ptr[j]->__ptr[k]->value);
                        }
					}
					if (!strcasecmp("phone_mobile", _param_17->return_->entry_USCORElist->__ptr[i]->records->__ptr[j]->__ptr[k]->name)) 
					{
						if (search_result != NULL) {
                        	leave_number(return_phone_mobile, _param_17->return_->entry_USCORElist->__ptr[i]->records->__ptr[j]->__ptr[k]->value);
                        }
					}
					if (!strcmp(string_number, return_phone_office) || 
						!strcmp(string_number, return_phone_home) ||
						!strcmp(string_number, return_phone_work) ||
						!strcmp(string_number, return_phone_mobile))
					{
						search_result->id = strdup(return_id);
						SAFE_FREE(_param_17);
						return ret;
					}
                }
            }
        }
		SAFE_FREE(_param_17);
        return ret;
    } else if (ret == SOAP_TYPE) {
        printf("Result not match!\n");
        if (_param_17 == NULL)
            printf("17 is null\n");
        else
            printf("17 is not null\n");
		SAFE_FREE(_param_17);
        return ret;
    } else {
        printf("ret = %d\n", ret);
        soap_print_fault(soap, stderr);
		SAFE_FREE(_param_17);
        return ret;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movl %r9d, %ebp
movq %r8, %r14
movl %ecx, %r13d
movq %rdx, 0x8(%rsp)
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
movl $0x10, %edi
callq 0x3280
movq %rax, %r12
movl $0x10, %edi
callq 0x3280
movq %rax, %r15
movl $0x8, %edi
callq 0x3280
movq %rax, (%rsp)
xorps %xmm0, %xmm0
leaq 0x1e0(%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 0x6fd4(%rip), %rdx      # 0x53fe2
movl $0x80, %esi
movq %rbx, 0x18(%rsp)
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3150
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
cmpl $0x1, %ebp
jne 0x4d086
testq %r14, %r14
je 0x4d09d
movb (%r14), %dl
testb %dl, %dl
je 0x4d095
leaq 0x1(%r14), %rcx
leaq 0x20(%rsp), %rax
leal -0x3a(%rdx), %esi
cmpb $-0xa, %sil
jb 0x4d07b
movb %dl, (%rax)
incq %rax
movb (%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x4d06d
jmp 0x4d09a
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
callq 0x3090
jmp 0x4d0f4
leaq 0x20(%rsp), %rax
movb $0x0, (%rax)
cmpb $0x0, 0x20(%rsp)
je 0x4d0c6
leaq 0x60(%rsp), %rax
leaq 0x21(%rsp), %rcx
movb $0x25, (%rax)
movb -0x1(%rcx), %dl
movb %dl, 0x1(%rax)
addq $0x2, %rax
cmpb $0x0, (%rcx)
leaq 0x1(%rcx), %rcx
jne 0x4d0ae
jmp 0x4d0cb
leaq 0x60(%rsp), %rax
movb $0x0, (%rax)
leaq 0x6f21(%rip), %rdi      # 0x53ff6
leaq 0x60(%rsp), %rsi
xorl %eax, %eax
callq 0x3140
leaq 0x6f18(%rip), %rdi      # 0x54000
leaq 0x20(%rsp), %rsi
xorl %eax, %eax
callq 0x3140
cmpl $0x3, %r13d
ja 0x4d975
movl %r13d, %eax
leaq 0x6d5c(%rip), %rcx      # 0x53e64
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x8, %edi
callq 0x3280
movq %rax, %r14
movq %rax, (%r12)
leaq 0x6ee3(%rip), %rdi      # 0x5400c
callq 0x3380
movq %rax, (%r14)
movl $0x1, 0x8(%r12)
movl $0x40, %edi
callq 0x3280
movq %rax, %r14
movq %rax, (%r15)
leaq 0x46f9(%rip), %rdi      # 0x5184a
callq 0x3380
movq %rax, (%r14)
leaq 0x44a3(%rip), %rdi      # 0x51603
callq 0x3380
movq %rax, 0x8(%r14)
leaq 0x6ea5(%rip), %rdi      # 0x54015
callq 0x3380
movq %rax, 0x10(%r14)
leaq 0x6ea2(%rip), %rdi      # 0x54022
callq 0x3380
movq %rax, 0x18(%r14)
leaq 0x6e9f(%rip), %rdi      # 0x5402f
callq 0x3380
movq %rax, 0x20(%r14)
leaq 0x6ea2(%rip), %rdi      # 0x54042
callq 0x3380
movq %rax, 0x28(%r14)
movl $0x6, 0x8(%r15)
subq $0x8, %rsp
xorl %eax, %eax
leaq 0x5574(%rip), %r10      # 0x52732
leaq 0x1e8(%rsp), %rdx
leaq 0x68(%rsp), %r8
movq 0x18(%rsp), %r13
movq %r13, %rdi
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rcx
jmp 0x4d352
movl $0x8, %edi
callq 0x3280
movq %rax, %r13
movq %rax, (%r12)
leaq 0x6e89(%rip), %rdi      # 0x54083
jmp 0x4d29e
movl $0x8, %edi
callq 0x3280
movq %rax, %r13
movq %rax, (%r12)
leaq 0x6e72(%rip), %rdi      # 0x54089
callq 0x3380
movq %rax, (%r13)
movl $0x1, 0x8(%r12)
movl $0x40, %edi
callq 0x3280
movq %rax, %r13
movq %rax, (%r15)
leaq 0x460a(%rip), %rdi      # 0x5184a
callq 0x3380
movq %rax, (%r13)
leaq 0x43b3(%rip), %rdi      # 0x51603
callq 0x3380
movq %rax, 0x8(%r13)
leaq 0x6e2f(%rip), %rdi      # 0x5408f
callq 0x3380
movq %rax, 0x10(%r13)
leaq 0x6e2a(%rip), %rdi      # 0x5409a
callq 0x3380
movq %rax, 0x18(%r13)
movl $0x4, 0x8(%r15)
jmp 0x4d328
movl $0x8, %edi
callq 0x3280
movq %rax, %r13
movq %rax, (%r12)
leaq 0x6db9(%rip), %rdi      # 0x54057
callq 0x3380
movq %rax, (%r13)
movl $0x1, 0x8(%r12)
movl $0x40, %edi
callq 0x3280
movq %rax, %r13
movq %rax, (%r15)
leaq 0x4583(%rip), %rdi      # 0x5184a
callq 0x3380
movq %rax, (%r13)
leaq 0x432c(%rip), %rdi      # 0x51603
callq 0x3380
movq %rax, 0x8(%r13)
leaq 0x6d79(%rip), %rdi      # 0x54060
callq 0x3380
movq %rax, 0x10(%r13)
leaq 0x6d74(%rip), %rdi      # 0x5406b
callq 0x3380
movq %rax, 0x18(%r13)
leaq 0x6d6f(%rip), %rdi      # 0x54076
callq 0x3380
movq %rax, 0x20(%r13)
leaq 0x6d18(%rip), %rdi      # 0x5402f
callq 0x3380
movq %rax, 0x28(%r13)
movl $0x6, 0x8(%r15)
subq $0x8, %rsp
xorl %eax, %eax
leaq 0x53fd(%rip), %r10      # 0x52732
leaq 0x1e8(%rsp), %rdx
movq 0x18(%rsp), %r13
movq %r13, %rdi
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rcx
movq %r14, %r8
movq %r12, %r9
pushq 0x8(%rsp)
pushq %rax
pushq %rax
pushq %r15
pushq %r10
pushq $0x14
pushq %rax
callq 0x36175
addq $0x40, %rsp
movl %eax, %ebp
cmpl $0x0, 0x8(%r12)
jle 0x4d3a3
xorl %r14d, %r14d
movq (%r12), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x4d396
callq 0x3030
movq (%r12), %rax
movq $0x0, (%rax,%r14,8)
incq %r14
movslq 0x8(%r12), %rax
cmpq %rax, %r14
jl 0x4d378
movq (%r12), %rdi
testq %rdi, %rdi
je 0x4d3b9
callq 0x3030
movq $0x0, (%r12)
movq %r12, %rdi
callq 0x3030
cmpl $0x0, 0x8(%r15)
movq (%rsp), %r12
jle 0x4d3f7
xorl %r14d, %r14d
movq (%r15), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x4d3eb
callq 0x3030
movq (%r15), %rax
movq $0x0, (%rax,%r14,8)
incq %r14
movslq 0x8(%r15), %rax
cmpq %rax, %r14
jl 0x4d3cf
movq (%r15), %rdi
testq %rdi, %rdi
je 0x4d40b
callq 0x3030
movq $0x0, (%r15)
movq %r15, %rdi
callq 0x3030
cmpl $0x4, %ebp
je 0x4d917
testl %ebp, %ebp
jne 0x4d944
leaq 0x6e6b(%rip), %rdi      # 0x54296
callq 0x30a0
movq (%r12), %rax
movq (%rax), %rax
movl 0x8(%rax), %esi
leaq 0x6c75(%rip), %rdi      # 0x540b6
xorl %eax, %eax
callq 0x3140
movq (%r12), %rax
movq (%rax), %rax
movslq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jle 0x4d90b
movq 0x2a0(%rsp), %rbx
xorl %r14d, %r14d
movq (%r12), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq (%rax), %rsi
leaq 0x6c1f(%rip), %rdi      # 0x540a3
xorl %eax, %eax
callq 0x3140
testq %rbx, %rbx
je 0x4d4aa
movq (%r12), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq (%rax), %rdi
callq 0x3380
movq %rax, 0x8(%rbx)
movq (%r12), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rax
movl 0x8(%rax), %esi
leaq 0x6be9(%rip), %rdi      # 0x540af
xorl %eax, %eax
callq 0x3140
movq (%r12), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rax
movslq 0x8(%rax), %rcx
movl $0xc, %eax
movq %rcx, 0x10(%rsp)
testq %rcx, %rcx
jle 0x4d8f4
xorl %r15d, %r15d
xorl %ebp, %ebp
leaq 0x6bb8(%rip), %rdi      # 0x540ba
movl %r15d, %esi
xorl %eax, %eax
callq 0x3140
xorps %xmm0, %xmm0
movaps %xmm0, 0x1d0(%rsp)
movaps %xmm0, 0x1c0(%rsp)
movaps %xmm0, 0x1b0(%rsp)
movaps %xmm0, 0x1a0(%rsp)
movaps %xmm0, 0x190(%rsp)
movaps %xmm0, 0x180(%rsp)
movaps %xmm0, 0x170(%rsp)
movaps %xmm0, 0x160(%rsp)
movaps %xmm0, 0x150(%rsp)
movaps %xmm0, 0x140(%rsp)
movaps %xmm0, 0x130(%rsp)
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0x110(%rsp)
movaps %xmm0, 0x100(%rsp)
movaps %xmm0, 0xf0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xa0(%rsp)
movq (%r12), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax), %rcx
cmpl $0x0, 0x8(%rcx)
setg %cl
jle 0x4d8d8
xorl %r13d, %r13d
movb %cl, (%rsp)
movq (%rax,%r15,8), %rax
movq (%rax), %rax
movq (%rax,%r13,8), %rax
movq (%rax), %rsi
leaq 0x6ae6(%rip), %rdi      # 0x540d5
xorl %eax, %eax
callq 0x3140
movq (%r12), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax,%r15,8), %rax
movq (%rax), %rax
movq (%rax,%r13,8), %rax
movq 0x8(%rax), %rsi
leaq 0x6ac5(%rip), %rdi      # 0x540e6
xorl %eax, %eax
callq 0x3140
movq %r12, %rbp
movq (%r12), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax,%r15,8), %rax
movq (%rax), %rax
movq (%rax,%r13,8), %r12
movq (%r12), %rsi
leaq 0x41f4(%rip), %rdi      # 0x5184a
callq 0x3050
testq %rbx, %rbx
je 0x4d676
testl %eax, %eax
jne 0x4d676
movq 0x8(%r12), %rsi
leaq 0x1a0(%rsp), %rdi
callq 0x3090
movq (%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax,%r15,8), %rax
movq (%rax), %rax
movq (%rax,%r13,8), %r12
movq (%r12), %rsi
leaq 0x6981(%rip), %rdi      # 0x54022
callq 0x3050
testq %rbx, %rbx
je 0x4d6e4
testl %eax, %eax
jne 0x4d6e4
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x4d6e4
movb (%rax), %dl
leaq 0x160(%rsp), %rcx
testb %dl, %dl
je 0x4d6e1
incq %rax
leal -0x3a(%rdx), %esi
cmpb $-0xa, %sil
jb 0x4d6d8
movb %dl, (%rcx)
incq %rcx
movb (%rax), %dl
incq %rax
testb %dl, %dl
jne 0x4d6ca
movb $0x0, (%rcx)
movq (%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax,%r15,8), %rax
movq (%rax), %rax
movq (%rax,%r13,8), %r12
movq (%r12), %rsi
leaq 0x6951(%rip), %rdi      # 0x54060
callq 0x3050
testq %rbx, %rbx
je 0x4d752
testl %eax, %eax
jne 0x4d752
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x4d752
movb (%rax), %dl
leaq 0x120(%rsp), %rcx
testb %dl, %dl
je 0x4d74f
incq %rax
leal -0x3a(%rdx), %esi
cmpb $-0xa, %sil
jb 0x4d746
movb %dl, (%rcx)
incq %rcx
movb (%rax), %dl
incq %rax
testb %dl, %dl
jne 0x4d738
movb $0x0, (%rcx)
movq (%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax,%r15,8), %rax
movq (%rax), %rax
movq (%rax,%r13,8), %r12
movq (%r12), %rsi
leaq 0x68ee(%rip), %rdi      # 0x5406b
callq 0x3050
testq %rbx, %rbx
je 0x4d7c0
testl %eax, %eax
jne 0x4d7c0
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x4d7c0
movb (%rax), %dl
leaq 0xe0(%rsp), %rcx
testb %dl, %dl
je 0x4d7bd
incq %rax
leal -0x3a(%rdx), %esi
cmpb $-0xa, %sil
jb 0x4d7b4
movb %dl, (%rcx)
incq %rcx
movb (%rax), %dl
incq %rax
testb %dl, %dl
jne 0x4d7a6
movb $0x0, (%rcx)
movq (%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax,%r15,8), %rax
movq (%rax), %rax
movq (%rax,%r13,8), %r12
movq (%r12), %rsi
leaq 0x688b(%rip), %rdi      # 0x54076
callq 0x3050
testq %rbx, %rbx
je 0x4d82e
testl %eax, %eax
jne 0x4d82e
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x4d82e
movb (%rax), %dl
leaq 0xa0(%rsp), %rcx
testb %dl, %dl
je 0x4d82b
incq %rax
leal -0x3a(%rdx), %esi
cmpb $-0xa, %sil
jb 0x4d822
movb %dl, (%rcx)
incq %rcx
movb (%rax), %dl
incq %rax
testb %dl, %dl
jne 0x4d814
movb $0x0, (%rcx)
leaq 0x20(%rsp), %r12
movq %r12, %rdi
leaq 0x160(%rsp), %rsi
callq 0x3200
testl %eax, %eax
je 0x4d8b5
movq %r12, %rdi
leaq 0x120(%rsp), %rsi
callq 0x3200
testl %eax, %eax
je 0x4d8b5
movq %r12, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x3200
testl %eax, %eax
je 0x4d8b5
movq %r12, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x3200
testl %eax, %eax
je 0x4d8b5
incq %r13
movq %rbp, %r12
movq (%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax), %rcx
movslq 0x8(%rcx), %rcx
cmpq %rcx, %r13
setl %cl
jl 0x4d5d7
xorl %ebp, %ebp
jmp 0x4d8d8
leaq 0x1a0(%rsp), %rdi
callq 0x3380
movq %rax, (%rbx)
movq %rbp, %rdi
callq 0x3030
movl $0x1, %ebp
xorl %r12d, %r12d
movb (%rsp), %cl
testb $0x1, %cl
jne 0x4d8f2
incq %r15
cmpq 0x10(%rsp), %r15
jne 0x4d4f9
movl $0xc, %eax
jmp 0x4d8f4
movl %ebp, %eax
cmpl $0xc, %eax
je 0x4d8fd
testl %eax, %eax
jne 0x4d975
incq %r14
cmpq 0x8(%rsp), %r14
jne 0x4d46c
testq %r12, %r12
movl $0x0, %ebp
jne 0x4d96b
jmp 0x4d977
leaq 0x694c(%rip), %rdi      # 0x5426a
callq 0x30a0
testq %r12, %r12
leaq 0x695e(%rip), %rax      # 0x5428b
leaq 0x6948(%rip), %rdi      # 0x5427c
cmoveq %rax, %rdi
callq 0x30a0
movl $0x4, %ebp
jmp 0x4d966
leaq 0x646d(%rip), %rdi      # 0x53db8
movl %ebp, %esi
xorl %eax, %eax
callq 0x3140
movq 0x2469d(%rip), %rax     # 0x71ff8
movq (%rax), %rsi
movq %r13, %rdi
callq 0x4b1d6
testq %r12, %r12
je 0x4d977
movq %r12, %rdi
callq 0x3030
jmp 0x4d977
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq