// File: /workspace/github_c_makefile_star2_O2/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 $0x278, %rsp            # imm = 0x278
movl %r9d, 0x8(%rsp)
movq %r8, %rbp
movl %ecx, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %r13
movq %rdi, %r14
pushq $0x10
popq %rbx
movq %rbx, %rdi
callq 0x3290
movq %rax, %r12
movq %rbx, %rdi
callq 0x3290
movq %rax, %r15
pushq $0x8
popq %rdi
callq 0x3290
movq %rax, %rbx
xorps %xmm0, %xmm0
leaq 0x1f0(%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 0x741c(%rip), %rdx      # 0x4efe2
movl $0x80, %esi
movq %r13, 0x28(%rsp)
movq %r13, %rcx
xorl %eax, %eax
callq 0x3150
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x1e0(%rsp)
movaps %xmm0, 0x1d0(%rsp)
movaps %xmm0, 0x1c0(%rsp)
movaps %xmm0, 0x1b0(%rsp)
cmpl $0x1, 0x8(%rsp)
movq %r14, 0x20(%rsp)
jne 0x47c64
leaq 0x1b0(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rsi
callq 0x47198
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x471c3
leaq 0x73af(%rip), %rdi      # 0x4eff6
movq %r14, %rsi
xorl %eax, %eax
callq 0x3140
leaq 0x73a8(%rip), %rdi      # 0x4f000
movq %r13, %rsi
xorl %eax, %eax
callq 0x3140
jmp 0x47c71
leaq 0x30(%rsp), %rdi
movq %rbp, %rsi
callq 0x3090
movl 0x10(%rsp), %eax
cmpl $0x3, %eax
ja 0x48418
movl %eax, %eax
leaq 0x71dd(%rip), %rcx      # 0x4ee64
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movq %rbx, 0x8(%rsp)
jmpq *%rax
pushq $0x8
popq %rdi
callq 0x3290
movq %rax, %r14
movq %rax, (%r12)
leaq 0x7361(%rip), %rdi      # 0x4f00c
callq 0x33a0
movq %rax, (%r14)
movl $0x1, 0x8(%r12)
pushq $0x40
popq %rdi
callq 0x3290
movq %rax, %r14
movq %rax, (%r15)
leaq 0x4b79(%rip), %rdi      # 0x4c84a
callq 0x33a0
movq %rax, (%r14)
leaq 0x4923(%rip), %rdi      # 0x4c603
callq 0x33a0
movq %rax, 0x8(%r14)
leaq 0x7325(%rip), %rdi      # 0x4f015
callq 0x33a0
movq %rax, 0x10(%r14)
leaq 0x7322(%rip), %rdi      # 0x4f022
callq 0x33a0
movq %rax, 0x18(%r14)
leaq 0x731f(%rip), %rdi      # 0x4f02f
callq 0x33a0
movq %rax, 0x20(%r14)
leaq 0x7322(%rip), %rdi      # 0x4f042
callq 0x33a0
movq %rax, 0x28(%r14)
movl $0x6, 0x8(%r15)
subq $0x8, %rsp
leaq 0x59f6(%rip), %rax      # 0x4d732
leaq 0x1f8(%rsp), %rdx
leaq 0x38(%rsp), %r8
movq 0x28(%rsp), %r14
movq %r14, %rdi
movq 0x30(%rsp), %rsi
movq 0x20(%rsp), %rcx
jmp 0x47ec1
pushq $0x8
popq %rdi
callq 0x3290
movq %rax, %r14
movq %rax, (%r12)
leaq 0x730d(%rip), %rdi      # 0x4f083
jmp 0x47e12
pushq $0x8
popq %rdi
callq 0x3290
movq %rax, %r14
movq %rax, (%r12)
leaq 0x72f8(%rip), %rdi      # 0x4f089
callq 0x33a0
movq %rax, (%r14)
movl $0x1, 0x8(%r12)
pushq $0x40
popq %rdi
callq 0x3290
movq %rax, %r14
movq %rax, (%r15)
leaq 0x4a93(%rip), %rdi      # 0x4c84a
callq 0x33a0
movq %rax, (%r14)
leaq 0x483d(%rip), %rdi      # 0x4c603
callq 0x33a0
movq %rax, 0x8(%r14)
leaq 0x72b9(%rip), %rdi      # 0x4f08f
callq 0x33a0
movq %rax, 0x10(%r14)
leaq 0x72b4(%rip), %rdi      # 0x4f09a
callq 0x33a0
movq %rax, 0x18(%r14)
movl $0x4, 0x8(%r15)
jmp 0x47e99
pushq $0x8
popq %rdi
callq 0x3290
movq %rax, %r14
movq %rax, (%r12)
leaq 0x7245(%rip), %rdi      # 0x4f057
callq 0x33a0
movq %rax, (%r14)
movl $0x1, 0x8(%r12)
pushq $0x40
popq %rdi
callq 0x3290
movq %rax, %r13
movq %rax, (%r15)
leaq 0x4a12(%rip), %rdi      # 0x4c84a
callq 0x33a0
movq %rax, (%r13)
leaq 0x47bb(%rip), %rdi      # 0x4c603
callq 0x33a0
movq %rax, 0x8(%r13)
leaq 0x7208(%rip), %rdi      # 0x4f060
callq 0x33a0
movq %rax, 0x10(%r13)
leaq 0x7203(%rip), %rdi      # 0x4f06b
callq 0x33a0
movq %rax, 0x18(%r13)
leaq 0x71fe(%rip), %rdi      # 0x4f076
callq 0x33a0
movq %rax, 0x20(%r13)
leaq 0x71a7(%rip), %rdi      # 0x4f02f
callq 0x33a0
movq %rax, 0x28(%r13)
movl $0x6, 0x8(%r15)
subq $0x8, %rsp
leaq 0x588e(%rip), %rax      # 0x4d732
leaq 0x1f8(%rsp), %rdx
movq 0x28(%rsp), %r14
movq %r14, %rdi
movq 0x30(%rsp), %rsi
movq 0x20(%rsp), %rcx
movq %rbp, %r8
movq %r12, %r9
pushq %rbx
pushq $0x0
pushq $0x0
pushq %r15
pushq %rax
pushq $0x14
pushq $0x0
callq 0x33266
addq $0x40, %rsp
movl %eax, %ebp
movq 0x2b0(%rsp), %r13
xorl %ebx, %ebx
movslq 0x8(%r12), %rax
movq (%r12), %rdi
cmpq %rax, %rbx
jge 0x47f0f
movq (%rdi,%rbx,8), %rdi
testq %rdi, %rdi
je 0x47f0a
callq 0x3030
movq (%r12), %rax
andq $0x0, (%rax,%rbx,8)
incq %rbx
jmp 0x47ee5
callq 0x3030
movq %r12, %rdi
callq 0x3030
xorl %ebx, %ebx
movslq 0x8(%r15), %rax
movq (%r15), %rdi
cmpq %rax, %rbx
jge 0x47f45
movq (%rdi,%rbx,8), %rdi
testq %rdi, %rdi
je 0x47f40
callq 0x3030
movq (%r15), %rax
andq $0x0, (%rax,%rbx,8)
incq %rbx
jmp 0x47f1e
callq 0x3030
movq %r15, %rdi
callq 0x3030
cmpl $0x4, %ebp
je 0x4839c
testl %ebp, %ebp
movq 0x8(%rsp), %rbx
jne 0x483d4
leaq 0x7327(%rip), %rdi      # 0x4f296
callq 0x30a0
movq (%rbx), %rax
movq (%rax), %rax
movl 0x8(%rax), %esi
leaq 0x7132(%rip), %rdi      # 0x4f0b6
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x3140
movq (%rbx), %rax
movq (%rax), %rcx
movl 0x8(%rcx), %ecx
testl %ecx, %ecx
cmovlel %r14d, %ecx
leaq 0x70ff(%rip), %rdi      # 0x4f0a3
leaq 0x7104(%rip), %r15      # 0x4f0af
leaq 0x7108(%rip), %r12      # 0x4f0ba
xorl %ebp, %ebp
movq %rcx, 0x18(%rsp)
cmpq %rcx, %rbp
je 0x48410
movq (%rax), %rax
movq (%rax), %rax
movq (%rax,%rbp,8), %rax
movq (%rax), %rsi
xorl %eax, %eax
callq 0x3140
movq (%rbx), %rax
movq (%rax), %rax
movq (%rax), %rbx
testq %r13, %r13
je 0x47ff4
movq (%rbx,%rbp,8), %rax
movq (%rax), %rdi
callq 0x33a0
movq %rax, 0x8(%r13)
movq (%rbx,%rbp,8), %rax
movq 0x8(%rax), %rax
movl 0x8(%rax), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x3140
movq 0x8(%rsp), %rbx
movq (%rbx), %rax
movq (%rax), %rcx
movq (%rcx), %rcx
movq %rbp, 0x10(%rsp)
movq (%rcx,%rbp,8), %rcx
movq 0x8(%rcx), %rcx
movl 0x8(%rcx), %ecx
testl %ecx, %ecx
cmovlel %r14d, %ecx
xorl %r14d, %r14d
movq %rcx, 0x20(%rsp)
cmpq %rcx, %r14
je 0x48380
movq %r13, %r15
movq %r12, %rdi
movl %r14d, %esi
xorl %eax, %eax
callq 0x3140
xorps %xmm0, %xmm0
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)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
xorl %ebp, %ebp
movq (%rbx), %rax
movq (%rax), %rcx
movq (%rcx), %rcx
movq 0x10(%rsp), %r12
movq (%rcx,%r12,8), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx), %rcx
movq (%rcx), %rdx
movslq 0x8(%rdx), %rdx
cmpq %rdx, %rbp
jge 0x48362
movq (%rcx,%r14,8), %rax
movq (%rax), %rax
movq (%rax,%rbp,8), %rax
movq (%rax), %rsi
leaq 0x6fa7(%rip), %rdi      # 0x4f0d5
xorl %eax, %eax
callq 0x3140
movq (%rbx), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq (%rax), %rax
movq (%rax,%rbp,8), %rax
movq 0x8(%rax), %rsi
leaq 0x6f87(%rip), %rdi      # 0x4f0e6
xorl %eax, %eax
callq 0x3140
movq (%rbx), %rbx
movq (%rbx), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq (%rax), %rax
movq (%rax,%rbp,8), %r13
movq (%r13), %r12
leaq 0x46ba(%rip), %rdi      # 0x4c84a
movq %r12, %rsi
callq 0x3050
testq %r15, %r15
je 0x481d7
testl %eax, %eax
jne 0x481d7
movq 0x8(%r13), %rsi
leaq 0x170(%rsp), %rdi
callq 0x3090
movq (%rbx), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq (%rax), %rax
movq (%rax,%rbp,8), %r13
movq (%r13), %r12
movq 0x8(%rsp), %rbx
leaq 0x6e3f(%rip), %rdi      # 0x4f022
movq %r12, %rsi
callq 0x3050
testq %r15, %r15
je 0x4822d
testl %eax, %eax
jne 0x4822d
movq 0x8(%r13), %rsi
leaq 0x130(%rsp), %rdi
callq 0x47198
movq (%rbx), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq (%rax), %rax
movq (%rax,%rbp,8), %r13
movq (%r13), %r12
leaq 0x6e2c(%rip), %rdi      # 0x4f060
movq %r12, %rsi
callq 0x3050
testq %r15, %r15
je 0x4827e
testl %eax, %eax
jne 0x4827e
movq 0x8(%r13), %rsi
leaq 0xf0(%rsp), %rdi
callq 0x47198
movq (%rbx), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq (%rax), %rax
movq (%rax,%rbp,8), %r13
movq (%r13), %r12
leaq 0x6de6(%rip), %rdi      # 0x4f06b
movq %r12, %rsi
callq 0x3050
testq %r15, %r15
je 0x482cf
testl %eax, %eax
jne 0x482cf
movq 0x8(%r13), %rsi
leaq 0xb0(%rsp), %rdi
callq 0x47198
movq (%rbx), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq (%rax), %rax
movq (%rax,%rbp,8), %r13
movq (%r13), %r12
leaq 0x6da0(%rip), %rdi      # 0x4f076
movq %r12, %rsi
callq 0x3050
testq %r15, %r15
je 0x482f5
testl %eax, %eax
jne 0x482f5
movq 0x8(%r13), %rsi
leaq 0x70(%rsp), %rdi
callq 0x47198
leaq 0x1b0(%rsp), %r12
movq %r12, %rdi
leaq 0x130(%rsp), %rsi
callq 0x3210
testl %eax, %eax
je 0x48400
movq %r12, %rdi
leaq 0xf0(%rsp), %rsi
callq 0x3210
testl %eax, %eax
je 0x48400
movq %r12, %rdi
leaq 0xb0(%rsp), %rsi
callq 0x3210
testl %eax, %eax
je 0x48400
movq %r12, %rdi
leaq 0x70(%rsp), %rsi
callq 0x3210
incq %rbp
testl %eax, %eax
jne 0x480f0
jmp 0x48400
incq %r14
movq %r15, %r13
leaq 0x6d40(%rip), %r15      # 0x4f0af
leaq 0x6d44(%rip), %r12      # 0x4f0ba
movq 0x20(%rsp), %rcx
jmp 0x48035
movq 0x10(%rsp), %rbp
incq %rbp
xorl %r14d, %r14d
movq 0x18(%rsp), %rcx
leaq 0x6d0c(%rip), %rdi      # 0x4f0a3
jmp 0x47fb9
leaq 0x6ec7(%rip), %rdi      # 0x4f26a
callq 0x30a0
movq 0x8(%rsp), %rbx
testq %rbx, %rbx
leaq 0x6ed4(%rip), %rax      # 0x4f28b
leaq 0x6ebe(%rip), %rdi      # 0x4f27c
cmoveq %rax, %rdi
callq 0x30a0
movq %rbx, %rdi
callq 0x3030
pushq $0x4
popq %rbp
jmp 0x4841a
leaq 0x69dd(%rip), %rdi      # 0x4edb8
movl %ebp, %esi
xorl %eax, %eax
callq 0x3140
movq 0x27c0d(%rip), %rax     # 0x6fff8
movq (%rax), %rsi
movq %r14, %rdi
callq 0x460f9
movq %rbx, %rdi
callq 0x3030
jmp 0x4841a
leaq 0x170(%rsp), %rdi
callq 0x33a0
movq %rax, (%r15)
movq %rbx, %rdi
callq 0x3030
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq