// File: /workspace/github_cpp_makefile_star2_O1/UBOdin[P]jitd-cpp/src/driver.cpp
// Function: buffer_cmd(std::istream&)
RecordBuffer buffer_cmd(istream &toks)
{
  string fill;
  toks >> fill;

  if(string("random") == fill) {
    int len, max;
    toks >> len >> max;
    return build_buffer(len,max);        

  } else if(string("explicit") == fill) {
    return load_buffer(toks);
  
  } else if(string("file") == fill) {
    ifstream f;
    string filename;
    toks >> filename;
    f.open(filename);
    return load_buffer(f);        
    
  } else {
    cerr << "Invalid Fill Mode: " << fill << endl;
    exit(-1);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
callq 0x4300
leaq -0x260(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x123b(%rip), %rsi      # 0x1102e
leaq 0x123a(%rip), %rdx      # 0x11034
leaq -0x270(%rbp), %rdi
callq 0x7c1e
movq -0x268(%rbp), %rdx
cmpq -0x40(%rbp), %rdx
jne 0xfe30
testq %rdx, %rdx
je 0xfe35
movq -0x48(%rbp), %rsi
movq -0x270(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %r13b
jmp 0xfe38
xorl %r13d, %r13d
jmp 0xfe38
movb $0x1, %r13b
movq -0x270(%rbp), %rdi
cmpq %r12, %rdi
je 0xfe53
movq -0x260(%rbp), %rsi
incq %rsi
callq 0x4280
testb %r13b, %r13b
je 0xfe89
leaq -0x270(%rbp), %rsi
movq %r14, %rdi
callq 0x4150
leaq -0x68(%rbp), %rsi
movq %rax, %rdi
callq 0x4150
movl -0x270(%rbp), %esi
movl -0x68(%rbp), %edx
movq %rbx, %rdi
callq 0x4d5c
jmp 0xffef
leaq -0x270(%rbp), %rdi
movq %r12, (%rdi)
leaq 0x119b(%rip), %rsi      # 0x11035
leaq 0x119c(%rip), %rdx      # 0x1103d
callq 0x7c1e
movq -0x268(%rbp), %rdx
cmpq -0x40(%rbp), %rdx
jne 0xfed0
testq %rdx, %rdx
je 0xfed5
movq -0x48(%rbp), %rsi
movq -0x270(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %r13b
jmp 0xfed8
xorl %r13d, %r13d
jmp 0xfed8
movb $0x1, %r13b
movq -0x270(%rbp), %rdi
cmpq %r12, %rdi
je 0xfef3
movq -0x260(%rbp), %rsi
incq %rsi
callq 0x4280
testb %r13b, %r13b
je 0xff08
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4e0a
jmp 0xffef
leaq -0x270(%rbp), %rdi
movq %r12, (%rdi)
leaq 0x2012(%rip), %rsi      # 0x11f2b
leaq 0x200f(%rip), %rdx      # 0x11f2f
callq 0x7c1e
movq -0x268(%rbp), %rdx
cmpq -0x40(%rbp), %rdx
jne 0xff4f
testq %rdx, %rdx
je 0xff54
movq -0x48(%rbp), %rsi
movq -0x270(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %r13b
jmp 0xff57
xorl %r13d, %r13d
jmp 0xff57
movb $0x1, %r13b
movq -0x270(%rbp), %rdi
cmpq %r12, %rdi
je 0xff72
movq -0x260(%rbp), %rsi
incq %rsi
callq 0x4280
testb %r13b, %r13b
je 0x10019
leaq -0x270(%rbp), %rdi
callq 0x42c0
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq -0x68(%rbp), %rsi
movq %r14, %rdi
callq 0x4300
leaq -0x270(%rbp), %rdi
leaq -0x68(%rbp), %rsi
movl $0x8, %edx
callq 0x41f0
leaq -0x270(%rbp), %rsi
movq %rbx, %rdi
callq 0x4e0a
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0xffe3
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x4280
leaq -0x270(%rbp), %rdi
callq 0x4060
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x10004
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x4280
movq %rbx, %rax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8fd0(%rip), %rdi      # 0x18ff0
leaq 0x1f09(%rip), %rsi      # 0x11f30
movl $0x13, %edx
callq 0x42d0
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq 0x8fb0(%rip), %rdi      # 0x18ff0
callq 0x42d0
movq %rax, %rdi
callq 0x4120
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x42f0
jmp 0x10087
jmp 0x10087
jmp 0x10087
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x10075
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x4280
leaq -0x270(%rbp), %rdi
callq 0x4060
jmp 0x1008a
jmp 0x10087
jmp 0x10087
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x1009f
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x4280
movq %rbx, %rdi
callq 0x4400