// File: /workspace/github_cpp_makefile_star2_O2/romkatv[P]hcproxy/src/forwarder.cc
// Function: hcproxy::(anonymous namespace)::LinkEventHandler::ForwardFromOther(hcproxy::EventLoop*)
bool ForwardFromOther(EventLoop* loop) {
    bool res = false;
    while (true) {
      bool io = false;
      if (other_->readable_) {
        switch (out_.WriteFrom(other_->fd())) {
          case IoStatus::kData:
            io = true;
            break;
          case IoStatus::kEof:
            LOG(INFO) << "[" << other_->fd() << "] (" << other_->name_ << ") read EOF";
            io = true;
            other_->CloseForReading(loop);
            break;
          case IoStatus::kError:
            LOG(INFO) << "[" << other_->fd() << "] (" << other_->name_ << ") read error";
            Terminate(loop);
            return false;
          case IoStatus::kNoOp:
            break;
        }
      }
      if (writable_) {
        switch (out_.ReadTo(fd())) {
          case IoStatus::kData:
            io = true;
            break;
          case IoStatus::kEof:
            LOG(INFO) << "[" << fd() << "] (" << name_ << ") write EOF";
            io = true;
            CloseForWriting(loop);
            break;
          case IoStatus::kError:
            LOG(INFO) << "[" << fd() << "] (" << name_ << ") write error";
            Terminate(loop);
            return false;
          case IoStatus::kNoOp:
            break;
        }
      }
      if (io) {
        res = true;
      } else {
        return res;
      }
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x20(%rsp)
movq %rdi, %r14
leaq 0x38(%rdi), %rax
movq %rax, 0x30(%rsp)
pushq $0x3
popq %rbp
movq %rsp, %r13
xorl %ebx, %ebx
movl %ebx, %r15d
movq 0x58(%r14), %rax
cmpb $0x1, 0x50(%rax)
jne 0x1e789
movl 0x4c(%r14), %edx
testl %edx, %edx
js 0x1ec8b
movl 0x44(%r14), %ecx
testl %ecx, %ecx
js 0x1ecc9
movl 0x40(%r14), %esi
cmpl %ecx, %esi
jl 0x1ec4d
subl %ecx, %esi
je 0x1e789
movl 0x18(%rax), %edi
movslq %esi, %r8
xorl %esi, %esi
xorl %ecx, %ecx
movl %ebp, %r9d
callq 0x151d0
testq %rax, %rax
js 0x1e77b
je 0x1e9b3
addl 0x44(%r14), %eax
movl %eax, 0x44(%r14)
js 0x1ee7f
movb $0x1, %r12b
cmpl 0x40(%r14), %eax
jle 0x1e78c
jmp 0x1ee41
callq 0x15640
cmpl $0xb, (%rax)
jne 0x1eb9f
xorl %r12d, %r12d
cmpb $0x1, 0x51(%r14)
jne 0x1e9a3
movl 0x48(%r14), %edi
testl %edi, %edi
js 0x1ed45
cmpl $0x0, 0x44(%r14)
js 0x1ed07
je 0x1e81e
movl 0x18(%r14), %ebx
movl %ebx, %edi
leaq 0xb1497(%rip), %rsi     # 0xcfc54
xorl %edx, %edx
callq 0x15890
cmpq $-0x1, %rax
jne 0x1e7d8
callq 0x15640
cmpl $0xb, (%rax)
je 0x1e9a3
movl 0x48(%r14), %edi
movslq 0x44(%r14), %r8
xorl %esi, %esi
movl %ebx, %edx
xorl %ecx, %ecx
movl %ebp, %r9d
callq 0x151d0
testq %rax, %rax
je 0x1ed83
js 0x1e965
movl 0x44(%r14), %ecx
subl %eax, %ecx
movl %ecx, 0x44(%r14)
js 0x1ee01
movb $0x1, %bl
cmpl 0x40(%r14), %ecx
jle 0x1e70d
jmp 0x1edc1
cmpl $0x0, 0x4c(%r14)
jns 0x1e9a3
callq 0x15140
testl %eax, %eax
jne 0x1ef05
orl $-0x1, 0x48(%r14)
movq %r13, %rdi
leaq 0xb1635(%rip), %rsi     # 0xcfe7a
movl $0xef, %edx
xorl %ecx, %ecx
callq 0x1f4c8
movq 0x18(%rsp), %rdi
leaq 0xb08e6(%rip), %rsi     # 0xcf143
callq 0x8b1d0
movl 0x18(%r14), %esi
movq 0x18(%rsp), %rdi
callq 0x8b570
movq 0x18(%rsp), %rdi
leaq 0xb166c(%rip), %rsi     # 0xcfee8
callq 0x8b1d0
movq %r13, %rdi
movq 0x30(%rsp), %rsi
callq 0x1f2d2
movq %rax, %rdi
leaq 0xb169e(%rip), %rsi     # 0xcff36
callq 0x1f3d5
movq %r13, %rdi
callq 0x19502
cmpb $0x0, 0x51(%r14)
je 0x1ef4b
cmpb $0x1, 0x50(%r14)
jne 0x1eaf7
movq %r13, %rdi
leaq 0xb15b5(%rip), %rsi     # 0xcfe7a
movl $0x112, %edx            # imm = 0x112
xorl %ecx, %ecx
callq 0x1f4c8
movq 0x18(%rsp), %rdi
leaq 0xb0866(%rip), %rsi     # 0xcf143
callq 0x8b1d0
movl 0x18(%r14), %esi
movq 0x18(%rsp), %rdi
callq 0x8b570
movq 0x18(%rsp), %rdi
leaq 0xb15ec(%rip), %rsi     # 0xcfee8
callq 0x8b1d0
movq %r13, %rdi
movq 0x30(%rsp), %rsi
callq 0x1f2d2
movq %rax, %rdi
leaq 0xb171a(%rip), %rsi     # 0xd0032
callq 0x1f2e7
movq %r13, %rdi
callq 0x19502
movb $0x0, 0x51(%r14)
movq 0x20(%rsp), %rdi
movq %r14, %rsi
movl $0x80000001, %edx       # imm = 0x80000001
callq 0x1fc88
movl 0x18(%r14), %edi
pushq $0x1
popq %rsi
callq 0x15120
movb $0x1, %bl
testl %eax, %eax
je 0x1e70d
callq 0x15640
cmpl $0x6b, (%rax)
je 0x1e70d
jmp 0x1f011
callq 0x15640
cmpl $0xb, (%rax)
jne 0x1eb20
andl $0x0, 0x2c(%rsp)
movl 0x48(%r14), %edi
movl $0x541b, %esi           # imm = 0x541B
leaq 0x2c(%rsp), %rdx
xorl %eax, %eax
callq 0x15160
testl %eax, %eax
jne 0x1eebd
movl 0x2c(%rsp), %eax
cmpl 0x44(%r14), %eax
jne 0x1eb20
movb $0x1, %bl
testb %r12b, %r12b
jne 0x1e70d
jmp 0x1ec37
movl 0x4c(%r14), %edi
callq 0x15140
testl %eax, %eax
jne 0x1ef8b
orl $-0x1, 0x4c(%r14)
movq %r13, %rdi
leaq 0xb14a7(%rip), %rsi     # 0xcfe7a
movl $0xdd, %edx
xorl %ecx, %ecx
callq 0x1f4c8
movq 0x18(%rsp), %rdi
leaq 0xb0758(%rip), %rsi     # 0xcf143
callq 0x8b1d0
movq 0x58(%r14), %rax
movl 0x18(%rax), %esi
movq 0x18(%rsp), %rdi
callq 0x8b570
movq 0x18(%rsp), %rdi
leaq 0xb14db(%rip), %rsi     # 0xcfee8
callq 0x8b1d0
movq 0x58(%r14), %rsi
addq $0x38, %rsi
movq %r13, %rdi
callq 0x1f2d2
movq %rax, %rdi
leaq 0xb14f2(%rip), %rsi     # 0xcff1e
callq 0x1f2ae
movq %r13, %rdi
callq 0x19502
movq 0x58(%r14), %rbx
cmpb $0x0, 0x50(%rbx)
je 0x1efd1
cmpb $0x1, 0x51(%rbx)
jne 0x1eb0b
movq %r13, %rdi
leaq 0xb141f(%rip), %rsi     # 0xcfe7a
movl $0x106, %edx            # imm = 0x106
xorl %ecx, %ecx
callq 0x1f4c8
movq 0x18(%rsp), %rdi
leaq 0xb06d0(%rip), %rsi     # 0xcf143
callq 0x8b1d0
movl 0x18(%rbx), %esi
movq 0x18(%rsp), %rdi
callq 0x8b570
movq 0x18(%rsp), %rdi
leaq 0xb1457(%rip), %rsi     # 0xcfee8
callq 0x8b1d0
leaq 0x38(%rbx), %rsi
movq %r13, %rdi
callq 0x1f2d2
movq %rax, %rdi
leaq 0xb14ef(%rip), %rsi     # 0xcff9b
callq 0x1f2e7
movq %r13, %rdi
callq 0x19502
movb $0x0, 0x50(%rbx)
movq 0x20(%rsp), %rdi
movq %rbx, %rsi
movl $0x80000004, %edx       # imm = 0x80000004
callq 0x1fc88
movl 0x18(%rbx), %edi
xorl %esi, %esi
callq 0x15120
movb $0x1, %r12b
testl %eax, %eax
je 0x1e78c
callq 0x15640
cmpl $0x6b, (%rax)
je 0x1e78c
jmp 0x1f059
movq %r14, %rdi
movq 0x20(%rsp), %rsi
callq 0x1f182
movb $0x1, %bl
jmp 0x1e70d
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
callq 0x1f182
movb $0x1, %r12b
jmp 0x1e78c
movl 0x48(%r14), %edi
callq 0x15140
testl %eax, %eax
jne 0x1f0a1
orl $-0x1, 0x48(%r14)
leaq 0xb133d(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
movq %rbx, %rdi
movl $0xf4, %edx
xorl %ecx, %ecx
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb05e9(%rip), %rsi     # 0xcf143
callq 0x8b1d0
movl 0x18(%r14), %esi
movq 0x18(%rsp), %rdi
callq 0x8b570
movq 0x18(%rsp), %rdi
leaq 0xb136f(%rip), %rsi     # 0xcfee8
callq 0x8b1d0
movq %rsp, %rdi
movq 0x30(%rsp), %rsi
callq 0x1f2d2
leaq 0xb13b0(%rip), %rsi     # 0xcff42
movq %rax, %rdi
callq 0x1d39c
jmp 0x1ec1f
movl 0x4c(%r14), %edi
callq 0x15140
testl %eax, %eax
jne 0x1f0e9
orl $-0x1, 0x4c(%r14)
leaq 0xb12be(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
movq %rbx, %rdi
movl $0xe2, %edx
xorl %ecx, %ecx
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb056a(%rip), %rsi     # 0xcf143
callq 0x8b1d0
movq 0x58(%r14), %rax
movl 0x18(%rax), %esi
movq 0x18(%rsp), %rdi
callq 0x8b570
movq 0x18(%rsp), %rdi
leaq 0xb12ed(%rip), %rsi     # 0xcfee8
callq 0x8b1d0
movq 0x58(%r14), %rsi
addq $0x38, %rsi
movq %rsp, %rdi
callq 0x1f2d2
leaq 0xb1312(%rip), %rsi     # 0xcff29
movq %rax, %rdi
callq 0x1d3d4
movq %rsp, %rdi
callq 0x19502
movq %r14, %rdi
movq 0x20(%rsp), %rsi
callq 0x1e6c4
xorl %r15d, %r15d
andb $0x1, %r15b
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb1226(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x57
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb12f9(%rip), %rsi     # 0xcff69
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb564a(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1f179
leaq 0xb11e8(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x55
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb12a2(%rip), %rsi     # 0xcff50
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb560c(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1f179
leaq 0xb11aa(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x56
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb1272(%rip), %rsi     # 0xcff5e
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb55ce(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1f179
leaq 0xb116c(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x6e
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb1234(%rip), %rsi     # 0xcff5e
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb5590(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1f179
leaq 0xb112e(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x6d
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb1279(%rip), %rsi     # 0xcffe1
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb5552(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1f179
leaq 0xb10f0(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x7d
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb125e(%rip), %rsi     # 0xd0004
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb5514(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1f179
leaq 0xb10b2(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl $0x8a, %edx
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb1183(%rip), %rsi     # 0xcff69
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb54d4(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1f179
leaq 0xb1072(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl $0x89, %edx
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb1138(%rip), %rsi     # 0xcff5e
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb5494(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1f179
leaq 0xb1032(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x68
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb1105(%rip), %rsi     # 0xcff69
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb5456(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1f179
leaq 0xb0ff4(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x67
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb10bc(%rip), %rsi     # 0xcff5e
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb5418(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1f179
leaq 0xb0fb6(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl $0x81, %edx
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb112b(%rip), %rsi     # 0xd000d
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb53d8(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
movq %rsp, %rdi
callq 0x19465
jmp 0x1f179
leaq 0xb0f6e(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x71
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb10c7(%rip), %rsi     # 0xcffef
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb5392(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
movq %rsp, %rdi
callq 0x19465
jmp 0x1f179
leaq 0xb0f28(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl $0x110, %edx            # imm = 0x110
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb1141(%rip), %rsi     # 0xd00b1
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb534a(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1f179
leaq 0xb0ee8(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x62
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb0fce(%rip), %rsi     # 0xcff7c
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb530c(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
movq %rsp, %rdi
callq 0x19465
jmp 0x1f179
leaq 0xb0ea2(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl $0x104, %edx            # imm = 0x104
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb0f9b(%rip), %rsi     # 0xcff91
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb52c4(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1f179
leaq 0xb0e62(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl $0x115, %edx            # imm = 0x115
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb1010(%rip), %rsi     # 0xd0046
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb5284(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
movq %rsp, %rdi
callq 0x19465
jmp 0x1f179
leaq 0xb0e1a(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl $0x109, %edx            # imm = 0x109
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb0f31(%rip), %rsi     # 0xcffaf
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb523c(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
movq %rsp, %rdi
callq 0x19465
jmp 0x1f179
leaq 0xb0dd2(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl $0x84, %edx
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb0f29(%rip), %rsi     # 0xcffef
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb51f4(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
movq %rsp, %rdi
callq 0x19465
jmp 0x1f179
leaq 0xb0d8a(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x5d
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb0e70(%rip), %rsi     # 0xcff7c
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb51ae(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
movq %rsp, %rdi
callq 0x19465
jmp 0x1f179
jmp 0x1f179
jmp 0x1f15e
jmp 0x1f179
jmp 0x1f15e
jmp 0x1f15e
jmp 0x1f179
jmp 0x1f179
jmp 0x1f15e
jmp 0x1f15e
jmp 0x1f15e
jmp 0x1f179
jmp 0x1f179
jmp 0x1f179
jmp 0x1f15e
jmp 0x1f179
jmp 0x1f15e
jmp 0x1f179
jmp 0x1f179
jmp 0x1f179
jmp 0x1f15e
jmp 0x1f179
jmp 0x1f179
jmp 0x1f15e
jmp 0x1f179
jmp 0x1f15e
movq %rax, %rbx
movq %rsp, %rdi
callq 0x19502
movq %rbx, %rdi
callq 0xcc660
jmp 0x1f179
jmp 0x1f179
jmp 0x1f179
jmp 0x1f179
movq %rsp, %rdi
callq 0x189a6
nop