// File: /workspace/github_cpp_makefile_star2_O1/CDISC2020[P]Projet_satellite_agile/src/ARINC/ARINC_Com.cpp
// Function: QueuingPort::RecvQueuingMsg(char*)
int QueuingPort::RecvQueuingMsg (char* e_t){;

                int lc_a = sizeof(c_a);
                int le_t;

                cout << "Waiting for input message..." << endl;
                if ((le_t = recvfrom(s_d,e_t,MAXLGMSG,0,(struct sockaddr *)&c_a,(socklen_t *)&lc_a)) == SOCK_ERR) {
                        perror("S-> recvfrom");
                        bye(s_d);
                        }       
                else {
                        h_emetteur = gethostbyaddr(&c_a.sin_addr,sizeof(&c_a.sin_addr),c_a.sin_family); 
                        cout << "S-> client port : " << c_a.sin_port << endl;;
                        cout << "S-> client host : " << h_emetteur->h_name << endl;
                        *(e_t+le_t)='\0';
                        cout << "S-> Buffer(" << le_t << ") : " << e_t << endl;
                }
                return(le_t); // returns the number of char effectively received 
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq -0x2c(%rbp), %r14
movl $0x10, (%r14)
movq 0x61f2(%rip), %r12      # 0x9fd0
leaq 0x330a(%rip), %rsi      # 0x70ef
movl $0x1c, %edx
movq %r12, %rdi
callq 0x32f0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3190
movl 0x404(%r15), %edi
leaq 0x418(%r15), %r8
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rsi
xorl %ecx, %ecx
movq %r14, %r9
callq 0x31e0
movq %rax, %r14
cmpl $-0x1, %r14d
je 0x3fe9
leaq 0x41c(%r15), %rdi
movzwl 0x418(%r15), %edx
movl $0x8, %esi
callq 0x3350
movq %rax, 0x4b8(%r15)
movq 0x6162(%rip), %r12      # 0x9fd0
leaq 0x32a4(%rip), %rsi      # 0x7119
movl $0x12, %edx
movq %r12, %rdi
callq 0x32f0
movzwl 0x41a(%r15), %esi
movq %r12, %rdi
callq 0x3180
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3190
leaq 0x3269(%rip), %rsi      # 0x712c
movl $0x12, %edx
movq %r12, %rdi
callq 0x32f0
movq 0x4b8(%r15), %rax
movq (%rax), %r15
testq %r15, %r15
je 0x3efb
movq %r15, %rdi
callq 0x3130
movq 0x60e2(%rip), %rdi      # 0x9fd0
movq %r15, %rsi
movq %rax, %rdx
callq 0x32f0
jmp 0x3f14
movq (%r12), %rax
movq -0x18(%rax), %rax
leaq (%r12,%rax), %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x3430
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3190
movslq %r14d, %rax
movb $0x0, (%rbx,%rax)
leaq 0x31f5(%rip), %rsi      # 0x713f
movl $0xb, %edx
movq %r12, %rdi
callq 0x32f0
movq %r12, %rdi
movl %r14d, %esi
callq 0x3450
movq %rax, %r15
leaq 0x31df(%rip), %rsi      # 0x714b
movl $0x4, %edx
movq %rax, %rdi
callq 0x32f0
testq %rbx, %rbx
je 0x3f96
movq %rbx, %rdi
callq 0x3130
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x32f0
jmp 0x3fb0
movq (%r15), %rax
movq -0x18(%rax), %rax
movq %r15, %rdi
addq %rax, %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x3430
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3190
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x404, %r15            # imm = 0x404
movq %r15, %rdi
callq 0x355c