// File: /workspace/github_cpp_makefile_star2_O2/romkatv[P]hcproxy/src/forwarder.cc
// Function: hcproxy::(anonymous namespace)::Buffer::Init(unsigned long)
bool Init(size_t size_bytes) {
    CHECK(size_bytes > 0 && size_bytes < std::numeric_limits<int>::max());
    if (pipe(pipe_) != 0) {
      LOG(ERROR) << "pipe() failed: " << Errno();
      CHECK(errno == EMFILE || errno == ENFILE) << Errno();
      for (int& fd : pipe_) fd = -1;
      return false;
    }
    CHECK((capacity_ = fcntl(pipe_[0], F_SETPIPE_SZ, size_bytes)) > 0) << Errno();
    for (int fd : pipe_) {
      CHECK(fd >= 0);
      CHECK(fcntl(fd, F_GETPIPE_SZ) == capacity_);
    }
    return true;
  }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
leaq -0x1(%rsi), %rax
cmpq $0x7ffffffe, %rax       # imm = 0x7FFFFFFE
jae 0x1e2bd
movq %rsi, %r14
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x15460
movl %eax, %ebp
testl %eax, %eax
je 0x1e1ff
leaq 0xb1cd2(%rip), %rsi     # 0xcfe7a
movq %rsp, %r14
pushq $0x35
popq %rdx
pushq $0x2
popq %rcx
movq %r14, %rdi
callq 0x1f4c8
movq 0x18(%r14), %rdi
leaq 0xb1f36(%rip), %rsi     # 0xd00fa
callq 0x8b1d0
movq %rsp, %rdi
callq 0x19465
movq %rsp, %rdi
callq 0x19bc6
callq 0x15640
movl (%rax), %eax
addl $-0x17, %eax
cmpl $0x2, %eax
jae 0x1e2f9
orq $-0x1, 0x8(%rbx)
testl %ebp, %ebp
sete %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl 0x8(%rbx), %edi
movl $0x407, %esi            # imm = 0x407
movq %r14, %rdx
xorl %eax, %eax
callq 0x158f0
movl %eax, (%rbx)
testl %eax, %eax
jle 0x1e33c
pushq $0x8
popq %r14
cmpq $0x10, %r14
je 0x1e1f1
movl (%rbx,%r14), %edi
testl %edi, %edi
js 0x1e27f
movl $0x408, %esi            # imm = 0x408
xorl %eax, %eax
callq 0x158f0
addq $0x4, %r14
cmpl (%rbx), %eax
je 0x1e21f
leaq 0xb1c32(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x3d
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb1f05(%rip), %rsi     # 0xd0169
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb6056(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1e39a
leaq 0xb1bf4(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x3c
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb1bff(%rip), %rsi     # 0xcfea1
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb6018(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x1e39a
leaq 0xb1bb6(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x33
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb1ddb(%rip), %rsi     # 0xd00bb
callq 0x8b1d0
leaq 0xb5fdf(%rip), %rsi     # 0xd42cb
movq %rsp, %rdi
callq 0x1f29c
jmp 0x1e39a
leaq 0xb1b7a(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x36
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb1dee(%rip), %rsi     # 0xd010a
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb5f9e(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
movq %rsp, %rdi
callq 0x19465
jmp 0x1e39a
leaq 0xb1b37(%rip), %rsi     # 0xcfe7a
movq %rsp, %rbx
pushq $0x3a
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb1dce(%rip), %rsi     # 0xd012d
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xb5f5b(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
movq %rsp, %rdi
callq 0x19465
jmp 0x1e39a
jmp 0x1e39a
jmp 0x1e39a
jmp 0x1e39a
movq %rax, %rbx
movq %rsp, %rdi
callq 0x19bc6
movq %rbx, %rdi
callq 0xcc660
jmp 0x1e39a
movq %rsp, %rdi
callq 0x189a6