// File: romkatv[P]hcproxy/src/forwarder.cc
// Function: hcproxy::(anonymous namespace)::LinkEventHandler::CloseForReading(hcproxy::EventLoop*)
void CloseForReading(EventLoop* loop) {
    CHECK(readable_);
    if (writable_) {
      LOG(INFO) << "[" << fd() << "] (" << name_ << ") shutdown(SHUT_RD)";
      readable_ = false;
      loop->Modify(this, EPOLLOUT | EPOLLET);
      CHECK(shutdown(fd(), SHUT_RD) == 0 || errno == ENOTCONN) << Errno();
    } else {
      Close(loop);
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
movb 0x50(%rax), %al
movb $0x0, -0x31(%rbp)
testb $0x1, %al
je 0x3070b
jmp 0x30780
leaq 0xb486a(%rip), %rsi     # 0xe4f7c
leaq -0x30(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
movl $0x104, %edx            # imm = 0x104
movl $0x3, %ecx
callq 0x194b0
movq -0xb0(%rbp), %rdi
movb $0x1, -0x31(%rbp)
callq 0x194e0
movq %rax, %rdi
leaq 0xb494d(%rip), %rsi     # 0xe5093
callq 0x22840
movq %rax, -0xa8(%rbp)
jmp 0x30754
movq -0xa8(%rbp), %rdi
leaq 0xb8c29(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0xb8(%rbp)
jmp 0x30770
movq -0xb8(%rbp), %rsi
leaq -0x45(%rbp), %rdi
callq 0x194f0
testb $0x1, -0x31(%rbp)
jne 0x30788
jmp 0x307ac
leaq -0x30(%rbp), %rdi
callq 0x19500
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x31(%rbp)
jne 0x309a0
jmp 0x309a9
movq -0xa0(%rbp), %rax
testb $0x1, 0x51(%rax)
je 0x309e9
leaq 0xb47b8(%rip), %rsi     # 0xe4f7c
leaq -0x68(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
movl $0x106, %edx            # imm = 0x106
xorl %ecx, %ecx
callq 0x1c360
movq -0xc8(%rbp), %rdi
callq 0x194e0
movq %rax, %rdi
leaq 0xb39ef(%rip), %rsi     # 0xe41e0
callq 0x1bb10
movq %rax, -0xc0(%rbp)
jmp 0x307ff
movq -0xa0(%rbp), %rdi
callq 0x1bb70
movl %eax, -0xcc(%rbp)
jmp 0x30813
movq -0xc0(%rbp), %rdi
movl -0xcc(%rbp), %eax
movl %eax, -0x6c(%rbp)
leaq -0x6c(%rbp), %rsi
callq 0x1bad0
movq %rax, -0xd8(%rbp)
jmp 0x30835
movq -0xd8(%rbp), %rdi
leaq 0xb47a7(%rip), %rsi     # 0xe4fea
callq 0x22810
movq %rax, -0xe0(%rbp)
jmp 0x30851
movq -0xe0(%rbp), %rdi
movq -0xa0(%rbp), %rsi
addq $0x38, %rsi
callq 0x1db60
movq %rax, -0xe8(%rbp)
jmp 0x30871
movq -0xe8(%rbp), %rdi
leaq 0xb481e(%rip), %rsi     # 0xe509d
callq 0x19620
movq %rax, -0xf0(%rbp)
jmp 0x3088d
movq -0xf0(%rbp), %rsi
leaq -0x6d(%rbp), %rdi
callq 0x194f0
leaq -0x68(%rbp), %rdi
callq 0x1c390
movq -0xa0(%rbp), %rsi
movb $0x0, 0x50(%rsi)
movq -0x10(%rbp), %rdi
movl $0x80000004, %edx       # imm = 0x80000004
callq 0x33320
movq -0xa0(%rbp), %rdi
callq 0x1bb70
movl %eax, %edi
xorl %esi, %esi
callq 0x15120
movb $0x0, -0x91(%rbp)
cmpl $0x0, %eax
je 0x308ea
callq 0x15640
cmpl $0x6b, (%rax)
jne 0x308ef
jmp 0x30989
leaq 0xb4686(%rip), %rsi     # 0xe4f7c
leaq -0x90(%rbp), %rdi
movq %rdi, -0x100(%rbp)
movl $0x109, %edx            # imm = 0x109
movl $0x3, %ecx
callq 0x194b0
movq -0x100(%rbp), %rdi
movb $0x1, -0x91(%rbp)
callq 0x194e0
movq %rax, %rdi
leaq 0xb4781(%rip), %rsi     # 0xe50b1
callq 0x2c8b0
movq %rax, -0xf8(%rbp)
jmp 0x3093e
movq -0xf8(%rbp), %rdi
leaq 0xb8a3f(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0x108(%rbp)
jmp 0x3095a
callq 0x1c0c0
jmp 0x30961
movq -0x108(%rbp), %rdi
callq 0x1c050
movq %rax, -0x110(%rbp)
jmp 0x30976
movq -0x110(%rbp), %rsi
leaq -0x94(%rbp), %rdi
callq 0x194f0
testb $0x1, -0x91(%rbp)
jne 0x30994
jmp 0x309d9
leaq -0x90(%rbp), %rdi
callq 0x19500
leaq -0x30(%rbp), %rdi
callq 0x19500
jmp 0x30a02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x1c390
jmp 0x30a02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x91(%rbp)
jne 0x309db
jmp 0x309e7
jmp 0x309f9
leaq -0x90(%rbp), %rdi
callq 0x19500
jmp 0x30a02
movq -0xa0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2fdb0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0xe1080
nopl (%rax,%rax)