// File: /workspace/github_cpp_makefile_star2_O2/fanchenxinok[P]gtest-lcov/main.cpp
// Function: main
int main(void)
 {
       /* ע��Ӧ������receiver */
	BOOL res = FALSE;
	res = apl_registResponser(RES1, RES_MID, &res1_instance);
	if(res == TRUE){
		LOGOUT_NOTICE("regist responser 1 success !!!!!!");
	}else{
		LOGOUT_ERROR("regist responser 1 fail !!!!!!");
	}
	
	res = apl_registResponser(RES2, RES_HIGH, &res2_instance);
	if(res == TRUE){
		LOGOUT_NOTICE("regist responser 2 success !!!!!!");
	}else{
		LOGOUT_ERROR("regist responser 2 fail !!!!!!");
	}
	

       /* ������ע�� */
	apl_registListener(RES1, &res1_instance, &lis1_instance);
	apl_registListener(RES2, &res2_instance, &lis2_instance);
 	while(1){
		 MSG_INFO msgInfo;
		 char msgData[128];

		 msgInfo.resType = RES1;  //���ö�������
		 msgInfo.msg.eventID = R1_FUN1; //����Ӧ����ʲô����
		 apl_sendMessage(RES1, R1_FUN1, msgData); //���Ϳ�ʼ��Ϣ����������

		 //apl_unRegistResponser(RES1);

		 msgInfo.msg.eventID = R1_FUN2;
		 int a = 10, b = 122;
		 apl_msgPacker(msgData,
		 	sizeof(int), &a,
		 	sizeof(int), &b, -1);
		 apl_sendMessage(RES1, R1_FUN2, msgData);

		 msgInfo.resType = RES2;
		 msgInfo.msg.eventID = R2_FUN1;
		 double c = 4.23, d = 2.32;
		 apl_msgPacker(msgData,
		 	sizeof(double), &c,
		 	sizeof(double), &d, -1);
		 apl_sendMessage(RES2, R2_FUN1, msgData);

		 msgInfo.msg.eventID = R2_FUN2;
		 a = 20;
		 b = 30;
		 apl_msgPacker(msgData,
		 	sizeof(int), &a,
		 	sizeof(int), &b, -1);
		 apl_sendMessage(RES2, R2_FUN2, msgData);

		 sleep(1);
 	}
	return 0;
 }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
leaq 0x3cdc(%rip), %rdx      # 0x6140
pushq $0x1
popq %rsi
xorl %edi, %edi
callq 0x2130
cmpl $0x1, %eax
jne 0x2483
leaq 0x1b8a(%rip), %rdi      # 0x4004
xorl %eax, %eax
callq 0x2e1c
jmp 0x2491
leaq 0x1b9c(%rip), %rdi      # 0x4026
xorl %eax, %eax
callq 0x3052
leaq 0x3dc0(%rip), %rdx      # 0x6258
pushq $0x1
popq %rdi
pushq $0x2
popq %rsi
callq 0x2130
cmpl $0x1, %eax
jne 0x24b8
leaq 0x1b96(%rip), %rdi      # 0x4045
xorl %eax, %eax
callq 0x2e1c
jmp 0x24c6
leaq 0x1ba8(%rip), %rdi      # 0x4067
xorl %eax, %eax
callq 0x3052
leaq 0x3c73(%rip), %rsi      # 0x6140
leaq 0x3e9c(%rip), %rdx      # 0x6370
xorl %edi, %edi
callq 0x2040
leaq 0x3d76(%rip), %rsi      # 0x6258
leaq 0x3f3f(%rip), %rdx      # 0x6428
pushq $0x1
popq %rbx
movl %ebx, %edi
callq 0x2040
leaq 0x20(%rsp), %r14
pushq $0x4
popq %r12
pushq $-0x1
popq %rbp
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x2050
movl $0xa, 0xc(%rsp)
movl $0x7a, 0x8(%rsp)
movq %r14, %rdi
movq %r12, %rsi
leaq 0xc(%rsp), %r13
movq %r13, %rdx
movq %r12, %rcx
leaq 0x8(%rsp), %r15
movq %r15, %r8
movl %ebp, %r9d
xorl %eax, %eax
callq 0x20f0
xorl %edi, %edi
movl %ebx, %esi
movq %r14, %rdx
callq 0x2050
movabsq $0x4010eb851eb851ec, %rax # imm = 0x4010EB851EB851EC
movq %rax, 0x18(%rsp)
movabsq $0x40028f5c28f5c28f, %rax # imm = 0x40028F5C28F5C28F
movq %rax, 0x10(%rsp)
movq %r14, %rdi
pushq $0x8
popq %rcx
movq %rcx, %rsi
leaq 0x18(%rsp), %rdx
leaq 0x10(%rsp), %r8
movl %ebp, %r9d
xorl %eax, %eax
callq 0x20f0
movl %ebx, %edi
pushq $0x2
popq %rsi
movq %r14, %rdx
callq 0x2050
movl $0x14, 0xc(%rsp)
movl $0x1e, 0x8(%rsp)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %r15, %r8
movl %ebp, %r9d
xorl %eax, %eax
callq 0x20f0
movl %ebx, %edi
pushq $0x3
popq %rsi
movq %r14, %rdx
callq 0x2050
movl %ebx, %edi
callq 0x20c0
jmp 0x24ff