// File: 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
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, -0x39(%rbp)
cmpq $0x0, %rax
jbe 0x2e4df
movq -0x18(%rbp), %rax
movq %rax, -0x168(%rbp)
callq 0x31a70
movl %eax, %ecx
movq -0x168(%rbp), %rax
movslq %ecx, %rcx
cmpq %rcx, %rax
jae 0x2e4df
jmp 0x2e554
leaq 0xb6a96(%rip), %rsi     # 0xe4f7c
leaq -0x38(%rbp), %rdi
movq %rdi, -0x178(%rbp)
movl $0x33, %edx
movl $0x3, %ecx
callq 0x194b0
movq -0x178(%rbp), %rdi
movb $0x1, -0x39(%rbp)
callq 0x194e0
movq %rax, %rdi
leaq 0xb6ca3(%rip), %rsi     # 0xe51bd
callq 0x31a80
movq %rax, -0x170(%rbp)
jmp 0x2e528
movq -0x170(%rbp), %rdi
leaq 0xbae55(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0x180(%rbp)
jmp 0x2e544
movq -0x180(%rbp), %rsi
leaq -0x4d(%rbp), %rdi
callq 0x194f0
testb $0x1, -0x39(%rbp)
jne 0x2e55c
jmp 0x2e580
leaq -0x38(%rbp), %rdi
callq 0x19500
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0x39(%rbp)
jne 0x2e6e6
jmp 0x2e6ef
movq -0x160(%rbp), %rdi
addq $0x8, %rdi
callq 0x15470
cmpl $0x0, %eax
je 0x2e7b0
leaq 0xb69dc(%rip), %rsi     # 0xe4f7c
leaq -0x70(%rbp), %rdi
movq %rdi, -0x190(%rbp)
movl $0x35, %edx
movl $0x2, %ecx
callq 0x1d9a0
movq -0x190(%rbp), %rdi
callq 0x194e0
movq %rax, %rdi
leaq 0xb6c2c(%rip), %rsi     # 0xe51fc
callq 0x1ba10
movq %rax, -0x188(%rbp)
jmp 0x2e5de
callq 0x1c0c0
jmp 0x2e5e5
movq -0x188(%rbp), %rdi
callq 0x1c050
movq %rax, -0x198(%rbp)
jmp 0x2e5fa
movq -0x198(%rbp), %rsi
leaq -0x73(%rbp), %rdi
callq 0x194f0
leaq -0x70(%rbp), %rdi
callq 0x1d9d0
callq 0x15640
movl (%rax), %eax
movb $0x0, -0x99(%rbp)
cmpl $0x18, %eax
je 0x2e630
callq 0x15640
cmpl $0x17, (%rax)
jne 0x2e635
jmp 0x2e6cf
leaq 0xb6940(%rip), %rsi     # 0xe4f7c
leaq -0x98(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
movl $0x36, %edx
movl $0x3, %ecx
callq 0x194b0
movq -0x1a8(%rbp), %rdi
movb $0x1, -0x99(%rbp)
callq 0x194e0
movq %rax, %rdi
leaq 0xb6b96(%rip), %rsi     # 0xe520c
callq 0x1dba0
movq %rax, -0x1a0(%rbp)
jmp 0x2e684
movq -0x1a0(%rbp), %rdi
leaq 0xbacf9(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0x1b0(%rbp)
jmp 0x2e6a0
callq 0x1c0c0
jmp 0x2e6a7
movq -0x1b0(%rbp), %rdi
callq 0x1c050
movq %rax, -0x1b8(%rbp)
jmp 0x2e6bc
movq -0x1b8(%rbp), %rsi
leaq -0x9c(%rbp), %rdi
callq 0x194f0
testb $0x1, -0x99(%rbp)
jne 0x2e6da
jmp 0x2e725
leaq -0x98(%rbp), %rdi
callq 0x19500
leaq -0x38(%rbp), %rdi
callq 0x19500
jmp 0x2eafb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x1d9d0
jmp 0x2eafb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0x99(%rbp)
jne 0x2e796
jmp 0x2e7a2
movq -0x160(%rbp), %rax
addq $0x8, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xa8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rax
cmpq -0xb8(%rbp), %rax
je 0x2e7a7
movq -0xb0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0xb0(%rbp), %rax
addq $0x4, %rax
movq %rax, -0xb0(%rbp)
jmp 0x2e757
leaq -0x98(%rbp), %rdi
callq 0x19500
jmp 0x2eafb
movb $0x0, -0x1(%rbp)
jmp 0x2eaed
movq -0x160(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x18(%rbp), %rdx
movl $0x407, %esi            # imm = 0x407
movb $0x0, %al
callq 0x15900
movq -0x160(%rbp), %rcx
movl %eax, (%rcx)
movb $0x0, -0xe1(%rbp)
cmpl $0x0, %eax
jle 0x2e7e4
jmp 0x2e87e
leaq 0xb6791(%rip), %rsi     # 0xe4f7c
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
movl $0x3a, %edx
movl $0x3, %ecx
callq 0x194b0
movq -0x1c8(%rbp), %rdi
movb $0x1, -0xe1(%rbp)
callq 0x194e0
movq %rax, %rdi
leaq 0xb6a0a(%rip), %rsi     # 0xe522f
callq 0x31ab0
movq %rax, -0x1c0(%rbp)
jmp 0x2e833
movq -0x1c0(%rbp), %rdi
leaq 0xbab4a(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0x1d0(%rbp)
jmp 0x2e84f
callq 0x1c0c0
jmp 0x2e856
movq -0x1d0(%rbp), %rdi
callq 0x1c050
movq %rax, -0x1d8(%rbp)
jmp 0x2e86b
movq -0x1d8(%rbp), %rsi
leaq -0xe4(%rbp), %rdi
callq 0x194f0
testb $0x1, -0xe1(%rbp)
jne 0x2e889
jmp 0x2e8b3
leaq -0xe0(%rbp), %rdi
callq 0x19500
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0xe1(%rbp)
jne 0x2e9b1
jmp 0x2e9bd
movq -0x160(%rbp), %rax
addq $0x8, %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xf0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x100(%rbp)
movq -0xf8(%rbp), %rax
cmpq -0x100(%rbp), %rax
je 0x2eae9
movq -0xf8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x104(%rbp)
movl -0x104(%rbp), %eax
movb $0x0, -0x129(%rbp)
cmpl $0x0, %eax
jl 0x2e91c
jmp 0x2e99a
leaq 0xb6659(%rip), %rsi     # 0xe4f7c
leaq -0x128(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
movl $0x3c, %edx
movl $0x3, %ecx
callq 0x194b0
movq -0x1e8(%rbp), %rdi
movb $0x1, -0x129(%rbp)
callq 0x194e0
movq %rax, %rdi
leaq 0xb6646(%rip), %rsi     # 0xe4fa3
callq 0x1ae20
movq %rax, -0x1e0(%rbp)
jmp 0x2e96b
movq -0x1e0(%rbp), %rdi
leaq 0xbaa12(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0x1f0(%rbp)
jmp 0x2e987
movq -0x1f0(%rbp), %rsi
leaq -0x12a(%rbp), %rdi
callq 0x194f0
testb $0x1, -0x129(%rbp)
jne 0x2e9a5
jmp 0x2e9e0
leaq -0x128(%rbp), %rdi
callq 0x19500
leaq -0xe0(%rbp), %rdi
callq 0x19500
jmp 0x2eafb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0x129(%rbp)
jne 0x2ea9d
jmp 0x2eaa9
movl -0x104(%rbp), %edi
movl $0x408, %esi            # imm = 0x408
movb $0x0, %al
callq 0x15900
movq -0x160(%rbp), %rcx
movl (%rcx), %ecx
movb $0x0, -0x151(%rbp)
cmpl %ecx, %eax
jne 0x2ea08
jmp 0x2ea86
leaq 0xb656d(%rip), %rsi     # 0xe4f7c
leaq -0x150(%rbp), %rdi
movq %rdi, -0x200(%rbp)
movl $0x3d, %edx
movl $0x3, %ecx
callq 0x194b0
movq -0x200(%rbp), %rdi
movb $0x1, -0x151(%rbp)
callq 0x194e0
movq %rax, %rdi
leaq 0xb6822(%rip), %rsi     # 0xe526b
callq 0x1c900
movq %rax, -0x1f8(%rbp)
jmp 0x2ea57
movq -0x1f8(%rbp), %rdi
leaq 0xba926(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0x208(%rbp)
jmp 0x2ea73
movq -0x208(%rbp), %rsi
leaq -0x152(%rbp), %rdi
callq 0x194f0
testb $0x1, -0x151(%rbp)
jne 0x2ea91
jmp 0x2eac2
leaq -0x150(%rbp), %rdi
callq 0x19500
leaq -0x128(%rbp), %rdi
callq 0x19500
jmp 0x2eafb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0x151(%rbp)
jne 0x2eadb
jmp 0x2eae7
jmp 0x2eac4
movq -0xf8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0xf8(%rbp)
jmp 0x2e8e5
leaq -0x150(%rbp), %rdi
callq 0x19500
jmp 0x2eafb
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0xe1080
nopw %cs:(%rax,%rax)