// File: /workspace/github_cpp_makefile_star2_O3/AndreiBarsan[P]uShell/command.cc
// Function: microshell::core::DiskCommand::handle_child(microshell::core::Shell*)
void DiskCommand::handle_child(Shell *shell) {
  char **argv = util::get_raw_array(this->argv);
  // TODO(andrei) Pass environment to child, while ensuring no shenanigans can
  // take place (no Shellshock risk).
  char **parent_env = nullptr; //environ;
  execve(argv[0], argv, parent_env);
  // Note: 'execve' doesn't return if it's successful.
  shell->eout("Failed to 'execve'. OS says [" + string(strerror(errno))
               + "]. errno = " + to_string(errno));
  shell->eout("Terminating child.");
  exit(-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %rbx
addq $0x8, %rdi
callq 0xc0d2
movq (%rax), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x53e0
callq 0x5060
movq %rax, %r14
movl (%rax), %edi
callq 0x50d0
leaq -0xd0(%rbp), %rdi
leaq -0x29(%rbp), %rdx
movq %rax, %rsi
callq 0x50f0
leaq 0x6eb1(%rip), %rcx      # 0xd0af
leaq -0xd0(%rbp), %rdi
movl $0x1d, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x5290
leaq -0xa0(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x6237
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x6248
movq %rdx, -0xb0(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xa0(%rbp)
movq 0x8(%rax), %rdx
leaq -0xb0(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x6e07(%rip), %rsi      # 0xd074
callq 0x5450
leaq -0x80(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x6294
movups (%rcx), %xmm0
movq %rsi, %r13
movups %xmm0, (%rsi)
jmp 0x62a5
movq %rsi, %r13
movq %rdx, -0x90(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x80(%rbp)
movq 0x8(%rax), %rdx
movq %rdx, -0x88(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl (%r14), %r14d
movl %r14d, %r15d
negl %r15d
cmovsl %r14d, %r15d
movl $0x1, %r12d
cmpl $0xa, %r15d
jb 0x6322
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r15d, %ecx
cmpl $0x63, %ecx
jbe 0x6319
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x631f
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x6322
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x62e6
addl $-0x3, %r12d
jmp 0x6322
addl $-0x2, %r12d
jmp 0x6322
decl %r12d
shrl $0x1f, %r14d
leal (%r12,%r14), %esi
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x70(%rbp), %rdi
movl $0x2d, %edx
callq 0x52b0
addq -0x70(%rbp), %r14
movq %r14, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x6a3d
movq -0x90(%rbp), %rcx
movq -0x88(%rbp), %r8
movq -0x68(%rbp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r13, %rcx
je 0x6376
movq -0x80(%rbp), %rdi
movq -0x70(%rbp), %rsi
cmpq %rdi, %rax
leaq -0x60(%rbp), %r12
jbe 0x6396
movl $0xf, %edi
cmpq %r12, %rsi
je 0x6391
movq -0x60(%rbp), %rdi
cmpq %rdi, %rax
jbe 0x63a4
leaq -0x90(%rbp), %rdi
callq 0x50b0
jmp 0x63b1
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5290
leaq -0x40(%rbp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
jne 0x63cd
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
jmp 0x63d8
movq %rsi, -0x50(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x40(%rbp)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0x48(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0xa372
leaq -0x40(%rbp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x6412
callq 0x5230
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x6420
callq 0x5230
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x6431
callq 0x5230
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x6449
callq 0x5230
leaq -0xc0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x645e
callq 0x5230
leaq -0x50(%rbp), %rdi
movq %r14, (%rdi)
leaq 0x6c61(%rip), %rsi      # 0xd0cd
leaq 0x6c6c(%rip), %rdx      # 0xd0df
callq 0x7140
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0xa372
leaq -0x50(%rbp), %rdi
callq 0x5120
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x52e0
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
jne 0x6517
jmp 0x6521
jmp 0x651e
movq %rax, %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64c1
callq 0x5230
jmp 0x64c1
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x64d4
callq 0x5230
jmp 0x64d4
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x64e5
callq 0x5230
leaq -0xa0(%rbp), %r15
jmp 0x64f1
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
cmpq %r15, %rdi
je 0x6507
callq 0x5230
jmp 0x6507
movq %rax, %rbx
leaq -0xc0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6521
callq 0x5230
jmp 0x6521
movq %rax, %rbx
movq %rbx, %rdi
callq 0x5400
nop