// File: /workspace/github_cpp_makefile_star2_O2/romkatv[P]hcproxy/src/list.cc
// Function: hcproxy::List::Erase(hcproxy::Node*)
void List::Erase(Node* node) {
  CHECK(node);
  Node* const prev = node->prev_;
  Node* const next = node->next_;
  if (prev) {
    CHECK(head_ != node);
    CHECK(prev->next_ == node);
    prev->next_ = next;
    node->prev_ = nullptr;
  } else {
    CHECK(head_ == node);
    head_ = next;
  }
  if (next) {
    CHECK(tail_ != node);
    CHECK(next->prev_ == node);
    next->prev_ = prev;
    node->next_ = nullptr;
  } else {
    CHECK(tail_ == node);
    tail_ = prev;
  }
  CHECK(!head_ == !tail_);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
testq %rsi, %rsi
je 0x187a6
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
movq (%rdi), %rcx
testq %rax, %rax
je 0x1874c
cmpq %rsi, %rcx
je 0x18822
cmpq %rsi, 0x8(%rax)
jne 0x18860
movq %rdx, 0x8(%rax)
andq $0x0, (%rsi)
jmp 0x1875b
cmpq %rsi, %rcx
jne 0x1891a
movq %rdx, (%rdi)
movq %rdx, %rcx
movq 0x8(%rdi), %r8
testq %rdx, %rdx
je 0x18780
cmpq %rsi, %r8
je 0x1889e
cmpq %rsi, (%rdx)
jne 0x188dc
movq %rax, (%rdx)
andq $0x0, 0x8(%rsi)
jmp 0x18790
cmpq %rsi, %r8
jne 0x18955
movq %rax, 0x8(%rdi)
movq %rax, %r8
testq %rcx, %rcx
sete %al
testq %r8, %r8
setne %cl
xorb %al, %cl
je 0x187e4
addq $0x20, %rsp
popq %rbx
retq
leaq 0xb6857(%rip), %rsi     # 0xcf004
movq %rsp, %rbx
pushq $0x28
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb687f(%rip), %rsi     # 0xcf048
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xbbaf1(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1899e
leaq 0xb6819(%rip), %rsi     # 0xcf004
movq %rsp, %rbx
pushq $0x3d
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb6898(%rip), %rsi     # 0xcf09f
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xbbab3(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1899e
leaq 0xb67db(%rip), %rsi     # 0xcf004
movq %rsp, %rbx
pushq $0x2c
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb67fa(%rip), %rsi     # 0xcf03f
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xbba75(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1899e
leaq 0xb679d(%rip), %rsi     # 0xcf004
movq %rsp, %rbx
pushq $0x2d
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb67ca(%rip), %rsi     # 0xcf04d
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xbba37(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1899e
leaq 0xb675f(%rip), %rsi     # 0xcf004
movq %rsp, %rbx
pushq $0x35
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb67ae(%rip), %rsi     # 0xcf06f
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xbb9f9(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1899e
leaq 0xb6721(%rip), %rsi     # 0xcf004
movq %rsp, %rbx
pushq $0x36
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb677e(%rip), %rsi     # 0xcf07d
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xbb9bb(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1899e
leaq 0xb66e3(%rip), %rsi     # 0xcf004
movq %rsp, %rbx
pushq $0x31
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb6724(%rip), %rsi     # 0xcf061
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xbb97d(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1899e
leaq 0xb66a8(%rip), %rsi     # 0xcf004
movq %rsp, %rbx
pushq $0x3a
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb6719(%rip), %rsi     # 0xcf091
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xbb942(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1899e
jmp 0x1899e
jmp 0x1899e
jmp 0x1899e
jmp 0x1899e
jmp 0x1899e
jmp 0x1899e
jmp 0x1899e
movq %rsp, %rdi
callq 0x189a6