// File: /workspace/github_cpp_makefile_star2_O3/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
xorl %r15d, %r15d
movq %r15, -0x28(%rbp)
movl $0xa4810002, -0x30(%rbp) # imm = 0xA4810002
leaq 0x1862(%rip), %rdi      # 0x40a3
callq 0x21f0
movl %eax, -0x2c(%rbp)
movq %r15, -0x20(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x2160
leaq -0x1c8(%rbp), %rdi
movl (%rbx), %esi
callq 0x22e0
movq %rax, %r15
leaq 0x1a1e(%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 -0x1c0(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x22b0
movq -0x50(%rbp), %rsi
leaq -0x20(%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 0x36da(%rip), %r14      # 0x5fd0
leaq 0x17b0(%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 0x36a8(%rip), %rdi      # 0x5fd0
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x3694(%rip), %rdi      # 0x5fd0
leaq 0x179f(%rip), %rsi      # 0x40e2
movl $0x1e, %edx
callq 0x2230
movl (%rbx), %esi
movq 0x367a(%rip), %rdi      # 0x5fd0
callq 0x22e0
movq %rax, %r14
leaq 0x179c(%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 0x3622(%rip), %rbx      # 0x5fd0
leaq 0x1764(%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 0x35f0(%rip), %rdi      # 0x5fd0
callq 0x2040
movq %rax, %rdi
callq 0x2140
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a06
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2200
movq 0x35ab(%rip), %rsi      # 0x5fb8
leaq -0x1d8(%rbp), %rdi
callq 0x2180
leaq -0x158(%rbp), %rdi
callq 0x20e0
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2a35
movq %rax, %rbx
jmp 0x2a56
movq %rax, %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a56
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2200
movq 0x355b(%rip), %rsi      # 0x5fb8
leaq -0x1d8(%rbp), %rdi
callq 0x2180
leaq -0x158(%rbp), %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x22f0