// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq -0x1(%rsi), %rax
cmpq $0x7ffffffe, %rax       # imm = 0x7FFFFFFE
jae 0x1ec2c
movq %rsi, %r12
movq %rdi, %r14
leaq 0x8(%rdi), %r15
movq %r15, %rdi
callq 0x15460
movl %eax, %ebx
testl %eax, %eax
je 0x1eb38
leaq 0xb13a2(%rip), %rsi     # 0xcfe7a
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x35, %edx
movl $0x2, %ecx
callq 0x2003c
movq 0x18(%r14), %rdi
leaq 0xb1600(%rip), %rsi     # 0xd00fa
movl $0xf, %edx
callq 0x8b8f0
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %rdi
callq 0x200db
leaq 0x8(%rsp), %rdi
callq 0x19d7a
callq 0x15640
movl (%rax), %eax
addl $-0x17, %eax
cmpl $0x1, %eax
ja 0x1ec75
movq $-0x1, (%r15)
jmp 0x1eb7f
movl 0x8(%r14), %edi
movl $0x407, %esi            # imm = 0x407
movq %r12, %rdx
xorl %eax, %eax
callq 0x158f0
movl %eax, (%r14)
testl %eax, %eax
jle 0x1ecca
movl $0x8, %r15d
movl (%r14,%r15), %edi
testl %edi, %edi
js 0x1eb90
movl $0x408, %esi            # imm = 0x408
xorl %eax, %eax
callq 0x158f0
cmpl (%r14), %eax
jne 0x1ebde
addq $0x4, %r15
cmpq $0x10, %r15
jne 0x1eb5c
testl %ebx, %ebx
sete %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0xb12e3(%rip), %rsi     # 0xcfe7a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x3c, %edx
movl $0x3, %ecx
callq 0x2003c
movq 0x18(%rbx), %rdi
leaq 0xb12e8(%rip), %rsi     # 0xcfea1
movl $0x7, %edx
callq 0x8b8f0
movq 0x20(%rsp), %rdi
leaq 0xb56fc(%rip), %rsi     # 0xd42cb
movl $0x2, %edx
callq 0x8b8f0
jmp 0x1ed40
leaq 0xb1295(%rip), %rsi     # 0xcfe7a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x3d, %edx
movl $0x3, %ecx
callq 0x2003c
movq 0x18(%rbx), %rdi
leaq 0xb1562(%rip), %rsi     # 0xd0169
movl $0x24, %edx
callq 0x8b8f0
movq 0x20(%rsp), %rdi
leaq 0xb56ae(%rip), %rsi     # 0xd42cb
movl $0x2, %edx
callq 0x8b8f0
jmp 0x1ed40
leaq 0xb1247(%rip), %rsi     # 0xcfe7a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x33, %edx
movl $0x3, %ecx
callq 0x2003c
movq 0x18(%rbx), %rdi
leaq 0xb1466(%rip), %rsi     # 0xd00bb
movl $0x3e, %edx
callq 0x8b8f0
leaq 0xb5665(%rip), %rsi     # 0xd42cb
leaq 0x8(%rsp), %rdi
callq 0x1fe36
jmp 0x1ed40
leaq 0xb11fe(%rip), %rsi     # 0xcfe7a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x36, %edx
movl $0x3, %ecx
callq 0x2003c
movq 0x18(%rbx), %rdi
leaq 0xb146c(%rip), %rsi     # 0xd010a
movl $0x22, %edx
callq 0x8b8f0
movq 0x20(%rsp), %rdi
leaq 0xb5617(%rip), %rsi     # 0xd42cb
movl $0x2, %edx
callq 0x8b8f0
leaq 0x8(%rsp), %rdi
callq 0x19d65
jmp 0x1ed40
leaq 0xb11a9(%rip), %rsi     # 0xcfe7a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x3a, %edx
movl $0x3, %ecx
callq 0x2003c
movq 0x18(%rbx), %rdi
leaq 0xb143a(%rip), %rsi     # 0xd012d
movl $0x3b, %edx
callq 0x8b8f0
movq 0x20(%rsp), %rdi
leaq 0xb55c2(%rip), %rsi     # 0xd42cb
movl $0x2, %edx
callq 0x8b8f0
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %rdi
callq 0x200db
jmp 0x1ed40
jmp 0x1ed40
jmp 0x1ed40
jmp 0x1ed40
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x19d7a
movq %rbx, %rdi
callq 0xcc750
jmp 0x1ed40
leaq 0x8(%rsp), %rdi
callq 0x18a24