// File: /workspace/github_cpp_makefile_star2_O1/gty980218[P]ee450/hospitalC.cpp
// Function: ready(int, Hospital&)
void ready(int sock,Hospital& hospital){
    //initialize schedular's address
    struct sockaddr_in scheaddr;
    memset(&scheaddr, 0, sizeof(scheaddr));
    scheaddr.sin_family=AF_INET;
    scheaddr.sin_port=htons(33188);
    scheaddr.sin_addr.s_addr=inet_addr("127.0.0.1");
    socklen_t schelen=sizeof(scheaddr);

    //send occupancy and capability
    char buff[8]={0};
    stringstream ss;
    ss<<hospital.capacity<<" "<<hospital.occupancy<<endl;
    string str=ss.str();
    strcpy(buff,str.c_str());
    sendto(sock, buff, sizeof(buff), 0, (struct sockaddr*)&scheaddr, schelen);

    cout<<"Hospital C is up and running using UDP on port 32188"<<endl;
    cout<<"Hospital C has total capacity "<<hospital.capacity<<" and initial occupancy "<<hospital.occupancy<<endl;
    cout<<"------------------------------------------------------------------------------------------------"<<endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rsi, %rbx
movl %edi, %r14d
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
movl $0xa4810002, -0x30(%rbp) # imm = 0xA4810002
leaq 0x1865(%rip), %rdi      # 0x40a3
callq 0x21f0
movl %eax, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x2160
leaq -0x1d0(%rbp), %rdi
movl (%rbx), %esi
callq 0x22e0
movq %rax, %r15
leaq 0x1a1d(%rip), %rsi      # 0x428f
movl $0x1, %edx
movq %rax, %rdi
callq 0x2230
movl 0x4(%rbx), %esi
movq %r15, %rdi
callq 0x22e0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
leaq -0x1c8(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x22b0
movq -0x58(%rbp), %rsi
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x21c0
leaq -0x30(%rbp), %r8
movl $0x8, %edx
movl %r14d, %edi
movq %r15, %rsi
xorl %ecx, %ecx
movl $0x10, %r9d
callq 0x2050
movq 0x36d9(%rip), %r14      # 0x5fd0
leaq 0x17af(%rip), %rsi      # 0x40ad
movl $0x34, %edx
movq %r14, %rdi
callq 0x2230
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq 0x36a7(%rip), %rdi      # 0x5fd0
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x3693(%rip), %rdi      # 0x5fd0
leaq 0x179e(%rip), %rsi      # 0x40e2
movl $0x1e, %edx
callq 0x2230
movl (%rbx), %esi
movq 0x3679(%rip), %rdi      # 0x5fd0
callq 0x22e0
movq %rax, %r14
leaq 0x179b(%rip), %rsi      # 0x4101
movl $0x17, %edx
movq %rax, %rdi
callq 0x2230
movl 0x4(%rbx), %esi
movq %r14, %rdi
callq 0x22e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x3621(%rip), %rbx      # 0x5fd0
leaq 0x1763(%rip), %rsi      # 0x4119
movl $0x60, %edx
movq %rbx, %rdi
callq 0x2230
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq 0x35ef(%rip), %rdi      # 0x5fd0
callq 0x2040
movq %rax, %rdi
callq 0x2140
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a07
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2200
movq 0x35aa(%rip), %rsi      # 0x5fb8
leaq -0x1e0(%rbp), %rdi
callq 0x2180
leaq -0x160(%rbp), %rdi
callq 0x20e0
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2a36
movq %rax, %rbx
jmp 0x2a57
movq %rax, %rbx
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a57
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2200
movq 0x355a(%rip), %rsi      # 0x5fb8
leaq -0x1e0(%rbp), %rdi
callq 0x2180
leaq -0x160(%rbp), %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x22f0