// File: /workspace/github_cpp_makefile_star2_O3/obliviousram[P]PathOHeap/src/ServerStorage.cpp
// Function: ServerStorage::checkRWValid(int)
void ServerStorage::checkRWValid(int position) {
  if (!this->is_capacity_set) {
    throw std::runtime_error("Please call setCapacity before reading or writing any block");
  }
  if (position >= this->capacity || position < 0) {
    throw std::runtime_error("You are trying to access Bucket " + std::to_string(position) +
        ", but this Server contains only " + std::to_string(this->capacity) + " buckets.");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc0, %rsp
cmpb $0x0, 0x5012(%rip)      # 0xb16c
je 0x617b
movl %esi, %ebp
movq %rdi, %r14
testl %esi, %esi
js 0x61ad
cmpl %ebp, 0x8(%r14)
jle 0x61ad
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20c0
movq %rax, %rbx
leaq 0x121e(%rip), %rsi      # 0x73ad
movq %rax, %rdi
callq 0x2090
movq 0x4e52(%rip), %rsi      # 0xaff0
movq 0x4e23(%rip), %rdx      # 0xafc8
movq %rbx, %rdi
callq 0x2230
movl $0x10, %edi
callq 0x20c0
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
movl %ebp, %esi
callq 0x6607
leaq 0x121c(%rip), %rsi      # 0x73e9
leaq 0x80(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x6597
leaq 0x1224(%rip), %rsi      # 0x740a
leaq 0x80(%rsp), %rdi
callq 0x2270
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x6214
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x6220
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x8(%r14), %esi
leaq 0x60(%rsp), %rdi
callq 0x6607
leaq 0xa0(%rsp), %rdi
movq %rsp, %rsi
leaq 0x60(%rsp), %rdx
callq 0x64ef
leaq 0x11c9(%rip), %rsi      # 0x742b
leaq 0xa0(%rsp), %rdi
callq 0x2270
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x6292
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x629f
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
movq 0x8(%rax), %rdx
leaq 0x40(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x2200
xorl %ebp, %ebp
movq 0x4d21(%rip), %rsi      # 0xaff0
movq 0x4cf2(%rip), %rdx      # 0xafc8
movq %rbx, %rdi
callq 0x2230
movq %rax, %r14
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x6300
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x6300
movq %rax, %r14
movb $0x1, %bpl
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6329
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x6329
movq %rax, %r14
movb $0x1, %bpl
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x634c
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x634c
movq %rax, %r14
movb $0x1, %bpl
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x636a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x636a
movq %rax, %r14
movb $0x1, %bpl
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x638b
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2170
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x63a6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2170
testb %bpl, %bpl
jne 0x63d2
jmp 0x63da
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x63d2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x63d2
jmp 0x63cf
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2250