// File: /workspace/github_cpp_makefile_star2_O3/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 0x3ccc(%rip), %rdx      # 0x6150
xorl %edi, %edi
movl $0x1, %esi
callq 0x2140
cmpl $0x1, %eax
jne 0x24a5
leaq 0x1b68(%rip), %rdi      # 0x4004
xorl %eax, %eax
callq 0x2fc4
jmp 0x24b3
leaq 0x1b7a(%rip), %rdi      # 0x4026
xorl %eax, %eax
callq 0x3202
leaq 0x3dae(%rip), %rdx      # 0x6268
movl $0x1, %edi
movl $0x2, %esi
callq 0x2140
cmpl $0x1, %eax
jne 0x24de
leaq 0x1b70(%rip), %rdi      # 0x4045
xorl %eax, %eax
callq 0x2fc4
jmp 0x24ec
leaq 0x1b82(%rip), %rdi      # 0x4067
xorl %eax, %eax
callq 0x3202
leaq 0x3c5d(%rip), %rsi      # 0x6150
leaq 0x3e86(%rip), %rdx      # 0x6380
xorl %edi, %edi
callq 0x2050
leaq 0x3d60(%rip), %rsi      # 0x6268
leaq 0x3f29(%rip), %rdx      # 0x6438
movl $0x1, %edi
callq 0x2050
leaq 0x20(%rsp), %rbx
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %r15
movabsq $0x40028f5c28f5c28f, %rbp # imm = 0x40028F5C28F5C28F
leaq 0x18(%rsp), %r12
leaq 0x10(%rsp), %r13
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x2060
movl $0xa, 0xc(%rsp)
movl $0x7a, 0x8(%rsp)
movl $0x4, %esi
movl $0x4, %ecx
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x2100
xorl %edi, %edi
movl $0x1, %esi
movq %rbx, %rdx
callq 0x2060
movabsq $0x4010eb851eb851ec, %rax # imm = 0x4010EB851EB851EC
movq %rax, 0x18(%rsp)
movq %rbp, 0x10(%rsp)
movl $0x8, %esi
movl $0x8, %ecx
movq %rbx, %rdi
movq %r12, %rdx
movq %r13, %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x2100
movl $0x1, %edi
movl $0x2, %esi
movq %rbx, %rdx
callq 0x2060
movl $0x14, 0xc(%rsp)
movl $0x1e, 0x8(%rsp)
movl $0x4, %esi
movl $0x4, %ecx
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x2100
movl $0x1, %edi
movl $0x3, %esi
movq %rbx, %rdx
callq 0x2060
movl $0x1, %edi
callq 0x20d0
jmp 0x253c
nop