// File: ColinHarker[P]ltsim/src/system-process.cpp
// Function: SystemProcess::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void SystemProcess::parse(const std::string& buffer)
{
   std::istringstream ss(buffer);

   ss >> user >> pid >> cpu >> mem >> vsz >> rss >> tty >> stat >> start >> time;
   std::string word;
   while(ss >> word)
   {
      command += word;
   }

   size_t bufferSize = COLS - 63;

   if(command.length() > bufferSize)
   {
      command = command.substr(1, bufferSize);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x190(%rbp), %rdi
movq %rdi, -0x200(%rbp)
movl $0x8, %edx
callq 0x34f0
movq -0x200(%rbp), %rdi
movq -0x1f8(%rbp), %rsi
callq 0x33d0
movq %rax, -0x1f0(%rbp)
jmp 0x9266
movq -0x1f0(%rbp), %rdi
movq -0x1f8(%rbp), %rsi
addq $0x20, %rsi
callq 0x33d0
movq %rax, -0x208(%rbp)
jmp 0x9286
movq -0x208(%rbp), %rdi
movq -0x1f8(%rbp), %rsi
addq $0x40, %rsi
callq 0x33d0
movq %rax, -0x210(%rbp)
jmp 0x92a6
movq -0x210(%rbp), %rdi
movq -0x1f8(%rbp), %rsi
addq $0x60, %rsi
callq 0x33d0
movq %rax, -0x218(%rbp)
jmp 0x92c6
movq -0x218(%rbp), %rdi
movq -0x1f8(%rbp), %rsi
subq $-0x80, %rsi
callq 0x33d0
movq %rax, -0x220(%rbp)
jmp 0x92e6
movq -0x220(%rbp), %rdi
movq -0x1f8(%rbp), %rsi
addq $0xa0, %rsi
callq 0x33d0
movq %rax, -0x228(%rbp)
jmp 0x9309
movq -0x228(%rbp), %rdi
movq -0x1f8(%rbp), %rsi
addq $0xc0, %rsi
callq 0x33d0
movq %rax, -0x230(%rbp)
jmp 0x932c
movq -0x230(%rbp), %rdi
movq -0x1f8(%rbp), %rsi
addq $0xe0, %rsi
callq 0x33d0
movq %rax, -0x238(%rbp)
jmp 0x934f
movq -0x238(%rbp), %rdi
movq -0x1f8(%rbp), %rsi
addq $0x100, %rsi            # imm = 0x100
callq 0x33d0
movq %rax, -0x240(%rbp)
jmp 0x9372
movq -0x240(%rbp), %rdi
movq -0x1f8(%rbp), %rsi
addq $0x120, %rsi            # imm = 0x120
callq 0x33d0
jmp 0x938e
leaq -0x1c0(%rbp), %rdi
callq 0x3430
leaq -0x190(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x33d0
movq %rax, -0x248(%rbp)
jmp 0x93b6
movq -0x248(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x33b0
movb %al, -0x249(%rbp)
jmp 0x93d4
movb -0x249(%rbp), %al
testb $0x1, %al
jne 0x93e0
jmp 0x9438
movq -0x1f8(%rbp), %rdi
addq $0x140, %rdi            # imm = 0x140
leaq -0x1c0(%rbp), %rsi
callq 0x33f0
jmp 0x93fc
jmp 0x939a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0x94d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x31d0
jmp 0x94d8
movq -0x1f8(%rbp), %rdi
movq 0xbb5a(%rip), %rax      # 0x14fa0
movl (%rax), %eax
subl $0x3f, %eax
cltq
movq %rax, -0x1c8(%rbp)
addq $0x140, %rdi            # imm = 0x140
callq 0x3470
cmpq -0x1c8(%rbp), %rax
jbe 0x94b7
movq -0x1f8(%rbp), %rsi
addq $0x140, %rsi            # imm = 0x140
movq -0x1c8(%rbp), %rcx
leaq -0x1e8(%rbp), %rdi
movl $0x1, %edx
callq 0x32e0
jmp 0x9491
movq -0x1f8(%rbp), %rdi
addq $0x140, %rdi            # imm = 0x140
leaq -0x1e8(%rbp), %rsi
callq 0x3380
leaq -0x1e8(%rbp), %rdi
callq 0x31d0
leaq -0x1c0(%rbp), %rdi
callq 0x31d0
leaq -0x190(%rbp), %rdi
callq 0x3160
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
leaq -0x190(%rbp), %rdi
callq 0x3160
movq -0x198(%rbp), %rdi
callq 0x3510