// File: 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
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movl $0x0, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
xorl %edi, %edi
movl $0x1, %esi
leaq 0x4c29(%rip), %rdx      # 0x7170
callq 0x2160
movl %eax, -0x8(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0x2565
leaq 0x1abc(%rip), %rdi      # 0x4018
movb $0x0, %al
callq 0x3810
jmp 0x2573
leaq 0x1ace(%rip), %rdi      # 0x403a
movb $0x0, %al
callq 0x3ab0
movl $0x1, %edi
movl $0x2, %esi
leaq 0x4d04(%rip), %rdx      # 0x7288
callq 0x2160
movl %eax, -0x8(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0x25a2
leaq 0x1ac0(%rip), %rdi      # 0x4059
movb $0x0, %al
callq 0x3810
jmp 0x25b0
leaq 0x1ad2(%rip), %rdi      # 0x407b
movb $0x0, %al
callq 0x3ab0
xorl %edi, %edi
leaq 0x4bb7(%rip), %rsi      # 0x7170
leaq 0x4de0(%rip), %rdx      # 0x73a0
callq 0x2040
movl $0x1, %edi
leaq 0x4cb7(%rip), %rsi      # 0x7288
leaq 0x4e80(%rip), %rdx      # 0x7458
callq 0x2040
movw $0x0, -0x90(%rbp)
movl $0x0, -0x8c(%rbp)
leaq -0x110(%rbp), %rdx
xorl %esi, %esi
movl %esi, %edi
callq 0x2050
movl $0x1, -0x8c(%rbp)
movl $0xa, -0x114(%rbp)
movl $0x7a, -0x118(%rbp)
leaq -0x110(%rbp), %rdi
movl $0x4, %ecx
leaq -0x114(%rbp), %rdx
leaq -0x118(%rbp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movq %rcx, %rsi
movb $0x0, %al
callq 0x2120
leaq -0x110(%rbp), %rdx
xorl %edi, %edi
movl $0x1, %esi
callq 0x2050
movw $0x1, -0x90(%rbp)
movl $0x2, -0x8c(%rbp)
movsd 0x199a(%rip), %xmm0     # 0x4010
movsd %xmm0, -0x120(%rbp)
movsd 0x1982(%rip), %xmm0     # 0x4008
movsd %xmm0, -0x128(%rbp)
leaq -0x110(%rbp), %rdi
movl $0x8, %ecx
leaq -0x120(%rbp), %rdx
leaq -0x128(%rbp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movq %rcx, %rsi
movb $0x0, %al
callq 0x2120
leaq -0x110(%rbp), %rdx
movl $0x1, %edi
movl $0x2, %esi
callq 0x2050
movl $0x3, -0x8c(%rbp)
movl $0x14, -0x114(%rbp)
movl $0x1e, -0x118(%rbp)
leaq -0x110(%rbp), %rdi
movl $0x4, %ecx
leaq -0x114(%rbp), %rdx
leaq -0x118(%rbp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movq %rcx, %rsi
movb $0x0, %al
callq 0x2120
leaq -0x110(%rbp), %rdx
movl $0x1, %edi
movl $0x3, %esi
callq 0x2050
movl $0x1, %edi
callq 0x20f0
jmp 0x25dd
nopl (%rax,%rax)