// File: romkatv[P]hcproxy/src/forwarder.cc
// Function: hcproxy::(anonymous namespace)::LinkEventHandler::CloseForWriting(hcproxy::EventLoop*)
void CloseForWriting(EventLoop* loop) {
    CHECK(writable_);
    if (readable_) {
      LOG(INFO) << "[" << fd() << "] (" << name_ << ") shutdown(SHUT_WR)";
      writable_ = false;
      loop->Modify(this, EPOLLIN | EPOLLET);
      CHECK(shutdown(fd(), SHUT_WR) == 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 0x51(%rax), %al
movb $0x0, -0x31(%rbp)
testb $0x1, %al
je 0x3128b
jmp 0x31300
leaq 0xb3cea(%rip), %rsi     # 0xe4f7c
leaq -0x30(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
movl $0x110, %edx            # imm = 0x110
movl $0x3, %ecx
callq 0x194b0
movq -0xb0(%rbp), %rdi
movb $0x1, -0x31(%rbp)
callq 0x194e0
movq %rax, %rdi
leaq 0xb3eed(%rip), %rsi     # 0xe51b3
callq 0x22840
movq %rax, -0xa8(%rbp)
jmp 0x312d4
movq -0xa8(%rbp), %rdi
leaq 0xb80a9(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0xb8(%rbp)
jmp 0x312f0
movq -0xb8(%rbp), %rsi
leaq -0x45(%rbp), %rdi
callq 0x194f0
testb $0x1, -0x31(%rbp)
jne 0x31308
jmp 0x3132c
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 0x31523
jmp 0x3152c
movq -0xa0(%rbp), %rax
testb $0x1, 0x50(%rax)
je 0x3156c
leaq 0xb3c38(%rip), %rsi     # 0xe4f7c
leaq -0x68(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
movl $0x112, %edx            # imm = 0x112
xorl %ecx, %ecx
callq 0x1c360
movq -0xc8(%rbp), %rdi
callq 0x194e0
movq %rax, %rdi
leaq 0xb2e6f(%rip), %rsi     # 0xe41e0
callq 0x1bb10
movq %rax, -0xc0(%rbp)
jmp 0x3137f
movq -0xa0(%rbp), %rdi
callq 0x1bb70
movl %eax, -0xcc(%rbp)
jmp 0x31393
movq -0xc0(%rbp), %rdi
movl -0xcc(%rbp), %eax
movl %eax, -0x6c(%rbp)
leaq -0x6c(%rbp), %rsi
callq 0x1bad0
movq %rax, -0xd8(%rbp)
jmp 0x313b5
movq -0xd8(%rbp), %rdi
leaq 0xb3c27(%rip), %rsi     # 0xe4fea
callq 0x22810
movq %rax, -0xe0(%rbp)
jmp 0x313d1
movq -0xe0(%rbp), %rdi
movq -0xa0(%rbp), %rsi
addq $0x38, %rsi
callq 0x1db60
movq %rax, -0xe8(%rbp)
jmp 0x313f1
movq -0xe8(%rbp), %rdi
leaq 0xb3d35(%rip), %rsi     # 0xe5134
callq 0x19620
movq %rax, -0xf0(%rbp)
jmp 0x3140d
movq -0xf0(%rbp), %rsi
leaq -0x6d(%rbp), %rdi
callq 0x194f0
leaq -0x68(%rbp), %rdi
callq 0x1c390
movq -0xa0(%rbp), %rsi
movb $0x0, 0x51(%rsi)
movq -0x10(%rbp), %rdi
movl $0x80000001, %edx       # imm = 0x80000001
callq 0x33320
movq -0xa0(%rbp), %rdi
callq 0x1bb70
movl %eax, %edi
movl $0x1, %esi
callq 0x15120
movb $0x0, -0x91(%rbp)
cmpl $0x0, %eax
je 0x3146d
callq 0x15640
cmpl $0x6b, (%rax)
jne 0x31472
jmp 0x3150c
leaq 0xb3b03(%rip), %rsi     # 0xe4f7c
leaq -0x90(%rbp), %rdi
movq %rdi, -0x100(%rbp)
movl $0x115, %edx            # imm = 0x115
movl $0x3, %ecx
callq 0x194b0
movq -0x100(%rbp), %rdi
movb $0x1, -0x91(%rbp)
callq 0x194e0
movq %rax, %rdi
leaq 0xb3c95(%rip), %rsi     # 0xe5148
callq 0x2c8b0
movq %rax, -0xf8(%rbp)
jmp 0x314c1
movq -0xf8(%rbp), %rdi
leaq 0xb7ebc(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0x108(%rbp)
jmp 0x314dd
callq 0x1c0c0
jmp 0x314e4
movq -0x108(%rbp), %rdi
callq 0x1c050
movq %rax, -0x110(%rbp)
jmp 0x314f9
movq -0x110(%rbp), %rsi
leaq -0x94(%rbp), %rdi
callq 0x194f0
testb $0x1, -0x91(%rbp)
jne 0x31517
jmp 0x3155c
leaq -0x90(%rbp), %rdi
callq 0x19500
leaq -0x30(%rbp), %rdi
callq 0x19500
jmp 0x31585
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x1c390
jmp 0x31585
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x91(%rbp)
jne 0x3155e
jmp 0x3156a
jmp 0x3157c
leaq -0x90(%rbp), %rdi
callq 0x19500
jmp 0x31585
movq -0xa0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2fdb0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0xe1080
nop