// File: /workspace/github_cpp_makefile_star2_O3/demon386[P]git-store/main.cpp
// Function: process_read_cmd(boost::program_options::variables_map const&)
void process_read_cmd(const po::variables_map& options) {
    if (!options.count("subargs")) {
        return;
    }
    auto subargs = options["subargs"].as<std::vector<std::string>>();
    if (subargs.size() != 1) {
        std::cout << "should given exactly one SHA-1" << std::endl;
    }
    subprocess::run_cmd("git reset --mixed");
    int ret = subprocess::run_cmd("git read-tree " + subargs.at(0));
    if (ret == 0) {
        subprocess::run_cmd("git checkout-index -a");
        subprocess::run_cmd("git reset --mixed");
    } else {
        std::cerr << "Trying to find blob object with this SHA-1" << std::endl;
        subprocess::run_cmd("git show " + subargs.at(0));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x9610(%rip), %rsi      # 0x36e8b
leaq 0x9610(%rip), %rdx      # 0x36e92
leaq -0x40(%rbp), %rdi
callq 0xf8ee
leaq 0x10(%rbx), %rdi
leaq -0x40(%rbp), %rsi
callq 0x2563c
movq %rax, %r14
leaq 0x18(%rbx), %r12
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x2d8ad
callq 0xb430
cmpq %r12, %r14
je 0x2daab
leaq -0x40(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x95c7(%rip), %rsi      # 0x36e8b
leaq 0x95c7(%rip), %rdx      # 0x36e92
callq 0xf8ee
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x24d1c
movq %rax, %rdi
callq 0x30d53
leaq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x10f46
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x2d8fe
callq 0xb430
movq -0x50(%rbp), %rax
subq -0x58(%rbp), %rax
cmpq $0x20, %rax
je 0x2d952
movq 0x1e6a5(%rip), %rbx     # 0x4bfb8
leaq 0x96d3(%rip), %rsi      # 0x36fed
movl $0x1e, %edx
movq %rbx, %rdi
callq 0xb500
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0xb440
movsbl %al, %esi
movq 0x1e673(%rip), %rdi     # 0x4bfb8
callq 0xb040
movq %rax, %rdi
callq 0xb320
leaq -0x40(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x966c(%rip), %rsi      # 0x36fcc
leaq 0x9676(%rip), %rdx      # 0x36fdd
callq 0xf8ee
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2d1f7
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x2d98a
callq 0xb430
movq -0x58(%rbp), %rdx
cmpq %rdx, -0x50(%rbp)
je 0x2dab8
leaq 0x966d(%rip), %rsi      # 0x3700c
leaq -0x40(%rbp), %rdi
callq 0x17287
leaq -0x40(%rbp), %r14
movq %r14, %rdi
movl $0x1, %esi
callq 0x2d1f7
movl %eax, %ebx
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x2d9c8
callq 0xb430
testl %ebx, %ebx
je 0x2da36
movq 0x1e61d(%rip), %rbx     # 0x4bff0
leaq 0x9657(%rip), %rsi      # 0x37031
movl $0x2a, %edx
movq %rbx, %rdi
callq 0xb500
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0xb440
movsbl %al, %esi
movq 0x1e5eb(%rip), %rdi     # 0x4bff0
callq 0xb040
movq %rax, %rdi
callq 0xb320
movq -0x58(%rbp), %rdx
cmpq %rdx, -0x50(%rbp)
je 0x2daca
leaq 0x9635(%rip), %rsi      # 0x3705c
leaq -0x40(%rbp), %rdi
callq 0x17287
leaq -0x40(%rbp), %rbx
jmp 0x2da88
leaq -0x40(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x95d7(%rip), %rsi      # 0x3701b
leaq 0x95e5(%rip), %rdx      # 0x37030
callq 0xf8ee
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2d1f7
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x2da6e
callq 0xb430
leaq -0x40(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x9550(%rip), %rsi      # 0x36fcc
leaq 0x955a(%rip), %rdx      # 0x36fdd
callq 0xf8ee
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2d1f7
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x2daa2
callq 0xb430
leaq -0x58(%rbp), %rdi
callq 0xe470
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x972a(%rip), %rdi      # 0x371e9
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0xb6b0
leaq 0x9718(%rip), %rdi      # 0x371e9
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0xb6b0
jmp 0x2daf1
jmp 0x2daf1
jmp 0x2daf1
jmp 0x2dae8
jmp 0x2daf1
jmp 0x2db05
movq %rax, %rbx
jmp 0x2dafd
jmp 0x2daf1
jmp 0x2daf1
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0xe470
movq %rbx, %rdi
callq 0xb7f0
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x2dafd
callq 0xb430
jmp 0x2dafd