// File: /workspace/github_cpp_makefile_star2_O3/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 0x61e2(%rip), %r12      # 0x9fd0
leaq 0x32fa(%rip), %rsi      # 0x70ef
movl $0x1c, %edx
movq %r12, %rdi
callq 0x3300
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movl 0x404(%r15), %edi
leaq 0x418(%r15), %r8
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rsi
xorl %ecx, %ecx
movq %r14, %r9
callq 0x31f0
movq %rax, %r14
cmpl $-0x1, %r14d
je 0x3fd8
leaq 0x41c(%r15), %rdi
movzwl 0x418(%r15), %edx
movl $0x8, %esi
callq 0x3360
movq %rax, 0x4b8(%r15)
movq 0x6152(%rip), %r12      # 0x9fd0
leaq 0x3294(%rip), %rsi      # 0x7119
movl $0x12, %edx
movq %r12, %rdi
callq 0x3300
movzwl 0x41a(%r15), %esi
movq %r12, %rdi
callq 0x3190
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
leaq 0x3259(%rip), %rsi      # 0x712c
movl $0x12, %edx
movq %r12, %rdi
callq 0x3300
movq 0x4b8(%r15), %rax
movq (%rax), %r15
testq %r15, %r15
je 0x3f0b
movq %r15, %rdi
callq 0x3130
movq 0x60d2(%rip), %rdi      # 0x9fd0
movq %r15, %rsi
movq %rax, %rdx
callq 0x3300
jmp 0x3f24
movq (%r12), %rax
movq -0x18(%rax), %rax
leaq (%r12,%rax), %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x3440
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movslq %r14d, %rax
movb $0x0, (%rbx,%rax)
leaq 0x31e5(%rip), %rsi      # 0x713f
movl $0xb, %edx
movq %r12, %rdi
callq 0x3300
movq %r12, %rdi
movl %r14d, %esi
callq 0x3460
movq %rax, %r15
leaq 0x31cf(%rip), %rsi      # 0x714b
movl $0x4, %edx
movq %rax, %rdi
callq 0x3300
movq %rbx, %rdi
callq 0x3130
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3300
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
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 0x356c
nop